/* ---------- Tokens ---------- */
:root {
  --bg: #fbf7f0;
  --surface: #fffdf9;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7dfd3;
  --ghost: #f1eae0;
  --soft: #f3ece2;
  --shadow: 60 40 20;
  --accent: #9a3412;
  --on-accent: #ffffff;
  --radius: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 72px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Calistoga", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111110; --surface: #1a1a19; --ink: #eeeee9; --muted: #a3a39c;
    --line: #2d2d2b; --ghost: #1c1c1b; --soft: #232321; --shadow: 0 0 0;
    --accent: var(--ink); --on-accent: var(--bg);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111110; --surface: #1a1a19; --ink: #eeeee9; --muted: #a3a39c;
  --line: #2d2d2b; --ghost: #1c1c1b; --soft: #232321; --shadow: 0 0 0;
  --accent: var(--ink); --on-accent: var(--bg);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 8px; }

.section { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 11vw, 140px) var(--gutter); }
.h2 { font-family: var(--display); font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 400; margin: 0 0 18px; text-wrap: balance; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }
.h2 em, .display em, .hero h1 em { font-size: 1.12em; line-height: 1; padding-right: .04em; color: var(--accent); }
.h3 { font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 12px; font-weight: 400; }
.display { font-family: var(--display); font-size: clamp(2.6rem, 8vw, 7rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 400; margin: 0 0 22px; max-width: 13ch; }
.section-sub { color: var(--muted); max-width: 56ch; margin: 0 0 clamp(32px, 4.5vw, 52px); }
.meta { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.eyebrow { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 0 0 14px; }

/* Split-word reveal for headings (kinetic type) */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--wi) * 70ms); }
.js [data-split].in .w > span { transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; font-weight: 550; font-size: 15px; text-decoration: none;
  border: 1.5px solid var(--ink); transition: transform .35s var(--ease), background-color .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-lg { padding: 18px 28px; font-size: 17px; }
.link { color: var(--accent); display: inline-flex; gap: 6px; align-items: center; font-weight: 550; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.link i { transition: transform .3s var(--ease); }
.link:hover i { transform: translate(2px, -2px); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; transition: border-color .2s, transform .3s var(--ease); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(.94); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter); pointer-events: none;
}
.nav > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; letter-spacing: .02em; flex: none; }
.brand-mark.sm { width: 30px; height: 30px; font-size: 12px; }
.brand-name { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav-links {
  display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -12px rgb(var(--shadow) / .18);
}
.nav-links a { text-decoration: none; font-size: 14.5px; color: var(--muted); padding: 8px 15px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; transition: color .25s, background-color .35s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { background: var(--accent); color: var(--on-accent); }
.nav-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100dvh; max-width: 1480px; margin: 0 auto;
  padding: calc(var(--nav-h) + 8px) var(--gutter) 44px;
  display: grid; grid-template-columns: 1.15fr minmax(320px, 560px) 1fr; align-items: end; gap: 24px;
  overflow: hidden;
}
.hero-ghost {
  position: absolute; left: 50%; top: calc(var(--nav-h) + 3vh); transform: translateX(-50%);
  display: flex; font-size: clamp(9rem, 30vw, 30rem); font-weight: 800; letter-spacing: -0.06em; line-height: .85;
  color: var(--ghost); user-select: none; pointer-events: none; white-space: nowrap;
}
.hero-ghost span { display: inline-block; }
.js .hero-ghost span { opacity: 0; transform: translateY(40%) scale(.96); animation: ghostIn 1.4s var(--ease) forwards; animation-delay: calc(var(--gi) * 90ms + 100ms); }
@keyframes ghostIn { to { opacity: 1; transform: none; } }
.hero-copy { grid-column: 1; grid-row: 1; position: relative; padding-bottom: 6px; }
.hero h1 { font-family: var(--display); font-size: clamp(2.6rem, 5vw, 5rem); line-height: 1.02; letter-spacing: -0.025em; font-weight: 400; margin: 0 0 18px; max-width: 11ch; }
.hero-sub { color: var(--muted); max-width: 36ch; margin: 0; }
.hero-figure { grid-column: 2; grid-row: 1; position: relative; width: min(100%, calc((100dvh - var(--nav-h) - 90px) * 1.03)); justify-self: center; align-self: end; }
.figure-hit { all: unset; cursor: pointer; display: block; height: 100%; width: 100%; }
.figure-hit:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 24px; }

.hero-cta { grid-column: 3; grid-row: 1; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: relative; padding-bottom: 6px; }
.pause-btn { position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 16px); z-index: 2; }
.js .hero-copy .eyebrow, .js .hero-sub, .js .hero-cta, .js .hero-figure, .js .pause-btn { animation: rise 1.1s var(--ease) both; }
.js .hero-figure { animation-delay: .15s; } .js .hero-sub { animation-delay: .45s; } .js .hero-cta { animation-delay: .6s; } .js .pause-btn { animation-delay: .8s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }

