/* Dark, cinematic, minimal. Mobile first; wider screens are handled at the bottom. */

/*
 * Business card lettering: Copperplate. The font is licensed, so no font file is
 * shipped. These rules use the copy already on the visitor's device.
 */
@font-face {
  font-family: "Card";
  font-weight: 400;
  src: local("Copperplate"), local("Copperplate Gothic Light"), local("CopperplateGothic-Light");
}

@font-face {
  font-family: "Card";
  font-weight: 700;
  src: local("Copperplate Bold"), local("Copperplate-Bold"), local("Copperplate Gothic Bold"),
    local("CopperplateGothic-Bold");
}

:root {
  --bg: #111111;
  --surface: #1a1a1a;
  --line: #2e2e2e;
  --text: #f4f4f5;
  --muted: #b3b3bd;
  --accent: #ffb454;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-card: "Card", "Copperplate", "Copperplate Gothic", var(--font);
  --gutter: 1.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2 {
  font-family: var(--font-card);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 1rem + 3vw, 3.25rem);
  font-weight: 700;
}

h2 {
  margin: 3.5rem 0 1.25rem;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  font-weight: 700;
}

p {
  margin: 0 0 1.25rem;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 3rem 4rem;
}

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

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- header and footer ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-block: 0.875rem 0.5rem;
}

.brand {
  color: var(--text);
  font-family: var(--font-card);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-block;
  padding: 0.6rem 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-card);
  font-size: 1rem;
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  padding-block: 1.5rem;
}

.site-footer p {
  margin: 0;
}

/* ---------- bokeh bands, as on the business card ---------- */

.bokeh {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding-block: 2.5rem;
  background:
    linear-gradient(rgb(0 0 0 / 50%), rgb(0 0 0 / 50%)),
    url("images/bokeh.webp") center / cover no-repeat;
  text-align: center;
}

.bokeh h1 {
  margin: 0;
  color: #fff;
}

.bokeh-hero {
  min-height: 15rem;
}

.lockup {
  width: min(31rem, 100vw - 2.5rem);
}

/* ---------- home ---------- */

.reel {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.reel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.lead {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
  text-wrap: pretty;
  color: var(--muted);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.6;
}

/* ---------- about ---------- */

/* A narrow column in the middle of the page. The text inside stays left-aligned. */
.page-about .section {
  max-width: calc(42rem + 2 * var(--gutter));
}

.prose {
  max-width: 42rem;
}

.tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  max-width: 42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 100%;
  min-height: 3.5rem;
  padding: 1.1rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-card);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tags img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

/* ---------- work ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0;
  font-size: 0.95rem;
}

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

.card dd {
  margin: 0;
}

/* ---------- breakdown players ---------- */

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

/* Passes are stacked; only the active one shows. Nothing is cropped. */
.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}

.stage video.active {
  opacity: 1;
  pointer-events: auto;
}

.now {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 0.25rem;
  background: rgb(0 0 0 / 70%);
  color: #fff;
  font-family: var(--font-card);
  font-size: 0.9rem;
  pointer-events: none;
}

.now[hidden],
.passes[hidden] {
  display: none;
}

.passes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem 0;
}

.passes button {
  min-height: 2.75rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid #5c5c66;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font-card);
  font-size: 0.95rem;
  cursor: pointer;
}

.passes button:hover {
  border-color: var(--accent);
}

.passes .play {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* filled only for the pass that is looping */
.passes button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

/* ---------- resume ---------- */

.page-resume .section {
  text-align: center;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-card);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: #ffc677;
}

/* ---------- contact ---------- */

.contact-list {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  list-style: none;
}

.contact-list li {
  border-top: 1px solid var(--line);
}

.contact-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0;
  color: var(--text);
  text-decoration: none;
}

.contact-label {
  color: var(--muted);
  font-family: var(--font-card);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.contact-value {
  font-family: var(--font-card);
  font-size: clamp(0.95rem, 0.7rem + 1.2vw, 1.5rem);
  font-weight: 700;
}

.contact-list a:hover .contact-value {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- tablet and up ---------- */

@media (min-width: 768px) {
  :root {
    --gutter: 2.5rem;
  }

  .site-header .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.75rem;
  }

  nav ul {
    gap: 1.75rem;
  }

  .section {
    padding-block: 4rem 6rem;
  }

  .bokeh {
    min-height: 18rem;
  }

  .bokeh-hero {
    min-height: 22rem;
  }

}

/* ---------- desktop ---------- */

@media (min-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
