/* ══════════════════════════════════════
   SANDEEP BARAL - style.css
   Inter body + serif display headings.
══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { display: block; max-width: 100%; }

/* ── Design Token Library ─────────────────────────────────────── */
:root {
  /* Text */
  --ink:   #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;

  /* Backgrounds */
  --bg:      #ffffff;
  --bg-2:    #f5f5f7;
  --bg-dark: #1d1d1f;

  /* Surfaces (elevated / card) */
  --surface:   #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #ebebed;

  /* Borders */
  --border:     rgba(0,0,0,0.06);
  --border-mid: rgba(0,0,0,0.10);

  /* Shadows */
  --shadow-sm: rgba(0,0,0,0.03);
  --shadow-md: rgba(0,0,0,0.07);

  /* Navigation */
  --nav-bg:     rgba(255,255,255,0.82);
  --nav-border: rgba(0,0,0,0.06);

  /* Accent */
  --accent:       #2563EB;
  --accent-muted: rgba(37,99,235,0.08);

  /* Card visual gradients */
  --visual-neutral: linear-gradient(160deg, #f2f4f7 0%, #e8eaf0 100%);
  --visual-plugin:  linear-gradient(160deg, #eef1ff 0%, #e4e8ff 100%);
  --visual-case:    linear-gradient(160deg, #fff7f0 0%, #fdeede 100%);

  /* Typography & layout */
  --font:         'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ease:         cubic-bezier(0.25, 0, 0, 1);
  --gutter:       clamp(24px, 5vw, 72px);
  --max:          960px;
  --sp:           clamp(72px, 9vw, 100px);
}

/* ── Dark Theme Token Overrides ───────────────────────────────── */
[data-theme="dark"] {
  --ink:   oklch(0.94 0.008 78);
  --ink-2: oklch(0.73 0.012 72);
  --ink-3: oklch(0.60 0.012 70);

  --bg:      oklch(0.19 0.008 68);
  --bg-2:    oklch(0.225 0.009 68);
  --bg-dark: oklch(0.17 0.007 68);

  --surface:   oklch(0.255 0.010 68);
  --surface-2: oklch(0.30 0.011 68);
  --surface-3: oklch(0.355 0.012 68);

  --border:     oklch(0.91 0.012 75 / 0.10);
  --border-mid: oklch(0.91 0.012 75 / 0.18);

  --shadow-sm: oklch(0.08 0.006 68 / 0.22);
  --shadow-md: oklch(0.08 0.006 68 / 0.42);

  --nav-bg:     oklch(0.215 0.009 68 / 0.90);
  --nav-border: oklch(0.91 0.012 75 / 0.11);

  --accent:       oklch(0.76 0.075 68);
  --accent-muted: oklch(0.76 0.075 68 / 0.14);

  --visual-neutral: linear-gradient(160deg, oklch(0.27 0.010 68) 0%, oklch(0.32 0.012 68) 100%);
  --visual-plugin:  linear-gradient(160deg, oklch(0.24 0.012 56) 0%, oklch(0.31 0.018 58) 100%);
  --visual-case:    linear-gradient(160deg, oklch(0.23 0.016 52) 0%, oklch(0.31 0.026 58) 100%);
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

/* Smooth theme transitions */
body, #nav, .pw-card, .pw-visual, .project-card,
.pw-plugin-list, .pw-plugin-row, .pw-group-head,
.award-row, .footer-top, .footer-inner {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Selection contrast */
::selection {
  background: #2563eb;
  color: #ffffff;
}
::-moz-selection {
  background: #2563eb;
  color: #ffffff;
}
[data-theme="dark"] ::selection {
  background: oklch(0.70 0.075 68 / 0.42);
  color: oklch(0.96 0.006 78);
}
[data-theme="dark"] ::-moz-selection {
  background: oklch(0.70 0.075 68 / 0.42);
  color: oklch(0.96 0.006 78);
}

.hero-h1,
.motion-headline,
.personal-headline,
.awards-title {
  font-family: var(--font-display);
}

.section-inner,
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  transition: height 0.35s ease, padding 0.35s ease;
}
#nav.scrolled {
  height: 88px;
  background: transparent;
  border-bottom: 0;
}

.nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: width 0.35s ease, max-width 0.35s ease, padding 0.35s ease,
    background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

#nav.scrolled .nav-inner {
  width: min(100%, 560px);
  max-width: 560px;
  padding: 8px 12px 8px 20px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}

[data-theme="dark"] #nav.scrolled .nav-inner {
  border-color: var(--nav-border);
  background: oklch(0.225 0.009 68 / 0.92);
  box-shadow: 0 12px 32px oklch(0.08 0.006 68 / 0.28);
}

.nav-logo {
  font-size: 16px;
  font-family: Avenir, "Avenir Next", sans-serif;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  font-weight: 450;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  padding: 0 14px;
  border-radius: 20px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a > span {
  color: inherit;
  background-image: linear-gradient(
    90deg,
    #d99055 0%,
    #e9bd76 24%,
    #cf795d 50%,
    #df9f68 76%,
    #d99055 100%
  );
  background-position: 100% 50%;
  background-size: 260% 100%;
  background-clip: text;
  -webkit-background-clip: text;
}
.nav-links a:hover > span,
.nav-links a:focus-visible > span {
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: nav-text-gradient 1.8s linear infinite;
}
.nav-links a:hover { color: var(--ink); background: var(--border); }
.nav-resume { font-weight: 550 !important; color: var(--ink) !important; background: var(--surface-2); }
.nav-resume:hover { background: var(--surface-3) !important; }
#nav.scrolled .nav-resume { background: transparent; }
#nav.scrolled .nav-resume:hover { background: var(--border) !important; }

@keyframes nav-text-gradient {
  to { background-position: -160% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-links a:hover > span,
  .nav-links a:focus-visible > span {
    animation: none;
    background-position: 50% 50%;
  }
}

/* ══════════════════════════════════════
   REVEALS
══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
#hero {
  display: flex;
  align-items: center;
  padding: 108px var(--gutter) 44px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  cursor: default;
}

.hero-clouds {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(circle 0px at -999px -999px, white, transparent);
  mask-image:         radial-gradient(circle 0px at -999px -999px, white, transparent);
  mask-mode: alpha;
  will-change: mask-image, -webkit-mask-image;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  gap: clamp(24px, 3vw, 36px);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 0;
  min-height: 0;
  max-width: 600px;
  isolation: isolate;
}
.hero-content::before {
  content: '';
  position: absolute;
  inset: -16px -22px;
  background:
    linear-gradient(
      145deg,
      oklch(0.94 0.008 78 / 0.13) 0%,
      oklch(0.34 0.012 68 / 0.38) 34%,
      oklch(0.17 0.008 68 / 0.56) 100%
    );
  border: 0;
  backdrop-filter: blur(28px) saturate(130%) brightness(1.04);
  -webkit-backdrop-filter: blur(28px) saturate(130%) brightness(1.04);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 oklch(0.98 0.004 78 / 0.24),
    inset 1px 0 0 oklch(0.98 0.004 78 / 0.08),
    inset 0 -1px 0 oklch(0.08 0.006 68 / 0.34),
    0 24px 64px oklch(0.08 0.006 68 / 0.24);
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 240ms cubic-bezier(0.2, 0, 0, 1),
    transform 420ms cubic-bezier(0.2, 0, 0, 1);
  z-index: -1;
  pointer-events: none;
}

.hero-content::after {
  content: '';
  position: absolute;
  inset: -15px -21px;
  z-index: -1;
  border-radius: 23px;
  background:
    radial-gradient(ellipse 58% 28% at 17% 0%, oklch(0.98 0.004 78 / 0.20), transparent 72%),
    linear-gradient(112deg, transparent 28%, oklch(0.98 0.004 78 / 0.055) 44%, transparent 59%);
  opacity: 0;
  transform: translateY(3px);
  transition:
    opacity 320ms cubic-bezier(0.2, 0, 0, 1) 40ms,
    transform 420ms cubic-bezier(0.2, 0, 0, 1) 40ms;
  pointer-events: none;
}

.hero-content:hover::before,
.hero-content.is-glass-active::before {
  opacity: 1;
  transform: scale(1);
}

.hero-content:hover::after,
.hero-content.is-glass-active::after {
  opacity: 0.9;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-content::before,
  .hero-content::after {
    transform: none;
    transition: none;
  }
}

/* ── Logo theme switching (shared) ── */
.hero-mmt-logo {
  display: block;
  height: 22px;
  width: auto;
  flex-shrink: 0;
}
.hero-mmt-logo-wrap {
  display: inline-flex;
  align-items: center;
}
.hero-mmt-logo-dark { display: none; }
[data-theme="dark"] .hero-mmt-logo-light { display: none; }
[data-theme="dark"] .hero-mmt-logo-dark { display: block; }

/* ── Kicker ── */
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.08s forwards;
}
.hero-kicker-role {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero-kicker-at,
.hero-kicker-sep,
.hero-kicker-loc {
  font-size: 13px;
  color: var(--ink-3);
}
.hero-kicker-at {
  color: var(--ink);
  font-weight: 600;
}
.hero-kicker-loc {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-2);
}

/* ── H1 ── */
.hero-h1 {
  max-width: 14ch;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.16s forwards;
}
.hero-h1 span {
  display: block;
  white-space: nowrap;
}
.hero-h1 span:first-child {
  font-family: var(--font-display);
}

/* ── Supporting summary ── */
.hero-summary {
  margin-top: 14px;
  max-width: 52ch;
  font-size: clamp(15px, 1.18vw, 17px);
  line-height: 1.68;
  color: var(--ink);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.24s forwards;
}

/* ── Proof line ── */
.hero-proof {
  margin-top: 16px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.32s forwards;
  position: relative;
  padding-top: 14px;
}
.hero-proof::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 84px;
  height: 1px;
  background: var(--border-mid);
}
.hero-proof strong {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero-proof span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ── Playground ── */
.hero-playground {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 320px;
  justify-self: end;
}

.playground {
  background: transparent;
  border-radius: 18px;
  padding: 0;
  border: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  height: 100%;
  max-height: none;
}


.spray-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.06), transparent 36%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  cursor: none;
  flex: 1;
  min-height: 320px;
  aspect-ratio: 1 / 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}
