:root {
  --ink: #15171d;
  --navy: #34486a;
  --blue: #6181b0;
  --sand: #febb79;
  --bronze: #cc773c;
  --paper: #f7f2eb;
  --mist: #dce6f3;
  --line: rgba(247, 242, 235, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(97, 129, 176, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 129, 176, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
}

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

button {
  font: inherit;
}

img {
  max-width: 100%;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  padding: clamp(18px, 3vw, 34px);
  isolation: isolate;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(21, 23, 29, 0.98) 0%, rgba(21, 23, 29, 0.82) 38%, rgba(21, 23, 29, 0.2) 78%),
    linear-gradient(0deg, rgba(21, 23, 29, 0.94) 0%, rgba(21, 23, 29, 0.22) 42%, rgba(21, 23, 29, 0.36) 100%);
}

.topbar,
.project-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(254, 187, 121, 0.5);
  background: rgba(21, 23, 29, 0.72);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.topbar__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: rgba(247, 242, 235, 0.78);
  font-size: 0.94rem;
}

.topbar__links a,
.project-nav > a:last-child {
  border-bottom: 1px solid transparent;
}

.topbar__links a:hover,
.project-nav > a:last-child:hover {
  border-color: var(--sand);
  color: var(--sand);
}

.hero__content {
  width: min(1180px, 100%);
  margin: clamp(72px, 14vh, 150px) auto 0;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: clamp(3.1rem, 8vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(247, 242, 235, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(247, 242, 235, 0.24);
  padding: 0 18px;
  font-weight: 800;
}

.button--primary {
  border-color: var(--sand);
  background: var(--sand);
  color: var(--ink);
}

.button--ghost {
  background: rgba(21, 23, 29, 0.46);
  color: var(--paper);
}

.hero__stats {
  display: grid;
  width: min(1180px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 64px auto 0;
  border: 1px solid rgba(247, 242, 235, 0.16);
  background: rgba(247, 242, 235, 0.12);
}

.hero__stats div {
  min-width: 0;
  padding: clamp(16px, 3vw, 26px);
  background: rgba(21, 23, 29, 0.58);
}

.hero__stats span {
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 800;
}

.hero__stats p {
  margin: 6px 0 0;
  color: rgba(247, 242, 235, 0.7);
}

.intro-band,
.archive-section,
.system-section,
.project-detail-grid,
.gallery-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  padding: 76px 0 42px;
  border-bottom: 1px solid rgba(247, 242, 235, 0.12);
}

.intro-band h2,
.section-heading h2,
.system-section h2 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro-band > p {
  margin: 0;
  align-self: end;
  color: rgba(247, 242, 235, 0.7);
  font-size: 1.08rem;
  line-height: 1.75;
}

.archive-section,
.system-section {
  padding: 78px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.control-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  border-top: 1px solid rgba(247, 242, 235, 0.14);
  border-bottom: 1px solid rgba(247, 242, 235, 0.14);
  padding: 18px 0;
}

.segmented,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button,
.segmented a,
.chip {
  min-height: 42px;
  border: 1px solid rgba(247, 242, 235, 0.16);
  background: rgba(52, 72, 106, 0.36);
  color: rgba(247, 242, 235, 0.78);
  cursor: pointer;
}

.segmented button,
.segmented a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  text-transform: capitalize;
}

.segmented button span,
.segmented a span {
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.chip {
  padding: 0 14px;
}

.segmented button:hover,
.segmented a:hover,
.chip:hover,
.segmented .is-active,
.chip.is-active {
  border-color: rgba(254, 187, 121, 0.72);
  background: rgba(204, 119, 60, 0.22);
  color: var(--paper);
}

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

.project-card,
.system-card {
  border: 1px solid rgba(247, 242, 235, 0.16);
  background: rgba(21, 23, 29, 0.68);
  box-shadow: var(--shadow);
}

.project-card {
  overflow: hidden;
}

.project-card a {
  display: grid;
  height: 100%;
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--navy);
}

.project-card__body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.project-card__meta,
.tag-row,
.project-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card__meta span,
.tag-row span,
.project-hero__meta span {
  border: 1px solid rgba(254, 187, 121, 0.26);
  padding: 5px 8px;
  color: rgba(247, 242, 235, 0.72);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.archive-block {
  display: grid;
  gap: 18px;
  padding-top: 46px;
  scroll-margin-top: 24px;
}

.archive-block > h3 {
  margin: 0;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  text-transform: uppercase;
}

.project-card h4 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.12;
}

.project-card p {
  margin: 0;
  color: rgba(247, 242, 235, 0.7);
  line-height: 1.62;
}

.project-card:hover {
  border-color: rgba(254, 187, 121, 0.56);
  transform: translateY(-2px);
  transition: transform 180ms ease, border-color 180ms ease;
}

.timeline {
  display: grid;
  gap: 34px;
}

.timeline-year {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
}

.timeline-year h4 {
  position: sticky;
  top: 18px;
  align-self: start;
  margin: 0;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 3rem);
}

