/* ═══════════════════════════════════════
   Four Creative Studios — Hyper-Realistic Notebook v4
   ═══════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --paper:       #F5F0E6;
  --paper-warm:  #F0EAD6;
  --paper-edge:  #E8E0D0;
  --paper-grid:  #DDD4C2;
  --ink:         #2A2927;
  --ink-light:   #5C574F;
  --ink-faint:   #706860;
  --teal:        #357073;
  --burnt:       #B84D00;
  --gold:        #C9A84C;
  --gold-light:  #E8D48C;
  --gold-foil:   #D4B65A;
  --cover-bg:    #3B3530;
  --cover-deep:  #2C2824;
  --cover-leather: #352F2A;
  --wire-a:      #C8C4BC;
  --wire-b:      #A8A49A;
  --wire-c:      #7A7670;
  --red-margin:  #D4A0A0;
  --tape-base:   rgba(255, 253, 240, 0.42);
  --shadow-soft: rgba(30, 25, 20, 0.15);
  --shadow-med:  rgba(30, 25, 20, 0.25);
  --shadow-hard: rgba(0, 0, 0, 0.4);
  --notebook-w:  min(960px, 84vw);
  --notebook-h:  min(679px, 84vh);
  --flip-time:   0.52s;
  --flip-ease:   cubic-bezier(0.22, 0.61, 0.36, 1.0);
  --light-angle: 315deg; /* top-left light */
  --light-x:     -1;
  --light-y:     -1;
}


/* ── RESET / BODY ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  color: var(--ink);
  background: #6B5D4E;
  cursor: default;
}


/* ═══════════════════════════════════════
   DESK SURFACE — Realistic Wood
   ═══════════════════════════════════════ */
.desk-surface {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    /* warm light pool from top-left — desk lamp */
    radial-gradient(ellipse 65% 55% at 30% 25%, rgba(180,150,100,0.18) 0%, transparent 70%),
    /* secondary ambient fill light */
    radial-gradient(ellipse 80% 60% at 70% 80%, rgba(120,90,55,0.08) 0%, transparent 60%),
    /* wood color bands — simulating plank variation */
    linear-gradient(178deg,
      #7D6E5C 0%, #756650 8%, #7A6A58 12%,
      #6F6050 20%, #6B5D4E 32%, #6E604F 40%,
      #625444 50%, #5E5040 60%, #625545 68%,
      #584A3C 78%, #504334 88%, #4A3E30 100%
    );
}

/* Wood grain overlay */
.desk-grain-overlay {
  position: absolute;
  inset: 0;
  background:
    /* horizontal wood planks */
    repeating-linear-gradient(2deg,
      transparent, transparent 120px,
      rgba(0,0,0,0.04) 120px, rgba(0,0,0,0.04) 122px
    ),
    /* grain lines */
    repeating-linear-gradient(88deg,
      transparent, transparent 3px,
      rgba(0,0,0,0.015) 3px, rgba(0,0,0,0.015) 4px
    ),
    /* subtle knot pattern */
    radial-gradient(ellipse 80px 120px at 75% 60%, rgba(80,60,30,0.08), transparent),
    radial-gradient(ellipse 60px 90px at 25% 40%, rgba(80,60,30,0.06), transparent);
  pointer-events: none;
}

/* Warm desk lamp light pool */
.desk-light-pool {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 48% 45%, rgba(255,235,190,0.06) 0%, transparent 100%);
  pointer-events: none;
}

/* Surface scratches */
.desk-scratches {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(42deg, transparent 48%, rgba(255,255,255,0.02) 49%, transparent 51%),
    linear-gradient(127deg, transparent 46%, rgba(255,255,255,0.015) 47%, transparent 49%),
    linear-gradient(83deg, transparent 52%, rgba(0,0,0,0.02) 53%, transparent 55%);
  pointer-events: none;
}

/* Desk vignette */
.desk-surface::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(30,20,10,0.32) 100%);
  pointer-events: none;
}


/* ═══════════════════════════════════════
   DESK PROPS — Photorealistic
   ═══════════════════════════════════════ */
.desk-prop { position: fixed; z-index: 1; pointer-events: none; }

/* ── Fountain Pen ── */
.fountain-pen {
  bottom: 14%;
  left: 5%;
  width: 240px;
  height: 16px;
  transform: rotate(-15deg);
  opacity: 0.92;
  filter: drop-shadow(3px 4px 6px rgba(0,0,0,0.35));
}

.pen-cap {
  position: absolute;
  left: 0;
  top: 1px;
  width: 80px;
  height: 14px;
  border-radius: 7px 2px 2px 7px;
  background: linear-gradient(180deg,
    #1a1a1a 0%, #2a2a2a 20%, #1a1a1a 40%,
    #252525 60%, #1a1a1a 80%, #151515 100%
  );
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(0,0,0,0.3);
}

.pen-cap::before {
  content: '';
  position: absolute;
  right: 0;
  top: 2px;
  width: 3px;
  height: 10px;
  background: linear-gradient(180deg, #C9A84C, #A8883A, #C9A84C);
  border-radius: 0 1px 1px 0;
}

.pen-barrel {
  position: absolute;
  left: 82px;
  top: 2px;
  width: 120px;
  height: 12px;
  border-radius: 1px;
  background: linear-gradient(180deg,
    #2a1810 0%, #4a2a1a 15%, #3d2215 30%,
    #5a3520 50%, #4a2a1a 70%, #3d2215 85%, #2a1810 100%
  );
  box-shadow: inset 0 1px 0 rgba(255,200,150,0.08), inset 0 -1px 0 rgba(0,0,0,0.2);
}

.pen-barrel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 30%;
  background: linear-gradient(180deg, rgba(255,200,150,0.12), transparent);
  border-radius: 0 0 50% 50%;
}

.pen-section {
  position: absolute;
  left: 200px;
  top: 3px;
  width: 24px;
  height: 10px;
  background: linear-gradient(90deg, #3d2215, #2a1810);
  clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
}

.pen-nib {
  position: absolute;
  left: 222px;
  top: 5px;
  width: 14px;
  height: 6px;
  background: linear-gradient(180deg, #D4B65A, #A8883A);
  clip-path: polygon(0 0, 100% 35%, 100% 65%, 0 100%);
}

.pen-nib::after {
  content: '';
  position: absolute;
  top: 40%;
  left: 30%;
  right: 10%;
  height: 1px;
  background: rgba(0,0,0,0.3);
}

.pen-clip {
  position: absolute;
  left: 10px;
  top: -4px;
  width: 50px;
  height: 4px;
  background: linear-gradient(180deg, #D4B65A, #B89840, #D4B65A);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.pen-clip::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #E8D48C, #C9A84C);
  border-radius: 0 3px 3px 0;
}

.pen-shadow-ground {
  position: absolute;
  bottom: -6px;
  left: 10%;
  width: 80%;
  height: 8px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.15), transparent);
  border-radius: 50%;
  filter: blur(2px);
}


/* ── Coffee Mug ── */
.coffee-mug {
  bottom: 18%;
  right: 6%;
  width: 70px;
  height: 60px;
  opacity: 0.88;
}

.mug-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 52px;
  height: 52px;
  background: linear-gradient(160deg, #F8F5F0, #EDE8E0, #E0DAD0, #D4CFC5);
  border-radius: 4px 4px 10px 10px;
  box-shadow:
    3px 4px 10px rgba(0,0,0,0.3),
    inset 0 -4px 10px rgba(140,120,90,0.12),
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset -2px 0 4px rgba(0,0,0,0.05);
  overflow: hidden;
}

.mug-body::before {
  content: '4C';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--cover-bg);
  opacity: 0.5;
}

.mug-coffee-surface {
  position: absolute;
  top: 3px;
  left: 4px;
  right: 4px;
  height: 8px;
  background: radial-gradient(ellipse at 40% 50%, #5A3D2A, #3B2815);
  border-radius: 50%;
  opacity: 0.85;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.mug-handle {
  position: absolute;
  bottom: 14px;
  right: -2px;
  width: 22px;
  height: 30px;
  border: 5px solid #D8D3CA;
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 3px 2px 6px rgba(0,0,0,0.2), inset -1px 0 2px rgba(255,255,255,0.3);
}

.mug-shadow {
  position: absolute;
  bottom: -5px;
  left: 2px;
  width: 56px;
  height: 14px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.25), transparent);
  border-radius: 50%;
  filter: blur(2px);
}

/* Steam */
.mug-steam {
  position: absolute;
  top: -20px;
  width: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  animation: steam 3.5s ease-in-out infinite;
}
.mug-steam.s1 { left: 14px; height: 18px; animation-delay: 0s; }
.mug-steam.s2 { left: 24px; height: 22px; animation-delay: 0.9s; }
.mug-steam.s3 { left: 34px; height: 16px; animation-delay: 1.8s; }

@keyframes steam {
  0%, 100% { opacity: 0; transform: translateY(0) scaleX(1); }
  20%      { opacity: 0.5; }
  50%      { opacity: 0.25; transform: translateY(-14px) scaleX(3); }
  80%      { opacity: 0.05; }
}


/* ── Coffee Ring Stain ── */
.coffee-ring-stain {
  bottom: 30%;
  right: 14%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(120,80,40,0.06);
  background: radial-gradient(circle,
    transparent 40%,
    rgba(120,80,40,0.03) 50%,
    rgba(120,80,40,0.06) 55%,
    transparent 70%
  );
  opacity: 0.7;
  transform: rotate(15deg);
}


/* ── Paperclip ── */
.paperclip {
  top: 14%;
  right: 12%;
  width: 14px;
  height: 40px;
  transform: rotate(-20deg);
  opacity: 0.7;
}

.paperclip::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #B8B4AC;
  border-radius: 7px 7px 3px 3px;
  background: transparent;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.2),
    inset 0 0 0 1px rgba(255,255,255,0.15);
}

.paperclip::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 3px;
  right: 3px;
  bottom: 4px;
  border: 2px solid #C4C0B8;
  border-radius: 4px;
  border-top: none;
}


/* ── Eraser crumbs ── */
.eraser-crumb {
  border-radius: 50%;
  background: #D8B8B0;
  opacity: 0.4;
  box-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.eraser-crumb.c1 { width: 4px; height: 4px; bottom: 38%; left: 18%; }
.eraser-crumb.c2 { width: 3px; height: 3px; bottom: 36%; left: 20%; }
.eraser-crumb.c3 { width: 5px; height: 4px; bottom: 39%; left: 17%; border-radius: 40%; }


/* ── Binder clip ── */
.binder-clip {
  top: 16%;
  left: 9%;
  opacity: 0.75;
  transform: rotate(12deg);
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.3));
}