#spray-canvas { display: block; width: 100%; height: 100%; }

.playground-hint {
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  color: var(--ink-2);
  pointer-events: none;
  transform: rotate(-4deg);
  transform-origin: left center;
  opacity: 0.82;
  visibility: visible;
  transition:
    opacity 160ms cubic-bezier(0.2, 0, 0, 1),
    transform 160ms cubic-bezier(0.2, 0, 0, 1),
    visibility 0s linear;
}

.playground-hint.hidden {
  opacity: 0;
  visibility: hidden;
  transform: rotate(-4deg) translateY(-4px);
  transition:
    opacity 90ms cubic-bezier(0.3, 0, 1, 1),
    transform 90ms cubic-bezier(0.3, 0, 1, 1),
    visibility 0s linear 90ms;
}

.playground-hint span {
  font-family: 'Caveat', 'Bradley Hand', cursive;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.playground-hint svg {
  width: 58px;
  height: 30px;
  margin: 0 0 -12px 4px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .playground-hint,
  .playground-hint.hidden {
    transform: rotate(-4deg);
    transition: none;
  }
}


.playground-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  flex-shrink: 0;
}
.playground-swatches {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="dark"] .playground-swatches {
  background: rgba(17,19,24,0.78);
}
.playground-clear-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.66);
  color: var(--ink-2);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.playground-clear-icon:hover {
  color: var(--ink);
  border-color: var(--border-mid);
  transform: translateY(-1px);
}
.playground-clear-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-theme="dark"] .playground-clear-icon {
  background: rgba(17,19,24,0.78);
}
.pg-swatch {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  cursor: pointer;
  padding: 0;
  outline: 1.5px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s;
}
.pg-swatch:hover { opacity: 0.8; }
.pg-swatch.active {
  outline: 1.5px solid var(--ink-2);
  outline-offset: 2px;
}

