/* ============================================================
   LAYER 2 — COLOR & OPACITY SYSTEM
   ============================================================ */
:root {
  /* Core surfaces */
  --bg-primary: #090909;
  --text-primary: rgba(255, 255, 255, 1);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.6);
  --grid-lines: rgba(255, 255, 255, 0.2);

  /* Badge accents */
  --accent-cyan: #00e5ff;
  --accent-yellow: #ffea00;
  --accent-orange: #ff9100;
  --accent-pink: #ff4081;
  --accent-green: #00e676;

  /* Glass gradients (edge-catching borders) */
  --glass-border-subtle: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.05) 40%,
    rgba(255, 255, 255, 0.05) 60%,
    rgba(255, 255, 255, 0.22)
  );
  --glass-border-strong: linear-gradient(
     135deg,
     rgba(255, 255, 255, 0.7),
     rgba(255, 255, 255, 0.1) 35%,
     rgba(255, 255, 255, 0.1) 65%,
     rgba(255, 255, 255, 0.5)
   );

  /* Themeable surfaces (dark default) */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-bg-strong: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --footer-bg: #fff;
  --footer-text: #090909;
  --footer-muted: rgba(9, 9, 9, 0.55);
  --footer-input-bg: rgba(9, 9, 9, 0.05);
  --footer-input-text: #090909;
  --footer-input-border: rgba(9, 9, 9, 0.15);
}

/* ============================================================
   LIGHT THEME OVERRIDE
   ============================================================ */
[data-theme="light"] {
  --bg-primary: #f4f4f5;
  --text-primary: rgba(9, 9, 9, 1);
  --text-secondary: rgba(9, 9, 9, 0.66);
  --text-muted: rgba(9, 9, 9, 0.55);
  --grid-lines: rgba(9, 9, 9, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-bg-strong: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(9, 9, 9, 0.12);
  --glass-border-subtle: linear-gradient(
    135deg,
    rgba(9, 9, 9, 0.25),
    rgba(9, 9, 9, 0.05) 40%,
    rgba(9, 9, 9, 0.05) 60%,
    rgba(9, 9, 9, 0.18)
  );
  --glass-border-strong: linear-gradient(
    135deg,
    rgba(9, 9, 9, 0.45),
    rgba(9, 9, 9, 0.08) 35%,
    rgba(9, 9, 9, 0.08) 65%,
    rgba(9, 9, 9, 0.32)
  );
  --footer-bg: #090909;
  --footer-text: #fff;
  --footer-muted: rgba(255, 255, 255, 0.55);
  --footer-input-bg: rgba(255, 255, 255, 0.08);
  --footer-input-text: #fff;
  --footer-input-border: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   LAYER 4 — GRID BACKGROUND
   ============================================================ */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--grid-lines) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-lines) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, transparent 100%);
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
h1,
h2,
h3 {
  font-family: "Anton", "Inter", sans-serif;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

/* ============================================================
   SECTION 1 — FLOATING NAV PILL (Subtle Glass)
   ============================================================ */
.nav-pill {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 16px 12px 22px;
  border-radius: 999px;

  /* Liquid glass */
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

/* Edge-catching gradient border via pseudo element */
.nav-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-border-subtle);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.nav-logo {
  font-family: "Anton", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: #fff;
  color: #090909;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Theme toggle — subtle glass pill */
.theme-toggle {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--glass-bg);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--card-bg-strong);
}

/* ============================================================
   SECTION 2 — HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero__name {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: clamp(0.8rem, 1.5vw, 1.05rem);
  color: var(--accent-cyan);
  margin-bottom: 22px;
  z-index: 2;
}

.hero__headline {
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  font-size: clamp(3.5rem, 13vw, 11rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  max-width: 14ch;
  z-index: 2;
}

.hero__sub {
  margin-top: 28px;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-secondary);
  z-index: 2;
}

/* Portrait placeholder */
.portrait {
  margin: 44px 0;
  width: clamp(220px, 28vw, 340px);
  height: clamp(280px, 36vw, 430px);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.04) 12px,
      rgba(255, 255, 255, 0.01) 12px,
      rgba(255, 255, 255, 0.01) 24px
    ),
    rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-subtle);
  position: relative;
  z-index: 2;
}

.portrait__hint {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* Sticker badges */
.badge {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--r)) scale(0.6);
  opacity: 0;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #090909;
  padding: 9px 16px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
}

.badge--pill {
  border-radius: 999px;
}

.badge--rect {
  border-radius: 8px;
}

.badge--cyan { background: var(--accent-cyan); }
.badge--yellow { background: var(--accent-yellow); }
.badge--orange { background: var(--accent-orange); color: #090909; }
.badge--pink { background: var(--accent-pink); color: #fff; }
.badge--green { background: var(--accent-green); }

/* ============================================================
   SECTION 3 — ABOUT
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 32px;
}

.about__title h2 {
  font-size: clamp(3rem, 9vw, 8rem);
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.about__body strong {
  color: var(--text-primary);
  font-weight: 500;
}

.stat-callout {
  margin-top: 12px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid transparent;
  position: relative;
  width: fit-content;
  transition: transform 0.2s ease, background 0.2s ease;
}

.stat-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-border-subtle);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.stat-callout:hover {
  transform: translateY(-2px);
  background: var(--card-bg-strong);
}

.stat-callout__num {
  font-family: "Anton", sans-serif;
  font-size: 1.6rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.stat-callout__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 30ch;
}

/* ============================================================
   SECTION 4 — PROJECTS (Chess / Alternating)
   ============================================================ */
.projects {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 120px;
}

.projects__heading {
  font-size: clamp(3rem, 9vw, 7rem);
  margin-bottom: 64px;
}

/* ---- Project filter bar ---- */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.project-filters button {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--glass-bg);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.project-filters button:hover {
  color: var(--text-primary);
}

.project-filters button.is-active {
  color: #090909;
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.project.is-hidden {
  display: none;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 110px;
}

.project--flip .project__text {
  order: 2;
}

.project--flip .project__media {
  order: 1;
}

.project__date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 14px;
}

.project__text h3 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  margin-bottom: 16px;
  color: var(--text-primary);
}

.project__text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 46ch;
}

