:root {
  --pink: #ffd8ec;
  --lavender: #e9dcff;
  --blue: #d8f0ff;
  --mint: #d9fce8;
  --peach: #ffe9d6;
  --text: #3b3854;
  --white: #ffffff;
  --shadow: 0 10px 25px rgba(116, 99, 170, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 184, 222, 0.32), transparent 30%),
    radial-gradient(circle at 88% 15%, rgba(175, 219, 255, 0.34), transparent 28%),
    radial-gradient(circle at 72% 82%, rgba(198, 255, 222, 0.28), transparent 28%),
    linear-gradient(180deg, #fef7ff 0%, #f3fbff 45%, #fefdf5 100%);
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand {
  font-family: "Baloo 2", cursive;
}

.sky-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.cloud {
  position: absolute;
  width: 180px;
  height: 56px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  filter: blur(1px);
  animation: drift 45s linear infinite;
}

.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 50%;
}

.cloud::before {
  width: 60px;
  height: 60px;
  left: 28px;
  top: -30px;
}

.cloud::after {
  width: 70px;
  height: 70px;
  right: 24px;
  top: -34px;
}

.cloud-1 { top: 10%; left: -20%; animation-delay: 0s; }
.cloud-2 { top: 34%; left: -25%; animation-delay: -15s; }
.cloud-3 { top: 58%; left: -30%; animation-delay: -30s; }

.hero {
  padding: 1.2rem 1.5rem 4rem;
  min-height: 90vh;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% auto auto -10%;
  width: 310px;
  height: 310px;
  background: radial-gradient(circle, rgba(255, 211, 241, 0.75), rgba(255, 211, 241, 0));
  pointer-events: none;
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  right: -7%;
  bottom: 6%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(189, 230, 255, 0.75), rgba(189, 230, 255, 0));
  pointer-events: none;
  z-index: -1;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: #7f5eea;
}

.nav-link, .cta-btn {
  text-decoration: none;
  background: linear-gradient(130deg, #ff9cd2, #8dc8ff);
  color: #fff;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.hero-content {
  max-width: 1100px;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.8rem;
  align-items: center;
}

.subtitle {
  display: inline-block;
  background: var(--mint);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
}

.hero-text h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.hero-text p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.avatar-card {
  background: linear-gradient(160deg, var(--lavender), var(--blue));
  border-radius: 2rem;
  padding: 0.9rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.photo-well {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.7), transparent 45%),
    linear-gradient(160deg, #f3e9ff, #d9f4ff 55%, #ffe9f4);
}

.avatar-card .photo-well {
  width: min(100%, 380px);
  margin-inline: auto;
  border-radius: 1.4rem;
}

.ghibli-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
  filter:
    saturate(1.18)
    contrast(1.05)
    brightness(1.04)
    hue-rotate(-4deg)
    sepia(0.09);
  transition: filter 0.35s ease;
}

.ghibli-photo:hover {
  filter:
    saturate(1.24)
    contrast(1.08)
    brightness(1.07)
    hue-rotate(-5deg)
    sepia(0.12);
}

.floating-icons span {
  position: absolute;
  font-size: 1.6rem;
  animation: bob 3.8s ease-in-out infinite;
}

.floating-icons span:nth-child(1) { top: 24%; left: 6%; }
.floating-icons span:nth-child(2) { top: 69%; left: 13%; animation-delay: 0.4s; }
.floating-icons span:nth-child(3) { top: 18%; right: 10%; animation-delay: 0.8s; }
.floating-icons span:nth-child(4) { top: 65%; right: 6%; animation-delay: 1.2s; }
.floating-icons span:nth-child(5) { top: 42%; right: 17%; animation-delay: 1.6s; }

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.4rem;
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  right: 4%;
  top: 12%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}

.section h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #6a54d3;
}

.section-intro {
  margin: 0.35rem 0;
  line-height: 1.75;
}

.card-grid, .favorites-grid, .flip-grid, .polaroid-grid {
  display: grid;
  gap: 1rem;
}

.about-grid {
  grid-template-columns: 1.6fr 1fr 1fr;
}

.family-grid,
.hobbies-grid,
.favorites-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.polaroid-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 1rem 0.4rem 1.6rem;
}

