:root {
  color-scheme: dark;
  --ink: #f7f2e8;
  --muted: #b9b0a2;
  --paper: #10100f;
  --paper-strong: #171715;
  --panel: #20201d;
  --line: #33302b;
  --teal: #25b7ae;
  --coral: #d95f4c;
  --gold: #e7ad35;
  --green: #76ad6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(120deg, rgba(37, 183, 174, 0.11), transparent 34rem),
    linear-gradient(250deg, rgba(217, 95, 76, 0.12), transparent 36rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: hidden;
  max-width: 100%;
}

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

a {
  color: inherit;
  text-decoration-color: rgba(0, 143, 145, 0.45);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--gold);
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper-strong);
  padding: 0.65rem 0.9rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(16, 16, 15, 0.9);
  border-bottom: 1px solid rgba(255, 253, 247, 0.1);
  backdrop-filter: blur(16px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 4.25rem;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(247, 242, 232, 0.72);
  font-size: 0.92rem;
}

.nav-links a {
  text-decoration: none;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 28rem;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid rgba(23, 21, 16, 0.12);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../img/header-r2.jpg");
  background-position: center 34%;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 9, 7, 0.92), rgba(10, 9, 7, 0.64) 48%, rgba(10, 9, 7, 0.2));
}

.hero-copy {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6rem 0 4.4rem;
  color: var(--ink);
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 18ch;
  font-size: 4rem;
}

h2 {
  font-size: 2.45rem;
}

.hero-copy p:last-child {
  max-width: min(39rem, 100%);
  margin: 1.1rem 0 0;
  color: rgba(255, 253, 247, 0.84);
  font-size: 1.05rem;
  overflow-wrap: break-word;
}

.projects {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  color: var(--ink);
}

.honeycomb {
  display: grid;
  place-items: center;
  padding: 0.5rem 0 1.5rem;
  min-width: 0;
}

.honeycomb-map {
  display: block;
  width: min(100%, 920px);
  max-width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.34));
}

.hex-cell {
  cursor: pointer;
  outline: none;
}

.hex-cell.is-empty {
  cursor: default;
}

.hex-svg-base {
  fill: rgba(12, 13, 12, 0.98);
  stroke: rgba(231, 173, 53, 0.2);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: fill 180ms ease, stroke 180ms ease;
}

.hex-cell image {
  filter: saturate(0.86) brightness(0.82);
  transition: filter 180ms ease;
}

.hex-svg-fallback {
  fill: rgba(31, 54, 92, 0.88);
}

.hex-svg-empty {
  fill: rgba(255, 253, 247, 0.04);
}

.hex-svg-shade {
  fill: rgba(0, 0, 0, 0.36);
  transition: fill 180ms ease;
}

.hex-svg-border {
  fill: none;
  stroke: rgba(255, 253, 247, 0.3);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transition: stroke 180ms ease, stroke-width 180ms ease;
}

.hex-highlight-layer {
  pointer-events: none;
}

.hex-highlight {
  fill: none;
  stroke-linejoin: round;
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
}

.hex-highlight.is-selected {
  stroke: var(--gold);
}

.hex-highlight.is-hovered {
  stroke: #fffdf7;
  stroke-width: 4;
}

.hex-svg-year,
.hex-svg-title,
.hex-svg-category {
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.72);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.hex-svg-year {
  fill: var(--gold);
  font-size: 11px;
  font-weight: 850;
}

.hex-svg-title {
  fill: #fffdf7;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.hex-svg-category {
  fill: rgba(255, 253, 247, 0.72);
  font-size: 11px;
  font-weight: 650;
}

.hex-cell:hover image,
.hex-cell:focus-visible image,
.hex-cell.is-selected image {
  filter: saturate(1.08) brightness(0.98);
}

.hex-cell:hover .hex-svg-base,
.hex-cell:focus-visible .hex-svg-base,
.hex-cell.is-selected .hex-svg-base {
  fill: rgba(231, 173, 53, 0.14);
  stroke: rgba(231, 173, 53, 0.58);
}