.project__text strong {
  color: var(--text-primary);
  font-weight: 500;
}

.project__link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 500;
  color: var(--accent-cyan);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}

.project__link:hover {
  opacity: 0.7;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin-top: 20px;
}

.project__tags li {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
}

.project__media {
  height: 300px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    var(--card-bg);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;

  /* Scroll-reveal initial state */
  opacity: 0;
  transform: translateY(40px);
  filter: blur(10px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.project__media img,
.cert__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project__media.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.media__hint {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ============================================================
   SECTION 4B — CERTIFICATIONS & EXTRACURRICULARS
   ============================================================ */
.certs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 120px;
}

.certs__heading {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  margin-bottom: 64px;
}

.certs__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.cert {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.cert__media {
  height: 240px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(10px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.cert__media.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.cert__date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.cert__text h3 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  margin-bottom: 12px;
  color: var(--text-primary);
}

.cert__text p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 44ch;
}

.cert__text strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Skills / video production block (in About) */
.skills-block {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid transparent;
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.skills-block::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-border-subtle);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.skills-block__title {
  font-family: "Anton", sans-serif;
  text-transform: uppercase;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--accent-pink);
  margin-bottom: 8px;
}

.skills-block__lead {
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 42ch;
  margin-bottom: 16px;
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.skills-chips li {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card-bg-strong);
  border: 1px solid var(--border-subtle);
}

/* ============================================================
   SECTION 5 — FOOTER / CTA
   ============================================================ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 100px 32px;
  text-align: center;
  border-radius: 28px 28px 0 0;
}

.footer__headline {
  font-family: "Anton", sans-serif;
  font-style: italic;
  text-transform: none;
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 0.95;
  margin-bottom: 40px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-bottom: 36px;
}

.footer__links a {
  font-weight: 500;
  font-size: 1.05rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.2s ease;
}

.footer__links a:hover {
  border-color: var(--footer-text);
}

.footer__credit {
  font-size: 0.85rem;
  color: var(--footer-muted);
}

/* ---- Contact form ---- */
.contact-form {
  max-width: 520px;
  margin: 0 auto 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.contact-form__row {
  display: flex;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--footer-input-text);
  background: var(--footer-input-bg);
  border: 1px solid var(--footer-input-border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--footer-bg);
  background: var(--footer-text);
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.contact-form__status {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  min-height: 1.2em;
}

@media (max-width: 560px) {
  .contact-form__row {
    flex-direction: column;
  }
}

/* ============================================================
   LAYER 5 — HERO TEXT WORD REVEAL (initial state)
   ============================================================ */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px);
  filter: blur(10px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .about,
  .project {
    grid-template-columns: 1fr;
  }

  .project--flip .project__text,
  .project--flip .project__media {
    order: initial;
  }

  .hero__headline {
    font-size: clamp(2.8rem, 16vw, 5rem);
  }

  .badge {
    font-size: 0.7rem;
    padding: 7px 12px;
  }
}

@media (max-width: 768px) {
  /* Hide floating sticker badges to prevent clutter on small screens */
  .badge {
    display: none;
  }

  /* Pin the nav pill to the bottom of the screen */
  .nav-pill {
    top: auto;
    bottom: 16px;
    gap: 14px;
    padding: 10px 14px 10px 16px;
    width: calc(100% - 32px);
    max-width: 520px;
    justify-content: space-between;
  }

  /* Hide inline links; show hamburger toggle instead */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 12px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(9, 9, 9, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-pill.open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Stack certification cards into a single column */
  .certs__grid {
    grid-template-columns: 1fr;
  }

  /* Don't crop images on mobile — stretch to fit fully */
  .project__media img,
  .cert__media img {
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
  }
}

/* When the bottom pill overlaps the white footer, flip it to a
   solid dark theme so the MFC logo and links stay readable */
@media (max-width: 768px) {
  .footer {
    border-radius: 28px 28px 0 0;
  }

  body:has(.footer.in-view) .nav-pill {
    background: rgba(9, 9, 9, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  }

  body:has(.footer.in-view) .nav-pill::before {
    background: var(--glass-border-strong);
  }

  body:has(.footer.in-view) .nav-logo,
  body:has(.footer.in-view) .nav-links a {
    color: var(--text-primary);
  }

  body:has(.footer.in-view) .nav-cta {
    background: var(--accent-cyan);
    color: #090909;
  }
}

/* Light theme — mobile nav / dropdown adjustments */
@media (max-width: 768px) {
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  }

  [data-theme="light"] .nav-links a {
    color: var(--text-primary);
  }

  [data-theme="light"] .nav-links a:hover {
    background: rgba(9, 9, 9, 0.06);
  }

  /* Footer is dark in light theme — keep the nav light when overlapping */
  [data-theme="light"] body:has(.footer.in-view) .nav-pill {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

  [data-theme="light"] body:has(.footer.in-view) .nav-logo,
  [data-theme="light"] body:has(.footer.in-view) .nav-links a {
    color: var(--text-primary);
  }

  [data-theme="light"] body:has(.footer.in-view) .theme-toggle {
    color: var(--text-secondary);
    border-color: var(--border-subtle);
  }
}

@media (prefers-reduced-motion: reduce) {
  .word,
  .badge,
  .project__media,
  .cert__media {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
