:root {
  --bg: #0d0d0d;
  --bg-2: #171717;
  --line: #2a2a2a;
  --text: #f2f0eb;
  --muted: #9a978f;
  --accent: #ffd23f;
  --radius: 10px;
  --max: 1320px;
  --display: "Archivo", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(13 13 13 / .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 17px var(--display); font-stretch: 112%; letter-spacing: .02em; text-transform: uppercase; }
.brand img { width: 28px; height: auto; }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-2); }
@media (max-width: 620px) {
  .brand span { display: none; }
  .nav a { padding: 8px 8px; font-size: 14px; }
}

/* Type */
h1, h2, h3 { font-family: var(--display); font-stretch: 112%; line-height: 1; letter-spacing: -.01em; margin: 0 0 .5em; text-transform: uppercase; }
h1 { font-size: clamp(48px, 10vw, 148px); font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(18px, 2vw, 22px); color: var(--muted); max-width: 46ch; }
.lede strong { color: var(--text); font-weight: 600; }
.eyebrow { font: 600 13px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.muted { color: var(--muted); }
section { padding: clamp(48px, 8vw, 96px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.link-arrow { color: var(--muted); text-decoration: none; font-weight: 500; }
.link-arrow:hover { color: var(--accent); }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 88px); padding-bottom: 32px; }
.hero h1 { margin-bottom: .25em; }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 6px;
  font: 600 15px var(--body); text-decoration: none; border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
}
.btn:hover { border-color: var(--muted); }
.btn-accent { background: var(--accent); color: #111; border-color: var(--accent); }
.btn-accent:hover { background: #ffdc66; border-color: #ffdc66; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Media */
.media { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media > img { width: 100%; height: 100%; object-fit: cover; }
.yt-play {
  position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: transparent;
  display: grid; place-items: center;
}
.yt-play::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgb(0 0 0 / .45)); }
.yt-play span {
  position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; transition: transform .2s ease;
}
.yt-play span::after { content: ""; border-left: 24px solid #111; border-top: 15px solid transparent; border-bottom: 15px solid transparent; margin-left: 6px; }
.yt-play:hover span { transform: scale(1.08); }
.media-video { aspect-ratio: auto; }
.media-video video { width: 100%; height: auto; }
.media-vertical { max-width: 420px; margin-inline: auto; aspect-ratio: auto; }
.media-stack { display: grid; gap: 20px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 20px; }
.media-grid figure, .media-stack figure { margin: 0; }
.media-grid figcaption { margin-top: 10px; font-weight: 600; font-size: 15px; }

/* Project grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px 20px; }
.card { text-decoration: none; display: block; }
.card .thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); position: relative; }
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img, .card:hover .thumb video { transform: scale(1.04); }
.card h3 { margin: 14px 0 2px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card:hover h3 { color: var(--accent); }

/* Project page */
.project-head { padding-bottom: 28px; }
.project-head h1 { font-size: clamp(40px, 7vw, 96px); }
.back { display: inline-block; margin-bottom: 24px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--accent); }
.project-text { max-width: 64ch; font-size: 18px; color: #d6d3cc; margin-top: 32px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; margin-top: clamp(48px, 7vw, 80px); }
.pager a { text-decoration: none; padding: 18px; border-radius: var(--radius); background: var(--bg-2); }
.pager a:hover { outline: 1px solid var(--muted); }
.pager small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.pager strong { font-family: var(--display); font-stretch: 112%; text-transform: uppercase; }
.pager .next { text-align: right; grid-column: 2; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 6vw, 80px); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.about p { font-size: 18px; color: #d6d3cc; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 28px; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
