/* ============================================================
   Nikhil Mehta — portfolio, Chris Ocana inspired layout
   Minimal editorial: fixed corner overlays, grid/scroll card
   modes, hover-to-play video cards, dark mode.
   ============================================================ */

:root {
  --base-unit: 4px;

  --palette-0: #000;
  --palette-10: #161616;
  --palette-black: #2D2828;
  --palette-gray-80: #808184;
  --palette-gray-60: #B4B5B9;
  --palette-gray-20: #e9e9eb;
  --palette-white: #FFFFFF;

  --color-text-main: var(--palette-black);
  --color-text-secondary: var(--palette-gray-80);
  --color-text-link: var(--palette-gray-80);
  --color-text-hover: var(--palette-black);
  --color-bg-default: var(--palette-white);

  --logo-invert-mode: none;

  --gap: 8px;
  --minWvw: 30;
  --maxWvw: 80;
  --maxHvh: 100;

  --header-h: 72px;
}

@font-face {
  font-family: "Bootzy Condensed";
  src: url("../fonts/Bootzy_Condensed_TM/Bootzy_Condensed_TM.woff2") format("woff2"),
       url("../fonts/Bootzy_Condensed_TM/Bootzy_Condensed_TM.ttf")   format("truetype"),
       url("../fonts/Bootzy_Condensed_TM/Bootzy_Condensed_TM.otf")   format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ──────────  Neue Montreal family  ────────── */
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-LightItalic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/Neue_Montreal/NeueMontreal-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

body.dark-mode {
  --color-text-main: var(--palette-white);
  --color-text-secondary: var(--palette-gray-80);
  --color-text-link: var(--palette-gray-60);
  --color-text-hover: var(--palette-gray-20);
  --color-bg-default: var(--palette-0);
  --logo-invert-mode: invert(1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html {
  background-color: var(--palette-white);
  /* Match the body's crossfade so the root (which paints any area the
     body doesn't cover, e.g. the gap above the fixed footer) recolors
     in sync on the dark-mode toggle instead of lagging. */
  transition: background-color .4s ease;
}
/* Keep the root background in sync with dark mode (the .dark-mode
   class lives on <body>, so html needs its own hook). Prevents a
   light gap showing below the content in dark mode. */
html:has(body.dark-mode) { background-color: var(--palette-0); }

/* Page entrance: fade + slide up on load (matches the other pages). */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.hero,
#gridStage {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}
#gridStage { animation-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .hero,
  #gridStage { opacity: 1; transform: none; animation: none; }
}

body {
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  background-color: var(--color-bg-default);
  color: var(--color-text-main);
  min-height: 100svh;
  /* Default: smooth background crossfade for the dark-mode toggle. */
  transition: background-color .4s ease, color 200ms ease;
}
/* Entering hover: drop the page fill instantly so the video reveal
   (its own .4s fade) is the only motion. */
body.hero-hovering {
  background-color: transparent;
  transition: background-color 0s ease 0s, color 200ms ease;
}
/* Leaving hover (transient class, removed after the video fades):
   hold the fill transparent for the video's .4s fade-out, then
   restore instantly — in lockstep with the header/footer. */
body.video-leaving {
  transition: background-color 0s ease .4s, color 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}

h1, h2, h3, h4, h5, p, a {
  font-family: "Rubik", sans-serif;
  color: var(--color-text-main);
  font-weight: 400;
  line-height: 1.3;
}

/* Index page only: Neue Montreal on all text */
body.page-index,
.page-index h1,
.page-index h2,
.page-index h3,
.page-index h4,
.page-index h5,
.page-index p,
.page-index a,
.page-index span,
.page-index button {
  font-family: "Neue Montreal", "Rubik", sans-serif;
}

a {
  color: var(--color-text-link);
  text-decoration: none;
}

/* ────────────  Sticky header  ──────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: var(--color-bg-default);
  border-bottom: 1px solid transparent;
  transition: transform .3s ease, background-color .4s ease, border-color .4s ease, border-bottom-color .4s ease;
}
.site-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 12px 0;
  transition: opacity .2s ease;
}
.site-logo:hover { opacity: .75; }
.site-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Stack both logos so they share the same spot (no layout shift). */
/* Logo stays the SAME in both light and dark mode — no theme swap.
   Always show the default logo; the dark-mode variant is never shown.
   (The .site-logo-dark <img> is kept in the markup in case a theme
   swap is wanted again later.) */
.site-logo-light { display: block; }
.site-logo-dark  { display: none; }

/* Inline nav (desktop) */
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-link);
  transition: color .2s ease;
}
.site-nav-link.active { color: var(--color-text-hover); }
.site-nav-link.active::after { width: 100%; }
.site-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--color-text-hover);
  transition: width .25s ease;
}
.site-nav-link:hover { color: var(--color-text-hover); }
.site-nav-link:hover::after { width: 100%; }

