:root {
  --teal: #00b7a8;
  --teal-dark: #007e76;
  --lime: #c6e84a;
  --coral: #ff7a6b;
  --cream: #fdfaf3;
  --ink: #0f2a30;
  --ink-soft: #3b5a62;
  --paper: #ffffff;
  --shadow: 0 10px 30px rgba(15, 42, 48, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 42, 48, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(198, 232, 74, 0.35), transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(255, 122, 107, 0.25), transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(0, 183, 168, 0.18), transparent 45%),
    var(--cream);
  min-height: 100vh;
  line-height: 1.55;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin: 0 0 0.8em; color: var(--ink-soft); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ───────── Scroll-in animation ───────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ───────── Top bar ───────── */
header.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(253, 250, 243, 0.7);
  border-bottom: 1px solid rgba(15, 42, 48, 0.06);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1120px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif; font-weight: 800; font-size: 1.15rem;
}
.brand-moon {
  font-size: 1.4rem; line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
  display: inline-block; transform-origin: center;
  animation: moonRock 4s ease-in-out infinite;
}
@keyframes moonRock {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(8deg); }
}
.lang-switch { display: flex; gap: 6px; background: var(--paper); padding: 4px; border-radius: 999px; box-shadow: var(--shadow); }
.lang-switch button {
  border: 0; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  font: 600 0.85rem 'Inter', sans-serif; color: var(--ink-soft);
  background: transparent; transition: all 0.2s ease;
}
.lang-switch button.active { background: var(--ink); color: var(--cream); }
.lang-switch button:hover:not(.active) { background: rgba(15, 42, 48, 0.06); }