.bubble {
  position: absolute; z-index: 4; top: -3%; left: 68%;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: 18px 18px 18px 4px;
  padding: 10px 14px; font-size: 15px; font-weight: 500; line-height: 1.35;
  width: max-content; max-width: 240px; box-shadow: 0 10px 30px rgb(var(--shadow) / .1);
}
.caret { display: inline-block; width: 1.5px; height: 1em; background: var(--ink); margin-left: 2px; vertical-align: -2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Hero portrait ---------- */
.portrait { position: relative; display: block; perspective: 1000px; }
.portrait-tilt, .portrait-nod, .portrait-breathe { position: relative; display: block; }
.portrait-tilt { transition: transform .6s var(--ease); transform-style: preserve-3d; }
.portrait-breathe { transform-origin: 50% 100%; animation: breatheImg 4.6s ease-in-out infinite; }
@keyframes breatheImg { 50% { transform: scale(1.006, 1.012); } }
.portrait-nod { transform-origin: 48% 60%; }
.portrait.talking .portrait-nod { animation: nod 1.1s ease-in-out infinite alternate; }
@keyframes nod { from { transform: rotate(-.6deg); } to { transform: rotate(.7deg) translateY(-2px); } }
.portrait.bounce .portrait-tilt { animation: bounceP .75s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes bounceP { 0% { transform: scale(1); } 30% { transform: scale(1.04, .97) translateY(4px); } 60% { transform: scale(.98, 1.03) translateY(-10px); } 100% { transform: none; } }
.portrait-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgb(var(--shadow) / .14)); }
.portrait-blink { position: absolute; left: 36.18%; top: 21.78%; width: 25.64%; height: auto; opacity: 0; animation: blinkImg 5.6s infinite; pointer-events: none; }
@keyframes blinkImg { 0%, 91%, 94.5%, 100% { opacity: 0; } 92%, 94% { opacity: 1; } }
.lap-sticker {
  position: absolute; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; line-height: 1;
  color: #141413; background: #f8f7f3; border: 1.5px solid #1b1b1a; border-radius: 999px;
  transform: translate(-50%, -50%) rotate(-9deg) skewY(5deg); box-shadow: 0 2px 0 rgb(0 0 0 / .25);
}
.ls-1 { left: 20%; top: 80.7%; font-size: clamp(11px, 1.35vw, 18px); padding: .5em .75em; }
.ls-2 { left: 30.5%; top: 74.5%; font-size: clamp(8px, .95vw, 13px); width: 3em; height: 3em; background: #f2c94c; transform: translate(-50%, -50%) rotate(12deg); }
.ls-3 { left: 9.5%; top: 72%; font-size: clamp(10px, 1.1vw, 15px); width: 2.1em; height: 2.1em; background: #ec8a78; color: #fff6; transform: translate(-50%, -50%) rotate(-20deg); }
.ls-3 i { color: #fff; }
.sparkles { position: absolute; inset: -6% -10% 20% -10%; width: 120%; height: 86%; overflow: visible; pointer-events: none; transition: transform .8s var(--ease); }
.sp { transform-box: fill-box; transform-origin: center; animation: twinkle 3.4s ease-in-out infinite; animation-delay: var(--d); }
.sp-star { stroke: none; }
.sp-burst { fill: none; stroke-width: .55; stroke-linecap: round; animation-name: burstPulse; }
@keyframes twinkle { 0%, 100% { transform: scale(.55) rotate(0); opacity: .35; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes burstPulse { 0%, 100% { transform: scale(.75) rotate(0); opacity: .45; } 50% { transform: scale(1.08) rotate(22deg); opacity: 1; } }
.sp-glyph { stroke: none !important; font-family: var(--mono); font-size: 4px; font-weight: 600; animation: floaty 4.5s ease-in-out infinite; animation-delay: var(--d); }
@keyframes floaty { 50% { transform: translateY(-2.5px); } }
.c-blue { fill: #8eaee8; stroke: #8eaee8; } .c-coral { fill: #ec8a78; stroke: #ec8a78; } .c-gold { fill: #d6a756; stroke: #d6a756; }
.sp-burst.c-blue, .sp-burst.c-coral, .sp-burst.c-gold { fill: none; }
.c-ink { fill: var(--muted); }
.pop-spark { position: absolute; z-index: 3; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; background: var(--c); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: popOut .9s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes popOut { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(160deg); opacity: 0; } }
.portrait.paused *, .portrait.paused { animation-play-state: paused !important; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr minmax(280px, 340px) 0.9fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.about .lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink); max-width: 40ch; margin: 0 0 16px; }
.about-copy p:not(.lead) { color: var(--muted); max-width: 46ch; margin: 0 0 26px; }
.about-links { display: flex; gap: 10px; flex-wrap: wrap; }

.lanyard { display: flex; flex-direction: column; align-items: center; margin-top: calc(-1 * clamp(80px, 11vw, 140px)); }
.strap { width: 28px; height: 150px; background: var(--ink); color: var(--bg); border-radius: 0 0 4px 4px; overflow: hidden; display: flex; justify-content: center; }
.strap span { writing-mode: vertical-rl; font-family: var(--mono); font-size: 9.5px; letter-spacing: .3em; opacity: .7; padding-top: 14px; white-space: nowrap; }
.clip { width: 44px; height: 24px; border: 3px solid var(--muted); border-top: none; border-radius: 0 0 12px 12px; margin-top: -2px; }
.id-card { all: unset; cursor: pointer; perspective: 1400px; width: min(320px, 82vw); aspect-ratio: 5 / 7.6; margin-top: -4px; transform-origin: 50% -150px; transition: transform .6s var(--ease); }
.id-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: var(--radius); }
.lanyard.in .id-card { animation: swing 2.6s var(--ease) both; }
@keyframes swing { 0% { transform: rotate(10deg); } 35% { transform: rotate(-6deg); } 65% { transform: rotate(2.5deg); } 100% { transform: rotate(0); } }
.id-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.id-card[aria-pressed="true"] .id-inner { transform: rotateY(180deg); }
.id-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; gap: 10px; padding: 0 20px 18px; overflow: hidden;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgb(var(--shadow) / .3);
}
.id-head { display: flex; align-items: center; gap: 10px; margin: 0 -20px; padding: 22px 20px 14px; background: var(--ink); color: var(--bg); }
.id-head .brand-mark { background: var(--bg); color: var(--ink); }
.id-head b { display: block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.id-head small { display: block; font-size: 12px; opacity: .65; }
.id-face::before { content: ""; position: absolute; top: 8px; left: 50%; width: 44px; height: 7px; transform: translateX(-50%); border-radius: 999px; background: var(--bg); z-index: 1; }
.id-photo { display: block; flex: 1; min-height: 0; background: var(--soft); border-radius: 12px; overflow: hidden; margin-top: 4px; }
.id-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(1.75); transform-origin: 48% 16%; }
.id-name { font-size: 1.35rem; font-weight: 720; letter-spacing: -0.03em; line-height: 1; text-transform: uppercase; text-align: center; }
.id-role { font-size: 13.5px; color: var(--muted); margin-top: -4px; text-align: center; }
.id-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12.5px; font-weight: 600; border-top: 1px dashed var(--line); padding-top: 8px; }
.id-fields small { display: block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; opacity: .6; font-weight: 400; }
.id-barcode { height: 24px; flex: none; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 9px, var(--ink) 9px 10px, transparent 10px 14px); opacity: .85; }
.id-back { transform: rotateY(180deg); background: var(--ink); color: var(--bg); padding: 30px 22px 18px; gap: 10px; }
.id-back::before { background: var(--bg); opacity: .25; }
.id-kind { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .16em; opacity: .7; }
.id-list { list-style: none; margin: 0; padding: 0; display: grid; }
.id-list li { display: flex; gap: 10px; align-items: center; padding: 6.5px 0; border-bottom: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.id-list i { font-size: 16px; opacity: .8; flex: none; }
.id-sign { font-family: var(--serif); font-style: italic; font-size: 2rem; margin-top: auto; line-height: 1; }
.id-flip-hint { font-size: 12.5px; opacity: .65; display: flex; gap: 6px; align-items: center; }
.lanyard-hint { font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin: 22px 0 0; }

.facts dl { margin: 0; display: grid; }
.facts dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; font-weight: 550; text-align: right; }
.facts blockquote { margin: 28px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.7rem; line-height: 1.2; letter-spacing: -0.01em; }

/* ---------- Periodic table ---------- */
.pt-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 28px; }
.pt-filters button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; padding: 8px 15px; min-height: 44px; box-sizing: border-box; border-radius: 999px; border: 1.5px solid var(--line); transition: background-color .3s, color .3s, border-color .3s; }
.pt-filters button:hover { border-color: var(--ink); }
.pt-filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pt-filters button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sw { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid currentColor; display: inline-block; }
.sw-lang { background: var(--ink); border-color: var(--ink); }
.sw-front { background: color-mix(in srgb, var(--ink) 66%, var(--bg)); border-color: transparent; }
.sw-back { background: color-mix(in srgb, var(--ink) 36%, var(--bg)); border-color: transparent; }
.sw-ai { background: color-mix(in srgb, var(--ink) 14%, var(--bg)); }
.sw-tool { border-style: dashed; }
.pt-filters button[aria-pressed="true"] .sw { border-color: var(--bg); }

