:root {
  --powder: #FBEFEA;
  --blush: #F8C8D4;
  --rose-gold: #B76E79;      /* decorative only: borders, large text */
  --rose-text: #8A4B57;      /* deeper rose that's readable as small text */
  --lipstick: #9E2A5B;
  --lipstick-dark: #7A1F46;
  --mascara: #2B1B24;
  --white: #FFFFFF;
  --paper: #FFFBF8;
  --cream: #FFF8F0;

  /* Scrapbook folder colors */
  --folder-beige: #E8DCCB;
  --folder-pink: #F2C9D3;
  --folder-blue: #CFDBE5;

  --radius: 24px;
  --shadow: 0 8px 24px rgba(158, 42, 91, 0.10);

  --font-script: 'Pinyon Script', cursive;
  --font-hand: 'Caveat', cursive;
  --font-type: 'Courier Prime', 'Courier New', monospace;
}

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

/* Make sure the HTML "hidden" attribute always wins, even on .btn */
[hidden] { display: none !important; }

/* Hide editable text for a moment while your saved content loads, so old text doesn't flash */
.content-loading [data-field],
.content-loading [data-list] { visibility: hidden; }

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--mascara);
  line-height: 1.7;
  /* Candy stripes */
  background: repeating-linear-gradient(90deg, #F9D7E0 0 26px, #FDEEF2 26px 52px);
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  color: var(--lipstick);
  line-height: 1.2;
}

a { color: var(--lipstick); }
img { max-width: 100%; display: block; }
.svg-defs { position: absolute; }

/* ---------- Logo badge (oval with a bow) ---------- */
.site-header { text-align: center; padding: 40px 0 26px; }
.logo-badge {
  position: relative;
  display: inline-block;
  padding: 6px 48px 2px;
  background: var(--white);
  border: 6px solid var(--mascara);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 6px var(--blush), 0 8px 18px rgba(43, 27, 36, 0.25);
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  color: var(--mascara);
  text-decoration: none;
  line-height: 1.4;
  transition: transform 0.3s;
}
.logo-badge:hover { transform: rotate(-2deg) scale(1.03); }
.logo-bow {
  position: absolute;
  top: -26px;
  left: 50%;
  width: 58px;
  height: 38px;
  transform: translateX(-50%);
  fill: var(--mascara);
}

