@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg: #f4efe7;
  --paper: rgba(255, 251, 245, 0.82);
  --paper-strong: #fffaf4;
  --ink: #161413;
  --muted: #665f58;
  --line: rgba(22, 20, 19, 0.14);
  --line-strong: rgba(22, 20, 19, 0.3);
  --arch: #b04a2e;
  --comp: #166f80;
  --signal: #d7a94b;
  --shadow: 0 22px 70px rgba(38, 28, 18, 0.12);
  --radius-xl: 2rem;
  --radius-lg: 1.35rem;
  --radius-md: 1rem;
  --shell: min(1240px, calc(100vw - 2rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgba(176, 74, 46, 0.12), transparent 24rem),
    radial-gradient(circle at 88% 16%, rgba(22, 111, 128, 0.12), transparent 28rem),
    linear-gradient(180deg, #f7f2eb 0%, #efe6db 100%);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: -1;
}

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

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

button {
  font: inherit;
}

.page-glow {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

.page-glow--a {
  background: rgba(176, 74, 46, 0.18);
  top: -12rem;
  left: -8rem;
}

.page-glow--b {
  background: rgba(22, 111, 128, 0.18);
  right: -8rem;
  bottom: -12rem;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.eyebrow,
.section-kicker,
.toolbar__label,
.meta-label,
.hero-chip,
.detail-chip,
.detail-value,
.page-num,
.filter-btn,
.nav-chip,
.timeline-year,
.project-index__label {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.display,
.section-title,
.project-title,
.timeline-title {
  font-family: "Cormorant Garamond", serif;
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 1rem;
}

.lede,
.timeline-summary,
.detail-summary,
.hero-note,
.project-subtitle,
.project-intro {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 2rem;
  padding: 5rem 0 3.5rem;
  align-items: end;
}

.display {
  margin: 0;
  font-size: clamp(3.9rem, 11vw, 7.6rem);
  max-width: 14ch;
}

.hero-copy .lede {
  max-width: 42rem;
  margin-top: 1.6rem;
}

.hero-panel,
.toolbar,
.timeline-card,
.project-panel,
.project-pagination a,
.related-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  align-self: stretch;
  display: grid;
  gap: 1.25rem;
}

.hero-panel__top {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 0.6rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.78rem 0.98rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #faf7f2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.hero-cta::after {
  content: "↗";
  font-size: 1rem;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  background: #26211c;
  box-shadow: 0 16px 40px rgba(38, 28, 18, 0.18);
}

.hero-chip,
.detail-chip,
.nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  font-size: 0.72rem;
}

.hero-chip--alt,
.detail-chip--comp {
  color: var(--comp);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.stat {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

.stat__value {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat__label {
  color: var(--muted);
  font-size: 0.88rem;
}

.toolbar {
  margin: 0 0 2rem;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.toolbar__label {
  color: var(--muted);
  font-size: 0.76rem;
}

.filters {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  transform: translateY(-2px);
}

.filter-btn.is-active {
  background: var(--ink);
  color: #faf7f2;
}

.section-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.section-title {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.timeline-wrap {
  padding-bottom: 5rem;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem minmax(0, 1fr);
  gap: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: linear-gradient(180deg, rgba(22, 20, 19, 0), rgba(22, 20, 19, 0.22), rgba(22, 20, 19, 0));
}

.timeline-item {
  display: contents;
}

.timeline-item.is-hidden {
  display: none;
}

.timeline-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.timeline-card:hover,
.timeline-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 30px 90px rgba(38, 28, 18, 0.18);
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 1 / 2;
  margin-right: 2rem;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 3 / 4;
  margin-left: 2rem;
}

.timeline-marker {
  grid-column: 2 / 3;
  justify-self: center;
  align-self: start;
  position: relative;
  padding-top: 0.85rem;
}

.timeline-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.44);
}

.timeline-year {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.76rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.timeline-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(22, 20, 19, 0.08), rgba(22, 20, 19, 0.03));
}

.timeline-card__media img,
.project-cover img,
.page-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-card__body {
  padding: 1.4rem 1.4rem 1.5rem;
  display: grid;
  gap: 1rem;
}

.timeline-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.74rem;
}

.pill--arch {
  color: var(--arch);
}

.pill--comp {
  color: var(--comp);
}

.pill--active {
  background: var(--ink);
  color: #faf7f2;
  border-color: var(--ink);
}

.timeline-title {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
}

.timeline-summary {
  margin: 0;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.timeline-tag {
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.timeline-arrow::after {
  content: "↗";
  font-size: 1.1rem;
}

.asset--corrected {
  transform: scaleY(-1);
}

.zoomable-image {
  cursor: zoom-in;
}

.body--lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 50;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.84);
  backdrop-filter: blur(10px);
}

.lightbox__figure {
  position: relative;
  z-index: 1;
  margin: 0;
  width: min(92vw, 1400px);
  max-height: calc(100vh - 3rem);
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 72ch;
}

.lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(-100%);
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.page--project {
  padding-bottom: 4rem;
}

.project-shell {
  width: var(--shell);
  margin: 0 auto;
  padding-top: 2rem;
}

.project-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}

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

.project-hero {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 1.6rem;
  margin-bottom: 2rem;
}

.project-panel {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.project-title {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.4rem);
}

.project-subtitle {
  margin: 1rem 0 1.25rem;
  max-width: 36rem;
}

.detail-chips,
.project-tags,
.project-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.project-intro {
  margin-top: 1.2rem;
}

.project-cover {
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 22rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.project-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 1.6rem;
  align-items: start;
}

.project-side {
  position: sticky;
  top: 1.25rem;
}

.project-side__block + .project-side__block {
  margin-top: 1rem;
}

.project-side__title {
  margin: 0 0 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.detail-list {
  display: grid;
  gap: 0.9rem;
}

.detail-row {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.detail-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.meta-label {
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.3rem;
}

.detail-value {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.98rem;
  line-height: 1.55;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.page-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.page-frame--wide {
  grid-column: 1 / -1;
}

.page-frame__image {
  border-radius: calc(var(--radius-lg) - 0.35rem);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(22, 20, 19, 0.08), rgba(22, 20, 19, 0.03));
}

.page-frame__image img {
  width: 100%;
  height: auto;
}

.page-num {
  padding-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.project-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.project-pagination a {
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.2rem;
  display: grid;
  gap: 0.3rem;
}

.project-pagination__label {
  color: var(--muted);
  font-size: 0.74rem;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-pagination__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1;
}

.related {
  margin-top: 1.8rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.related-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.related-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.related-card__body {
  padding: 1rem 1.1rem 1.15rem;
}

.related-card__title {
  margin: 0.45rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  line-height: 1;
}

.is-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

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

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

  .project-side {
    position: static;
  }

  .timeline {
    grid-template-columns: 3.25rem minmax(0, 1fr);
  }

  .timeline::before {
    left: 1.6rem;
    transform: none;
  }

  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 2 / 3;
    margin: 0 0 0 1rem;
  }

  .timeline-marker {
    grid-column: 1 / 2;
    justify-self: start;
  }

  .timeline-year {
    writing-mode: initial;
    transform: none;
  }
}

@media (max-width: 720px) {
  .display {
    font-size: clamp(3.2rem, 14vw, 4.7rem);
  }

  .home-hero {
    padding-top: 4rem;
  }

  .hero-stats,
  .gallery-grid,
  .project-pagination,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    border-radius: 1.4rem;
  }

  .project-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}

.site-footer {
  width: var(--shell);
  margin: 3rem auto 0;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}
