/* ============================================================
   Neng Tika Adianti — Portfolio (Fairycore Redesign)
   Soft lavender light theme · whimsical but professional
   ============================================================ */

:root {
  --sans: "Quicksand", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --script: "Dancing Script", "Segoe Script", cursive;

  --wrap: 1140px;
  --gutter: clamp(1.2rem, 4vw, 2.5rem);
  --nav-h: 74px;

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  --bg: #fdfbff;
  --bg-alt: #f3eaff;
  --surface: #ffffff;
  --surface-2: #f8f4ff;
  --text: #43345f;
  --muted: #6b5b8d;
  --faint: #5b4b7d;
  --line: rgba(168, 85, 247, 0.14);
  --line-strong: rgba(168, 85, 247, 0.3);
  --accent: #a855f7;
  --accent-deep: #7e22ce;
  --grad-end: #c084fc;
  --accent-soft: rgba(168, 85, 247, 0.1);
  --pink: #d8b4fe;
  --pink-soft: rgba(216, 180, 254, 0.2);
  --gold: #a855f7;
  --gold-soft: rgba(168, 85, 247, 0.12);
  --btn-bg: #a855f7;
  --btn-hover: #6d28d9;
  --btn-fg: #ffffff;
  --header: rgba(253, 251, 255, 0.86);
  --sec-1: #ffffff;
  --sec-3: #fdfbff;
  --paper-ink: rgba(126, 34, 206, 0.07);
  --paper-line: rgba(126, 34, 206, 0.06);
  --paper-warm: rgba(168, 85, 247, 0.055);
  --sheen: linear-gradient(118deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%);
  --paper-edge: rgba(126, 34, 206, 0.07);
  --paper-vignette: rgba(126, 34, 206, 0.035);
  --tear-under: #e8dbf7;
  --tear-shadow: rgba(84, 52, 116, 0.2);
  --shadow: 0 15px 40px rgba(168, 85, 247, 0.12);
  --shadow-soft: 0 12px 30px rgba(168, 85, 247, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15101d;
  --bg-alt: #1b1427;
  --surface: #241c31;
  --surface-2: #2c223b;
  --text: #f4edf7;
  --muted: #bdb2c8;
  --faint: #ab9fba;
  --line: rgba(185, 154, 209, 0.14);
  --line-strong: rgba(185, 154, 209, 0.3);
  --accent: #c084fc;
  --accent-deep: #d8b4fe;
  --grad-end: #a855f7;
  --accent-soft: rgba(192, 132, 252, 0.12);
  --pink: #e9d5ff;
  --pink-soft: rgba(233, 213, 255, 0.12);
  --gold: #d8b4fe;
  --gold-soft: rgba(216, 180, 254, 0.12);
  --btn-bg: #b99ad1;
  --btn-hover: #cdaee5;
  --btn-fg: #241831;
  --header: rgba(21, 16, 29, 0.84);
  --sec-1: #1c1626;
  --sec-3: #241b32;
  --paper-ink: rgba(216, 180, 254, 0.09);
  --paper-line: rgba(216, 180, 254, 0.07);
  --paper-warm: rgba(192, 132, 252, 0.065);
  --sheen: linear-gradient(118deg, transparent 42%, rgba(255, 255, 255, 0.07) 50%, transparent 58%);
  --paper-edge: rgba(216, 180, 254, 0.09);
  --paper-vignette: rgba(0, 0, 0, 0.18);
  --tear-under: #0e0b15;
  --tear-shadow: rgba(0, 0, 0, 0.62);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.62);
  --shadow-soft: 0 16px 36px -24px rgba(0, 0, 0, 0.52);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

/* dreamy ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(45% 40% at 2% 0%, rgba(216, 180, 254, 0.5), transparent 72%),
    radial-gradient(38% 34% at 96% 22%, rgba(192, 132, 252, 0.36), transparent 72%),
    radial-gradient(50% 42% at 42% 100%, rgba(233, 213, 255, 0.55), transparent 72%),
    linear-gradient(180deg, #f8f4ff 0%, #f3eaff 40%, #ffffff 100%);
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(45% 40% at 2% 0%, rgba(168, 85, 247, 0.2), transparent 72%),
    radial-gradient(38% 34% at 96% 22%, rgba(192, 132, 252, 0.16), transparent 72%),
    radial-gradient(50% 42% at 42% 100%, rgba(216, 180, 254, 0.1), transparent 72%),
    var(--bg);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--accent-deep); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.skip-link {
  position: fixed; top: -120px; left: 1rem; z-index: 300;
  padding: 0.7rem 1rem; border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Header (Dynamic Island) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding: clamp(0.55rem, 1.2vw, 0.9rem) 0;
  pointer-events: none;
}
.header-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: fit-content;
  max-width: min(1160px, 100% - var(--gutter) * 2);
  min-height: 56px;
  margin-inline: auto;
  padding: 0.35rem 0.45rem 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--header) 88%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 16px 42px -26px rgba(45, 27, 58, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  pointer-events: auto;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled .header-row {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--header) 96%, transparent);
  box-shadow: 0 18px 46px -24px rgba(45, 27, 58, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
:root[data-theme="dark"] .header-row {
  box-shadow: 0 18px 44px -26px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; font-weight: 600; font-size: 0.88rem; color: var(--text);
}
.brand-mark {
  position: relative;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--pink-soft));
  color: var(--accent-deep);
  font-family: var(--serif); font-style: italic; font-size: 1rem;
  border: 1px dashed var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.brand-spark {
  position: absolute; top: 0; right: 0;
  color: var(--pink); font-size: 0.58rem; line-height: 1;
}
.brand-name { white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 0.02rem; }
.nav-links a {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 0.55rem; border-radius: 999px;
  color: var(--muted); font-size: 0.76rem; font-weight: 600; text-decoration: none;
  transition: color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.nav-star {
  font-style: normal; font-size: 0.45rem; line-height: 1;
  color: var(--accent); opacity: 0.45;
  transition: color 0.22s var(--ease), opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0.26rem;
  height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--accent-deep); background: var(--accent-soft); }
.nav-links a:hover .nav-star,
.nav-links a[aria-current="true"] .nav-star { color: var(--gold); opacity: 1; transform: rotate(20deg); }
.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: 0.3rem; }
.square-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.square-btn:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.square-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.menu-toggle { display: none; position: relative; }
.menu-toggle::after {
  content: "✦"; position: absolute; top: -3px; right: -2px;
  font-size: 0.46rem; color: var(--pink);
}
.bars { position: relative; width: 17px; height: 13px; display: block; }
.bars span {
  position: absolute; left: 0; width: 100%; height: 1.5px; border-radius: 2px; background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), width 0.3s var(--ease), left 0.3s var(--ease);
}
.bars span:nth-child(1) { top: 0; }
.bars span:nth-child(2) { top: 5.5px; width: 70%; left: 15%; }
.bars span:nth-child(3) { top: 11px; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* mobile nav — floating island menu */
.nav-panel {
  position: fixed; inset: 0; z-index: 95;
  padding: calc(var(--nav-h) + 0.7rem) var(--gutter) 1.2rem;
  background: rgba(24, 16, 30, 0.16);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s var(--ease);
  overflow-y: auto;
}
.nav-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.panel-inner {
  position: relative;
  display: grid; gap: 1rem;
  width: fit-content; max-width: 520px; margin: 0 auto;
  padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--line-strong); border-radius: 28px;
  background: color-mix(in srgb, var(--header) 96%, var(--surface));
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow);
}
.panel-inner::before {
  content: ""; display: block;
  width: 38px; height: 4px; margin: 0 auto 0.15rem;
  border-radius: 999px; background: var(--line-strong);
}
.nav-panel ul { display: grid; gap: 0.15rem; }
.nav-panel a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.45rem 0.15rem; border-bottom: 1px dashed var(--line);
  text-decoration: none; font-family: var(--serif); font-size: 1.28rem; font-weight: 500; color: var(--text);
}
.nav-panel a .nav-star {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px dashed var(--line-strong); background: var(--surface);
  font-size: 0.5rem; color: var(--accent); opacity: 0.55;
}
.nav-panel a::after {
  content: ""; width: 22px; height: 1px; margin-left: auto;
  background: var(--accent); opacity: 0; transform: scaleX(0.4);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav-panel a[aria-current="true"] { color: var(--accent-deep); }
.nav-panel a[aria-current="true"]::after { opacity: 1; transform: scaleX(1); }
.nav-panel a[aria-current="true"] .nav-star {
  border-style: solid; border-color: transparent;
  background: var(--accent-soft); color: var(--gold); opacity: 1;
}
.panel-foot { display: grid; gap: 0.2rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
.panel-foot a { color: var(--accent-deep); text-decoration: none; }
body.nav-open { overflow: hidden; }

/* ---------- Media / placeholders ---------- */
.media { position: relative; overflow: hidden; margin: 0; background: var(--surface-2); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.media.is-missing img { display: none; }
.media-ph {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  text-align: center; padding: 1rem;
  background: var(--surface-2);
}
.media-ph::before {
  content: ""; position: absolute; inset: 12px;
  border: 1px dashed var(--line-strong); border-radius: 14px;
}
.ph-mark { font-family: var(--serif); font-style: italic; font-size: 2.2rem; color: var(--accent-deep); }
.ph-name { font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.35rem; border-radius: 999px;
  font-size: 0.86rem; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn-primary {
  background-color: var(--btn-bg);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 58%);
  color: var(--btn-fg);
  box-shadow: 0 14px 30px -18px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); background-color: var(--btn-hover); box-shadow: 0 18px 34px -16px var(--accent); }
.btn-ghost { border-color: var(--line-strong); border-style: dashed; color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); transform: translateY(-2px); }
.btn-arrow { display: inline-block; transition: transform 0.3s var(--ease); }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

/* ---------- Torn vintage paper (shared by hero + sections) ---------- */
.hero,
.section {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--tear-under);
}
.hero::after,
.section::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  clip-path: var(--tear-shape, none);
  -webkit-clip-path: var(--tear-shape, none);
  transform: translateY(5px);
  background: linear-gradient(180deg, var(--tear-shadow), var(--tear-under));
  opacity: 0.78;
}
.hero::before,
.section::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  clip-path: var(--tear-shape, none);
  -webkit-clip-path: var(--tear-shape, none);
  background-image:
    var(--sec-texture, none),
    linear-gradient(var(--paper-angle, 160deg), var(--paper-a, var(--sec-1)), var(--paper-b, var(--sec-3)));
  box-shadow:
    inset 0 0 0 1px var(--paper-edge),
    inset 0 0 90px var(--paper-vignette);
}
.hero > .wrap,
.section > .wrap { position: relative; z-index: 2; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(1.8rem, 4vw, 3.2rem) 0 clamp(1rem, 2vw, 1.6rem);
}
#home {
  --paper-angle: 158deg;
  --paper-a: #ffffff;
  --paper-b: #f7f1ff;
  --tear-under: #e6dbf4;
  --tear-shape:
    polygon(
      0 1.4%, 4% 0.7%, 8% 1.5%, 12% 0.5%, 16% 1.2%, 20% 0.4%, 24% 1.6%, 28% 0.8%,
      32% 1.3%, 36% 0.5%, 40% 1.4%, 44% 0.7%, 48% 1.1%, 52% 0.4%, 56% 1.5%, 60% 0.6%,
      64% 1.2%, 68% 0.4%, 72% 1.4%, 76% 0.8%, 80% 1.6%, 84% 0.5%, 88% 1.2%, 92% 0.6%,
      96% 1.5%, 100% 0.8%,
      99.4% 18%, 100% 36%, 99.3% 54%, 100% 72%, 99.5% 100%,
      96% 98.7%, 92% 99.4%, 88% 98.5%, 84% 99.3%, 80% 98.6%, 76% 99.5%, 72% 98.7%,
      68% 99.2%, 64% 98.4%, 60% 99.4%, 56% 98.8%, 52% 99.5%, 48% 98.6%, 44% 99.3%,
      40% 98.5%, 36% 99.4%, 32% 98.7%, 28% 99.5%, 24% 98.6%, 20% 99.2%, 16% 98.4%,
      12% 99.4%, 8% 98.8%, 4% 99.5%, 0 98.7%,
      0.6% 80%, 0 62%, 0.7% 44%, 0 26%
    );
  --sec-texture:
    radial-gradient(ellipse 60% 50% at 8% 0%, var(--paper-warm), transparent 70%),
    radial-gradient(ellipse 50% 45% at 92% 100%, var(--paper-ink), transparent 72%);
}
.hero-panel {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-panel::before {
  content: ""; position: absolute; inset: 8px; z-index: 3;
  border: 1px solid var(--line); border-radius: calc(var(--r-xl) - 8px);
  pointer-events: none;
}
.hero-panel::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(55% 75% at 100% 0%, var(--accent-soft), transparent 62%),
    radial-gradient(45% 60% at 0% 100%, var(--pink-soft), transparent 65%),
    var(--sheen);
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-copy {
  position: relative; z-index: 1; min-width: 0;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.8rem;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero-title {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  line-height: 1; letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
}
.hero-title em {
  color: transparent;
  background: linear-gradient(115deg, var(--accent-deep), var(--grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 700; color: var(--accent-deep);
  margin-bottom: 0.45rem;
}
.hero-desc { color: var(--muted); max-width: 42ch; font-size: 0.9rem; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.btn-primary::before { content: "✦"; font-size: 0.75em; color: var(--btn-fg); opacity: 0.9; }

.hero-visual {
  position: relative; z-index: 1; min-height: 100%;
  display: grid; place-items: center;
  padding: clamp(1.2rem, 2.6vw, 2.2rem);
}
.hero-visual::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: min(78%, 260px); aspect-ratio: 1;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
}
.portrait-frame {
  position: relative;
  width: min(100%, 300px);
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(155deg, var(--surface), var(--surface-2));
  box-shadow:
    inset 0 0 0 4px var(--surface),
    0 0 0 1px var(--accent-soft),
    var(--shadow-soft);
}
.portrait-frame .portrait {
  width: 100%; height: auto; min-height: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px -16px var(--accent);
}
:root[data-theme="dark"] .portrait-frame {
  background: linear-gradient(155deg, #241b31, #2f2440);
  box-shadow:
    inset 0 0 0 4px #241b31,
    0 0 0 1px rgba(192, 132, 252, 0.2),
    0 18px 38px -26px #000;
}
:root[data-theme="dark"] .portrait-frame .portrait {
  border-color: rgba(216, 180, 254, 0.18);
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.9);
}
:root[data-theme="dark"] .portrait img {
  filter: brightness(0.9) saturate(0.8) contrast(1.03);
}
:root[data-theme="dark"] .portrait::after {
  content: "";
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(18, 14, 26, 0.1), rgba(24, 18, 34, 0.2));
  mix-blend-mode: multiply;
}

/* ---------- Sections: unique torn sheets ---------- */
.section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  scroll-margin-top: calc(var(--nav-h) + 12px);
}
.section.alt { border-block: 0; }

/* About — stained journal paper, uneven hand-torn edge */
#about {
  --paper-angle: 146deg;
  --paper-a: #fffdf8;
  --paper-b: #faf3ff;
  --tear-under: #e9ddf1;
  --tear-shape:
    polygon(
      0 2.2%, 5% 0.8%, 10% 1.9%, 15% 0.4%, 20% 1.6%, 25% 0.6%, 30% 2.0%, 35% 0.9%,
      40% 1.4%, 45% 0.3%, 50% 1.8%, 55% 0.7%, 60% 1.5%, 65% 0.5%, 70% 2.1%, 75% 0.8%,
      80% 1.6%, 85% 0.4%, 90% 1.9%, 95% 0.6%, 100% 1.7%,
      99.2% 16%, 100% 34%, 99.1% 52%, 100% 70%, 99.3% 88%, 100% 100%,
      95% 98.2%, 90% 99.4%, 85% 98.5%, 80% 99.2%, 75% 98.3%, 70% 99.5%, 65% 98.6%,
      60% 99.3%, 55% 98.4%, 50% 99.5%, 45% 98.6%, 40% 99.2%, 35% 98.3%, 30% 99.4%,
      25% 98.5%, 20% 99.3%, 15% 98.4%, 10% 99.5%, 5% 98.6%, 0 99.4%,
      0.8% 82%, 0 64%, 0.9% 46%, 0 28%, 0.7% 12%
    );
  --sec-texture:
    linear-gradient(128deg, transparent 47%, var(--paper-warm) 48%, transparent 49%),
    radial-gradient(ellipse 55% 45% at 12% 18%, var(--paper-warm), transparent 70%),
    radial-gradient(ellipse 45% 40% at 88% 82%, var(--paper-ink), transparent 72%);
}

/* Education — ruled notebook sheet, fine torn edge */
#education {
  --paper-angle: 168deg;
  --paper-a: #fffefb;
  --paper-b: #f5eeff;
  --tear-under: #e3d8ef;
  --tear-shape:
    polygon(
      0 0.9%, 6% 1.6%, 12% 0.6%, 18% 1.3%, 24% 0.4%, 30% 1.5%, 36% 0.7%, 42% 1.2%,
      48% 0.5%, 54% 1.6%, 60% 0.8%, 66% 1.4%, 72% 0.4%, 78% 1.5%, 84% 0.7%, 90% 1.3%,
      96% 0.5%, 100% 1.4%,
      99.5% 22%, 100% 40%, 99.2% 58%, 100% 76%, 99.4% 100%,
      96% 99.1%, 92% 98.3%, 88% 99.4%, 84% 98.6%, 80% 99.2%, 76% 98.4%, 72% 99.5%,
      68% 98.7%, 64% 99.3%, 60% 98.5%, 56% 99.4%, 52% 98.6%, 48% 99.2%, 44% 98.4%,
      40% 99.5%, 36% 98.7%, 32% 99.3%, 28% 98.5%, 24% 99.4%, 20% 98.6%, 16% 99.2%,
      12% 98.4%, 8% 99.5%, 4% 98.7%, 0 99.2%,
      0.5% 78%, 0 60%, 0.6% 42%, 0 24%
    );
  --sec-texture:
    repeating-linear-gradient(180deg, transparent 0 27px, var(--paper-line) 27px 28px),
    linear-gradient(90deg, transparent 0 44px, var(--paper-ink) 44px 45px, transparent 45px);
}

