/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-elev: #131313;
  --bg-surf: #1c1c1c;
  --text: #f2efe9;
  --text-2: #a6a29b;
  --text-3: #5e5b56;
  --line: #232323;
  --line-2: #3a3a3a;
  --amber: #f0a03c;
  --amber-2: #ffb85c;
  --on-amber: #0a0a0a;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 3.4vw, 48px);
  --section: clamp(96px, 11vw, 160px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, hr { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--amber); color: var(--on-amber); }

.mono, .eyebrow, .tag, .section-head__meta, .stats dd, .xp time, .footer, .loader__track {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
}
.eyebrow { color: var(--text-3); }
.mono { color: var(--text-3); }

.display-l {
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 300;
  letter-spacing: -.025em;
  line-height: 1;
}
.rule { border: 0; border-top: 1px solid var(--line); }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; line-height: 1;
  white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.pill--ghost { border: 1px solid var(--line-2); }
.pill--ghost:hover { border-color: var(--text-2); }
.pill--solid { background: var(--text); color: var(--on-amber); padding: 10px 16px; }
.pill--amber { background: var(--amber); color: var(--on-amber); padding: 18px 28px; font-size: 15px; }
.pill--amber:hover { background: var(--amber-2); }
.pill--amber span { transition: transform .3s var(--ease); }
.pill--amber:hover span { transform: translateX(4px); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(240,160,60,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240,160,60,.45);} 70% { box-shadow: 0 0 0 8px rgba(240,160,60,0);} 100% { box-shadow: 0 0 0 0 rgba(240,160,60,0);} }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; place-content: center; gap: 20px;
  transition: transform .9s var(--ease), opacity .6s;
}
.loader.is-done { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.loader__name {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 200; letter-spacing: -.03em; line-height: 1;
  overflow: hidden;
}
.loader__word { display: inline-block; }
.loader__word span { display: inline-block; transform: translateY(110%); opacity: 0; animation: rise .8s var(--ease) forwards; }
.loader__word span.space { width: .28em; }
@keyframes rise { to { transform: translateY(0); opacity: 1; } }
.loader__track { position: relative; height: 1px; background: rgba(255,255,255,.08); }
.loader__bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--amber); transition: width .25s linear; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--gutter);
  font-size: 14px; font-weight: 500;
  transition: transform .5s var(--ease), background .5s;
}
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-scrolled { background: linear-gradient(var(--bg), rgba(10,10,10,0)); }
.nav__links { display: flex; gap: 40px; color: var(--text-2); }
.nav__links a { position: relative; transition: color .3s; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--amber); transition: right .4s var(--ease); }
.nav__links a:hover::after { right: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 48px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(10,10,10,.6) 45%, rgba(10,10,10,.15) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(10,10,10,0) 40%); }
.hero__video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero__video.is-ready { opacity: .85; }
.hero .eyebrow, .hero__title, .hero__bottom { position: relative; z-index: 1; }
.hero .eyebrow { margin-bottom: 32px; }
.hero__title {
  font-size: clamp(56px, 11vw, 160px);
  font-weight: 200; letter-spacing: -.04em; line-height: .9;
  margin-bottom: clamp(48px, 8vh, 96px);
}
.hero__title em { font-style: normal; color: var(--amber); }
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.is-ready .hero__title .line > span, .line.is-in > span { transform: translateY(0); }
.is-ready .hero__title .line:nth-child(2) > span { transition-delay: .08s; }
.is-ready .hero__title .line:nth-child(3) > span { transition-delay: .16s; }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; }
.hero__intro { max-width: 600px; font-size: clamp(17px, 1.5vw, 22px); font-weight: 300; color: var(--text-2); letter-spacing: -.005em; }
.hero__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.scroll-hint { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 11px; margin-top: 8px; }
.scroll-hint i { display: block; width: 40px; height: 1px; background: var(--text-3); transform-origin: right; animation: hint 2.2s var(--ease) infinite; }
@keyframes hint { 0% { transform: scaleX(0); transform-origin: left; } 50% { transform: scaleX(1); transform-origin: left; } 51% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }

/* ---------- Sections ---------- */
.work, .about, .experience, .contact { padding: var(--section) var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--text-3); }

/* ---------- Work grid ---------- */
/* 5-col grid: wide cards span 3, narrow span 2; rows alternate wide|narrow, narrow|wide via source order */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 64px 24px; margin-top: 48px; }
.card--wide { grid-column: span 3; }
.card:not(.card--wide) { grid-column: span 2; }

