/* ============================================================
   FONTS  (self-hosted .woff2 from /assets/fonts)
   ============================================================ */
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainLight.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainLightItalic.woff2") format("woff2");
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainRegular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainRegularItalic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainMedium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainMediumItalic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainUltrabold.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-PlainUltraboldItalic.woff2") format("woff2");
  font-weight: 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "PP Eiko";
  src: url("../assets/fonts/PPEiko-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Eiko";
  src: url("../assets/fonts/PPEiko-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Eiko";
  src: url("../assets/fonts/PPEiko-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Eiko";
  src: url("../assets/fonts/PPEiko-MediumItalic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* palette */
  --base-dark: #111;
  --base-dark-overlay: rgba(255, 255, 255, 0.03);
  --base-light: #efefef;
  --main-color: #fc0;

  /* ---- MODULAR GRID ---- tweak these to rescale the whole site */
  --grid-cols: 4;          /* number of columns in the base grid          */
  --grid-gap: 5px;         /* gutter between every tile                    */
  --grid-max: 1764px;      /* max canvas width                            */
  --page-pad-x: 50px;      /* outer page padding (left/right)             */
  --page-pad-y: 70px;      /* outer page padding (top/bottom)             */

  /* ---- TILE GEOMETRY ---- */
  --tile-height: 703px;    /* height of a standard content tile           */
  --tile-bar-height: 92px; /* height of a section-header bar              */
  --tile-radius: 16px;     /* corner radius of every tile                 */
  --tile-pad: 35px;        /* inner padding of every tile                 */

  /* ---- MOTION ---- */
  --reveal-dur: 0.2s;      /* opacity fade per tile (0 -> 1)              */
  --reveal-step: 0.09s;    /* stagger between sequential tiles            */

  /* fluid scale factor applied to fixed type sizes below desktop */
  --fs: 1;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base-dark);
  color: var(--base-light);
  font-family: "Neue Machina", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   PAGE + MODULAR GRID
   ============================================================ */
.page {
  display: flex;
  justify-content: center;
  padding: var(--page-pad-y) var(--page-pad-x);
}

.layout {
  width: 100%;
  max-width: var(--grid-max);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: var(--grid-gap);
  align-content: start;
}

/* a grid nested inside the main grid that itself spans full width */
.subgrid { gap: var(--grid-gap); }

/* column spans -> drive the modular sizing */
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

/* base tile */
.tile {
  position: relative;
  min-height: var(--tile-height);
  padding: var(--tile-pad);
  border-radius: var(--tile-radius);
  background: var(--base-dark-overlay);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   REVEAL ANIMATION  (opacity 0 -> 1 over --reveal-dur, staggered)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--reveal-dur) ease,
    transform calc(var(--reveal-dur) * 2.4) cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * var(--reveal-step));
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero { justify-content: flex-start; }

.hero__watermark {
  position: absolute;
  top: 50%;
  right: -6%;
  width: 70%;
  transform: translateY(-50%);
  opacity: 0.04;
  pointer-events: none;
  animation: floaty 9s ease-in-out infinite;
}
.hero__watermark img { width: 100%; }

.hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.hero__logo { display: block; width: 132px; }
.hero__logo img {
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}
.hero__logo:hover img {
  transform: scale(1.04) rotate(-1deg);
  filter: drop-shadow(0 0 14px rgba(255, 204, 0, 0.35));
}

.hero__social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: calc(24px * var(--fs));
  line-height: 1.5;
  color: #fff;
}
.hero__social a {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s ease, transform 0.25s ease;
}
.hero__social a:hover { color: var(--main-color); transform: translateX(-3px); }

.hero__body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.hero__title {
  margin: 0 0 22px;
  font-weight: 800;
  font-size: calc(48px * var(--fs));
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.hero__lead {
  margin: 0;
  max-width: 931px;
  font-size: calc(40px * var(--fs));
  line-height: 1.25;
}
.hero__lead .hl { color: var(--main-color); }

.hero__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.hero__nav a {
  font-size: calc(32px * var(--fs));
  line-height: 1.5;
  color: var(--main-color);
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hero__nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 6px;
  height: 2px;
  background: var(--main-color);
  transition: right 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero__nav a:hover { transform: translateX(-4px); }
.hero__nav a:hover::after { right: 0; }

/* ============================================================
   SECTION BARS
   ============================================================ */
.section-bar {
  min-height: var(--tile-bar-height);
  flex-direction: row;
  align-items: center;
  gap: 38px;
  padding: 0 var(--tile-pad);
  scroll-margin-top: 20px;
}
.section-bar__arrow {
  width: 30px;
  height: auto;
  animation: bob 2.4s ease-in-out infinite;
}
.section-bar__label {
  margin: 0;
  font-weight: 400;
  font-size: calc(36px * var(--fs));
  line-height: 1.5;
  color: var(--base-light);
}

/* ============================================================
   WORK / PLAY CARDS  (rendered from JS data)
   ============================================================ */
.media-card { padding: var(--tile-pad); cursor: pointer; }

.media-card__art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.001); /* avoid sub-pixel edge gaps */
  transition: filter 0.45s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}
.media-card__art--contain { background-size: contain; }

/* brighten image slightly on hover */
.media-card:hover .media-card__art { filter: brightness(1.14); transform: scale(1.03); }

/* blurred backdrop variant (e.g. King's League) */
.media-card__art--blur { filter: blur(5px); transform: scale(1.08); }
.media-card:hover .media-card__art--blur { filter: blur(5px) brightness(1.14); transform: scale(1.1); }

.media-card__tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.media-card__tint--top {
  background: linear-gradient(to top, rgba(0,0,0,0) 20%, #000 92%);
}
.media-card__tint--solid { background: rgba(93, 48, 122, 0); }

.media-card__logo {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 46%;
  max-width: 360px;
  height: auto;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.media-card:hover .media-card__logo { transform: translate(-50%, -50%) scale(1.04); }

.media-card__info {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 10px;
  width: 100%;
  font-size: calc(16px * var(--fs));
  line-height: 1.5;
}
.media-card__info .t { flex: 0 0 41%; }
.media-card__info .m { flex: 1 1 0; text-align: right; min-width: 0; }
.media-card--dark .media-card__info { color: var(--base-dark); }
.media-card--light .media-card__info { color: var(--base-light); }

/* ============================================================
   ABOUT
   ============================================================ */
.card-kicker {
  position: relative;
  z-index: 2;
  margin: 0 0 70px;
  font-size: calc(16px * var(--fs));
  line-height: 1.5;
  color: var(--base-light);
}
.card-kicker--dark { color: var(--base-dark); }

.about-bio { color: var(--base-dark); }
.about-bio__art { position: absolute; inset: -4% 0 -6%; z-index: 0; }
.about-bio__art img { width: 100%; height: 100%; object-fit: cover; }
.about-bio .card-kicker, .about-bio__copy { position: relative; z-index: 2; }
.about-bio__copy {
  display: flex;
  flex-direction: column;
  gap: 1em;
  max-width: 386px;
  font-size: calc(16px * var(--fs));
  line-height: 1.5;
}
.about-bio__copy p { margin: 0; }

.about-card__copy {
  display: flex;
  flex-direction: column;
  gap: 1em;
  max-width: 351px;
  font-size: calc(16px * var(--fs));
  line-height: 1.5;
}
.about-card__copy p { margin: 0; }

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  max-width: 339px;
}
.skill-icons img {
  width: 59px;
  height: 59px;
  border-radius: 12px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-icons img:hover { transform: translateY(-4px) scale(1.06); }

.facts {
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 351px;
}
.facts__row { margin: 0; }
.facts dt { font-size: calc(16px * var(--fs)); line-height: 1.5; }
.facts dd {
  margin: 0;
  font-weight: 800;
  color: var(--main-color);
  font-size: calc(18px * var(--fs));
  line-height: 1.5;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-card { gap: 30px; }

.contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 43px;
  padding: 0 60px;
  width: 100%;
}
.contact-form__row {
  display: flex;
  align-items: center;
  gap: 26px;
}
.contact-form__row--top { align-items: flex-start; }
.contact-form__row label {
  flex: 0 0 173px;
  font-size: calc(32px * var(--fs));
  line-height: 1.5;
  color: var(--base-light);
}
.contact-form__row--top label { padding-top: 16px; }
.field {
  flex: 1;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 16px 32px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field:focus-within {
  border-color: var(--main-color);
  box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.12);
}
.field input,
.field textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: calc(24px * var(--fs));
  line-height: 1.5;
  resize: none;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.45); }
.field input:focus, .field textarea:focus { outline: none; }
.field--area {
  border-radius: 24px;
  min-height: 194px;
}
.field--area textarea { min-height: 162px; }

.contact-form__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.contact-form__feedback {
  flex: 1;
  margin: 0;
  min-width: 0;
  text-align: center;
  font-size: calc(16px * var(--fs));
  line-height: 1.5;
  color: #fff;
}
.contact-form__feedback[hidden] { display: none; }
.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.btn.is-loading { opacity: 0.75; cursor: wait; }
.btn--submit {
  flex-shrink: 0;
  margin-left: auto;
}
.btn {
  border: none;
  cursor: pointer;
  background: var(--main-color);
  color: var(--base-dark);
  font-family: inherit;
  font-size: calc(24px * var(--fs));
  line-height: 1.5;
  padding: 16px 59px;
  border-radius: 243px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, filter 0.25s ease;
}
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 204, 0, 0.25); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

