:root {
  --bg: #0c0c0c;
  --panel: #141414;
  --paper: #e9e2d5;
  --muted: #8b8477;
  --line: #262626;
  --accent: #ff4d00;
  --grain-opacity: 0.07;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--paper);
  overflow-x: hidden;
  line-height: 1.5;
}

/* film grain overlay */
body::after {
  content: "";
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; color: inherit; background: none; border: none; }

::selection { background: var(--accent); color: #0c0c0c; }

/* ---------- film strip marquee ---------- */
.film-strip {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.55rem 0;
}
.film-track { display: inline-flex; gap: 3rem; animation: marquee 40s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- nav ---------- */
.mast { position: sticky; top: 0; z-index: 40; background: rgba(12,12,12,0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }

.nav {
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 1.1rem 1.4rem;
}
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-word { font-family: "Anton", sans-serif; font-size: 1.5rem; letter-spacing: 0.04em; }
.logo-star { color: var(--accent); }
.logo-sub { font-family: "Space Mono", monospace; font-size: 0.6rem; letter-spacing: 0.3em; color: var(--muted); text-transform: uppercase; margin-top: 0.2rem; }

.nav-links { display: flex; align-items: center; gap: 1.6rem; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links a:not(.nav-cta) { color: var(--muted); transition: color 0.2s; }
.nav-links a:not(.nav-cta):hover { color: var(--paper); }
.nav-cta { border: 1px solid var(--accent); color: var(--accent); padding: 0.45rem 1rem; transition: background 0.2s, color 0.2s; }
.nav-cta:hover { background: var(--accent); color: #0c0c0c; }

/* ---------- hero ---------- */
.hero { max-width: 1120px; margin: 0 auto; padding: 4rem 1.4rem 3rem; position: relative; }

.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem;
  font-family: "Space Mono", monospace; font-size: 0.62rem;
  letter-spacing: 0.12em; color: var(--muted);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 0.6rem 0; margin-bottom: 3.2rem;
}

.hero-title {
  font-family: "Anton", sans-serif;
  font-size: clamp(3.6rem, 15vw, 11rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  user-select: none;
}
.hero-title .line { display: block; }
.line-outline { color: transparent; -webkit-text-stroke: 2px var(--paper); }
@media (max-width: 640px) { .line-outline { -webkit-text-stroke: 1.2px var(--paper); } }

.hero-sub {
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
  max-width: 520px;
}

.hero-frames { display: flex; gap: 1.6rem; margin-top: 3.4rem; flex-wrap: wrap; }
.frame {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.5rem 0.5rem 0.9rem;
  width: 220px;
  box-shadow: 8px 8px 0 rgba(255, 77, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.frame:hover { transform: translateY(-4px); box-shadow: 10px 10px 0 rgba(255, 77, 0, 0.25); }
.frame img { width: 100%; height: 260px; object-fit: cover; display: block; filter: saturate(0.85) contrast(1.05); }
.frame figcaption {
  font-family: "Space Mono", monospace; font-size: 0.62rem;
  letter-spacing: 0.14em; color: var(--muted);
  margin-top: 0.55rem; text-transform: uppercase;
}
.frame-a { transform: rotate(-2deg); }
.frame-b { transform: rotate(1.5deg); margin-top: 1.4rem; }
.frame-c { transform: rotate(-1deg); }

.scroll-hint {
  display: inline-block; margin-top: 3.6rem;
  font-family: "Space Mono", monospace; font-size: 0.7rem;
  letter-spacing: 0.2em; color: var(--muted);
  border-bottom: 1px solid var(--accent); padding-bottom: 0.3rem;
  transition: color 0.2s;
}
.scroll-hint:hover { color: var(--accent); }

/* ---------- sections ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 1.4rem; }

.section-title {
  font-family: "Anton", sans-serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.section-title::before, .section-title::after { content: ""; height: 1px; width: 3.5rem; background: var(--line); }
@media (max-width: 560px) { .section-title::before, .section-title::after { width: 1.6rem; } }

/* ---------- approach ---------- */
.approach { padding: 5rem 0 3rem; border-top: 1px solid var(--line); margin-top: 3rem; }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 2.6rem; }
.col { border-top: 2px solid var(--line); padding-top: 1rem; position: relative; }
.col:hover { border-top-color: var(--accent); }
.col-num {
  font-family: "Space Mono", monospace; font-size: 0.7rem; color: var(--accent);
  letter-spacing: 0.2em; position: absolute; top: -1.6rem; right: 0;
  background: var(--bg); padding-left: 0.6rem;
}
.col h3 { font-family: "Anton", sans-serif; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.7rem; }
.col p { color: var(--muted); font-weight: 400; font-size: 0.95rem; }

/* ---------- archive ---------- */
.archive { padding: 4rem 0; }
.archive-head { text-align: center; }
.archive-sub { color: var(--muted); font-size: 0.9rem; margin-top: 0.8rem; }
.reindex-btn { color: var(--accent); font-size: 0.9rem; border-bottom: 1px dashed var(--accent); padding-bottom: 0.1rem; transition: color 0.2s; }
.reindex-btn:hover { color: var(--paper); }

.grid { margin-top: 2.6rem; column-count: 3; column-gap: 1rem; }
@media (max-width: 900px) { .grid { column-count: 2; } }
@media (max-width: 560px) { .grid { column-count: 1; } }

.photo {
  break-inside: avoid; margin-bottom: 1rem; display: block; position: relative;
  border: 1px solid var(--line); overflow: hidden;
  transition: border-color 0.25s;
}
.photo img {
  width: 100%; display: block;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.3s ease, transform 0.5s ease;
}
.photo:hover img { filter: grayscale(0) contrast(1.02); transform: scale(1.03); }
.photo:hover { border-color: var(--accent); }

.photo-idx {
  position: absolute; top: 0.55rem; left: 0.55rem;
  font-family: "Space Mono", monospace; font-size: 0.62rem;
  letter-spacing: 0.1em; color: #0c0c0c; background: var(--paper);
  padding: 0.15rem 0.4rem; text-transform: uppercase;
  opacity: 0; transition: opacity 0.25s;
}
.photo:hover .photo-idx { opacity: 1; }

.archive-loading { text-align: center; font-family: "Space Mono", monospace; color: var(--muted); font-size: 0.8rem; padding: 2.4rem 0; }

/* ---------- work ---------- */
.work { padding: 4rem 0 5rem; }
.work-inner {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 3.4rem 1.6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.work-inner::before, .work-inner::after {
  content: "⌖"; position: absolute; font-family: "Space Mono", monospace;
  color: var(--muted); font-size: 1.4rem;
}
.work-inner::before { top: 1.2rem; left: 1.4rem; }
.work-inner::after { bottom: 1.2rem; right: 1.4rem; }
.work-inner p { color: var(--muted); margin: 1.2rem auto 2rem; max-width: 460px; }

.btn {
  display: inline-block;
  font-family: "Anton", sans-serif; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--accent); color: #0c0c0c;
  padding: 0.85rem 1.8rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255, 77, 0, 0.35); }

.work-note { display: block; margin-top: 1.4rem; font-family: "Space Mono", monospace; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); text-align: center; padding: 2.4rem 1.2rem 3rem; }
.footer-big { font-family: "Anton", sans-serif; font-size: 1.05rem; letter-spacing: 0.06em; }
.footer-little { color: var(--muted); font-family: "Space Mono", monospace; font-size: 0.68rem; letter-spacing: 0.08em; margin-top: 0.6rem; }
.to-top {
  display: inline-block; margin-top: 1.4rem;
  font-family: "Space Mono", monospace; font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 0.2rem;
  transition: color 0.2s, border-color 0.2s;
}
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 8, 8, 0.95);
  display: grid; place-items: center;
  padding: 1.4rem;
  animation: fadeIn 0.2s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lb-figure { max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.lb-img {
  max-width: 92vw; max-height: 76vh; object-fit: contain;
  border: 1px solid var(--line);
  animation: popIn 0.25s ease;
}
@keyframes popIn { from { transform: scale(0.98); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lb-cap { font-family: "Space Mono", monospace; font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }

.lb-close, .lb-nav {
  position: absolute;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  width: 2.8rem; height: 2.8rem;
  font-size: 1.1rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.lb-close:hover, .lb-nav:hover { color: #0c0c0c; background: var(--accent); border-color: var(--accent); }
.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
@media (max-width: 600px) { .lb-nav { top: auto; bottom: 1.2rem; transform: none; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}