/* ══════════════════════════════════════
   SHARED SECTION HELPERS
══════════════════════════════════════ */
.section-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 32px;
}

/* ══════════════════════════════════════
   WORK - full-width immersive project cards
══════════════════════════════════════ */
#work {
  background: var(--bg);
  padding: var(--sp) var(--gutter) 0;
}

.work-intro {
  max-width: 62ch;
  margin: -16px 0 28px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: clamp(32px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.25s, border-color 0.25s;
}
.project-card:first-child { border-top: 1px solid var(--border); }
.project-card:hover { opacity: 0.88; }

.project-visual {
  width: 100%;
  margin-bottom: clamp(20px, 2vw, 24px);
}

.hand-mockup {
  position: relative;
  width: 100%;
  aspect-ratio: 1561 / 1008;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  border: 0;
  background: #83cfff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.hand-mockup-base {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform-origin: center center;
  transition: transform 0.25s;
}

.hand-mockup-device {
  position: absolute;
  z-index: 2;
  left: 40.34%;
  top: 10.32%;
  width: 23.08%;
  height: 75.15%;
  box-sizing: border-box;
  border-radius: 12.6% / 5.9%;
  background: linear-gradient(145deg, #313137 0%, #080809 44%, #25252a 100%);
  border: 0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.62),
    0 12px 26px rgba(0,0,0,0.34);
  overflow: hidden;
  transform: rotate(0.15deg);
}

.hand-mockup-screen {
  position: absolute;
  left: 4.6%;
  top: 2.1%;
  z-index: 2;
  width: 90.8%;
  height: 93.8%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  border-radius: 10.2% / 4.85%;
  background: #f7f8fb;
  display: block;
}

.hand-mockup-device::before {
  content: '';
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 2.95%;
  width: 28.5%;
  height: 4.05%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050507;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  pointer-events: none;
}

.hand-mockup-device::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 clamp(5px, 0.72vw, 9px) #09090b,
    inset 0 1px 0 rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  pointer-events: none;
}

