/* =================================================================
   Vikas Kumar — portfolio
   Dark editorial layout, oversized display type, single hot accent.
   ================================================================= */

:root {
  /* --- primitive ------------------------------------------------ */
  --black:        #0E0D10;
  --ink-900:      #141318;
  --ink-800:      #1A181F;
  --ink-700:      #232028;
  --ink-600:      #2E2A35;
  --white:        #FAFAFA;
  --grey-300:     #C7C4CE;
  --grey-500:     #918D9C;
  --grey-600:     #6E6A78;
  --crimson:      #F4224E;
  --crimson-dim:  #C11239;

  /* --- semantic ------------------------------------------------- */
  --surface:        var(--black);
  --surface-raised: var(--ink-800);
  --surface-high:   var(--ink-700);
  --text-primary:   var(--white);
  --text-secondary: var(--grey-300);
  --text-muted:     var(--grey-500);
  --text-faint:     var(--grey-600);
  --border-subtle:  rgba(199, 196, 206, 0.10);
  --border-strong:  rgba(199, 196, 206, 0.20);
  --accent:         var(--crimson);
  --accent-rgb:     244, 34, 78;   /* --accent as channels, for translucent tints */
  --accent-contrast:#FFFFFF;

  /* --- type ----------------------------------------------------- */
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-hand:    'Caveat', 'Bradley Hand', cursive;

  /* pinboard panel — a warmer, raised dark surface for the collage */
  --board:        #17161B;
  --board-top:    #1D1B22;
  --board-line:   rgba(226, 219, 206, 0.13);
  --board-ink:    #F1EDE5;   /* warm off-white, not the cold page white */
  --board-muted:  #9C958A;
  --board-faint:  #6B655C;

  /* the two physical objects that stay light: sticky note and photo frame */
  --sticky:       #E9CE5C;
  --sticky-ink:   #241F0C;
  --frame:        #F6F2EA;
  --tape:         rgba(233, 206, 92, 0.28);

  /* --- space / shape -------------------------------------------- */
  --wrap:     1240px;
  --gutter:   clamp(1.25rem, 4vw, 3rem);
  --r-sm:     12px;
  --r-md:     20px;
  --r-lg:     28px;
  --r-pill:   999px;
  --section-y: clamp(3rem, 6vw, 5.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-primary); margin: 0; line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-contrast); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-contrast);
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section-tight { padding-block: clamp(2rem, 4vw, 3.25rem); }
.section-top-tight { padding-top: clamp(1rem, 3vw, 2.5rem); }
.center { text-align: center; margin-top: clamp(1.5rem, 3vw, 2.5rem); }

/* ----------------------------------------------------- typography */
.display-xl {
  font-size: clamp(3.25rem, 15vw, 13.5rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.display-lg { font-size: clamp(2.75rem, 8vw, 6rem); line-height: 0.95; letter-spacing: -0.035em; }
.display-md { font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.02; letter-spacing: -0.03em; }
.accent { color: var(--accent); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 1.25rem;
}
/* `ch` here resolves at body size, not heading size — use a rem measure so
   display type gets room, and keep the tight measure on the note below. */
.section-head { margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); max-width: min(100%, 46rem); }
.section-note { color: var(--text-muted); margin-top: 1.25rem; font-size: 1.05rem; max-width: 56ch; }
.page-lead { color: var(--text-muted); font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 60ch; margin-top: 1.75rem; line-height: 1.6; }
.lead-text { font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--text-primary); line-height: 1.45; letter-spacing: -0.01em; }
.h-side { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); font-family: var(--font-body); font-weight: 600; }
.h-panel { font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 0.85rem; }

/* -------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: var(--r-pill);
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 1rem 1.9rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: var(--accent-contrast); }
.btn-accent:hover { background: #ff3a62; }
.btn-outline { border-color: var(--border-strong); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: rgba(199, 196, 206, 0.07); color: var(--text-primary); border-color: var(--border-subtle); }
.btn-ghost:hover { background: rgba(199, 196, 206, 0.13); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 600; font-size: 0.9rem; color: var(--accent);
}
.link-arrow span { transition: transform 0.25s var(--ease); }
a:hover > .link-arrow span, .link-arrow:hover span { transform: translateX(4px); }

/* ------------------------------------------------------------ nav */
.nav-wrap { position: fixed; inset: 0 0 auto 0; z-index: 100; padding: 1rem var(--gutter); display: flex; justify-content: center; pointer-events: none; }
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 1.5rem;
  width: 100%; max-width: 900px;
  padding: 0.6rem 1rem 0.6rem 0.85rem;
  background: rgba(24, 22, 28, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.nav-scrolled .nav { background: rgba(18, 16, 22, 0.92); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }

.nav-brand { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; }
.nav-mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--accent); color: var(--accent-contrast);
  border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 700; font-size: 0.7rem; letter-spacing: -0.02em;
}
.nav-name { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); font-size: 0.95rem; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: clamp(0.25rem, 1.5vw, 1rem); }
.nav-link {
  display: block; padding: 0.45rem 0.9rem; border-radius: var(--r-pill);
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--text-primary); background: rgba(199, 196, 206, 0.07); }
.nav-link.is-active { color: var(--text-primary); background: rgba(199, 196, 206, 0.1); }

