/* =============================================================
   Lujane's notebook
   ============================================================= */
:root {
  --paper: #fbf8f1;
  --card: #fffdf8;
  --ink: #1f1d1a;
  --muted: #6f695f;
  --faint: #c9c2b4;
  /* the four accent colors (gem tones) */
  --burgundy: #b32444;
  --navy: #2650ad;
  --mustard: #e6ab2e;
  --forest: #389447;
  --cream: #fbf6e9;
  --grid: rgba(38, 80, 173, 0.07);
  --accent: var(--navy);
  --accent-text: var(--accent); /* accent used for small text */

  --hand: 'Caveat', 'Bradley Hand', cursive;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-draw: cubic-bezier(.55, .05, .35, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --k: 1;   /* sticker scale, smaller on phones */
  --T: .45; /* intro speed: 1 on the first visit, faster after */
  --gutter: clamp(20px, 5vw, 72px);
}
:root.first { --T: 1; }

/* each page gets its own accent (dock pill, labels, frames) */
body[data-page="home"]     { --accent: var(--navy); }
body[data-page="about"]    { --accent: var(--burgundy); }
body[data-page="thoughts"] { --accent: var(--mustard); --accent-text: #946c16; }
body[data-page="links"]    { --accent: var(--forest); }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  position: relative;
  overflow-x: clip;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
p { margin: 0; }
mark { background: none; color: inherit; }

.hand { font-family: var(--hand); font-weight: 600; letter-spacing: 0; }

::selection { background: var(--navy); color: var(--cream); }

:focus-visible { outline: 2px dashed var(--navy); outline-offset: 4px; border-radius: 4px; }

/* ---------- page furniture ---------- */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .55 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.margin-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56px;
  width: 1.5px;
  background: var(--burgundy);
  opacity: .22;
  z-index: 0;
  pointer-events: none;
}

/* ---------- a page = one sheet of the notebook ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(96px, 13vh, 140px) var(--gutter) 120px;
  animation: page-in .6s var(--ease-out) both;
}
body.is-leaving .page { animation: page-out .28s ease-in both; }

@keyframes page-in { from { opacity: 0; transform: translateY(28px) rotate(.4deg); } to { opacity: 1; transform: none; } }
@keyframes page-out { to { opacity: 0; transform: translateY(-22px) rotate(-.5deg); } }

/* ---------- section labels: a selected frame that types itself ---------- */
.label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border: 1.5px solid var(--accent);
  background: rgba(255, 255, 255, .55);
  color: var(--accent-text);
  font: 500 .95rem var(--sans);
  letter-spacing: .01em;
  animation: fade-up .45s var(--ease-out) .15s both;
}
.label .handle { animation-delay: .35s; }
.label-text::after { content: '_'; animation: blink 1s steps(1) infinite; }
.label.is-done .label-text::after { animation-duration: 1.2s; }
@keyframes blink { 50% { opacity: 0; } }

.handle {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #fff;
  border: 1.5px solid var(--accent);
  z-index: 4;
  animation: pop .4s var(--ease-pop) both;
}
.handle.tl { top: -5px; left: -5px; }
.handle.tr { top: -5px; right: -5px; }
.handle.bl { bottom: -5px; left: -5px; }
.handle.br { bottom: -5px; right: -5px; }

.section-head { text-align: center; display: grid; justify-items: center; gap: 22px; }
h2,
.section-head h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }

/* ---------- doodles (small hand-drawn icons + accents) ---------- */
.doodle {
  position: relative;
  display: inline-block;
  width: calc(var(--s) * 1px);
  aspect-ratio: 1;
  rotate: var(--r, 0deg);
  flex: none;
}
.doodle svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* stroke-by-stroke drawing, shared by doodles + scribbles */
.dl-stroke {
  stroke-dasharray: var(--len, 1000) calc(var(--len, 1000) + 2);
  stroke-dashoffset: var(--len, 1000);
  opacity: 0;
}
.dl-fill { opacity: 0; }
.is-drawn .dl-stroke {
  stroke-dashoffset: 0;
  opacity: 1;
  transition:
    stroke-dashoffset var(--dur, .55s) var(--ease-draw) calc(var(--i, 0) * var(--stagger, .12s) + var(--delay, 0s)),
    opacity 0s linear calc(var(--i, 0) * var(--stagger, .12s) + var(--delay, 0s));
}
.is-drawn .dl-fill {
  opacity: 1;
  transition: opacity .4s ease calc(var(--i, 0) * var(--stagger, .12s) + var(--delay, 0s) + .3s);
}

