/* Palette and type come from Luca's press kit (Luca_EPK.pdf): cream name and
   gold tagline on black, Bebas Neue over IBM Plex Sans. Colours were sampled
   from the PDF rendered at 300 dpi. */

@font-face {
  font-family: "Bebas Neue";
  src: url("fonts/bebas-neue-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-italic-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --stage: #000;
  --cream: #eee8df;
  --gold: #d2983d;

  --bg: #faf9f6;
  --ink: #141413;
  --muted: #5e5b55;
  --line: #e2ded6;
  --accent-text: #8a6020;
  --photo-bg: #e9e6e0;
  --error: #b3261e;
  color-scheme: light;

  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --text: "IBM Plex Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 64px;
  --radius: 2px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060706;
    --ink: #eee8df;
    --muted: #a8a399;
    --line: #262622;
    --accent-text: #d2983d;
    --photo-bg: #141412;
    --error: #f2a193;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060706;
  --ink: #eee8df;
  --muted: #a8a399;
  --line: #262622;
  --accent-text: #d2983d;
  --photo-bg: #141412;
  --error: #f2a193;
  color-scheme: dark;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html {
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

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

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
cite { font-style: italic; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--gold); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: #000;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(1240px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--cream);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.site-header.is-solid {
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  max-width: calc(1240px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wordmark {
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-top: 0.12em;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}
.site-header.is-solid .wordmark { visibility: visible; opacity: 1; }

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  margin-left: auto;
}
.nav a {
  font-family: var(--display);
  font-size: 1.3125rem;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.5rem 0 0.35rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--gold); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

@media (max-width: 520px) {
  .wordmark { display: none; }
  .nav { margin-left: 0; margin-right: auto; }
}

/* Hero: the press kit cover, built for the screen */

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--stage);
  color: var(--cream);
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0 38% 0 0;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent 98%);
  mask-image: linear-gradient(to right, #000 55%, transparent 98%);
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.hero__text {
  position: relative;
  align-self: center;
  justify-self: end;
  width: min(44%, 620px);
  margin-right: max(var(--gutter), calc((100vw - 1240px) / 2));
  padding-block: calc(var(--header-h) + 2rem) 3rem;
}

.hero__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(6rem, 14.5vw, 15rem);
  line-height: 0.84;
  letter-spacing: 0.005em;
}
.hero__name .line { display: block; overflow: hidden; padding-top: 0.06em; }
.hero__name .line > span { display: block; }

.hero__tagline {
  margin: 1.1rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: 0.2em;
  line-height: 1.2;
  color: var(--gold);
}
.hero__tagline::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 2px;
  margin-top: 1.1rem;
  background: var(--gold);
}

.hero__rep {
  margin: 1.5rem 0 0;
  color: color-mix(in srgb, var(--cream) 78%, transparent);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 1.5rem 0.55rem;
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 1.3125rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.button--gold { background: var(--gold); color: #000; }
.button--gold:hover { background: var(--cream); }
.button--outline { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cream) 55%, transparent); color: var(--cream); }
.button--outline:hover { box-shadow: inset 0 0 0 1px var(--cream); }

@media (max-width: 899px) {
  .hero { align-content: end; }
  .hero__photo {
    inset: 0 0 32% 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
  }
  .hero__photo img { object-position: 50% 12%; }
  /* Keeps the header readable over the light backdrop at the top of the photo */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 140px;
    background: linear-gradient(rgb(0 0 0 / 0.6), transparent);
    pointer-events: none;
  }
  .hero__text {
    justify-self: stretch;
    width: auto;
    margin: 0;
    padding: 45svh var(--gutter) 2.5rem;
  }
  .hero__name { font-size: clamp(5.5rem, 30vw, 10rem); }
}

