:root {
  --accent: #7c3aed;
  --bg: oklch(0.99 0.002 90);
  --text: oklch(0.16 0.004 290);
  --muted: oklch(0.16 0.004 290 / 0.55);
  --border: oklch(0.16 0.004 290 / 0.12);
  --card-bg: oklch(1 0 0);
  --on-accent: #fff;
  --page-pad: 48px;
  --content-width: 720px;
  --font-heading: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); min-height: 100vh; font-family: var(--font-body); display: flex; flex-direction: column; }
body > main { flex: 1; }
a { color: inherit; text-decoration: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 20; }

/* ---------- header / nav ---------- */
.site-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px var(--page-pad); border-bottom: 1.5px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
  transition: transform 0.25s ease;
}
.site-nav.is-hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 16px; height: 16px; background: var(--accent); transform: rotate(45deg); flex-shrink: 0; }
.logo-img { height: 28px; width: auto; display: block; }
.brand-name { font-family: var(--font-heading); font-weight: 800; font-size: 20px; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav-links a { font-weight: 600; font-size: 14px; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; }

/* ---------- badges, tags ---------- */
.tag-badge-accent {
  display: inline-block; font-family: var(--font-heading); font-weight: 700; font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-accent); background: var(--accent);
  padding: 5px 12px; margin-bottom: 18px;
}
.tag-badge-small {
  display: inline-block; font-family: var(--font-heading); font-weight: 700; font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  border: 1.5px solid var(--accent); padding: 3px 9px; margin-bottom: 10px;
}
.draft-badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: #ffd43b; color: #000; padding: 3px 8px; margin-left: 8px; vertical-align: middle; }
.tag-row { display: flex; gap: 10px; padding: 28px var(--page-pad) 8px; flex-wrap: wrap; }
.tag-chip { font-size: 13px; font-weight: 600; padding: 8px 16px; border: 1.5px solid var(--border); white-space: nowrap; }
.tag-chip[aria-current="page"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

/* ---------- hero ---------- */
.hero { display: flex; gap: 48px; padding: 64px var(--page-pad); border-bottom: 1.5px solid var(--border); align-items: center; }
.hero-content { flex: 1 1 46%; min-width: 0; }
.hero-image-wrap { flex: 1 1 54%; min-width: 0; width: 100%; }
.hero-title { font-family: var(--font-heading); font-weight: 800; font-size: 42px; line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.01em; }
.hero-excerpt { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 520px; margin: 0; }
.hero-meta { font-size: 13px; opacity: 0.6; margin-top: 18px; }
.hero-button { display: inline-block; margin-top: 28px; font-family: var(--font-heading); font-weight: 700; font-size: 14px; background: var(--text); color: var(--bg); padding: 13px 26px; }
.cover-media { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; display: block; border: 1px solid var(--border); background: var(--card-bg); }

/* ---------- the site's intro (home page) ---------- */
.intro { padding: 72px var(--page-pad) 56px; border-bottom: 1.5px solid var(--border); }
.intro-title { font-family: var(--font-heading); font-weight: 800; font-size: 48px; line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.01em; }
.intro-tagline { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 640px; margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 40px var(--page-pad) 0; }
.section-title { font-family: var(--font-heading); font-weight: 800; font-size: 24px; margin: 0; }
.section-link { font-weight: 600; font-size: 14px; color: var(--muted); }

/* ---------- home: the project, the studio, the team ---------- */
.home-section { padding: 56px var(--page-pad); border-bottom: 1.5px solid var(--border); }
.home-section > .section-title { margin-bottom: 24px; }
.home-section .prose { margin-top: 0; max-width: var(--content-width); }
.project { display: flex; gap: 48px; align-items: flex-start; }
.project-media { flex: 1 1 54%; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.project-body { flex: 1 1 46%; min-width: 0; max-width: var(--content-width); }
.project-title { font-family: var(--font-heading); font-weight: 800; font-size: 40px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.01em; }
.project-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.project-badges > * { margin: 0; }
.project-pitch { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0 0 24px; }
.project-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.project-links .hero-button { margin-top: 0; }
.studio-locations { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 24px; padding: 0; list-style: none; font-family: var(--font-heading); font-weight: 600; font-size: 14px; color: var(--muted); }
.studio-locations li::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); margin-right: 10px; vertical-align: middle; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.team-card { background: var(--card-bg); border: 1.5px solid var(--border); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.team-portrait { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; margin-bottom: 14px; border: 1px solid var(--border); }
.team-initials { display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-family: var(--font-heading); font-weight: 800; font-size: 48px; letter-spacing: 0.04em; }
.team-name { font-family: var(--font-heading); font-weight: 700; font-size: 19px; margin: 0; }
.team-role { font-family: var(--font-heading); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.team-location { font-size: 13px; color: var(--muted); }
.team-bio { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 10px 0 0; }
.team-link { font-weight: 600; font-size: 13px; margin-top: 10px; color: var(--accent); width: fit-content; }
.home-devlog .post-grid { padding-bottom: 56px; }
.contact { border-bottom: 0; border-top: 1.5px solid var(--border); }
.home-section + .contact { border-top: 0; }
.contact p { margin: 0; }
.contact-email { font-family: var(--font-heading); font-weight: 700; font-size: 22px; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }

/* ---------- grid / cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; padding: 20px var(--page-pad) 64px; }
.post-card { background: var(--card-bg); border: 1.5px solid var(--border); display: block; }
.post-card:hover { border-color: var(--accent); }
.post-card-body { padding: 18px 20px 22px; }
.post-card-title { font-family: var(--font-heading); font-weight: 700; font-size: 19px; line-height: 1.3; margin: 0 0 10px; }
.post-card-excerpt { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0; }
.post-card-date { font-size: 12px; opacity: 0.55; margin-top: 12px; }
.empty { padding: 64px var(--page-pad); color: var(--muted); }

/* ---------- a post, a page ---------- */
.post-main { max-width: var(--content-width); margin: 0 auto; padding: 56px 24px 80px; width: 100%; }
.back-link { font-weight: 600; font-size: 14px; color: var(--muted); display: block; width: fit-content; margin-bottom: 24px; }
.post-title { font-family: var(--font-heading); font-weight: 800; font-size: 36px; line-height: 1.15; margin: 0 0 4px; }
.post-meta { font-size: 14px; opacity: 0.6; margin: 14px 0 32px; }
.prose { margin-top: 36px; display: flex; flex-direction: column; gap: 20px; font-size: 16px; line-height: 1.75; }
.prose > * { margin: 0; }
.prose h2, .prose h3 { font-family: var(--font-heading); font-weight: 700; margin-top: 12px; }
.prose h2 { font-size: 22px; } .prose h3 { font-size: 18px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; display: block; }
.prose code { font-size: 0.9em; background: var(--border); padding: 1px 5px; }
.prose pre { overflow-x: auto; background: var(--card-bg); border: 1.5px solid var(--border); padding: 14px 16px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 1.45; border-left: 4px solid var(--accent); padding-left: 20px; margin: 12px 0; }
.prose table { border-collapse: collapse; width: 100%; } .prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.embed { position: relative; aspect-ratio: 16 / 9; } .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; position: relative; }
.gallery img { flex: 0 0 100%; min-width: 0; height: auto; scroll-snap-align: center; object-fit: cover; aspect-ratio: 16 / 9; }
.gallery-nav { display: flex; gap: 8px; justify-content: flex-end; }
.gallery-nav button { font: inherit; font-weight: 700; border: 1.5px solid var(--border); background: var(--card-bg); color: var(--text); padding: 6px 12px; cursor: pointer; }
.post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 56px; padding-top: 28px; border-top: 1.5px solid var(--border); }
.post-footer-brand { font-family: var(--font-heading); font-weight: 700; }

/* ---------- lightbox (site.js) ---------- */
.lightbox { position: fixed; inset: 0; background: rgb(0 0 0 / 0.85); display: flex; align-items: center; justify-content: center; z-index: 30; cursor: zoom-out; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; }
.js .prose img, .js .project-media img { cursor: zoom-in; }

/* ---------- footer ---------- */
.site-footer { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 40px var(--page-pad); border-top: 1.5px solid var(--border); text-align: center; }
.footer-brand { font-family: var(--font-heading); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; }
.footer-copy { font-size: 13px; opacity: 0.55; }
.footer-links { font-size: 12px; opacity: 0.55; display: flex; gap: 12px; }

/* ---------- mobile < 720px ---------- */
@media (max-width: 719px) {
  :root { --page-pad: 20px; }
  .site-nav { padding: 18px var(--page-pad); flex-wrap: wrap; }
  .js .site-nav > nav { flex-basis: 100%; }
  .js .nav-toggle { margin-left: auto; display: block; font: inherit; font-weight: 700; font-size: 14px; background: none; border: 1.5px solid var(--border); color: var(--text); padding: 6px 12px; cursor: pointer; }
  .js .nav-links { display: none; width: 100%; flex-direction: column; gap: 14px; padding-top: 8px; }
  .js .site-nav.is-open .nav-links { display: flex; }
  .hero { flex-direction: column; gap: 28px; padding: 36px var(--page-pad); }
  .hero-title { font-size: 30px; }
  .intro { padding: 44px var(--page-pad) 36px; }
  .intro-title { font-size: 34px; }
  .home-section { padding: 36px var(--page-pad); }
  .project { flex-direction: column; gap: 28px; }
  .project-media, .project-body { flex: none; width: 100%; }
  .project-title { font-size: 30px; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .tag-row { flex-wrap: nowrap; overflow-x: auto; }
  .post-grid { grid-template-columns: 1fr; gap: 20px; }
  .post-main { padding: 32px 18px 80px; }
  .post-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) { .site-nav { transition: none; } }
