/* =========================================================
   Portfolio — shared styles
   Palette: white background, near-black text, muted grays
   Type: Newsreader (self-hosted variable serif) + Helvetica furniture
   ========================================================= */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #767676;        /* WCAG AA (4.5:1) on white */
  --muted-soft: #9a9a9a;   /* decorative only — not for text */
  --line: #e6e6e6;
  --bg: #ffffff;
  --max: 1180px;
  --gap: 28px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.58;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 1px;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Header / nav ---------- */

.site-header {
  padding: 42px 0 30px;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 34px;
}

.site-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.14em;
  margin: 0;
  white-space: nowrap;
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-family: var(--sans);
  font-size: 17px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--ink-soft); }

.site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Home ---------- */

.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  padding: 20px 0 90px;
  align-items: start;
}

.home__photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ededed;
}

.home__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.home__bio { max-width: 34em; }

.home__bio > :first-child { margin-top: 0; }

.home__bio p { margin: 0 0 1.15em; }

.home__bio a { text-underline-offset: 3px; }

/* ---------- Interior page heading ---------- */

.page-head {
  padding: 12px 0 34px;
}

.page-head h1 {
  font-weight: 500;
  font-size: 30px;
  margin: 0 0 10px;
}

.page-head p {
  margin: 0;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 18px;
}

/* ---------- Video grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding-bottom: 90px;
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(160deg, #e9e9e9, #cfcfcf);
  color: #fff;
}

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

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

.tile.is-empty img { display: none; }

/* Small platform tag, bottom-left. The video's headline is already burned
   into every thumbnail (and lives in the image's alt text), so the tag only
   carries what the picture doesn't: where the link goes. */
.tile__meta {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px 3px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.tile:hover .tile__meta { background: rgba(0, 0, 0, 0.82); }

.tile.is-empty .tile__meta {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
}

.tile__platform { display: block; }
.tile__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.tile:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}

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

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .wrap { padding: 0 28px; }
  .home {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 60px;
  }
  .home__photo { max-width: 440px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (max-width: 600px) {
  body { font-size: 18px; }
  .site-header { padding: 28px 0 20px; }
  .site-header .wrap { flex-direction: column; gap: 12px; }
  .site-title { font-size: 26px; }
  .site-nav { gap: 8px 18px; font-size: 16px; }
  .wrap { padding: 0 20px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .tile:hover img { transform: none; }
}