/* Hamburger button (mobile only) */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: none;
  background: none;
  cursor: pointer;
}
.nav-menu-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-text-main);
  transition: transform .3s ease, opacity .3s ease;
}

/* Mobile dropdown menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--color-bg-default);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(0.76, 0, 0.24, 1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  transition: color .2s ease;
}
.mobile-close:hover { color: var(--color-text-hover); }
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.mobile-nav-link {
  font-size: clamp(2rem, 9vw, 3.25rem);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--color-text-secondary);
  transition: color .2s ease;
}
.mobile-nav-link:hover { color: var(--color-text-hover); }
.mobile-nav-link.active { color: var(--color-text-hover); }
.mobile-menu-footer {
  position: absolute;
  bottom: 32px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--color-text-secondary);
}

/* ────────────  Hero context label  ──────────── */
.overlay-context {
  color: var(--color-text-secondary);
  font-size: 13px;
}

/* ──────  top-right hover menu (about / work / info)  ────── */
.bl-menu { position: relative; text-align: right; }
.bl-trigger {
  cursor: default;
  opacity: .4;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-main);
  margin: 0;
}

.bl-list {
  position: absolute;
  right: 0;
  margin: 0;
  padding: 8px 0 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: 200px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 20;
}
.bl-menu:hover .bl-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.bl-list li { opacity: .4; transition: opacity .15s ease; }
.bl-list li:hover { opacity: 1; }

.bl-list a {
  position: relative;
  display: inline-block;
  padding-right: 18px;
  color: inherit;
  line-height: 1.2;
  transition: color .2s ease;
}
.bl-list a::before {
  content: "←";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.bl-list li:hover a::before {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}

/* ── left-aligned variant: sits below the name, opens downward ── */
.overlay-name-row { display: block; margin-bottom: 4px; }

.bl-menu--left { text-align: left; }
.bl-menu--left .bl-list {
  right: auto;
  left: 0;
  align-items: flex-start;
}
.bl-menu--left .bl-list a {
  padding-right: 0;
  padding-left: 18px;
}
.bl-menu--left .bl-list a::before {
  content: "\2192"; /* → */
  right: auto;
  left: 0;
  transform: translateY(-50%) translateX(-8px);
}
.bl-menu--left .bl-list li:hover a::before {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
}

/* ────────────  Layout shell  ──────────── */
.site {
  min-height: 100%;
  display: block;
  padding-top: var(--header-h);
}

/* ────────────  Hero intro  ──────────── */
.hero {
  width: min(94vw, 1600px);
  margin: 0 auto;
  padding: 40px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
}
.hero-name {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  font-size: clamp(2.5rem, 9.9vw, 8.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--color-text-main);
}
.hero-name-last { color: var(--color-text-main); }

/* Hero name links to the reel — inherit the big type, no underline.
   On hover, the reel video plays *inside* the letterforms (like a
   Photoshop clipping mask): the video sits behind the text, and the
   text fill turns transparent so the footage shows through the glyphs. */
.hero-name-link {
  position: relative;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  letter-spacing: inherit;
  color: inherit;
  text-decoration: none;
}

/* ── Video-in-text ──
   The name text and the reel video are stacked in the same box.
   The video is clipped to the glyph shapes with a CSS mask generated
   from the live text, so on hover the footage plays *inside* the
   letters (not as a rectangle). Because the mask is driven by the
   text element itself, it tracks the responsive size and wrapping. */
.hero-name-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3em;
  color: var(--color-text-main);
  transition: color .2s ease, opacity .2s ease, text-shadow .3s ease;
}
.hero-name-last { color: var(--color-text-main); }

/* Hover fill: a rotating gold ring inside each word's letters.
   Each word has a clip layer (.hero-name-clip) masked to that word's letter
   shapes (mask built by buildHeroMasks in script-co.js). Inside it sits a
   ring image (img/brand/Asset_1.png = outer ring for the first name, Asset 2.png =
   inner ring for the last name) that spins slowly while the name is hovered.
   Per word:
     --ring-band : thickness of the ring's text band, as a fraction of the
                   image width (measured from the asset)
     --ring-mid  : radius of the middle of that band, same units
     --ring-fill : how much of the word's height the band fills (1 = all)
     --ring-dx   : shifts the ring sideways, as a fraction of the word width
   script-co.js turns these into --ring-d / --ring-cx / --ring-cy (px). */