.flip-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.97), rgba(248, 245, 255, 0.95));
  border-radius: 1.2rem;
  box-shadow: var(--shadow);
  padding: 1rem;
  border: 2px solid #f0e9ff;
  backdrop-filter: blur(2px);
}

.large { grid-column: span 2; }

.mini {
  background: linear-gradient(160deg, var(--peach), var(--mint));
}

.image-card {
  position: relative;
  overflow: hidden;
}

.image-card .photo-well,
.family-grid .photo-well,
.hobby .photo-well,
.polaroid .photo-well {
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
}

.caption {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
}

.hobby {
  position: relative;
  overflow: hidden;
}

.hobby .photo-well,
.family-grid .photo-well {
  margin-bottom: 0.75rem;
}

.hobby::after {
  content: "✨";
  position: absolute;
  right: 14px;
  top: 10px;
  animation: twinkle 1.8s ease-in-out infinite;
}

.favorite {
  background: linear-gradient(145deg, #fff8fe, #edfbff);
  font-weight: 700;
}

.flip-card {
  perspective: 1000px;
  min-height: 190px;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 190px;
  transition: transform 0.7s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-inner,
.flip-card:focus-within .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  border-radius: 1.2rem;
  padding: 1.2rem;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: var(--shadow);
  backface-visibility: hidden;
}

.flip-front {
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  font-family: "Baloo 2", cursive;
  font-size: 1.3rem;
}

.flip-back {
  background: linear-gradient(135deg, var(--mint), var(--blue));
  transform: rotateY(180deg);
}

.polaroid {
  position: relative;
  background: #fff;
  padding: 0.6rem 0.6rem 1rem;
  border-radius: 0.45rem;
  box-shadow: var(--shadow);
  transform: rotate(var(--rot, -2deg));
}

.polaroid .photo-well {
  border-radius: 0.35rem;
}

.polaroid:nth-child(2n) { --rot: 2deg; }
.polaroid:nth-child(3n) { --rot: -3deg; }

.polaroid figcaption {
  margin-top: 0.45rem;
  text-align: center;
  font-weight: 700;
}

.hearts {
  margin-top: 1rem;
  font-size: 1.6rem;
}

.hearts span {
  margin-right: 0.45rem;
  display: inline-block;
  animation: heartFloat 2.4s ease-in-out infinite;
}

.hearts span:nth-child(2) { animation-delay: 0.4s; }
.hearts span:nth-child(3) { animation-delay: 0.8s; }

.dream {
  text-align: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 220, 245, 0.75), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(208, 237, 255, 0.72), transparent 30%),
    linear-gradient(160deg, #fff7fd, #eaf5ff);
  border-radius: 1.8rem;
}

.dream-icons {
  margin-top: 0.8rem;
  font-size: 1.7rem;
  letter-spacing: 0.2rem;
}

.thank-you {
  text-align: center;
}

.sparkle {
  font-weight: 700;
  animation: twinkle 1.8s ease-in-out infinite;
}

.site-footer {
  padding: 1.1rem;
  text-align: center;
  color: #705db8;
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(150vw); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.13); }
}

@keyframes heartFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .hero-content,
  .about-grid,
  .family-grid,
  .hobbies-grid,
  .favorites-grid,
  .flip-grid,
  .polaroid-grid {
    grid-template-columns: 1fr 1fr;
  }

  .large {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .hero {
    padding-top: 1rem;
  }

  .hero-content,
  .about-grid,
  .family-grid,
  .hobbies-grid,
  .favorites-grid,
  .flip-grid,
  .polaroid-grid {
    grid-template-columns: 1fr;
  }

  .large {
    grid-column: span 1;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .floating-icons span {
    font-size: 1.25rem;
  }

  .floating-icons span:nth-child(1) { left: 4%; }
  .floating-icons span:nth-child(2) { left: 8%; }
  .floating-icons span:nth-child(3) { right: 8%; }
  .floating-icons span:nth-child(4) { right: 4%; }
  .floating-icons span:nth-child(5) { right: 12%; }

  .avatar-card .photo-well,
  .image-card .photo-well,
  .family-grid .photo-well,
  .hobby .photo-well,
  .polaroid .photo-well {
    aspect-ratio: 3 / 4;
  }
}