/* Footer card */
.footer-card { gap: 10px; }
.footer-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.footer-card__top .hero__logo { width: 132px; }
.footer-card__nav {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.footer-card__nav a {
  font-size: calc(32px * var(--fs));
  line-height: 1.5;
  color: var(--main-color);
  transition: transform 0.25s ease;
}
.footer-card__nav a:hover { transform: translateX(-4px); }
.footer-card__sig { width: 40px; height: auto; margin-top: 14px; align-self: flex-end; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-52%) translateX(-1.5%); }
}

/* ============================================================
   RESPONSIVE  — rescale the modular grid at breakpoints
   ============================================================ */

/* Fluid type scaling between ~1764px and ~1100px */
@media (max-width: 1500px) { :root { --fs: 0.9; --tile-height: 620px; } }
@media (max-width: 1200px) { :root { --fs: 0.82; --tile-height: 560px; --page-pad-x: 30px; } }

/* collapse 4 cols -> 2 cols */
@media (max-width: 1024px) {
  :root { --grid-cols: 2; --fs: 0.9; --tile-height: 520px; }
  .span-3, .span-4 { grid-column: span 2; }
  .section-bar { min-height: 76px; }
  .contact-form { padding: 0; gap: 28px; }
  .contact-form__actions {
    flex-wrap: wrap;
  }
  .contact-form__feedback {
    flex: 1 1 100%;
    order: 3;
    text-align: center;
  }
  .hero__lead { font-size: calc(30px * var(--fs)); }
}