.project-visual-media {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  transform-origin: center center;
  transition: transform 0.25s;
}
.project-visual-media--contain {
  object-fit: contain;
  background:
    radial-gradient(circle at 28% 10%, rgba(50, 100, 255, 0.12), transparent 34%),
    color-mix(in srgb, var(--surface-2) 82%, white 18%);
  padding: clamp(16px, 3vw, 44px);
  box-sizing: border-box;
}
.project-card:hover .project-visual-media {
  transform: scale(1.01);
}
.project-card:hover .hand-mockup-base {
  transform: scale(1.01);
}

.project-visual-ph {
  width: 100%;
  aspect-ratio: 16 / 8;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1.5px dashed var(--border-mid);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.25s, border-color 0.25s;
}
.project-card:hover .project-visual-ph {
  background: var(--surface-3);
  border-color: var(--border-mid);
}

.project-visual-icon { font-size: 36px; opacity: 0.35; }
.project-visual-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  opacity: 0.6;
  letter-spacing: 0.02em;
}

.project-body {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0 clamp(32px, 4vw, 56px);
}

.project-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.project-meta,
.project-title,
.project-summary,
.project-metrics {
  grid-column: 1;
}

.project-meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.project-title {
  font-family: var(--font);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.project-summary {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 54ch;
}

.project-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.project-metric {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-2) 84%, white 16%);
  border: 1px solid color-mix(in srgb, var(--border) 86%, white 14%);
  border-radius: 980px;
  padding: 0 14px;
  letter-spacing: -0.015em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.project-cta {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  margin-top: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  gap: 14px;
  color: #0d0d0f;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-cta::after {
  content: "→";
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0d0d0f;
  color: #ffffff;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}
.project-card:hover .project-cta {
  background: #ececee;
  border-color: #ececee;
  color: #0d0d0f;
  transform: translateX(3px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

/* ══════════════════════════════════════
   MOTION - dark bento
══════════════════════════════════════ */
#motion {
  background: var(--bg-dark);
  padding: var(--sp) var(--gutter);
}

.section-eyebrow-light {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 8px;
}

.motion-headline {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
}

/*
 * Motion section:
 * Left: Year in Review, tall portrait, spans both rows.
 * Right: Plane Loader on top (full right width, square crop),
 *         Native Interactions below (full right width, landscape crop).
 */
.motion-bento {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 10px;
  row-gap: 20px;
}

.motion-bento > .mc-tile {
  position: relative;
  width: 100%;
  min-width: 0;
}

.mc-tile--year {
  grid-column: 1;
  grid-row: 1 / 3;
  aspect-ratio: 1 / 2;
}

.mc-tile--plane {
  grid-column: 2;
  grid-row: 1;
  aspect-ratio: 16 / 9;
}

.mc-tile--native {
  grid-column: 2;
  grid-row: 2;
  /* no aspect-ratio; fills the 1fr row so its bottom aligns with Year in Review */
  min-height: 0;
}

.motion-card {
  background: #1c1c1e;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s;
}
.motion-card:hover { border-color: rgba(255,255,255,0.14); }

.mc-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: #0a0a0a;
}

.mc-tile--year .mc-vid {
  object-position: center 38%;
}

/* Plane Loader: pure white card */
.mc-tile--plane {
  background: #fff;
}
.mc-tile--plane .mc-vid {
  object-fit: contain;
  background: #fff;
}
/* Plane glass overlay: light gradient so dark text stays readable */
.mc-tile--plane .mc-glass {
  background: linear-gradient(to top, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.22) 40%, transparent 100%);
}
.mc-tile--plane .mc-chip {
  background: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.5);
  border-color: rgba(0,0,0,0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.mc-tile--plane .mc-title { color: #111; }
.mc-tile--plane .mc-sub  { color: rgba(0,0,0,0.38); }

.mc-tile--native .mc-vid {
  object-fit: cover;
}

.motion-bento > .motion-card.mc-link {
  display: block;
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.motion-bento .mc-link .mc-vid {
  pointer-events: none;
}

.mc-glass {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.18) 40%, transparent 100%);
  pointer-events: none;
}

/* Row that holds text (left) and chip (right) */
.mc-glass-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.mc-glass-text {
  flex: 1;
  min-width: 0;
}

.mc-chip {
  display: inline-block;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
  border: 1px solid rgba(255,255,255,0.14);
  white-space: nowrap;
}

.mc-title {
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 2px;
}
.mc-sub { font-size: 11px; color: rgba(255,255,255,0.35); }

.mc-link .mc-sub {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  margin-top: 7px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #0d0d0f;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.mc-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
}
.mc-link {
  text-decoration: none;
}
.mc-link:hover .mc-title { color: rgba(255,255,255,0.92); }
.mc-link:hover .mc-sub { background: #ececee; color: #0d0d0f; }
.mc-link:hover .mc-chip { color: rgba(255,255,255,0.6); }

.mc-text-inner { display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }
.mc-glyph { font-size: 20px; color: rgba(255,255,255,0.1); line-height: 1; margin-bottom: 2px; }

.mc-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.mc-strip-inner { display: flex; align-items: center; gap: 14px; }
.mc-text .mc-chip, .mc-strip .mc-chip { color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.06); }

/* ══════════════════════════════════════
   PERSONAL - grid showcase
══════════════════════════════════════ */
#personal {
  background: var(--bg-2);
  padding: var(--sp) var(--gutter);
}