.hero-name-text > span { position: relative; }
.hero-name-text > span:first-child { --ring-band: 0.084; --ring-mid: 0.457; --ring-fill: 1.05; --ring-dx: 0; }
.hero-name-last                    { --ring-band: 0.110; --ring-mid: 0.467; --ring-fill: 1;    --ring-dx: 0; }

body                { --ring-bg: #14110f; }
body.dark-mode      { --ring-bg: #2b2b2b; }

.hero-name-clip {
  position: absolute;
  inset: 0;
  /* The ring image is far larger than the word. Clip it to the word's box
     so it doesn't add scrollable height/width to the page (the mask alone
     hides it visually but not from the scroll area). */
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: var(--ring-bg);
  transition: opacity .3s ease;
  -webkit-mask: var(--hero-name-mask, none) 0 0 / 100% 100% no-repeat;
          mask: var(--hero-name-mask, none) 0 0 / 100% 100% no-repeat;
}
.hero-ring {
  position: absolute;
  left: var(--ring-cx, 50%);
  top: var(--ring-cy, 50%);
  width: var(--ring-d, 100%);
  height: auto;
  max-width: none;
  transform: translate(-50%, -50%);
  animation: ring-spin 40s linear infinite;
  animation-play-state: paused;
}
.hero-ring--inner { animation-duration: 30s; animation-direction: reverse; }
@keyframes ring-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@supports not ((-webkit-mask: none) or (mask: none)) {
  .hero-name-clip { display: none; }
}
.hero-name-link:hover .hero-name-clip { opacity: 1; }
.hero-name-link:hover .hero-ring { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
  .hero-ring { animation: none; }
}

/* ── Full-page reel background (revealed while hovering the name) ──
   The video sits behind everything; a translucent scrim of the page
   colour sits over it (but under the content) so text stays readable. */
.page-bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
body.hero-hovering .page-bg-video { opacity: 1; }

/* Scrim: light veil over the video — kept subtle so the footage
   stays prominent (readability intentionally reduced). */
body.hero-hovering::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: color-mix(in srgb, var(--color-bg-default) 22%, transparent);
  transition: opacity .4s ease;
}

/* While hovering, let the video run edge-to-edge: fade the opaque
   backgrounds on the header and footer so the reel shows behind them.
   Use background-color (not the `background` shorthand) and match the
   video's fade timing so the header/main border doesn't flash. */
/* Hover: fade the header/footer fills AND the header's bottom border
   out together. Override border-bottom-color specifically (that's the
   longhand the scrolled state sets) and bump specificity with body so
   it beats `body.scrolled .site-header`. Matching timing on both keeps
   the line from lingering after the background is gone. */
/* The header/footer backgrounds switch INSTANTLY (no fade) in BOTH
   directions. This matters because the fixed header's background
   overlaps the body's background in the header strip — if the chrome
   backgrounds faded, that strip would be double-tinted and show a seam
   at the header's bottom edge during the transition. By switching the
   chrome background instantly, only ONE layer (the body background)
   fades over the video, so both entering and leaving hover are
   seamless. Transform/border still animate normally. */
/* Entering hover: chrome backgrounds drop instantly (0s, no delay) so
   the video reveal is the only motion. */
body.hero-hovering .site-header,
body.hero-hovering .site-footer {
  background-color: transparent;
  border-color: transparent;
  transition: transform .3s ease, background-color 0s ease 0s, border-color 0s ease 0s, border-bottom-color 0s ease 0s;
}
body.hero-hovering.scrolled .site-header,
body.hero-hovering .site-header {
  border-bottom-color: transparent;
}
/* Leaving hover (transient class): hold transparent until the video
   finishes fading out (.4s), then restore instantly — in lockstep with
   the body so no seam appears. */
body.video-leaving .site-header,
body.video-leaving .site-footer {
  transition: transform .3s ease, background-color 0s ease .4s, border-color 0s ease .4s, border-bottom-color 0s ease .4s;
}
/* Default: smooth crossfade for the dark-mode toggle. */
.site-header,
.site-footer {
  transition: transform .3s ease, background-color .4s ease, border-color .4s ease, border-bottom-color .4s ease;
}

/* The hero name's own in-letter video should stay crisp (unscrimmed),
   so lift its z-index above the background layers. */
.hero { position: relative; z-index: 0; overflow-x: clip; }

/* DISABLED (recoverable): hero blend mode. It was switched off for the
   liquid-glass lettering, which has since been removed; it is left off
   because the blend would also invert the in-letter video's colours.
   To bring it back, restore:
   .hero { mix-blend-mode: difference; }
   .hero-name-text, .hero-name-last { color: #fff; } */

@media (prefers-reduced-motion: reduce) {
  body.hero-hovering .page-bg-video { opacity: 0; }
  body.hero-hovering::before { display: none; }
}
.hero-role {
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--color-text-secondary);
}
.hero-context {
  display: flex;
  justify-content: flex-end;
}