/* Skills — blueprint grid sheet, crisp torn edge */
#skills {
  --paper-angle: 152deg;
  --paper-a: #fdfbff;
  --paper-b: #f1e9ff;
  --tear-under: #e0d4ef;
  --tear-shape:
    polygon(
      0 1.7%, 4% 0.5%, 8% 1.4%, 12% 0.3%, 16% 1.8%, 20% 0.7%, 24% 1.5%, 28% 0.4%,
      32% 1.6%, 36% 0.6%, 40% 1.3%, 44% 0.3%, 48% 1.7%, 52% 0.8%, 56% 1.4%, 60% 0.4%,
      64% 1.8%, 68% 0.6%, 72% 1.5%, 76% 0.3%, 80% 1.6%, 84% 0.7%, 88% 1.4%, 92% 0.4%,
      96% 1.7%, 100% 0.6%,
      99.3% 20%, 100% 38%, 99.1% 56%, 100% 74%, 99.4% 100%,
      96% 98.4%, 92% 99.3%, 88% 98.5%, 84% 99.4%, 80% 98.6%, 76% 99.2%, 72% 98.4%,
      68% 99.5%, 64% 98.7%, 60% 99.3%, 56% 98.5%, 52% 99.4%, 48% 98.6%, 44% 99.2%,
      40% 98.4%, 36% 99.5%, 32% 98.7%, 28% 99.3%, 24% 98.5%, 20% 99.4%, 16% 98.6%,
      12% 99.2%, 8% 98.4%, 4% 99.5%, 0 98.6%,
      0.6% 82%, 0 64%, 0.5% 46%, 0 28%
    );
  --sec-texture:
    repeating-linear-gradient(90deg, transparent 0 32px, var(--paper-line) 32px 33px),
    repeating-linear-gradient(0deg, transparent 0 32px, var(--paper-line) 32px 33px);
}