.personal-headline {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 12px;
  max-width: 620px;
}

.personal-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 62ch;
  margin-bottom: 36px;
}

/* ── Stack: all three groups ── */
.pw-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Group shell: open, cards carry the structure ── */
.pw-group {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

/* ── Section header: same layout for all groups ── */
.pw-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.pw-group-head--plain {
  padding-bottom: 0;
  border-bottom: 0;
}

.pw-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.pw-group-note {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
  text-align: right;
  max-width: 420px;
}
.pw-group-note-nowrap {
  white-space: nowrap;
  max-width: none;
}

.pw-group-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* ── Card grid ── */
.pw-group-grid {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.pw-group-grid-live    { grid-template-columns: 1fr 1fr; }
.pw-group-grid-tools   { grid-template-columns: 1fr 1fr; }
.pw-group-grid-writing { grid-template-columns: 1fr; }

/* ── Base card ── */
.pw-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 var(--shadow-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s ease, border-color 0.2s, background-color 0.25s;
}
.pw-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px var(--shadow-md);
  border-color: var(--border-mid);
}
/* ── Visual slot - consistent fixed height across all sections ── */
.pw-visual {
  background: var(--visual-neutral);
  height: 204px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  border-radius: 15px 15px 0 0;
  padding: 0;
}

.pw-visual-plugin {
  background: var(--visual-plugin);
  padding: 10px;
}
.pw-visual-case { background: var(--visual-case); }
.pw-visual-product { background: #0a0a0a; } /* dark bg looks good behind product screenshots */

.pw-group-grid-tools .pw-visual {
  height: 196px;
}

.pw-group-grid-writing .pw-visual {
  height: auto;
}

/* ── Images fill the visual slot ── */
.pw-visual-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.pw-plugin-stage {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-visual-media-plugin {
  object-fit: contain;
  object-position: center center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Legacy multi-thumb grid */
.pw-plugin-thumb-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}
.pw-plugin-thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: var(--surface);
}

/* ── Writing card visual: red background, quote + logo ── */
.pw-visual-writing {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px;
  background: #FF2C00;
  border-bottom: none;
}
.pw-writing-q {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 500;
  line-height: 1.45;
  color: #fff;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}
.pw-brand-logo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
}

/* ── Plugin list - no thumbnails, clean horizontal rows ── */
.pw-plugin-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.pw-plugin-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.pw-plugin-row:link,
.pw-plugin-row:visited,
.pw-plugin-row:hover,
.pw-plugin-row:active {
  color: inherit;
  text-decoration: none;
}
.pw-plugin-row:last-child { border-bottom: none; }
.pw-plugin-row:hover {
  background: color-mix(in srgb, var(--surface-2) 92%, white 8%);
}
.pw-plugin-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 88%, white 12%);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.pw-plugin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pw-plugin-row-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pw-plugin-row .pw-tag { margin-bottom: 2px; }
.pw-plugin-row .pw-title {
  font-size: 17px;
  font-family: inherit;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.pw-plugin-row .pw-desc {
  font-size: 13px;
  margin: 0;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 54ch;
}
.pw-plugin-row .pw-meta {
  margin: 0;
  margin-top: 4px;
}
.pw-plugin-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink-3);
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.pw-plugin-row:hover .pw-plugin-arrow {
  color: var(--ink-2);
  border-color: color-mix(in srgb, var(--border) 78%, white 22%);
  background: color-mix(in srgb, var(--surface-2) 90%, white 10%);
  transform: translateX(1px);
}

/* ── Card body ── */
.pw-body {
  padding: 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.pw-cta {
  margin-top: auto;
  padding-top: 8px;
}

.pw-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.pw-title {
  font-size: clamp(18px, 1.7vw, 20px);
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin-top: 0;
}
.pw-card .pw-title {
  font-family: inherit;
  font-weight: 700;
}
.pw-desc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: 0;
  max-width: 44ch;
}

.pw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.pw-meta-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.pw-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.pw-body-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.pw-body-head ~ .pw-desc {
  max-width: calc(100% - 148px);
}
.pw-body-head ~ .pw-meta {
  max-width: calc(100% - 148px);
}

.pw-cta-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #0d0d0f;
  background: #ffffff;
  border: 1.5px solid #ffffff;
  border-radius: 999px;
  padding: 6px 16px;
  transition: background 0.2s, color 0.2s;
}
.pw-card:hover .pw-cta-pill {
  background: #ececee;
  border-color: #ececee;
  color: #0d0d0f;
}