.nav-toggle { display: none; width: 40px; height: 34px; background: none; border: 0; cursor: pointer; padding: 0; place-items: center; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  pointer-events: auto; position: absolute; top: calc(100% - 0.25rem); left: var(--gutter); right: var(--gutter);
  background: rgba(18, 16, 22, 0.97); backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 0.75rem;
}
.mobile-menu a { display: block; padding: 0.85rem 1rem; border-radius: var(--r-sm); font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--text-primary); }
.mobile-menu a:hover { background: rgba(199, 196, 206, 0.07); color: var(--accent); }

/* ----------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: clamp(5rem, 10vw, 7rem);
  min-height: min(100svh, 900px);
  display: flex; align-items: center;
}
.hero:has(.hero-figure.has-photo) { padding-top: clamp(6rem, 11vw, 8.5rem); padding-bottom: 0; }
.hero-grid {
  position: relative;
  display: grid; align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
}
.hero-copy { position: relative; align-self: center; padding-bottom: clamp(2rem, 6vw, 4rem); }
.hero-eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 1.5rem;
}
.hero-title { font-size: clamp(2.35rem, 5.6vw, 4.5rem); line-height: 1.08; letter-spacing: -0.035em; max-width: 15ch; }

/* The highlighted phrase stays on one line so its drawn underline fits. */
.hero-highlight { position: relative; white-space: nowrap; padding-bottom: 0.06em; }
.hero-highlight .underline {
  position: absolute; left: -1%; right: -1%; bottom: -0.06em;
  width: 102%; height: 0.22em; color: var(--accent); overflow: visible;
}
.hero-highlight .underline path {
  stroke-dasharray: 320; stroke-dashoffset: 320;
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1) 0.75s;
}
.js.is-ready .hero-highlight .underline path { stroke-dashoffset: 0; }
html:not(.js) .hero-highlight .underline path { stroke-dashoffset: 0; }

.hero-sub { color: var(--text-muted); font-size: clamp(1rem, 1.7vw, 1.15rem); line-height: 1.65; max-width: 46ch; margin: 1.75rem 0 2.25rem; }

/* No z-index here on purpose: `position: relative` alone does not form a
   stacking context, which is what lets the clip's `lighten` blend reach
   the page behind it. The gradient sits at z-index -1 instead. */
.hero-figure {
  --figure-h: min(88svh, 820px);
  position: relative;
  display: grid; place-items: center; justify-self: end; width: 100%;
}

.hero-figure.has-photo { align-self: end; }
.hero-photo {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: var(--figure-h);
  object-fit: contain; object-position: bottom;
  /* grounds the cut-out and pulls it slightly toward the page's warmth */
  filter: drop-shadow(0 34px 44px rgba(0, 0, 0, 0.55)) saturate(0.94) contrast(1.03);
}
/* ---- looping clip layered over the still ----
   The source has a pure-black backdrop, so `lighten` knocks it out against
   the dark page: black becomes the background, everything brighter survives
   untouched. No alpha channel needed. */
.portrait-video {
  position: absolute; inset: 0; margin: auto;
  opacity: 0; pointer-events: none;
  mix-blend-mode: lighten;
  transition: opacity 0.9s var(--ease);
}
.video-ready .portrait-video { opacity: 1; }
/* The still fades out underneath, so there is never a gap between them. */
.video-ready .hero-photo,
.polaroid-img.video-ready img { opacity: 0; transition: opacity 0.9s var(--ease); }

.hero-video {
  width: 100%; max-width: 560px;
  max-height: var(--figure-h);
  object-fit: contain; object-position: bottom;
  left: 0; right: 0; top: auto; bottom: 0;
}
.polaroid-video {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 12%;
  inset: 0;
}

/* a soft contact shadow so the figure is standing on something */
.hero-figure.has-photo::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; translate: -50% 0;
  width: 62%; height: 26px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(6px);
}

.hero-orb { position: relative; display: grid; place-items: center; width: min(100%, 460px); aspect-ratio: 1; }
.hero-orb::before {
  content: ''; position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, rgba(var(--accent-rgb), 0.85), rgba(var(--accent-rgb), 0.10) 58%, transparent 74%);
  box-shadow: 0 40px 110px rgba(var(--accent-rgb), 0.3);
}
.hero-orb-mark {
  position: relative; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.25rem); letter-spacing: -0.05em; color: var(--text-primary);
}
.hero-orb-ring {
  position: absolute; inset: 4%; border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  animation: orbit 22s linear infinite;
}
.hero-orb-ring-2 { inset: 18%; border-style: dashed; border-color: rgba(199, 196, 206, 0.14); animation-duration: 34s; animation-direction: reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
.stats li { background: var(--surface); padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 0.4rem; }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); color: var(--text-primary); letter-spacing: -0.04em; line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--text-faint); }