/* ---------- scribbles (circles, underlines, boxes, loops) ---------- */
.scribble-host { position: relative; display: inline-block; white-space: nowrap; }
.scribble {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  --dur: .8s;
}

/* =============================================================
   STICKERS
   wrapper  -> position, drag offset, tap squish
   img      -> pop-in, idle float, hover lift
   ============================================================= */
.sticker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  width: calc(var(--w) * 1px * var(--k));
  translate: calc(-50% + var(--dx, 0px)) calc(-50% + var(--dy, 0px));
  rotate: var(--r, 0deg);
  cursor: grab;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.sticker img {
  width: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 1px 1px rgba(60, 40, 10, .18)) drop-shadow(0 8px 10px rgba(60, 40, 10, .16));
  animation:
    sticker-pop .7s var(--ease-pop) var(--d, .2s) backwards,
    var(--idle, float) var(--idur, 6s) ease-in-out calc(var(--d, .2s) + .7s) infinite;
  transition: scale .35s var(--ease-pop), filter .3s;
}
.sticker:hover img { scale: 1.07; }
.sticker.is-dragging { cursor: grabbing; z-index: 30; }
.sticker.is-dragging img {
  scale: 1.13;
  filter: drop-shadow(0 2px 2px rgba(60, 40, 10, .2)) drop-shadow(0 22px 22px rgba(60, 40, 10, .22));
}
.sticker.is-tapped { animation: tap .5s var(--ease-out); }
.sticker--inline { position: relative; left: auto; top: auto; translate: none; cursor: default; }

@keyframes sticker-pop {
  0% { opacity: 0; scale: .3; rotate: -18deg; }
  60% { opacity: 1; }
  100% { opacity: 1; scale: 1; rotate: 0deg; }
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(0); }
  33% { transform: translate(6px, -6px) rotate(2deg); }
  66% { transform: translate(-4px, -2px) rotate(-1.5deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
@keyframes tap {
  0% { scale: 1; }
  25% { scale: .86 1.08; }
  55% { scale: 1.12 .92; }
  80% { scale: .97 1.02; }
  100% { scale: 1; }
}

/* little ink ticks that burst out wherever you click */
.spark {
  position: fixed;
  z-index: 70;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  pointer-events: none;
  overflow: visible;
}
.spark line {
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 9 20;
  stroke-dashoffset: 9;
  animation: spark .55s var(--ease-out) forwards;
}
@keyframes spark {
  0% { stroke-dashoffset: 9; opacity: 1; }
  55% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -11; opacity: 0; }
}

/* ---------- reveal on scroll ---------- */
.rise {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.rise.is-drawn { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.tape {
  position: absolute;
  width: 110px;
  height: 30px;
  background: rgba(246, 230, 180, .78);
  box-shadow: 0 1px 2px rgba(60, 40, 10, .12);
  clip-path: polygon(2% 8%, 8% 0, 16% 10%, 24% 2%, 32% 9%, 41% 1%, 50% 8%, 58% 0, 67% 9%, 75% 1%, 83% 9%, 91% 2%, 98% 8%, 100% 92%, 93% 100%, 85% 91%, 76% 99%, 68% 91%, 59% 100%, 50% 92%, 42% 100%, 33% 91%, 25% 99%, 16% 91%, 8% 100%, 0 92%);
  z-index: 3;
}

.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font: 500 .95rem var(--sans);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .3s var(--ease-pop), background .25s, scale .15s;
}
.btn-ink:hover { transform: translateY(-2px) rotate(-1deg); background: var(--navy); }
.btn-ink:active { scale: .94; }
.btn-ink span { transition: transform .3s var(--ease-pop); }
.btn-ink:hover span { transform: translateX(3px); }

/* =============================================================
   HOME
   ============================================================= */
.home { align-items: center; }
.hero-wrap { position: relative; width: min(1040px, 76vw, 100%); margin: auto; }
.sticker--card { z-index: 6; }

.frame { position: relative; }
.frame .handle { animation-delay: calc(var(--T) * 1.25s); }
/* the selection box gets dragged out by the cursor, like in Figma */
.frame-box {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1.5px solid var(--accent);
  pointer-events: none;
  animation: frame-drag calc(var(--T) * .95s + .1s) cubic-bezier(.6, 0, .3, 1) calc(var(--T) * .3s) both;
}
@keyframes frame-drag {
  from { clip-path: inset(0 100% 100% 0); background: rgba(38, 80, 173, .08); }
  85% { background: rgba(38, 80, 173, .08); }
  to { clip-path: inset(0 0 0 0); background: rgba(38, 80, 173, 0); }
}
.frame-tag,
.frame-status {
  position: absolute;
  bottom: calc(100% + 8px);
  font-size: .78rem;
  font-weight: 500;
  color: var(--accent-text);
  animation: fade-up .5s var(--ease-out) calc(var(--T) * 1.3s) both;
}
.frame-tag { left: 0; }
.frame-status { right: 0; display: flex; align-items: center; gap: 6px; color: var(--forest); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 0 rgba(56, 148, 71, .5); animation: pulse 2s infinite; }

.hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 60px);
  align-items: center;
  background: var(--card);
  padding: clamp(18px, 2.4vw, 32px);
  box-shadow: 0 30px 60px -38px rgba(60, 40, 10, .45);
  animation: fade-in .6s ease calc(var(--T) * 1.05s) both;
}
.photo {
  position: relative;
  /* as big as possible while the whole card still fits on screen */
  width: min(400px, 34vw, calc((100svh - 330px) * 692 / 882));
  margin: 0;
  rotate: -2deg;
  animation: photo-in 1s var(--ease-pop) calc(var(--T) * 1.2s) both;
  transition: rotate .4s var(--ease-pop);
}
.photo:hover { rotate: 1deg; }
.photo img {
  width: 100%;
  aspect-ratio: 692 / 882;
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 18px 30px -16px rgba(60, 40, 10, .45);
}
.tape--top { top: -14px; left: 50%; translate: -50% 0; rotate: -4deg; }

