/* ==========================================================================
   Leon's Burrow: shared styles for every page.
   Colours live in :root below. Change them there and the whole site follows.
   ========================================================================== */

:root {
  /* background */
  --space: #06050b;         /* behind the pixel sky (sky.js) */

  /* surfaces */
  --card: rgba(22, 16, 36, 0.78);
  --card-hover: rgba(36, 24, 56, 0.86);
  --line: rgba(255, 214, 236, 0.16);
  --line-strong: rgba(255, 214, 236, 0.32);

  /* accents (taken from the Leon model) */
  --gold: #f6c453;          /* jacket trim */
  --cream: #fdeba8;         /* render background */
  --pink: #f5a9cb;          /* tail / ears */
  --tag-bg: #f8d3e6;
  --tag-text: #4a2140;

  /* text */
  --text: #f4ebf3;
  --muted: #c8b4c9;

  --radius: 18px;
  --font-display: "Fredoka", "Baloo 2", "Comic Sans MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  background: var(--space);
  overflow-x: hidden;
}

/* Pixel-art space sky, drawn by sky.js. .backdrop is the plain fallback. */
.backdrop { position: fixed; inset: 0; z-index: -2; background: var(--space); }
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}

/* keep text readable where it crosses the sun or nebula */
.hero-text, .page-head, .section .eyebrow, .section .title, .lede {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 16px rgba(6, 5, 11, 0.9);
}
/* gradient text can't take a text-shadow (it shows through), so it uses a filter instead */
h1.name, .page-head h1 .grad { text-shadow: none; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8)); }

a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--gold); }

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

.wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- Hero ---------- */

.hero { padding-block: 56px 40px; }
.hero .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap-reverse;
}
.hero-text { flex: 1 1 380px; }

.badge {
  display: inline-block;
  padding: 5px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(-3deg);
}

h1.name {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 64px);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(95deg, var(--cream), var(--gold) 45%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(246, 196, 83, 0.25));
}

.tagline { margin: 0 0 14px; font-size: 15px; }
.tagline b { color: var(--gold); font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.chip {
  padding: 3px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 700;
}
.intro { margin: 0; max-width: 34em; color: var(--muted); }

/* Round avatar with glow. Hover swaps the still render for the turntable. */
.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 190px;
  height: 190px;
  margin-inline: auto;
}
.avatar .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  /* a little patch of the Void: nebula purple fading to deep space */
  background:
    radial-gradient(circle at 50% 45%, rgba(120, 80, 200, 0.55), transparent 62%),
    radial-gradient(circle at 70% 25%, rgba(70, 40, 120, 0.8), transparent 55%),
    #120c1f;
  border: 3px solid rgba(190, 160, 255, 0.55);
  box-shadow:
    0 0 0 8px rgba(120, 80, 200, 0.16),
    0 0 46px 12px rgba(130, 90, 230, 0.38);
  animation: float 6s ease-in-out infinite;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar .spin { opacity: 0; transition: opacity 0.25s; }
.avatar:hover .spin { opacity: 1; }
.avatar .sparkle {
  position: absolute;
  font-size: 22px;
  animation: float 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes float { 50% { transform: translateY(-7px); } }

/* ---------- Wavy divider ---------- */

.wave { display: block; width: 100%; height: 34px; }
.wave path:first-child { fill: rgba(255, 214, 236, 0.08); }
.wave path:last-child { fill: none; stroke: rgba(255, 230, 240, 0.35); stroke-width: 1.5; }

/* ---------- Section headings ---------- */

.section { padding-block: 36px 56px; }
.eyebrow {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pink);
}
h2.title {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}
h2.title::after {
  content: "";
  display: block;
  width: 130px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--gold), transparent);
}
.lede { margin: 16px auto 0; max-width: 36em; text-align: center; color: var(--muted); }
.dots { margin: 12px 0 28px; text-align: center; letter-spacing: 0.6em; color: var(--pink); opacity: 0.7; font-size: 12px; }

/* ---------- Category cards (home page) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  backdrop-filter: blur(4px);
  transition: transform 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
a.card:hover {
  color: var(--text);
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: var(--pink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 24px rgba(245, 169, 203, 0.18);
}
.tag {
  position: absolute;
  top: -9px;
  right: 14px;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(3deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.tag.gold { background: var(--gold); color: #3a2410; }
.card .icon { font-size: 28px; line-height: 1; }
.card .icon img { width: 32px; height: 32px; image-rendering: pixelated; }
.card h3 { margin: 14px 0 6px; font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.card .more { margin-top: auto; color: var(--pink); font-size: 13px; font-weight: 800; }
a.card:hover .more { color: var(--gold); }

.cards.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- Deep Dig gallery ---------- */

.gallery { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  transition: transform 0.18s, border-color 0.18s;
}
.gallery img:hover { transform: scale(1.03); border-color: var(--pink); }

/* ---------- Voice clips ---------- */

.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.clip { gap: 14px; }
.clip-head { display: flex; align-items: center; gap: 14px; }
.clip-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  background: rgba(245, 169, 203, 0.14);
  border: 1px solid var(--line-strong);
}
.clip h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.clip .note { color: var(--muted); font-size: 13px; }
.clip audio { width: 100%; height: 36px; color-scheme: dark; border-radius: 999px; }

/* ---------- Project cards (sub-pages) ---------- */

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.project { padding: 0; overflow: visible; }
.project.wide { grid-column: 1 / -1; }
.project .media {
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #120f1c;
  aspect-ratio: 16 / 9;
}
.project .media img,
.project .media video { width: 100%; height: 100%; object-fit: cover; }
.project .media.pixel img { object-fit: contain; image-rendering: pixelated; padding: 18%; background: #9fd6e8; }
.project .media.icon-tile {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(245, 169, 203, 0.25), transparent 70%), #1d1528;
}
.project .media.icon-tile img { width: 120px; height: 120px; object-fit: contain; }
.project .media.tall { aspect-ratio: auto; display: flex; justify-content: center; background: #120f1c; }
.project .media.tall img { width: auto; max-height: 340px; }
.project .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.project h3 { margin: 0 0 4px; }
.status { font-size: 12px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.status.wip { color: var(--pink); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.stack li { padding: 1px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; background: #120f1c; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }

.btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(95deg, var(--gold), var(--pink));
  color: #2c1530;
  font-weight: 800;
  font-size: 13px;
}
.btn:hover { color: #2c1530; filter: brightness(1.08); }

.film { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; padding: 20px; }
.film video { width: 260px; max-width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; }
.film .body { padding: 0; flex: 1 1 260px; }

/* ---------- Sub-page header ---------- */

.page-head { padding-block: 40px 8px; }
.back {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 700;
}
.page-head h1 .grad {
  background: linear-gradient(95deg, var(--cream), var(--gold) 45%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-head p { margin: 6px 0 0; color: var(--muted); }

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

footer { padding-block: 30px 50px; text-align: center; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 18px; padding: 0; list-style: none; }
.links a {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.links a:hover { border-color: var(--pink); color: var(--pink); }
.copy { font-size: 12px; color: var(--muted); }

@media (max-width: 560px) {
  .hero { padding-block: 36px 24px; }
  .hero-text { text-align: center; }
  .chips { justify-content: center; }
  .intro { margin-inline: auto; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip img:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
