/* Theme: change these variables to restyle the whole site */
:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #a3a8a8;
  --line: #2a2c2c;
  --band: #8e9494;
  --band-text: #000000;
  --gutter: clamp(0.75rem, 1.6vw, 1.5rem);
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
}

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

.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg);
  z-index: 20;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem var(--gutter);
}

.nav a {
  text-decoration: none;
}

.nav-brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links,
.nav-side {
  display: flex;
  gap: clamp(1rem, 2.6vw, 2.75rem);
  font-size: 1rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-side a:hover {
  color: var(--muted);
}

.nav-toggle {
  display: none;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--text);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 62rem) {
  .nav {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links,
  .nav-side {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    font-size: 1.5rem;
  }

  .nav.is-open .nav-links,
  .nav.is-open .nav-side {
    display: flex;
  }

  .nav-links a,
  .nav-side a {
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
  }
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(88vh, 60rem);
  margin: 0 var(--gutter);
  padding: 4rem 1rem;
  overflow: hidden;
  text-align: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero > :not(.hero-media) {
  position: relative;
}

.hero h1 {
  max-width: 14em;
  font-size: clamp(2.6rem, 8vw, 7.25rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 3rem;
  margin-top: 2.5rem;
}

.hero-tag {
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero-meta .mono {
  font-size: clamp(0.85rem, 1.4vw, 1.2rem);
  text-decoration: none;
}

/* Project page header: text on the left, cover photo on the right */
.hero--project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto auto 1fr;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  justify-items: start;
  min-height: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0;
  overflow: visible;
  text-align: left;
}

.hero--project > * {
  grid-column: 1;
}

.hero--project > .mono {
  grid-row: 2;
}

.hero--project h1 {
  grid-row: 3;
  margin-top: 0.75rem;
  font-size: clamp(2.2rem, 4.4vw, 4.75rem);
}

.hero--project .hero-lead {
  grid-row: 4;
}

.hero--project .hero-media {
  position: static;
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  height: auto;
  aspect-ratio: 4 / 3;
  opacity: 1;
}

@media (max-width: 50rem) {
  .hero--project {
    display: flex;
    align-items: stretch;
    gap: 0;
  }

  .hero--project .hero-media {
    margin-bottom: 1.5rem;
  }
}

.hero-lead {
  max-width: 34em;
  margin-top: 1rem;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.25;
}

/* Project tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  padding: var(--gutter);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #101212;
  text-decoration: none;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.tile:hover img {
  transform: scale(1.04);
}

.tile::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.tile--empty {
  background: repeating-linear-gradient(135deg, #131515 0 2px, #0a0b0b 2px 22px);
}

.tile-label {
  position: absolute;
  z-index: 1;
  left: 1.5rem;
  right: 3.5rem;
  bottom: 1.25rem;
}

.tile-title {
  display: block;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tile-role {
  margin-left: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.tile-sub {
  display: block;
  margin-top: 0.3rem;
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  line-height: 1.25;
}

.tile-arrow {
  position: absolute;
  z-index: 1;
  right: 1.5rem;
  bottom: 1.25rem;
  font-size: 1.5rem;
}

.tile-arrow,
.button span {
  font-variant-emoji: text;
}

@media (max-width: 40rem) {
  .tile-arrow,
  .button span[aria-hidden] {
    display: none;
  }
}

.tile--wide {
  aspect-ratio: auto;
  min-height: 22rem;
  margin: var(--gutter);
}

@media (max-width: 62rem) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 40rem) {
  .tiles {
    grid-template-columns: 1fr;
  }
}

/* Bands (about, experience, contact) */
.band {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 2rem var(--gutter);
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  border-top: 1px solid var(--line);
}

.band--grey {
  border-top: 0;
  background: var(--band);
  color: var(--band-text);
}

.band h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.band-kicker {
  margin-top: 1.25rem;
}

.band-body > p {
  max-width: 38em;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.35;
}

.band-body > p + p {
  margin-top: 1em;
}

@media (max-width: 50rem) {
  .band {
    grid-template-columns: 1fr;
  }
}

/* Rows (experience, facts) */
.rows > li {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 0.25rem 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid currentColor;
}

.rows > li > :only-child {
  grid-column: 1 / -1;
}

.rows strong {
  display: block;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.rows .mono {
  text-align: right;
}

@media (max-width: 40rem) {
  .rows > li {
    grid-template-columns: 1fr;
  }

  .rows .mono {
    text-align: left;
  }
}

/* Big buttons */
.buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--gutter);
  margin-top: 2rem;
}

.button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
  padding: 1rem 1.5rem;
  border: 1px solid currentColor;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}

.button:hover {
  background: var(--text);
  color: var(--bg);
}

.band--grey .button:hover {
  background: var(--band-text);
  color: var(--band);
}

/* Project pages */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0 var(--gutter);
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) 0;
}

.stats > div {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--text);
}

.stats dd {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stats dt {
  margin-top: 0.6rem;
  color: var(--muted);
}

.points > li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.35;
}

.gallery {
  columns: 2;
  column-gap: var(--gutter);
  max-width: 78%;
  margin: 0 auto;
  padding: var(--gutter);
}

.gallery figure {
  break-inside: avoid;
  margin-bottom: var(--gutter);
}

.gallery img,
.gallery video {
  width: 100%;
  height: auto;
}

.gallery .contain img {
  background: #ffffff;
}

.gallery figcaption {
  padding-top: 0.6rem;
  color: var(--muted);
}

@media (max-width: 62rem) {
  .gallery {
    max-width: none;
  }
}

@media (max-width: 40rem) {
  .gallery {
    columns: 1;
  }
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

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