/* Projects — gallery board paper, long torn strips */
#projects {
  --paper-angle: 138deg;
  --paper-a: #fffbfd;
  --paper-b: #f6edff;
  --tear-under: #eadff5;
  --tear-shape:
    polygon(
      0 1.1%, 8% 0.4%, 16% 1.5%, 24% 0.6%, 32% 1.3%, 40% 0.3%, 48% 1.6%, 56% 0.7%,
      64% 1.4%, 72% 0.4%, 80% 1.5%, 88% 0.6%, 96% 1.3%, 100% 0.5%,
      99.4% 14%, 100% 30%, 99.2% 46%, 100% 62%, 99.3% 78%, 100% 100%,
      96% 98.9%, 92% 99.4%, 88% 98.6%, 84% 99.2%, 80% 98.4%, 76% 99.5%, 72% 98.8%,
      68% 99.3%, 64% 98.5%, 60% 99.4%, 56% 98.7%, 52% 99.2%, 48% 98.4%, 44% 99.5%,
      40% 98.9%, 36% 99.3%, 32% 98.5%, 28% 99.4%, 24% 98.8%, 20% 99.2%, 16% 98.4%,
      12% 99.5%, 8% 98.9%, 4% 99.3%, 0 98.5%,
      0.5% 84%, 0 68%, 0.6% 52%, 0 36%, 0.4% 20%
    );
  --sec-texture:
    repeating-linear-gradient(90deg, transparent 0 96px, var(--paper-warm) 96px 97px),
    radial-gradient(ellipse 60% 50% at 80% 10%, var(--paper-warm), transparent 70%);
}

/* Achievement — binder sheet with ring-hole wear */
#achievement {
  --paper-angle: 162deg;
  --paper-a: #fffdf9;
  --paper-b: #f8f1fc;
  --tear-under: #e4d8ee;
  --tear-shape:
    polygon(
      0 1.6%, 5% 0.6%, 10% 1.4%, 15% 0.3%, 20% 1.7%, 25% 0.8%, 30% 1.3%, 35% 0.4%,
      40% 1.6%, 45% 0.7%, 50% 1.2%, 55% 0.3%, 60% 1.7%, 65% 0.8%, 70% 1.4%, 75% 0.5%,
      80% 1.6%, 85% 0.6%, 90% 1.3%, 95% 0.4%, 100% 1.5%,
      99.3% 18%, 100% 36%, 99.2% 54%, 100% 72%, 99.4% 100%,
      95% 98.5%, 90% 99.3%, 85% 98.4%, 80% 99.4%, 75% 98.6%, 70% 99.2%, 65% 98.4%,
      60% 99.5%, 55% 98.7%, 50% 99.3%, 45% 98.5%, 40% 99.4%, 35% 98.6%, 30% 99.2%,
      25% 98.4%, 20% 99.5%, 15% 98.7%, 10% 99.3%, 5% 98.5%, 0 99.2%,
      0.7% 80%, 0 62%, 0.8% 44%, 0 26%, 0.6% 10%
    );
  --sec-texture:
    radial-gradient(circle at 4% 22%, var(--paper-ink) 0 3px, transparent 4px),
    radial-gradient(circle at 4% 50%, var(--paper-ink) 0 3px, transparent 4px),
    radial-gradient(circle at 4% 78%, var(--paper-ink) 0 3px, transparent 4px),
    repeating-linear-gradient(90deg, transparent 0 72px, var(--paper-line) 72px 73px);
}