/* ───────── Hero ───────── */
.hero { padding: 70px 24px 40px 56px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: 0.85rem; color: var(--teal-dark);
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 3px rgba(198, 232, 74, 0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(198, 232, 74, 0.4); }
  50%      { box-shadow: 0 0 0 7px rgba(198, 232, 74, 0); }
}
.name-highlight {
  background: linear-gradient(120deg, var(--teal), var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.age-pill {
  display: inline-block; margin-top: 8px;
  background: var(--ink); color: var(--cream);
  padding: 6px 14px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
}
.hero-lead { font-size: 1.15rem; max-width: 520px; margin-top: 16px; }

/* ───────── Scroll moon trail ───────── */
.scroll-moon {
  position: fixed;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 60;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
  animation: scrollMoonFade 1.2s ease-out forwards;
}
@keyframes scrollMoonFade {
  0%   { opacity: 0; transform: translateY(0)     scale(0.5) rotate(-10deg); }
  25%  { opacity: 1; transform: translateY(-8px)  scale(1)   rotate(0deg); }
  100% { opacity: 0; transform: translateY(-46px) scale(0.7) rotate(15deg); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-moon { display: none; }
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  background: var(--paper); border: 1px solid rgba(15, 42, 48, 0.08);
  padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
}

.hero-card {
  background: var(--paper); border-radius: 28px; padding: 28px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero-card::before {
  content: ""; position: absolute; inset: -50% -20% auto auto; width: 320px; height: 320px;
  background: radial-gradient(circle, var(--lime), transparent 60%); opacity: 0.6;
}
.photo-frame {
  aspect-ratio: 1; border-radius: 20px; overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(0, 183, 168, 0.1) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, rgba(0, 183, 168, 0.15), rgba(255, 122, 107, 0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; position: relative; z-index: 1;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame .emoji { position: absolute; }
.photo-frame.has-img .emoji { display: none; }

/* ───────── Countdowns ───────── */
section.counters { padding-top: 30px; padding-bottom: 50px; }
.counter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.counter {
  background: var(--paper); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.counter-icon { font-size: 2.2rem; margin-bottom: 6px; }
.counter-label { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; }
.counter-value {
  font-family: 'Fraunces', serif; font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 4rem); line-height: 1; margin: 8px 0;
  color: var(--ink);
}
.counter-value .num { background: linear-gradient(120deg, var(--teal), var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.counter-sub { font-size: 0.9rem; color: var(--ink-soft); }
.counter.birthday { border-left: 6px solid var(--coral); }
.counter.holiday  { border-left: 6px solid var(--teal); }
.counter.loading .counter-value { opacity: 0.4; }
.counter.today .counter-value .num {
  background: linear-gradient(120deg, var(--lime), var(--teal));
  -webkit-background-clip: text; background-clip: text;
}

/* ───────── Sections ───────── */
section.block { padding-top: 60px; padding-bottom: 60px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head p { font-size: 1.05rem; }

/* ───────── Hobbies ───────── */
.hobbies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.hobby {
  background: var(--paper); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative; overflow: hidden; cursor: default;
}
.hobby:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hobby-thumb {
  aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; position: relative;
  margin-bottom: 14px;
  background:
    repeating-linear-gradient(45deg, rgba(0, 183, 168, 0.08) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, rgba(0, 183, 168, 0.12), rgba(255, 122, 107, 0.1));
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem;
}
.hobby-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.hobby h3 { margin-bottom: 6px; }
.hobby p { font-size: 0.95rem; margin: 0; }
.hobby:nth-child(1) { background: linear-gradient(160deg, #fff, rgba(255, 122, 107, 0.12)); }
.hobby:nth-child(2) { background: linear-gradient(160deg, #fff, rgba(198, 232, 74, 0.18)); }
.hobby:nth-child(3) { background: linear-gradient(160deg, #fff, rgba(0, 183, 168, 0.14)); cursor: pointer; }
.hobby:nth-child(4) { background: linear-gradient(160deg, #fff, rgba(255, 213, 96, 0.18)); }
.hobby.harp-card { user-select: none; }
.hobby.harp-card::after {
  content: "🔊"; position: absolute; top: 16px; right: 16px;
  background: var(--ink); color: var(--cream); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-size: 0.9rem; transition: transform 0.2s;
}
.hobby.harp-card:hover::after { transform: scale(1.1); }
.hobby.harp-card.playing::after {
  background: var(--coral);
  animation: ringRing 0.6s ease-in-out infinite;
}
@keyframes ringRing {
  0%, 100% { transform: rotate(-12deg); }
  50%      { transform: rotate(12deg); }
}

/* ───────── Dream / biologist ───────── */
.dream {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--cream); border-radius: 32px; padding: 50px; position: relative; overflow: hidden;
  cursor: pointer; user-select: none;
}
.dream::after { /* hint */
  content: ""; /* visual hint added via JS hover state below if desired */
}

/* ───────── Butterfly ───────── */
.butterfly-wrap {
  position: fixed; top: 0; left: 0;
  font-size: 2.4rem; z-index: 9999;
  pointer-events: none; will-change: transform;
  text-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.butterfly {
  display: inline-block; transform-origin: center;
  animation: flap 0.18s ease-in-out infinite alternate;
}
@keyframes flap {
  from { transform: scaleX(1)   skewY(-6deg); }
  to   { transform: scaleX(0.45) skewY(6deg); }
}
.dream::before, .dream::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.4;
}
.dream::before { width: 240px; height: 240px; background: var(--lime); top: -60px; right: -40px; }
.dream::after  { width: 200px; height: 200px; background: var(--coral); bottom: -60px; left: 10%; }
.dream-inner { position: relative; z-index: 1; }
.dream h2 { color: var(--cream); }
.dream p { color: rgba(253, 250, 243, 0.85); font-size: 1.1rem; }
.dream-bullets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.dream-bullet {
  background: rgba(253, 250, 243, 0.1); border: 1px solid rgba(253, 250, 243, 0.2);
  padding: 16px; border-radius: 16px; backdrop-filter: blur(6px);
}
.dream-bullet strong { display: block; font-size: 1.6rem; font-family: 'Fraunces', serif; color: var(--lime); }

/* ───────── Photo gallery ───────── */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.photo-slot {
  aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(0, 183, 168, 0.08) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, rgba(0, 183, 168, 0.12), rgba(255, 122, 107, 0.1));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 0.85rem; text-align: center; padding: 12px;
  border: 2px dashed rgba(0, 183, 168, 0.3);
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.photo-slot .ico { font-size: 2rem; margin-bottom: 8px; }
.photo-slot.has-img { border-style: solid; border-color: transparent; }
.photo-slot.has-img .ico, .photo-slot.has-img .ph-label { display: none; }

/* ───────── Books ───────── */
.books-shelf {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.book {
  background: var(--paper); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow); transition: transform 0.25s;
  display: flex; flex-direction: column; gap: 10px;
}
.book:hover { transform: translateY(-3px); }
.book-cover {
  aspect-ratio: 2/3; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--cream); position: relative;
  box-shadow: inset 0 -3px 8px rgba(0,0,0,0.18), inset 4px 0 0 rgba(255,255,255,0.18);
}
.book:nth-child(2) .book-cover { background: linear-gradient(160deg, var(--coral), #c0413a); }
.book:nth-child(3) .book-cover { background: linear-gradient(160deg, #6a4cb8, #3f2a85); }
.book:nth-child(4) .book-cover { background: linear-gradient(160deg, #d99a2b, #8a5b13); }
.book-title { font-weight: 600; font-size: 0.95rem; line-height: 1.25; }
.book-author { font-size: 0.8rem; color: var(--ink-soft); }

/* ───────── Quiz ───────── */
.quiz {
  background: var(--paper); border-radius: 32px; padding: 40px; box-shadow: var(--shadow);
  max-width: 720px; margin: 0 auto;
}
.quiz-question { font-weight: 600; font-size: 1.15rem; margin-bottom: 18px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  text-align: left; padding: 14px 18px; border-radius: 14px;
  background: var(--cream); border: 2px solid transparent; cursor: pointer;
  font: 500 1rem 'Inter', sans-serif; color: var(--ink); transition: all 0.2s;
}
.quiz-option:hover { border-color: var(--teal); }
.quiz-option.correct   { background: rgba(198, 232, 74, 0.4); border-color: var(--lime); }
.quiz-option.incorrect { background: rgba(255, 122, 107, 0.2); border-color: var(--coral); }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 0.9rem; color: var(--ink-soft); }
.quiz-bar { height: 6px; background: rgba(15, 42, 48, 0.08); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.quiz-bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--lime)); transition: width 0.4s; }
.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result .score { font-family: 'Fraunces', serif; font-size: 3rem; font-weight: 800; color: var(--teal); }
.quiz-restart {
  margin-top: 16px; padding: 12px 24px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--cream); font: 600 0.95rem 'Inter', sans-serif; cursor: pointer;
}

/* ───────── Fun facts ───────── */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.fact {
  background: var(--paper); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); border-top: 5px solid var(--lime);
}
.fact:nth-child(2) { border-top-color: var(--coral); }
.fact:nth-child(3) { border-top-color: var(--teal); }
.fact-ico { font-size: 1.8rem; margin-bottom: 8px; }

/* ───────── Footer ───────── */
footer {
  margin-top: 60px; padding: 30px 0; text-align: center;
  color: var(--ink-soft); font-size: 0.9rem;
  border-top: 1px solid rgba(15, 42, 48, 0.08);
}
footer .heart { color: var(--coral); }

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .hero { padding: 50px 20px 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  section.counters { padding-top: 10px; padding-bottom: 20px; }
  section.block { padding-top: 40px; padding-bottom: 40px; }
  .counter-grid { grid-template-columns: 1fr; gap: 16px; }
  .counter { padding: 22px; }
  .section-head { margin-bottom: 28px; }
  .hobbies { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hobby { padding: 18px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .books-shelf { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .dream { padding: 28px 22px; }
  .dream-bullets { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 14px; }
  .quiz { padding: 24px; }
  footer { padding: 24px 0; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 16px 16px; }
  .hobbies { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  .counter { padding: 20px; }
  .dream { padding: 24px 20px; }
}
