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

/* Color tokens live in theme.css (loaded before this file) so the site can
   follow the OS light/dark preference and a manual toggle. */

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}

main {
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

h1 {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Inline link in subtitle — feels like emphasis, not a button.
   Same color as surrounding text + thin blue underline. */
.subtitle a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.subtitle a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

.links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.links a {
  color: var(--link);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.links a::before {
  content: "→ ";
  color: var(--muted);
  transition: color 0.15s;
}

.links a:hover { color: var(--link-hover); }
.links a:hover::before { color: var(--link); }

@media (max-width: 480px) {
  html { font-size: 16px; }
  body {
    align-items: flex-start;
    padding: 2rem 1.25rem;
  }
  main { gap: 2rem; }
  h1 { font-size: 1.5rem; }
  .subtitle { font-size: 0.95rem; line-height: 1.65; }
  .links a {
    font-size: 1rem;
    padding: 1.1rem 0;       /* 44px+ touch target */
  }
}

/* ── Hero page (root index) ──────────────────────────────────────────────
   Panoramic 4:1 twilight-array video as a banner across the top of the
   page, sized to its native aspect (no upscaling). Content stack sits
   below. Reduced-motion users see the still poster banner. */

body.hero-page {
  background: var(--hero-bg);
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  display: block;               /* override flex centering from body{} */
  min-height: 100vh;
}

.hero-banner {
  position: relative;
  width: 100%;
  /* Native 4:1 aspect — no upscale beyond the source's own resolution.
     Source is 1216×304; capping max-width at 1280px keeps the video
     within ~5% of native pixel-for-pixel, so compression artifacts in
     the H.264 source don't get amplified by browser upscaling. On wide
     viewports the page background fills the sides — reads as deliberate
     film-strip framing, not as a missing piece. */
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 1216 / 304;
  max-height: 38vh;             /* never let the banner dominate the page */
  overflow: hidden;
  background: var(--hero-bg);
}

.hero-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* Slight cool-shift so the page type below stays the focal point. */
  filter: saturate(0.95) brightness(0.85);
}

/* Soft fade at the bottom of the banner — visually attaches it to the
   content below without a hard line. */
.hero-banner-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 25%;
  background: linear-gradient(180deg, transparent 0%, var(--hero-bg) 100%);
  pointer-events: none;
}

main.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 1.5rem 5rem;
  gap: 2.25rem;
  max-width: none;              /* override the body{} 600 cap */
}

main.hero header {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

/* Stardew-style portrait — small circular avatar above the H1. Sized
   modestly so it sits as identity-anchor, not feature. Subtle ring +
   soft shadow keeps it from feeling pasted-in over the page. */
.hero-avatar {
  display: inline-block;
  margin-bottom: 1.25rem;
}

.hero-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 1px solid var(--hero-avatar-ring);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 8px 24px -8px rgba(0, 0, 0, 0.5);
  background: var(--hero-avatar-bg);
}

main.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.95rem;
  color: var(--hero-h1);
}

main.hero .subtitle {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

main.hero .bio {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto;
}

/* Hero nav — horizontal slash-separated links sitting on the page. */
nav.links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  border: none;
  gap: 0;
}

nav.links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: none;
  position: relative;
  transition: color 0.15s;
}

nav.links a::before { content: none; }

nav.links a + a::before {
  content: "·";
  color: var(--hero-dot);
  position: absolute;
  left: -3px;
  pointer-events: none;
}

nav.links a:hover {
  color: var(--hero-h1);
}

@media (max-width: 600px) {
  .hero-banner {
    max-height: 30vh;
  }
  main.hero {
    padding: 2.5rem 1.25rem 3rem;
  }
  main.hero h1 { font-size: 1.65rem; }
  .hero-avatar img { width: 80px; height: 80px; }
  main.hero .subtitle { font-size: 0.95rem; }
  main.hero .bio { font-size: 0.85rem; }
  nav.links { gap: 0.25rem; }
  nav.links a { padding: 0.6rem 0.8rem; font-size: 0.95rem; }
}

/* Honor reduced-motion — hide the autoplay video, still poster shows
   via the banner background. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-banner {
    background: url('/assets/twilight-array.jpg') center / cover no-repeat;
  }
}