/* ---------- Black menu bar ---------- */
.menu-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 4%;
  background: linear-gradient(#3A2731, #140B10);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.menu-name { display: none; font-family: var(--font-script); font-size: 1.9rem; color: var(--white); }
.nav-links { display: flex; align-items: center; list-style: none; }
.nav-links a:not(.btn) {
  display: block;
  padding: 16px 22px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.3s;
}
.nav-links li:first-child a { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.nav-links a:not(.btn):hover,
.nav-links a.active { color: var(--blush); }
.nav-links .btn { margin-left: 22px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px 4px;
  cursor: pointer;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
/* Turn the 3 lines into an X when open */
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Simple top bar used by the admin page */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 6%;
  background: linear-gradient(#3A2731, #140B10);
}
.logo { font-family: var(--font-script); font-size: 2rem; color: var(--white); text-decoration: none; }
.nav .btn-outline { color: var(--white); border-color: var(--blush); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 12px 28px;
  background: var(--lipstick);
  color: var(--white);
  border: 2px solid var(--lipstick);
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.3s, color 0.3s;
}
/* Shimmer that sweeps across the button on hover */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover {
  background: var(--lipstick-dark);
  border-color: var(--lipstick-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-outline { background: transparent; color: var(--lipstick); }
.btn-outline:hover { background: var(--lipstick); color: var(--white); }
.btn-small { padding: 6px 18px; font-size: 0.9rem; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--rose-gold);
  outline-offset: 3px;
}

.typewriter {
  font-family: var(--font-type);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--rose-text);
}
.handwriting { font-family: var(--font-hand); font-size: 1.7rem; line-height: 1.3; }

/* ---------- Hero: the open tin ---------- */
.hero { padding: 56px 5% 90px; }
.tin {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* minmax(0, …) stops wide content from stretching the tin */
  grid-auto-rows: 1fr; /* both trays are the same height, even when stacked on phones */
  gap: 18px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 40px;
  /* Brushed metal */
  background: linear-gradient(145deg, #EEEBEC, #BFB9BC 35%, #DCD8D9 60%, #A7A1A4);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.6),
    inset 0 -4px 8px rgba(0, 0, 0, 0.15),
    0 24px 50px rgba(43, 27, 36, 0.28);
}
.tray {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: stretch; /* cards fill the tray height, so left and right match */
  padding: 34px 28px;
  border-radius: 28px;
  background: linear-gradient(160deg, #CFCACC, #B3ADB0);
  box-shadow: inset 0 8px 18px rgba(0, 0, 0, 0.28), inset 0 -2px 4px rgba(255, 255, 255, 0.4);
}

/* Pink license ID card */
.id-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 440px;
  padding: 12px 22px;
  background: #F7CAD6;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(43, 27, 36, 0.25);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) rotate(-2deg);
  transition: transform 0.6s ease-out;
}
.id-card.tilting { transition: transform 0.12s ease-out; }
/* Holographic shine that follows the cursor, like a real license card catching the light */
.id-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255, 255, 255, 0.55), transparent 45%),
    linear-gradient(115deg, transparent 25%, rgba(255, 182, 230, 0.35) 40%, rgba(182, 220, 255, 0.35) 50%, rgba(255, 240, 182, 0.35) 60%, transparent 75%);
  background-size: 100% 100%, 200% 200%;
  background-position: 0 0, var(--shine-x, 50%) var(--shine-y, 50%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.4s;
}
.id-card.tilting::after { opacity: 1; }
.stars {
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--mascara);
}
.id-title {
  margin-top: 6px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.id-number { text-align: center; font-family: var(--font-type); font-size: 0.8rem; }
.id-grid { display: grid; grid-template-columns: 120px 1fr; gap: 16px; margin: auto 0; padding: 12px 0 10px; align-items: start; }
.id-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(160deg, var(--rose-gold), var(--lipstick));
  border: 4px solid var(--white);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}
.id-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.monogram { font-family: var(--font-script); font-size: 4rem; color: var(--white); }
.id-details { font-size: 0.85rem; }
.id-details dt {
  font-family: var(--font-type);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose-text);
}
.id-details dd { font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
/* Rubber stamp */
.id-stamp {
  position: absolute;
  bottom: 22px;
  right: -18px;
  padding: 8px 12px;
  border: 3px solid var(--lipstick);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: var(--lipstick);
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  max-width: 96px; /* long stamp text wraps onto two lines */
  transform: rotate(14deg);
}

/* Quote card under the tin */
.quote-card {
  position: relative;
  max-width: 620px;
  margin: 44px auto 0;
  padding: 30px 32px 22px;
  text-align: center;
  background: var(--white);
  border-radius: 18px;
  border: 2px solid var(--blush);
  box-shadow: 0 12px 26px rgba(43, 27, 36, 0.14);
  transform: rotate(-1deg);
}
.quote-bow { position: absolute; top: -22px; left: 50%; width: 52px; height: 36px; transform: translateX(-50%); }
.quote-title { font-family: var(--font-type); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rose-text); }
.quote-text {
  min-height: 2.6em; /* keeps the card from jumping when a quote is shorter */
  display: grid;
  place-items: center; /* short quotes sit in the middle */
  margin: 10px 0 8px;
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.3;
  color: var(--lipstick-dark);
}
.quote-text.quote-in { animation: quote-in 0.6s ease-out; }
@keyframes quote-in {
  from { opacity: 0; transform: translateY(6px); }
}
.quote-next {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lipstick);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Postcard intro */
.postcard-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  padding: 34px 30px 30px;
  background: var(--cream);
  border-radius: 10px;
  outline: 2px dashed var(--blush);
  outline-offset: -12px;
  box-shadow: 0 10px 20px rgba(43, 27, 36, 0.22);
  transform: rotate(1.5deg);
}
.postcard-from { text-transform: uppercase; }
.postcard-intro h1 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 10px 0 6px; color: var(--mascara); letter-spacing: 0.02em; }
/* Role tags on the postcard */
.role-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; }
.role-list li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--mascara);
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-buttons .btn { padding: 8px 20px; font-size: 0.9rem; }