.hero-text { display: flex; flex-direction: column; align-items: flex-start; padding: 8px clamp(0px, 2vw, 24px) 8px 0; }
.home h1 {
  font-size: clamp(2.8rem, 5.8vw, 5.25rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -0.045em;
  margin-bottom: clamp(20px, 2.4vw, 32px);
  animation: fade-up .8s var(--ease-out) calc(var(--T) * 1.5s) both;
}
/* the first sentence is the lead, the second adds the detail */
.hero-lead {
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 26ch;
  text-wrap: balance;
  animation: fade-up .8s var(--ease-out) calc(var(--T) * 1.62s) both;
}
.hero-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  max-width: 38ch;
  text-wrap: pretty;
  animation: fade-up .8s var(--ease-out) calc(var(--T) * 1.72s) both;
}
.hero-cta { margin-top: clamp(22px, 2.6vw, 32px); animation: fade-up .8s var(--ease-out) calc(var(--T) * 1.85s) both; }

.psst {
  /* sits just under the card, next to the corner sticker */
  position: absolute;
  left: 13%;
  top: calc(100% + 16px);
  white-space: nowrap;
  color: var(--muted);
  font-size: 1.3rem;
  rotate: -2deg;
  animation: fade-up .7s var(--ease-out) calc(var(--T) * 2.6s) both;
}
@media (hover: none) { .psst { display: none; } }

/* multiplayer-style cursor tags */
.cursor-tag {
  position: absolute;
  left: var(--tx);
  top: var(--ty);
  z-index: 5;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  animation: tag-in .7s var(--ease-pop) calc(var(--T) * 1.8s + var(--d)) both, wander 7s ease-in-out calc(var(--T) * 2.4s + var(--d)) infinite alternate;
}
/* the first tag is the one that drags out the frame */
.cursor-tag.t1 {
  animation:
    tag-drag calc(var(--T) * 1.5s + .2s) cubic-bezier(.6, 0, .3, 1) calc(var(--T) * .1s) both,
    wander 7s ease-in-out calc(var(--T) * 2.2s) infinite alternate;
}
@keyframes tag-drag {
  0% { left: -2%; top: -6%; opacity: 0; }
  15% { left: -1%; top: -2%; opacity: 1; }
  70% { left: 100%; top: 100%; }
  100% { left: var(--tx); top: var(--ty); opacity: 1; }
}
.cursor-tag svg { width: 18px; height: 18px; fill: var(--c); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; flex: none; }
.cursor-tag span {
  margin: 14px 0 0 -2px;
  background: var(--c);
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px 12px 12px 12px;
  white-space: nowrap;
}
.cursor-tag--flip { flex-direction: row-reverse; }
.cursor-tag--flip svg { transform: scaleX(-1); }
.cursor-tag--flip span { margin: 14px -2px 0 0; border-radius: 12px 4px 12px 12px; }

/* =============================================================
   ABOUT
   ============================================================= */
