:root {
  --bg: #10100e;
  --bg-raised: #181714;
  --paper: #f3eee6;
  --muted: #b7aea3;
  --faint: #8f867c;
  --line: rgba(243, 238, 230, 0.16);
  --accent: #e24b2a;
  --bracket: rgba(243, 238, 230, 0.55);
  --header: 76px;
  --page: 1180px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

.theme-hive { --accent: #8fc35a; }
.theme-night { --accent: #a68cff; }
.theme-complex { --accent: #cfa863; }
.theme-core { --accent: #4cc9f0; }
.theme-shakedown { --accent: #eca13f; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(70% 50% at 85% 0%, rgba(243, 238, 230, 0.05), transparent 60%),
    var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
}

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

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection {
  background: var(--accent);
  color: #10100e;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  background: var(--paper);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 30;
}

.skip:focus { top: 12px; }

/* Shared small labels use the code font */
.kicker,
.nav a,
.section-note,
.work-kicker,
.meta-label,
.more,
.back,
.site-footer,
.status,
.page-nav a,
.tools li,
dt {
  font-family: var(--mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
  padding: 0 32px;
  background: rgba(16, 16, 14, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  text-decoration: none;
  font-size: 12px;
  color: var(--muted);
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--paper); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--paper);
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

.wrap {
  width: min(var(--page), calc(100% - 64px));
  margin: 0 auto;
}

/* Home opening */
.hero {
  min-height: calc(100vh - var(--header));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px 0 56px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6fd08c;
  box-shadow: 0 0 0 0 rgba(111, 208, 140, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 208, 140, 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(111, 208, 140, 0); }
}

.kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.hero-name {
  font-size: clamp(88px, 17vw, 236px);
  line-height: 0.8;
}

.hero-name em {
  font-style: italic;
  color: var(--accent);
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.role {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
}

.lede {
  max-width: 36rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin: 0;
}

.hero-stats dt {
  color: var(--faint);
  font-size: 11px;
}

.hero-stats dd {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  white-space: nowrap;
}

/* Sections */
.section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 20px;
}

.section-heading h2,
.about-grid h2,
.project-copy h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.section-heading h2,
.about-grid h2 {
  margin: 0;
  font-size: clamp(44px, 6.5vw, 76px);
  line-height: 0.95;
}

.section-note {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

/* Work rows */
.work-link {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.work-link:nth-child(even) .poster { order: 2; }

.work-list .work-link:last-child { border-bottom: 1px solid var(--line); }

.work-num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: clamp(72px, 9vw, 120px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  opacity: 0.85;
}

.work-link:hover .work-title { color: var(--accent); }

.work-link:hover .poster {
  transform: translateY(-4px);
  --bracket: var(--accent);
}

.work-link:hover .more { color: var(--accent); }

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1b1916;
  transition: transform 220ms ease;
}

/* Thin bracket corners framing every poster */
.poster::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  background:
    linear-gradient(var(--bracket), var(--bracket)) left top / 24px 2px,
    linear-gradient(var(--bracket), var(--bracket)) left top / 2px 24px,
    linear-gradient(var(--bracket), var(--bracket)) right top / 24px 2px,
    linear-gradient(var(--bracket), var(--bracket)) right top / 2px 24px,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / 24px 2px,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / 2px 24px,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / 24px 2px,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / 2px 24px;
  background-repeat: no-repeat;
}

.poster-tall { aspect-ratio: 3 / 4; }

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.work-link:hover .poster img { transform: scale(1.03); }

.poster-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.poster.is-playing .poster-video { opacity: 1; }

.poster-index {
  position: absolute;
  left: 20px;
  bottom: 8px;
  font-family: var(--serif);
  font-size: 92px;
  line-height: 1;
  color: rgba(243, 238, 230, 0.28);
}

.poster-e {
  background:
    radial-gradient(80% 70% at 85% 80%, rgba(92, 150, 120, 0.42), transparent 55%),
    linear-gradient(160deg, #1d2a24, #0f1210 72%);
}

.work-kicker,
.meta-label {
  display: block;
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 11px;
}

.work-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
  transition: color 160ms ease;
}

.work-copy p,
.about-copy p,
.fact p {
  margin: 14px 0 0;
  color: var(--muted);
}

.more {
  display: inline-block;
  margin-top: 22px;
  color: var(--paper);
  font-size: 12px;
  transition: color 160ms ease;
}

.more::after { content: "  →"; }

.about-grid,
.contact-grid,
.project-hero,
.link-grid {
  display: grid;
  gap: 32px;
}

.about-grid { grid-template-columns: 0.8fr 1.2fr; }

.about-copy p {
  font-size: 21px;
  line-height: 1.5;
}

.about-copy p:first-child { margin-top: 0; color: var(--paper); }

.contact-grid { grid-template-columns: repeat(3, 1fr); }

.contact-card {
  display: block;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.contact-card:hover strong { color: var(--accent); }

.contact-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  transition: color 160ms ease;
}

.contact-card span {
  color: var(--muted);
  font-size: 15px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 36px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
}

/* Project pages */
.back {
  display: inline-block;
  margin: 32px 0 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}

.back::before { content: "←  "; }

.back:hover { color: var(--accent); }

.project-hero {
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 56px;
}

.project-copy { order: -1; }

.project-hero .poster { aspect-ratio: auto; }

.project-hero .poster img { height: auto; }

.project-copy h1 {
  margin: 0;
  font-size: clamp(64px, 11vw, 150px);
  line-height: 0.85;
}

.team {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
}

.team .meta-label { font-style: normal; }

.project-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 56px;
  align-items: start;
  padding-bottom: 40px;
}

.quick-facts {
  position: sticky;
  top: calc(var(--header) + 32px);
}

.quick-facts dl { margin: 0; }

.quick-facts dl div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.quick-facts dt {
  color: var(--faint);
  font-size: 11px;
}

.quick-facts dd {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.35;
}

.page-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--accent);
}

.page-nav a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.page-nav a:hover { color: var(--accent); }

.facts { border-top: 1px solid var(--line); }

.fact {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header) + 16px);
}

.fact h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.fact a { text-decoration-color: var(--accent); text-underline-offset: 3px; }

.fact a:hover { color: var(--accent); }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 12px;
}