.pt-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: clamp(16px, 3vw, 40px); align-items: start; }
.ptable { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.el {
  all: unset; box-sizing: border-box; cursor: pointer; aspect-ratio: 1; position: relative;
  border-radius: 12px; padding: 7px 9px; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .45s var(--ease), filter .45s;
  border: 1.5px solid transparent;
}
.el .n { font-family: var(--mono); font-size: 12px; opacity: .7; }
.el .s { font-size: clamp(1.1rem, 2.3vw, 1.9rem); font-weight: 720; letter-spacing: -0.04em; line-height: 1; }
.el .nm { font-size: 12px; line-height: 1.15; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el:hover, .el:focus-visible, .el.on { transform: translateY(-4px); box-shadow: 0 14px 24px -12px rgb(var(--shadow) / .4); }
.el:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.el.on { outline: 2px solid var(--ink); outline-offset: 3px; }
.el.lang { background: var(--ink); color: var(--bg); }
.el.front { background: color-mix(in srgb, var(--ink) 66%, var(--bg)); color: var(--bg); }
.el.back { background: color-mix(in srgb, var(--ink) 36%, var(--bg)); color: var(--ink); }
.el.ai { background: color-mix(in srgb, var(--ink) 14%, var(--bg)); color: var(--ink); }
.el.tool { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--ink) 55%, transparent); }
.ptable.filtered .el:not(.match) { opacity: .14; filter: grayscale(1); transform: scale(.94); box-shadow: none; }
.js .el.reveal-el { opacity: 0; transform: translateY(14px) scale(.96); }
.js .ptable.in .el.reveal-el { opacity: 1; transform: none; transition-delay: calc(var(--i) * 22ms); }
.js .ptable.in.filtered .el.reveal-el:not(.match) { opacity: .14; transform: scale(.94); transition-delay: 0s; }

.pt-panel { position: sticky; top: calc(var(--nav-h) + 24px); border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 26px 24px; min-height: 340px; display: flex; flex-direction: column; }
.pt-logo { height: 150px; display: grid; place-items: center; margin-bottom: 18px; }
.pt-logo .logo { width: 96px; height: 96px; background: var(--ink); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.pt-logo .pt-sym-big { font-size: 5rem; font-weight: 760; letter-spacing: -0.06em; line-height: 1; }
.pt-logo > * { animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.8) rotate(-6deg); } }
.pt-name { margin: 0; font-weight: 680; font-size: 1.35rem; letter-spacing: -0.02em; text-align: center; }
.pt-fam { margin: 2px 0 12px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: center; }
.pt-desc { margin: 0; color: var(--muted); font-size: 15px; text-align: center; }