.clip-body {
  width: 28px;
  height: 16px;
  background: linear-gradient(180deg, #2A2A2A, #1A1A1A);
  border-radius: 2px 2px 0 0;
}

.clip-arm {
  position: absolute;
  bottom: -8px;
  width: 8px;
  height: 12px;
  border: 2px solid #888;
  border-top: none;
  border-radius: 0 0 3px 3px;
}
.arm-l { left: 3px; }
.arm-r { right: 3px; }


/* ── Paper scrap ── */
.paper-scrap {
  top: 78%;
  left: 4%;
  width: 50px;
  height: 35px;
  background: linear-gradient(175deg, #F5F0E6, #EDE7DB);
  transform: rotate(-22deg);
  opacity: 0.55;
  box-shadow: 1px 2px 5px rgba(0,0,0,0.18);
}

.paper-scrap::before {
  content: '~ ~ ~';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Caveat', cursive;
  font-size: 10px;
  color: var(--ink-faint);
  opacity: 0.5;
}

.paper-scrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.04) 50%);
}


/* ═══════════════════════════════════════
   LOGIN NOTE — Pinned sticky
   ═══════════════════════════════════════ */
.login-note {
  top: 6%;
  right: 4%;
  pointer-events: all;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-note:hover {
  transform: scale(1.06) rotate(-1.5deg);
}

.pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.pin-head {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #E84040, #B22222, #8B1A1A);
  box-shadow:
    0 2px 5px rgba(0,0,0,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.25),
    inset 0 1px 2px rgba(255,150,150,0.5);
}

.pin-head::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 5px;
  width: 6px;
  height: 4px;
  background: rgba(255,200,200,0.6);
  border-radius: 50%;
}

.pin-needle {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: linear-gradient(180deg, #888, #666);
}

.login-paper {
  margin-top: 12px;
  padding: 14px 22px 12px;
  background: linear-gradient(175deg, #FFF9C4, #FFF59D, #FFF176);
  box-shadow:
    2px 3px 10px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.6);
  transform: rotate(-2deg);
  min-width: 140px;
  text-align: center;
  position: relative;
}

.login-paper::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.06) 50%);
}

.login-text {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.login-arrow {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 20px;
  color: var(--burnt);
  margin-top: 4px;
}


/* ═══════════════════════════════════════
   PAGE INDICATOR & TABS & ARROWS
   ═══════════════════════════════════════ */
.page-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  background: rgba(40,35,30,0.45);
  backdrop-filter: blur(6px);
  padding: 6px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}

.section-tabs {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.section-tabs.visible { opacity: 1; pointer-events: all; }

.tab {
  width: 52px;
  padding: 8px 5px;
  border: none;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: rgba(247,243,232,0.7);
  box-shadow: -2px 0 4px var(--shadow-soft);
  transition: all 0.25s ease;
  backdrop-filter: blur(2px);
}
.tab:hover { width: 60px; background: rgba(247,243,232,0.95); color: var(--ink); }
.tab.active { width: 56px; background: var(--paper); color: var(--burnt); font-weight: 600; box-shadow: -3px 0 6px var(--shadow-med); }
.tab-label { writing-mode: vertical-rl; text-orientation: mixed; display: block; }

.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(40,35,30,0.35);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.65);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  opacity: 0;
  pointer-events: none;
}
.nav-arrow.visible { opacity: 1; pointer-events: all; }
.nav-arrow:hover {
  background: rgba(40,35,30,0.6);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.08);
}
.nav-prev { left: 16px; }
.nav-next { right: 60px; }


/* ═══════════════════════════════════════
   THE NOTEBOOK — Container
   ═══════════════════════════════════════ */
.notebook-wrapper {
  position: relative;
  z-index: 10;
  width: var(--notebook-w);
  height: var(--notebook-h);
  perspective: 1400px;
  contain: layout style;
  transform: translateZ(0);
}

/* Main shadow — multi-layered for depth */
.notebook-wrapper::before {
  content: '';
  position: absolute;
  inset: 6px -5px -10px -5px;
  z-index: -1;
  border-radius: 6px;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.08),
    0 6px 12px rgba(0,0,0,0.1),
    0 14px 28px rgba(0,0,0,0.12),
    0 24px 48px rgba(0,0,0,0.15),
    /* contact shadow — very close, very dark */
    0 1px 2px rgba(0,0,0,0.2);
  pointer-events: none;
}

.notebook {
  position: relative;
  width: 100%;
  height: 100%;
}


/* ═══════════════════════════════════════
   BOOKMARK RIBBON
   ═══════════════════════════════════════ */
.bookmark-ribbon {
  position: absolute;
  top: -8px;
  left: calc(50% + 6px);
  z-index: 600;
  width: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}

.bookmark-ribbon.visible {
  opacity: 1;
}

.ribbon-body {
  width: 100%;
  height: 90px;
  background:
    repeating-linear-gradient(90deg,
      rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px,
      transparent 1px, transparent 3px
    ),
    linear-gradient(90deg,
      #8B2020 0%, #A62828 25%, #9B2424 50%, #A62828 75%, #7A1A1A 100%
    );
  box-shadow: 1px 1px 4px rgba(0,0,0,0.3), inset -1px 0 1px rgba(255,255,255,0.08);
  border-radius: 0 0 1px 1px;
}

.ribbon-end {
  width: 0;
  height: 0;
  border-left: 8px solid #8B2020;
  border-right: 8px solid #8B2020;
  border-bottom: 10px solid transparent;
}

.ribbon-shadow {
  position: absolute;
  bottom: -2px;
  left: 2px;
  width: 14px;
  height: 8px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.15), transparent);
  border-radius: 50%;
  filter: blur(1px);
}


/* ═══════════════════════════════════════
   PAGE EDGES — Book Thickness
   ═══════════════════════════════════════ */
.page-edges {
  position: absolute;
  top: 8px;
  right: -8px;
  width: 8px;
  height: calc(100% - 16px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease, width 0.3s ease;
}
.page-edges.visible { opacity: 1; }

.edge-line {
  flex: 1;
  border-bottom: 1px solid rgba(180,170,155,0.3);
  background: linear-gradient(90deg,
    rgba(215,210,200,0.85),
    rgba(235,230,220,0.95) 30%,
    rgba(240,235,225,0.9) 60%,
    rgba(225,220,210,0.85)
  );
}
.edge-line:nth-child(odd) {
  background: linear-gradient(90deg,
    rgba(210,205,195,0.8),
    rgba(230,225,215,0.9) 30%,
    rgba(235,230,220,0.85) 60%,
    rgba(220,215,205,0.78)
  );
}
.edge-line:last-child { border-bottom: none; }

.page-edges::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1), transparent 5%, transparent 95%, rgba(0,0,0,0.1));
  z-index: 1;
}
.page-edges::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.06), rgba(0,0,0,0.12));
  z-index: 2;
}

/* Bottom edges */
.page-edges-bottom {
  position: absolute;
  bottom: -8px;
  left: 50%;
  right: 8px;
  height: 8px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  pointer-events: none;
  border-radius: 0 0 2px 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease, height 0.3s ease;
}
.page-edges-bottom.visible { opacity: 1; }

.edge-line-h {
  flex: 1;
  border-right: 1px solid rgba(180,170,155,0.2);
  background: linear-gradient(180deg,
    rgba(215,210,200,0.8),
    rgba(230,225,215,0.88) 40%,
    rgba(220,215,205,0.75)
  );
}
.edge-line-h:nth-child(odd) {
  background: linear-gradient(180deg,
    rgba(210,205,195,0.75),
    rgba(225,220,210,0.85) 40%,
    rgba(215,210,200,0.7)
  );
}
.edge-line-h:last-child { border-right: none; }

.page-edges-bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.06), transparent 5%, transparent 95%, rgba(0,0,0,0.06));
  z-index: 1;
}
.page-edges-bottom::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(0,0,0,0.1), rgba(0,0,0,0.04), rgba(0,0,0,0.1));
  z-index: 2;
}


/* ═══════════════════════════════════════
   SPINE — Wire-O Binding (enhanced)
   ═══════════════════════════════════════ */
.spine {
  position: absolute;
  left: calc(50% - 7px);
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 20px 0;
}

.spine-ring {
  width: 14px;
  height: 14px;
  position: relative;
}

.ring-wire {
  width: 100%;
  height: 100%;
  border: 2.5px solid var(--wire-a);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--wire-c), var(--wire-a) 40%, var(--wire-b) 70%, var(--wire-c));
  -webkit-mask: radial-gradient(circle, transparent 28%, black 32%);
  mask: radial-gradient(circle, transparent 28%, black 32%);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.35),
    inset 0 1px 1px rgba(255,255,255,0.2);
}

/* 3D curvature highlight — light catching top arc */
.ring-wire::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 2px;
  right: 2px;
  height: 50%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
  pointer-events: none;
}

/* Cast shadow from ring onto page */
.spine-ring::after {
  content: '';
  position: absolute;
  top: 3px;
  right: -6px;
  width: 8px;
  height: 10px;
  background: radial-gradient(ellipse at left, rgba(0,0,0,0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}


/* ═══════════════════════════════════════
   FLIP SHADOW — Light sweep during turn
   ═══════════════════════════════════════ */
.flip-shadow {
  position: absolute;
  top: 0;
  left: 50%;
  right: 0;
  bottom: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,0,0,0.04) 20%,
    rgba(0,0,0,0.12) 40%,
    rgba(0,0,0,0.22) 48%,
    rgba(0,0,0,0.25) 50%,
    rgba(0,0,0,0.22) 52%,
    rgba(0,0,0,0.12) 60%,
    rgba(0,0,0,0.04) 80%,
    transparent 100%
  );
  transition: opacity 0.15s ease;
}

.flip-shadow.active {
  opacity: 1;
  animation: shadowSweep var(--flip-time) var(--flip-ease) forwards;
}

@keyframes shadowSweep {
  0%   { clip-path: inset(0 0 0 48%); opacity: 0; }
  12%  { opacity: 1; }
  50%  { clip-path: inset(0 5% 0 5%); }
  85%  { opacity: 0.3; }
  100% { clip-path: inset(0 85% 0 0); opacity: 0; }
}

.flip-shadow.active-reverse {
  opacity: 1;
  animation: shadowSweepReverse var(--flip-time) var(--flip-ease) forwards;
}

@keyframes shadowSweepReverse {
  0%   { clip-path: inset(0 48% 0 0); opacity: 0; }
  12%  { opacity: 1; }
  50%  { clip-path: inset(0 5% 0 5%); }
  85%  { opacity: 0.3; }
  100% { clip-path: inset(0 0 0 85%); opacity: 0; }
}


/* ═══════════════════════════════════════
   COVER — Realistic Leather / Linen
   ═══════════════════════════════════════ */
