:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface-2: #1e1e24;
  --line: #2a2a31;
  --text: #f2f1ee;
  --muted: #9a9aa3;
  --accent: #f6d55c;
  --accent-text: #f6d55c;
  --accent-ink: #141109;
  --radius: 14px;
  --max: 1160px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 600; letter-spacing: -0.02em; }
.logo span { color: var(--accent-text); }
.nav ul { display: flex; gap: 28px; list-style: none; font-size: 14px; }
.nav ul a { color: var(--muted); transition: color .2s; }
.nav ul a:hover, .nav ul a.active { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line);
  transition: transform .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--muted); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 120px 0 90px; }
.eyebrow {
  font-size: 13px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 8vw, 104px);
  line-height: .98; letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero h1 em { color: var(--accent-text); }
.hero p.lede { color: var(--muted); font-size: 18px; max-width: 52ch; margin: 28px 0 36px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); margin-top: 80px;
}
.stat { padding: 28px 0 0; }
.stat strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Sections ---------- */
section.block { padding: 90px 0; border-top: 1px solid var(--line); }
.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  margin-bottom: 40px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5vw, 56px); line-height: 1; letter-spacing: -0.01em;
}
.section-head p { color: var(--muted); max-width: 42ch; }
.tag { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Video cards ---------- */
.grid-short { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-long { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

.video-card { display: flex; flex-direction: column; gap: 14px; }
.frame {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
}
.grid-short .frame { aspect-ratio: 9 / 16; }
.grid-long .frame { aspect-ratio: 16 / 9; }
.frame iframe, .frame video, .frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0;
}
.frame .placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 20% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
}
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: color-mix(in srgb, var(--text) 92%, transparent);
  display: grid; place-items: center;
  transition: transform .25s, background .25s;
}
.play svg { width: 20px; height: 20px; margin-left: 3px; fill: var(--bg); }
.frame:hover .play { transform: translate(-50%, -50%) scale(1.08); background: var(--accent); }
.badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 11px; font-weight: 500; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
}
.frame.playing { cursor: default; }
.frame.playing .play, .frame.playing .badge, .frame.playing .placeholder { display: none; }

.meta h3 { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.grid-long .meta h3 { font-size: 20px; }
.meta .sub { color: var(--muted); font-size: 14px; }
.meta .client {
  font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent-text); margin-bottom: 6px;
}
.meta h3 { line-height: 1.35; text-wrap: balance; }
.meta h3 .series {
  display: inline-flex; align-items: center; gap: 5px;
  vertical-align: 2px; white-space: nowrap; margin-left: 2px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 6px; padding: 4px 8px 4px 7px;
  transition: background .2s, border-color .2s;
}
.meta h3 .series::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.video-card:hover .meta h3 .series {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}
.meta .desc { color: var(--muted); font-size: 15px; margin-top: 6px; }
.meta .result { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent-text); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--bg); padding: 32px; }
.service .num { color: var(--accent-text); font-size: 13px; }
.service h3 { font-size: 20px; font-weight: 500; margin: 10px 0 8px; }
.service p { color: var(--muted); font-size: 15px; }

section[id] { scroll-margin-top: 64px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(260px, 400px) 1fr; gap: 72px; align-items: center; }
.about-photo { position: relative; margin: 0 14px 14px 0; }
.about-photo::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border: 1px solid var(--accent); border-radius: var(--radius);
}
.about-photo img {
  position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); display: block;
}
.about-text .eyebrow { margin-bottom: 16px; }
.about-text h2 {
  font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -0.01em;
  font-size: clamp(36px, 4.6vw, 54px); margin-bottom: 24px; max-width: 16ch;
}
.about-text h2 em { color: var(--accent-text); }
.about-text p { color: var(--muted); font-size: 17px; max-width: 60ch; margin-bottom: 16px; }
.about-text p:first-of-type { color: var(--text); }
.about-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.about-meta span {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
}
.about-meta .open i {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 4px color-mix(in srgb, #4ade80 20%, transparent);
}
.about-meta .founder { padding: 5px 14px 5px 5px; }
.about-meta .founder img { height: 26px; width: auto; border-radius: 999px; padding: 0 8px; background: #ffcc00; }

/* ---------- Not found ---------- */
.not-found { min-height: calc(100vh - 64px - 78px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found .code {
  font-family: var(--serif); font-size: clamp(120px, 22vw, 240px); line-height: .9; color: var(--accent-text);
}
.not-found h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 48px); margin: 12px 0 14px; }
.not-found p { color: var(--muted); max-width: 44ch; margin: 0 auto 32px; }
.not-found .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: 120px 0; border-top: 1px solid var(--line); }
.contact h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 88px); line-height: 1; margin-bottom: 20px;
}
.contact p { color: var(--muted); margin-bottom: 32px; }
.contact .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer .socials { display: flex; gap: 20px; }
footer a:hover { color: var(--text); }

/* ---------- Resume page ---------- */
.resume-hero { padding: 100px 0 60px; }
.resume-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7vw, 88px); line-height: 1; }
.resume-hero .resume-headline { color: var(--text); font-size: 18px; margin: 18px 0 0; }
.resume-hero .resume-summary { color: var(--muted); max-width: 62ch; margin: 14px 0 32px; font-size: 17px; }
.resume-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-line { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; font-size: 14px; color: var(--muted); }
.contact-line a { border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.contact-line a:hover { color: var(--text); border-color: var(--accent); }
.hl { color: var(--text); font-weight: 600; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 28%, transparent) 62%); }
.job .org .role { color: var(--text); opacity: .85; }
.resume-main .extra { padding-left: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.resume-main .extra li::marker { color: var(--accent-text); }
.resume-main h2:first-child + .job { border-top: 0; padding-top: 0; }

.resume-layout { display: grid; grid-template-columns: 260px 1fr; gap: 64px; padding: 60px 0 100px; border-top: 1px solid var(--line); }
.resume-layout aside { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 36px; }
.aside-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.aside-group ul { list-style: none; font-size: 14px; display: grid; gap: 6px; }
.aside-group li span { color: var(--muted); display: block; font-size: 13px; }

.resume-main h2 { font-family: var(--serif); font-weight: 400; font-size: 40px; margin-bottom: 28px; }
.resume-main h2:not(:first-child) { margin-top: 72px; }
.resume-main h2 + .job { border-top: 0; padding-top: 0; }

.job { display: grid; grid-template-columns: 160px 1fr; gap: 28px; padding: 28px 0; border-top: 1px solid var(--line); }
.job .when { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.job h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.job .org { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.job ul { padding-left: 18px; color: #cfcfd4; display: grid; gap: 6px; font-size: 15px; }
.job ul li::marker { color: var(--accent-text); }

/* ---------- Light mode ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f2; --surface: #ecebe6; --surface-2: #e2e1da; --line: #dcdad3;
    --text: #121214; --muted: #6b6b72; --accent: #f2c94c; --accent-text: #8a6500; --accent-ink: #141109;
  }
  .job ul { color: #3a3a40; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-short { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-photo { max-width: 340px; }
  .resume-layout { grid-template-columns: 1fr; gap: 48px; }
  .resume-layout aside { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav ul { gap: 18px; }
  .hero { padding: 72px 0 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
  .grid-long { grid-template-columns: 1fr; }
  .grid-short { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  section.block { padding: 64px 0; }
  .job { grid-template-columns: 1fr; gap: 6px; }
}
