:root {
  --background: #101010;
  --surface: #101010;
  --text: #F2F2EF;
  --secondary-text: #8A8A86;
  --muted-text: #6F6F6B;
  --border: #292929;
  --focus: #8A8A86;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
}

body,
button,
input,
textarea {
  font: inherit;
}

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

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: 3px;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface);
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 10;
  padding: 8px 10px;
  background: var(--text);
  color: var(--background);
  transform: translateY(-140%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.1fr) minmax(190px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  gap: 18px;
  padding: 18px clamp(10px, 1.4vw, 18px);
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.brand,
.header-line,
.site-nav a {
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  line-height: 1;
}

.brand {
  font-weight: 560;
}

.header-line {
  margin: 0;
  color: var(--secondary-text);
  text-align: center;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(16px, 2.2vw, 30px);
  color: var(--secondary-text);
}

.site-nav a {
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
}

main {
  min-height: calc(100vh - var(--header-height));
  padding: 0 clamp(2px, 0.35vw, 6px) 60px;
}

.about-layout h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 5.2rem);
  font-weight: 520;
  line-height: 0.96;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(44px, 6.8vw);
  grid-auto-flow: row;
  gap: clamp(4px, 0.45vw, 7px);
  padding-top: clamp(4px, 0.45vw, 7px);
}

.project-tile {
  min-height: 0;
}

.project-tile.large-landscape {
  grid-column: span 4;
  grid-row: span 4;
}

.project-tile.medium-landscape {
  grid-column: span 4;
  grid-row: span 3;
}

.project-tile.small-landscape {
  grid-column: span 3;
  grid-row: span 2;
}

.project-tile.portrait {
  grid-column: span 2;
  grid-row: span 5;
}

.project-tile.square {
  grid-column: span 3;
  grid-row: span 3;
}

.project-tile.wide {
  grid-column: span 5;
  grid-row: span 3;
}

.project-tile.tall {
  grid-column: span 3;
  grid-row: span 6;
}

@media (min-width: 981px) {
  .mosaic {
    grid-auto-rows: minmax(40px, 5.8vw);
    gap: clamp(4px, 0.36vw, 6px);
    padding-top: clamp(4px, 0.36vw, 6px);
  }

  .project-tile:nth-child(1) {
    grid-column: 1 / span 4;
    grid-row: 1 / span 4;
  }

  .project-tile:nth-child(2) {
    grid-column: 5 / span 3;
    grid-row: 1 / span 4;
  }

  .project-tile:nth-child(3) {
    grid-column: 8 / span 5;
    grid-row: 1 / span 4;
  }

  .project-tile:nth-child(4) {
    grid-column: 1 / span 7;
    grid-row: 5 / span 5;
  }

  .project-tile:nth-child(5) {
    grid-column: 8 / span 5;
    grid-row: 5 / span 4;
  }

  .project-tile:nth-child(6) {
    grid-column: 8 / span 3;
    grid-row: 9 / span 3;
  }

  .project-tile:nth-child(7) {
    grid-column: 11 / span 2;
    grid-row: 9 / span 5;
  }

  .project-tile:nth-child(8) {
    grid-column: 1 / span 3;
    grid-row: 10 / span 3;
  }

  .project-tile:nth-child(9) {
    grid-column: 4 / span 4;
    grid-row: 10 / span 3;
  }

  .project-tile:nth-child(10) {
    grid-column: 1 / span 4;
    grid-row: 13 / span 5;
  }

  .project-tile:nth-child(11) {
    grid-column: 1 / span 4;
    grid-row: 18 / span 3;
  }

  .project-tile:nth-child(12) {
    grid-column: 5 / span 4;
    grid-row: 18 / span 3;
  }

  .project-tile:nth-child(13) {
    grid-column: 5 / span 4;
    grid-row: 13 / span 5;
  }

  .project-tile:nth-child(14) {
    grid-column: 5 / span 4;
    grid-row: 13 / span 5;
  }

  .project-tile:nth-child(15) {
    grid-column: 9 / span 2;
    grid-row: 12 / span 6;
  }

  .project-tile:nth-child(16) {
    grid-column: 9 / span 4;
    grid-row: 18 / span 3;
  }

  .project-tile:nth-child(1) img {
    object-position: 50% 42%;
  }

  .project-tile:nth-child(2) img {
    object-position: 52% 44%;
  }

  .project-tile:nth-child(5) img {
    object-position: 52% 48%;
  }

  .project-tile:nth-child(8) img,
  .project-tile:nth-child(16) img {
    object-position: 50% 28%;
  }

  .project-tile:nth-child(12) img {
    object-position: 50% 48%;
  }
}

.project-tile a,
.project-tile figure {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.project-tile figure {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.tile-media {
  width: 100%;
  height: 100%;
}

.project-tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  color: var(--text);
  background: rgba(16, 16, 16, 0.82);
  opacity: 0;
  transition: opacity 180ms ease;
}

.project-tile:hover figcaption,
.project-tile:focus-within figcaption {
  opacity: 1;
}

.project-tile figcaption span {
  font-size: clamp(0.86rem, 1vw, 1.02rem);
  line-height: 1.08;
}

.project-tile figcaption small {
  max-width: 34ch;
  color: var(--secondary-text);
  font-size: 0.72rem;
  line-height: 1.2;
}

.poster-fallback {
  display: grid;
  place-items: end start;
  width: 100%;
  height: 100%;
  padding: 14px;
  background: var(--surface);
  color: var(--secondary-text);
  font-size: clamp(1.1rem, 2.2vw, 2.8rem);
  line-height: 0.98;
}

.feed-page {
  padding-top: clamp(22px, 3vw, 42px);
}

.feed-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(4px, 1vw, 12px) 12px;
  color: var(--secondary-text);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}