.cover {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  bottom: 0;
  z-index: 500;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  overflow: hidden;
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: perspective(2400px) rotateY(0deg);
  transition: transform 0.85s cubic-bezier(0.32, 0.72, 0.35, 1.02);
  backface-visibility: hidden;
}

.cover.opened {
  transform: perspective(2400px) rotateY(-165deg);
  pointer-events: none;
}
.cover.done { display: none; }

/* Multi-layer cover material */
.cover-material {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    /* warm espresso leather with natural variance */
    linear-gradient(155deg,
      #4A3F37 0%,
      #423A32 15%,
      #3B332C 35%,
      #342D27 55%,
      #2E2822 75%,
      #272320 100%
    );
  box-shadow:
    /* primary depth shadow */
    6px 10px 28px rgba(0,0,0,0.50),
    12px 16px 44px rgba(0,0,0,0.30),
    /* inner edge highlights */
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -2px 0 rgba(0,0,0,0.35),
    inset -3px 0 10px rgba(0,0,0,0.15),
    /* soft ambient glow */
    0 0 60px rgba(0,0,0,0.20);
}

/* Fine grain texture */
.cover-grain-fine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='6' seed='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Coarser grain for leather bumps */
.cover-grain-coarse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* Subtle directional sheen (like real leather under light) */
.cover-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 60% 40% at 35% 30%,
    rgba(255,245,220,0.06) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.cover-stitching {
  position: absolute;
  inset: 10px;
  border: none;
  border-radius: 3px;
  pointer-events: none;
}

/* Individual stitch marks on each side */
.cover-stitching::before,
.cover-stitching::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

/* Top + Bottom stitch lines */
.cover-stitching::before {
  top: 0; left: 8px; right: 8px; height: 0;
  border-top: 1.5px dashed transparent;
  background-image:
    repeating-linear-gradient(90deg,
      rgba(200,190,170,0.32) 0px, rgba(200,190,170,0.32) 6px,
      transparent 6px, transparent 10px
    ),
    repeating-linear-gradient(90deg,
      rgba(200,190,170,0.32) 0px, rgba(200,190,170,0.32) 6px,
      transparent 6px, transparent 10px
    );
  background-size: 10px 1.5px;
  background-position: 0 0, 0 100%;
  background-repeat: repeat-x;
  height: 100%;
  /* Only show the top and bottom lines */
  background-clip: padding-box;
}

/* Left + Right stitch lines */
.cover-stitching::after {
  top: 8px; bottom: 8px; left: 0; width: 100%;
  background-image:
    repeating-linear-gradient(180deg,
      rgba(200,190,170,0.32) 0px, rgba(200,190,170,0.32) 6px,
      transparent 6px, transparent 11px
    ),
    repeating-linear-gradient(180deg,
      rgba(200,190,170,0.32) 0px, rgba(200,190,170,0.32) 6px,
      transparent 6px, transparent 11px
    );
  background-size: 1.5px 11px;
  background-position: 0 0, 100% 0;
  background-repeat: repeat-y;
}

.cover-worn-edge {
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  width: 8px;
  background: linear-gradient(90deg, transparent, rgba(100,90,75,0.3));
  border-radius: 0 6px 6px 0;
}

/* Scuff marks on cover — subtle wear */
.cover-scuff {
  position: absolute;
  pointer-events: none;
  opacity: 0.08;
}
.cover-scuff.c1 {
  bottom: 12%;
  right: 8%;
  width: 40px;
  height: 3px;
  background: rgba(255,255,255,0.5);
  transform: rotate(-8deg);
  border-radius: 2px;
  filter: blur(1px);
}
.cover-scuff.c2 {
  bottom: 15%;
  right: 12%;
  width: 25px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  transform: rotate(-12deg);
  border-radius: 2px;
  filter: blur(1px);
}

.cover-content {
  position: absolute;
  inset: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--paper);
  z-index: 2;
}

.cover-top { display: flex; justify-content: flex-end; }

.cover-corner-stamp {
  font-family: 'Roboto Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(200,190,170,0.3);
  text-transform: uppercase;
  border: 1px solid rgba(200,190,170,0.12);
  padding: 3px 8px;
  border-radius: 2px;
}

.cover-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.cover-emboss-line {
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,180,140,0.2), transparent);
  margin-bottom: 10px;
}

.cover-emboss {
  font-size: 24px;
  color: var(--gold);
  opacity: 0.55;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 0 8px rgba(201,168,76,0.15);
}

/* Title with foil stamp effect */
.cover-title {
  position: relative;
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 3px;
}

.cover-title-text {
  background: linear-gradient(175deg,
    #E4C96A 0%,
    #D4B65A 20%,
    #C9A84C 40%,
    #B8943F 55%,
    #C9A84C 70%,
    #D4B65A 85%,
    #E4C96A 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)) drop-shadow(0 0 12px rgba(201,168,76,0.15));
}

/* Foil shimmer overlay */
.cover-title-foil {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 20%,
    rgba(255,255,255,0.12) 40%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.12) 60%,
    transparent 80%
  );
  background-size: 250% 100%;
  animation: foilShimmer 8s ease-in-out infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
}

@keyframes foilShimmer {
  0%, 100% { background-position: -250% center; }
  50%      { background-position: 250% center; }
}

.cover-rule {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 6px 0;
  opacity: 0.7;
}

.cover-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(200,190,170,0.55);
}

.cover-tagline {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(200,190,170,0.3);
  text-transform: uppercase;
  margin-top: 4px;
}

.cover-bottom { display: flex; justify-content: center; }

.cover-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border: 1px solid rgba(200,190,170,0.18);
  border-radius: 4px;
  color: rgba(200,190,170,0.55);
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.35s ease;
}

.cover-cta:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201,168,76,0.06);
  box-shadow: 0 0 20px rgba(201,168,76,0.08);
}

.cover-dog-ear {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, transparent 48%, var(--paper-edge) 48%, var(--paper) 52%);
  border-radius: 0 0 6px 0;
  filter: drop-shadow(-2px -2px 3px rgba(0,0,0,0.18));
}

.cover-dog-ear::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.06) 50%);
  border-radius: 0 0 4px 0;
}


/* ── Cover Inner (Endpaper) ── */
.cover-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  bottom: 0;
  z-index: 0;
  border-radius: 6px 0 0 6px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cover-inner.visible { opacity: 1; }

.cover-inner-texture {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #E8E2D6, #DED8CC);
}

/* Marbled endpaper pattern — Italian style */
.cover-inner-marbled {
  position: absolute;
  inset: 0;
  background:
    /* swirl layers */
    radial-gradient(ellipse 120px 200px at 25% 30%, rgba(140,90,70,0.12), transparent),
    radial-gradient(ellipse 180px 100px at 65% 55%, rgba(80,100,130,0.10), transparent),
    radial-gradient(ellipse 100px 160px at 45% 75%, rgba(130,110,80,0.08), transparent),
    radial-gradient(ellipse 90px 140px at 80% 20%, rgba(100,80,110,0.09), transparent),
    /* veining lines */
    repeating-linear-gradient(78deg,
      transparent, transparent 12px,
      rgba(120,95,70,0.06) 12px, rgba(120,95,70,0.06) 13px
    ),
    repeating-linear-gradient(162deg,
      transparent, transparent 18px,
      rgba(80,100,120,0.05) 18px, rgba(80,100,120,0.05) 19px
    ),
    repeating-linear-gradient(42deg,
      rgba(160,140,110,0.04), rgba(160,140,110,0.04) 8px,
      transparent 8px, transparent 16px
    ),
    repeating-linear-gradient(138deg,
      rgba(140,120,90,0.03), rgba(140,120,90,0.03) 12px,
      transparent 12px, transparent 24px
    );
  opacity: 0.85;
}

/* SVG noise overlay on endpaper for organic texture */
.cover-inner-marbled::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.015 0.04' numOctaves='4' seed='22' stitchTiles='stitch'/%3E%3CfeColorMatrix type='hueRotate' values='30'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='0.06'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.cover-inner-text {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: var(--ink-faint);
}

.cover-inner-name {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--ink-light);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cover-inner-addr {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: var(--ink-faint);
}


/* ═══════════════════════════════════════
   SPREADS — Realistic Page Flip Physics
   ═══════════════════════════════════════ */
.spread {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  bottom: 0;
  display: block;
  transform-origin: left center;
  transform-style: preserve-3d;
  border-radius: 0 4px 4px 0;
  overflow: visible;
  will-change: transform;
}

/* Right page = front face (visible when spread is not flipped) */
.spread .right-page {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}

/* Left page = overflows into the left half of the notebook */
.spread .left-page {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  width: 100%;
  backface-visibility: hidden;
  border-radius: 4px 0 0 4px;
  overflow: hidden;
}

/* Hide left-pages while cover is still visible — prevents white bleed on the left */
.spread .left-page {
  visibility: hidden;
}
.notebook.pages-visible .spread .left-page {
  visibility: visible;
}

/* Hide left-page during page-bend animation so it doesn't swing across */
.spread.bending .left-page {
  opacity: 0;
}

/* During JS-driven page bend, allow fold shadows to bleed slightly */
.spread.bending {
  overflow: visible;
}

/* ── Forward Page Flip — Cylindrical paper curl simulation ──
   Now driven by JavaScript requestAnimationFrame for physical bend.
   The CSS classes are kept as fallbacks but the main flip uses
   animatePageBend() in script.js which creates visible fold crease. */
.spread.flipping {
  animation: pageFlipForward var(--flip-time) cubic-bezier(0.22, 0.8, 0.36, 1.0) forwards;
}

/* JS-driven fold line — a visible crease that sweeps across the page */
.page-fold-line {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: calc(100% + 4px);
  z-index: 200;
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.50) 10%,
    rgba(0,0,0,0.60) 50%,
    rgba(0,0,0,0.50) 90%,
    rgba(0,0,0,0.10) 100%
  );
  box-shadow:
    -8px 0 16px -2px rgba(0,0,0,0.35),
     8px 0 10px -2px rgba(255,255,255,0.15),
    -16px 0 28px -6px rgba(0,0,0,0.18),
     16px 0 20px -6px rgba(0,0,0,0.10),
    /* Light rim catch — paper edge catching light */
     2px 0 6px rgba(255,255,255,0.20);
}

/* JS-driven fold shadow — dark area where paper bends */
.page-fold-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 110px;
  height: 100%;
  z-index: 199;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.18), transparent);
}