/* Starburst sticker */
.sticker {
  position: absolute;
  top: -30px;
  right: -22px;
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  background: var(--lipstick);
  color: var(--white);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  text-align: center;
  padding: 18px;
  overflow-wrap: anywhere;
  clip-path: polygon(50% 0%, 61% 15%, 79% 9%, 79% 28%, 97% 33%, 87% 50%, 97% 67%, 79% 72%, 79% 91%, 61% 85%, 50% 100%, 39% 85%, 21% 91%, 21% 72%, 3% 67%, 13% 50%, 3% 33%, 21% 28%, 21% 9%, 39% 15%);
  transform: rotate(12deg);
}

/* ---------- Sections ---------- */
.section-inner { max-width: 1100px; margin: 0 auto; padding: 100px 6%; }
.paper-section { position: relative; background: var(--paper); }

/* Black lace trim with white stitches and scallops, at the top and bottom of paper sections */
.paper-section::before,
.paper-section::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  background:
    repeating-linear-gradient(90deg, var(--white) 0 6px, transparent 6px 12px) 0 2px / 100% 2px no-repeat,
    linear-gradient(var(--mascara), var(--mascara)) 0 0 / 100% 6px no-repeat,
    radial-gradient(circle at 10px 5px, var(--mascara) 7px, transparent 7.5px) 0 0 / 20px 20px repeat-x;
}
.paper-section::before { top: 0; }
.paper-section::after { bottom: 0; transform: scaleY(-1); }

.eyebrow {
  font-family: var(--font-type);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lipstick);
}
h2 { font-size: clamp(2rem, 4vw, 2.7rem); margin: 4px 0 18px; }
/* Lipstick swipe under each section title */
h2::after {
  content: '';
  display: block;
  width: 72px;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px 4px 999px 4px;
  background: linear-gradient(90deg, var(--lipstick), var(--rose-gold), var(--blush));
}
h3 { font-size: 1.35rem; margin-bottom: 8px; }
.section-intro { color: var(--rose-text); margin-bottom: 40px; }
.striped-section .section-intro { color: var(--mascara); }
.muted { color: var(--rose-text); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ---------- File folders ---------- */
.folder { --folder: var(--folder-beige); position: relative; padding-top: 34px; }
.folder-pink { --folder: var(--folder-pink); }
.folder-blue { --folder: var(--folder-blue); }
.folder-tab {
  position: absolute;
  top: 0;
  left: 26px;
  height: 38px;
  max-width: calc(100% - 52px);
  padding: 8px 24px 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--folder);
  border-radius: 14px 14px 0 0;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.folder.tab-right .folder-tab { left: auto; right: 26px; }
.folder-body {
  position: relative;
  padding: 34px;
  background: var(--folder);
  border-radius: 20px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 12px 26px rgba(43, 27, 36, 0.14);
}
.paper-clip {
  position: absolute;
  top: -22px;
  right: 40px;
  width: 22px;
  height: 64px;
  color: #8F888B;
  transform: rotate(10deg);
}

/* ---------- About + receipt ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.folder-about .folder-body p + p { margin-top: 14px; }

.receipt { width: 100%; max-width: 340px; justify-self: center; }
.receipt-slot {
  position: relative;
  z-index: 1;
  height: 24px;
  border-radius: 12px;
  background: linear-gradient(#F1EEEF, #B9B3B6);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.receipt-paper {
  position: relative;
  margin: -10px 14px 16px;
  padding: 30px 22px 26px;
  background: var(--white);
  font-family: var(--font-type);
  font-size: 0.9rem;
  box-shadow: 0 10px 18px rgba(43, 27, 36, 0.12);
  transform: rotate(-1deg);
}
/* Torn zigzag bottom edge */
.receipt-paper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
  background:
    linear-gradient(135deg, var(--white) 50%, transparent 50%) 0 0 / 12px 12px repeat-x,
    linear-gradient(225deg, var(--white) 50%, transparent 50%) 0 0 / 12px 12px repeat-x;
}
.receipt-brand {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 2rem;
  color: var(--lipstick);
  line-height: 1.1;
}
.receipt-small { text-align: center; font-size: 0.72rem; letter-spacing: 0.12em; }
.receipt-head {
  margin: 18px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--mascara);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}
