:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --ink: #161616;
  --muted: #66625b;
  --line: #d8d4ca;
  --media-bg: #e7e2d8;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11110f;
  --ink: #f0eee8;
  --muted: #aaa49a;
  --line: #302f2b;
  --media-bg: #1b1b18;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  transition: background 160ms ease, color 160ms ease;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

img,
video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--media-bg);
}

video {
  background: #111;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  color: var(--muted);
}

nav a {
  text-decoration: none;
}

.theme-toggle {
  appearance: none;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  line-height: 1;
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-sun,
:root[data-theme="dark"] .icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

main {
  padding: 0 24px 80px;
}

.intro,
.showreel,
.project,
.play,
.about {
  padding: 48px 0;
}

.intro {
  max-width: 720px;
}

.eyebrow,
.project-number {
  margin: 0 0 12px;
  color: var(--muted);
}

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
  font-size: 16px;
}

h1,
h2,
h3,
.brand,
dd {
  font-weight: 700;
}

h1,
h2 {
  margin-bottom: 16px;
}

h3 {
  margin: 28px 0 8px;
}

p {
  max-width: 760px;
  color: var(--ink);
}

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

.project-copy {
  position: sticky;
  top: 24px;
  align-self: start;
  max-width: 760px;
}

.meta {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin: 0 0 28px;
  padding: 16px 0;
}

.meta div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

.media-stack {
  display: grid;
  gap: 24px;
  width: 100%;
}

.media-grid {
  display: grid;
  gap: 24px;
}

.media-grid.two {
  grid-template-columns: 1fr;
}

.media-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.media-grid.compact img {
  height: auto;
}

.about {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.play {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
}

.play-copy {
  position: sticky;
  top: 24px;
  align-self: start;
  max-width: 760px;
}

.play-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.play-item {
  min-height: 320px;
  padding: 0;
}

.about-copy {
  position: sticky;
  top: 24px;
  align-self: start;
  max-width: 760px;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 16px;
  }

  main {
    padding: 0 16px 64px;
  }

  .intro,
  .showreel,
  .project,
  .play,
  .about {
    padding: 36px 0;
  }

  .meta div {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

@media (max-width: 900px) {
  .project,
  .play,
  .about {
    grid-template-columns: 1fr;
  }

  .project-copy,
  .play-copy,
  .about-copy {
    position: static;
  }

  .play-list {
    grid-template-columns: 1fr;
  }
}