/* Fold crease gradient on forward flip ::before — also driven by CSS as enhancement */
.spread.flipping::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(0,0,0,0.03) 3%,
    transparent 8%,
    transparent 10%,
    rgba(0,0,0,0.04) 12%,
    rgba(0,0,0,0.12) 16%,
    rgba(0,0,0,0.35) 19%,
    rgba(0,0,0,0.50) 20.5%,
    rgba(255,255,255,0.25) 21.5%,
    rgba(255,255,255,0.18) 23%,
    rgba(0,0,0,0.10) 26%,
    rgba(0,0,0,0.04) 30%,
    transparent 38%,
    transparent 100%
  );
  background-size: 350% 100%;
  animation: foldCreaseSweep var(--flip-time) cubic-bezier(0.22, 0.8, 0.36, 1.0) forwards;
}

/* Shadow cast onto the page below the flipping page */
.spread.flipping::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(0,0,0,0.15) 30%,
    rgba(0,0,0,0.06) 60%,
    transparent 100%
  );
  background-size: 300% 100%;
  animation: pageShadowSweep var(--flip-time) cubic-bezier(0.22, 0.8, 0.36, 1.0) forwards;
}

@keyframes foldCreaseSweep {
  0%   { background-position: 120% 0; opacity: 0; }
  5%   { opacity: 0.4; }
  12%  { opacity: 0.8; }
  20%  { background-position: 90% 0; opacity: 1; }
  40%  { background-position: 60% 0; opacity: 1; }
  60%  { background-position: 35% 0; opacity: 1; }
  78%  { background-position: 12% 0; opacity: 0.7; }
  88%  { background-position: 0% 0; opacity: 0.3; }
  100% { background-position: -15% 0; opacity: 0; }
}

@keyframes pageShadowSweep {
  0%   { background-position: 120% 0; opacity: 0; }
  8%   { opacity: 0.3; }
  25%  { background-position: 80% 0; opacity: 0.6; }
  50%  { background-position: 50% 0; opacity: 0.5; }
  75%  { background-position: 20% 0; opacity: 0.3; }
  90%  { background-position: 0% 0; opacity: 0.1; }
  100% { background-position: -10% 0; opacity: 0; }
}

@keyframes pageFlipForward {
  0% {
    transform: perspective(2400px) rotateY(0deg) rotateX(0deg) translateZ(0px) scaleX(1) skewY(0deg);
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
  /* Corner lifts — just the edge peeling */
  4% {
    transform: perspective(2400px) rotateY(-3deg) rotateX(0deg) translateZ(2px) scaleX(1) skewY(0.3deg);
    box-shadow: -2px 3px 6px rgba(0,0,0,0.08);
  }
  /* Page peels — leading edge rises, trailing edge stays low */
  12% {
    transform: perspective(2400px) rotateY(-22deg) rotateX(-0.8deg) translateZ(6px) scaleX(0.97) skewY(0.8deg);
    box-shadow: -5px 8px 20px rgba(0,0,0,0.18);
  }
  /* Rising — paper curls, perspective makes far side smaller */
  28% {
     transform: perspective(2400px) rotateY(-55deg) rotateX(-3.8deg) translateZ(20px) scaleX(0.91) skewY(1.4deg);
    box-shadow: -8px 14px 32px rgba(0,0,0,0.28);
  }
  /* Near vertical — max curvature, foreshortening at peak */
  45% {
     transform: perspective(2400px) rotateY(-86deg) rotateX(-5deg) translateZ(24px) scaleX(0.84) skewY(1.8deg);
    box-shadow: 0 18px 48px rgba(0,0,0,0.38);
  }
  /* Past vertical — page curves back, settling begins */
  55% {
     transform: perspective(2400px) rotateY(-102deg) rotateX(-4deg) translateZ(20px) scaleX(0.87) skewY(1.4deg);
    box-shadow: 3px 16px 40px rgba(0,0,0,0.32);
  }
  /* Falling — curvature relaxes */
  70% {
    transform: perspective(2400px) rotateY(-142deg) rotateX(-1.2deg) translateZ(8px) scaleX(0.94) skewY(0.5deg);
    box-shadow: 5px 8px 22px rgba(0,0,0,0.18);
  }
  /* Approaching landing */
  82% {
    transform: perspective(2400px) rotateY(-170deg) rotateX(-0.3deg) translateZ(3px) scaleX(0.99) skewY(-0.3deg);
    box-shadow: 3px 4px 10px rgba(0,0,0,0.10);
  }
  /* Impact — slight overshoot */
  90% {
    transform: perspective(2400px) rotateY(-183deg) rotateX(0deg) translateZ(1px) scaleX(1.003) skewY(-0.3deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  /* Bounce back */
  95% {
    transform: perspective(2400px) rotateY(-179deg) rotateX(0deg) translateZ(0px) scaleX(1) skewY(0.1deg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  }
  /* Settle flat */
  100% {
    transform: perspective(2400px) rotateY(-180deg) rotateX(0deg) translateZ(0px) scaleX(1) skewY(0deg);
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
}

/* Reverse flip — matching cylindrical curl physics */
.spread.flipping-reverse {
  animation: pageFlipReverse var(--flip-time) cubic-bezier(0.22, 0.8, 0.36, 1.0) forwards;
}

/* Reverse curl gradient — fold crease sweeps right to left */
.spread.flipping-reverse::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(to left,
    transparent 0%,
    rgba(0,0,0,0.03) 3%,
    transparent 8%,
    transparent 10%,
    rgba(0,0,0,0.04) 12%,
    rgba(0,0,0,0.12) 16%,
    rgba(0,0,0,0.35) 19%,
    rgba(0,0,0,0.50) 20.5%,
    rgba(255,255,255,0.25) 21.5%,
    rgba(255,255,255,0.18) 23%,
    rgba(0,0,0,0.10) 26%,
    rgba(0,0,0,0.04) 30%,
    transparent 38%,
    transparent 100%
  );
  background-size: 350% 100%;
  animation: foldCreaseSweepReverse var(--flip-time) cubic-bezier(0.22, 0.8, 0.36, 1.0) forwards;
}

/* Reverse shadow cast */
.spread.flipping-reverse::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(to left,
    transparent 0%,
    rgba(0,0,0,0.15) 30%,
    rgba(0,0,0,0.06) 60%,
    transparent 100%
  );
  background-size: 300% 100%;
  animation: pageShadowSweepReverse var(--flip-time) cubic-bezier(0.22, 0.8, 0.36, 1.0) forwards;
}

@keyframes foldCreaseSweepReverse {
  0%   { background-position: 120% 0; opacity: 0; }
  5%   { opacity: 0.4; }
  12%  { opacity: 0.8; }
  20%  { background-position: 90% 0; opacity: 1; }
  40%  { background-position: 60% 0; opacity: 1; }
  60%  { background-position: 35% 0; opacity: 1; }
  78%  { background-position: 12% 0; opacity: 0.7; }
  88%  { background-position: 0% 0; opacity: 0.3; }
  100% { background-position: -15% 0; opacity: 0; }
}

@keyframes pageShadowSweepReverse {
  0%   { background-position: 120% 0; opacity: 0; }
  8%   { opacity: 0.3; }
  25%  { background-position: 80% 0; opacity: 0.6; }
  50%  { background-position: 50% 0; opacity: 0.5; }
  75%  { background-position: 20% 0; opacity: 0.3; }
  90%  { background-position: 0% 0; opacity: 0.1; }
  100% { background-position: -10% 0; opacity: 0; }
}

@keyframes pageFlipReverse {
  0% {
    transform: perspective(2400px) rotateY(-180deg) rotateX(0deg) translateZ(0px) scaleX(1) skewY(0deg);
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
  4% {
    transform: perspective(2400px) rotateY(-177deg) rotateX(0deg) translateZ(2px) scaleX(1) skewY(-0.3deg);
    box-shadow: 2px 3px 6px rgba(0,0,0,0.08);
  }
  12% {
    transform: perspective(2400px) rotateY(-158deg) rotateX(-0.8deg) translateZ(6px) scaleX(0.97) skewY(-0.8deg);
    box-shadow: 5px 8px 20px rgba(0,0,0,0.18);
  }
  28% {
    transform: perspective(2400px) rotateY(-125deg) rotateX(-3.8deg) translateZ(20px) scaleX(0.91) skewY(-1.4deg);
    box-shadow: 8px 14px 32px rgba(0,0,0,0.28);
  }
  45% {
    transform: perspective(2400px) rotateY(-94deg) rotateX(-5deg) translateZ(24px) scaleX(0.84) skewY(-1.8deg);
    box-shadow: 0 18px 48px rgba(0,0,0,0.38);
  }
  55% {
    transform: perspective(2400px) rotateY(-78deg) rotateX(-4deg) translateZ(20px) scaleX(0.87) skewY(-1.4deg);
    box-shadow: -3px 16px 40px rgba(0,0,0,0.32);
  }
  70% {
    transform: perspective(2400px) rotateY(-38deg) rotateX(-1.2deg) translateZ(8px) scaleX(0.94) skewY(-0.5deg);
    box-shadow: -5px 8px 22px rgba(0,0,0,0.18);
  }
  82% {
    transform: perspective(2400px) rotateY(-10deg) rotateX(-0.3deg) translateZ(3px) scaleX(0.99) skewY(0.3deg);
    box-shadow: -3px 4px 10px rgba(0,0,0,0.10);
  }
  90% {
    transform: perspective(2400px) rotateY(3deg) rotateX(0deg) translateZ(1px) scaleX(1.003) skewY(0.3deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  95% {
    transform: perspective(2400px) rotateY(1deg) rotateX(0deg) translateZ(0px) scaleX(1) skewY(-0.1deg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  }
  100% {
    transform: perspective(2400px) rotateY(0deg) rotateX(0deg) translateZ(0px) scaleX(1) skewY(0deg);
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
}

.spread.flipped {
  transform: perspective(2400px) rotateY(-180deg);
}

/* Page settle wobble — subtle flex after landing */
.spread.settling {
  animation: pageSettle 0.38s cubic-bezier(0.22, 1.1, 0.36, 1) forwards;
}

@keyframes pageSettle {
  0%   { transform: perspective(2400px) rotateY(-183deg) rotateX(-0.5deg) skewY(-0.4deg); }
  30%  { transform: perspective(2400px) rotateY(-179deg) rotateX(0.3deg) skewY(0.2deg); }
  55%  { transform: perspective(2400px) rotateY(-180.4deg) rotateX(-0.1deg) skewY(-0.05deg); }
  80%  { transform: perspective(2400px) rotateY(-179.9deg); }
  100% { transform: perspective(2400px) rotateY(-180deg) rotateX(0deg) skewY(0deg); }
}

/* Reverse settle */
.spread.settling-reverse {
  animation: pageSettleReverse 0.38s cubic-bezier(0.22, 1.1, 0.36, 1) forwards;
}

@keyframes pageSettleReverse {
  0%   { transform: perspective(2400px) rotateY(3deg) rotateX(-0.5deg) skewY(0.4deg); }
  30%  { transform: perspective(2400px) rotateY(-0.5deg) rotateX(0.3deg) skewY(-0.2deg); }
  55%  { transform: perspective(2400px) rotateY(0.4deg) rotateX(-0.1deg) skewY(0.05deg); }
  80%  { transform: perspective(2400px) rotateY(0.1deg); }
  100% { transform: perspective(2400px) rotateY(0deg) rotateX(0deg) skewY(0deg); }
}

/* Cover opening shadow — cast on the first page as cover swings */
.cover-open-shadow {
  position: absolute;
  top: 0;
  left: 50%;
  right: 0;
  bottom: 0;
  z-index: 499;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0.15) 15%,
    rgba(0,0,0,0.05) 35%,
    transparent 60%
  );
  transition: opacity 0.5s ease;
  border-radius: 0 6px 6px 0;
}

.cover-open-shadow.active {
  opacity: 1;
  animation: coverShadowSweep 1.2s ease-out forwards;
}

@keyframes coverShadowSweep {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  60%  { opacity: 0.7; }
  100% { opacity: 0; }
}


/* ═══════════════════════════════════════
   PAGES — Realistic Paper Material
   ═══════════════════════════════════════ */
.page {
  position: relative;
  overflow: hidden;
}

.left-page, .right-page {
  background: var(--paper);
}

/* Paper texture — ruled lines + fiber noise */
.page-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg,
      transparent, transparent 27px,
      var(--paper-grid) 27px, var(--paper-grid) 28px
    );
  opacity: 0.3;
}

/* Fiber / grain overlay using SVG noise */
.page-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65 1.1' numOctaves='5' seed='12' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.10'/%3E%3C/svg%3E");
  opacity: 0.9;
}

/* Natural paper imperfections — tiny specks */
.page-texture::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3' numOctaves='2' seed='20' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0 0 0 0 0 0 0 0 0.20'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.6;
}

/* Page aging — subtle yellowing at edges */
.page-aging {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* yellowing on edges */
    linear-gradient(90deg, rgba(200,180,140,0.12) 0%, transparent 10%, transparent 90%, rgba(200,180,140,0.16) 100%),
    linear-gradient(180deg, rgba(200,180,140,0.08) 0%, transparent 8%, transparent 92%, rgba(200,180,140,0.12) 100%),
    /* subtle warm vignette */
    radial-gradient(ellipse at center, transparent 55%, rgba(180,160,120,0.09) 100%);
}

/* Left page — shadow from spine (ambient occlusion) */
.left-page {
  border-right: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    /* deep gutter shadow — where pages meet spine */
    inset -16px 0 20px -10px rgba(0,0,0,0.1),
    inset 6px 0 10px -6px rgba(0,0,0,0.06),
    /* very subtle edge darkening */
    inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Right page — softer shadow, light from left */
.right-page {
  box-shadow:
    inset 16px 0 20px -10px rgba(0,0,0,0.07),
    inset -4px 0 8px -4px rgba(0,0,0,0.02),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.page-content {
  position: relative;
  z-index: 2;
  padding: 36px 32px 40px;
  height: 100%;
  overflow-y: auto;
}

.page-content::-webkit-scrollbar { width: 3px; }
.page-content::-webkit-scrollbar-track { background: transparent; }
.page-content::-webkit-scrollbar-thumb { background: var(--paper-grid); border-radius: 3px; }

.margin-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56px;
  width: 1px;
  background: var(--red-margin);
  opacity: 0.25;
  z-index: 1;
}

.page-number {
  position: absolute;
  bottom: 14px;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 1px;
}
.left-page .page-number { left: 32px; }
.right-page .page-number { right: 32px; }


/* ═══════════════════════════════════════
   PAGE CURL — Corner hover effect
   ═══════════════════════════════════════ */
.page-curl-zone {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  z-index: 10;
  cursor: pointer;
}

/* The curl itself — CSS triangle + gradient */
.page-curl-zone::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 30px 30px;
  border-color: transparent transparent var(--paper-edge) transparent;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
  filter: drop-shadow(-2px -2px 3px rgba(0,0,0,0.12));
}

/* Shadow under the curl */
.page-curl-zone::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.06) 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Hover state — curl appears */
.page-curl-zone:hover::before {
  opacity: 1;
  width: 0;
  height: 0;
  border-width: 0 0 36px 36px;
}

.page-curl-zone:hover::after {
  opacity: 1;
}


/* ═══════════════════════════════════════
   TYPOGRAPHY & NOTEBOOK ELEMENTS
   ═══════════════════════════════════════ */
.hw {
  font-family: 'Caveat', cursive;
  line-height: 1.5;
}

.handwritten-note { position: relative; }
.handwritten-note .hw { font-size: 18px; color: var(--ink-light); }
.handwritten-note .hw.small { font-size: 16px; color: var(--ink-faint); }

.signature {
  text-align: right;
  margin-top: 12px;
  font-size: 22px !important;
  color: var(--ink) !important;
}


/* ── Post-It Notes — with realistic peel ── */
.post-it {
  position: relative;
  display: inline-block;
  padding: 14px 18px;
  background: linear-gradient(178deg, #FFF8B5, #FFF59D 60%, #FFEE58);
  box-shadow:
    2px 3px 8px rgba(0,0,0,0.18),
    inset 0 -2px 3px rgba(0,0,0,0.03);
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.4;
}

/* Adhesive strip at top */
.post-it::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), transparent);
}

