/* ============================================================
   whiskerless.life v6 — "five years"
   mobile-first · night sky & instant film
   ============================================================ */

:root {
  --bg: #060a24;
  --bg-deep: #03040f;
  --ink: #f0f4ff;
  --ink-dim: #c4cfee;
  --ink-faint: #8b99c4;
  --brand: #8ea6ff;
  --gold: #f5b95f;
  --gold-deep: #d18a3c;
  --amber: #f2b263;
  --amber-deep: #d98a3d;
  --teal: #6fd3ef;
  --teal-deep: #3d9fd9;
  --accent: var(--brand);
  --accent-deep: #3350d6;
  --card: rgba(255, 255, 255, 0.045);
  --card-strong: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.1);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 18px 44px rgba(1, 3, 14, 0.55);
  --shadow-pop: 0 24px 60px rgba(1, 3, 14, 0.7);
  --font-display: 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', Tahoma, sans-serif;
  --font-hand: 'Caveat', 'Bradley Hand', cursive;
  /* instant film */
  --film: #fffef8;
  --film-ink: #4a3f2e;
  --film-faint: #8a7b60;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: radial-gradient(130% 90% at 50% -10%, #101c56 0%, var(--bg) 52%, var(--bg-deep) 100%) fixed;
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body[data-page="noodles"] { --accent: var(--amber); --accent-deep: var(--amber-deep); }
body[data-page="koda"]    { --accent: var(--teal);  --accent-deep: var(--teal-deep); }

#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* the old site's backdrop line art, faintly glowing over the night sky */
.bg-emblem {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.3;
}
.bg-emblem img {
  width: min(86vw, 560px);
  max-height: 82vh;
  max-height: 82dvh;
  object-fit: contain;
  filter: drop-shadow(0 8px 40px rgba(142, 166, 255, 0.22));
}

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

/* ---------------- nav ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: rgba(6, 10, 36, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.wordmark span { color: var(--brand); }

.nav-links {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--card-strong); }
body[data-page="home"]    .nav-links a[data-nav="home"],
body[data-page="noodles"] .nav-links a[data-nav="noodles"],
body[data-page="koda"]    .nav-links a[data-nav="koda"] {
  color: var(--ink);
  background: var(--card-strong);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

/* ---------------- layout ---------------- */
.page {
  max-width: 1020px;
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding: 1.4rem 1rem 2.4rem;
}

/* ---------------- hero ---------------- */
.hero {
  text-align: center;
  padding: 2.6rem 1rem 0.6rem;
}

.hero-kicker {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--gold);
  transform: rotate(-2deg);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 9vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}
.hero-title span {
  background: linear-gradient(100deg, var(--brand) 0%, var(--teal) 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-tagline {
  color: var(--ink-dim);
  max-width: 34rem;
  margin: 0.85rem auto 0;
  font-size: 0.98rem;
}

/* ---------------- character picker ---------------- */
.picker { text-align: center; padding-top: 0.4rem; }

.picker-heading {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--ink-dim);
  transform: rotate(-1.5deg);
  margin-bottom: 1.1rem;
}

.picker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  justify-items: center;
}

.picker-card {
  position: relative;
  display: block;
  width: min(78vw, 300px);
  background: var(--film);
  padding: 0.7rem 0.7rem 0.5rem;
  border-radius: 4px;
  box-shadow: 0 16px 38px rgba(1, 3, 14, 0.6);
  text-decoration: none;
  color: var(--film-ink);
  transform: rotate(var(--tilt, -2deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.picker-card:nth-child(even) { --tilt: 2deg; }
.picker-card:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-pop);
}

/* washi tape holding each portrait up */
.picker-card::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 96px;
  height: 28px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(242, 178, 99, 0.72);
  box-shadow: 0 2px 5px rgba(1, 3, 14, 0.25);
  z-index: 2;
}
.picker-card.theme-koda::before { background: rgba(111, 211, 239, 0.65); transform: translateX(-50%) rotate(2.5deg); }

.picker-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: #eee7d6;
  border-radius: 2px;
}
.picker-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.picker-card:hover .picker-photo img { transform: scale(1.06); }