.pw-browser,
.pw-plugin-frame,
.pw-quote-card {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px;
}

.pw-browser {
  overflow: hidden;
}

.pw-browser-bar {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.pw-browser-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-mid);
}

.pw-browser-canvas {
  padding: 12px;
}

.pw-browser.compact .pw-browser-canvas {
  min-height: 118px;
}

.pw-line {
  border-radius: 999px;
  background: var(--surface-3);
  margin-bottom: 8px;
}
.pw-line.lg { height: 10px; width: 72%; }
.pw-line.md { height: 8px; width: 56%; }
.pw-line.sm { height: 8px; width: 42%; }

.pw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.pw-grid div {
  height: 56px;
  border-radius: 8px;
  background: var(--surface-2);
}

.pw-chip-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.pw-chip-row span {
  display: block;
  width: 44px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface-3);
}

.pw-plugin-frame {
  padding: 14px;
}

.pw-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.pw-btn-row span {
  display: block;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-3);
  flex: 1;
}

.pw-quote-card p {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
}

@media (max-width: 1024px) {
  .pw-group-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .pw-group-note { text-align: left; }
  .pw-group-note-nowrap { white-space: normal; }

  .pw-group-grid-live,
  .pw-group-grid-tools {
    grid-template-columns: 1fr;
  }

  .pw-visual { height: 180px; } /* all cards same height at tablet */
  .pw-visual-plugin { padding: 12px; }
}