.receipt-list { list-style: none; }
/* "HTML ........ ♡" with a dotted line in between */
.receipt-list li { display: flex; align-items: baseline; }
.receipt-list li::after { content: ''; flex: 1; order: 1; margin: 0 8px; border-bottom: 2px dotted var(--rose-gold); }
.receipt-list li::before { content: '♡'; order: 2; color: var(--lipstick); }
.receipt-total {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 14px;
  padding: 8px 0;
  border-top: 2px dashed var(--mascara);
  border-bottom: 2px dashed var(--mascara);
  font-weight: 700;
}
.barcode {
  height: 48px;
  margin-bottom: 8px;
  background: repeating-linear-gradient(90deg,
    var(--lipstick) 0 2px, transparent 2px 4px, var(--lipstick) 4px 5px, transparent 5px 8px,
    var(--lipstick) 8px 11px, transparent 11px 12px, var(--lipstick) 12px 13px, transparent 13px 16px);
}

/* ---------- What's in my bag: a quilted makeup pouch ---------- */
.bag { margin-top: 72px; }
.bag-title { font-size: 1.6rem; }
.pouch {
  position: relative;
  margin-top: 18px;
  padding: 50px 28px 30px;
  border-radius: 28px 28px 44px 44px;
  /* Quilted diamonds */
  background:
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(255, 255, 255, 0.55) 22px 24px),
    repeating-linear-gradient(-45deg, transparent 0 22px, rgba(255, 255, 255, 0.55) 22px 24px),
    var(--folder-pink);
  box-shadow: inset 0 -8px 16px rgba(158, 42, 91, 0.12), 0 14px 28px rgba(43, 27, 36, 0.14);
}
.zipper {
  position: absolute;
  top: 16px;
  left: 26px;
  right: 26px;
  height: 10px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--rose-gold) 0 4px, #EBCDB0 4px 8px);
}
.zipper-pull {
  position: absolute;
  top: -6px;
  right: 18%;
  width: 14px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(#EBCDB0, var(--rose-gold));
  box-shadow: 0 3px 6px rgba(43, 27, 36, 0.25);
}
.gear-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  list-style: none;
}
.gear-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--cream);
  border-radius: 18px;
  box-shadow: 0 4px 10px rgba(43, 27, 36, 0.1);
  transform: rotate(-1deg);
  transition: transform 0.3s;
}
.gear-item:nth-child(even) { transform: rotate(1deg); }
.gear-item:hover { transform: rotate(0deg) translateY(-3px); }
.gear-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--blush);
  color: var(--lipstick-dark);
}
.gear-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gear-name { font-weight: 600; line-height: 1.3; }
.gear-note { font-size: 0.85rem; line-height: 1.4; color: var(--rose-text); }

/* ---------- Projects: stacked folders with polaroids ---------- */
.folder-stack { display: grid; gap: 30px; }
.project-folder .folder-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  align-items: center;
}
/* Every second folder puts the polaroid on the right */
.project-folder.tab-right .folder-body { grid-template-columns: 1fr 250px; }
.project-folder.tab-right .polaroid { order: 2; transform: rotate(3deg); }

.polaroid {
  position: relative;
  padding: 12px 12px 4px;
  background: var(--white);
  box-shadow: 0 10px 20px rgba(43, 27, 36, 0.2);
  transform: rotate(-3deg);
  transition: transform 0.3s;
}
.project-folder .polaroid:hover { transform: rotate(0deg) scale(1.03); }
/* Washi tape */
.polaroid::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: -14px;
  left: 50%;
  width: 96px;
  height: 28px;
  transform: translateX(-50%) rotate(-4deg);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.4) 0 6px, transparent 6px 12px),
    rgba(248, 200, 212, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.polaroid-photo {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(160deg, var(--powder), var(--blush));
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--rose-text);
}
.polaroid-photo img { width: 100%; height: 100%; object-fit: cover; }
.polaroid figcaption {
  padding: 8px 4px 6px;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  line-height: 1.2;
}

.folder-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.folder-text h3 { margin: 0; font-size: 1.6rem; }
.file-no { font-family: var(--font-type); font-size: 0.78rem; letter-spacing: 0.15em; color: var(--rose-text); }