/* Organization — cork/diamond board, angular torn edge */
#organization {
  --paper-angle: 144deg;
  --paper-a: #fdfbff;
  --paper-b: #f4ecff;
  --tear-under: #e6dbf3;
  --tear-shape:
    polygon(
      0 0.8%, 5% 1.8%, 10% 0.5%, 15% 1.5%, 20% 0.3%, 25% 1.7%, 30% 0.7%, 35% 1.4%,
      40% 0.4%, 45% 1.6%, 50% 0.6%, 55% 1.5%, 60% 0.3%, 65% 1.7%, 70% 0.8%, 75% 1.4%,
      80% 0.4%, 85% 1.6%, 90% 0.6%, 95% 1.5%, 100% 0.4%,
      99.2% 20%, 100% 40%, 99.3% 60%, 100% 80%, 99.4% 100%,
      95% 99.3%, 90% 98.4%, 85% 99.4%, 80% 98.6%, 75% 99.2%, 70% 98.4%, 65% 99.5%,
      60% 98.7%, 55% 99.3%, 50% 98.5%, 45% 99.4%, 40% 98.6%, 35% 99.2%, 30% 98.4%,
      25% 99.5%, 20% 98.7%, 15% 99.3%, 10% 98.5%, 5% 99.4%, 0 98.6%,
      0.6% 82%, 0 64%, 0.5% 46%, 0 28%
    );
  --sec-texture:
    repeating-linear-gradient(45deg, transparent 0 17px, var(--paper-line) 17px 18px),
    repeating-linear-gradient(-45deg, transparent 0 17px, var(--paper-line) 17px 18px);
}

/* Contact — folded envelope paper, soft torn edge */
#contact {
  --paper-angle: 154deg;
  --paper-a: #fffcf8;
  --paper-b: #f7efff;
  --tear-under: #e9def4;
  --tear-shape:
    polygon(
      0 2.0%, 6% 0.9%, 12% 1.7%, 18% 0.5%, 24% 1.4%, 30% 0.6%, 36% 1.8%, 42% 0.8%,
      48% 1.3%, 54% 0.4%, 60% 1.6%, 66% 0.7%, 72% 1.5%, 78% 0.5%, 84% 1.7%, 90% 0.8%,
      96% 1.4%, 100% 0.6%,
      99.4% 16%, 100% 34%, 99.2% 52%, 100% 70%, 99.3% 100%,
      96% 98.8%, 92% 99.4%, 88% 98.5%, 84% 99.2%, 80% 98.4%, 76% 99.5%, 72% 98.8%,
      68% 99.3%, 64% 98.5%, 60% 99.4%, 56% 98.7%, 52% 99.2%, 48% 98.4%, 44% 99.5%,
      40% 98.9%, 36% 99.3%, 32% 98.5%, 28% 99.4%, 24% 98.8%, 20% 99.2%, 16% 98.4%,
      12% 99.5%, 8% 98.9%, 4% 99.3%, 0 98.7%,
      0.7% 80%, 0 62%, 0.6% 44%, 0 26%, 0.5% 12%
    );
  --sec-texture:
    linear-gradient(32deg, transparent 49.6%, var(--paper-line) 49.8%, transparent 50.2%),
    linear-gradient(-32deg, transparent 49.6%, var(--paper-line) 49.8%, transparent 50.2%);
}

/* Dark mode: each torn sheet keeps its own, clearly different shade */
:root[data-theme="dark"] #home {
  --paper-a: #1c1626; --paper-b: #241b32;
  --tear-under: #0e0b15; --tear-shadow: rgba(0, 0, 0, 0.62);
}
:root[data-theme="dark"] #about {
  --paper-a: #21192c; --paper-b: #2b1f39;
  --tear-under: #110c19; --tear-shadow: rgba(0, 0, 0, 0.62);
}
:root[data-theme="dark"] #education {
  --paper-a: #181d2a; --paper-b: #202336;
  --tear-under: #0c1018; --tear-shadow: rgba(0, 0, 0, 0.62);
}
:root[data-theme="dark"] #skills {
  --paper-a: #231a30; --paper-b: #2e2140;
  --tear-under: #140d20; --tear-shadow: rgba(0, 0, 0, 0.62);
}
:root[data-theme="dark"] #projects {
  --paper-a: #291c2d; --paper-b: #342338;
  --tear-under: #180f1c; --tear-shadow: rgba(0, 0, 0, 0.62);
}
:root[data-theme="dark"] #achievement {
  --paper-a: #1b2227; --paper-b: #252b36;
  --tear-under: #0d1115; --tear-shadow: rgba(0, 0, 0, 0.62);
}
:root[data-theme="dark"] #organization {
  --paper-a: #251d2b; --paper-b: #302336;
  --tear-under: #130e19; --tear-shadow: rgba(0, 0, 0, 0.62);
}
:root[data-theme="dark"] #contact {
  --paper-a: #201a28; --paper-b: #2a2135;
  --tear-under: #100c17; --tear-shadow: rgba(0, 0, 0, 0.62);
}
.section-head { max-width: 720px; margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.sec-kicker {
  display: block;
  font-family: var(--script);
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  color: var(--accent-deep);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}
.sec-title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 0.7rem; }
.sec-desc { color: var(--muted); font-size: 0.96rem; max-width: 54ch; line-height: 1.78; }
.ornament { display: flex; align-items: center; gap: 0.7rem; margin-top: 1.1rem; color: var(--gold); }
.ornament span { height: 1px; width: 64px; background: linear-gradient(90deg, transparent, var(--line-strong)); }
.ornament span:last-child { background: linear-gradient(90deg, var(--line-strong), transparent); }
.ornament i { font-style: normal; font-size: 0.7rem; letter-spacing: 0.3em; }

/* ---------- About (one journal card) ---------- */
.about-journal {
  position: relative;
  padding: clamp(1.2rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    var(--sheen),
    radial-gradient(90% 70% at 100% 0%, var(--pink-soft), transparent 58%),
    repeating-linear-gradient(90deg, transparent 0 36px, var(--paper-line) 36px 37px),
    linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.about-journal::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--r-xl) - 9px);
  pointer-events: none;
}
.about-journal::after {
  content: "✧";
  position: absolute; right: 1.2rem; bottom: -0.85rem;
  font-size: 4.2rem; line-height: 1; color: var(--accent-deep); opacity: 0.1;
  transform: rotate(-14deg); pointer-events: none;
}
.journal-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px dashed var(--line-strong);
}
.journal-crest {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  color: var(--accent-deep);
  font-size: 1.05rem;
}
.journal-kicker {
  display: block;
  font-family: var(--script);
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--accent-deep);
}
.journal-copy h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.journal-ribbon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(150deg, var(--accent-soft), var(--pink-soft));
  border: 1px solid var(--line);
  color: var(--accent-deep);
  transform: rotate(5deg);
}
.journal-ribbon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -9px;
  height: 10px;
  background: var(--accent-soft);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.journal-pages { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.journal-page { position: relative; min-width: 0; padding: 1.15rem 0.9rem 0.5rem; border-right: 1px dashed var(--line); }
.info-page { border-right: 0; }
.story-page::before {
  content: "✦";
  position: absolute;
  top: 0.95rem;
  right: 0.85rem;
  font-size: 0.75rem;
  color: var(--gold);
  opacity: 0.6;
  pointer-events: none;
}
.story-page .lead { position: relative; font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.55; color: var(--text); margin-bottom: 0.8rem; overflow-wrap: anywhere; }
.story-page p { position: relative; color: var(--muted); font-size: 0.9rem; line-height: 1.7; overflow-wrap: anywhere; }
.story-page p + p { margin-top: 0.7rem; }
.card-label { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.9rem; font-weight: 700; }
.info-list div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--line); }
.info-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.info-list dt { font-size: 0.8rem; color: var(--faint); font-weight: 600; }
.info-list dd { margin: 0; font-weight: 600; font-size: 0.9rem; text-align: right; overflow-wrap: anywhere; }

