/* =========================================================
   Portfolio — shared styles
   Palette: white background, near-black text, muted grays
   Type: serif throughout (à la the reference site)
   ========================================================= */

:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #9a9a9a;
  --line: #e6e6e6;
  --bg: #ffffff;
  --max: 1180px;
  --gap: 28px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    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: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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;
  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 {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #ededed;
}

.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; }

.tile__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 14px 12px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.35;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tile:hover .tile__meta,
.tile:focus-visible .tile__meta { opacity: 1; }

.tile.is-empty .tile__meta {
  opacity: 1;
  color: var(--ink-soft);
  background: none;
}

.tile__platform { display: block; font-weight: 700; }
.tile__label { display: block; color: rgba(255, 255, 255, 0.85); }
.tile.is-empty .tile__label { color: var(--muted); }

.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 20px; font-size: 16px; }
  .wrap { padding: 0 20px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tile__meta { opacity: 1; } /* no hover on touch — always show */
  .tile:not(.is-empty) .tile__meta {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  }
}