.project-feed {
  display: grid;
  gap: clamp(58px, 9vw, 130px);
  padding-top: clamp(14px, 2vw, 26px);
}

.feed-project {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.28fr);
  gap: clamp(16px, 2vw, 34px);
  align-items: start;
  min-height: calc(100vh - var(--header-height) - 40px);
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.media-stack {
  display: grid;
  gap: 8px;
}

.embed-shell {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface);
  color: var(--text);
}

.embed-shell.is-vertical {
  max-width: min(540px, 100%);
  aspect-ratio: 9 / 16;
}

button.embed-shell {
  cursor: pointer;
  text-align: left;
}

.external-media {
  cursor: pointer;
}

.embed-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.play-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding-bottom: 2px;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1;
  border-bottom: 1px solid currentColor;
}

.placeholder-media {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}

.placeholder-media div {
  display: grid;
  gap: 10px;
  width: min(420px, 78%);
}

.placeholder-media span {
  color: var(--secondary-text);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.placeholder-media strong {
  font-size: clamp(1.5rem, 3vw, 3.8rem);
  font-weight: 460;
  line-height: 0.98;
}

.project-info {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  display: grid;
  gap: 18px;
  padding-right: clamp(4px, 1vw, 12px);
}

.project-info h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 4.2rem);
  font-weight: 500;
  line-height: 0.98;
}

.official-title,
.description {
  max-width: 48ch;
  margin: 0;
  color: var(--secondary-text);
  font-size: 0.92rem;
  line-height: 1.5;
}

dl {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-top: 4px;
}

dl div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

dt {
  color: var(--secondary-text);
  font-size: 0.72rem;
  line-height: 1.25;
}

dd {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.32;
}

.credit-note {
  grid-template-columns: 1fr;
  color: var(--secondary-text);
  font-style: italic;
}

.external-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.external-links a,
.contact-links a {
  color: var(--text);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(430px, 45vw) minmax(430px, 500px);
  gap: clamp(44px, 6vw, 104px);
  align-items: start;
  padding: clamp(8px, 1vw, 16px) clamp(4px, 1vw, 12px) clamp(28px, 4vw, 54px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--secondary-text);
  font-size: 0.78rem;
}

.about-portrait {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.about-portrait img {
  object-position: 52% 48%;
}

.about-copy {
  display: grid;
  gap: 12px;
  max-width: 500px;
  align-self: start;
  padding-top: 0;
}

.about-copy p {
  margin: 0;
  color: var(--secondary-text);
  font-size: clamp(0.86rem, 0.92vw, 0.98rem);
  line-height: 1.45;
}

.about-copy .lead {
  color: var(--text);
}

.about-copy a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.about-link-group {
  display: grid;
  gap: 10px;
  margin-top: clamp(16px, 2vw, 28px);
  max-width: 500px;
}

.about-link-group + .about-link-group {
  margin-top: clamp(8px, 1.1vw, 18px);
}

.about-link-group h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
}

.about-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
}

.about-link-list.compact {
  grid-template-columns: repeat(2, minmax(0, max-content));
}

.about-link-list a {
  width: fit-content;
  color: var(--secondary-text);
  font-size: clamp(0.82rem, 0.86vw, 0.92rem);
  line-height: 1.3;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 980px) {
  .mosaic {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(64px, 14vw);
  }

  .project-tile.large-landscape,
  .project-tile.wide {
    grid-column: span 4;
    grid-row: span 3;
  }

  .project-tile.tall,
  .project-tile.portrait {
    grid-column: span 2;
    grid-row: span 4;
  }

  .project-tile.medium-landscape,
  .project-tile.square,
  .project-tile.small-landscape {
    grid-column: span 3;
    grid-row: span 3;
  }

  .feed-project {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-info {
    position: static;
    max-width: 720px;
  }

  .project-info h1 {
    max-width: 18ch;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 56px;
  }

  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 9px;
    min-height: var(--header-height);
    padding: 12px;
  }

  .header-line {
    text-align: left;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 13px;
  }

  main {
    padding-inline: 4px;
  }

  .about-layout,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(108px, 32vw);
    gap: 6px;
  }

  .project-tile,
  .project-tile.large-landscape,
  .project-tile.medium-landscape,
  .project-tile.small-landscape,
  .project-tile.portrait,
  .project-tile.square,
  .project-tile.wide,
  .project-tile.tall {
    grid-column: span 1;
    grid-row: span 2;
    min-height: 0;
  }

  .project-tile:nth-child(3n + 1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .project-tile figcaption {
    opacity: 1;
    padding: 10px;
  }

  .feed-meta {
    font-size: 0.7rem;
  }

  .project-feed {
    gap: 72px;
  }

  .embed-shell.is-vertical {
    max-width: 100%;
  }

  dl div {
    grid-template-columns: 68px minmax(0, 1fr);
  }
}
