:root {
  --bg: #0f0f0e;
  --bg2: #171715;
  --line: #2a2a27;
  --text: #ecebe6;
  --muted: #9c9b94;
  --mint: #b8dcc4;
  --mint-d: #8fbf9f;
  --radius: 14px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(20px, 5vw, 64px); background: rgba(15,15,14,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.nav nav { display: flex; align-items: center; gap: 24px; }
.nav nav a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav nav a:not(.btn):hover { color: var(--text); }

/* buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--mint); color: #10140f; text-decoration: none; font-weight: 600; font-size: 15px; transition: background .2s, transform .2s; }
.btn:hover { background: #cdeadb; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--mint); }
.btn.small { padding: 8px 16px; font-size: 14px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.cta.center { justify-content: center; }

/* hero */
section { padding: 0 clamp(20px, 5vw, 64px); max-width: 1280px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; min-height: min(calc(100vh - 62px), 820px); padding-top: 48px; padding-bottom: 72px; }
.eyebrow { color: var(--mint); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; }
h1 { font: 400 clamp(42px, 5.6vw, 76px)/1.04 var(--serif); margin: 0; letter-spacing: -.01em; }
h1 em { color: var(--mint); }
.lede { color: var(--muted); font-size: 18px; max-width: 520px; margin: 22px 0 0; }
.hero-reel { position: relative; height: min(78vh, 680px); }
.hero-reel video { position: absolute; width: 46%; aspect-ratio: 9/16; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0,0,0,.5); background: var(--bg2); }
.hero-reel .r1 { left: 0; top: 12%; transform: rotate(-5deg); }
.hero-reel .r2 { left: 27%; top: 0; z-index: 2; }
.hero-reel .r3 { right: 0; top: 14%; transform: rotate(5deg); }

/* facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 0; padding-bottom: 0; }
.facts div { padding: 28px 0; display: flex; flex-direction: column; }
.facts div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.facts strong { font: 400 34px/1.1 var(--serif); color: var(--mint); }
.facts span { color: var(--muted); font-size: 15px; }

/* work */
.work { padding-top: 96px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
h2 { font: 400 clamp(36px, 4vw, 52px)/1.1 var(--serif); margin: 0; }
.section-head p { color: var(--muted); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; align-items: start; }
.grid.horizontal, .grid.mixed { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.mixed .frame[style*="9/16"], .grid.mixed .frame[style*="1/1"] { aspect-ratio: 16/9 !important; }
.grid.mixed .frame[style*="9/16"] img, .grid.mixed .frame[style*="9/16"] video, .grid.mixed .frame[style*="1/1"] img, .grid.mixed .frame[style*="1/1"] video { object-fit: contain; background: #000; }
.tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.tab { font: 500 15px var(--sans); color: var(--muted); background: none; border: 0; padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.tab.active { background: var(--mint); color: #10140f; }
.hint { color: var(--muted); margin: -16px 0 28px; font-size: 15px; }
h3.group { margin: 40px 0 16px; }
.panel-note { color: #cfcec8; max-width: 720px; margin: 0 0 24px; }
.panel h3.group:first-child { margin-top: 0; }
.card { cursor: pointer; background: none; border: 0; padding: 0; color: inherit; text-align: left; font: inherit; }
.card .frame { position: relative; aspect-ratio: 9/16; border-radius: var(--radius); overflow: hidden; background: var(--bg2); border: 1px solid var(--line); transition: border-color .25s, transform .25s; }
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card video { opacity: 0; transition: opacity .25s; }
.card.playing video { opacity: 1; }
.card:hover .frame, .card:focus-visible .frame { border-color: var(--mint); transform: translateY(-3px); }
.card .dur { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.65); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.card .play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(184,220,196,.92); opacity: 0; transition: opacity .25s; }
.card .play::after { content: ""; position: absolute; left: 21px; top: 16px; border-left: 17px solid #10140f; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.card:hover .play { opacity: 1; }
.card h4 { margin: 12px 2px 2px; font-size: 16px; font-weight: 600; }
.card h4 + p { margin: 0 2px; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* editing + ai */
.editing, .ai { padding-top: 120px; }
.split-head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: end; margin-bottom: 36px; }
.split-head p { color: #cfcec8; font-size: 17px; margin: 0; }
.cards, .ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ai-grid { grid-template-columns: repeat(2, 1fr); }
.cards article, .ai-grid article { padding: 24px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); }
.cards h4, .ai-grid h4 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.cards p, .ai-grid p { margin: 0; color: var(--muted); font-size: 15px; }
.ai-grid article { border-left: 3px solid var(--mint); }
.process { margin-top: 56px; }
.process ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process li { border-top: 1px solid var(--line); padding-top: 16px; }
.process li span { font: 500 13px "JetBrains Mono", monospace; color: var(--mint); }
.process li strong { display: block; font-size: 17px; margin: 6px 0; }
.process li p { margin: 0; color: var(--muted); font-size: 15px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.stack span { font: 13px "JetBrains Mono", monospace; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: #cfcec8; }
.aside { color: var(--muted); font: 13px "JetBrains Mono", monospace; margin-top: 18px; }
.aside::before { content: "// "; color: var(--mint); }
.portrait { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--mint); margin-bottom: 20px; }

/* about */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; padding-top: 120px; }
.about-text p { color: #cfcec8; font-size: 17px; max-width: 620px; }
h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); margin: 36px 0 14px; font-weight: 600; }
.services { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.services li { padding: 16px 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.services strong { color: var(--text); }
.timeline { padding-top: 8px; }
.timeline h3:first-child { margin-top: 0; }
.timeline ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 22px; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }
.timeline .when { font-size: 13px; color: var(--muted); }
.timeline li span:last-child { color: var(--muted); font-size: 15px; }
.tools { color: var(--muted); }

/* contact */
.contact { text-align: center; padding-top: 140px; padding-bottom: 120px; }
.contact p { color: var(--muted); font-size: 18px; }
footer { display: flex; justify-content: space-between; padding: 24px clamp(20px, 5vw, 64px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* player */
dialog { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: rgba(5,5,5,.88); backdrop-filter: blur(6px); }
#playerVideo { height: min(86vh, 1280px); aspect-ratio: 9/16; max-width: 94vw; border-radius: var(--radius); background: #000; }
#playerVideo[data-ar="16/9"], #playerVideo[data-ar="1/1"] { height: auto; width: min(92vw, 1280px); max-height: 82vh; aspect-ratio: 16/9; }
#playerCaption { text-align: center; color: var(--text); margin: 12px 0 0; }
.close { position: absolute; top: -6px; right: -52px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 24px; cursor: pointer; line-height: 1; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-reel { height: 460px; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .split-head, .cards, .ai-grid, .process ol { grid-template-columns: 1fr; gap: 14px; }
  .grid.horizontal, .grid.mixed { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { padding-left: 0; }
  .facts div + div { border-left: 0; border-top: 1px solid var(--line); }
  .facts div:nth-child(2) { border-top: 0; padding-left: 16px; } .facts div:nth-child(4) { padding-left: 16px; }
  .nav nav a:not(.btn) { display: none; }
  .grid.vertical { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .close { right: 6px; top: 6px; z-index: 2; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