.picker-caption { padding: 0.55rem 0.2rem 0.35rem; }
.picker-name {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1.05;
}
.picker-role { font-family: var(--font-hand); font-size: 1.15rem; color: var(--film-faint); }

.picker-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-deep);
}
.picker-card.theme-noodles { --accent-deep: var(--amber-deep); }
.picker-card.theme-koda    { --accent-deep: var(--teal-deep); }

/* ---------------- scroll hint ---------------- */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.6rem 0 0.4rem;
  color: var(--ink-faint);
}
.scroll-hint-text {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  transform: rotate(-1deg);
}
.scroll-hint-arrow { font-size: 0.9rem; animation: hint-bounce 1.8s ease-in-out infinite; }

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%      { transform: translateY(7px); opacity: 1; }
}

/* ============================================================
   THE REEL — instant photos drifting in as you scroll
   ============================================================ */
.reel {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  padding: 1.2rem 0 0.5rem;
  /* flying-in photos must never cause horizontal scroll */
  overflow-x: hidden;
  overflow-x: clip;
}

/* photos alternate sides, and fly in from that side */
.reel .polaroid { --fx: 0px; }
.reel .polaroid:nth-child(odd)  { align-self: flex-start; margin-left: 2%; --fx: -56px; }
.reel .polaroid:nth-child(even) { align-self: flex-end;  margin-right: 2%; --fx: 56px; }
/* the unknown frame stays centred and rises straight up */
.reel .polaroid.polaroid-unknown { align-self: center; margin-left: 0; margin-right: 0; --fx: 0px; }

/* a pair flying in from opposite sides to meet, side by side */
.reel-pair {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}
.reel .reel-pair .polaroid {
  margin-left: 0;
  margin-right: 0;
  width: 47%;
}

/* pre-flight: off to the side, doubled tilt, invisible */
.reel .polaroid {
  opacity: 0;
  transform: translateX(var(--fx)) translateY(28px) rotate(calc(var(--tilt) * 2.4));
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.25s ease;
}
.reel .polaroid.in { opacity: 1; transform: rotate(var(--tilt)); }
.reel .polaroid.in:hover { transform: rotate(0deg) scale(1.04); }
/* once landed, hover responds instantly */
.reel .polaroid.settled { transition: transform 0.25s ease, box-shadow 0.25s ease; }

/* fresh instant film: over-bright & sepia, develops into colour */
.reel .polaroid img {
  filter: sepia(0.85) brightness(1.25) contrast(0.85);
  transition: filter 1.3s ease 0.3s;
}
.reel .polaroid.in img { filter: none; }

/* ---- the polaroid ---- */
.polaroid {
  --tilt: -2deg;
  position: relative;
  display: block;
  width: min(82%, 320px);
  background: var(--film);
  padding: 0.6rem 0.6rem 0.3rem;
  border: none;
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(1, 3, 14, 0.55);
  transform: rotate(var(--tilt));
  cursor: zoom-in;
  font: inherit;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.polaroid:nth-child(3n+2) { --tilt: 1.8deg; width: min(76%, 300px); }
.polaroid:nth-child(3n)   { --tilt: -1.1deg; width: min(86%, 330px); }
.polaroid:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: var(--shadow-pop);
  z-index: 3;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eee7d6;
  border-radius: 2px;
}

.polaroid figcaption {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  line-height: 1.15;
  color: var(--film-ink);
  padding: 0.5rem 0.2rem 0.4rem;
}
.polaroid .credit { display: block; font-size: 0.95rem; color: var(--film-faint); }

/* tape strip */
.polaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 88px;
  height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(242, 178, 99, 0.68);
  box-shadow: 0 2px 5px rgba(1, 3, 14, 0.2);
}
.polaroid:nth-child(even)::before {
  background: rgba(111, 211, 239, 0.6);
  transform: translateX(-50%) rotate(2.5deg);
}

/* ---- the unknown memory: giant undeveloped "?" frame ----
   (doubled class beats the nth-child width variants below) */
.polaroid.polaroid-unknown {
  width: min(92%, 380px);
  cursor: default;
}

