:root {
  color-scheme: dark;
  --ink: #f5f1e7;
  --muted: #9aa7af;
  --navy: #07131f;
  --navy-2: #0a1927;
  --line: rgba(217, 228, 232, 0.17);
  --signal: #c9ff2f;
  --max: 1500px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--navy);
  background-size: 76px 76px;
  font-family: "Manrope", sans-serif;
}

body::before {
  position: fixed;
  z-index: 10;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  content: "";
}

a {
  color: inherit;
  text-decoration: none;
}

.page-glow {
  position: fixed;
  z-index: -1;
  top: -20vw;
  right: -15vw;
  width: 55vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(151, 255, 24, 0.08);
  filter: blur(120px);
  pointer-events: none;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 4vw, 72px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.wordmark img {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
}

.signal {
  color: var(--signal);
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

nav a {
  transition: color 180ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--signal);
}

.x-link {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  border: 1px solid var(--line);
  padding: 13px 16px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 940px;
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  align-items: center;
  gap: clamp(40px, 6vw, 100px);
  max-width: var(--max);
  margin: 0 auto;
  padding: 132px clamp(24px, 4vw, 72px) 100px;
}

.hero::before {
  position: absolute;
  top: 12%;
  left: 45%;
  width: 1px;
  height: 62%;
  background: linear-gradient(transparent, var(--line), transparent);
  content: "";
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 26px;
  color: #c6d0d6;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: var(--signal);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -0.06em;
}

h1 {
  max-width: 760px;
  margin-bottom: 34px;
  font-size: clamp(64px, 7.2vw, 118px);
  font-weight: 500;
  line-height: 0.88;
}

h1 em,
h2 em {
  font-family: "Newsreader", serif;
  font-weight: 400;
}

h1 em {
  color: var(--signal);
}

.hero-intro {
  max-width: 570px;
  margin-bottom: 38px;
  color: #aebbc3;
  font-size: 18px;
  line-height: 1.65;
}

.primary-link {
  display: inline-flex;
  min-width: 285px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 9px 9px 9px 22px;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease;
}

.button-arrow {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--signal);
  color: var(--navy);
  font-size: 21px;
}

.primary-link:hover,
.primary-link:focus-visible {
  border-color: var(--signal);
  background: rgba(201, 255, 47, 0.06);
}

.hero-art {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
}

.hero-art::before,
.hero-art::after {
  position: absolute;
  width: 10px;
  height: 10px;
  border: solid var(--signal);
  content: "";
}

.hero-art::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.hero-art::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}

.hero-art img {
  display: block;
  width: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: 63% center;
}

.hero-index {
  position: absolute;
  right: -20px;
  bottom: -48px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
}

.hero-index strong {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 88px;
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: clamp(24px, 4vw, 72px);
  display: flex;
  align-items: center;
  gap: 16px;
  color: #7f8c94;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scroll-cue i {
  position: relative;
  width: 78px;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue i::after {
  position: absolute;
  inset: 0;
  background: var(--signal);
  content: "";
  transform: translateX(-100%);
  animation: scan 2.2s ease-in-out infinite;
}

@keyframes scan {
  55%, 100% { transform: translateX(100%); }
}

.projects {
  max-width: var(--max);
  margin: 0 auto;
  padding: 140px clamp(24px, 4vw, 72px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: 60px;
  margin-bottom: 80px;
}

.section-heading h2,
.closing h2 {
  margin: 0;
  font-size: clamp(54px, 6.5vw, 104px);
  font-weight: 500;
  line-height: 0.92;
}

.section-heading > p {
  max-width: 520px;
  margin: 0 0 6px;
  color: #aebbc3;
  font-size: 17px;
  line-height: 1.7;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  grid-column: span 6;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b1720;
  isolation: isolate;
}

.project-card--feature {
  grid-column: span 7;
}

.project-card--tall {
  grid-column: span 5;
}

.project-card--wide {
  grid-column: 1 / -1;
  min-height: 590px;
}

.project-card--wide img {
  object-position: center;
}

.project-card img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.8);
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 500ms ease;
}

.card-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 12, 18, 0.15) 25%, rgba(5, 12, 18, 0.88) 100%),
    linear-gradient(90deg, rgba(5, 12, 18, 0.55), transparent 70%);
  transition: background 450ms ease;
}

.project-number {
  position: absolute;
  top: 26px;
  left: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
}

.project-number::before {
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--signal);
  content: "";
}