/* ---------- Work accordion ---------- */
.accordion { display: flex; gap: 10px; height: clamp(620px, 80vh, 720px); }
.panel { position: relative; flex: 0 0 56px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: flex-grow .8s var(--ease), flex-basis .8s var(--ease), border-color .3s; }
.panel.is-open { flex: 1 1 0; border-color: var(--ink); }
.panel:not(.is-open):hover { border-color: var(--ink); }
.panel-tab { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 22px 0; transition: opacity .3s; }
.panel-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; border-radius: var(--radius); }
.panel-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.panel-title { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.panel-tab i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 16px; }
.panel.is-open .panel-tab { opacity: 0; pointer-events: none; }
.panel-body { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(20px, 3vw, 40px); padding: clamp(24px, 3vw, 40px); min-width: 700px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.panel.is-open .panel-body { opacity: 1; visibility: visible; transition: opacity .6s .3s, visibility 0s; }
.panel-copy { display: flex; flex-direction: column; overflow: auto; }
.panel-copy > p:not(.meta) { color: var(--muted); margin: 0 0 14px; max-width: 52ch; font-size: 16px; }
.panel.is-open .panel-copy > * { animation: rise .8s var(--ease) both; }
.panel.is-open .panel-copy > *:nth-child(2) { animation-delay: .38s; } .panel.is-open .panel-copy > *:nth-child(3) { animation-delay: .44s; }
.panel.is-open .panel-copy > *:nth-child(4) { animation-delay: .5s; } .panel.is-open .panel-copy > *:nth-child(n+5) { animation-delay: .56s; }
.panel.is-open .panel-copy > *:first-child { animation-delay: .32s; }
.bullets { margin: 0 0 4px; padding-left: 18px; display: grid; gap: 5px; font-size: 14.5px; line-height: 1.5; }
.bullets li::marker { color: var(--muted); }
.tags { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--soft); }
.links { display: flex; gap: 20px; flex-wrap: wrap; }
.panel-copy .link, .panel-copy .links { margin-top: auto; align-self: flex-start; }

.demo { background: var(--ink); color: var(--bg); border-radius: 12px; padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.demo-title { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; opacity: .75; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 12%, transparent); }
.seg button { all: unset; cursor: pointer; font-size: 13.5px; font-weight: 550; padding: 7px 14px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; border-radius: 999px; transition: background-color .3s, color .3s; }
.seg button[aria-selected="true"] { background: var(--bg); color: var(--ink); }
.seg button:focus-visible { outline: 2px solid var(--bg); outline-offset: 2px; }
.demo-text { font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; margin: auto 0; padding: 28px 0; transition: opacity .25s, filter .25s; }
.demo-text.swap { opacity: 0; filter: blur(6px); }
.demo-note, .visual-note { font-size: 12.5px; opacity: .6; margin: 0; }