/* ────────────  Projects layout (normal flow)  ──────────── */
#gridStage {
  display: block;
  margin-bottom: calc(var(--footer-h, 66px) + 24px);
}
#projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: min(94vw, 1600px);
  margin-inline: auto;
}

/* ────────────  Card / media  ──────────── */
.card {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  display: block;
}

.thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb.hover {
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}
.card:hover .thumb.hover  { opacity: 1; }
.card:hover .thumb.default { opacity: 0; }

/* Wireframe placeholder cards (Project Five / Six) */
.card--placeholder {
  border: 1.5px dashed var(--color-text-secondary);
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      color-mix(in srgb, var(--color-text-secondary) 8%, transparent) 10px,
      color-mix(in srgb, var(--color-text-secondary) 8%, transparent) 20px
    );
}
.thumb.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-text-secondary);
  opacity: .7;
  transition: opacity .2s ease;
}
.card--placeholder:hover .thumb.placeholder { opacity: 1; }
.placeholder-label {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

@media (hover: none) and (pointer: coarse) {
  .card .thumb.hover  { display: none; }
  .card .thumb.default { opacity: 1 !important; }
}

/* Caption row under each card in scroll mode */
.project-meta {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
  z-index: 2;
  opacity: 0;
  transition: opacity .2s ease;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.card:hover .project-meta { opacity: 1; }
.project-meta .p-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.project-meta .p-title { font-size: 18px; font-weight: 500; }

/* ────────────  Sticky footer  ──────────── */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  background: var(--color-bg-default);
  border-top: 1px solid var(--color-text-secondary);
  transition: transform .35s ease, background-color 450ms ease, border-color .3s ease;
}

/* Hidden at the top of the page; slides in once scrolling begins. */
body.footer-hidden .site-footer {
  transform: translateY(100%);
}

@media (prefers-reduced-motion: reduce) {
  .site-footer { transition: background-color 450ms ease, border-color .3s ease; }
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 15px;
  min-width: 0;
}
.footer-link {
  color: var(--color-text-secondary);
  transition: color .2s ease;
}
.footer-link:hover { color: var(--color-text-hover); }
.footer-muted { color: var(--color-text-secondary); }

.footer-theme-toggle {
  border: 1px solid var(--color-text-secondary);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 6px 16px;
  transition: color .2s ease, border-color .2s ease;
}
.footer-theme-toggle:hover {
  color: var(--color-text-hover);
  border-color: var(--color-text-hover);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 18px;
}
.social-icon {
  display: inline-flex;
  color: var(--color-text-secondary);
  transition: color .2s ease, transform .2s ease;
}
.social-icon:hover {
  color: var(--color-text-hover);
  transform: translateY(-2px);
}

/* Keep page content clear of the fixed footer: the footer's real height
   (--footer-h, measured in script-co.js), plus 24px (16px on mobile) of
   breathing room under the last row. */
#gridStage { margin-bottom: calc(var(--footer-h, 66px) + 24px); }

/* ────────────  Responsive  ──────────── */
@media (max-width: 768px) {
  :root { --gap: 12px; --header-h: 60px; }

  /* Swap the inline nav for the hamburger + slide-in dropdown. */
  .site-nav { display: none; }
  .nav-menu-btn { display: flex; }
  .site-logo-img { height: 40px; }

  /* Header slides away on scroll down (toggled via JS). */
  body.header-hidden .site-header {
    transform: translateY(-100%);
  }

  /* Single-column, full-width card stack. */
  #projects {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 92vw;
  }
  #gridStage { margin-bottom: calc(var(--footer-h, 80px) + 16px); }

  /* A bit more left breathing room for the hero on mobile. */
  .hero {
    width: auto;
    margin: 0;
    padding-left: 24px;
    padding-right: 16px;
  }

  /* On touch devices the caption is always shown (no hover). */
  .project-meta { opacity: 1; }

  .site-footer {
    gap: 12px;
    padding: 12px 16px;
    font-size: 13px;
  }
  .footer-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 13px;
  }
  .footer-social { gap: 14px; }
}