/* -------------------------------------------------------- marquee */
.marquee-section { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 1.5rem; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.5rem); color: var(--text-faint); letter-spacing: -0.03em; white-space: nowrap; transition: color 0.3s var(--ease); }
.marquee-item:hover { color: var(--text-primary); }
.marquee-dot { color: var(--accent); font-size: 1.25rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------------------------------------------------- cards */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(1.25rem, 2.5vw, 1.75rem); }
/* Work grid runs three across, dropping to two then one as space allows. */
.grid-3-up { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
@media (max-width: 1080px) { .grid-3-up { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .grid-3-up { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(1.25rem, 2.5vw, 1.75rem); }

.card {
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); }

.cover { position: relative; aspect-ratio: 8 / 5; overflow: hidden; background: var(--ink-900); border-radius: var(--r-md); }
.cover svg { width: 100%; height: 100%; transition: transform 0.6s var(--ease); }
.project-card .cover { border-radius: 0; }
.project-card:hover .cover svg { transform: scale(1.05); }

.project-card-body { padding: clamp(1.35rem, 2.5vw, 1.85rem); display: flex; flex-direction: column; gap: 1.1rem; }
.project-card-title { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.03em; }
.project-card-sub { color: var(--text-muted); margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.5; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--text-faint); border: 1px solid var(--border-subtle); border-radius: var(--r-pill); padding: 0.3rem 0.7rem; }

.also-for { margin-top: clamp(2rem, 4vw, 3rem); padding-top: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--border-subtle); }

.about-head { margin-bottom: 2rem; }

/* ---------------------------------------------------------- quote */
.quote { margin: 0; text-align: center; max-width: 56ch; margin-inline: auto; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 3.4vw, 2.4rem); line-height: 1.25; letter-spacing: -0.025em; color: var(--text-primary); }
.quote figcaption { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 0.2rem; }
.quote-name { font-weight: 600; color: var(--text-primary); }
.quote-role { font-size: 0.85rem; color: var(--text-faint); }

/* ------------------------------------------------------- services */
.service-list { border-top: 1px solid var(--border-subtle); }
.service-row {
  display: grid; grid-template-columns: 3rem minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem); align-items: start;
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s var(--ease);
}
.service-row:hover { background: rgba(199, 196, 206, 0.03); }
.service-num { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--accent); letter-spacing: 0.05em; padding-top: 0.4rem; }
.service-title { font-size: clamp(1.35rem, 2.6vw, 2rem); letter-spacing: -0.025em; }
.service-blurb { color: var(--text-muted); margin-top: 0.75rem; font-size: 0.98rem; }
.service-items { display: flex; flex-wrap: wrap; gap: 0.4rem; align-content: start; }
.service-items li { font-size: 0.8rem; color: var(--text-secondary); background: rgba(199, 196, 206, 0.06); border-radius: var(--r-pill); padding: 0.35rem 0.8rem; }

.service-card { padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 1rem; }
.service-card .service-num { padding: 0; }

/* ---------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-size: 0.85rem; color: var(--text-secondary); border: 1px solid var(--border-subtle); background: rgba(199, 196, 206, 0.04); border-radius: var(--r-pill); padding: 0.5rem 1rem; transition: border-color 0.25s var(--ease), color 0.25s var(--ease); }
.chip:hover { border-color: var(--accent); color: var(--text-primary); }
.chips-lg .chip { font-size: 1rem; padding: 0.7rem 1.35rem; font-family: var(--font-display); font-weight: 500; }

/* ---------------------------------------------------------- split */
.split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.split-body { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; }
.split-body strong { color: var(--text-primary); }
.project-split { padding-block: clamp(1.75rem, 4vw, 3rem); border-top: 1px solid var(--border-subtle); }
.prose p { margin-bottom: 1.35em; }

/* ------------------------------------------------------- timeline */
.timeline { border-top: 1px solid var(--border-subtle); }
.timeline-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: baseline; padding-block: clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--border-subtle); }
.timeline-role h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); letter-spacing: -0.02em; }
.timeline-role p { color: var(--text-faint); font-size: 0.9rem; margin: 0.4rem 0 0; }
.timeline-period { color: var(--text-muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 0.5rem; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }

.exp-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border-subtle); }
.exp-item { padding-block: clamp(1.75rem, 3.5vw, 2.75rem); border-bottom: 1px solid var(--border-subtle); }
.exp-head { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: baseline; }
.exp-title { font-size: clamp(1.25rem, 2.4vw, 1.75rem); letter-spacing: -0.025em; }
.exp-company { color: var(--accent); font-size: 0.9rem; font-weight: 500; margin: 0.4rem 0 0; }
.exp-period { color: var(--text-faint); font-size: 0.85rem; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 0.5rem; }
.exp-points { margin-top: 1.35rem; display: flex; flex-direction: column; gap: 0.7rem; max-width: 78ch; }
.exp-points li { position: relative; padding-left: 1.4rem; color: var(--text-muted); font-size: 0.98rem; }
.exp-points li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.7; }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(1.75rem, 4vw, 3rem); }
.skill-group-title { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); font-family: var(--font-body); font-weight: 600; margin-bottom: 1rem; }

.edu-list { border-top: 1px solid var(--border-subtle); }
.edu-list li { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: baseline; padding-block: 1.4rem; border-bottom: 1px solid var(--border-subtle); }
.edu-list strong { display: block; color: var(--text-primary); font-family: var(--font-display); font-size: 1.05rem; }
.edu-list span { color: var(--text-faint); font-size: 0.9rem; }