.project-content {
  position: absolute;
  right: 32px;
  bottom: 34px;
  left: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-meta {
  margin-bottom: 13px;
  color: var(--signal);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-content strong {
  max-width: 700px;
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.065em;
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.5);
}

.project-description {
  max-height: 0;
  max-width: 420px;
  overflow: hidden;
  color: #dbe2e5;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(10px);
  transition: max-height 350ms ease, opacity 350ms ease, transform 350ms ease, margin 350ms ease;
}

.open-mark {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  font-size: 22px;
  transition: background 250ms ease, color 250ms ease, transform 250ms ease;
}

.project-card:hover img,
.project-card:focus-visible img {
  filter: saturate(1) brightness(0.9);
  transform: scale(1.035);
}

.project-card:hover .card-shade,
.project-card:focus-visible .card-shade {
  background:
    linear-gradient(180deg, rgba(5, 12, 18, 0.08) 15%, rgba(5, 12, 18, 0.92) 100%),
    linear-gradient(90deg, rgba(5, 12, 18, 0.45), transparent 70%);
}

.project-card:hover .project-description,
.project-card:focus-visible .project-description {
  max-height: 80px;
  margin-top: 17px;
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover .open-mark,
.project-card:focus-visible .open-mark {
  background: var(--signal);
  color: var(--navy);
  transform: rotate(45deg);
}

.project-card:focus-visible,
.primary-link:focus-visible,
.closing a:focus-visible,
nav a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.closing {
  display: grid;
  max-width: calc(var(--max) - 2 * clamp(24px, 4vw, 72px));
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 38px;
  margin: 0 auto 120px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
}

.closing img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
}

.closing .eyebrow {
  margin-bottom: 18px;
}

.closing h2 {
  font-size: clamp(48px, 5.5vw, 84px);
}

.closing h2 em {
  color: var(--signal);
}

.closing > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  border: 1px solid var(--line);
  padding: 19px 20px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  transition: border-color 180ms ease, color 180ms ease;
}

.closing > a:hover {
  border-color: var(--signal);
  color: var(--signal);
}

footer {
  display: flex;
  max-width: var(--max);
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 30px clamp(24px, 4vw, 72px) 38px;
  color: #78878f;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal[data-delay="1"] {
  transition-delay: 120ms;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 160px;
    padding-bottom: 130px;
  }

  .hero::before {
    display: none;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
  }

  .hero-art {
    margin-left: 9vw;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card--feature,
  .project-card--tall {
    grid-column: span 6;
  }

  .project-card--wide {
    grid-column: 1 / -1;
  }

  .closing {
    grid-template-columns: auto 1fr;
    margin-inline: clamp(24px, 4vw, 72px);
  }

  .closing > a {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 700px) {
  body {
    background-size: 48px 48px;
  }

  .site-header {
    padding: 20px;
  }

  nav > a:first-child {
    display: none;
  }

  .x-link {
    gap: 14px;
    padding: 10px 12px;
  }

  .hero {
    gap: 54px;
    padding: 142px 20px 108px;
  }

  h1 {
    font-size: clamp(54px, 17vw, 78px);
  }

  .hero-intro {
    font-size: 16px;
  }

  .hero-art {
    margin: 0;
  }

  .hero-art img {
    min-height: 250px;
  }

  .hero-index {
    right: 0;
    bottom: -34px;
  }

  .hero-index strong {
    font-size: 62px;
  }

  .projects {
    padding: 100px 20px;
  }

  .section-heading {
    gap: 30px;
    margin-bottom: 52px;
  }

  .section-heading h2,
  .closing h2 {
    font-size: clamp(48px, 14vw, 68px);
  }

  .project-grid {
    display: flex;
    flex-direction: column;
  }

  .project-card {
    min-height: 470px;
  }

  .project-card--wide {
    min-height: 470px;
  }

  .project-content {
    right: 24px;
    bottom: 26px;
    left: 24px;
  }

  .project-content strong {
    font-size: 48px;
  }

  .project-description {
    max-height: 80px;
    margin-top: 15px;
    opacity: 1;
    transform: none;
  }

  .open-mark {
    width: 48px;
    height: 48px;
  }

  .closing {
    display: flex;
    margin: 0 20px 90px;
    padding: 56px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .closing img {
    width: 82px;
    height: 82px;
  }

  footer {
    gap: 16px;
    padding-inline: 20px;
    flex-wrap: wrap;
  }

  footer span:nth-child(2) {
    display: none;
  }
}

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