.visual { border-radius: 12px; background: var(--soft); position: relative; overflow: hidden; display: grid; place-items: center; padding: 24px; }
.visual-relai { grid-template-rows: auto 1fr auto; gap: 18px; place-items: stretch; }
.dial { justify-self: center; position: relative; width: 150px; }
.dial svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: var(--line); stroke-width: 10; }
.dial-fill { fill: none; stroke: var(--ink); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 302; stroke-dashoffset: 302; transition: stroke-dashoffset 1.6s var(--ease) .4s; }
.panel.is-open .dial-fill { stroke-dashoffset: 95; }
.dial span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-content: center; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--ink); }
.visual-er svg { width: 100%; max-width: 440px; height: auto; }
.er-line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 160; stroke-dashoffset: 160; }
.panel.is-open .er-line { animation: draw 1.2s var(--ease) forwards .5s; }
.panel.is-open .er-line:nth-child(2) { animation-delay: .65s; } .panel.is-open .er-line:nth-child(3) { animation-delay: .8s; } .panel.is-open .er-line:nth-child(4) { animation-delay: .95s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.er-node rect { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.er-node text { font-family: var(--mono); font-size: 13px; text-anchor: middle; fill: var(--ink); }
.er-core rect { fill: var(--ink); } .er-core text { fill: var(--bg); }
.bits { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; width: 100%; font-family: var(--mono); font-size: 13px; text-align: center; color: var(--muted); }
.bits span.one { color: var(--ink); font-weight: 600; }
.bits span.flip { animation: flash .6s var(--ease); }
@keyframes flash { from { background: var(--ink); color: var(--bg); border-radius: 3px; } }
.visual-maze { background: var(--ink); }
.pitch { color: var(--ink) !important; font-weight: 550; }
.visual-site { display: flex; flex-direction: column; align-self: center; padding: 0; place-items: stretch; text-decoration: none; color: inherit; border: 1.5px solid var(--line); background: var(--surface); }
.site-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1.5px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.site-bar > span { width: 10px; height: 10px; border-radius: 999px; background: var(--line); }
.site-bar b { font-weight: 400; margin-left: 10px; }
.site-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.site-frame iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform: scale(var(--s, .4)); transform-origin: 0 0; pointer-events: none; background: #ecebe4; }
.site-open { position: absolute; right: 14px; bottom: 14px; display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 550; font-size: 14px; box-shadow: 0 10px 24px -10px rgb(var(--shadow) / .5); transition: transform .35s var(--ease); }
.visual-site:hover .site-open { transform: translateY(-2px); }
.visual-site:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.maze { display: grid; grid-template-columns: repeat(20, 1fr); width: 100%; max-width: 440px; aspect-ratio: 20 / 15; position: relative; }
.maze i { background: var(--bg); opacity: .9; }
.maze i.o { background: transparent; }
.maze i.trail { background: color-mix(in srgb, var(--bg) 22%, transparent); opacity: 1; }
.maze i.goal { background: transparent; box-shadow: inset 0 0 0 2px var(--bg); border-radius: 50%; }
.maze .runner { position: absolute; width: 5%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); transition: left .14s linear, top .14s linear; }

.panel-secret .panel-tab i { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.visual-secret { background: var(--ink); }
.doc { position: relative; width: min(100%, 340px); background: var(--bg); border-radius: 10px; padding: 24px 22px 30px; display: grid; gap: 9px; transform: rotate(-2deg); }
.doc-head { margin: 0 0 6px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.doc span { display: block; height: 11px; width: var(--w); background: var(--ink); border-radius: 2px; transform-origin: left; }
.doc span.gap { margin-top: 10px; }
.panel.is-open .doc span { animation: redact .7s var(--ease) .4s both; }
@keyframes redact { from { transform: scaleX(0); } }
.stamp { position: absolute; right: 14px; bottom: 26px; font-family: var(--mono); font-size: 15px; text-transform: uppercase; letter-spacing: .2em; color: #c0392b; border: 2.5px solid #c0392b; padding: 6px 12px; border-radius: 6px; transform: rotate(-14deg); opacity: .9; }
.panel.is-open .stamp { animation: stamp .5s cubic-bezier(.3, 1.6, .5, 1) 1.2s both; }
@keyframes stamp { from { opacity: 0; transform: rotate(-14deg) scale(2.2); } }

.also { margin-top: clamp(40px, 6vw, 72px); }
.also-title { font-size: 1.1rem; font-weight: 650; margin: 0 0 16px; }
.also-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 40px); }
.also-grid > div { border-top: 1.5px solid var(--ink); padding-top: 16px; }
.also-name { font-weight: 650; font-size: 1.15rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.also-grid p:not(.also-name) { color: var(--muted); margin: 0; font-size: 15.5px; }
.also .tags { margin-bottom: 0; }

/* ---------- Certifications ---------- */
.certs { display: grid; grid-template-columns: minmax(260px, 0.8fr) 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.certs-head { position: sticky; top: calc(var(--nav-h) + 40px); }
.cert-list { list-style: none; margin: 0; padding: 0; }
.cert-list li > * { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 22px 20px; border-radius: 12px; text-decoration: none; position: relative; isolation: isolate; transition: color .35s var(--ease); }
.cert-list li > *::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); border-radius: 12px; transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); }
.cert-list li > *:hover, .cert-list li > a:focus-visible { color: var(--bg); }
.cert-list li > *:hover::before, .cert-list li > a:focus-visible::before { transform: scaleY(1); }
.cert-list li + li { border-top: 1px solid var(--line); }
.c-num { font-family: var(--mono); font-size: 12px; opacity: .6; }
.c-name { display: block; font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.c-org { display: block; font-size: 14px; opacity: .7; margin-top: 2px; }
.cert-list i { font-size: 20px; transition: transform .35s var(--ease); }
.cert-list li > *:hover i { transform: translate(2px, -2px); }

/* ---------- Experience ---------- */
.exp-grid { --xgap: clamp(24px, 5vw, 80px); display: grid; grid-template-columns: minmax(200px, 0.7fr) 1.3fr; gap: var(--xgap); margin-top: clamp(32px, 5vw, 56px); }
.exp-rail { position: relative; }
.exp-year { position: sticky; top: calc(var(--nav-h) + 40px); font-size: clamp(4rem, 9vw, 8.5rem); font-weight: 780; letter-spacing: -0.06em; line-height: .9; overflow: hidden; padding-bottom: .08em; }
.exp-year span { display: inline-block; }
.exp-year span.out { animation: yearOut .35s var(--ease) forwards; }
.exp-year span.in { animation: yearIn .6s var(--ease); }
@keyframes yearOut { to { transform: translateY(-100%); opacity: 0; } }
@keyframes yearIn { from { transform: translateY(100%); opacity: 0; } }
.exp-line { position: absolute; top: 0; bottom: 0; right: calc(var(--xgap) / -2 - .75px); width: 1.5px; background: var(--line); }
.exp-line span { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(0); }
.exp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.exp-list li { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px 26px; position: relative; transition: border-color .3s; }
.exp-list li.current { border-color: var(--ink); }
.exp-list li::before { content: ""; position: absolute; left: calc(var(--xgap) / -2 - 7.5px); top: 30px; width: 12px; height: 12px; border-radius: 999px; background: var(--bg); border: 1.5px solid var(--ink); transition: background-color .3s; }
.exp-list li.current::before { background: var(--ink); }
.x-when { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.x-kind { float: right; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; padding: 3px 10px; border-radius: 999px; background: var(--soft); }
.exp-list h3 { margin: 10px 0 2px; font-size: 1.3rem; letter-spacing: -0.025em; line-height: 1.25; }
.x-org { margin: 0 0 10px; font-weight: 550; }
.exp-list p:not(.x-org) { margin: 0; color: var(--muted); font-size: 15.5px; }
.x-next { background: transparent !important; border-style: dashed !important; text-align: left; }
.x-next h3 { font-size: 2.6rem; margin-top: 18px; }
.x-next h3 em { font-size: 1.15em; }
.x-next .btn { margin-top: 18px; }
.x-next .x-kind { float: none; }

/* ---------- Achievements ---------- */
.achievements { overflow: hidden; }
.ach-track { display: flex; gap: clamp(16px, 2vw, 24px); align-items: center; min-height: 100dvh; padding: calc(var(--nav-h) + 24px) var(--gutter) 40px; width: max-content; }
.ach-intro { width: min(420px, 80vw); flex: none; display: flex; flex-direction: column; justify-content: center; }
.ach-intro p { color: var(--muted); margin: 0; }
.ach { flex: none; width: clamp(280px, 26vw, 360px); min-height: 400px; border-radius: var(--radius); border: 1.5px solid var(--ink); padding: 26px; display: flex; flex-direction: column; background: var(--surface); }
.ach:nth-child(odd) { background: var(--ink); color: var(--bg); }
.ach-ico { font-size: 28px; margin-bottom: auto; }
.ach-stat { font-size: clamp(3.8rem, 6.4vw, 5.8rem); font-weight: 760; letter-spacing: -0.06em; line-height: .9; margin-top: 40px; font-variant-numeric: tabular-nums; }
.ach-stat.ach-word { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.03em; }
.ach h3 { margin: 22px 0 8px; font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.25; }
.ach p { margin: 0; font-size: 15px; opacity: .75; }

/* ---------- Contact / footer ---------- */
.contact { padding-bottom: clamp(72px, 9vw, 110px); }
.contact .section-sub { margin-bottom: 32px; }
.contact-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.social { width: 60px; height: 60px; border-radius: 999px; border: 1.5px solid var(--ink); display: grid; place-items: center; text-decoration: none; transition: background-color .3s, color .3s, transform .35s var(--ease); }
.social:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.brand-ico { width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.ico-linkedin { --ico: url("https://cdn.jsdelivr.net/npm/simple-icons@11/icons/linkedin.svg"); }
.ico-github { --ico: url("https://cdn.jsdelivr.net/npm/simple-icons@11/icons/github.svg"); }
#copy-mail span { font-family: var(--mono); font-size: 15px; }
.copy-status { min-height: 1.6em; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.footer { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; border-top: 1.5px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .lanyard.reveal { transform: translateY(-40px); }
.js .lanyard.reveal.in { transform: none; }

/* ---------- Mini Sama mascot ---------- */
@keyframes boing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(7deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes talk { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.mascot {
  --m-skin: #c99470; --m-hair: #24170f; --m-hair-hi: #55392a; --m-hoodie: #aeb4bc; --m-out: #1b1b1a;
  --m-pop: #f2c94c; --m-coral: #e98a7a; --m-mint: #9fd8c4;
  position: fixed; right: clamp(10px, 2vw, 24px); bottom: clamp(10px, 2vw, 22px); z-index: 40;
  width: 124px; pointer-events: none;
  transform: translateY(140%); transition: transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
:root[data-theme="dark"] .mascot { --m-hair: #3b281d; --m-hair-hi: #7a5640; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mascot { --m-hair: #3b281d; --m-hair-hi: #7a5640; } }
.mascot.on { transform: none; }
.mascot.gone { transform: translateY(140%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; }
.mascot > * { pointer-events: auto; }
.m-btn { all: unset; pointer-events: auto; cursor: pointer; display: block; width: 100%; -webkit-tap-highlight-color: transparent; }
.m-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 20px; }
.m-svg { width: 100%; height: auto; overflow: visible; }
.m-body { transform-box: view-box; transform-origin: 60px 134px; animation: mBob 2.6s ease-in-out infinite; }
@keyframes mBob { 50% { transform: translateY(-3px) scaleY(1.01); } }
.mascot.hop .m-body { animation: mHop .6s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes mHop { 0% { transform: scale(1.06, .9); } 40% { transform: translateY(-16px) scale(.96, 1.06); } 70% { transform: translateY(0) scale(1.05, .94); } }
.mascot.spin .m-body { animation: mSpin .8s cubic-bezier(.3, 1.3, .5, 1); }
.mascot.wiggle .m-body { animation: mWiggle .7s ease-in-out; }
@keyframes mWiggle { 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
.mascot.dance .m-body { animation: mDance 1s ease-in-out; }
@keyframes mDance { 15% { transform: translateX(-6px) rotate(-6deg); } 35% { transform: translate(6px, -8px) rotate(6deg); } 55% { transform: translateX(-6px) rotate(-6deg); } 75% { transform: translate(6px, -8px) rotate(6deg); } }
.mascot.flip .m-body { animation: mFlip .9s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes mFlip { 0% { transform: none; } 50% { transform: translateY(-26px) rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes mSpin { 0% { transform: none; } 45% { transform: translateY(-22px) rotate(-12deg); } 75% { transform: translateY(0) rotate(4deg); } 100% { transform: none; } }
.m-shadow { fill: rgb(var(--shadow) / .16); }
:root[data-theme="dark"] .m-shadow { fill: rgb(255 255 255 / .07); }
.m-hair { fill: var(--m-hair); }
.m-curl { fill: none; stroke: var(--m-hair-hi); stroke-width: 1.2; stroke-linecap: round; }
.m-stray { fill: none; stroke: var(--m-hair); stroke-width: 2.6; stroke-linecap: round; transform-box: view-box; transform-origin: 60px 30px; animation: boing 2.4s ease-in-out infinite; }
.m-clip { fill: var(--m-pop); stroke: var(--m-out); stroke-width: .9; stroke-linejoin: round; }
.m-skin { fill: var(--m-skin); }
.m-skin-dot { fill: var(--m-skin); }
.m-hoodie { fill: var(--m-hoodie); stroke: var(--m-out); stroke-width: 1.6; stroke-linejoin: round; }
.m-string { stroke: #f3f1ec; stroke-width: 1.6; stroke-linecap: round; }
.m-shoe { fill: #fafafa; stroke: var(--m-out); stroke-width: 1.4; }
.m-eye { fill: #1d120c; }
.m-glint { fill: #fff; }
.m-gaze { transition: transform .4s var(--ease); }
.m-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.m-closed, .m-happy { fill: none; stroke: #1d120c; stroke-width: 2; stroke-linecap: round; opacity: 0; }
.m-blush { fill: var(--m-coral); opacity: .5; }
.m-mouth { fill: none; stroke: #6b2b24; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.m-mouth-o { fill: #6b2b24; opacity: 0; }
.mascot.talk .m-mouth { opacity: 0; }
.mascot.talk .m-mouth-o { opacity: 1; transform-box: fill-box; transform-origin: center; animation: talk .18s ease-in-out infinite alternate; }
.mascot.happy .m-open, .mascot.sleep .m-open { opacity: 0; }
.mascot.happy .m-happy { opacity: 1; }
.mascot.sleep .m-closed { opacity: 1; }
.mascot.sleep .m-eyes { animation: none; }
.mascot.sleep .m-body { animation: mBreathe 3.6s ease-in-out infinite; }
@keyframes mBreathe { 50% { transform: scale(1.02, .98); } }
.m-zzz text { font-family: var(--mono); font-weight: 700; font-size: 11px; fill: var(--ink); opacity: 0; }
.mascot.sleep .m-zzz text { animation: zzz 2.4s ease-in-out infinite; }
.mascot.sleep .m-zzz text:nth-child(2) { animation-delay: .5s; } .mascot.sleep .m-zzz text:nth-child(3) { animation-delay: 1s; }
@keyframes zzz { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }

/* props: only the active one shows */
.m-props .p { display: none; }
.m-svg[data-prop="wave"] .p-wave, .m-svg[data-prop="card"] .p-card, .m-svg[data-prop="flask"] .p-flask,
.m-svg[data-prop="laptop"] .p-laptop, .m-svg[data-prop="scroll"] .p-scroll, .m-svg[data-prop="clapper"] .p-clapper,
.m-svg[data-prop="trophy"] .p-trophy, .m-svg[data-prop="letter"] .p-letter { display: inline; animation: pop .5s var(--ease); }
.m-props .p { transform-box: fill-box; transform-origin: center bottom; }
.p-wave { transform-box: view-box !important; transform-origin: 78px 100px !important; }
.m-svg[data-prop="wave"] .p-wave { animation: mWave 1.4s ease-in-out infinite; }
@keyframes mWave { 50% { transform: rotate(-14deg); } }
.m-paper { fill: #fbfbf9; stroke: var(--m-out); stroke-width: 1.2; }
.m-ink { fill: #1b1b1a; stroke: var(--m-out); stroke-width: 1.2; }
.m-line { fill: none; stroke: var(--m-out); stroke-width: 1.1; stroke-linecap: round; }
.m-code { font-family: var(--mono); font-size: 9px; font-weight: 700; fill: var(--m-mint); text-anchor: middle; }
.m-type1 { animation: type .3s ease-in-out infinite alternate; }
.m-type2 { animation: type .3s ease-in-out .15s infinite alternate; }
@keyframes type { to { transform: translateY(-2px); } }
.m-glass { fill: rgb(255 255 255 / .55); stroke: var(--m-out); stroke-width: 1.2; stroke-linejoin: round; }
.m-liquid { fill: var(--m-mint); }
.m-fizz { fill: #fff; }
.m-svg[data-prop="flask"] .m-fizz { animation: rise2 1.6s ease-in infinite; }
.b2 { animation-delay: .5s !important; } .b3 { animation-delay: 1s !important; }
@keyframes rise2 { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-22px); opacity: 0; } }
.m-seal { fill: var(--m-coral); stroke: var(--m-out); stroke-width: .9; }
.m-chalk { stroke: #f3f1ec; stroke-width: 1.4; stroke-linecap: round; }
.m-stripe { stroke: #f3f1ec; stroke-width: 2; }
.m-clap { transform-box: view-box; transform-origin: 80px 100px; animation: clap 1.8s var(--ease) infinite; }
@keyframes clap { 0%, 60%, 100% { transform: none; } 30% { transform: rotate(-22deg); } }
.m-gold { fill: var(--m-pop); stroke: var(--m-out); stroke-width: 1.2; stroke-linejoin: round; }
.m-goldline { fill: none; stroke: var(--m-out); stroke-width: 1.4; }
.m-spark { fill: var(--m-pop); stroke: var(--m-out); stroke-width: .8; transform-box: fill-box; transform-origin: center; animation: twinkle 1.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(.5) rotate(45deg); opacity: .5; } }
.m-heart { fill: var(--m-coral); stroke: var(--m-out); stroke-width: .9; }
.m-float { animation: floatUp 2s ease-in-out infinite; }
@keyframes floatUp { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-8px); opacity: 0; } }

.m-bubble {
  position: absolute; right: 70%; bottom: 82%; width: max-content; max-width: 190px; margin: 0;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 16px 16px 4px 16px;
  padding: 8px 12px; font-size: 13.5px; font-weight: 500; line-height: 1.35;
  box-shadow: 0 10px 24px -10px rgb(var(--shadow) / .3);
  opacity: 0; transform: translateY(6px) scale(.9); transform-origin: bottom right;
  transition: opacity .3s, transform .45s cubic-bezier(.34, 1.56, .64, 1); pointer-events: none;
}
.mascot.talk .m-bubble { opacity: 1; transform: none; }
.m-hide {
  all: unset; pointer-events: auto; cursor: pointer; position: absolute; top: -2px; right: -2px; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-size: 12px; opacity: 0; transition: opacity .2s;
}
.mascot:hover .m-hide, .m-hide:focus-visible, .mascot:focus-within .m-hide { opacity: 1; }
.m-hide:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.m-restore {
  all: unset; cursor: pointer; position: fixed; right: 0; bottom: 24px; z-index: 40; width: 34px; height: 44px; display: grid; place-items: center;
  border-radius: 12px 0 0 12px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700;
  transform: translateX(110%); transition: transform .4s var(--ease);
}
.m-restore.show { transform: none; }
.m-restore:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: none) { .m-hide { opacity: 1; } }
@media (max-width: 560px) { .mascot { width: 76px; } .m-bubble { max-width: 160px; font-size: 12.5px; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav-links a { padding: 8px 11px; font-size: 14px; }
  .about { grid-template-columns: 1fr minmax(280px, 320px); }
  .facts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
  .facts blockquote { margin: 0; }
  .lanyard { grid-row: 1 / 2; grid-column: 2; }
  .ptable { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .el .nm { display: none; }
}
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .nav { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); pointer-events: auto; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
  .brand-name { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; border-radius: 0; box-shadow: none;
    background: var(--bg); border: 0; border-bottom: 1.5px solid var(--line); padding: 8px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 0; font-size: 18px; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a.active { background: none; color: var(--ink); font-weight: 650; }
  .hero { grid-template-columns: 1fr; align-items: start; padding-bottom: 48px; gap: 18px; }
  .hero-figure { grid-column: 1; grid-row: 1; width: min(380px, 84vw); justify-self: center; margin-top: 28px; }
  .hero-copy { grid-column: 1; grid-row: 2; }
  .hero-cta { grid-column: 1; grid-row: 3; justify-content: flex-start; }
  .hero-ghost { top: calc(var(--nav-h) + 6vh); font-size: 38vw; }
  .bubble { left: 58%; top: -7%; max-width: 160px; font-size: 13.5px; }
  .pause-btn { top: calc(var(--nav-h) + 12px); left: var(--gutter); right: auto; }
  .about { grid-template-columns: 1fr; }
  .lanyard { grid-column: 1; grid-row: auto; margin-top: 0; }
  .facts { grid-template-columns: 1fr; }
  .pt-wrap { grid-template-columns: 1fr; }
  .pt-panel { position: static; min-height: 0; flex-direction: row; align-items: center; gap: 18px; padding: 18px; order: -1; }
  .pt-logo { height: 72px; width: 72px; flex: none; margin: 0; }
  .pt-logo .logo { width: 60px; height: 60px; }
  .pt-logo .pt-sym-big { font-size: 2.8rem; }
  .pt-name, .pt-fam, .pt-desc { text-align: left; }
  .pt-text { min-width: 0; }
  .pt-desc { font-size: 14px; }
  .pt-fam { margin-bottom: 4px; }
  .ptable { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .accordion { flex-direction: column; height: auto; }
  .panel, .panel.is-open { flex: none; }
  .panel-tab { position: static; width: 100%; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 18px 20px; }
  .panel-copy .h3 { display: none; }
  .panel-title { writing-mode: horizontal-tb; transform: none; font-size: 1.15rem; }
  .panel-tab i { margin-left: auto; }
  .panel.is-open .panel-tab { opacity: 1; pointer-events: auto; }
  .panel.is-open .panel-tab i { transform: rotate(45deg); }
  .panel-body { position: static; display: none; grid-template-columns: 1fr; min-width: 0; padding: 0 20px 22px; opacity: 1; visibility: visible; }
  .panel.is-open .panel-body { display: grid; }
  .visual, .demo { min-height: 260px; }
  .also-grid { grid-template-columns: 1fr; }
  .certs { grid-template-columns: 1fr; }
  .certs-head { position: static; }
  .exp-grid { grid-template-columns: 1fr; }
  .exp-rail { display: none; }
  .exp-list li::before { display: none; }
  .ach-track { width: auto; min-height: 0; align-items: stretch; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 72px var(--gutter) 40px; }
  .ach-intro { width: 78vw; }
  .ach { min-height: 360px; width: 78vw; }
  .ach, .ach-intro { scroll-snap-align: start; }
}
@media (max-width: 560px) {
  .ptable { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .brand-name { display: none; }
  .hero h1 { font-size: 2.6rem; }
  .facts dl div { flex-direction: column; gap: 2px; }
  .facts dd { text-align: left; }
  .id-fields { font-size: 12px; }
  .contact-row .btn-lg { width: 100%; justify-content: center; }
  #copy-mail span { font-size: 13.5px; }
  .x-kind { float: none; display: inline-block; margin-left: 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; animation-delay: 0s !important; }
  .js .reveal, .js .el.reveal-el, .js .hero-ghost span { opacity: 1; transform: none; }
  .js [data-split] .w > span { transform: none; }
  .caret { display: none; }
}
