:root {
  --bg: #121316;
  --surface: #1B1D22;
  --surface-2: #24272E;
  --sunken: #0C0D10;
  --border: #2A2D35;
  --border-strong: #3A3E48;
  --text: #F2F3F5;
  --text-2: #C9CCD3;
  --muted: #A3A8B3;
  --body: #B4B8C2;
  --faint: #8B909C;
  --accent: #C6F432;
  --accent-hover: #E2FF8A;
  --on-accent: #121316;
  --danger: #FF8A7A;
  --radius: 16px;
  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.brand:hover { color: var(--text); }
.brand svg { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 15px; font-weight: 500; }
.nav a { padding: 12px 14px; color: var(--text-2); text-decoration: none; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }

main { flex: 1; }

/* Hero */
.hero { padding: 48px 0 56px; max-width: 760px; display: flex; flex-direction: column; gap: 18px; }
.status { margin: 0; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
.hero h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { margin: 0; font-size: 18px; line-height: 1.65; color: var(--body); }

/* Featured */
.featured { display: flex; flex-wrap: wrap; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; margin-bottom: 64px; }
.featured .shot { flex: 999 1 520px; min-width: 0; min-height: 300px; background: var(--sunken); display: flex; align-items: center; justify-content: center; }
.featured .shot img { width: 100%; height: 100%; object-fit: cover; max-height: 460px; }
.featured .body { flex: 1 1 340px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); text-transform: uppercase; }
.featured h2 { font-size: 30px; font-weight: 700; }
.featured p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-2); }
.chips span { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }

/* Buttons */
.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 12px 18px; min-height: 44px; border-radius: 12px; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: #5A2E2A; }
.btn-danger:hover { background: #2A1715; color: var(--danger); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.mt-auto { margin-top: auto; align-self: flex-start; }

/* Project grid */
.section-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { font: inherit; font-size: 14px; padding: 10px 14px; min-height: 44px; border-radius: 10px; border: none; background: var(--surface-2); color: var(--text); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding-bottom: 96px; }
.card { text-decoration: none; color: var(--text); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 16 / 9; background: var(--sunken); display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 13px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .info { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.card .cat { font-size: 13px; color: var(--muted); }
.card .title { font-family: var(--font-head); font-size: 20px; font-weight: 600; }
.card .sum { font-size: 15px; line-height: 1.55; color: var(--body); }
.card .dl { font-size: 13px; color: var(--accent); font-weight: 600; }

.empty { padding: 48px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* Project page */
.back { display: inline-flex; gap: 6px; padding: 12px 0; color: var(--text-2); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--text); }
.project-head { padding: 24px 0 32px; display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.project-head h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.02em; }
.project-head .summary { margin: 0; font-size: 19px; line-height: 1.6; color: var(--body); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 40px; }
.gallery button { padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--sunken); cursor: zoom-in; aspect-ratio: 16 / 10; }
.gallery button:first-child { grid-column: 1 / -1; aspect-ratio: auto; max-height: 560px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery button:first-child img { object-fit: contain; max-height: 560px; }
.project-body { display: flex; flex-wrap: wrap; gap: 40px; padding-bottom: 96px; }
.prose { flex: 999 1 520px; min-width: 0; font-size: 17px; line-height: 1.75; color: var(--text-2); }
.prose p { margin: 0 0 1.1em; }
.prose ul { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose h3 { font-size: 20px; color: var(--text); margin: 1.6em 0 0.5em; }
.side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.side h2 { font-size: 18px; }
.file { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.file:hover { border-color: var(--accent); color: var(--text); }
.file .name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.file .meta { font-size: 13px; color: var(--muted); }
.file svg { color: var(--accent); flex: none; }

dialog.lightbox { padding: 0; border: none; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(5, 6, 8, 0.88); }
dialog.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: 10px; }
dialog.lightbox .close { position: fixed; top: 16px; right: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px; text-align: center; font-size: 13px; color: var(--faint); }

/* About */
.about { max-width: 720px; padding: 24px 0 96px; font-size: 17px; line-height: 1.75; color: var(--text-2); }

@media (max-width: 600px) {
  .featured .body { padding: 24px; }
  .hero { padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}
