/* ============================================================
   Harshini Patani — sketchbook skin
   Dark desk, red notebook, cream paper, hand-drawn marks.
   Shared by every page. Motion lives in sketch.js.
   ============================================================ */

:root {
  --ground: #1E1D1C;
  --ground-2: #242322;
  --red: #D5553F;
  --red-ink: #B23A2A;          /* red used for text on cream: 5:1 */
  --cream: #F3E4D1;
  --cream-2: #EADAC4;
  --paper: #FBF3E8;
  --kraft: #CDB79E;
  --ink: #1E1D1C;
  --muted: #B9AB98;            /* secondary text on the dark ground */
  --grid: rgba(120, 110, 170, 0.22);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --hand: 'Gochi Hand', 'Comic Neue', cursive;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --type: 'Courier Prime', 'Courier New', monospace;

  --rail: 56px;                /* width kept clear for the stamp rails */
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.sk {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ground);
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 5px 5px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:where(.sk) a { color: inherit; }
:where(.sk) a:hover { color: var(--red); }
.sk :focus-visible { outline: 3px dashed var(--red); outline-offset: 4px; }
.sk ::selection { background: var(--red); color: var(--ink); }
.sk img { max-width: 100%; }

.sk-skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--cream); color: var(--ink); font-family: var(--hand); font-size: 20px;
}
.sk-skip:focus { top: 12px; }

.sk-wrap { position: relative; z-index: 2; padding-inline: calc(var(--rail) + var(--gutter)); overflow-x: clip; }
.sk-hand { font-family: var(--hand); }
.sk-type { font-family: var(--type); }
.sk-mono { font-family: var(--mono); }

