/* Profile pages (josh/profiles #1). One bold element: the avatar as a die-cut sticker breaking out of the card. */
:root {
  --ink: #241b2f;
  --muted: #6d6478;
  --paper: color-mix(in oklab, var(--accent) 9%, #f7f6fa);
  --card: #ffffff;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font: 17px/1.55 var(--round); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
a { color: color-mix(in oklab, var(--accent) 80%, var(--ink)); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main { max-width: 760px; margin: 0 auto; padding: 96px 20px 40px; }

/* the card */
.card { position: relative; background: var(--card); border: 10px solid var(--accent); border-radius: 34px; padding: 0 36px 32px; }
.hero { display: grid; grid-template-columns: 196px 1fr; gap: 26px; align-items: start; }
.hero .sticker { margin-top: -84px; }
.sticker { width: 196px; aspect-ratio: 1; border-radius: 50%; background: #fff; padding: 9px; transform: rotate(-4deg);
  filter: drop-shadow(0 3px 0 color-mix(in oklab, var(--accent) 55%, #000)) drop-shadow(0 10px 18px rgb(36 27 47 / .18)); }
.sticker img, .sticker span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: color-mix(in oklab, var(--accent) 22%, #fff); font: 800 88px/1 var(--round); color: var(--accent); }
.who { padding-top: 30px; }
h1 { font: 800 clamp(2.6rem, 7vw, 4.1rem)/0.95 var(--round); letter-spacing: -0.035em; margin: 0; overflow-wrap: anywhere; }
.sub { margin: 10px 0 0; color: var(--muted); font-size: .95rem; display: flex; gap: 14px; flex-wrap: wrap; }
.tagline { margin: 10px 0 0; font-size: 1.15rem; line-height: 1.4; max-width: 34ch; }
.draft-note { margin: 22px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in oklab, var(--accent) 10%, #fff);
  border: 2px dashed color-mix(in oklab, var(--accent) 45%, #fff); font-size: .9rem; }

.body section { margin-top: 30px; }
h2 { font: 800 1.05rem/1.2 var(--round); margin: 0 0 10px; color: color-mix(in oklab, var(--accent) 70%, var(--ink)); }
.body p { margin: 0 0 .8em; max-width: 64ch; }

/* stats: ten pips, filled in the accent */
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.stats li { display: grid; grid-template-columns: minmax(8ch, 15ch) auto 1fr; gap: 14px; align-items: center; }
.stat-label { font-weight: 700; }
.pips { display: inline-flex; gap: 4px; }
.pip { width: 15px; height: 15px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--accent) 60%, #fff); }
.pip.on { background: var(--accent); border-color: var(--accent); }
.stat-num, .stat-word { font-weight: 800; color: color-mix(in oklab, var(--accent) 75%, var(--ink)); }
.stats li > .stat-word { grid-column: 2 / 4; }

/* catchphrases as speech bubbles */
.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.bubbles li { position: relative; background: color-mix(in oklab, var(--accent) 12%, #fff); padding: 9px 15px; border-radius: 18px 18px 18px 4px; font-weight: 700; }
.bubbles q { quotes: none; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 2px solid color-mix(in oklab, var(--accent) 35%, #fff); border-radius: 999px; padding: 4px 13px; }
.valley { margin: 0; padding-left: 1.2em; }
.valley li { margin: 4px 0; max-width: 64ch; }
.valley li::marker { color: var(--accent); content: "✦  "; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; display: block; }
.gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: 5px; }

footer { display: flex; justify-content: space-between; gap: 12px; margin: 18px 6px 0; font-size: .85rem; color: var(--muted); }

/* an empty page */
.empty .card { margin-top: 40px; padding-top: 30px; text-align: center; }
.empty .sticker { margin: -100px auto 18px; width: 150px; }
.empty .sticker span { font-size: 66px; }

/* Missy's shrine: quiet, serif, centred, one candle */
.kind-shrine { --paper: color-mix(in oklab, var(--accent) 7%, #f8f5ef); }
.shrine { text-align: center; padding-top: 48px; font-family: var(--serif); }
.shrine h1 { font: 600 clamp(2.6rem, 8vw, 4rem)/1 var(--serif); letter-spacing: 0; margin-top: 18px; }
.portrait { width: 230px; aspect-ratio: 4/5; margin: 0 auto; border-radius: 50% / 46%; overflow: hidden;
  border: 6px solid #fff; outline: 2px solid color-mix(in oklab, var(--accent) 50%, #fff); outline-offset: 4px; }
.portrait img, .portrait span { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center;
  background: color-mix(in oklab, var(--accent) 18%, #fff); font-size: 80px; color: var(--accent); }
.shrine .dates { color: var(--muted); margin: 8px 0 0; letter-spacing: .04em; }
.shrine .tagline { margin: 14px auto 0; font-style: italic; font-size: 1.25rem; max-width: 30ch; }
.shrine section { margin: 38px auto 0; max-width: 58ch; }
.shrine h2 { font: 600 1.15rem/1.3 var(--serif); color: color-mix(in oklab, var(--accent) 60%, var(--ink)); }
.shrine .words p { line-height: 1.75; margin: 0 0 1em; }
.loved { list-style: none; padding: 0; margin: 0; }
.loved li { margin: 6px 0; }
.polaroids { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 44px 0 0; }
.polaroids figure { margin: 0; background: #fff; padding: 10px 10px 14px; width: 210px; box-shadow: 0 6px 20px rgb(60 40 20 / .14); }
.polaroids figure:nth-child(3n+1) { transform: rotate(-2deg); }
.polaroids figure:nth-child(3n+2) { transform: rotate(1.5deg); }
.polaroids img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.polaroids figcaption { font-size: .9rem; margin-top: 8px; color: var(--muted); }
.shrine footer { justify-content: center; gap: 22px; margin-top: 46px; font-family: var(--round); }
.candle { width: 18px; height: 54px; margin: 0 auto; position: relative; border-radius: 4px 4px 2px 2px; background: #fbf4e6; box-shadow: inset -3px 0 0 #eadfc9; }
.candle i { position: absolute; left: 50%; top: -20px; width: 12px; height: 20px; margin-left: -6px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6c9 0 30%, #ffc04d 55%, #ff8a3d 80%); animation: flicker 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-1deg); } 45% { transform: scale(1.06, .94) rotate(2deg); } 70% { transform: scale(.96, 1.05) rotate(-2deg); } }

@media (prefers-reduced-motion: reduce) { .candle i { animation: none; } }
@media (max-width: 600px) {
  main { padding-top: 84px; }
  .card { padding: 0 20px 24px; border-width: 8px; border-radius: 26px; }
  .hero { grid-template-columns: 1fr; gap: 10px; }
  .hero .sticker { margin-top: -76px; }
  .who { padding-top: 0; }
  .sticker { width: 150px; }
  .stats li { grid-template-columns: 1fr auto; }
  .pips { grid-column: 1 / 3; grid-row: 2; }
  .pip { width: 13px; height: 13px; }
}