/* ---------- Education (fairy scrapbook card) ---------- */
.edu-scrapbook {
  --spine: 18px;
  position: relative;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    var(--sheen),
    radial-gradient(90% 70% at 100% 0%, var(--pink-soft), transparent 58%),
    radial-gradient(80% 70% at 0% 100%, var(--gold-soft), transparent 60%),
    repeating-linear-gradient(180deg, transparent 0 24px, var(--paper-line) 24px 25px),
    linear-gradient(155deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft), inset 0 8px 24px -20px var(--accent);
  overflow: hidden;
}
.edu-scrapbook::before {
  content: ""; position: absolute; inset: 9px;
  border: 1px dashed var(--line-strong); border-radius: calc(var(--r-xl) - 9px);
  pointer-events: none;
}
.edu-scrapbook::after {
  content: "✦"; position: absolute; right: 1.2rem; bottom: -0.85rem;
  font-size: 4.2rem; line-height: 1; color: var(--gold); opacity: 0.1;
  transform: rotate(-16deg); pointer-events: none;
}
.scrap-head {
  position: relative;
  display: flex; align-items: center; gap: 0.85rem;
  margin-left: calc(var(--spine) - 18px);
  padding: 0.1rem 0 1rem;
  border-bottom: 1px dashed var(--line-strong);
}
.scrap-crest {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px dashed var(--line-strong); background: var(--surface);
  color: var(--accent-deep); font-size: 1rem;
}
.scrap-kicker { display: block; font-family: var(--script); font-size: 1rem; color: var(--accent-deep); line-height: 1.1; }
.scrap-copy h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.scrap-count {
  margin-left: auto; flex: none;
  padding: 0.25rem 0.55rem 0.3rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px 12px 4px 4px;
  background: var(--surface);
  font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1;
  color: var(--accent-deep); text-align: right;
  transform: rotate(2deg);
}
.scrap-count small {
  display: block; margin-top: 0.2rem;
  font-family: var(--sans); font-style: normal; font-size: 0.56rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
}
.edu-list {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  margin-left: calc(var(--spine) - 18px);
}
.edu-item {
  position: relative;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1.05rem 0.8rem;
  border-right: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  transition: background-color 0.3s var(--ease);
}
.edu-item:nth-child(3n) { border-right: 0; }
.edu-item:nth-last-child(-n + 3) { border-bottom: 0; }
.edu-item:hover { background: var(--accent-soft); }
.edu-item.current {
  background: linear-gradient(135deg, var(--accent-soft), transparent 72%);
  box-shadow: inset 3px 0 0 var(--accent);
}
.edu-num {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px dashed var(--line-strong); background: var(--surface);
  box-shadow: 0 0 0 3px var(--gold-soft);
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  color: var(--accent-deep);
}
.edu-main { position: relative; width: 100%; min-width: 0; padding: 0; }
.edu-main::after {
  content: "✦"; position: absolute; top: -0.1rem; right: 0;
  color: var(--gold); opacity: 0.45; font-size: 0.7rem;
}
.edu-item.current .edu-num {
  border-style: solid; border-color: transparent;
  background: var(--accent-deep); color: #fff;
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.edu-item.current .edu-main h3 { color: var(--accent-deep); }
.edu-year { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.3rem; overflow-wrap: anywhere; }
.edu-year::before { content: "✧"; color: var(--gold); font-size: 0.8rem; }
.edu-main h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.2; margin-bottom: 0.35rem; overflow-wrap: anywhere; }
.edu-main h3::after { content: ""; display: block; width: 26px; height: 2px; margin-top: 0.45rem; border-radius: 2px; background: var(--gold); opacity: 0.55; }
.edu-main p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; overflow-wrap: anywhere; }
.pill {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem; border-radius: 999px;
  background: var(--accent-deep); color: #fff;
}
:root[data-theme="dark"] .edu-item.current .edu-num,
:root[data-theme="dark"] .pill { color: #241831; }

/* ---------- Skills (single fairy cabinet) ---------- */
.skill-tags { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1.4rem; }
.skill-tags li {
  padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px dashed var(--line-strong);
  background: var(--surface);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.skills-cabinet {
  position: relative;
  padding: clamp(1.2rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    var(--sheen),
    radial-gradient(95% 70% at 100% 0%, var(--pink-soft), transparent 58%),
    radial-gradient(80% 70% at 0% 100%, var(--gold-soft), transparent 62%),
    repeating-linear-gradient(90deg, transparent 0 28px, var(--paper-line) 28px 29px),
    linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.skills-cabinet::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--r-xl) - 9px);
  pointer-events: none;
}
.skills-cabinet::after {
  content: "✦";
  position: absolute;
  top: 0.4rem;
  right: 40px;
  color: var(--gold);
  font-size: 0.85rem;
  opacity: 0.8;
  pointer-events: none;
}
.cabinet-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.35rem 0.4rem 1.05rem;
  border-bottom: 1px dashed var(--line-strong);
}
.cabinet-crest {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  color: var(--accent-deep);
  font-size: 1.05rem;
}
.cabinet-copy h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.cabinet-copy p { margin-top: 0.1rem; color: var(--muted); font-size: 0.86rem; line-height: 1.6; max-width: 44ch; }
.cabinet-count {
  margin-left: auto;
  flex: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent-deep);
  text-align: right;
}
.cabinet-count span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.tool-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tool {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.65rem;
  padding: 1rem 0.85rem;
  border-right: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  transition: background-color 0.3s var(--ease);
}
.tool:nth-child(4n) { border-right: 0; }
.tool:nth-last-child(-n + 4) { border-bottom: 0; }
.tool:hover { background: var(--accent-soft); }
.tool-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  color: var(--accent-deep);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
}
.tool-name { font-weight: 700; font-size: 0.88rem; line-height: 1.25; }
.tool em {
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.4;
}