/* ---------- stamp rails (filled by sketch.js) ---------- */
.sk-rails { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.sk-rail { position: absolute; top: 0; bottom: 0; width: 48px; overflow: hidden; }
.sk-rail.l { left: 4px; } .sk-rail.r { right: 4px; }
.sk-rail-in { display: flex; flex-direction: column; align-items: center; gap: 8px; will-change: transform; }
.sk-tile { width: 42px; height: 42px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: var(--red); }
.sk-tile svg { width: 26px; height: 26px; }
.sk-tile.s0 { border-radius: 10px; }
.sk-tile.s1 { border-radius: 4px; transform: rotate(45deg) scale(.78); }
.sk-tile.s1 svg { transform: rotate(-45deg); }
.sk-tile.s2 { border-radius: 50% 50% 10px 10px; }
.sk-tile.s3 { border-radius: 10px 10px 50% 50%; }
@media (max-width: 720px) {
  :root { --rail: 0px; }
  .sk-rail { width: auto; height: 34px; left: 0; right: 0; bottom: auto; }
  .sk-rail.r { top: auto; bottom: 0; }
  .sk-rail-in { flex-direction: row; }
  .sk-tile { width: 28px; height: 28px; }
  .sk-tile svg { width: 18px; height: 18px; }
  body.sk { padding-block: 34px; }
}

/* ---------- margin doodles (filled by sketch.js) ---------- */
.sk-doodles { position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; pointer-events: none; z-index: 1; }
.sk-doodle { position: absolute; color: #EFE2CE; opacity: .9; will-change: transform; }
.sk-doodle svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (max-width: 1100px) { .sk-doodles { display: none; } }

/* ---------- nav ---------- */
.sk-nav { position: relative; z-index: 20; display: flex; justify-content: center; align-items: center; gap: clamp(18px, 4vw, 40px); padding: 36px var(--gutter) 0; }
.sk-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-family: var(--hand); font-size: 22px; color: var(--cream); text-decoration: none; }
.sk-nav .home { width: 44px; justify-content: center; }
.sk-scrib { position: absolute; left: -4px; right: -4px; bottom: 2px; height: 10px; width: calc(100% + 8px); overflow: visible; }
.sk-scrib path { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset .35s ease-out; }
.sk-nav a:hover .sk-scrib path, .sk-nav a[aria-current="page"] .sk-scrib path { stroke-dashoffset: 0; }
.sk-nav a:hover { color: var(--cream); }

/* ---------- footer ---------- */
.sk-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; padding: 60px calc(var(--rail) + var(--gutter)) 40px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.sk-foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.sk-foot a { display: inline-flex; align-items: center; min-height: 44px; }
.sk-foot .next { font-family: var(--hand); font-size: 26px; color: var(--cream); }

/* ---------- shared paper bits ---------- */
.grid-paper { background-color: var(--cream); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; }
.lined-paper { background-color: #F6EEDF; background-image: repeating-linear-gradient(to bottom, transparent 0 29px, rgba(70, 110, 200, .45) 29px 30px); }
.tape { position: absolute; width: 100px; height: 26px; background: rgba(243, 228, 209, .55); z-index: 2; }
.torn-top { position: absolute; left: 0; right: 0; top: -14px; height: 16px; background: inherit; -webkit-mask: var(--torn) repeat-x bottom / 64px 16px; mask: var(--torn) repeat-x bottom / 64px 16px; }
:root { --torn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 16'%3E%3Cpath d='M0 16V8l6-5 5 6 7-7 6 8 8-6 5 7 6-8 7 7 6-5 8 7v8z'/%3E%3C/svg%3E"); }
.btn-sketch { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 2px solid currentColor; border-radius: 8px 12px 10px 6px; background: transparent; color: inherit; font-family: var(--hand); font-size: 22px; text-decoration: none; cursor: pointer; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.btn-sketch:hover { transform: rotate(-2deg) scale(1.03); }
.kicker { font-family: var(--hand); font-size: 26px; color: var(--red); display: inline-block; transform: rotate(-3deg); }
.h-display { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1; }

/* ---------- reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(-36px) rotate(var(--r0, -10deg)) scale(1.06); transition: opacity .5s ease-out, transform .75s cubic-bezier(.3, 1.4, .5, 1); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: rotate(var(--r, 0deg)); }
.no-js [data-reveal] { opacity: 1; transform: rotate(var(--r, 0deg)); }

/* ============================================================
   HOME
   ============================================================ */
.book { position: relative; width: min(900px, 100%); margin: 48px auto 0; padding: 16px; background-color: var(--red); background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.035) 0 2px, transparent 2px 5px); border-radius: 30px; box-shadow: 0 30px 60px rgba(0,0,0,.5); perspective: 1600px; }
.book-top { position: relative; min-height: 470px; border-radius: 18px 18px 6px 6px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: center; gap: 20px; padding: 40px 40px 40px 60px; transform-origin: 50% 100%; box-shadow: inset 0 -30px 40px -30px rgba(0,0,0,.25); }
.book-top { animation: sk-open 1.1s cubic-bezier(.2, .8, .2, 1) .15s backwards; }
@keyframes sk-open { from { transform: rotateX(-88deg); } to { transform: rotateX(0deg); } }
.book-bottom { position: relative; margin-top: 6px; height: 470px; border-radius: 6px 6px 18px 18px; background: var(--cream); padding: 36px 60px; box-shadow: inset 0 30px 40px -30px rgba(0,0,0,.25); color: var(--red-ink); }
.book .sig { font-family: var(--hand); font-size: 46px; line-height: 1; color: var(--red-ink); transform: rotate(-4deg); display: inline-block; }
.book .role { display: block; margin-top: 8px; font-size: 28px; color: var(--red-ink); }
.book h1 { margin: 10px 0 0; font-weight: 400; font-size: clamp(36px, 4.4vw, 52px); line-height: 1.02; color: var(--red-ink); }
.book h1 em { font-style: normal; font-family: var(--hand); }
.book .where { margin-top: 14px; font-size: 20px; color: var(--red-ink); }
.book-art { position: relative; width: 100%; aspect-ratio: 36 / 33; color: var(--red); }
.book-art svg { position: absolute; overflow: visible; }
.ribbon { position: absolute; left: -36px; right: -36px; top: 470px; height: 80px; pointer-events: none; }
.book .currently { position: absolute; right: 40px; bottom: 30px; width: 210px; transform: rotate(3deg); }
.book .currently b { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .12em; }
.book .currently p { margin: 4px 0 0; font-family: var(--hand); font-size: 20px; line-height: 1.15; }
.book .leaf { position: absolute; left: 20px; bottom: 10px; width: 90px; color: var(--red); }

/* the three notes: sticky so they follow the reader down the page */
.story { position: relative; }
.notes-pin { position: sticky; top: 22vh; height: 0; z-index: 12; display: flex; justify-content: center; margin-top: -380px; pointer-events: none; }
.notes { position: relative; width: 560px; height: 330px; flex: 0 0 auto; }
.note { position: absolute; box-shadow: 0 8px 16px rgba(0,0,0,.25); will-change: transform; pointer-events: auto; }
.note p { margin: 0; color: var(--ink); }
.note.lined { left: 20px; top: 20px; width: 240px; height: 190px; --rot: -5deg; }
.note.lined::after { content: ""; position: absolute; left: 30px; top: 0; bottom: 0; width: 1.5px; background: rgba(213, 85, 63, .7); }
.note.lined p { padding: 26px 20px 0 44px; font-family: var(--hand); font-size: 36px; line-height: 30px; }
.note.lined .torn-top { top: -12px; }
.note.graph { left: 250px; top: 0; width: 270px; height: 160px; --rot: 6deg; background-color: #BDB6AC; background-image: linear-gradient(rgba(30,29,28,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(30,29,28,.18) 1px, transparent 1px); background-size: 16px 16px; }
.note.graph p { padding: 20px; font-family: var(--type); font-size: 28px; line-height: 1.05; }
.note.kraft { left: 150px; top: 170px; width: 230px; height: 160px; --rot: -1deg; background: var(--kraft); }
.note.kraft p { padding: 38px 24px 0; font-family: var(--serif); font-style: italic; font-size: 38px; line-height: 1; }
.note .clip { position: absolute; left: 30px; top: -18px; width: 40px; color: #6B635A; }
.note.settled { transition: none; }
.notes-label { position: absolute; left: 60px; top: 36px; font-size: 22px; }

.scatter { position: relative; height: 190vh; margin-top: 420px; }
.scard { margin: 0; position: absolute; width: min(360px, 26vw); padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 12px 28px rgba(0,0,0,.45); will-change: transform; }
.scard img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; object-position: center top; border-radius: 10px; background: #F1EFEB; }

.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; width: min(1040px, 100%); margin: 0 auto 24px; }
.sec-head h2 { font-size: clamp(52px, 6vw, 76px); }
.sec-head p { margin: 0; max-width: 330px; font-family: var(--type); font-size: 15px; line-height: 1.4; color: var(--cream-2); }

.mat-wrap { position: relative; width: min(1040px, 100%); margin: 0 auto; }
.mat-back { position: absolute; inset: 26px -26px -26px 30px; background: var(--red); border-radius: 22px; transform: rotate(1.2deg); }
.mat { position: relative; user-select: none; -webkit-user-select: none; height: 780px; border-radius: 22px; border: 2px solid var(--cream-2); background-color: var(--ground-2); background-image: linear-gradient(rgba(234,218,196,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(234,218,196,.22) 1px, transparent 1px); background-size: 38px 38px; background-position: 44px 40px; transform: rotate(-.6deg); overflow: hidden; }
.mat::before { content: ""; position: absolute; inset: 30px 30px 30px 40px; border: 1.5px solid rgba(234,218,196,.7); border-radius: 14px; pointer-events: none; }
.mat .ruler { position: absolute; left: 14px; top: 44px; display: flex; flex-direction: column; gap: 22px; font-family: var(--mono); font-size: 12px; color: var(--cream-2); }
.mat .motto { position: absolute; right: 34px; bottom: 2px; font-family: var(--hand); font-size: 20px; color: var(--cream); }
.mat-field { position: absolute; left: 60px; top: 30px; right: 30px; bottom: 40px; }
.dcard { position: absolute; left: 0; top: 0; padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 10px 24px rgba(0,0,0,.45); touch-action: pan-y; user-select: none; will-change: transform; }
.dcard.live { cursor: grab; touch-action: none; }
.dcard.dragging { cursor: grabbing; box-shadow: 0 22px 40px rgba(0,0,0,.55); }
.dcard > div { width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background: #E4E0D8; }
.dcard img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center top; background: #F1EFEB; pointer-events: none; }
.dcard img.contain, .scard img.contain { object-position: center; background: #fff; }
.dtag { position: absolute; left: 14px; bottom: -14px; margin: 0; padding: 2px 12px; background: var(--cream); color: var(--ink); font-family: var(--hand); font-size: 18px; line-height: 1.3; border-radius: 3px; box-shadow: 0 3px 8px rgba(0,0,0,.3); transform: rotate(var(--r, -3deg)); pointer-events: none; }
.dcard .ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.dcard .ph.ar { background: #F7F6F3; color: #16181D; }
.dcard .ph.ar b { font-family: var(--serif); font-weight: 400; font-size: 30px; }
.dcard .ph.ar i { width: 80%; height: 34px; border: 1.5px solid #16181D; border-radius: 999px; font-style: normal; display: flex; align-items: center; padding: 0 14px; font-family: var(--mono); font-size: 11px; color: #5C6373; }
.dcard .ph small { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: #4A4540; }
.dcard .ph.dg { background-color: #E9E4DA; background-image: linear-gradient(rgba(30,29,28,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(30,29,28,.12) 1px, transparent 1px); background-size: 18px 18px; color: var(--ink); }
.dcard .ph.dg b { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.drag-hint { display: block; text-align: center; margin-top: 30px; font-family: var(--hand); font-size: 22px; color: var(--muted); }

.proj-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; width: min(1040px, 100%); margin: 50px auto 0; }
.proj { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: 6px; text-decoration: none; box-shadow: 0 8px 18px rgba(0,0,0,.35); transform: rotate(var(--r, 0deg)); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .35s; }
.proj:hover { transform: translateY(-6px) rotate(calc(var(--r, 0deg) - 1deg)); box-shadow: 0 18px 30px rgba(0,0,0,.45); }
.sk .proj.c { background: var(--cream); color: var(--ink); }
.sk .proj.r { background: var(--red-ink); color: #FFF4E8; }
.sk .proj.k { background: var(--kraft); color: var(--ink); }
.proj small { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; }
.proj b { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; }
.proj span { font-family: var(--hand); font-size: 22px; }
.center-link { display: flex; justify-content: center; margin-top: 26px; }
.center-link a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--hand); font-size: 24px; }

.pocket { position: relative; width: 200px; height: 230px; margin: 120px auto 0; }
.pocket .polaroid { position: absolute; left: 22px; top: 110px; width: 156px; padding: 10px 10px 34px; background: var(--paper); border-radius: 6px; box-shadow: 0 8px 18px rgba(0,0,0,.4); transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); }
.pocket.in .polaroid { transform: translateY(-100px) rotate(-4deg); }
.pocket:hover .polaroid { transform: translateY(-120px) rotate(-6deg); }
.polaroid .photo { height: 150px; background: #CFC6BA; display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--mono); font-size: 11px; color: #4A4540; }
.polaroid .name { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-family: var(--hand); font-size: 22px; color: var(--red-ink); }
.pocket .front { position: absolute; left: 0; top: 150px; width: 200px; height: 80px; background: var(--ground); border: 2px dashed var(--red); border-top: 2px solid var(--red); border-radius: 0 0 14px 14px; }
.through { width: min(820px, 100%); margin: 50px auto 0; text-align: center; font-weight: 400; font-size: clamp(38px, 4.5vw, 58px); line-height: 1.05; }
.through em { font-style: normal; font-family: var(--hand); color: var(--red); }

.works { display: flex; gap: 28px; align-items: center; width: min(740px, 100%); margin: 120px auto 0; padding: 28px 28px 28px 32px; background: var(--cream); border-radius: 22px; color: var(--red-ink); }
.works .list { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.works h2 { margin: 0 0 6px; padding: 8px 0 6px; border-top: 1.5px solid var(--red-ink); border-bottom: 1.5px solid var(--red-ink); font-weight: 400; font-size: 34px; }
.check { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1.5px dashed rgba(178, 58, 42, .45); }
.check button { position: relative; flex: 0 0 44px; width: 44px; height: 44px; margin-left: -8px; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--red-ink); }
.check .box { position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; }
.check .box path { fill: transparent; transition: fill .2s; }
.check .tick { position: absolute; left: 9px; top: 3px; width: 30px; height: 30px; }
.check .tick path { stroke-dasharray: 60; stroke-dashoffset: 60; transition: stroke-dashoffset .35s ease-out .05s; }
.check .burst { position: absolute; left: -8px; top: -8px; width: 60px; height: 60px; opacity: 0; pointer-events: none; }
.check label, .check .txt { position: relative; font-family: var(--hand); font-size: 22px; line-height: 1.2; }
.check .strike { position: absolute; left: -4px; top: 50%; width: calc(100% + 8px); height: 12px; margin-top: -5px; overflow: visible; }
.check .strike path { stroke-dasharray: 320; stroke-dashoffset: 320; transition: stroke-dashoffset .45s ease-out .1s; }
.check[aria-checked="true"] .box path, .check.on .box path { fill: rgba(213, 85, 63, .25); }
.check.on .tick path, .check.on .strike path { stroke-dashoffset: 0; }
.check.on .burst { animation: sk-burst .5s ease-out; }
@keyframes sk-burst { 0% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
.works .say { align-self: center; margin-top: 22px; transform: rotate(-1.5deg); }
.works .frame { position: relative; flex: 0 0 240px; width: 240px; height: 230px; }
.works .frame svg { display: block; width: 100%; height: 100%; }
.works .layer { opacity: 0; transition: opacity .6s ease-out; }
.works .layer.on { opacity: 1; }

.contact { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 80px; text-align: center; }
.contact .mail { font-size: clamp(30px, 5vw, 60px); color: var(--cream); text-decoration: underline wavy var(--red) 2px; text-underline-offset: 12px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .book-top { grid-template-columns: minmax(0, 1fr); padding: 30px 26px; }
  .book-art { max-width: 300px; margin: 0 auto; }
  .ribbon { display: none; }
  .book-bottom { height: 420px; padding: 26px; }
  .book .currently { left: 26px; right: 26px; bottom: 22px; width: auto; transform: none; }
  .book .leaf { display: none; }
  .notes-pin { position: relative; top: auto; margin-top: -340px; }
  .notes { transform: scale(.6); transform-origin: 50% 0; }
  .scatter { height: auto; display: flex; gap: 16px; overflow-x: auto; padding: 60px var(--gutter) 30px; scrollbar-color: var(--red) transparent; scrollbar-width: thin; }
  .scard { position: static; flex: 0 0 240px; width: 240px; transform: none !important; }
  .mat { height: auto; transform: none; }
  .mat-field { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 40px 20px 50px 44px; }
  .dcard { position: relative; width: auto !important; height: 130px !important; transform: none !important; }
  .scard { position: relative; }
  .mat-back, .drag-hint { display: none; }
  .proj-row { grid-template-columns: minmax(0, 1fr); }
  .works { flex-direction: column-reverse; }
}

@media (max-width: 420px) { .notes { transform: scale(.5); } .notes-pin { margin-top: -320px; } }
@media (max-width: 340px) { .notes { transform: scale(.46); } }

/* ============================================================
   WORK
   ============================================================ */
.page-head { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 70px; text-align: center; }
.page-head .icon { width: 90px; color: var(--red); }
.page-head h1 { font-size: clamp(44px, 6vw, 70px); }
.page-head p { margin: 0; font-family: var(--hand); font-size: 24px; color: var(--cream-2); }
.stops { display: flex; flex-direction: column; gap: 170px; padding: 140px 0 60px; }
.stop { display: flex; flex-wrap: wrap; gap: 50px 80px; align-items: center; justify-content: center; }
.stop.col { flex-direction: column; align-items: center; }
.stop .notes-side { display: flex; flex-direction: column; gap: 26px; width: 300px; }
.stop .notes-side p { margin: 0; font-family: var(--hand); font-size: 22px; line-height: 1.2; }
.notable { display: flex; flex-direction: column; }
.notable small { font-family: var(--hand); font-size: 14px; color: var(--red); }
.notable a { display: inline-flex; align-items: center; min-height: 36px; font-family: var(--hand); font-size: 22px; color: var(--red); text-decoration: none; }
.notable a:hover { text-decoration: underline wavy var(--red) 1.5px; text-underline-offset: 5px; color: var(--red); }
.swing { transform-origin: 50% 0; transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.swing:hover { transform: rotate(-3deg) !important; }

.specimen { position: relative; width: min(330px, calc(100% - 20px)); color: var(--ink) !important; text-decoration: none; display: block; }
.specimen .string { display: block; width: 120px; margin: 0 0 -40px 70px; }
.specimen .card { position: relative; padding: 70px 26px 26px; background: var(--cream); border-radius: 10px; box-shadow: 10px 10px 0 var(--red); }
.specimen .hole { position: absolute; left: 140px; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--ground); }
.specimen .haz { display: flex; gap: 10px; margin-bottom: 14px; }
.specimen .haz svg { width: 30px; height: 30px; }
.specimen .code { font-family: var(--type); font-size: 13px; letter-spacing: .08em; }
.specimen .name { font-family: var(--type); font-weight: 700; font-size: 44px; line-height: 1.05; }
.specimen p { margin: 6px 0 16px; font-family: var(--type); font-size: 15px; line-height: 1.35; }
.specimen .lock { position: absolute; right: -16px; top: 60px; padding: 8px 12px; background: var(--red); font-family: var(--hand); font-size: 20px; border-radius: 50%; transform: rotate(14deg); }
.barcode { display: block; height: 44px; }

.libcard { position: relative; width: min(560px, 100%); padding: 24px 28px; background: var(--paper); color: var(--ink) !important; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--red-ink); text-decoration: none; display: block; }
.libcard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.libcard .top b { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; }
.libcard .top span, .libcard .row span { font-family: var(--type); font-size: 13px; }
.libcard .row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 28px; margin-top: 6px; }
.libcard .row span { padding: 6px 0; border-bottom: 1px solid rgba(30,29,28,.35); }
.libcard .row i { font-style: normal; padding: 10px 0; font-family: var(--hand); font-size: 22px; }
.libcard p { margin: 8px 0 0; font-family: var(--type); font-size: 15px; line-height: 1.4; }
.libcard .stamp { position: absolute; right: 30px; bottom: -26px; padding: 10px 16px; border: 3px double var(--red-ink); border-radius: 8px; background: var(--paper); font-family: var(--type); font-weight: 700; font-size: 20px; color: var(--red-ink); transform: rotate(-10deg); }

.band { display: flex; width: min(760px, 100%); min-height: 96px; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.4); color: var(--ink) !important; text-decoration: none; }
.band .end { flex: 0 0 70px; background: var(--cream); display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-left: 14px; }
.band .end.s { flex-basis: 40px; align-items: center; padding: 0; }
.band .end i { width: 14px; height: 14px; border-radius: 50%; background: var(--ground); }
.band .mid { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 12px 24px; background: var(--red); }
.band .mid svg.pulse { width: 150px; height: 60px; color: var(--cream); }
.band .mid b { display: block; font-family: var(--type); font-size: 34px; }
.band .mid span { font-family: var(--type); font-size: 14px; }
.band .mid .bc { margin-left: auto; text-align: right; font-family: var(--type); font-size: 11px; }

/* ============================================================
   ABOUT
   ============================================================ */
.sheet-wrap { position: relative; width: min(940px, 100%); margin: 70px auto 0; }
@media (max-width: 720px) {
  .sheet-back { left: 4px; right: 4px; transform: rotate(-.5deg); }
  .libcard .row { column-gap: 14px; }
  .specimen { width: min(300px, calc(100% - 44px)); }
  .specimen .lock { right: -6px; }
  .gate-book .clasp { right: -8px; top: 24px; width: 40px; height: 80px; }
}
.sheet-back { position: absolute; left: -20px; right: -20px; top: 40px; bottom: -30px; background-color: var(--red); background-image: linear-gradient(90deg, rgba(243,228,209,.5) 1.5px, transparent 1.5px); background-size: 70px 100%; border-radius: 10px; transform: rotate(-1deg); }
.sheet { position: relative; padding: 70px clamp(24px, 8vw, 90px); background-color: #F1E1CC; background-image: linear-gradient(rgba(213,85,63,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(213,85,63,.16) 1px, transparent 1px); background-size: 34px 34px; color: var(--ink); transform-origin: 50% 0; }
.typed { font-family: var(--type); font-size: clamp(22px, 3vw, 30px); min-height: 1.3em; }
.typed .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: currentColor; vertical-align: -2px; animation: sk-caret .9s step-end infinite; }
@keyframes sk-caret { 50% { opacity: 0; } }
.sheet h1 { margin: 90px 0 0; max-width: 600px; font-weight: 400; font-size: clamp(34px, 4.4vw, 44px); line-height: 1.05; color: var(--red-ink); }
.sheet .pair { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 40px; margin-top: 50px; }
.alsos { position: relative; width: min(300px, 100%); padding: 36px 20px 16px; background: #F7EBDA; box-shadow: 0 6px 14px rgba(0,0,0,.12); transform: rotate(-1.5deg); }
.alsos::before { content: ""; position: absolute; left: 90px; top: -12px; width: 110px; height: 26px; background: var(--red); }
.alsos > p { margin: 0; font-family: var(--hand); font-size: 24px; line-height: 1.1; color: var(--red-ink); }
.alsos .win { height: 180px; overflow: hidden; margin-top: 10px; -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); }
.alsos ul { margin: 0; padding: 0 0 0 14px; list-style: none; font-family: var(--hand); font-size: 22px; color: var(--red-ink); animation: sk-list 16s linear infinite; }
.alsos li { height: 36px; display: flex; align-items: center; white-space: nowrap; }
@keyframes sk-list { to { transform: translateY(-50%); } }
.alsos .win:hover ul { animation-play-state: paused; }
.reveal { position: relative; width: 240px; padding: 12px 12px 50px; background: var(--paper); border-radius: 8px; box-shadow: 0 10px 22px rgba(0,0,0,.2); transform: rotate(2deg); }
.reveal .photo { position: relative; height: 250px; overflow: hidden; background: #BDB3A6; display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--mono); font-size: 12px; color: #2E2A26; }
.reveal .veil { position: absolute; left: 0; right: 0; top: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; background: rgba(243, 236, 226, .92); background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.04) 0 1px, transparent 1px 4px); cursor: grab; touch-action: none; font-family: var(--hand); font-size: 20px; color: var(--red-ink); border: 0; width: 100%; }
.reveal .veil:active { cursor: grabbing; }
.reveal .name { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--hand); font-size: 28px; color: var(--red-ink); }
.cards2 { display: flex; flex-wrap: wrap; justify-content: center; padding-top: 150px; }
.card2 { width: min(400px, 100%); padding: 40px 38px; box-shadow: 0 16px 30px rgba(0,0,0,.4); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.card2:hover { transform: translateY(-6px) rotate(0deg) !important; }
.card2.c { background: var(--cream); color: var(--ink); transform: rotate(-3deg); }
.card2.r { margin-top: 20px; padding-top: 70px; background: var(--red-ink); color: #FFF4E8; transform: rotate(2deg); }
.card2 .blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.card2 .blocks i { background: var(--red); height: 90px; }
.card2 .blocks i:nth-child(1) { height: 110px; } .card2 .blocks i:nth-child(2) { height: 80px; }
.card2 .blocks i:nth-child(3) { height: 60px; border-radius: 30px; } .card2 .blocks i:nth-child(4) { margin-top: -10px; }
.card2 h2 { margin: 0 0 12px; font-weight: 400; font-size: 34px; }
.card2.r h2 { font-family: var(--hand); font-size: 30px; }
.card2.r h2 + ul, .card2.r p { font-family: var(--hand); font-size: 22px; line-height: 1.35; }
.card2 ul { margin: 0 0 30px; padding-left: 20px; }
.card2 p { margin: 0; }
.long-quote { width: min(760px, 100%); margin: 140px auto 0; text-align: center; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; }

/* ============================================================
   DIGICHEM GATE (served by middleware.js)
   ============================================================ */
.gate-book { position: relative; width: min(760px, 100%); margin: 60px auto 0; padding: 18px; background: var(--red); border-radius: 28px; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.gate-book .clasp { position: absolute; right: -26px; top: 180px; width: 60px; height: 120px; display: flex; align-items: center; justify-content: center; background: var(--red-ink); border-radius: 10px; box-shadow: 0 6px 12px rgba(0,0,0,.3); }
.gate-page { padding: clamp(30px, 7vw, 60px) clamp(22px, 8vw, 70px); border-radius: 16px; color: var(--ink); display: flex; flex-direction: column; gap: 18px; }
.gate-page.shake { animation: sk-shake .45s ease-in-out; }
@keyframes sk-shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.gate-page .code { font-family: var(--type); font-size: 14px; letter-spacing: .1em; }
.gate-page h1 { font-size: clamp(44px, 7vw, 68px); color: var(--red-ink); }
.gate-page h1 em { font-style: normal; font-family: var(--hand); }
.gate-page p { margin: 0; max-width: 520px; font-size: 22px; line-height: 1.35; }
.gate-page label { font-family: var(--hand); font-size: 22px; color: var(--red-ink); }
.gate-page .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.gate-page input { width: min(320px, 100%); height: 52px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 6px 10px 8px 12px; background: var(--paper); font-family: var(--type); font-size: 18px; color: var(--ink); }
.gate-page button { height: 52px; padding: 0 26px; border: 2px solid var(--ink); border-radius: 10px 6px 12px 8px; background: var(--ink); color: var(--cream); font-family: var(--hand); font-size: 22px; cursor: pointer; }
.gate-page .err { min-height: 1.2em; font-family: var(--hand); font-size: 22px; color: var(--red-ink); }
.gate-page .ask { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-family: var(--hand); font-size: 24px; color: var(--ink); text-decoration: underline wavy var(--red) 2px; text-underline-offset: 6px; }

/* ============================================================
   CASE STUDIES: shared shell around the existing pages
   ============================================================ */
.cs-back { display: flex; justify-content: center; margin-top: 18px; }
.cs-back a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--hand); font-size: 22px; }
.cs-sheet { position: relative; z-index: 2; width: min(1240px, calc(100% - 2 * (var(--rail) + var(--gutter)))); margin: 40px auto 0; padding: 18px; background: var(--red); border-radius: 30px; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.cs-sheet > .cs-paper { position: relative; border-radius: 18px; overflow: clip; }
@media (max-width: 720px) { .cs-sheet { padding: 8px; border-radius: 18px; width: calc(100% - 16px); } }

/* Aristto: retheme the existing layout through its own variables */
body.sk #cs, body.sk .wt {
  --paper: #F3E4D1; --ink: #1E1D1C; --slate: #5E5247; --rule: #D9C6AE;
  --accent: #B23A2A; --mark: #B23A2A;
  --disp: 'Instrument Serif', 'Times New Roman', serif;
  --body: 'Instrument Serif', 'Times New Roman', serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}
body.sk #cs { 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; }
body.sk #cs .back { display: none; }
body.sk #cs h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); color: var(--red-ink); }
body.sk #cs .lede, body.sk #cs .ch p, body.sk #cs .flow p, body.sk #cs ul.clean li { font-size: 21px; color: #3A302A; }
body.sk #cs .lab { font-family: var(--hand); font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--red-ink); }
body.sk #cs .outcome { border: 0; padding: 30px; width: 250px; height: 250px; border-radius: 50%; background: var(--red); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: rotate(-8deg); }
body.sk #cs .outcome .lab { color: var(--ink); }
body.sk #cs .outcome .n { color: var(--ink); font-size: 80px; }
body.sk #cs .outcome p { color: var(--ink); font-family: var(--hand); font-size: 18px; line-height: 1.1; }
body.sk #cs .facts { border: 0; gap: 22px; }
body.sk #cs .facts > div { position: relative; padding: 16px 18px; background: var(--paper); box-shadow: 0 6px 14px rgba(0,0,0,.14); border-right: 2px dashed rgba(30,29,28,.3); }
body.sk #cs .facts > div:nth-child(odd) { transform: rotate(-2deg); } body.sk #cs .facts > div:nth-child(even) { transform: rotate(1.5deg); background: var(--kraft); }
body.sk #cs .facts .k { font-family: var(--type); font-size: 12px; color: var(--ink); }
body.sk #cs .facts .v { font-family: var(--hand); font-size: 22px; line-height: 1.1; }
body.sk #cs .ch, body.sk #cs .flow, body.sk #cs .flow-head, body.sk #cs .end { border-top: 1.5px dashed var(--rule); }
body.sk #cs .ch h2, body.sk #cs .flow-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); color: var(--red-ink); }
body.sk #cs .rail .num { border-top: 0; font-family: var(--hand); font-size: 20px; letter-spacing: 0; color: var(--ink); flex-direction: column; }
body.sk #cs .rail .num b { font-size: 64px; line-height: .9; color: var(--red); font-weight: 400; }
body.sk #cs .rail .num.b { font-size: 18px; color: var(--slate); }
body.sk #cs .rail .num.b b { font-size: 40px; color: var(--red); }
body.sk #cs .note { border: 0; padding: 26px 18px 18px; background: var(--kraft); transform: rotate(3deg); box-shadow: 0 8px 16px rgba(0,0,0,.18); }
body.sk #cs .note .k { font-family: var(--hand); font-size: 20px; letter-spacing: 0; text-transform: none; color: var(--ink); }
body.sk #cs .note p { font-family: var(--type); font-size: 15px; color: var(--ink); }
body.sk #cs .inline-note { border-left: 0; padding: 16px 18px; background: #BDB6AC; font-family: var(--type); font-size: 15px; color: var(--ink); transform: rotate(-1deg); }
body.sk #cs .inline-note b { font-family: var(--hand); font-size: 20px; letter-spacing: 0; text-transform: none; color: var(--ink); }
body.sk #cs .callout { border-top: 0; font-family: var(--hand); font-size: clamp(26px, 2.6vw, 32px); color: var(--red-ink); }
body.sk #cs ul.clean li { border-top: 1.5px dashed var(--rule); }
body.sk #cs ul.clean li b { font-family: var(--hand); font-size: 23px; font-weight: 400; }
body.sk #cs .flow .n { font-family: var(--hand); color: var(--red); font-size: 64px; }
body.sk #cs .flow h3 { font-size: 34px; color: var(--ink); }
body.sk #cs .flow .fl { font-family: var(--type); font-size: 15px; }
body.sk #cs .flow .fl b { font-family: var(--hand); font-size: 18px; letter-spacing: 0; text-transform: none; }
body.sk #cs .next { border-top: 1.5px dashed var(--rule); }
body.sk #cs .next a { font-family: var(--hand); color: var(--red-ink); }
@media (max-width: 900px) {
  body.sk #cs .note { transform: rotate(1deg); }
  body.sk #cs .facts > div:nth-child(n) { transform: none; }
  body.sk #cs .outcome { width: 210px; height: 210px; margin-inline: auto; transform: rotate(-4deg); }
}
body.sk .wt { border-color: var(--rule); background: var(--paper); }
body.sk .wt .frame, body.sk .wt .landing, body.sk .wt .win { --disp: 'Bricolage Grotesque', Georgia, serif; --body: 'Inter Tight', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace; --paper: #F7F6F3; --ink: #16181D; --slate: #5C6373; --rule: #DFDCD5; --accent: #3B36D8; font-family: var(--body); }
body.sk .wt .frame, body.sk .wt .landing { border-radius: 16px; box-shadow: 0 0 0 12px var(--red), 0 30px 50px rgba(0,0,0,.25); }
body.sk .wt .cap .k { font-family: var(--hand); font-size: 22px; letter-spacing: 0; text-transform: none; }
body.sk .wt .cap .s { font-family: var(--hand); color: var(--ink); }
body.sk .wt .cap .r { height: 0; background: none; border-top: 1.5px dashed var(--rule); }
body.sk .wt .cap .r::after { height: 4px; top: -3px; border-radius: 3px; background: var(--red); width: 60px; }
body.sk .wt .wt-meter { font-family: var(--hand); font-size: 30px; letter-spacing: 0; color: var(--slate); }
body.sk .wt .wt-meter b { color: var(--red); font-weight: 400; font-size: 44px; }
body.sk .wt .wt-rail .dot { width: 16px; height: 16px; flex-basis: 16px; border: 2px solid var(--red); border-radius: 50% 45% 55% 48%; background: transparent; }
body.sk .wt .wt-rail .row[data-on="1"] .dot { background: var(--red); }
body.sk .wt .wt-rail .row[data-past="1"] .dot { background: rgba(213, 85, 63, .35); border-color: var(--red); }
body.sk .wt .wt-rail .stem { left: 7px; border-left: 1.5px dashed var(--red); background: none; }
body.sk .wt .wt-rail .lbl { font-family: var(--hand); font-size: 20px; letter-spacing: 0; text-transform: none; }
body.sk > header.bar, body.sk > footer:not(.sk-foot) { display: none; }

/* eVero and DigiChem render through the component runtime: frame them on the desk */
body.sk.cs-runtime .cs-paper { color: #1E1D1C; background-color: var(--cream); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; }
body.sk.cs-runtime.dgc .cs-sheet { width: calc(100% - 2 * (var(--rail) + 12px)); max-width: 1600px; padding: 10px; border-radius: 22px; }
body.sk.cs-runtime.dgc .cs-paper { color: #1A1A1A; background: #D8D6D2 linear-gradient(135deg, #DAD8D4 0%, #D2D2CF 40%, #C7CBC9 100%); }
body.sk .sk-nav a, body.sk .cs-back a, body.sk .sk-foot a { color: var(--cream); border-bottom: 0; }
body.sk .sk-foot nav a { color: var(--muted); }
body.sk .sk-nav a:hover, body.sk .cs-back a:hover, body.sk .sk-foot a:hover { color: var(--red); }

/* eVero was built without phone layouts; stack its inline grids on small screens */
@media (max-width: 760px) {
  body.cs-runtime .cs-paper [style*="grid-template-columns: 264px minmax(0px, 1fr)"],
  body.cs-runtime .cs-paper [style*="grid-template-columns: minmax(0px, 264px) minmax(0px, 1fr)"],
  body.cs-runtime .cs-paper [style*="grid-template-columns: minmax(0px, 36fr) minmax(0px, 64fr)"],
  body.cs-runtime .cs-paper [style*="grid-template-columns: minmax(0px, 1fr) minmax(0px, 1fr)"] { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; }
  body.cs-runtime .cs-paper [style*="grid-template-columns: repeat(4, minmax(0px, 1fr))"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.cs-runtime .cs-paper [style*="grid-template-columns: repeat(8, minmax(0px, 1fr))"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  body.cs-runtime .cs-paper [style*="grid-template-columns: 264px"] > [style*="position: sticky"] { position: static !important; }
}

@media (max-width: 720px) {
  body.dgc nav[style*="position: fixed"] { right: 12px !important; left: 12px !important; bottom: 44px !important; justify-content: center; }
}

/* ---------- page turn between pages ---------- */
.sk-turn { position: fixed; inset: 0; z-index: 90; pointer-events: none; transform-origin: 50% 100%; background-color: var(--cream); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; border-top: 14px solid var(--red); transform: perspective(1400px) rotateX(92deg); opacity: 0; }
.sk-turn.go { opacity: 1; transition: transform .45s cubic-bezier(.5, 0, .3, 1); transform: perspective(1400px) rotateX(0deg); }
.sk-turn.leave { opacity: 1; transform: perspective(1400px) rotateX(0deg); transition: transform .45s cubic-bezier(.5, 0, .3, 1), opacity .2s linear .35s; }
.sk-turn.leave.done { transform: perspective(1400px) rotateX(-92deg); opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .sk-rail-in, .alsos ul, .typed .caret, .book-top { animation: none !important; }
  [data-reveal], .pocket .polaroid, .swing, .proj, .card2, .works .layer, .check .tick path, .check .strike path { transition: none !important; }
  .check.on .burst, .gate-page.shake { animation: none; }
  .sk-turn { display: none; }
}