.tools li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  background: var(--accent);
  vertical-align: 1px;
}

.process-frame {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(243, 238, 230, 0.03), transparent 40%),
    var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--faint);
  text-align: center;
}

.process-frame img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.process-gallery {
  display: grid;
  gap: 28px;
}

.shot { margin: 0; }

.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  transition: border-color 160ms ease;
}

.shot a:hover img { border-color: var(--accent); }

.shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.shot-side {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  gap: 28px;
  align-items: start;
}

.shot-side figcaption { margin-top: 0; }

.shot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.link-grid { grid-template-columns: 1fr 1fr; }

.action { padding: 8px 0 12px; }

.action a { color: var(--paper); }

.is-waiting {
  margin: 0;
  color: var(--faint);
}

.fact p:first-child { margin-top: 0; }

.role-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.role-list li::marker { color: var(--accent); }

.role-list li + li { margin-top: 6px; }

.qr {
  width: 148px;
  height: 148px;
  margin-top: 18px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--accent);
}

.qr-plate {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--bg-raised);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .project-body { grid-template-columns: 1fr; gap: 32px; }

  .quick-facts { position: static; }

  .quick-facts dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
  }

  .page-nav { display: none; }
}

@media (max-width: 860px) {
  .wrap { width: min(var(--page), calc(100% - 36px)); }

  .site-header { padding: 0 18px; }

  .nav-toggle { display: grid; place-items: center; }

  .nav {
    display: none;
    position: fixed;
    z-index: 15;
    inset: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
    padding: calc(var(--header) + 36px) 32px 32px;
    background: var(--bg);
  }

  .nav.is-open {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: auto;
  }

  .nav a {
    font-family: var(--serif);
    font-size: 42px;
    letter-spacing: -0.03em;
    text-transform: none;
    color: var(--paper);
  }

  .hero-foot { grid-template-columns: 1fr; gap: 28px; }

  .hero-stats { gap: 28px; flex-wrap: wrap; }

  .hero-stats dd { font-size: 28px; }

  .work-link { gap: 24px; padding: 40px 0; }

  .work-link:nth-child(even) .poster { order: 0; }

  .work-link,
  .about-grid,
  .contact-grid,
  .fact,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .fact { gap: 14px; }

  .shot-side { grid-template-columns: 1fr; gap: 12px; }

  .shot-pair { grid-template-columns: 1fr; gap: 28px; }

  .section { padding: 64px 0; }

  .section-heading { align-items: flex-start; flex-direction: column; }

  .site-footer { padding: 24px 18px 32px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poster,
  .poster img { transition: none; }
  .status-dot { animation: none; }
}