/* ---------------------------------------------------------- panel */
.panel { background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }
.panel-quiet { background: transparent; }
.panel-org { color: var(--accent); font-size: 0.85rem; font-weight: 500; margin: 0 0 0.75rem; }
.panel-detail { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.ticks { display: flex; flex-direction: column; gap: 0.75rem; }
.ticks li { position: relative; padding-left: 1.75rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 0.35em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ------------------------------------------------------- page hero */
.page-hero { padding-top: clamp(8rem, 16vw, 11rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); position: relative; }
.page-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 480px;
  background: radial-gradient(60% 100% at 20% 0%, rgba(var(--accent-rgb), 0.13), transparent 70%);
  pointer-events: none; z-index: -1;
}
.error-page { text-align: center; padding-block: clamp(9rem, 20vw, 14rem); }
.error-page .page-lead, .error-page .btn-row { margin-inline: auto; justify-content: center; }

/* ---------------------------------------------------- project page */
.project-hero::before { background: radial-gradient(60% 100% at 20% 0%, color-mix(in srgb, var(--p-accent) 18%, transparent), transparent 70%); }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-faint); font-size: 0.875rem; font-weight: 500; margin-bottom: 2rem; transition: color 0.25s var(--ease); }
.back-link:hover { color: var(--accent); }
.project-subtitle { color: var(--text-muted); font-size: clamp(1.1rem, 2.2vw, 1.5rem); margin-top: 1.25rem; max-width: 50ch; font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; }

.meta-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; margin: clamp(1.25rem, 3vw, 2rem) 0 0; }
.meta-bar > div { background: var(--surface); padding: 1.25rem 1.5rem; }
.meta-bar dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.meta-bar dd { margin: 0.4rem 0 0; color: var(--text-primary); font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; }

.project-summary { font-family: var(--font-display); font-size: clamp(1.25rem, 2.8vw, 2rem); line-height: 1.35; letter-spacing: -0.025em; color: var(--text-primary); max-width: 42ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.approach { display: flex; flex-direction: column; border-top: 1px solid var(--border-subtle); }
.approach-step { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); padding-block: clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--border-subtle); }
.approach-num { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--accent); letter-spacing: 0.05em; padding-top: 0.3rem; }
.approach-step h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -0.02em; }
.approach-step p { color: var(--text-muted); margin: 0.7rem 0 0; max-width: 72ch; font-size: 0.98rem; }

.outcome-grid { align-items: start; }

.next-project {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem;
  padding: clamp(1.75rem, 4vw, 3rem); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); background: var(--surface-raised);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.next-project:hover { border-color: var(--accent); transform: translateY(-4px); }
.next-title { grid-column: 1; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -0.03em; color: var(--text-primary); }
.next-sub { grid-column: 1; grid-row: 2; color: var(--text-muted); font-size: 0.95rem; margin-top: 0.4rem; }
.next-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: clamp(1.5rem, 3vw, 2.25rem); color: var(--accent); transition: transform 0.3s var(--ease); }
.next-project:hover .next-arrow { transform: translateX(8px); }

/* ------------------------------------------------------------ cta */
.cta { padding-block: var(--section-y); }
.cta-inner {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--border-subtle); border-radius: clamp(var(--r-lg), 4vw, 40px);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, var(--ink-800), var(--black));
}
.cta-inner::before {
  content: ''; position: absolute; bottom: -60%; left: 50%; transform: translateX(-50%);
  width: min(800px, 120%); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.22), transparent 62%);
  pointer-events: none;
}
.cta-inner > * { position: relative; }
.cta-text { color: var(--text-muted); max-width: 52ch; margin: 1.75rem auto 2.25rem; }
.cta .btn-row { justify-content: center; }

/* ------------------------------------------------- project card meta */
.project-card-meta { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 0.85rem; }
.project-index {
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  color: var(--accent); letter-spacing: 0.04em;
  border: 1px solid rgba(var(--accent-rgb), 0.35); border-radius: var(--r-pill);
  padding: 0.15rem 0.6rem;
}
.project-kicker {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--text-faint);
}

/* Real thumbnails sit in the same frame as the generated art. */
.cover-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ------------------------------------------------------------ carousel
   One implementation, two uses. Native scroll-snap does the work; the
   buttons just nudge it, so it stays usable with JS off. */
.carousel { position: relative; }

.carousel-viewport {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  /* Don't inherit the page's smooth scrolling — the buttons pass their own
     `behavior`, so reduced-motion users get an instant jump. */
  scroll-behavior: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* fade the edges so slides look like they continue past the frame */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
}
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel.at-start .carousel-viewport {
  -webkit-mask-image: linear-gradient(90deg, #000 97.5%, transparent);
  mask-image: linear-gradient(90deg, #000 97.5%, transparent);
}
.carousel.at-end .carousel-viewport {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5%);
  mask-image: linear-gradient(90deg, transparent, #000 2.5%);
}
.carousel.at-start.at-end .carousel-viewport { -webkit-mask-image: none; mask-image: none; }
.carousel-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-md); }
.carousel.is-enhanced .carousel-viewport { cursor: grab; }
.carousel.is-dragging .carousel-viewport { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }

