/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:           #040404;
  --text:         #888;
  --text-bright:  #ddd;
  --text-dim:     #7a7a7a;
  --border:       #141414;
  --accent:       #b4ff00;
  --font-title:   'Zeppelin 52', 'Orbitron', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --font-sans:    'DM Sans', system-ui, sans-serif;
  --pad:          2.5rem;
  --content-w:    680px;
  --wide-w:       1100px;
}

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* subtle grid texture */
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 40px 40px;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; }

/* ── Header ── */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem var(--pad) 1.5rem;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 40px 40px;
}
.site-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-bright);
  text-decoration: none;
  transition: color 0.2s;
}
.site-title:hover { color: var(--accent); }

header nav {
  display: flex;
  gap: 2.5rem;
  margin-top: 0.6rem;
}
header nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
header nav a:hover,
header nav a.active { color: var(--accent); }

/* ── Footer ── */
footer {
  padding: 1.5rem var(--pad);
  margin-top: 6rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Shared type ── */
figure { margin: 0; }
figcaption {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.6rem;
}

/* ═══════════════════════════════════════
   PROJECT PAGE  (body.project)
════════════════════════════════════════ */
body.project main {
  padding: 5rem var(--pad) 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

body.project main > h1 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
  line-height: 1.1;
  max-width: var(--content-w);
  margin: 0 auto 2rem;
}
body.project main > h2 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  max-width: var(--content-w);
  margin: 3.5rem auto 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
body.project main > h3 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  max-width: var(--content-w);
  margin: 2rem auto 0.5rem;
}
body.project main > p {
  max-width: var(--content-w);
  margin: 0 auto 1.2rem;
  color: var(--text);
}

/* Standalone figure: full content width */
body.project main > figure {
  margin: 3rem 0;
}
body.project main > figure img { width: 100%; height: auto; }

/* Wide containers */
body.project main > .row-2,
body.project main > .row-3,
body.project main > .pswp-gallery,
body.project main > .scroller {
  max-width: var(--wide-w);
  margin: 3rem auto;
}

/* Full-bleed */
body.project main > .full {
  width: calc(100% + var(--pad) * 2);
  margin-left: calc(-1 * var(--pad));
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
}
body.project main > .full img {
  width: 100%;
  height: 72vh;
  object-fit: cover;
}

/* ── Row layouts ── */
.row-2, .row-3 { display: flex; gap: 2px; align-items: flex-start; }
.row-2 > *, .row-3 > * { flex: 1; min-width: 0; }
.row-2 img, .row-3 img { width: 100%; height: auto; }

/* ── Gallery grid ── */
.pswp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
}
.pswp-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ── Scroller ── */
.scroller {
  display: flex;
  overflow-x: auto;
  gap: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { flex-shrink: 0; scroll-snap-align: start; }
.scroller img { width: 460px; height: 300px; object-fit: cover; }

/* ── Video ── */
.video { margin: 3rem 0; background: #000; }
.video video { width: 100%; height: auto; display: block; max-height: 80vh; }
.video iframe { display: block; width: 100%; aspect-ratio: 16/9; border: none; }

/* ═══════════════════════════════════════
   HOME  (body.home)
════════════════════════════════════════ */
body.home main {
  padding: 0 var(--pad) 4rem;
}

/* Tag filter strip */
.tag-filters {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.8rem 0 1.8rem;
}
.filter-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color 0.15s;
}
.filter-btn:hover,
.filter-btn.active { color: var(--accent); }

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 560px));
  gap: 2.5rem;
  justify-content: center;
}
.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  order: 0;
}
.project-card__img { overflow: hidden; }
.project-card__img img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: var(--cover-pos, center);
  filter: brightness(0.65) saturate(0.9);
  transition: filter 0.4s ease, transform 0.5s ease;
}
.project-card:hover .project-card__img img {
  filter: brightness(0.95) saturate(1);
  transform: scale(1.02);
}
.project-card__info {
  padding: 0.25rem 0 2rem;
}
.project-card__year {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.project-card__info h2 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}
.project-card:hover .project-card__info h2 { color: var(--accent); }
.project-card__tags {
  display: flex;
  gap: 0.6rem;
}
.project-card__tags span {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════
   ABOUT  (body.about)
════════════════════════════════════════ */
body.about main {
  padding: 5rem var(--pad) 4rem;
  max-width: calc(var(--content-w) + var(--pad) * 2);
}
body.about main h1 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
  line-height: 1.1;
  margin-bottom: 3rem;
}
body.about main h2 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 3rem 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
body.about main p {
  color: var(--text);
  margin-bottom: 1.2rem;
  line-height: 1.85;
}
body.about main a { text-underline-offset: 3px; }
body.about main a:hover { color: var(--accent); }
body.about main strong {
  font-weight: 400;
  color: var(--text-bright);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root { --pad: 1.5rem; }
  .project-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  :root { --pad: 1.1rem; }
  .project-grid { grid-template-columns: 1fr; }
  .row-2, .row-3 { flex-direction: column; }
  .scroller img { width: 85vw; height: auto; aspect-ratio: 3/2; }
  .site-title { font-size: 0.72rem; letter-spacing: 0.14em; }
  body.project main > .full { width: calc(100% + var(--pad) * 2); }
}