/* single column */
@media (max-width: 620px) {
  :root { --grid-cols: 1; --fs: 1; --page-pad-x: 16px; --page-pad-y: 28px; --tile-pad: 22px; --tile-height: 78vw; }
  .span-1, .span-2, .span-3, .span-4 { grid-column: span 1; }
  .hero { min-height: auto; }
  .hero__body { flex-direction: column; align-items: flex-start; gap: 28px; }
  .hero__nav { flex-direction: row; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
  .hero__title { font-size: 30px; }
  .hero__lead { font-size: 20px; }
  .hero__nav a, .footer-card__nav a, .hero__social { font-size: 20px; }
  .contact-card { min-height: auto; }
  .contact-form__row { flex-direction: column; align-items: stretch; gap: 10px; }
  .contact-form__row label { flex-basis: auto; font-size: 20px; }
  .field input, .field textarea, .btn { font-size: 18px; }
  .media-card { min-height: 70vw; }
  .about-bio, .about-card, .contact-card, .footer-card { min-height: auto; }

  /* profile: white scrim between image and text for legibility */
  .about-bio::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
  }
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 5% 100px;
  background: var(--base-dark);
  overflow-x: hidden;
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.not-found__graphic {
  width: 100%;
  margin: 0;
}
.not-found__graphic img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.not-found__oops {
  margin: 32px 0 0;
  font-family: "Neue Machina", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.5;
  color: var(--base-light);
}

.not-found__subtitle {
  margin: 0;
  font-family: "PP Eiko", Georgia, serif;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.5;
  color: var(--base-light);
}

.not-found__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
  padding: 16px 59px;
  min-height: 92px;
  width: auto;
  max-width: 100%;
  margin: clamp(48px, 8vh, 120px) 0 0;
  background: var(--main-color);
  border-radius: 16px;
  color: var(--base-dark);
  font-family: "Neue Machina", system-ui, sans-serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, filter 0.25s ease;
}
.not-found__home:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 204, 0, 0.25);
  filter: brightness(1.05);
}
.not-found__home-arrow {
  display: block;
  width: 30px;
  height: 28px;
  flex: 0 0 30px;
  transform: rotate(90deg);
  object-fit: contain;
}

@media (max-width: 620px) {
  .page-404 { padding: 28px 5% 60px; }
  .not-found__home {
    gap: 20px;
    padding: 16px 28px;
    min-height: 72px;
    white-space: normal;
    text-align: center;
  }
  .not-found__home-arrow {
    width: 24px;
    height: 22px;
    flex-basis: 24px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__watermark, .section-bar__arrow { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
