:root {
  --pink-deep: #c2386f;
  --pink: #d94f86;
  --pink-mid: #e8739f;
  --pink-light: #f7b8cf;
  --pink-blush: #fde3ec;
  --ink: #7d1d46;
  --text: #fff;
  --gold: #ffd86b;
  --max-width: 1100px;
  --font-hand: "Gaegu", "Comic Sans MS", cursive;
  --font-script: "Pacifico", cursive;
  /* Uneven radii make boxes look drawn by hand rather than ruled. */
  --wobbly: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobbly-alt: 18px 225px 18px 255px / 255px 18px 225px 18px;
}

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

html {
  scroll-behavior: smooth;
  /* A heart drifting near the right edge must never add a horizontal scrollbar. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--pink);
  /* Gingham: two translucent white stripe sets crossing over the base pink. */
  background-image:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.09) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.09) 0 22px, transparent 22px 44px);
  text-shadow: 0 2px 0 rgb(125 29 70 / 0.35);
}

a {
  color: inherit;
}

.sprites {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--pink-deep);
  border-bottom: 3px dashed var(--pink-light);
  box-shadow: 0 4px 0 rgb(125 29 70 / 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.logo {
  font-family: var(--font-script);
  font-size: 1.75rem;
  white-space: nowrap;
  text-decoration: none;
}

/* Bow and heart after the name, drawn in the same style as the page doodles; sized in em to follow the text. */
.name-doodles {
  display: inline-flex;
  align-items: center;
  gap: 0.05em;
  margin-left: 0.2em;
  vertical-align: middle;
}

.name-doodles svg {
  stroke: var(--ink);
}

.nowrap {
  white-space: nowrap;
}

.name-bow {
  width: 1.1em;
  height: 0.64em;
  fill: #fff;
  stroke-width: 1.5;
  transform: rotate(-10deg);
}

.name-heart {
  width: 0.62em;
  height: 0.62em;
  fill: var(--pink-light);
  stroke-width: 1;
  transform: rotate(8deg);
}

h1 .name-doodles {
  /* drop-shadow gives the doodles the heading's offset ink shadow. */
  filter: drop-shadow(3px 3px 0 var(--ink));
}

/* Wobble only reads well at heading size; on small text it just blurs the shapes. */
h1 .name-doodles svg {
  filter: url(#wobble);
}

h1 .name-bow { stroke-width: 2.5; }
h1 .name-heart { stroke-width: 1.6; }

/* Positioned on the page (not the viewport) so hearts are spread top to bottom; click-through so they never block it. */
.roaming-heart {
  position: absolute;
  top: 0;
  left: 0;
  /* Below the sticky header (z-index 10) so hearts drift behind it instead of covering the logo. */
  z-index: 5;
  pointer-events: none;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
  filter: drop-shadow(3px 3px 0 var(--ink));
}

.roaming-heart .name-heart {
  display: block;
  width: 100%;
  height: 100%;
  stroke: var(--ink);
  stroke-width: 1.6;
  filter: url(#wobble);
  animation: heart-bob 4s ease-in-out infinite;
}

/* Negative z-index paints under the cards and boxes but still above the page background. */
.roaming-heart.behind {
  z-index: -1;
}

.roaming-heart.fade-in {
  opacity: 0;
  animation: heart-appear 0.8s ease-out forwards;
}

@keyframes heart-appear {
  to { opacity: 1; }
}

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

@media (max-width: 520px) {
  .site-header .container {
    flex-direction: column;
    gap: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.4rem;
  }
  .logo { font-size: 1.5rem; }
  .nav-links { gap: 0.25rem; }
  .nav-links a { padding: 0.1rem 0.6rem; font-size: 1.15rem; }
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.15rem 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--wobbly);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--pink);
  border-color: #fff;
  transform: rotate(-2deg);
}

/* Hero */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 1.2;
  text-shadow:
    3px 3px 0 var(--ink),
    -1px -1px 0 var(--ink);
  transform: rotate(-3deg);
}