/* One orchestrated entrance: the photo comes up out of black, then the name. */
@media (prefers-reduced-motion: no-preference) {
  .hero__photo img { animation: develop 1.6s ease-out both; }
  .hero__name .line > span { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__name .line:nth-child(1) > span { animation-delay: 0.35s; }
  .hero__name .line:nth-child(2) > span { animation-delay: 0.47s; }
  .hero__tagline, .hero__rep, .hero__actions { animation: fade 0.8s ease-out 0.9s both; }
}
@keyframes develop { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Sections */

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section + .section { border-top: 1px solid var(--line); }

.section__title {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.75rem, 8vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
}

.subhead {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--accent-text);
}

/* About */

.about__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}
.about__bio { max-width: 40rem; }
.about__bio p { margin: 0 0 1.25em; }
.about__bio p:last-child { margin-bottom: 0; }
.lead {
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
  line-height: 1.45;
  font-weight: 500;
}

.quote { margin: 0 0 2.5rem; }
.quote p {
  margin: 0;
  font-size: clamp(1.625rem, 2.6vw, 2.125rem);
  line-height: 1.25;
  font-weight: 500;
  color: var(--accent-text);
  text-indent: -0.4em;
}

.favorite { margin: 0 0 2.5rem; }
.favorite::before {
  content: "";
  display: block;
  width: 4.5rem;
  height: 2px;
  margin-bottom: 1.25rem;
  background: var(--gold);
}
.favorite figcaption {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.favorite blockquote { margin: 0.25rem 0 0; }
.favorite p {
  margin: 0;
  font-size: 1.1875rem;
  font-style: italic;
  color: var(--accent-text);
}

.facts { margin: 0; display: grid; gap: 1.25rem; }
.facts div { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.facts dt { font-size: 0.875rem; color: var(--muted); }
.facts dd { margin: 0.125rem 0 0; font-size: 1.125rem; }

/* Reel: straight after the hero, on the same black, so it reads as part of the top */

.reel {
  background: var(--stage);
  color: var(--cream);
  padding-block: clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}
.reel .section__title { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.reel + .section { border-top: 0; }
.reel .reel__fallback { color: color-mix(in srgb, var(--cream) 65%, transparent); }

.reel__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: var(--radius);
}
.reel__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel__play {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.reel__play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: opacity 0.3s;
}
.reel__play:hover img { opacity: 0.85; }
.reel__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem 0.75rem 1.3rem;
  border-radius: var(--radius);
  background: var(--gold);
  color: #000;
  font-family: var(--display);
  font-size: 1.625rem;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}
.reel__label svg { margin-top: -0.15em; }
.reel__length { opacity: 0.6; margin-left: 0.25rem; }
.reel__fallback { margin: 0.75rem 0 0; font-size: 0.9375rem; color: var(--muted); }

/* Resume */

.credits + .credits { margin-top: 3rem; }
.credits table { width: 100%; border-collapse: collapse; }
.credits tr { border-top: 1px solid var(--line); }
.credits tbody tr:last-child { border-bottom: 1px solid var(--line); }
.credits th, .credits td {
  padding: 0.9rem 1.5rem 0.9rem 0;
  text-align: left;
  vertical-align: baseline;
  font-weight: 400;
}
.credits th { width: 40%; }
.credits th cite { font-size: 1.1875rem; }
.credits td { width: 32%; }
.credits td:last-child { color: var(--muted); padding-right: 0; }
.note { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.9375rem; }

.resume__more { margin: 2rem 0 0; }

.training { margin-top: clamp(3.5rem, 7vw, 5rem); }
.training__group {
  margin: 2rem 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.training .subhead + .training__group { margin-top: 0; }
.training table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.training tr { border-top: 1px solid var(--line); }
.training tbody tr:last-child { border-bottom: 1px solid var(--line); }
.training th, .training td {
  padding: 0.6rem 1.5rem 0.6rem 0;
  text-align: left;
  vertical-align: baseline;
  font-weight: 400;
}
.training th { width: 40%; font-weight: 500; }
.training td { width: 32%; }
.training td:last-child { color: var(--muted); padding-right: 0; }

@media (max-width: 640px) {
  .credits table, .credits tbody, .credits tr, .credits th, .credits td,
  .training table, .training tbody, .training tr, .training th, .training td { display: block; width: auto; }
  .credits tr { padding: 0.85rem 0; }
  .training tr { padding: 0.6rem 0; }
  .credits th, .credits td, .training th, .training td { padding: 0; }
  .credits td:empty, .training td:empty { display: none; }
  .credits td { font-size: 1rem; }
}

.skills { margin-top: clamp(3.5rem, 7vw, 5rem); }
.skills__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.skills__list li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
}

/* Photos */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  margin: -0.5rem 0 clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.tabs[hidden] { display: none; }
.tabs button {
  padding: 0.5rem 0 0.4rem;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--display);
  font-size: 1.625rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
@media (hover: hover) { .tabs button:hover { color: var(--ink); } }
.tabs__count { font-family: var(--text); font-size: 0.875rem; letter-spacing: 0; font-variant-numeric: tabular-nums; vertical-align: 0.35em; color: var(--muted); }

/* Without script every set shows, each under its own heading; with it, one at a time. */
.photo-set + .photo-set { margin-top: clamp(3rem, 6vw, 4.5rem); }
.has-tabs .photo-set + .photo-set { margin-top: 0; }
.has-tabs .photo-set__title {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.photo-credit { margin: 1rem 0 0; font-size: 0.9375rem; color: var(--muted); }

.headshots, .stills { list-style: none; margin: 0; padding: 0; display: grid; }
.headshots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
}
@media (min-width: 700px) { .headshots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .headshots { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.headshots button, .stills button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--photo-bg);
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius);
}
.headshots img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 25%;
}