/* ---------- Projects (one gallery, taped frames) ---------- */
.project-gallery {
  position: relative;
  padding: clamp(1.2rem, 2.6vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    var(--sheen),
    radial-gradient(95% 70% at 0% 0%, var(--gold-soft), transparent 58%),
    radial-gradient(90% 70% at 100% 100%, var(--accent-soft), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 30px, var(--paper-line) 30px 31px),
    linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.project-gallery::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--r-xl) - 9px);
  pointer-events: none;
}
.project-gallery::after {
  content: "✦"; position: absolute; top: 0.35rem; right: 1.2rem;
  color: var(--gold); font-size: 0.85rem; opacity: 0.8; pointer-events: none;
}
.gallery-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.35rem 0.4rem 1.1rem;
  border-bottom: 1px dashed var(--line-strong);
}
.gallery-crest {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  color: var(--accent-deep);
  font-size: 1.05rem;
}
.gallery-copy h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.gallery-copy p { margin-top: 0.1rem; color: var(--muted); font-size: 0.86rem; line-height: 1.6; max-width: 46ch; }
.gallery-count {
  margin-left: auto;
  flex: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent-deep);
  text-align: right;
}
.gallery-count span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.gallery-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-page {
  position: relative; min-width: 0;
  display: flex; flex-direction: column;
  padding: 1.05rem 0.8rem 0.9rem;
  border-right: 1px dashed var(--line);
  background: transparent; box-shadow: none; border-radius: 0;
  transition: background-color 0.35s var(--ease);
}
.project-page:nth-child(4n) { border-right: 0; }
.project-page::before {
  content: "✦";
  position: absolute; top: 0.75rem; right: 0.8rem;
  color: var(--gold); font-size: 0.75rem; opacity: 0.65;
}
.project-page:hover { background: var(--accent-soft); }
.project-media { aspect-ratio: 16 / 10; margin-bottom: 0.5rem; border-radius: 12px; border: 1px solid var(--line); }
.project-media img { transition: transform 0.9s var(--ease-out); }
.project-page:hover .project-media img { transform: scale(1.035); }
.project-body { display: flex; flex: 1; flex-direction: column; gap: 0.35rem; min-width: 0; padding: 0.55rem 0.15rem 0.2rem; }
.project-meta { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.1rem; }
.p-num { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--accent-deep); }
.p-type { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.project-body h3 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.25; overflow-wrap: anywhere; }
.project-body p { flex: 1; color: var(--muted); font-size: 0.84rem; line-height: 1.65; overflow-wrap: anywhere; }
.project-body .tags {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem; margin-top: 0; padding-top: 0.5rem;
}
.project-body .tags li {
  display: grid; place-items: center; min-width: 0; min-height: 30px;
  padding: 0.2rem 0.15rem; line-height: 1.15; text-align: center;
  letter-spacing: 0.03em; overflow-wrap: anywhere;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.tags li {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
}

/* ---------- Achievement (keepsake binder) ---------- */
.award-binder {
  --spine: 54px;
  position: relative;
  padding: clamp(1rem, 2.4vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    var(--sheen),
    radial-gradient(80% 60% at 100% 0%, var(--pink-soft), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 54px, var(--paper-line) 54px 55px),
    linear-gradient(150deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.award-binder::before {
  content: ""; position: absolute; inset: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--r-xl) - 9px);
  pointer-events: none;
}
.award-binder::after {
  content: "✧"; position: absolute; right: 1.4rem; bottom: -0.8rem;
  font-size: 5rem; line-height: 1; color: var(--pink); opacity: 0.1;
  transform: rotate(-18deg); pointer-events: none;
}
.binder-spine {
  position: absolute; top: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  width: var(--spine); padding: 1.2rem 0;
  border-right: 1px dashed var(--line-strong);
  background: linear-gradient(90deg, var(--accent-soft), transparent);
}
.binder-spine span {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--accent); background: var(--surface);
  box-shadow: 0 2px 5px -2px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.binder-head {
  position: relative;
  display: flex; align-items: center; gap: 0.9rem;
  margin-left: calc(var(--spine) - 18px);
  padding: 0.2rem 0 1.2rem;
}
.binder-mark {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pink-soft); color: var(--pink);
  border: 1px dashed var(--line-strong);
  font-size: 1.3rem; line-height: 1;
  transform: rotate(-10deg);
}
.binder-copy { min-width: 0; }
.binder-kicker {
  display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 0.15rem;
}
.binder-copy h3 { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.1; }
.binder-count {
  margin-left: auto; flex: none;
  font-family: var(--serif); font-style: italic; font-size: 1.8rem; line-height: 1;
  color: var(--accent-deep); text-align: right;
}
.binder-count small {
  display: block; margin-top: 0.2rem;
  font-family: var(--sans); font-style: normal; font-size: 0.58rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint);
}
.binder-pages {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
  margin-left: calc(var(--spine) - 18px);
}
.award-page {
  position: relative; min-width: 0;
  padding: 0.6rem 0.6rem 0.85rem;
  border: 1px solid var(--line); border-radius: 6px 18px 18px 6px;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.award-page::before {
  content: "✦"; position: absolute; top: -0.55rem; right: 0.7rem; z-index: 2;
  color: var(--pink); font-size: 0.85rem;
  background: var(--surface); padding: 0 0.25rem;
}
.award-page::after {
  content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.3rem;
  border-bottom: 1px dashed var(--line); pointer-events: none;
}
.award-page:hover { transform: translateY(-3px) rotate(-0.4deg); border-color: var(--line-strong); box-shadow: var(--shadow); }
.award-media { aspect-ratio: 16 / 10; border-radius: 10px 14px 10px 10px; border: 1px solid var(--line); }
.award-body { position: relative; padding: 0.85rem 0.7rem 0.4rem; }
.award-year {
  display: inline-block; margin-bottom: 0.4rem;
  padding: 0.25rem 0.65rem; border-radius: 999px;
  border: 1px dashed var(--line-strong); background: var(--surface);
  font-family: var(--serif); font-style: italic; font-size: 0.9rem; color: var(--accent-deep);
}
.award-body h3 { font-size: clamp(1.05rem, 1.9vw, 1.35rem); line-height: 1.25; }
.award-body p { color: var(--muted); font-size: 0.86rem; line-height: 1.6; margin-top: 0.25rem; }

/* ---------- Organization (one community board) ---------- */
.org-board {
  --spine: 18px;
  position: relative;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    var(--sheen),
    radial-gradient(85% 65% at 0% 0%, var(--accent-soft), transparent 58%),
    radial-gradient(85% 65% at 100% 100%, var(--gold-soft), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 26px, var(--paper-line) 26px 27px),
    linear-gradient(155deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.org-board::before {
  content: ""; position: absolute; inset: 9px;
  border: 1px dashed var(--line-strong); border-radius: calc(var(--r-xl) - 9px);
  pointer-events: none;
}
.org-board::after {
  content: "✧"; position: absolute; right: 1.2rem; bottom: -0.85rem;
  font-size: 4.2rem; line-height: 1; color: var(--accent-deep); opacity: 0.1;
  transform: rotate(-14deg); pointer-events: none;
}
.board-head {
  position: relative;
  display: flex; align-items: center; gap: 0.85rem;
  margin-left: calc(var(--spine) - 18px);
  padding: 0.1rem 0 1rem;
  border-bottom: 1px dashed var(--line-strong);
}
.board-crest {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px dashed var(--line-strong); background: var(--surface);
  color: var(--accent-deep); font-size: 1.05rem;
}
.board-copy { min-width: 0; }
.board-copy h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.board-copy p {
  margin-top: 0.1rem; color: var(--muted); font-size: 0.86rem;
  line-height: 1.6; max-width: 48ch; overflow-wrap: anywhere;
}
.board-count {
  margin-left: auto; flex: none;
  font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1;
  color: var(--accent-deep); text-align: right;
}
.board-count small {
  display: block; margin-top: 0.2rem;
  font-family: var(--sans); font-style: normal; font-size: 0.56rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
}
.org-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  margin-left: calc(var(--spine) - 18px);
  border-bottom: 1px dashed var(--line);
}
.org-card {
  position: relative; min-width: 0;
  display: flex; flex-direction: column;
  padding: 1.15rem 0.9rem 1.2rem;
  border-right: 1px dashed var(--line);
  background: transparent; box-shadow: none; border-radius: 0;
  transition: background-color 0.3s var(--ease);
}
.org-card:last-child { border-right: 0; }
.org-card:hover { background: var(--accent-soft); }
.org-feature::after { display: none; }
.org-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.7rem; min-width: 0; }
.org-crest {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px dashed var(--line-strong); background: var(--surface);
  color: var(--accent-deep); font-size: 1.05rem;
}
.org-badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.org-feature h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.2; overflow-wrap: anywhere; }
.org-role { font-family: var(--script); font-size: 1.15rem; color: var(--accent-deep); line-height: 1.3; }
.org-desc { flex: 1; color: var(--muted); font-size: 0.88rem; line-height: 1.65; overflow-wrap: anywhere; }
.org-card .tags {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem; margin-top: 0; padding-top: 0.9rem;
}
.org-card .tags li {
  display: grid; place-items: center; min-width: 0; min-height: 26px;
  padding: 0.3rem 0.35rem; line-height: 1.2; text-align: center;
  letter-spacing: 0.03em; overflow-wrap: anywhere;
}
.org-media { aspect-ratio: 16 / 9; margin-bottom: 0.85rem; border: 1px solid var(--line); border-radius: 14px; }
.org-body { display: flex; flex: 1; flex-direction: column; gap: 0.35rem; min-width: 0; padding: 0; }
.org-body h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.2; overflow-wrap: anywhere; }
.org-skills {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem;
  margin: 0 0 0 calc(var(--spine) - 18px); padding-top: 1rem;
}
.org-skills li {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  background: var(--surface);
  font-size: 0.8rem; font-weight: 700; overflow-wrap: anywhere;
}
.org-skills li span { color: var(--gold); font-size: 0.8rem; flex: none; }

