/* ---------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------- */
:root {
  --bg:            #ffffff;
  --bg-alt:        #f5f5f7;   /* section band */
  --ink:           #1d1d1f;   /* primary text */
  --ink-soft:      #6e6e73;   /* secondary text */
  --hairline:      #d2d2d7;
  --accent:        #0066cc;   /* links only */

  --radius:        20px;
  --shell:         1120px;    /* content width */
  --gutter:        24px;

  /* Geist Sans carries the page; Geist Mono handles technical data */
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --placeholder:   #86868b;   /* label inside empty media frames */

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Dark appearance follows the operating system setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #000000;
    --bg-alt:      #0e0e10;
    --ink:         #f5f5f7;
    --ink-soft:    #a1a1a6;
    --hairline:    #2a2a2c;
    --accent:      #2997ff;
    --placeholder: #5f5f63;
  }
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Anchor targets clear the sticky header instead of hiding under it */
section[id] { scroll-margin-top: 64px; }

/* Skip link — first stop for keyboard users */
.skip {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -200%);
  z-index: 100;
  padding: 10px 18px;
  border-radius: 980px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  transition: transform .2s var(--ease);
}
.skip:focus { transform: translate(-50%, 0); text-decoration: none; }

/* Screen-reader only helper */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------
   Type scale
   --------------------------------------------------------------- */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.018em; }

.display {
  font-size: clamp(40px, 7.2vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  font-weight: 600;
}

.title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.024em;
}

/* Section headings sit below project titles in the hierarchy */
.title--section {
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.lede {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.42;
  color: var(--ink-soft);
  letter-spacing: -0.012em;
  max-width: 46ch;
  margin: 0;
}

.note { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* ---------------------------------------------------------------
   Header — thin translucent bar, Apple style
   --------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 48px;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  .nav { background: rgba(0,0,0,.72); border-bottom-color: rgba(255,255,255,.12); }
}

.nav-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark:hover { text-decoration: none; }

.nav-links { display: flex; gap: 28px; }

/* Padding brings the tap target to 44px without changing the visual rhythm */
.nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  color: var(--ink-soft);
  transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 600px) {
  .nav-links { gap: 18px; }
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero {
  padding: clamp(72px, 12vh, 132px) 0 clamp(40px, 6vh, 64px);
  text-align: center;
}

.hero .display { max-width: 15ch; margin: 0 auto; }

.hero .lede {
  margin: 22px auto 0;
  max-width: 40ch;
}

/* Full-bleed opening frame */
.hero-media {
  margin-top: clamp(40px, 6vw, 72px);
  padding: 0 var(--gutter);
}

.hero-media .frame {
  max-width: 1440px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

@media (max-width: 600px) {
  .hero-media .frame { aspect-ratio: 4 / 3; }
}

/* ---------------------------------------------------------------
   Media frame — shared by every image and video
   --------------------------------------------------------------- */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  aspect-ratio: 3 / 2;
}

/* Placeholder that shows through until real media is dropped in */
.frame::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 0 16px;
  text-align: center;
  color: var(--placeholder);
  background: linear-gradient(160deg, #f5f5f7 0%, #ebebee 100%);
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  .frame::after { background: linear-gradient(160deg, #1c1c1e 0%, #121214 100%); }
}

.frame > img,
.frame > video { position: relative; z-index: 1; }

/* Slow zoom on hover — one frame at a time, desktop pointers only */
@media (hover: hover) and (pointer: fine) {
  .frame > img { transition: transform 1.2s var(--ease); }
  .frame:hover > img { transform: scale(1.02); }
}

/* Play / pause control for looping video */
.media-toggle {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 980px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.media-toggle:hover { background: rgba(0,0,0,.72); }
.media-toggle svg { width: 10px; height: 10px; fill: currentColor; }
.media-toggle .icon-pause { display: none; }
.media-toggle[aria-pressed="true"] .icon-pause { display: block; }
.media-toggle[aria-pressed="true"] .icon-play { display: none; }

.caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------
   Work — one project per block, heading first, media underneath
   --------------------------------------------------------------- */
.work { padding: clamp(48px, 8vw, 96px) 0 0; }

.project { padding: clamp(56px, 9vw, 112px) 0; }

.project + .project { border-top: 1px solid var(--hairline); }

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 40px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.project-head .text { max-width: 34ch; }

.project-head .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right;
  white-space: nowrap;
}

.project-head p { margin: 12px 0 0; color: var(--ink-soft); font-size: 17px; }

/* Secondary shots under the main frame */
.stills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.stills .frame { aspect-ratio: 4 / 3; }

@media (max-width: 700px) {
  .stills { grid-template-columns: 1fr; }
  .project-head .meta { text-align: left; }
}

/* ---------------------------------------------------------------
   Capabilities band
   --------------------------------------------------------------- */
.band {
  background: var(--bg-alt);
  padding: clamp(64px, 10vw, 120px) 0;
  margin-top: clamp(48px, 8vw, 96px);
}

.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 48px;
}

.cols h3 { font-size: 19px; margin-bottom: 8px; }
.cols p { margin: 0; color: var(--ink-soft); font-size: 16px; }

@media (max-width: 760px) {
  .cols { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------------------------------------------------------------
   Contact + footer
   --------------------------------------------------------------- */
.contact {
  padding: clamp(80px, 12vw, 140px) 0;
  text-align: center;
}

.contact .mail {
  display: inline-block;
  margin-top: 24px;
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.contact .mail:hover { color: var(--accent); text-decoration: none; }

.contact .note { margin-top: 20px; font-family: var(--font-mono); font-size: 13px; }

.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer a { color: var(--ink-soft); }

/* ---------------------------------------------------------------
   Scroll reveal
   --------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