/* Long descriptions show 4 lines until "Read more" is clicked */
.project-desc {
  white-space: pre-line; /* keep the line breaks typed in the admin panel */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.project-desc.expanded { display: block; }
.read-more {
  align-self: flex-start;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lipstick);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tech tags look like label-maker stickers */
.label-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 4px; }
.label-tag {
  padding: 3px 10px;
  background: var(--mascara);
  color: var(--powder);
  border-radius: 3px;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.folder-text .btn { align-self: flex-start; margin-top: 6px; }

/* Carousel of roles inside one folder (e.g. the same position over different years) */
.role-slide { display: contents; } /* its photo and text sit in the folder's grid like before */
.role-slide:not([hidden]) > * { animation: role-in 0.35s ease-out; }
@keyframes role-in {
  from { opacity: 0; transform: translateX(14px); }
}
.role-nav {
  grid-column: 1 / -1;
  order: 3;
  margin-top: -14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.role-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--mascara);
  background: var(--white);
  color: var(--mascara);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.role-arrow:hover { background: var(--mascara); color: var(--white); }
.role-dots { display: flex; gap: 8px; }
.role-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--lipstick);
  background: transparent;
  cursor: pointer;
}
.role-dot[aria-current="true"] { background: var(--lipstick); }

/* ---------- "Read more": the folder floats above the page ---------- */
.folder-dialog {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0 0 8px;
  overflow-y: auto;
  border: none;
  background: transparent;
  color: inherit;
}
.folder-dialog[open] { animation: float-in 0.4s ease-out; }
@keyframes float-in {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.folder-dialog::backdrop { background: rgba(43, 27, 36, 0.55); backdrop-filter: blur(3px); }
html:has(.folder-dialog[open]) { overflow: hidden; } /* the page behind doesn't scroll */
.folder-dialog .folder-body {
  align-items: start;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
/* The polaroid stays in place while you scroll the long text */
.folder-dialog .polaroid { position: sticky; top: 16px; }
.dialog-close {
  position: absolute;
  z-index: 2;
  top: 46px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--mascara);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.dialog-close:hover { background: var(--lipstick); }

/* ---------- Testimonials: handwritten notes with heart pins ---------- */
.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 40px 32px;
  align-items: start;
}
.note {
  --note: var(--cream);
  position: relative;
  padding: 34px 26px 24px;
  background:
    repeating-linear-gradient(transparent 0 31px, rgba(183, 110, 121, 0.22) 31px 32px) 0 22px / 100% calc(100% - 22px) no-repeat,
    var(--note);
  box-shadow: 0 10px 22px rgba(43, 27, 36, 0.14);
  transform: rotate(-1.5deg);
  transition: transform 0.3s;
}
.note:nth-child(3n+2) { --note: #FCE3EA; transform: rotate(1.5deg); }
.note:nth-child(3n+3) { --note: #E6EEF4; transform: rotate(-0.5deg); }
.note:hover { transform: rotate(0deg) translateY(-4px); }
/* Heart pin */
.note::before {
  content: '♥';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--lipstick);
  text-shadow: 0 3px 4px rgba(43, 27, 36, 0.3);
}
.note blockquote {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  line-height: 32px;
  white-space: pre-line;
}
.note figcaption { margin-top: 14px; line-height: 1.4; }
.note-name { font-weight: 600; }
.note-role { font-size: 0.85rem; color: var(--rose-text); }

/* ---------- Contact: postcard form ---------- */
.postcard-form {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  max-width: 920px;
  padding: 40px;
  background: var(--cream);
  border-radius: 12px;
  outline: 2px dashed var(--blush);
  outline-offset: -14px;
  box-shadow: 0 14px 30px rgba(43, 27, 36, 0.16);
}
.postcard-left { padding-right: 36px; border-right: 2px solid var(--blush); }
.postcard-right { display: grid; gap: 20px; align-content: start; }
.postcard-form label,
.contact-form label,
.admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 500;
}
.postcard-form label {
  font-family: var(--font-type);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-text);
}
.postcard-left .typewriter { margin-bottom: 16px; font-size: 1.1rem; font-weight: 700; color: var(--mascara); }