/* ---------- Contact ---------- */
.contact-head { max-width: 760px; margin-bottom: 2rem; }
.contact-title { font-size: clamp(2.4rem, 5.5vw, 4rem); margin: 0.3rem 0 0.7rem; }
.contact-title em { color: transparent; background: linear-gradient(115deg, var(--accent-deep), var(--grad-end)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; align-items: stretch; }
.contact-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1.3rem;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    var(--sheen),
    radial-gradient(90% 70% at 100% 0%, var(--pink-soft), transparent 60%),
    linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  text-decoration: none; color: var(--text);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact-card::before {
  content: ""; position: absolute; top: -32px; right: -22px;
  width: 86px; height: 86px; border-radius: 50%;
  border: 1px dashed var(--line-strong); opacity: 0.7; pointer-events: none;
}
.contact-card > * { position: relative; z-index: 1; }
.contact-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.c-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 0.9rem;
  border-radius: 50%; border: 1px dashed var(--line-strong);
  background: var(--accent-soft); color: var(--accent-deep);
}
.c-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.c-value { font-size: 0.88rem; font-weight: 600; word-break: break-word; }

/* ---------- Footer & To top ---------- */
.site-footer { border-top: 1px dashed var(--line-strong); padding: 1.6rem 0; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem;
  font-size: 0.8rem; color: var(--faint); font-weight: 600;
}
.footer-note { color: var(--faint); }
.footer-top { color: var(--muted); text-decoration: none; }
.footer-top:hover { color: var(--accent-deep); }
.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 70;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px dashed var(--line-strong);
  background: var(--surface); color: var(--text);
  cursor: pointer; box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].is-inview { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .hero-panel { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; padding: clamp(1.2rem, 4vw, 2rem) 1rem 0.4rem; }
  .hero-copy { padding: 0.4rem clamp(1rem, 4vw, 2rem) clamp(1.4rem, 4vw, 2rem); }
  .portrait-frame { width: min(100%, 260px); }
  .journal-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-feature { min-height: auto; }
  .org-media { aspect-ratio: 16 / 10; }
  .org-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .site-header { padding-top: 0.5rem; }
  .header-row { min-height: 50px; padding: 0.3rem 0.35rem 0.3rem 0.6rem; border-radius: 28px; }
  .brand-mark { width: 32px; height: 32px; }
  .square-btn { width: 32px; height: 32px; }
  .header-tools { gap: 0.25rem; }
  .nav-links { display: none; }
  .menu-toggle { display: inline-grid; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool:nth-child(4n) { border-right: 1px dashed var(--line); }
  .tool:nth-child(2n) { border-right: 0; }
  .tool:nth-last-child(-n + 4) { border-bottom: 1px dashed var(--line); }
  .tool:nth-last-child(-n + 2) { border-bottom: 0; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-page:nth-child(2n) { border-right: 0; }
  .skill-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-head { gap: 0.6rem; padding-bottom: 0.8rem; }
  .board-crest { width: 36px; height: 36px; font-size: 0.9rem; }
  .board-copy h3 { font-size: 1.2rem; }
  .board-count { font-size: 1.3rem; }
  .org-card { padding: 0.9rem 0.6rem; }
  .edu-scrapbook { padding: clamp(0.95rem, 2.4vw, 1.35rem); }
  .scrap-head { gap: 0.6rem; padding-bottom: 0.8rem; }
  .scrap-crest { width: 36px; height: 36px; font-size: 0.9rem; }
  .scrap-kicker { font-size: 0.88rem; }
  .scrap-copy h3 { font-size: 1.2rem; }
  .scrap-count { font-size: 1.3rem; }
  .edu-item { padding: 0.85rem 0.55rem; gap: 0.5rem; }
  .edu-num { width: 36px; height: 36px; font-size: 1rem; }
  .edu-year { font-size: 0.6rem; letter-spacing: 0.06em; }
  .edu-main h3 { font-size: 0.95rem; line-height: 1.25; }
  .edu-main p { font-size: 0.72rem; line-height: 1.5; }
  .pill { font-size: 0.52rem; padding: 0.15rem 0.4rem; }
}

@media (max-width: 640px) {
  .site-header { padding-top: 0.45rem; }
  .header-row { width: fit-content; max-width: calc(100% - 1.1rem); min-height: 46px; padding: 0.28rem 0.3rem 0.28rem 0.5rem; border-radius: 24px; }
  .brand-name { display: none; }
  .brand-mark { width: 30px; height: 30px; font-size: 0.9rem; }
  .square-btn { width: 30px; height: 30px; }
  .square-btn svg { width: 15px; height: 15px; }
  .nav-panel { padding-top: calc(var(--nav-h) + 0.4rem); }
  .panel-inner { padding: 0.9rem; border-radius: 24px; }
  .nav-panel a { font-size: 1.1rem; padding: 0.38rem 0.1rem; }
  .nav-panel a .nav-star { width: 22px; height: 22px; font-size: 0.44rem; }
  .hero-panel { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero-visual { order: -1; padding: 1.5rem 1rem 0.3rem; }
  .portrait-frame { width: min(100%, 230px); padding: 9px; border-radius: 20px; }
  .hero-copy { padding: 0.4rem 1.1rem 1.5rem; text-align: center; }
  .eyebrow { justify-content: center; font-size: 0.6rem; letter-spacing: 0.08em; margin-bottom: 0.6rem; }
  .hero-title { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.05; }
  .hero-lead { font-size: 0.9rem; }
  .hero-desc { font-size: 0.8rem; line-height: 1.6; margin-inline: auto; }
  .hero-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
  .hero-panel .btn { padding: 0.7rem 1rem; font-size: 0.78rem; }
  .award-binder { --spine: 38px; padding: 0.8rem 0.7rem 0.9rem; }
  .binder-spine { padding: 0.8rem 0; }
  .binder-spine span { width: 13px; height: 13px; border-width: 1.5px; }
  .binder-head { gap: 0.5rem; padding-bottom: 0.8rem; }
  .binder-mark { width: 34px; height: 34px; font-size: 1rem; }
  .binder-copy h3 { font-size: 1.25rem; }
  .binder-kicker { font-size: 0.52rem; }
  .binder-count { font-size: 1.25rem; }
  .binder-count small { font-size: 0.5rem; }
  .binder-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .award-page { padding: 0.4rem 0.4rem 0.6rem; border-radius: 6px 14px 14px 6px; }
  .award-media { aspect-ratio: 16 / 10; border-radius: 8px 10px 8px 8px; }
  .award-body { padding: 0.55rem 0.3rem 0.25rem; }
  .award-year { font-size: 0.68rem; padding: 0.15rem 0.4rem; margin-bottom: 0.25rem; }
  .award-body h3 { font-size: 0.8rem; line-height: 1.25; overflow-wrap: anywhere; }
  .award-body p { font-size: 0.62rem; line-height: 1.4; }
  .award-page::before { font-size: 0.7rem; top: -0.45rem; }
  .skill-tags { gap: 0.4rem; }
  .skill-tags li { padding: 0.4rem 0.3rem; font-size: 0.62rem; letter-spacing: 0.04em; text-align: center; }
  .tool { grid-template-columns: 32px minmax(0, 1fr); column-gap: 0.45rem; padding: 0.75rem 0.5rem; }
  .tool-icon { width: 32px; height: 32px; font-size: 0.78rem; }
  .tool-icon svg { width: 15px; height: 15px; }
  .tool-name { font-size: 0.8rem; }
  .tool em { font-size: 0.54rem; letter-spacing: 0.06em; }
  .cabinet-head, .gallery-head, .journal-head { gap: 0.6rem; padding-bottom: 0.9rem; }
  .cabinet-crest, .gallery-crest, .journal-crest { width: 40px; height: 40px; }
  .cabinet-count, .gallery-count { font-size: 1.35rem; }
  .gallery-copy p, .cabinet-copy p { display: none; }
  .gallery-grid { gap: 0; }
  .project-page { padding: 0.55rem 0.35rem 0.65rem; }
  .project-page::before { top: 0.45rem; right: 0.45rem; font-size: 0.6rem; }
  .project-media { border-radius: 10px; margin-bottom: 0.4rem; }
  .project-body { padding: 0.45rem 0.1rem 0.2rem; gap: 0.25rem; }
  .project-meta { gap: 0.3rem; margin-bottom: 0; }
  .p-num { font-size: 0.9rem; }
  .p-type { font-size: 0.5rem; letter-spacing: 0.08em; }
  .project-body h3 { font-size: 0.78rem; line-height: 1.25; }
  .project-body p { font-size: 0.62rem; line-height: 1.45; }
  .tags { gap: 0.25rem; margin-top: 0.35rem; }
  .tags li { font-size: 0.5rem; padding: 0.2rem 0.35rem; letter-spacing: 0.03em; }
  .media-ph { padding: 0.5rem; gap: 0.2rem; }
  .ph-mark { font-size: 1.35rem; }
  .ph-name { font-size: 0.5rem; letter-spacing: 0.06em; }
  .journal-page { padding: 0.75rem 0.55rem 0.4rem; }
  .story-page { padding-left: 0.35rem; }
  .story-page::before { top: 0.8rem; right: 0.6rem; font-size: 0.6rem; }
  .story-page .lead { font-size: 0.82rem; line-height: 1.5; margin-bottom: 0.6rem; }
  .story-page p { font-size: 0.7rem; line-height: 1.5; overflow-wrap: anywhere; }
  .story-page p + p { margin-top: 0.5rem; }
  .card-label { font-size: 0.58rem; margin-bottom: 0.5rem; }
  .info-list div { flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.45rem 0; }
  .info-list dt { font-size: 0.55rem; }
  .info-list dd { font-size: 0.68rem; text-align: left; }
  .org-board { padding: 0.7rem 0.55rem 0.8rem; }
  .board-head { gap: 0.45rem; padding-bottom: 0.65rem; }
  .board-crest { width: 30px; height: 30px; font-size: 0.8rem; }
  .board-copy h3 { font-size: 1rem; }
  .board-copy p { display: none; }
  .board-count { font-size: 1rem; }
  .board-count small { font-size: 0.42rem; }
  .org-card { padding: 0.55rem 0.35rem 0.65rem; }
  .org-top { gap: 0.3rem; margin-bottom: 0.5rem; }
  .org-crest { width: 28px; height: 28px; font-size: 0.75rem; }
  .org-badge { font-size: 0.44rem; padding: 0.2rem 0.3rem; letter-spacing: 0.05em; }
  .org-feature h3 { font-size: 0.82rem; line-height: 1.2; }
  .org-role { font-size: 0.88rem; }
  .org-desc { font-size: 0.62rem; line-height: 1.45; }
  .org-card .tags {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem; padding-top: 0.5rem;
  }
  .org-card .tags li {
    display: grid; place-items: center; min-width: 0;
    padding: 0.25rem 0.3rem; line-height: 1.15; text-align: center;
    letter-spacing: 0.02em; overflow-wrap: anywhere;
  }
  .org-media { aspect-ratio: 16 / 9; margin-bottom: 0.55rem; border-radius: 10px; }
  .org-body h3 { font-size: 0.78rem; line-height: 1.2; }
  .org-skills { gap: 0.4rem; padding-top: 0.7rem; }
  .org-skills li { padding: 0.45rem 0.35rem; gap: 0.25rem; font-size: 0.62rem; }
  .edu-scrapbook { padding: 0.6rem 0.45rem 0.7rem; }
  .scrap-head { gap: 0.45rem; padding-bottom: 0.65rem; }
  .scrap-crest { width: 30px; height: 30px; font-size: 0.8rem; }
  .scrap-kicker { display: block; font-size: 0.58rem; }
  .scrap-copy h3 { font-size: 1rem; }
  .scrap-count { padding: 0.15rem 0.35rem 0.2rem; border-radius: 10px 10px 3px 3px; font-size: 0.9rem; }
  .scrap-count small { font-size: 0.4rem; }
  .edu-item { padding: 0.55rem 0.3rem; gap: 0.35rem; }
  .edu-num { width: 28px; height: 28px; font-size: 0.85rem; }
  .edu-item.current .edu-num { box-shadow: 0 0 0 3px var(--accent-soft); }
  .edu-year { font-size: 0.5rem; letter-spacing: 0.02em; }
  .edu-main h3 { font-size: 0.72rem; line-height: 1.2; }
  .edu-main h3::after { width: 18px; margin-top: 0.3rem; }
  .edu-main p { font-size: 0.6rem; line-height: 1.35; }
  .pill { font-size: 0.42rem; padding: 0.1rem 0.25rem; }
  .contact { padding-top: 2rem; padding-bottom: 1.1rem; }
  .contact-head { margin-bottom: 1.1rem; }
  .contact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
  .contact-card { align-items: center; text-align: center; gap: 0.12rem; padding: 0.6rem 0.24rem; border-radius: 12px; }
  .c-icon { width: 30px; height: 30px; margin-bottom: 0.25rem; }
  .c-icon svg { width: 14px; height: 14px; }
  .c-label { font-size: 0.52rem; letter-spacing: 0.03em; }
  .c-value { font-size: 0.55rem; line-height: 1.25; }
  .site-footer { padding: 0.85rem 0 1.1rem; }
  .footer-inner { flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem 0.7rem; font-size: 0.62rem; }
  .footer-note { text-align: center; }
}

@media (max-width: 420px) {
  .cabinet-copy p { display: none; }
  .contact-card { padding: 0.5rem 0.16rem; }
  .c-icon { width: 24px; height: 24px; margin-bottom: 0.15rem; }
  .c-icon svg { width: 12px; height: 12px; }
  .c-label { font-size: 0.48rem; }
  .c-value { font-size: 0.47rem; }
}

@media (max-width: 360px) {
  .header-row { max-width: calc(100% - 0.8rem); }
  .tool { grid-template-columns: 28px minmax(0, 1fr); column-gap: 0.35rem; padding: 0.65rem 0.4rem; }
  .tool-icon { width: 28px; height: 28px; font-size: 0.7rem; }
  .tool-icon svg { width: 14px; height: 14px; }
  .tool-name { font-size: 0.74rem; }
  .tool em { font-size: 0.5rem; }
  .hero-copy { padding: 0.3rem 0.9rem 1.25rem; }
  .hero-title { font-size: clamp(1.8rem, 9vw, 2.2rem); }
  .hero-lead { font-size: 0.82rem; }
  .hero-desc { font-size: 0.74rem; }
  .eyebrow { font-size: 0.55rem; }
  .hero-panel .btn { padding: 0.6rem 0.75rem; font-size: 0.7rem; }
  .portrait-frame { width: min(100%, 190px); padding: 8px; }
  .award-binder { --spine: 32px; padding: 0.7rem 0.55rem 0.8rem; }
  .binder-spine span { width: 11px; height: 11px; }
  .binder-mark { width: 30px; height: 30px; font-size: 0.85rem; }
  .binder-copy h3 { font-size: 1.12rem; }
  .gallery-grid { gap: 0; }
  .project-page { padding: 0.45rem 0.25rem 0.5rem; }
  .project-body h3 { font-size: 0.72rem; }
  .edu-main h3 { font-size: 0.66rem; }
  .edu-main p { font-size: 0.58rem; }
  .binder-pages { gap: 0.45rem; }
  .award-body h3 { font-size: 0.75rem; }
  .org-card { padding: 0.45rem 0.25rem 0.5rem; }
  .org-crest { width: 24px; height: 24px; }
  .org-badge { font-size: 0.4rem; }
  .org-feature h3 { font-size: 0.76rem; }
  .org-desc { font-size: 0.58rem; }
  .org-skills li { font-size: 0.58rem; }
}

/* ---------- Motion & contrast ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #574a66; --faint: #5f5270; --line: rgba(58, 42, 77, 0.28); }
  :root[data-theme="dark"] { --muted: #ded7e6; --faint: #cfc8d9; --line: rgba(244, 236, 251, 0.3); }
}
