:root {
  --bg: #0b0f0c;
  --bg-2: #121a14;
  --paper: #e8efe4;
  --mute: #9aab9c;
  --line: rgba(232, 239, 228, 0.14);
  --blaze: #ff5a1f;
  --mint: #c6e8c0;
  --serif: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
  background: var(--bg);
}

a {
  color: inherit;
}

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

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.mark {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-size: 0.85rem;
}

.top nav {
  display: flex;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top nav a {
  text-decoration: none;
  color: var(--mute);
}

.top nav a:hover {
  color: var(--paper);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 0;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  padding: clamp(2rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.1rem;
  border-right: 1px solid var(--line);
}

.eyebrow,
.index,
.hero-caption,
.mute,
.text-link,
.top nav {
  font-family: var(--mono);
}

.eyebrow {
  margin: 0;
  color: var(--blaze);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.85rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.deck {
  margin: 0;
  max-width: 36ch;
  color: var(--mute);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.05rem;
  background: var(--blaze);
  color: #1a0904;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.btn.ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
}

.hero-stage {
  position: relative;
  background: #102018;
  min-height: 28rem;
}

.hero-stage.crt-hero {
  background: #071109;
  display: flex;
  align-items: center;
  padding: 2rem 1.6rem 3rem;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(169, 254, 157, 0.05) 0,
    rgba(169, 254, 157, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
}

.crt-preview {
  margin: 0;
  color: #a9fe9d;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 1.6vw, 1.05rem);
  line-height: 1.55;
  text-shadow: 0 0 8px rgba(169, 254, 157, 0.45);
  white-space: pre;
}

.topo {
  width: 100%;
  height: 100%;
  min-height: 28rem;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
}

.project {
  display: grid;
  grid-template-columns: minmax(18rem, 0.72fr) minmax(0, 1.28fr);
  min-height: 85svh;
  border-bottom: 1px solid var(--line);
}

.project.flip {
  grid-template-columns: minmax(0, 1.28fr) minmax(18rem, 0.72fr);
}

.project.flip .project-meta {
  order: 2;
  border-right: 0;
  border-left: 1px solid var(--line);
}

.project-meta {
  padding: clamp(1.6rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
}

.index {
  margin: 0;
  color: var(--blaze);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.project-meta h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.project-meta .lede {
  margin: 0;
  color: var(--mute);
  max-width: 52ch;
}

.project-meta ul {
  margin: 0.2rem 0 0.4rem;
  padding: 0;
  list-style: none;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

.project-meta ul li::before {
  content: "→ ";
  color: var(--blaze);
}

.text-link {
  color: var(--mute);
  font-size: 0.72rem;
  word-break: break-all;
}

.project-frame {
  min-height: 32rem;
  background: #0a1210;
}

.project-frame.crt {
  background: #0f1c0d;
}

.project-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 32rem;
  border: 0;
}

.project-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 32rem;
  padding: 2rem;
  text-align: center;
  font-family: var(--mono);
}

.project-placeholder p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--paper);
}

.project-placeholder-sub {
  margin-top: 1.5rem !important;
  padding: 1rem 1.25rem;
  background: #fff;
  color: #0a0814 !important;
  border-radius: 12px;
  font-size: 0.85rem !important;
  min-width: 12rem;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 1.5rem 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--mute);
}

.foot p {
  margin: 0;
}

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

.foot a.quiet {
  color: var(--mute);
  text-decoration: none;
}

.foot a.quiet:hover {
  color: var(--paper);
}

.studio {
  padding: 1.5rem clamp(0.7rem, 2.4vw, 2rem) 4.5rem;
}

.studio-intro {
  max-width: 22rem;
  margin: 0 0 1.25rem 0.4rem;
}

.studio-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.35rem;
}

.studio-intro h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
}

.studio-ig {
  display: inline-flex;
  color: var(--mute);
  text-decoration: none;
  line-height: 0;
}

.studio-ig:hover {
  color: var(--paper);
}

.studio-ig svg {
  width: 1rem;
  height: 1rem;
}

.studio-intro p {
  margin: 0;
  color: var(--mute);
  font-size: 0.88rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
  gap: 0.35rem 0.7rem;
  align-items: start;
}

html.js .gallery {
  opacity: 0;
}

html.js .gallery.is-set {
  opacity: 1;
  transition: opacity 0.45s ease;
}

.gallery figure {
  grid-column: span var(--cols, 1);
  margin: 0;
  cursor: zoom-in;
  transform: rotate(var(--rot, 0deg)) translateY(var(--nudge, 0px));
  transition: transform 0.28s ease, z-index 0s 0.28s;
  z-index: 1;
}

.gallery figure:hover {
  z-index: 4;
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  transition: transform 0.22s ease, z-index 0s;
}

.gallery img {
  width: 100%;
  height: auto;
  background: #080808;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.gallery figcaption {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--mute);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(6, 8, 7, 0.92);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 52rem);
  max-height: 92vh;
  width: auto;
  height: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

body.is-light {
  overflow: hidden;
}

@media (max-width: 759px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem 0.55rem;
  }

  .gallery figure {
    transform: none;
  }

  .gallery figure:hover {
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero,
  .project,
  .project.flip {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .project-meta,
  .project.flip .project-meta {
    border: 0;
    border-bottom: 1px solid var(--line);
    order: 0;
  }

  .project.flip .project-frame {
    order: 1;
  }

  .hero-stage,
  .topo,
  .project-frame,
  .project-frame iframe {
    min-height: 22rem;
  }
}