/* Peeling corner */
.post-it-curl {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg,
    transparent 50%,
    rgba(0,0,0,0.04) 50%,
    rgba(0,0,0,0.02) 100%
  );
}

.post-it-curl::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, transparent 50%, #F5EFD4 50%);
  box-shadow: -1px -1px 2px rgba(0,0,0,0.06);
}

.small-post-it { padding: 10px 14px; font-size: 13px; }
.large-post-it { padding: 18px 22px; }


/* ── Polaroid ── */
.polaroid { display: inline-block; }

.polaroid-frame {
  background: #FEFEFE;
  padding: 10px 10px 0;
  box-shadow: 2px 3px 12px rgba(0,0,0,0.22);
}

.polaroid-img {
  width: 220px;
  height: 170px;
  overflow: hidden;
  background: #E8E4DA;
}

.polaroid-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E8E4DA, #DED8CC);
}

.placeholder-icon { font-size: 36px; opacity: 0.5; }
.placeholder-text { font-family: 'Caveat', cursive; font-size: 14px; color: var(--ink-faint); margin-top: 4px; }

.polaroid-bottom {
  background: #FEFEFE;
  padding: 8px 10px 14px;
  box-shadow: 2px 3px 12px rgba(0,0,0,0.22);
}

.polaroid-caption { font-size: 16px; color: var(--ink-light); text-align: center; }


/* ── Stats Strip ── */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 18px 0;
  margin-top: 20px;
  border-top: 1px solid var(--paper-grid);
  border-bottom: 1px solid var(--paper-grid);
}
.stat-item { text-align: center; }
.stat-big {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}
.stat-small {
  display: block;
  font-family: 'Roboto Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2px;
}
.stat-divider { width: 1px; height: 32px; background: var(--paper-grid); }


/* ── Table of Contents ── */
.toc-kicker { font-size: 14px; color: var(--teal); margin-bottom: 8px; }
.toc-title { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 600; margin-bottom: 4px; }
.toc-rule { width: 60px; height: 2px; background: var(--burnt); margin-bottom: 20px; }
.toc-list { display: flex; flex-direction: column; gap: 12px; }

.toc-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.toc-entry:hover { color: var(--burnt); }

.toc-chapter { font-family: 'Roboto Mono', monospace; font-size: 11px; color: var(--teal); min-width: 20px; }
.toc-name { font-family: 'Cormorant Garamond', serif; font-size: 15px; font-weight: 500; }
.toc-dots { flex: 1; border-bottom: 1px dotted var(--ink-faint); margin: 0 4px; opacity: 0.4; }
.toc-pg { font-family: 'Roboto Mono', monospace; font-size: 11px; color: var(--ink-faint); }


/* ── Industry Grid ── */
.industry-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.industry-chip {
  padding: 5px 14px;
  border: 1px solid var(--paper-grid);
  border-radius: 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--ink-light);
  transition: all 0.2s ease;
}
.industry-chip:hover { border-color: var(--teal); color: var(--teal); background: rgba(95,158,160,0.06); }
.accent-chip { border-color: var(--burnt); color: var(--burnt); font-weight: 600; }


/* ── Taped Photos ── */
.taped-photo {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.taped-photo:hover { transform: scale(1.02) rotate(-0.5deg); }

.tape {
  position: absolute;
  z-index: 3;
  width: 65px;
  height: 22px;
  background: var(--tape-base);
  border: 1px solid rgba(200,200,180,0.12);
}

.tape-texture {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
    transparent, transparent 2px,
    rgba(200,190,170,0.06) 2px, rgba(200,190,170,0.06) 3px
  );
}

.tape::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 30%, transparent 70%, rgba(0,0,0,0.02));
}

.tape::after {
  content: '';
  position: absolute;
  top: 0;
  width: 3px;
  height: 100%;
  background: rgba(200,190,170,0.12);
}

.tape-tl { top: -10px; left: -10px; transform: rotate(-8deg); }
.tape-tl::after { left: 0; }
.tape-br { bottom: -10px; right: -10px; transform: rotate(6deg); }
.tape-br::after { right: 0; }
.tape-tc { top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg); }
.tape-tc::after { left: 0; }

.photo-inner {
  width: 280px;
  height: 190px;
  overflow: hidden;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.22);
}

.small-photo .photo-inner { width: 220px; height: 140px; }

.deck-thumb {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
  position: relative;
}
.dark-thumb { color: #F7F3E8; }

.thumb-kicker {
  font-family: 'Roboto Mono', monospace;
  font-size: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(247,243,232,0.4);
  margin-bottom: 8px;
}
.thumb-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 1px;
}
.thumb-accent { width: 36px; height: 3px; background: var(--gold); margin: 10px 0; }
.thumb-sub {
  font-family: 'Roboto Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(247,243,232,0.5);
}


/* ── Section Flags ── */
.section-flag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Roboto Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
}


/* ── Project Details ── */
.project-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; margin-bottom: 2px; }
.project-type-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.project-details { display: flex; flex-direction: column; gap: 14px; }

.detail-label {
  display: block;
  font-family: 'Roboto Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}

.detail-block p { font-size: 13px; line-height: 1.6; color: var(--ink-light); }
.result-highlight { color: var(--burnt) !important; font-weight: 500; }

.tag-strip { display: flex; gap: 8px; margin-top: 16px; }
.tag { font-family: 'Roboto Mono', monospace; font-size: 9px; color: var(--ink-faint); letter-spacing: 0.5px; }
.caption { font-size: 15px; color: var(--ink-light); }

/* Handwritten deck CTA arrow */
.deck-cta {
  font-size: 17px;
  color: var(--burnt);
  font-weight: 700;
  letter-spacing: 0.3px;
  opacity: 0.85;
}


/* ── Mini Project List ── */
.mini-project {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--paper-grid);
}
.mini-project:last-of-type { border-bottom: none; }