/* ══════════════════════════════════════
   AWARDS
══════════════════════════════════════ */
#awards {
  background: var(--bg-dark);
  padding: var(--sp) var(--gutter);
}

.awards-title {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  line-height: 1.1;
}

.awards-list { display: flex; flex-direction: column; }
.award-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  gap: 20px;
}
.award-name {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 500;
  color: rgba(255,255,255,0.88);
}
.award-meta {
  font-size: clamp(13px, 1.15vw, 14px);
  font-weight: 500;
  color: rgba(255,255,255,0.68);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer#footer {
  background: var(--bg-dark);
  padding: clamp(40px, 5vw, 64px) var(--gutter);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-name {
  font-size: 20px;
  font-family: Avenir, "Avenir Next", sans-serif;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-name:hover { opacity: 0.6; }

.footer-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.76);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a::after {
  content: "↗";
  display: inline-block;
  font-size: 0.9em;
  line-height: 1;
  transform: translateY(-0.04em);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}
.footer-nav a:hover { color: rgba(255,255,255,0.95); }
.footer-nav a:hover::after,
.footer-nav a:focus-visible::after {
  transform: translate(0.14em, -0.18em);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.38); }

.footer-weather { display: flex; align-items: center; gap: 7px; font-size: 13px; color: rgba(255,255,255,0.55); }
.fw-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34c759;
  flex-shrink: 0;
}
.fw-dot.live {
  animation: pulse-dot 2.5s infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.fw-city { color: rgba(255,255,255,0.9); font-weight: 500; }
.fw-sep  { color: rgba(255,255,255,0.3); }
.fw-temp { color: rgba(255,255,255,0.55); }
.fw-aqi  { font-weight: 600; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-playground { display: none; }

  .project-body {
    grid-template-columns: 1fr;
  }

  .project-meta,
  .project-title,
  .project-summary,
  .project-metrics,
  .project-copy,
  .project-cta {
    grid-column: 1;
    grid-row: auto;
  }

  .project-cta {
    justify-self: start;
    margin-top: 14px;
  }

  .project-visual-media,
  .project-visual-ph { aspect-ratio: 16 / 9; }

  .motion-bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    justify-items: center;
  }
  .motion-bento > .mc-tile {
    width: min(100%, 520px);
  }
  .mc-tile--year {
    width: min(100%, 280px);
  }
  .mc-tile--year,
  .mc-tile--plane,
  .mc-tile--native {
    grid-column: auto;
    grid-row: auto;
  }
  .mc-tile--native {
    aspect-ratio: 16 / 9;
  }

  .pw-group { padding: 14px; }
  .pw-group-grid-live,
  .pw-group-grid-tools,
  .pw-group-grid-writing { grid-template-columns: 1fr; }
  .pw-visual { height: 200px; }
  .pw-group-grid-writing .pw-visual { height: auto; }
  .pw-visual-writing { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 20px; }
  .pw-brand-logo { width: 60px; height: 60px; align-self: flex-end; }
}

@media (max-width: 480px) {
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .award-row { flex-direction: column; gap: 3px; }
  .award-meta { text-align: left; }
  .motion-bento > .mc-tile,
  .mc-tile--year {
    width: 100%;
  }
  .mc-tile--year,
  .mc-tile--plane,
  .mc-tile--native {
    grid-column: auto;
    grid-row: auto;
  }
}