.hex-cell:hover .hex-svg-shade,
.hex-cell:focus-visible .hex-svg-shade,
.hex-cell.is-selected .hex-svg-shade {
  fill: rgba(0, 0, 0, 0.22);
}

.hex-cell:focus-visible .hex-svg-border,
.hex-cell.is-selected .hex-svg-border {
  stroke: var(--gold);
  stroke-width: 4;
}

.hex-cell.is-empty .hex-svg-base {
  fill: rgba(12, 13, 12, 0.56);
  stroke: rgba(255, 253, 247, 0.08);
}

.hex-cell.is-empty .hex-svg-border {
  stroke: rgba(255, 253, 247, 0.14);
}

.project-detail {
  background: var(--paper-strong);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 100%;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(21rem, 1.1fr);
  gap: 3rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0;
  min-width: 0;
}

.detail-copy {
  align-self: start;
  min-width: 0;
}

.detail-copy h2 {
  max-width: 18ch;
  overflow-wrap: normal;
  text-wrap: balance;
}

.detail-lead {
  margin-top: 1.2rem;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.4;
}

.detail-copy p {
  color: var(--muted);
  max-width: 100%;
  overflow-wrap: break-word;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.detail-meta span {
  min-height: 4.4rem;
  display: grid;
  align-items: center;
  padding: 0.8rem;
  border-top: 3px solid var(--coral);
  background: var(--panel);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.28;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.tool-list span {
  border: 1px solid rgba(37, 183, 174, 0.34);
  background: rgba(37, 183, 174, 0.1);
  color: #9ee6df;
  padding: 0.36rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0 0.85rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #11110f;
  text-decoration: none;
  font-weight: 760;
}

.text-link:hover {
  background: var(--teal);
  color: #061211;
  border-color: var(--teal);
}

.detail-media {
  display: grid;
  gap: 1rem;
  min-width: 0;
  align-self: start;
}

.image-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  min-width: 0;
  align-items: start;
}

.detail-image {
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  background: #070706;
}

.detail-image img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 42rem);
  min-height: 0;
  object-fit: contain;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  min-width: 0;
}

.video-frame {
  margin: 0;
  background: #070706;
}

.video-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-frame figcaption {
  padding: 0.65rem 0.75rem 0.8rem;
  color: rgba(255, 253, 247, 0.78);
  font-size: 0.82rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

@media (max-width: 980px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero {
    min-height: 24rem;
  }

  .detail-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .detail-copy h2 {
    max-width: 18ch;
  }
}

@media (max-width: 740px) {
  .topbar,
  .site-footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    width: 100%;
    padding-inline: 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.86rem;
  }

  .hero-copy {
    width: 100%;
    padding: 4.2rem 1rem 3rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  .projects {
    width: 100%;
    padding-top: 3.2rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .honeycomb-map {
    width: min(100%, 21rem);
  }

  .hex-svg-title {
    font-size: 13px;
  }

  .hex-svg-category {
    font-size: 10px;
  }

  .detail-shell {
    display: block;
    width: 100%;
    padding: 3.2rem 1rem;
  }

  .detail-copy,
  .detail-media {
    width: 100%;
    max-width: 100%;
  }

  .detail-media {
    margin-top: 2rem;
  }

  .detail-copy h2,
  .detail-lead,
  .detail-copy p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .detail-meta,
  .tool-list {
    width: 100%;
    min-width: 0;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .hero-copy p:last-child {
    max-width: 20.8rem;
  }

  .honeycomb-map {
    width: min(100%, 20rem);
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(14, 12, 8, 0.86), rgba(14, 12, 8, 0.54));
  }

  .detail-lead {
    font-size: 1.05rem;
  }

  .detail-shell {
    padding-right: clamp(1rem, 8vw, 2rem);
    padding-left: clamp(1rem, 8vw, 2rem);
  }

  .detail-copy,
  .detail-media {
    max-width: 19.5rem;
  }

  .detail-meta span {
    overflow-wrap: break-word;
  }

  .video-grid,
  .image-stack {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