.about { align-items: center; text-align: center; }
.about-inner { margin: auto; display: grid; justify-items: center; gap: 40px; }
.reveal-text {
  max-width: 34ch;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.reveal-text p { text-wrap: balance; }
.reveal-text p + p { margin-top: .9em; font-size: .72em; line-height: 1.3; letter-spacing: -0.02em; }
.reveal-text .w { opacity: .16; transition: opacity .3s linear, color .3s linear; }
.reveal-text .w.on { opacity: 1; }
.reveal-text mark .w.on { color: var(--navy); }
.reveal-text mark.is-burgundy .w.on { color: var(--burgundy); }
.reveal-text mark { white-space: nowrap; }

/* =============================================================
   THOUGHTS - a sideways carousel of video cards
   ============================================================= */
.thoughts { padding-left: 0; padding-right: 0; padding-top: clamp(72px, 10vh, 110px); }
.thoughts .section-head { padding: 0 var(--gutter); }
.see-all { color: var(--muted); text-decoration: none; font-size: 1.35rem; margin-top: -8px; transition: color .2s; }
.see-all:hover { color: var(--accent-text); }

.carousel {
  position: relative;
  margin-top: 6px;
  /* card width: fits the screen width and leaves room for the cover height */
  --cw: min(250px, 68vw, calc((100svh - 574px) * 9 / 13 + 24px));
  --gap: clamp(18px, 2.4vw, 34px);
}
.track {
  position: relative;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* room so the first and last card can sit in the middle */
  padding: 30px calc(50% - var(--cw) / 2) 34px;
  scrollbar-width: none;
  cursor: grab;
  outline-offset: -6px;
}
.track::-webkit-scrollbar { display: none; }
.track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.track.is-dragging .vcard { pointer-events: none; }

.vcard {
  --d: 0;   /* distance from the middle, in cards (set by JS) */
  --ad: 0;  /* same, always positive */
  position: relative;
  flex: none;
  width: var(--cw);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 14px;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .06), 0 26px 40px -24px rgba(40, 20, 0, .45);
  transform:
    translateY(calc(var(--ad) * 22px))
    rotate(calc(var(--rot) * var(--ad) + var(--d) * 3deg))
    scale(calc(1 - min(var(--ad), 2) * .08));
  opacity: calc(1 - min(var(--ad), 2.5) * .28);
  transition: box-shadow .3s, scale .15s;
  animation: card-in .8s var(--ease-pop) calc(.25s + var(--i, 0) * .09s) backwards;
  -webkit-user-drag: none;
}
.vcard.is-current { z-index: 2; }
.vcard.is-current:hover { box-shadow: 0 2px 3px rgba(0, 0, 0, .06), 0 34px 44px -22px rgba(40, 20, 0, .5); }
.vcard::after {
  /* a little folded corner */
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, rgba(0, 0, 0, .12) 50%, var(--paper) 50%);
}
.vcard img { -webkit-user-drag: none; }
@keyframes card-in {
  from { opacity: 0; translate: 160px 30px; rotate: 10deg; }
  to { opacity: 1; translate: 0 0; rotate: 0deg; }
}

.video-cover {
  position: relative;
  aspect-ratio: 9 / 13;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 3px;
  background: color-mix(in srgb, var(--fg) 13%, transparent);
}
.video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: scale .5s var(--ease-out); }
.vcard:hover .video-thumb { scale: 1.04; }
.vcard .sticker--corner { position: absolute; top: -22px; right: -20px; z-index: 2; width: calc(var(--w) * .45px); margin: 0; rotate: 12deg; }
.video-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--fg);
  color: var(--bg);
  font: 500 .72rem var(--sans);
  z-index: 1;
}
.play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fg);
  display: grid;
  place-items: center;
  z-index: 1;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4);
  transition: transform .35s var(--ease-pop);
}
.play svg { width: 16px; height: 16px; margin-left: 2px; fill: var(--bg); }
.vcard:hover .play { transform: scale(1.18); }
.vcard h2 { font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.18; letter-spacing: -0.02em; }
.video-cta { font-size: 1.15rem; display: inline-flex; gap: 4px; opacity: .85; }
.video-cta span { transition: transform .3s var(--ease-pop); }
.vcard:hover .video-cta span { transform: translate(2px, -2px); }

/* counter and progress line (like the reference's testimonials) */
.carousel-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
  padding: 0 var(--gutter);
  font-size: .9rem;
  color: var(--muted);
}
.count { font-variant-numeric: tabular-nums; min-width: 4.6em; text-align: center; }
.count b { color: var(--ink); font-weight: 600; }
.progress { position: relative; width: min(180px, 30vw); height: 2px; background: var(--faint); border-radius: 2px; overflow: hidden; }
.progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, .2)); transition: transform .3s var(--ease-out); }

/* =============================================================
   LINKS
   ============================================================= */