.unknown-frame {
  aspect-ratio: 1;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1.5px 1.5px at 18% 24%, rgba(255, 255, 255, 0.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 74% 16%, rgba(255, 255, 255, 0.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 62%, rgba(255, 255, 255, 0.65) 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 78%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 44%, rgba(255, 255, 255, 0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 12%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    linear-gradient(155deg, #101c56 0%, #0a1140 45%, #050a26 100%);
}

.unknown-frame span {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(5.5rem, 32vw, 9rem);
  line-height: 1;
  color: rgba(255, 254, 248, 0.88);
  transform: rotate(-8deg);
  text-shadow: 0 0 28px rgba(142, 166, 255, 0.55);
}

/* it develops in like the rest of the reel */
.reel .unknown-frame {
  opacity: 0.35;
  filter: brightness(0.5);
  transition: opacity 1.3s ease 0.3s, filter 1.3s ease 0.3s;
}
.reel .polaroid.in .unknown-frame { opacity: 1; filter: none; }

/* gold tape for the unknown memory (beats the even/odd tape colours) */
.polaroid.polaroid-unknown::before { background: rgba(245, 185, 95, 0.8); }

/* ============================================================
   PROFILE PAGES
   ============================================================ */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 2rem 1.2rem 1.8rem;
}

.profile-avatar {
  width: clamp(150px, 46vw, 200px);
  background: var(--film);
  padding: 0.55rem 0.55rem 1.6rem;
  border-radius: 4px;
  box-shadow: 0 16px 38px rgba(1, 3, 14, 0.6);
  transform: rotate(-2.5deg);
  margin-bottom: 1.1rem;
}
.profile-avatar img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
}

.profile-name { font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; }
.profile-role { color: var(--accent); font-weight: 800; font-size: 0.95rem; }
.profile-bio { color: var(--ink-dim); font-size: 0.92rem; margin-top: 0.3rem; }

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.ref-btn, .social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s, background 0.18s;
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--card-strong);
  color: var(--ink);
  font-family: var(--font-body);
}
.ref-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #0b1230;
  border: none;
}
.ref-btn:hover, .social-chip:hover { transform: translateY(-2px); }

/* ---------------- gallery ---------------- */
.gallery-box { padding: 1.1rem 1rem 1.2rem; }

.section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}
.section-title i { color: var(--accent); }
.section-title .count {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink-dim);
  background: var(--card-strong);
  border: 1px solid var(--card-border);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-strong);
  border: 1px solid var(--card-border);
  aspect-ratio: 1;
}
.gallery-item button {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-badge {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  pointer-events: none;
  max-width: calc(100% - 0.8rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-caption {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.78rem;
  margin-top: 0.8rem;
}

/* ---------------- lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(1, 3, 14, 0.93);
  padding: 1rem;
}
.lightbox.open { display: flex; }

.lightbox figure {
  max-width: min(94vw, 1100px);
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  max-height: 78dvh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
}
.lightbox figcaption { color: var(--ink-dim); font-size: 0.85rem; font-weight: 700; }

/* artist credit link — pill with a 44px touch target for mobile */
.lightbox-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-strong);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-credit:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent);
}
.lightbox-credit .fa-palette { color: var(--accent); }
.lightbox-credit .fa-arrow-up-right-from-square { font-size: 0.78em; color: var(--ink-faint); }

.lightbox-btn {
  position: absolute;
  z-index: 101;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-close { top: 0.9rem; right: 0.9rem; }
.lightbox-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }

/* ---------------- larger screens ---------------- */
@media (min-width: 640px) {
  .picker-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .picker-card { width: min(100%, 290px); }

  .reel { gap: 2.6rem; }
  .reel .polaroid:nth-child(odd)  { --fx: -90px; }
  .reel .polaroid:nth-child(even) { --fx: 90px; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
}

@media (min-width: 900px) {
  .page { padding-top: 2rem; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }

  .profile-hero {
    flex-direction: row;
    text-align: left;
    gap: 2.2rem;
    padding: 2.4rem 2.6rem;
  }
  .profile-avatar { margin-bottom: 0; flex-shrink: 0; }
  .profile-actions { justify-content: flex-start; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint-arrow { animation: none; }
  .reel .polaroid,
  .reel .polaroid img,
  .reel .unknown-frame { transition: none; filter: none; }
  .reel .polaroid { opacity: 1; transform: rotate(var(--tilt)); }
  .reel .unknown-frame { opacity: 1; }
}