.stills {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(8px, 1.2vw, 16px);
}
@media (min-width: 700px) { .stills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stills figure { margin: 0; }
.stills img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.stills figcaption { margin-top: 0.6rem; font-size: 0.9375rem; color: var(--muted); }
.stills figcaption cite { color: var(--ink); margin-right: 0.35rem; }

.headshots button img, .stills button img { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) {
  .headshots button:hover img, .stills button:hover img { transform: scale(1.025); }
}

/* Contact */

.contact__form { max-width: 46rem; }

.message-form { display: grid; gap: 1rem; }
.message-form__row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .message-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.message-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.message-form .button { justify-self: start; border: 0; cursor: pointer; }
.message-form .button:disabled { opacity: 0.6; cursor: default; }
.input { display: grid; gap: 0.35rem; }
.input span { font-size: 0.875rem; font-weight: 500; }
.input input, .input textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 60%, var(--photo-bg));
  font: inherit;
  font-size: 1rem;
  color: inherit;
}
.input textarea { resize: vertical; line-height: 1.5; }
.input input:focus, .input textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.form-status { margin: 0; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }
.form-status.is-done { font-size: 1.1875rem; font-weight: 500; color: var(--accent-text); }

.social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

/* Footer */

.site-footer {
  background: var(--stage);
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  padding-block: 2.5rem;
  font-size: 0.9375rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
}
.site-footer p { margin: 0; }
.site-footer__line {
  font-family: var(--display);
  font-size: 1.375rem;
  letter-spacing: 0.2em;
  color: var(--gold);
}
@media (max-width: 640px) {
  .site-footer__line .sep { display: none; }
  .site-footer__line span:not(.sep, .visually-hidden) { display: block; }
}

/* Photo viewer */

.viewer {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
}
.viewer::backdrop { background: rgb(0 0 0 / 0.94); }
.viewer[open] { display: grid; place-items: center; }
.viewer__figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 64px clamp(16px, 8vw, 96px) 24px;
}
.viewer__img {
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.viewer__caption { font-size: 0.9375rem; font-style: italic; min-height: 1.5em; }
.viewer__button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.4);
  cursor: pointer;
}
.viewer__button:hover { background: rgb(255 255 255 / 0.12); }
.viewer__close { top: 12px; right: 12px; }
.viewer__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.viewer__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: no-preference) {
  .viewer[open] .viewer__img { animation: fade 0.25s ease-out; }
}

/* 404 */

.not-found { min-height: 100vh; display: grid; align-items: center; background: var(--stage); color: var(--cream); }
