
/* ===== Color Variables – Light Mode ===== */
:root {
  --brand-dark: #3f484b;
  --brand-hover: #5c6b6f;
  --accent-click: #0099ff;

  --bg-light: #f9f9f7;
  --box-bg: #ffffff;
  --text-color: #1f1f1f;

  --box-hover-bg: #f0f2f4;
  --box-hover-text: #3f484b;

  --button-bg: #3f484b;
  --button-text: #ffffff;
  --button-hover-bg: #0099ff;
  --button-hover-text: #ffffff;

  --footer-border: #d0d4d6;
}

/* ===== Color Variables – Dark Mode ===== */
[data-theme="dark"] {
  --brand-dark: #ffffff;
  --brand-hover: #a6b4bc;
  --accent-click: #0099ff;

  --bg-light: #1f1f1f;
  --box-bg: #2a2a2a;
  --text-color: #eeeeee;

  --box-hover-bg: #333333;
  --box-hover-text: #ffffff;

  --button-bg: #ffffff;
  --button-text: #1f1f1f;
  --button-hover-bg: #0099ff;
  --button-hover-text: #1f1f1f;

  --footer-border: #444444;
}

/* ===== Global Reset and Defaults ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== Body and HTML Setup ===== */
body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Arial', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-color);
  line-height: 1.6;
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--accent-click) var(--bg-light);
  scrollbar-width: thin;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background-color: var(--accent-click);
  border-radius: 4px;
}

/* ===== Focus Styling ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-click);
  outline-offset: 2px;
}

/* ===== Container Layout ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== Header Section ===== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--bg-light);
  border-bottom: 1px solid transparent;
  padding: 1em 0;
  z-index: 999;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
header.scrolled {
  border-color: var(--footer-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.menu a {
  position: relative;
  margin: 0 10px;
  padding: 10px 15px;
  border-radius: 6px;
  color: var(--brand-dark);
  transition: color 0.3s, background-color 0.3s;
}
.menu a:hover {
  background-color: #e9fafa;
  color: var(--accent-click);
}
.menu a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background-color: var(--accent-click);
  border-radius: 2px;
}
.logo img {
  height: 60px;
  width: auto;
  max-height: 80px;
  transition: transform 0.3s;
}

/* ===== Footer Section ===== */
footer {
  background-color: var(--box-bg);
  padding: 1em 0;
  text-align: center;
  font-size: 12px;
  color: var(--brand-dark);
  border-top: 1px solid var(--footer-border);
}
.footer-container {
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

/* ===== Main Content Layout ===== */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 93vh;
  padding-top: 140px;
}
main.content {
  flex: 1;
  padding: 0 20px;
}
.content > section {
  max-width: 800px;
  width: 100%;
  margin: 20px auto 40px auto;
  padding: 20px;
  background-color: var(--box-bg);
  color: var(--text-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease-in-out;
}

/* ===== About Page Styles ===== */
.profile-photo {
  width: 200px;
  height: 245px;
  border-radius: 60%;
  margin: 1px auto;
  display: block;
  object-fit: cover;
  object-position: center;
}
#about p {
  text-align: justify;
}

/* ===== Contact Page Styles ===== */
#contactForm {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.input-box, textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: var(--box-bg);
  color: var(--text-color);
}
.input-box:focus-visible, textarea:focus-visible {
  border-color: var(--accent-click);
  outline: none;
}

/* ===== Buttons ===== */
button, .submit-button {
  width: 200px;
  background-color: var(--button-bg);
  color: var(--button-text);
  padding: 10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin: 10px auto 0;
  display: block;
  transition: all 0.3s ease-in-out;
}
button:hover, .submit-button:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-text);
  transform: scale(1.05);
}

/* ===== Project Page Styles ===== */
.project-section {
  margin: 40px auto;
  max-width: 800px;
}
.project-box {
  background-color: var(--box-bg);
  padding: 20px;
  margin-top: 0;
  border-radius: 12px;
  color: var(--text-color);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
.project-box:hover {
  background-color: var(--box-hover-bg);
  color: var(--box-hover-text);
  transform: translateY(-8px) scale(1.02);
}
.project-box footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: var(--brand-hover);
  transition: color 0.3s;
}
.project-box:hover footer {
  color: var(--accent-click);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px 24px; /* ⬅️ Increased row gap */
  max-width: 1000px;
  margin: 0 auto 80px auto; /* More bottom margin */
  padding: 0 20px;
}

/* ===== Social Icons ===== */
.social-icons-container {
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.social-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.social-icons img {
  height: 24px;
  max-width: 100%;
}

/* ===== Responsive Rules ===== */
@media (max-width: 768px) {
  .header-container,
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .menu {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
  }
  .menu a {
    display: block;
    padding: 8px 0;
  }
  .logo img {
    height: 50px;
  }
  .right-controls {
    flex-direction: row;
    margin-top: 10px;
  }
  header {
    min-height: 200px;
  }
  .page-wrapper {
    padding-top: 210px;
  }
  main.content {
    padding-left: 16px;
    padding-right: 16px;
  }
  a.download-link,
  a.download-link:hover,
  a.download-link img {
    cursor: pointer;
  }
  a.download-link:hover {
    opacity: 0.9;
    text-decoration: underline;
  }
}

/* ===== CV Layout ===== */
.cv-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 20px;
}

.cv-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 120px;
  height: fit-content;
  background-color: var(--box-bg);
  padding: 30px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cv-sidebar h1 {
  font-size: 2rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--brand-dark);
  text-align: center;
}

.cv-sidebar h2 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--brand-hover);
  text-align: center;
}

.cv-main {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.cv-section {
  padding-top: 1px;
  margin-bottom: 1px;
}
.cv-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.cv-headline {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--brand-dark);
}

.cv-box {
  background: var(--box-bg);
  border-radius: 16px;
  border-top: 3px solid var(--accent-click);
  padding: 24px 30px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-color);
}

.cv-box em {
  font-style: normal;
  font-weight: 600;
  display: block;
  color: var(--brand-dark);
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* Sticky download button (optional future element) */
.cv-sidebar .download-btn {
  margin-top: 30px;
  padding: 10px 20px;
  border-radius: 10px;
  background-color: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}
.cv-sidebar .download-btn:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-text);
  transform: scale(1.05);
}

/* ===== Responsive CV Layout ===== */
@media (max-width: 960px) {
  .cv-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 16px;
  }
  .cv-sidebar {
    position: relative;
    top: auto;
    flex-direction: column;
    align-items: center;
  }
  .cv-sidebar h1, .cv-sidebar h2 {
    text-align: center;
  }
}

ul {
  list-style: disc;
  margin-left: 1.5em;
  padding-left: 0.5em;
}
li {
  margin-bottom: 0.5em;
}