.tagline {
  display: inline-block;
  margin: 1.5rem 0 0;
  padding: 0.3rem 1.4rem;
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--pink-deep);
  border: 3px solid #fff;
  border-radius: var(--wobbly);
  transform: rotate(1.5deg);
}

.hero-bow {
  display: block;
  width: 72px;
  height: 42px;
  margin: 0 auto 0.5rem;
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 1.5;
  filter: url(#wobble);
}

.doodle {
  position: absolute;
  fill: #fff;
  opacity: 0.9;
  animation: twinkle 3s ease-in-out infinite;
}

.doodle-sparkle-1 { top: -1rem; left: 12%; width: 34px; height: 34px; }
.doodle-sparkle-2 { bottom: 0; right: 14%; width: 26px; height: 26px; animation-delay: 1.2s; }
.doodle-heart-1 { top: 1rem; right: 10%; width: 30px; height: 30px; fill: var(--pink-light); animation-delay: 0.6s; }
.doodle-heart-2 { bottom: 1rem; left: 16%; width: 22px; height: 22px; fill: var(--pink-light); animation-delay: 1.8s; }

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .doodle { animation: none; }
  html { scroll-behavior: auto; }
}

/* Sections */

.section {
  padding: 3rem 0;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 2.25rem;
  text-shadow: 2px 2px 0 var(--ink);
}

.heading-bow {
  width: 46px;
  height: 27px;
  flex: none;
  fill: var(--pink-light);
  stroke: var(--ink);
  stroke-width: 1.5;
  transform: rotate(-12deg);
}

.note {
  position: relative;
  padding: 1.5rem 2rem;
  background: var(--pink-deep);
  border-radius: var(--wobbly-alt);
}

/* Drawn on a pseudo-element so the wobble filter roughens the border, not the content. */
.note::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid #fff;
  border-radius: var(--wobbly-alt);
  filter: url(#wobble);
  pointer-events: none;
}

.note p {
  margin: 0;
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem 1.75rem;
}

.gallery-item {
  position: relative;
  margin: 0;
  padding: 0.6rem;
  background: var(--pink-deep);
  border-radius: var(--wobbly);
  box-shadow: 4px 5px 0 rgb(125 29 70 / 0.45);
  transition: transform 0.2s;
}

.gallery-item:nth-child(odd) { transform: rotate(-1.5deg); }
.gallery-item:nth-child(even) { transform: rotate(1.2deg); }

.gallery-item:hover {
  transform: rotate(0deg) scale(1.03);
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid #fff;
  border-radius: var(--wobbly);
  filter: url(#wobble);
  pointer-events: none;
}

/* Bow pinned to the top of each card. */
.gallery-item::after {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 44px;
  height: 26px;
  translate: -50% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 28'%3E%3Cg fill='%23fff' stroke='%237d1d46' stroke-width='1.5'%3E%3Cpath d='M24 13C19 6 9 1.5 4.5 4.5 1 7 1.8 20 5.5 23c4 3.3 13.8-2.5 18.5-8.5zM24 13c5-7 15-11.5 19.5-8.5 3.5 2.5 2.7 15.5-1 18.5-4 3.3-13.8-2.5-18.5-8.5z'/%3E%3Cellipse cx='24' cy='13.6' rx='4.2' ry='5'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 1rem;
  /* The drawings are pencil on white paper. */
  background: #fff;
  border: 2px dashed var(--pink-light);
  border-radius: var(--wobbly-alt);
}

.gallery-item figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem 0.2rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.badge {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 1.1rem;
  background: var(--pink-mid);
  border: 2px solid #fff;
  border-radius: 50% 45% 50% 42%;
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  text-align: center;
  background: var(--pink-deep);
  border-top: 3px dashed var(--pink-light);
}

.site-footer p {
  margin: 0;
}

