:root {
  --bg: #111110;
  --fg: #E8E6E1;
  --muted: #8F8D88;
  --line: #2A2A28;
  --panel: #1B1B1A;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:hover { opacity: 0.7; }
h1, h2, h3, p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Header */
.site-header {
  padding-top: 28px; padding-bottom: 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 40px;
  font-size: 15px;
}
.wordmark { text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; }
.site-header nav a { text-decoration: none; color: var(--muted); padding: 12px 0; }
.site-header nav a.btn-outline { color: var(--fg); padding: 10px 18px; border: 1px solid var(--line); }

/* Hero */
.hero { padding: 120px 0 88px; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { max-width: 900px; font-weight: 300; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.12; letter-spacing: -0.02em; }
.lede { max-width: 520px; font-size: 17px; line-height: 1.6; color: var(--muted); }

/* Reel */
.reel { display: flex; flex-direction: column; gap: 14px; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--panel); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.video.media-wide { aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.82; transition: opacity 0.3s ease; }
.video:hover .poster { opacity: 1; }
.play {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(232, 230, 225, 0.5); background: rgba(17, 17, 16, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--fg); cursor: pointer;
}
.play:hover { border-color: var(--fg); }
.caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.reel-stage { cursor: pointer; }
.reel-stage.is-watching { cursor: auto; }
.reel-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.reel-layer.is-active { opacity: 1; }
.reel-layer .poster { opacity: 1; }
.reel-layer iframe {
  position: absolute; top: 50%; left: 50%; width: 100%; height: 100%;
  transform: translate(-50%, -50%) scale(1.2); border: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.8s ease;
}
.reel-layer iframe.is-on { opacity: 1; }
.reel-tabs { display: flex; gap: 4px; }
.reel-tabs button {
  position: relative; font: inherit; font-size: 14px; color: var(--muted); background: transparent;
  border: 0; padding: 10px 12px; cursor: pointer; min-height: 44px;
}
.reel-tabs button:hover, .reel-tabs button.is-current { color: var(--fg); }
.reel-tabs .bar {
  position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px;
  background: var(--line); overflow: hidden;
}
.reel-tabs .bar::after {
  content: ""; position: absolute; inset: 0; background: var(--fg);
  transform: scaleX(0); transform-origin: left;
}
.reel-tabs button.is-current .bar::after { transform: scaleX(1); }
.reel-tabs button.is-current.is-running .bar::after { animation: reel-progress var(--hold, 9s) linear forwards; }
@keyframes reel-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Personal work: ambient vertical loops */
.art {
  margin-top: 168px; padding: 72px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: center; justify-content: space-between;
}
.art-text { flex: 1 1 240px; display: flex; flex-direction: column; gap: 10px; }
.art-text h2 { font-weight: 400; font-size: 15px; }
.art-text p { font-size: 15px; color: var(--muted); max-width: 300px; }
.art-reels { flex: 2 1 420px; display: flex; gap: 24px; justify-content: flex-end; }
.art-reels figure { margin: 0; flex: 0 1 280px; display: flex; flex-direction: column; gap: 10px; }
.art-reels figcaption { font-size: 14px; color: var(--muted); }
.art-reels figcaption a { text-decoration: none; }
.ambient { position: relative; aspect-ratio: 9 / 16; background: var(--panel); overflow: hidden; }
.ambient iframe {
  position: absolute; top: 50%; left: 50%; width: 100%; height: 100%;
  transform: translate(-50%, -50%) scale(1.12); border: 0; pointer-events: none;
}
.ambient .poster { opacity: 1; }

/* Sections */
.section { padding-top: 168px; display: flex; flex-direction: column; gap: 48px; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px;
  border-bottom: 1px solid var(--line); padding-bottom: 20px;
}
.section-head h2 { font-weight: 400; font-size: 15px; }
.section-head span { font-size: 14px; color: var(--muted); }

.media {
  aspect-ratio: 16 / 10; background: var(--panel);
  display: flex; align-items: flex-end; padding: 14px;
  font-size: 13px; color: var(--muted); overflow: hidden;
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media:has(img), .media:has(video) { padding: 0; }
.media-wide { aspect-ratio: 2 / 1; padding: 16px; }
.media-portrait { aspect-ratio: 4 / 5; }

.meta { font-size: 14px; color: var(--muted); }

/* Work */
.feature { display: flex; flex-direction: column; gap: 20px; }
.feature + .feature { margin-top: 64px; }
.feature-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 48px; }
.feature-text h3 { font-weight: 500; font-size: 20px; margin-bottom: 6px; }
.feature-body { max-width: 480px; display: flex; flex-direction: column; gap: 10px; }
.feature-body p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.feature-body .text-link { padding: 6px 0; }
.sub-head { margin-top: 96px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.sub-head h3 { font-weight: 400; font-size: 15px; color: var(--muted); }

.grid-2 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 72px 32px; padding-top: 32px;
}
.card { display: flex; flex-direction: column; gap: 6px; }
.card .media { margin-bottom: 10px; }
.card h3 { font-weight: 500; font-size: 17px; }
.card p:not(.meta) { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 500px; }

/* Services */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 48px 32px; }
.service { display: flex; flex-direction: column; gap: 12px; }
.service .num { font-size: 14px; color: var(--muted); }
.service h3 { font-weight: 500; font-size: 17px; }
.service p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Studio */
.studio { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; }
.studio .media-portrait { flex: 0 1 300px; }
.studio-text { flex: 1 1 460px; display: flex; flex-direction: column; gap: 18px; }
.studio-text .big { font-weight: 300; font-size: clamp(20px, 2vw, 25px); line-height: 1.5; max-width: 620px; }
.studio-text .muted { font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 620px; }
.credits { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.credits ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.credits li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.credits li span:last-child { color: var(--muted); }
.text-link { font-size: 15px; padding: 12px 0; align-self: flex-start; }

/* Footer */
.site-footer { padding-top: 200px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 96px; }
.contact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px 64px; }
.contact h2 { font-weight: 300; font-size: clamp(32px, 4vw, 52px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 20px; }
.email { font-weight: 300; font-size: clamp(20px, 2vw, 26px); text-underline-offset: 6px; text-decoration-thickness: 1px; }
.where { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--muted); }
.footer-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.footer-bar > span { padding: 12px 0; }
.footer-bar div { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-bar a { text-decoration: none; padding: 12px 0; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

/* Portfolio additions */
.kicker { font-size: 15px; color: var(--muted); }
.hero h1 { max-width: 980px; }
.toolkit { font-size: 15px; line-height: 1.7; color: var(--muted); max-width: 620px; }