.mini-idx { font-family: 'Roboto Mono', monospace; font-size: 11px; color: var(--teal); min-width: 20px; padding-top: 2px; }
.mini-project strong { display: block; font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.mini-project p { font-family: 'Roboto Mono', monospace; font-size: 9px; color: var(--ink-faint); letter-spacing: 0.5px; }

.work-count { font-size: 18px; text-align: center; }


/* ── About Page ── */
.about-headline { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 600; line-height: 1.3; margin-bottom: 20px; }
.about-headline em { color: var(--burnt); font-style: italic; }
.about-body { font-size: 14px; line-height: 1.7; color: var(--ink-light); margin-bottom: 12px; }


/* ── Process Steps ── */
.process-step { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }

.step-circle {
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}

.process-step strong { display: block; font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.process-step p { font-size: 13px; line-height: 1.5; color: var(--ink-light); }


/* ── Contact / Business Card ── */
.contact-handwritten { padding-left: 20px; }

.business-card { position: relative; max-width: 280px; margin: 20px auto 0; }

.card-inner {
  background: var(--ink);
  border-radius: 6px;
  padding: 28px 24px;
  box-shadow: 3px 4px 14px rgba(0,0,0,0.28);
}

.card-front { display: flex; flex-direction: column; gap: 4px; }
.card-logo { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--gold); }
.card-tagline { font-family: 'Roboto Mono', monospace; font-size: 8px; letter-spacing: 2px; text-transform: uppercase; color: rgba(247,243,232,0.4); }
.card-divider { width: 40px; height: 1px; background: var(--gold); margin: 10px 0; opacity: 0.5; }
.card-details { display: flex; flex-direction: column; gap: 3px; }
.card-details span { font-family: 'Roboto Mono', monospace; font-size: 9px; color: rgba(247,243,232,0.5); letter-spacing: 0.5px; }

.social-links { margin-top: 28px; text-align: center; }
.social-link { display: inline-block; margin: 0 10px; font-size: 16px; color: var(--teal); text-decoration: none; transition: color 0.2s ease; }
.social-link:hover { color: var(--burnt); }

.notebook-end { text-align: center; margin-top: 40px; font-size: 16px; color: var(--ink-faint); }

.nda-disclosure {
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px dashed rgba(0,0,0,0.12);
  border-radius: 4px;
  background: rgba(255,248,230,0.35);
}
.nda-disclosure p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11.5px;
  line-height: 1.55;
  color: #8a7e6d;
  margin: 0;
  text-align: center;
}

.back-dog-ear {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, transparent 50%, rgba(220,215,205,0.5) 50%);
}


/* ═══════════════════════════════════════
   DECK VIEWER — Slide Preview Lightbox
   ═══════════════════════════════════════ */
.deck-viewer-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 70px 14px 28px;
  background: linear-gradient(180deg, rgba(20,18,15,0.95), rgba(20,18,15,0.6) 80%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.deck-mode .deck-viewer-header {
  opacity: 1;
  pointer-events: all;
}

.deck-viewer-title {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.deck-viewer-counter {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
}

.deck-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10002;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  background: rgba(30,25,20,0.5);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.7);
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.lightbox.deck-mode .deck-nav {
  opacity: 1;
  pointer-events: all;
}

.deck-nav:hover {
  background: rgba(30,25,20,0.8);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}

.deck-nav:disabled {
  opacity: 0.25;
  pointer-events: none;
}

.deck-nav-prev { left: 18px; }
.deck-nav-next { right: 18px; }

/* Slide container — holds the 1280×720 iframe scaled to fit */
.deck-slide-wrap {
  width: min(88vw, 1100px);
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.3),
    0 12px 40px rgba(0,0,0,0.4);
}

.deck-slide-frame {
  width: 1280px;
  height: 720px;
  border: none;
  transform-origin: top left;
  /* scale is set by JS based on container width */
}

/* Slide dots / progress bar */
.deck-progress {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.deck-mode .deck-progress {
  opacity: 1;
}

.deck-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.deck-dot.active {
  background: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.25);
}

.deck-dot:hover {
  background: rgba(255,255,255,0.5);
}


/* ═══════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20,18,15,0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.lightbox.active { opacity: 1; pointer-events: all; }

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.lightbox-close:hover { color: #fff; }

.lightbox-content { transform: scale(0.9); transition: transform 0.35s ease; }
.lightbox.active .lightbox-content { transform: scale(1); }


/* ═══════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 20px;
  background: var(--cover-bg);
  justify-content: space-between;
  align-items: center;
}

.mobile-logo { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--gold); }
.mobile-tag { font-family: 'Roboto Mono', monospace; font-size: 9px; letter-spacing: 2px; color: rgba(247,243,232,0.4); text-transform: uppercase; }


@media (max-width: 900px) {
  body { overflow-y: auto; align-items: flex-start; padding-top: 60px; }
  .desk-surface { position: fixed; }
  .desk-prop, .section-tabs, .nav-arrow, .page-indicator, .page-edges, .page-edges-bottom, .bookmark-ribbon { display: none !important; }
  .mobile-header { display: flex; }

  .login-note {
    display: block !important;
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9000 !important;
    pointer-events: all !important;
  }

  .notebook-wrapper { perspective: none; width: 96vw; height: auto; margin: 20px auto; }
  .notebook { transform-style: flat; }
  .spine { display: none; }

  .cover {
    position: relative;
    left: 0;
    width: 100%;
    height: 400px;
    border-radius: 6px;
    margin-bottom: 16px;
    transform: none !important;
  }
  .cover-inner { display: none; }

  .spread {
    position: relative;
    left: 0;
    width: 100%;
    display: block;
    transform: none !important;
    transform-style: flat;
    animation: none !important;
    border-radius: 6px;
    margin-bottom: 16px;
    min-height: auto;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .spread .left-page,
  .spread .right-page {
    position: relative;
    inset: auto;
    right: auto;
    width: 100%;
    transform: none !important;
    backface-visibility: visible;
    border-radius: 6px;
    min-height: 400px;
  }
  .spread .left-page { margin-bottom: 8px; }
  .flip-shadow { display: none; }
  .page-fold-line, .page-fold-shadow { display: none; }
  .page-curl-zone { display: none; }
}

@media (max-width: 600px) {
  .page-content { padding: 24px 18px 32px; }
  .photo-inner { width: 100%; height: 160px; }
  .small-photo .photo-inner { width: 100%; height: 120px; }
  .stats-strip { gap: 12px; }
  .stat-big { font-size: 22px; }
  .polaroid-img { width: 180px; height: 130px; }
}


/* ═══════════════════════════════════════
   COVER HINT — Onboarding pulse
   ═══════════════════════════════════════ */
.cover-hint {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,190,170,0.35);
  margin-top: 14px;
  opacity: 0;
  animation: hintFadeIn 0.8s ease 3.5s forwards;
  transition: opacity 0.4s ease;
}

@keyframes hintFadeIn {
  to { opacity: 1; }
}

.cover.opened ~ .cover-hint,
.cover.done ~ .cover-hint {
  opacity: 0 !important;
  animation: none;
}

/* Cover CTA breathing pulse */
.cover-cta {
  animation: ctaPulse 3.5s ease-in-out 4.5s infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: none; border-color: rgba(200,190,170,0.18); }
  50% { box-shadow: 0 0 24px rgba(201,168,76,0.12), inset 0 0 0 1px rgba(201,168,76,0.08); border-color: rgba(201,168,76,0.3); }
}

.cover.opened .cover-cta {
  animation: none;
}


/* ═══════════════════════════════════════
   STUDIO GRADIENT — Replaces emoji placeholder
   ═══════════════════════════════════════ */
.studio-gradient {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(95,80,60,0.3) 0%, transparent 70%),
    linear-gradient(155deg, #3B3530 0%, #2C2824 40%, #352F2A 70%, #252220 100%);
  position: relative;
  overflow: hidden;
}

.studio-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='5' seed='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.studio-mark {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(175deg, var(--gold-light), var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.studio-place {
  font-family: 'Roboto Mono', monospace;
  font-size: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(200,190,170,0.4);
  position: relative;
  z-index: 1;
}


/* ═══════════════════════════════════════
   POST-IT COLOR VARIATIONS
   ═══════════════════════════════════════ */