/* ── Mobile (≤640px) ── */
@media (max-width: 640px) {
  /* Nav: reduce horizontal padding, collapse secondary link */
  #nav { padding: 0 16px; height: 60px; }
  .nav-links a { min-height: 34px; padding: 0 12px; font-size: 13px; }
  #nav.scrolled { height: 76px; padding: 0 12px; }
  #nav.scrolled .nav-inner { width: 100%; padding: 7px 8px 7px 14px; }
  #nav.scrolled .nav-logo { font-size: 15px; }

  /* Hero */
  #hero { padding: 80px 16px 32px; }
  .hero-content { padding: 12px 0; min-height: auto; max-width: none; }
  .hero-content::before { inset: -6px -10px; }
  .hero-kicker { margin-bottom: 10px; gap: 5px; }
  .hero-kicker-role { font-size: 11px; }
  .hero-kicker-at,
  .hero-kicker-sep,
  .hero-kicker-loc { font-size: 11px; }
  .hero-kicker-loc { letter-spacing: 0.06em; }
  .hero-h1 { max-width: none; font-size: clamp(26px, 8vw, 36px); }
  .hero-h1 span { white-space: normal; }
  .hero-summary { margin-top: 12px; max-width: none; font-size: 14px; }
  .hero-proof { margin-top: 12px; gap: 8px; }
  .hero-proof strong { font-size: 16px; }
  .hero-proof span { font-size: 10px; letter-spacing: 0.04em; color: var(--ink-2); }
  .playground { gap: 10px; }
  .spray-wrap { min-height: 260px; }
  .playground-swatches { gap: 7px; padding: 7px 9px; }
  .playground-clear-icon { width: 36px; height: 36px; }
  .pw-plugin-row { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .pw-plugin-thumb { width: 56px; height: 56px; }
  .pw-plugin-arrow { display: none; }

  /* Work */
  #work { padding: 48px 16px 0; }
  .work-intro { margin: -14px 0 24px; font-size: 14px; }
  .project-card { padding: 28px 0; }
  .project-title { font-size: clamp(18px, 5.5vw, 22px); }
  .project-summary { font-size: 14px; }
  .project-metrics { gap: 5px; }

  /* Motion */
  #motion { padding: 48px 16px; }
  .motion-bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 8px;
  }
  .motion-bento > .mc-tile {
    width: 100%;
  }
  .mc-tile--year {
    width: 100%;
  }
  .mc-tile--year,
  .mc-tile--plane,
  .mc-tile--native {
    grid-column: auto;
    grid-row: auto;
  }
  /* Restore aspect-ratio for native tile when stacked (no grid height anchor) */
  .mc-tile--native {
    aspect-ratio: 16 / 9;
  }
  .motion-headline { margin-bottom: 20px; }

  /* Personal */
  #personal { padding: 48px 16px; }
  .pw-group-grid-live,
  .pw-group-grid-tools { grid-template-columns: 1fr; }
  .pw-visual { height: 180px; }
  .pw-group-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pw-group-note { text-align: left; max-width: none; }
  .pw-plugin-row { padding: 14px 16px; gap: 10px; }
  .pw-plugin-row .pw-title { font-size: 14px; }
  .pw-writing-q { font-size: 14px; }
  .pw-brand-logo { width: 56px; height: 56px; }

  /* Awards */
  #awards { padding-left: 16px; padding-right: 16px; }
  .award-meta { font-size: 12px; }

  /* Footer */
  footer#footer { padding-left: 16px; padding-right: 16px; }
  .footer-nav { flex-wrap: wrap; gap: 8px 14px; }
  .footer-nav a { font-size: 13px; }
  .footer-copy { font-size: 12px; }
  .footer-weather { font-size: 12px; flex-wrap: wrap; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-kicker, .hero-h1, .hero-summary, .hero-proof { animation: none; opacity: 1; }
}

/* ══════════════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════════════ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: var(--surface-2);
  cursor: pointer;
  color: var(--ink-2);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--surface-3);
  color: var(--ink);
  transform: scale(1.08);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s;
}
.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ══════════════════════════════════════
   DARK MODE - Residual Overrides
   (only for what truly can't use tokens)
══════════════════════════════════════ */

/* Project card hover shadow in dark */
[data-theme="dark"] .project-card:hover {
  box-shadow: 0 4px 20px var(--shadow-md);
}

/* Motion bento: already hardcoded dark bg - border should be brighter in dark */
[data-theme="dark"] .motion-card {
  border-color: rgba(255,255,255,0.1);
}