.timeline-list {
  display: grid;
  gap: 12px;
}

.project-row a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(247, 242, 235, 0.12);
  padding: 18px;
  background: rgba(52, 72, 106, 0.22);
}

.project-row__marker {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border: 2px solid var(--sand);
}

.project-row p,
.project-row h3,
.project-row span {
  margin: 0;
}

.project-row p {
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.project-row h4 {
  margin-top: 6px;
  font-size: 1.35rem;
}

.project-row div > span {
  display: block;
  margin-top: 8px;
  color: rgba(247, 242, 235, 0.68);
  line-height: 1.6;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.system-card {
  padding: clamp(20px, 3vw, 28px);
}

.system-card span {
  color: var(--sand);
  font-family: var(--font-mono);
}

.system-card h3 {
  margin: 42px 0 10px;
  font-size: 1.45rem;
}

.system-card p {
  margin: 0;
  color: rgba(247, 242, 235, 0.68);
  line-height: 1.68;
}

.category-stack {
  display: grid;
  gap: 22px;
}

.category-group {
  display: grid;
  gap: 14px;
  scroll-margin-top: 24px;
}

.category-group h4 {
  margin: 0;
  color: var(--paper);
  font-size: 1.3rem;
}

.project-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-page {
  min-height: 100vh;
  padding: clamp(18px, 3vw, 34px) 0 80px;
}

.project-nav {
  width: min(1180px, calc(100% - 36px));
}

.project-hero {
  position: relative;
  display: grid;
  width: min(1180px, calc(100% - 36px));
  min-height: 620px;
  align-items: end;
  margin: 34px auto 0;
  overflow: hidden;
  border: 1px solid rgba(247, 242, 235, 0.16);
  isolation: isolate;
}

.project-hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(0deg, rgba(21, 23, 29, 0.96), rgba(21, 23, 29, 0.18));
}

.project-hero__content {
  max-width: 860px;
  padding: clamp(24px, 5vw, 54px);
}

.project-hero h1 {
  font-size: clamp(2.6rem, 7vw, 6.2rem);
}

.project-hero p:not(.eyebrow) {
  max-width: 720px;
  color: rgba(247, 242, 235, 0.76);
  font-size: 1.14rem;
  line-height: 1.7;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  padding-top: 58px;
}

.project-detail-grid aside {
  align-self: start;
  border: 1px solid rgba(247, 242, 235, 0.14);
  padding: 20px;
  background: rgba(52, 72, 106, 0.2);
}

.project-detail-grid h2 {
  margin: 0;
}

dl {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
}

dt {
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  color: rgba(247, 242, 235, 0.78);
}

.project-story {
  display: grid;
  gap: 34px;
}

.project-story section {
  border-top: 1px solid rgba(247, 242, 235, 0.14);
  padding-top: 24px;
}

.project-story h2 {
  color: var(--sand);
  font-size: 1.2rem;
}

.project-story p {
  max-width: 820px;
  color: rgba(247, 242, 235, 0.72);
  font-size: 1.05rem;
  line-height: 1.8;
}

.gallery-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 48px;
}

.gallery-section img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(247, 242, 235, 0.14);
  background: var(--navy);
}

@media (max-width: 860px) {
  .topbar,
  .project-nav,
  .intro-band,
  .section-heading,
  .timeline-year,
  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .project-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 100vh;
  }

  .hero__stats,
  .project-grid,
  .system-grid,
  .gallery-section {
    grid-template-columns: 1fr;
  }

  .hero__content {
    margin-top: 56px;
  }

  .timeline-year h4 {
    position: static;
  }

  .project-grid--compact {
    grid-template-columns: 1fr;
  }

  .project-hero {
    min-height: 520px;
  }
}

@media (max-width: 520px) {
  .hero,
  .project-page {
    padding-inline: 14px;
  }

  .intro-band,
  .archive-section,
  .system-section,
  .project-detail-grid,
  .gallery-section,
  .project-nav,
  .project-hero {
    width: 100%;
  }

  h1 {
    max-width: 300px;
    font-size: clamp(2.15rem, 11.5vw, 2.85rem);
    line-height: 1.02;
  }

  .hero__content,
  .hero__lead {
    max-width: 300px;
  }

  .segmented button,
  .chip,
  .button {
    width: 100%;
  }
}