.carousel-track {
  display: flex; align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
  /* No inline padding: with `scroll-snap-type: mandatory` a left pad
     becomes the first snap point, so the track could never sit at 0.
     Vertical padding stays — the slides lift on hover. */
  padding: 0.5rem 0 1.25rem;
}
.carousel-item { scroll-snap-align: start; flex: 0 0 auto; display: flex; }
.carousel.is-dragging .carousel-item * { user-select: none; }

.carousel-controls { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
/* A looping track has no start or end, so the progress bar is meaningless
   and the buttons are nudges rather than bounds. */
.carousel.is-looping .carousel-viewport { scroll-snap-type: none; }
.carousel.is-looping .carousel-progress { visibility: hidden; }
.carousel.is-looping .carousel-btn:disabled { opacity: 1; cursor: pointer; }
.carousel.is-looping .carousel-viewport {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.carousel.is-static .carousel-controls { display: none; }
.carousel-btn {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-primary); cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
.carousel-progress { flex: 1; height: 2px; background: var(--border-subtle); border-radius: 2px; overflow: hidden; }
.carousel-progress span {
  display: block; height: 100%; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.2s linear;
}

/* ------------------------------------------------------ recommendations */
.rec-slide { flex-basis: min(430px, 82vw); }
.rec {
  position: relative; margin: 0; width: 100%;
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; gap: 1.5rem;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.rec:hover { border-color: var(--border-strong); transform: translateY(-4px); }

/* the standout quote gets a wider slide and an accent wash */
.rec-slide-featured { flex-basis: min(520px, 86vw); }
.rec-featured {
  background: linear-gradient(150deg, rgba(var(--accent-rgb), 0.12), var(--surface-raised) 58%);
  border-color: rgba(var(--accent-rgb), 0.28);
}
.rec-featured blockquote { color: var(--text-primary); font-size: 1.02rem; }
.rec-quote-mark {
  position: absolute; top: -0.6rem; right: 1.35rem;
  font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 7rem;
  color: var(--accent); opacity: 0.18; line-height: 1; pointer-events: none;
}
.rec blockquote { margin: 0; color: var(--text-secondary); font-size: 0.98rem; line-height: 1.65; position: relative; }
.rec figcaption { display: flex; align-items: center; gap: 0.85rem; margin-top: auto; padding-top: 0.5rem; }
.rec-avatar {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(var(--accent-rgb), 0.14); color: var(--accent);
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
}
.rec-avatar-img { object-fit: cover; padding: 0; background: var(--surface-high); }
.rec-name { display: block; color: var(--text-primary); font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.rec-role { display: block; color: var(--text-faint); font-size: 0.8rem; margin-top: 0.15rem; }

/* ------------------------------------------------------ case studies
   Behance projects in a drifting carousel. Covers keep Behance's own
   crop ratio so nothing is cut off. */
.work-slide { flex-basis: min(400px, 84vw); }
.work-slide .project-card { width: 100%; display: flex; flex-direction: column; }
.work-carousel .cover { aspect-ratio: 404 / 316; }
.work-carousel .cover-photo img { transition: transform 0.7s var(--ease); }
.work-carousel .project-card:hover .cover-photo img { transform: scale(1.04); }
.work-carousel .project-card-body { flex: 1; }
.work-carousel .link-arrow { margin-top: auto; align-self: flex-start; }
.work-more { margin-top: clamp(1.5rem, 3vw, 2.25rem); }

/* ------------------------------------------------------ visual gallery */
.visual-slide { flex-basis: min(440px, 84vw); }
.visual-link { display: flex; width: 100%; }
.visual { margin: 0; width: 100%; display: flex; flex-direction: column; gap: 1.15rem; }
.visual-frame {
  overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle); background: var(--surface-raised);
  aspect-ratio: 404 / 316;
  transition: border-color 0.35s var(--ease);
}
.visual-link:hover .visual-frame { border-color: var(--border-strong); }
.visual-arrow { display: inline-block; color: var(--accent); font-size: 0.8em; transition: transform 0.3s var(--ease); }
.visual-link:hover .visual-arrow { transform: translate(3px, -3px); }
.visual-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s var(--ease);
}
.visual:hover .visual-frame img { transform: scale(1.03); }
.visual-tag {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; color: var(--accent); margin: 0 0 0.5rem;
}
.visual-title { font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -0.02em; }
.visual-caption { color: var(--text-muted); font-size: 0.95rem; margin: 0.5rem 0 0; max-width: 60ch; }

/* --------------------------------------------------------- logo strip */
.also-for .carousel-track { padding-top: 0; }
.logo-slide { flex-basis: clamp(170px, 22vw, 210px); }
.logo-tile {
  width: 100%; display: grid; place-items: center; gap: 0.6rem;
  min-height: 108px; padding: 1.25rem 1rem;
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.3s var(--ease);
}
.logo-tile:hover { border-color: var(--border-strong); transform: translateY(-4px); background: var(--surface-high); }
.logo-tile img { max-height: 44px; width: auto; object-fit: contain; filter: grayscale(1) brightness(1.6); opacity: 0.75; transition: filter 0.3s var(--ease), opacity 0.3s var(--ease); }
.logo-tile:hover img { filter: none; opacity: 1; }

/* placeholder tile until a real logo file is dropped in */
.logo-tile[data-placeholder] { border-style: dashed; }
.logo-placeholder-icon { color: var(--text-faint); opacity: 0.55; }
.logo-placeholder-icon svg { width: 26px; height: 26px; }
.logo-name {
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  color: var(--text-muted); text-align: center; line-height: 1.3;
}
.logo-tile:hover .logo-name { color: var(--text-primary); }

/* ------------------------------------------------------------ contact */
.contact-section { padding-bottom: clamp(3rem, 7vw, 5rem); }
.contact-head { margin-bottom: 0; }
.contact-section .page-lead { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.contact-actions { border-top: 1px solid var(--border-subtle); }
.contact-actions li { border-bottom: 1px solid var(--border-subtle); }
.contact-actions a {
  display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto;
  align-items: center; gap: clamp(1rem, 3vw, 2rem);
  padding-block: clamp(1.25rem, 2.6vw, 1.85rem);
  transition: padding-left 0.35s var(--ease), color 0.3s var(--ease);
}
@media (hover: hover) { .contact-actions a:hover { padding-left: 0.85rem; } }
.contact-action-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--text-faint); }
.contact-action-value {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.9rem); letter-spacing: -0.025em;
  color: var(--text-primary); word-break: break-word;
  transition: color 0.3s var(--ease);
}
.contact-actions a:hover .contact-action-value { color: var(--accent); }
.contact-action-arrow { font-size: 1.25rem; color: var(--text-faint); transition: transform 0.35s var(--ease), color 0.3s var(--ease); }
.contact-actions a:hover .contact-action-arrow { color: var(--accent); transform: translate(4px, -4px); }