.links .section-head { margin-bottom: 48px; }
.link-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
}
.link-list li:nth-child(odd) { rotate: -.6deg; }
.link-list li:nth-child(even) { rotate: .5deg; }
.link-list a {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 22px 14px 16px;
  background: var(--card);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 14px 26px -20px rgba(60, 40, 10, .45);
  transition: transform .35s var(--ease-pop), box-shadow .3s, background .3s, scale .15s;
}
.link-list a::before {
  /* torn notebook edge */
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: radial-gradient(circle at 0 50%, var(--paper) 2.5px, transparent 3px) 0 0 / 6px 9px repeat-y;
}
.link-list a:hover { transform: translateY(-3px) rotate(-.6deg); background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 22px 30px -20px rgba(60, 40, 10, .5); }
.link-list a:active { scale: .97; }
.link-name { font-weight: 500; font-size: 1.2rem; }
.link-desc { color: var(--muted); font-size: 1.3rem; justify-self: start; }
.link-arrow { font-size: 1.3rem; transition: transform .35s var(--ease-pop); }
.link-list a:hover .link-arrow { transform: translate(3px, -3px) rotate(-8deg); color: var(--accent); }

/* =============================================================
   DOCK
   ============================================================= */
.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(31, 29, 26, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .45);
}
:root.first .dock { animation: dock-in .8s var(--ease-pop) 1.4s both; }
.dock-pill {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--pill, var(--accent));
  transform: translateX(calc(var(--at, 0) * 46px));
  transition: transform .5s var(--ease-pop), background .3s;
}
.dock.no-anim .dock-pill { transition: none; }
.dock a {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: rgba(251, 246, 233, .7);
  transition: color .25s;
}
.dock a:hover { color: var(--cream); }
.dock a.is-active { color: #fff; }
body[data-page="thoughts"] .dock a.is-active { color: var(--ink); }
.dock svg {
  position: relative;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease-pop);
}
.dock a:hover svg { transform: translateY(-2px) scale(1.08); }
.dock a:active svg { transform: scale(.82); }
.dock a.is-bump svg { animation: bump .5s var(--ease-pop); }
.dock .tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  translate: -50% 4px;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--cream);
  font: 600 1.15rem var(--hand);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, translate .25s var(--ease-pop);
}
.dock a:hover .tip,
.dock a:focus-visible .tip { opacity: 1; translate: -50% 0; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(.75) rotate(-8deg); } 70% { transform: scale(1.18) rotate(4deg); } 100% { transform: scale(1); } }

/* =============================================================
   keyframes
   ============================================================= */
@keyframes photo-in { from { opacity: 0; transform: translateY(-30px) rotate(-8deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes tag-in { from { opacity: 0; translate: 0 18px; scale: .8; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes wander {
  0% { transform: translate(0, 0); }
  35% { transform: translate(14px, -10px); }
  70% { transform: translate(-8px, 8px); }
  100% { transform: translate(10px, 4px); }
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(56, 148, 71, .5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(56, 148, 71, 0); } }
@keyframes dock-in { from { opacity: 0; translate: -50% 30px; } to { opacity: 1; translate: -50% 0; } }

/* =============================================================
   responsive
   ============================================================= */
@media (max-width: 1100px) {
  :root { --k: .8; }
  .hide-md { display: none; }
}

@media (max-width: 820px) {
  :root { --k: .62; }
  .margin-line { left: 18px; }
  .hide-sm { display: none; }
  /* optional phone-only sticker spots: --xs / --ys */
  .sticker { left: var(--xs, var(--x)); top: var(--ys, var(--y)); }

  .home .hero-wrap { margin-top: 24px; }
  .hero-wrap { width: 100%; }
  .hero-card { grid-template-columns: 1fr; padding: 16px; gap: 22px; }
  .photo { width: min(240px, 100%); margin: 6px auto 0; }
  .hero-text { padding: 0 4px 10px; text-align: center; align-items: center; }
  .home h1 { margin-bottom: 16px; }
  .cursor-tag span { font-size: .78rem; padding: 5px 10px; }
  .cursor-tag.t1 { --tx: -3% !important; --ty: 28% !important; }
  .cursor-tag.t2 { --tx: 46% !important; --ty: 5% !important; }
  .frame-status { display: none; }


  .carousel { --cw: min(240px, 64vw); }
  .link-list a { grid-template-columns: auto 1fr auto; row-gap: 0; }
  .link-desc { grid-column: 2; grid-row: 2; font-size: 1.15rem; }
  .link-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .link-list .doodle { grid-row: 1 / span 2; }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; animation-delay: 0s !important; }
}