.post-it.blue-note {
  background: linear-gradient(178deg, #D4EAFF, #B8DCFF 60%, #9ECFFF);
}
.post-it.blue-note .post-it-curl::after {
  background: linear-gradient(135deg, transparent 50%, #C8E4FF 50%);
}

.post-it.pink-note {
  background: linear-gradient(178deg, #FFD6E0, #FFBCCC 60%, #FFA5B8);
}
.post-it.pink-note .post-it-curl::after {
  background: linear-gradient(135deg, transparent 50%, #FFCCD8 50%);
}

.post-it.green-note {
  background: linear-gradient(178deg, #D4F0D0, #B8E8B2 60%, #9EDD96);
}
.post-it.green-note .post-it-curl::after {
  background: linear-gradient(135deg, transparent 50%, #C8ECC4 50%);
}


/* ═══════════════════════════════════════
   TAB COLOR ACCENTS — Section identity
   ═══════════════════════════════════════ */
.tab { position: relative; }

.tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tab:nth-child(1)::before { background: var(--ink-faint); }
.tab:nth-child(2)::before { background: var(--ink-faint); }
.tab:nth-child(3)::before { background: #C9A84C; }
.tab:nth-child(4)::before { background: #7B8F6E; }
.tab:nth-child(5)::before { background: #0077FF; }
.tab:nth-child(6)::before { background: #3ECAC5; }
.tab:nth-child(7)::before { background: #2C7A7A; }
.tab:nth-child(8)::before { background: #C4693C; }
.tab:nth-child(9)::before { background: var(--burnt); }
.tab:nth-child(10)::before { background: var(--teal); }

.tab:hover::before,
.tab.active::before { opacity: 1; }


/* ═══════════════════════════════════════
   SPREAD ENTRANCE ANIMATION
   ═══════════════════════════════════════ */
.spread .page-content {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease 0.12s, transform 0.55s ease 0.12s;
}

.spread.current .page-content {
  opacity: 1;
  transform: translateY(0);
}

.spread.current .right-page .page-content {
  transition-delay: 0.28s;
}


/* ═══════════════════════════════════════
   FONT SIZE MINIMUMS — Accessibility
   ═══════════════════════════════════════ */
.thumb-kicker { font-size: max(9px, 0.55em); }
.tag { font-size: max(10px, 0.6em); }
.detail-label { font-size: max(10px, 0.6em); }
.section-flag { font-size: max(10px, 0.6em); }
.project-type-label { font-size: max(11px, 0.65em); }
.mini-project p { font-size: max(10px, 0.6em); }
.card-tagline { font-size: max(9px, 0.55em); }
.card-details span { font-size: max(10px, 0.6em); }


/* ═══════════════════════════════════════
   FONT VARIETY — Kalam for handwriting
   ═══════════════════════════════════════ */
.signature { font-family: 'Kalam', cursive !important; }
.process-heading { font-family: 'Kalam', cursive; }
.intro-note { font-family: 'Kalam', cursive; }
.intro-note .hw { font-family: 'Kalam', cursive; }


/* ═══════════════════════════════════════
   COVER REFINEMENTS — Scuffs visibility
   ═══════════════════════════════════════ */
.cover-scuff { opacity: 0.18; }


/* ═══════════════════════════════════════
   PERFORMANCE — will-change optimization
   ═══════════════════════════════════════ */
.spread { will-change: transform; contain: layout style; }
.spread.bending { will-change: transform; }
.spread .left-page,
.spread .right-page { will-change: auto; contain: layout style paint; }


/* ═══════════════════════════════════════
   RESPONSIVE PROPS — Prevent overlap
   ═══════════════════════════════════════ */
@media (max-width: 1200px) {
  .fountain-pen { left: 2%; bottom: 8%; transform: rotate(-15deg) scale(0.8); }
  .coffee-mug { right: 3%; bottom: 12%; transform: scale(0.85); }
  .coffee-ring-stain { display: none; }
  .paperclip { right: 8%; top: 10%; }
  .binder-clip { left: 5%; top: 10%; }
}

@media (max-width: 1050px) {
  .fountain-pen { opacity: 0.6; transform: rotate(-15deg) scale(0.7); }
  .coffee-mug { opacity: 0.6; transform: scale(0.75); }
  .paper-scrap { display: none; }
  .eraser-crumb { display: none; }
}


/* ═══════════════════════════════════════
   MOBILE IMPROVEMENTS — Better experience
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  /* Better cover sizing */
  .cover {
    height: auto;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cover-content {
    position: relative;
    inset: auto;
    padding: 40px 24px;
    width: 100%;
    max-width: 400px;
  }

  /* Card-style spreads */
  .spread {
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
    overflow: hidden;
  }

  .left-page, .right-page {
    border-radius: 0;
    min-height: 340px;
  }

  /* Always show content on mobile (no entrance animation) */
  .spread .page-content {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Better mobile typography */
  .project-title { font-size: 20px; }
  .about-headline { font-size: 24px; }
  .detail-block p { font-size: 14px; line-height: 1.65; }

  /* Business card responsive */
  .business-card { max-width: 100%; }
  .card-inner { padding: 24px 20px; }

  /* Stats strip */
  .stat-divider { display: none; }
  .stat-item { min-width: 70px; }
}

/* Touch-friendly tap targets */
@media (max-width: 900px) {
  .toc-entry { padding: 10px 0; min-height: 44px; }
  .industry-chip { padding: 8px 16px; font-size: 11px; min-height: 36px; display: inline-flex; align-items: center; }
  .social-link { padding: 8px 12px; font-size: 18px; }
  .cover-hint { display: none; }
}


/* ═══════════════════════════════════════
   TAPE SIZE & ANGLE VARIATION
   ═══════════════════════════════════════ */
.taped-photo:nth-child(2) .tape-tl { width: 58px; height: 20px; transform: rotate(-12deg); }
.taped-photo:nth-child(2) .tape-br { width: 70px; height: 24px; transform: rotate(10deg); }
.taped-photo:nth-child(3) .tape-tl { width: 72px; height: 22px; transform: rotate(-5deg); }
.taped-photo:nth-child(3) .tape-br { width: 60px; height: 20px; transform: rotate(4deg); }
.taped-photo:nth-child(4) .tape-tl { width: 55px; height: 19px; transform: rotate(-14deg); }
.taped-photo:nth-child(4) .tape-br { width: 68px; height: 23px; transform: rotate(8deg); }
.taped-photo:nth-child(5) .tape-tc { width: 75px; height: 21px; }
.taped-photo:nth-child(6) .tape-tl { width: 62px; height: 21px; transform: rotate(-10deg); }


/* ═══════════════════════════════════════
   FILM GRAIN on deck thumbnails
   ═══════════════════════════════════════ */
.deck-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='12' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.06'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
  border-radius: inherit;
}


/* ═══════════════════════════════════════
   TYPOGRAPHY & MARGINS — Content spacing
   ═══════════════════════════════════════ */
.page-content {
  padding: 36px 32px 40px 64px;
  hyphens: auto;
  -webkit-hyphens: auto;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Right pages get symmetric padding */
.right-page .page-content {
  padding: 36px 36px 40px 32px;
}

/* Left page number respects margin */
.left-page .page-number { left: 64px; }

/* Post-it adhesive strip more visible */
.post-it::before {
  height: 6px;
  background: linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.03), transparent);
}


/* ═══════════════════════════════════════
   PAGE CONVEX CURVE ILLUSION
   ═══════════════════════════════════════ */
/* Left page — subtle light edge on right (near spine) suggesting curvature */
.left-page::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.025));
  pointer-events: none;
  z-index: 3;
}

/* Right page — light edge on left (near spine) */
.right-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(270deg, transparent, rgba(0,0,0,0.025));
  pointer-events: none;
  z-index: 3;
}

/* Outer edges get a subtle highlight for convexity */
.left-page {
  box-shadow:
    inset -16px 0 20px -10px rgba(0,0,0,0.07),
    inset 4px 0 8px -4px rgba(0,0,0,0.02),
    inset 0 1px 0 rgba(255,255,255,0.3),
    4px 0 0 -2px rgba(255,252,245,0.5);
}

.right-page {
  box-shadow:
    inset 16px 0 20px -10px rgba(0,0,0,0.07),
    inset -4px 0 8px -4px rgba(0,0,0,0.02),
    inset 0 1px 0 rgba(255,255,255,0.3),
    -4px 0 0 -2px rgba(255,252,245,0.5);
}


/* ═══════════════════════════════════════
   CORNER CURL — Gradual transition
   ═══════════════════════════════════════ */
/* Resting state: tiny subtle curl always visible */
.page-curl-zone::before {
  opacity: 0.3;
  border-width: 0 0 12px 12px;
}

/* Hover: grows smoothly from the resting state */
.page-curl-zone:hover::before {
  opacity: 1;
  border-width: 0 0 36px 36px;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-curl-zone:hover::after {
  opacity: 1;
  transition: opacity 0.5s ease;
}


/* ═══════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════ */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1E1C1A;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(175deg, var(--gold-light), var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.loading-bar {
  width: 120px;
  height: 2px;
  background: rgba(200,190,170,0.15);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  animation: loadingProgress 1.8s ease forwards;
}

@keyframes loadingProgress {
  0%   { width: 0%; }
  40%  { width: 60%; }
  80%  { width: 85%; }
  100% { width: 100%; }
}


/* ═══════════════════════════════════════
   RETURN TO COVER BUTTON
   ═══════════════════════════════════════ */
.return-cover-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(40,35,30,0.4);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.return-cover-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.return-cover-btn:hover {
  background: rgba(40,35,30,0.65);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.25);
  transform: scale(1.1);
}


/* ═══════════════════════════════════════
   REQUEST A DECK CTA — Portfolio spreads
   ═══════════════════════════════════════ */
.request-deck-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 20px;
  border: 1px solid var(--teal);
  border-radius: 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
}

.request-deck-cta:hover {
  background: rgba(53,112,115,0.08);
  color: var(--burnt);
  border-color: var(--burnt);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.request-deck-cta svg {
  width: 14px;
  height: 14px;
}


/* ═══════════════════════════════════════
   TABLET BREAKPOINT — 768-900px
   ═══════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 900px) {
  .notebook-wrapper {
    width: 85vw;
    height: 60vh;
  }

  .section-tabs { display: none; }
  
  .nav-arrow { width: 40px; height: 40px; font-size: 18px; }
  .nav-prev { left: 8px; }
  .nav-next { right: 8px; }

  .page-content { padding: 28px 24px 32px 48px; font-size: 13px; }
  .right-page .page-content { padding: 28px 28px 32px 24px; }

  .desk-prop { display: none; }

  .project-title { font-size: 18px; }
  .about-headline { font-size: 22px; }
}


/* ═══════════════════════════════════════
   MOBILE SWIPE INDICATOR
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .return-cover-btn { top: auto; bottom: 20px; left: 20px; }
}


/* ═══════════════════════════════════════
   SKIP-TO-CONTENT — Screen readers
   ═══════════════════════════════════════ */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 10px 24px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
  outline: none;
}


/* ═══════════════════════════════════════
   FOCUS INDICATORS — Keyboard accessibility
   ═══════════════════════════════════════ */
.tab:focus-visible,
.nav-arrow:focus-visible,
.cover-cta:focus-visible,
.return-cover-btn:focus-visible,
.social-link:focus-visible,
.toc-entry:focus-visible,
.request-deck-cta:focus-visible,
.lightbox-close:focus-visible,
.deck-nav:focus-visible,
.industry-chip:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Dark bg elements need lighter outlines */
.nav-arrow:focus-visible,
.return-cover-btn:focus-visible,
.lightbox-close:focus-visible,
.deck-nav:focus-visible {
  outline-color: var(--gold-light);
}

/* Cover button needs contrasting ring */
.cover-cta:focus-visible {
  outline-color: var(--gold-light);
  outline-offset: 3px;
}

/* Taped photos — clickable */
.taped-photo:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 2px;
}


/* ═══════════════════════════════════════
   DRAG FEEDBACK — Page tilt during drag
   ═══════════════════════════════════════ */
.spread.dragging {
  filter: drop-shadow(-8px 4px 16px rgba(0,0,0,0.25));
}


/* ═══════════════════════════════════════
   MOBILE SMOOTH SCROLL for TOC
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .notebook {
    scroll-behavior: smooth;
  }

  /* Mobile spreads become visible scroll targets */
  .spread {
    scroll-margin-top: 20px;
  }
}


/* ═══════════════════════════════════════
   PAGE INDICATOR — Glass consistency
   ═══════════════════════════════════════ */
.page-indicator,
.return-cover-btn {
  --glass-bg: rgba(40,35,30,0.45);
  --glass-border: rgba(255,255,255,0.08);
}

.page-indicator {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


/* ═══════════════════════════════════════
   CONTENT STAGGER ANIMATIONS
   ═══════════════════════════════════════ */
.spread .section-flag,
.spread .project-title,
.spread .project-type-label,
.spread .detail-block,
.spread .tag-strip,
.spread .post-it,
.spread .taped-photo,
.spread .handwritten-note,
.spread .stats-strip,
.spread .polaroid,
.spread .toc-list,
.spread .industry-grid,
.spread .process-step,
.spread .mini-project,
.spread .business-card,
.spread .about-headline,
.spread .about-body,
.spread .contact-handwritten,
.spread .work-count,
.spread .request-deck-cta {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.spread.current .section-flag,
.spread.current .project-title,
.spread.current .project-type-label,
.spread.current .detail-block,
.spread.current .tag-strip,
.spread.current .post-it,
.spread.current .taped-photo,
.spread.current .handwritten-note,
.spread.current .stats-strip,
.spread.current .polaroid,
.spread.current .toc-list,
.spread.current .industry-grid,
.spread.current .process-step,
.spread.current .mini-project,
.spread.current .business-card,
.spread.current .about-headline,
.spread.current .about-body,
.spread.current .contact-handwritten,
.spread.current .work-count,
.spread.current .request-deck-cta {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for left page elements */
.spread.current .section-flag { transition-delay: 0.08s; }
.spread.current .taped-photo { transition-delay: 0.16s; }
.spread.current .handwritten-note:first-of-type,
.spread.current .about-headline { transition-delay: 0.12s; }
.spread.current .about-body:nth-of-type(1) { transition-delay: 0.18s; }
.spread.current .about-body:nth-of-type(2) { transition-delay: 0.24s; }
.spread.current .about-body:nth-of-type(3) { transition-delay: 0.30s; }
.spread.current .toc-list { transition-delay: 0.14s; }
.spread.current .stats-strip { transition-delay: 0.22s; }
.spread.current .polaroid { transition-delay: 0.18s; }
.spread.current .contact-handwritten { transition-delay: 0.10s; }

/* Stagger delays for right page elements */
.spread.current .right-page .project-title { transition-delay: 0.24s; }
.spread.current .right-page .project-type-label { transition-delay: 0.30s; }
.spread.current .right-page .detail-block:nth-child(1) { transition-delay: 0.36s; }
.spread.current .right-page .detail-block:nth-child(2) { transition-delay: 0.42s; }
.spread.current .right-page .detail-block:nth-child(3) { transition-delay: 0.48s; }
.spread.current .right-page .tag-strip { transition-delay: 0.54s; }
.spread.current .right-page .post-it { transition-delay: 0.60s; }
.spread.current .right-page .industry-grid { transition-delay: 0.20s; }
.spread.current .right-page .process-step:nth-child(1) { transition-delay: 0.28s; }
.spread.current .right-page .process-step:nth-child(2) { transition-delay: 0.34s; }
.spread.current .right-page .process-step:nth-child(3) { transition-delay: 0.40s; }
.spread.current .right-page .process-step:nth-child(4) { transition-delay: 0.46s; }
.spread.current .right-page .mini-project:nth-child(1) { transition-delay: 0.28s; }
.spread.current .right-page .mini-project:nth-child(2) { transition-delay: 0.33s; }
.spread.current .right-page .mini-project:nth-child(3) { transition-delay: 0.38s; }
.spread.current .right-page .mini-project:nth-child(4) { transition-delay: 0.43s; }
.spread.current .right-page .mini-project:nth-child(5) { transition-delay: 0.48s; }
.spread.current .right-page .work-count { transition-delay: 0.54s; }
.spread.current .right-page .request-deck-cta { transition-delay: 0.60s; }
.spread.current .right-page .business-card { transition-delay: 0.26s; }
.spread.current .right-page .handwritten-note { transition-delay: 0.56s; }

.spread.current .left-page .post-it { transition-delay: 0.28s; }


/* ═══════════════════════════════════════
   INK BLEED — Handwriting realism
   ═══════════════════════════════════════ */
.hw {
  text-shadow:
    0.3px 0.2px 0.4px rgba(42,41,39,0.12),
    -0.1px 0.3px 0.6px rgba(42,41,39,0.06);
}

/* Signature gets heavier ink */
.signature {
  text-shadow:
    0.4px 0.3px 0.5px rgba(42,41,39,0.18),
    -0.2px 0.4px 0.8px rgba(42,41,39,0.08);
}

/* Result highlight ink bleed in orange tones */
.result-highlight {
  text-shadow:
    0.2px 0.15px 0.3px rgba(184,77,0,0.10);
}


/* ═══════════════════════════════════════
   PAGE NUMBER ANIMATION
   ═══════════════════════════════════════ */
.spread .page-number {
  opacity: 0;
  transition: opacity 0.4s ease 0.6s;
}

.spread.current .page-number {
  opacity: 1;
}


/* ═══════════════════════════════════════
   PORTFOLIO MICRO-HOVER — Photo lift
   ═══════════════════════════════════════ */
.taped-photo:hover {
  transform: scale(1.02) rotate(-0.5deg) translateY(-2px);
  filter: drop-shadow(3px 6px 12px rgba(0,0,0,0.2));
}

/* Tape stretches subtly on hover */
.taped-photo:hover .tape {
  transform-origin: center;
}

.taped-photo:hover .tape-tl {
  transform: rotate(-8deg) scaleX(1.04);
}

.taped-photo:hover .tape-br {
  transform: rotate(6deg) scaleX(1.04);
}

.taped-photo:hover .tape-tc {
  transform: translateX(-50%) rotate(-2deg) scaleX(1.03);
}


/* ═══════════════════════════════════════
   PRINT STYLESHEET
   ═══════════════════════════════════════ */
@media print {
  body {
    background: white !important;
    overflow: visible !important;
  }

  .desk-surface,
  .desk-prop,
  .loading-screen,
  .return-cover-btn,
  .page-indicator,
  .section-tabs,
  .nav-arrow,
  .cover,
  .cover-inner,
  .bookmark-ribbon,
  .page-edges,
  .page-edges-bottom,
  .spine,
  .flip-shadow,
  .page-curl-zone,
  .page-fold-line,
  .page-fold-shadow,
  .lightbox,
  .mobile-header,
  .skip-to-content,
  .login-note {
    display: none !important;
  }

  .notebook-wrapper {
    position: static !important;
    width: 100% !important;
    height: auto !important;
  }

  .notebook {
    position: static !important;
    width: 100% !important;
    height: auto !important;
  }

  .spread {
    position: static !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    page-break-inside: avoid;
    margin-bottom: 24px;
    border: 1px solid #DDD;
    border-radius: 4px;
    overflow: hidden;
  }

  .spread .page-content {
    opacity: 1 !important;
    transform: none !important;
  }

  .spread .section-flag,
  .spread .project-title,
  .spread .project-type-label,
  .spread .detail-block,
  .spread .tag-strip,
  .spread .post-it,
  .spread .taped-photo,
  .spread .handwritten-note,
  .spread .stats-strip,
  .spread .polaroid,
  .spread .toc-list,
  .spread .industry-grid,
  .spread .process-step,
  .spread .mini-project,
  .spread .business-card,
  .spread .about-headline,
  .spread .about-body,
  .spread .contact-handwritten,
  .spread .work-count,
  .spread .request-deck-cta,
  .spread .page-number {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .page-texture,
  .page-aging,
  .margin-line {
    display: none !important;
  }

  .left-page, .right-page {
    box-shadow: none !important;
    background: white !important;
  }

  .left-page::before,
  .right-page::before {
    display: none !important;
  }

  .deck-thumb {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Disable stagger on mobile for performance */
@media (max-width: 900px) {
  .spread .section-flag,
  .spread .project-title,
  .spread .project-type-label,
  .spread .detail-block,
  .spread .tag-strip,
  .spread .post-it,
  .spread .taped-photo,
  .spread .handwritten-note,
  .spread .stats-strip,
  .spread .polaroid,
  .spread .toc-list,
  .spread .industry-grid,
  .spread .process-step,
  .spread .mini-project,
  .spread .business-card,
  .spread .about-headline,
  .spread .about-body,
  .spread .contact-handwritten,
  .spread .work-count,
  .spread .request-deck-cta,
  .spread .page-number {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ═══════════════════════════════════════
   PREFERS-REDUCED-MOTION — Accessibility
   ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .spread.flipping,
  .spread.flipping-reverse {
    animation: none !important;
  }

  .flip-shadow.active,
  .flip-shadow.active-reverse {
    animation: none !important;
    opacity: 0 !important;
  }

  .mug-steam { animation: none !important; opacity: 0 !important; }
  .cover-title-foil { animation: none !important; }
  .cover-cta { animation: none !important; }
  .loading-bar-fill { animation: none !important; width: 100% !important; }

  .spread .page-content,
  .spread .section-flag,
  .spread .project-title,
  .spread .project-type-label,
  .spread .detail-block,
  .spread .tag-strip,
  .spread .post-it,
  .spread .taped-photo,
  .spread .handwritten-note,
  .spread .stats-strip,
  .spread .polaroid,
  .spread .toc-list,
  .spread .industry-grid,
  .spread .process-step,
  .spread .mini-project,
  .spread .business-card,
  .spread .about-headline,
  .spread .about-body,
  .spread .contact-handwritten,
  .spread .work-count,
  .spread .request-deck-cta,
  .spread .page-number {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ═══════════════════════════════════════
   PARALLAX SMOOTHING — Desk props
   ═══════════════════════════════════════ */
.desk-prop {
  transition: transform 0.15s ease-out;
}


/* ═══════════════════════════════════════
   CUSTOM TEXT SELECTION — Paper theme
   ═══════════════════════════════════════ */
::selection {
  background: rgba(201,168,76,0.25);
  color: var(--ink);
}

::-moz-selection {
  background: rgba(201,168,76,0.25);
  color: var(--ink);
}

/* Dark backgrounds get inverted selection */
.cover ::selection,
.lightbox ::selection,
.deck-thumb ::selection {
  background: rgba(201,168,76,0.4);
  color: #F7F3E8;
}

.cover ::-moz-selection,
.lightbox ::-moz-selection,
.deck-thumb ::-moz-selection {
  background: rgba(201,168,76,0.4);
  color: #F7F3E8;
}


/* ═══════════════════════════════════════
   COVER CTA — Arrow micro-animation
   ═══════════════════════════════════════ */
.cover-cta svg {
  transition: transform 0.3s ease;
}

.cover-cta:hover svg {
  transform: translateX(4px);
}



/* ═══════════════════════════════════════
   DECK PROGRESS BAR — For large decks
   ═══════════════════════════════════════ */
.deck-progress-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(60vw, 500px);
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  z-index: 10002;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.deck-mode .deck-progress-bar {
  opacity: 1;
}

.deck-progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.6);
  border-radius: 3px;
  transition: width 0.3s ease;
}