/* --------------------------------------------------------- about */
.about-split { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
.about-aside { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 6rem; }
.portrait-card {
  aspect-ratio: 1; max-height: 380px; overflow: hidden;
  border-radius: var(--r-lg); display: grid; place-items: center;
  background: radial-gradient(circle at 35% 25%, rgba(var(--accent-rgb), 0.7), var(--ink-800) 62%);
  border: 1px solid var(--border-subtle);
}
.portrait-card .portrait-photo { width: 100%; height: 100%; object-fit: cover; }
.portrait-card .portrait-initials { font-size: clamp(3rem, 8vw, 5.5rem); }
.fact-list { display: flex; flex-direction: column; gap: 0.9rem; }
.fact-list li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border-subtle); }
.fact-list span { color: var(--text-faint); font-size: 0.85rem; }
.fact-list strong { color: var(--text-primary); font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; }


/* ============================================ pinboard collage (about)
   A raised, warmer dark panel — a corkboard rather than a sheet of paper.
   The sticky note and the photo frame are the only light objects on it,
   which is what makes them read as physical. */

.paper {
  position: relative; isolation: isolate;
  background: linear-gradient(170deg, var(--board-top), var(--board));
  color: var(--board-ink);
  border: 1px solid var(--board-line);
  border-radius: clamp(var(--r-lg), 3vw, 34px);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem) clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
/* soft board texture + a warm light from the top-left */
.paper::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(var(--accent-rgb), 0.10), transparent 46%),
    radial-gradient(circle at 82% 78%, rgba(233, 206, 92, 0.05), transparent 44%),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px);
  background-size: auto, auto, 7px 7px, 11px 11px;
}
.paper-grid-doodle {
  position: absolute; top: clamp(1rem, 3vw, 2.5rem); right: clamp(-1.5rem, -1vw, 0rem);
  width: clamp(64px, 8vw, 96px); color: var(--board-ink); opacity: 0.22;
  transform: rotate(8deg); pointer-events: none;
}
.paper-grid-doodle svg { width: 100%; height: auto; }