.card { display: block; }
.card__media {
  position: relative; height: clamp(260px, 36vw, 520px); overflow: hidden;
  border-radius: 6px; background: var(--bg-surf);
}
.card__media img, .card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), opacity .6s;
}
.card__media video { opacity: 0; }
.card.is-playing .card__media video { opacity: 1; }
.card:hover .card__media img, .card:hover .card__media video { transform: scale(1.03); }
.card:not([data-video]) .card__media img { animation: none; }
.tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(8px); color: var(--text);
  font-size: 11px; letter-spacing: .06em;
}
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); transition: background .3s; }
.card.is-playing .tag i { background: var(--amber); }
.card__cta {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.card:hover .card__cta { opacity: 1; transform: translateY(0); }
.card__info { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 20px; }
.card__info h3 { font-size: 28px; font-weight: 400; letter-spacing: -.015em; line-height: 1.2; }
.card__info p { font-size: 14px; color: var(--text-2); margin-top: 6px; }

/* ---------- About ---------- */
.about { display: flex; flex-direction: column; gap: 96px; }
.row { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.about__statement { max-width: 1016px; }
.about__statement em { font-style: normal; color: var(--amber); }
.about__body { display: grid; grid-template-columns: 520px 1fr; gap: 64px; align-items: start; }
.about__bio { display: flex; flex-direction: column; gap: 24px; color: var(--text-2); }
.stats div { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); }
.stats div:last-child { border-bottom: 1px solid var(--line); }
.stats dt { font-size: 40px; font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
.stats dd { margin: 0; color: var(--text-3); }
.clients { display: flex; flex-wrap: wrap; gap: 24px 48px; font-size: 28px; font-weight: 400; letter-spacing: -.015em; color: var(--text-2); }

/* ---------- Experience ---------- */
.experience { padding-top: 0; }
.xp li {
  display: grid; grid-template-columns: 280px 1fr 240px 140px; gap: 48px; align-items: start;
  padding: 28px 0; border-top: 1px solid var(--line);
  transition: padding-left .4s var(--ease);
}
.xp li:last-child { border-bottom: 1px solid var(--line); }
.xp h3 { font-size: 28px; font-weight: 400; letter-spacing: -.015em; line-height: 1.2; }
.xp p { color: var(--text-2); }
.xp span { font-size: 14px; color: var(--text-3); }
.xp time { color: var(--text-3); text-align: right; }

/* ---------- Contact ---------- */
.contact { display: flex; flex-direction: column; gap: 64px; padding-bottom: 40px; }
.contact__title { margin-bottom: 0; }
.contact__row { display: flex; align-items: center; gap: 64px; flex-wrap: wrap; }
.socials { display: flex; gap: 32px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.socials a { transition: color .3s; }
.socials a:hover { color: var(--text); }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 24px var(--gutter) 40px; margin: 0 var(--gutter);
  border-top: 1px solid var(--line); color: var(--text-3);
  font-size: 11px; letter-spacing: .06em;
  padding-left: 0; padding-right: 0;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .line > span { opacity: 1; transform: none; transition: none; }
  .dot, .scroll-hint i { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .row { grid-template-columns: 1fr; gap: 24px; }
  .about__body { grid-template-columns: 1fr; }
  .xp li { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
  .xp time { text-align: left; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding: 18px var(--gutter); }
  .nav__links { display: none; }
  .hero { padding-top: 96px; }
  .hero__title { line-height: .95; }
  .hero__bottom { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero__meta { align-items: flex-start; }
  .grid { grid-template-columns: 1fr; gap: 48px; }
  .card--wide, .card:not(.card--wide) { grid-column: auto; }
  .card__cta { display: none; }
  .card__media { height: auto; aspect-ratio: 4 / 3; }
  .card.is-playing .card__media video { opacity: 1; }
  .card__info h3 { font-size: 22px; }
  .about { gap: 64px; }
  .stats dt { font-size: 32px; }
  .clients { font-size: 20px; gap: 12px 24px; }
  .xp li { grid-template-columns: 1fr; gap: 4px; }
  .xp h3 { font-size: 22px; }
  .contact__row { gap: 32px; }
  .pill--amber { font-size: 13px; padding: 16px 20px; }
  .footer { flex-direction: column; gap: 12px; }
}