input, textarea, select {
  font: inherit;
  color: var(--mascara);
  background: var(--powder);
  border: 2px solid var(--blush);
  border-radius: 16px;
  padding: 12px 16px;
  transition: border-color 0.3s;
}
input:focus, textarea:focus, select:focus { border-color: var(--lipstick); outline: none; }
input.invalid, textarea.invalid { border-color: #C0392B; }
textarea { resize: vertical; }

/* Postcard fields: write on the lines */
.postcard-form input {
  padding: 6px 2px;
  background: transparent;
  border: none;
  border-bottom: 2px dashed var(--rose-gold);
  border-radius: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
}
.postcard-form input:focus { border-bottom: 2px solid var(--lipstick); }
.postcard-form input.invalid { border-bottom-color: #C0392B; }
.postcard-form textarea {
  min-height: 220px;
  padding: 0 4px;
  background: repeating-linear-gradient(transparent 0 35px, #EBC9D1 35px 36px);
  background-attachment: local;
  border: none;
  border-radius: 0;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  line-height: 36px;
  letter-spacing: normal;
  text-transform: none;
}
.postcard-form textarea:focus { box-shadow: 0 0 0 2px var(--blush); }
.postcard-form textarea.invalid { box-shadow: 0 0 0 2px #C0392B; }
.postcard-form .btn { justify-self: start; }

.postcard-marks { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.postmark {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  border: 3px double var(--rose-text);
  border-radius: 50%;
  font-family: var(--font-type);
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  color: var(--rose-text);
  transform: rotate(-12deg);
}
.stamp {
  display: grid;
  place-items: center;
  width: 70px;
  height: 84px;
  background: var(--lipstick);
  border: 6px solid var(--white);
  outline: 2px dotted var(--blush);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transform: rotate(4deg);
}
.stamp svg { width: 44px; height: 30px; fill: var(--white); }

.honeypot { position: absolute; left: -9999px; }

.form-status { font-weight: 500; min-height: 1.5em; }
.form-status.success { color: #2E7D4F; }
.form-status.error { color: #B3261E; }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: #1E1218; color: var(--powder); }
/* Lace scallops on top of the footer */
.site-footer::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 20px;
  transform: scaleY(-1);
  background: radial-gradient(circle at 10px 5px, #1E1218 7px, transparent 7.5px) 0 0 / 20px 20px repeat-x;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 6% 30px;
}
.footer-logo { font-family: var(--font-script); font-size: 2.6rem; line-height: 1.2; color: var(--blush); }
.footer-head {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}
.footer-links { list-style: none; display: grid; gap: 6px; }
.footer-links a { color: var(--blush); text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { padding: 10px 20px 40px; text-align: center; font-size: 0.9rem; color: var(--blush); }
.footer-bow { width: 40px; height: 28px; fill: var(--blush); }

/* ---------- Fade-in on scroll ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* People who turn off animations in their device settings get a calm page */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .fade-in { opacity: 1; transform: none; }
}

/* ---------- Tablets and phones ---------- */
@media (max-width: 860px) {
  .menu-bar { justify-content: space-between; padding: 4px 5%; }
  .menu-name { display: block; }
  .menu-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 5% 24px;
    background: #140B10;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 4px; }
  .nav-links li:first-child a { border-left: none; }
  .nav-links .btn { margin: 18px 0 0; }

  .tin { grid-template-columns: minmax(0, 1fr); padding: 14px; border-radius: 32px; }
  .tray { padding: 34px 18px; }
  .about-grid { grid-template-columns: 1fr; }
  .project-folder .folder-body,
  .project-folder.tab-right .folder-body { grid-template-columns: 1fr; gap: 28px; }
  .folder-dialog .polaroid { position: relative; top: 0; } /* on phones, don't let the photo cover the text */
  .project-folder .polaroid,
  .project-folder.tab-right .polaroid { order: 0; width: min(100%, 260px); justify-self: center; }
  .postcard-form { grid-template-columns: 1fr; padding: 32px 24px; }
  .postcard-left { padding: 0 0 28px; border-right: none; border-bottom: 2px solid var(--blush); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .hero { padding: 36px 4% 70px; }
  .id-grid { grid-template-columns: 96px 1fr; gap: 12px; }
  .id-stamp { right: -8px; }
  .sticker { width: 80px; top: -26px; right: -8px; font-size: 1.05rem; }
  .folder-body { padding: 26px 20px; }
  .section-inner { padding: 80px 5%; }
}