.paper-head { max-width: 46ch; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.paper-title {
  font-family: var(--font-display); font-weight: 700; color: var(--board-ink);
  font-size: clamp(1.85rem, 4.6vw, 3.25rem); letter-spacing: -0.03em; line-height: 1.05;
}
.paper-sub { color: var(--board-muted); margin-top: 0.9rem; font-size: 1.02rem; }
.sparkle { color: var(--accent); font-size: 1.1em; }

/* handwriting */
.hand { font-family: var(--font-hand); color: var(--board-ink); line-height: 1.3; margin: 0; }
.hand em { font-style: normal; font-weight: 700; color: var(--accent); }
.hand-lg { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 700; }
.hand-md { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 600; }
.hand-sm { font-size: clamp(1rem, 1.7vw, 1.2rem); font-weight: 500; color: var(--board-muted); white-space: pre-line; }

/* the collage — three deliberate columns, staggered so it reads as a
   pinboard rather than a form */
.collage {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.collage-col { display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2.5rem); }
.collage-col-mid { padding-top: clamp(0.5rem, 3vw, 2.5rem); }
.collage-col:last-child { padding-top: clamp(1rem, 5vw, 4rem); }
.note { position: relative; }

.note-intro { padding-top: 2.75rem; }
.doodle-arrow {
  position: absolute; top: -0.5rem; left: -0.25rem; width: clamp(70px, 7vw, 100px);
  color: var(--board-muted); opacity: 0.8; pointer-events: none;
}
.note-intro .hand-sm { margin-top: 0.5rem; }

.note-aside { color: var(--board-muted); font-size: 0.95rem; line-height: 1.6; margin: 0; max-width: 34ch; }

.polaroid {
  margin: 0; padding: 0.75rem 0.75rem 2.25rem; align-self: flex-start;
  width: min(100%, 300px);
  background: var(--frame); border-radius: 3px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
  transform: rotate(-2.5deg);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.polaroid:hover { transform: rotate(0deg) scale(1.02); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); }
.polaroid-img {
  position: relative;
  aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(165deg, #2A2732, #191820);
}
.polaroid-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.polaroid-placeholder { font-family: var(--font-display); font-weight: 700; font-size: 3rem; color: rgba(250, 250, 250, 0.4); letter-spacing: -0.04em; }
.polaroid figcaption { text-align: right; margin-top: 0.75rem; color: rgba(36, 31, 12, 0.62) !important; }

.tape {
  position: absolute; width: 92px; height: 26px;
  background: var(--tape);
  border-left: 1px dashed rgba(255, 255, 255, 0.12); border-right: 1px dashed rgba(255, 255, 255, 0.12);
  top: -12px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.tape-top { transform: translateX(-50%) rotate(2deg); }

.note-flow .hand { color: var(--board-ink); }

.sticky {
  position: relative; background: var(--sticky); color: var(--sticky-ink);
  padding: 1.85rem 1.5rem 1.5rem;
  transform: rotate(1.5deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.5s var(--ease);
}
.sticky:hover { transform: rotate(0deg); }
.sticky .hand { color: var(--sticky-ink); }
.sticky-title { margin-bottom: 0.75rem; }
.sticky ul { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.sticky li { position: relative; padding-left: 1rem; font-size: 0.92rem; line-height: 1.45; }
.sticky li::before { content: '•'; position: absolute; left: 0; }
.sticky-kicker { font-weight: 600; font-size: 0.95rem; margin: 0 0 0.75rem; }
.sticky-flow { color: rgba(36, 31, 12, 0.68) !important; }

.overlap-words {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; color: var(--board-ink);
  font-size: clamp(1.35rem, 2.8vw, 2rem); letter-spacing: -0.03em; margin: 0.5rem 0 0;
}
.overlap-words span { color: var(--accent); font-weight: 400; }

.badge-note {
  display: flex; align-items: flex-start; gap: 0.65rem; align-self: flex-start;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--board-line);
  border-radius: var(--r-sm); padding: 0.9rem 1rem; transform: rotate(-1deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}
.badge-star { color: var(--sticky); font-size: 1.1rem; line-height: 1.2; }
.badge-note strong { display: block; font-family: var(--font-display); font-size: 0.9rem; line-height: 1.25; color: var(--board-ink); }
.badge-note em { display: block; font-style: normal; color: var(--board-muted); font-size: 0.8rem; margin-top: 0.2rem; }

.tools-intro { margin-bottom: 0.85rem; }
.tool-list { display: flex; flex-direction: column; gap: 0.7rem; }
.tool-list li { display: flex; flex-direction: column; padding-bottom: 0.7rem; border-bottom: 1px solid var(--board-line); }
.tool-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.tool-name { display: inline-flex; align-items: center; gap: 0.5rem; }
.tool-logo { width: 20px; height: 20px; object-fit: contain; flex: none; }
.tool-list strong { font-family: var(--font-display); font-size: 1rem; color: var(--board-ink); }
.tool-list span { font-family: var(--font-hand); font-size: 1.05rem; color: var(--board-muted); }

.about-longform { margin-top: clamp(3rem, 7vw, 5rem); }

/* two columns only where they are still wide enough to read */
@media (max-width: 1024px) {
  .collage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .collage-col:last-child {
    grid-column: 1 / -1; padding-top: 0;
    flex-direction: row; flex-wrap: wrap;
  }
  .collage-col:last-child > * { flex: 1 1 260px; }
}
@media (max-width: 820px) {
  .collage { grid-template-columns: 1fr; }
  .collage-col, .collage-col-mid, .collage-col:last-child { padding-top: 0; flex-direction: column; }
  .collage-col:last-child > * { flex: initial; }
  .polaroid { width: min(100%, 280px); }
  .note-intro { padding-top: 2.75rem; }
}
@media (max-width: 560px) {
  .polaroid { align-self: center; }
  .doodle-arrow { display: none; }
  .note-intro { padding-top: 0; }
}

/* --------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--border-subtle); padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; margin-top: clamp(2rem, 5vw, 4rem); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-end; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--text-primary); margin: 0; letter-spacing: -0.02em; }
.footer-role { color: var(--text-muted); font-size: 0.92rem; margin: 0.25rem 0 0.85rem; }
.footer-hand { font-family: var(--font-hand); font-size: 1.15rem; color: var(--text-faint); margin: 0; }
.footer-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: clamp(1rem, 2.5vw, 1.75rem); }
.footer-links a { color: var(--text-muted); font-size: 0.92rem; transition: color 0.25s var(--ease); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text-faint); font-size: 0.82rem; margin: 0; }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-end { align-items: flex-start; }
}

/* ========================================================== motion */

/* Word-level splitting for headings. */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.word-inner { display: inline-block; will-change: transform; }

.js .reveal-split .word-inner,
.js .hero-title .word-inner {
  transform: translateY(115%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal-split.is-in .word-inner { transform: none; }

/* Hero types itself in as soon as the page is ready. */
.js .hero-title .word-inner { transition-duration: 1s; }
.js.is-ready .hero-title .word-inner { transform: none; }

.js .hero [data-enter] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js .hero [data-enter="3"] { --d: 620; }
.js .hero [data-enter="4"] { --d: 740; }
.js .hero [data-enter="5"] { --d: 900; }
.js.is-ready .hero [data-enter] { opacity: 1; transform: none; }

/* Generic scroll reveal. */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Cards get a touch more travel and a slight scale. */
.js .card.reveal { transform: translateY(42px) scale(0.985); }
.js .card.reveal.is-in { transform: none; }

/* Card tilt + spotlight. */
.project-card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  transform-style: preserve-3d;
  will-change: transform;
}
@media (hover: hover) {
  .project-card:hover {
    transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-8px);
    transition: transform 0.18s linear, border-color 0.35s var(--ease), box-shadow 0.45s var(--ease);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  }
}
.project-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  border-radius: inherit; opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.07), transparent 60%);
  transition: opacity 0.4s var(--ease);
}
.project-card:hover::after { opacity: 1; }
.project-card { position: relative; }

/* Cover art drifts with scroll and lifts on hover. */
.cover svg { transform: translateY(var(--drift, 0px)) scale(1.06); }
.project-card:hover .cover svg { transform: translateY(var(--drift, 0px)) scale(1.13); }

/* Magnetic pull on primary actions. */
.btn-accent, .nav-mark { --mag-x: 0px; --mag-y: 0px; }
@media (hover: hover) {
  .btn-accent { transform: translate3d(var(--mag-x), var(--mag-y), 0); }
  .btn-accent:hover { transform: translate3d(var(--mag-x), calc(var(--mag-y) - 2px), 0); }
  .nav-mark { transform: translate3d(calc(var(--mag-x) * 0.5), calc(var(--mag-y) * 0.5), 0); }
}

/* Scroll progress. */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), #ff7a5c);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* Hero ambient glow (parallaxed). */
/* The ambient wash is strictly a background layer: it sits behind the
   headline and stops short of the figure, so the character never has red
   bleeding through it and always reads as the front-most thing. */
.hero-glow {
  position: absolute; top: -10%; left: -8%;
  width: min(900px, 95vw); aspect-ratio: 1.2;
  z-index: -1; pointer-events: none;
  transform: translate3d(0, var(--py, 0px), 0);
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.26), rgba(var(--accent-rgb), 0.07) 44%, transparent 68%);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Scroll hint. */
.scroll-hint {
  position: absolute; left: var(--gutter); bottom: clamp(1rem, 3vw, 2.5rem);
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600;
}
.scroll-hint:hover { color: var(--accent); }
.scroll-hint-line { display: block; width: 44px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.scroll-hint-line::after {
  content: ''; position: absolute; inset: 0; background: var(--accent);
  transform: translateX(-100%); animation: sweep 2.4s var(--ease) infinite;
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* Active nav item. */
.nav-link.is-active { color: var(--text-primary); background: rgba(199, 196, 206, 0.1); }

/* Mobile menu entrance. */
.mobile-menu { opacity: 0; transform: translateY(-8px); transition: opacity 0.28s var(--ease), transform 0.28s var(--ease); }
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu li { opacity: 0; transform: translateY(10px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); transition-delay: calc(var(--i) * 45ms + 60ms); }
.mobile-menu.is-open li { opacity: 1; transform: none; }

/* Underlines that draw in. */
.link-arrow { position: relative; }
.link-arrow::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.4s var(--ease);
}
.card:hover .link-arrow::after { transform: scaleX(1); }

/* Rows that shift on hover. */
.service-row, .exp-item, .approach-step { transition: background-color 0.35s var(--ease), padding-left 0.35s var(--ease); }
@media (hover: hover) {
  .service-row:hover, .approach-step:hover { padding-left: 0.75rem; }
}

/* Everything above is opt-in; motion preferences win. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .card.reveal, .js .hero [data-enter] { opacity: 1 !important; transform: none !important; }
  .js .reveal-split .word-inner, .js .hero-title .word-inner { transform: none !important; }
  .marquee-track, .hero-glow, .scroll-hint-line::after, .dot-live { animation: none !important; }
  .cover svg { transform: none !important; }
  .portrait-video { display: none !important; }
  .video-ready .hero-photo, .polaroid-img.video-ready img { opacity: 1 !important; }
}

/* ------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .split, .about-split { grid-template-columns: 1fr; }
  .about-aside { position: static; }
  .portrait-card { aspect-ratio: 2.6 / 1; max-height: 260px; }
  .contact-actions a { grid-template-columns: 1fr auto; }
  .contact-action-label { grid-column: 1 / -1; }
  .service-row { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .service-items { grid-column: 2; }
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-copy { padding-bottom: 0; }
  .hero-figure { --figure-h: 46svh; justify-self: center; margin-top: 2rem; }
  .hero:has(.hero-figure.has-photo) { padding-top: clamp(6rem, 11vw, 8.5rem); padding-bottom: 0; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav { max-width: 100%; }
  .br-md { display: none; }
    .approach-step { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .next-project { grid-template-columns: 1fr; }
  .next-arrow { grid-column: 1; grid-row: 3; margin-top: 1rem; }
}
