:root {
  color-scheme: light;
  --button-ink: #FFFFFF;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #171B22;
  --muted: #5C6572;
  --line: #DCE0E6;
  --accent: #0B7A57;
  --accent-2: #B7791F;
  --focus: #0B7A57;
  --body-font: "Anuphan", sans-serif;
  --display-font: "Bai Jamjuree", sans-serif;
  --mono-font: "JetBrains Mono", monospace;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11161D;
  --surface: #1B232D;
  --ink: #F0F3F7;
  --muted: #ADB8C6;
  --line: #394553;
  --accent: #68D9B0;
  --accent-2: #EDBE70;
  --focus: #68D9B0;
  --button-ink: #11161D;
}
.topbar-controls { display: flex; align-items: center; gap: 8px; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
.theme-btn:hover { border-color: var(--accent); }
.theme-sun { display: none; }
html[data-theme="dark"] .theme-moon { display: none; }
html[data-theme="dark"] .theme-sun { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
* { box-sizing: border-box; }
html { scroll-padding-top: 140px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body-font); font-size: clamp(1rem, .95rem + .2vw, 1.0625rem); line-height: 1.65; }
html[data-lang="th"] [lang="en"]:not(.lang-btn),
html[data-lang="en"] [lang="th"]:not(.lang-btn) { display: none; }
h1, h2, h3, p, figure, ul, ol, dl { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.container, .topbar-inner { width: min(100%, 1080px); margin-inline: auto; padding-inline: 16px; }
.section, .hero { padding-block: clamp(3rem, 8vw, 6rem); }
.section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 32px; }
.section-title, .project-title, .display { font-family: var(--display-font); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.display { font-size: clamp(2.4rem, 1.6rem + 3.5vw, 4.4rem); line-height: 1.05; margin-block: 24px; }
.section-title { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); line-height: 1.25; }
.project-title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.3; margin-block: 12px; }
.section-note { color: var(--muted); max-width: 70ch; margin-top: 12px; }
.mono, .receipt, .evidence, .chips, code, .footer-stamp { font-family: var(--mono-font); font-size: clamp(.8125rem, .78rem + .15vw, .875rem); }
code { overflow-wrap: anywhere; }
.eyebrow { color: var(--muted); font-size: .875rem; }
.skip { position: fixed; top: 8px; left: 16px; z-index: 30; padding: 12px 16px; background: var(--surface); border-radius: 10px; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 16px; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; width: fit-content; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.menu { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 8px; list-style: none; overflow-x: auto; padding: 4px; margin-inline: -4px; }
.menu a { display: flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; border-radius: 10px; }
@media (max-width: 719px) { .menu { gap: 0; } .menu a { padding-inline: 8px; font-size: .9375rem; } }
.menu a:hover { color: var(--accent); background: var(--bg); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.lang-btn { min-width: 44px; min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.lang-btn[aria-pressed="true"] { color: var(--accent); background: var(--bg); font-weight: 600; }
.hero { display: grid; gap: 32px; }
.hero-copy { min-width: 0; }
.lede { max-width: 70ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--button-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ghost { background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.hero-media { grid-row: 3; min-width: 0; }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; max-height: 360px; object-fit: cover; border-radius: 10px; }
.receipt { min-width: 0; padding: 24px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.receipt-cmd { font-weight: 500; margin-bottom: 20px; }
.prompt { color: var(--muted); }
.receipt-lines { list-style: none; display: grid; gap: 16px; padding: 0; }
.rc-line { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 0 12px; align-items: baseline; }
.rc-mark { grid-column: 1; grid-row: 1 / 3; color: var(--accent); }
.rc-mark::before { content: "✓"; font-weight: 500; }
.rc-line[data-state="pending"] .rc-mark { color: var(--accent-2); }
.rc-line[data-state="pending"] .rc-mark::before { content: "✎"; }
.rc-line a { color: var(--ink); text-decoration-color: var(--line); width: fit-content; }
.rc-line a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.rc-meta { grid-column: 2; color: var(--muted); overflow-wrap: anywhere; }
.receipt-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
time[datetime=""] { color: var(--accent-2); }
.project { display: grid; gap: 32px; padding: 24px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 2px rgb(23 27 34 / .06); transition: border-color 180ms ease; }
.project:hover { border-color: var(--accent); }
.project-side, .project-body { min-width: 0; }
.project-tag { color: var(--muted); }
.evidence { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 20px; }
.evidence a { display: inline-flex; align-items: center; min-height: 44px; }
.evidence-note { color: var(--muted); }
.app-badge { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.app-badge img { flex: none; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; }
.app-name { display: block; font-family: var(--body-font); font-weight: 600; color: var(--ink); }
.project-mascot { display: none; max-width: 120px; margin-top: 24px; }
.pah { display: grid; gap: 12px; }
.pah dt { font: .8125rem var(--mono-font); text-transform: uppercase; color: var(--muted); }
.pah dd { margin: 0 0 12px; max-width: 70ch; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin-top: 24px; }
.chips li { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; max-width: 100%; }
.more { margin-top: 48px; }
.more-title, .sub-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 24px; }
.more-list { padding: 0; list-style: none; }
.more-list > li { display: grid; gap: 8px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.more-name { font-weight: 600; }
.more-desc { color: var(--muted); max-width: 70ch; }
.more-links { display: flex; flex-wrap: wrap; gap: 16px; }
.more-links a { display: inline-flex; align-items: center; min-height: 44px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 32px; }
.skill-group h3 { font-size: 1rem; margin-bottom: 16px; }
.skill-group ul { padding-left: 20px; color: var(--muted); }
.skill-group li { margin-bottom: 8px; overflow-wrap: anywhere; }
.dim { color: var(--muted); }
.about-grid { display: grid; gap: 32px; }
.about-copy p { max-width: 70ch; margin-bottom: 16px; }
.facts { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 24px; }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { margin: 4px 0 20px; }
.facts dd:last-child { margin-bottom: 0; }
.sub-title { margin-top: 48px; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; list-style: none; padding: 0; }
.cert { display: block; width: 100%; min-height: 44px; text-align: left; background: transparent; border: 0; padding: 0; border-radius: 6px; }
.cert img { width: 100%; height: auto; aspect-ratio: 900 / 731; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; transition: border-color 180ms ease; }
.cert:hover img { border-color: var(--accent); }
.cert-cap { display: block; margin-top: 12px; color: var(--muted); font-size: .875rem; }
.activity-list { padding-left: 20px; margin-top: 32px; color: var(--muted); }
.activity-list li { margin-block: 8px; }
.activity-list a { display: inline-flex; align-items: center; min-height: 44px; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.contact-k { color: var(--muted); }
.contact-list a { min-height: 44px; display: flex; align-items: center; width: fit-content; max-width: 100%; }
.footer { padding-block: 32px; color: var(--muted); border-top: 1px solid var(--line); }
.footer p + p { margin-top: 8px; }
.lightbox { border: 0; border-radius: 10px; padding: 16px; background: var(--surface); max-width: 98vw; max-height: 98vh; overscroll-behavior: contain; }
.lightbox::backdrop { background: rgb(23 27 34 / .8); }
.lightbox-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.lightbox-close { min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.lightbox-close:hover { border-color: var(--accent); }
.lightbox img { max-width: min(96vw, 1200px); max-height: calc(98vh - 110px); width: auto; height: auto; object-fit: contain; margin-inline: auto; }
@media (min-width: 720px) {
  .container, .topbar-inner { padding-inline: 32px; }
  .receipt { padding: 32px; }
  .rc-line { grid-template-columns: 20px 17ch minmax(0, 1fr); }
  .rc-mark { grid-row: 1; }
  .rc-meta { grid-column: 3; }
  .project { padding: 32px; }
  .pah { grid-template-columns: 10ch minmax(0, 1fr); gap: 12px 24px; }
  .pah dt { padding-top: 5px; }
  .pah dd { margin: 0; }
  .contact-list li { grid-template-columns: 12ch minmax(0, 1fr); align-items: center; }
}
@media (min-width: 900px) {
  html { scroll-padding-top: 96px; }
  .topbar-inner { grid-template-columns: 1fr auto auto; gap: 32px; }
  .menu { grid-column: 2; grid-row: 1; }
  .hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
  .hero-media { grid-row: 1; grid-column: 2; }
  .hero-media img { max-height: none; }
  .receipt { grid-column: 1 / -1; }
  .project { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .project-mascot { display: block; }
  .more-list > li { grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 24px; }
  .about-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none; animation: none; scroll-behavior: auto; }
}
@media print {
  html[data-theme] { color-scheme: light; --bg: #F5F6F8; --surface: #FFFFFF; --ink: #171B22; --muted: #5C6572; --line: #DCE0E6; --accent: #0B7A57; --accent-2: #B7791F; --button-ink: #FFFFFF; }
  .topbar, .lightbox, .skip { display: none; }
  body { background: var(--surface); }
  .hero, .section { padding-block: 24px; }
  .project, .receipt { break-inside: avoid; box-shadow: none; }
  *, *::before, *::after { animation: none; transition: none; }
  .rc-line[data-state="pending"] .rc-mark { color: var(--accent); }
  .rc-line[data-state="pending"] .rc-mark::before { content: "✓"; }
}
.timeline { list-style: none; padding: 0; display: grid; gap: 32px; }
.role { display: grid; gap: 8px; }
.role-when { color: var(--muted); }
.role-body { min-width: 0; }
.role-title { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.role-org { color: var(--muted); margin-bottom: 12px; }
.role-body ul { padding-left: 20px; max-width: 70ch; }
.role-body li { margin-bottom: 8px; overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .role { grid-template-columns: 18ch minmax(0, 1fr); gap: 24px; }
  .role-when { padding-top: 4px; }
}

/* Motion and reading cues: progressively enhanced, with visible static content. */
.topbar::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--accent); transform: scaleX(var(--read-progress, 0)); transform-origin: left; pointer-events: none; }
.topbar.is-scrolled { box-shadow: 0 4px 20px rgb(0 0 0 / .06); }
.menu a[aria-current="location"] { color: var(--accent); background: var(--bg); box-shadow: inset 0 -2px var(--accent); }
.hero { position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 16px 16px auto; height: min(460px, 70%); z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 80% 35%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 65%); }
.receipt { border-top: 3px solid var(--accent); }
.project { position: relative; }
.project:focus-within { border-color: var(--accent); }
.section-title::after { content: ""; display: block; width: 32px; height: 3px; margin-top: 16px; border-radius: 2px; background: var(--accent); }
.skill-group { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.theme-btn svg { transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .theme-btn, .lang-btn { transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease; }
  .btn:active, .theme-btn:active, .lang-btn:active { transform: translateY(2px); }
  .project, .skill-group { transition: border-color 220ms ease, box-shadow 220ms ease; }
  .theme-btn svg { animation: theme-turn 260ms ease-out; }
  .lightbox[open] { animation: dialog-enter 220ms ease-out; }
  @keyframes theme-turn { from { transform: rotate(-35deg); opacity: .5; } to { transform: rotate(0); opacity: 1; } }
  @keyframes dialog-enter { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
}
@media (hover: hover) and (pointer: fine) {
  .project:hover, .skill-group:hover { border-color: var(--accent); box-shadow: 0 8px 28px rgb(0 0 0 / .07); }
  .evidence a:hover, .more-links a:hover { text-decoration-thickness: 2px; }
}
@media print {
  .hero::before, .section-title::after { display: none; }
  .skill-group { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  :root :where(*, *::before, *::after) { transition: none; animation: none; }
}

/* Persona-inspired portfolio console. The content remains a standard document
   until script.js enables this layer, so no-JS and print retain a readable page. */
body[data-screen] {
  --persona-red: #e53b2c;
  --persona-yellow: #ffd635;
  --persona-cyan: #52d5dd;
  --persona-ink: #111117;
  --persona-paper: #f7f2e7;
  --persona-line: rgb(17 17 23 / .2);
  --bg: #16161d;
  --surface: #f7f2e7;
  --ink: #171116;
  --muted: #665e5b;
  --line: rgb(17 17 23 / .2);
  --accent: #be281f;
  --accent-2: #9b6200;
  --focus: #ffd635;
  --button-ink: #111117;
  background:
    linear-gradient(128deg, transparent 0 44%, rgb(229 59 44 / .14) 44% 45%, transparent 45% 100%),
    repeating-linear-gradient(-42deg, rgb(255 255 255 / .025) 0 2px, transparent 2px 10px),
    var(--bg);
}
html[data-theme="light"] body[data-screen] {
  --bg: #efe8d9;
  --surface: #fffaf0;
  --ink: #171116;
  --muted: #655b57;
  --line: rgb(23 17 22 / .2);
  --accent: #b5251c;
  --accent-2: #956000;
  --focus: #a41e17;
  --button-ink: #fffaf0;
}

.persona-menu,
.persona-back { display: none; }

body.persona-mode {
  height: 100svh;
  overflow: hidden;
}
body.persona-mode .skip { background: var(--persona-yellow); color: var(--persona-ink); border-radius: 0; }
body.persona-mode .topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 68px;
  background: transparent;
  border: 0;
  pointer-events: none;
  box-shadow: none;
}
body.persona-mode .topbar::after { display: none; }
body.persona-mode .topbar-inner {
  width: 100%;
  height: 100%;
  padding: 10px clamp(16px, 3vw, 44px);
  grid-template-columns: 1fr auto;
  gap: 12px;
}
body.persona-mode .brand,
body.persona-mode .topbar-controls { pointer-events: auto; }
body.persona-mode .brand {
  min-width: 44px;
  gap: 9px;
  color: var(--persona-paper);
  font-family: var(--mono-font);
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.persona-mode .brand-mark {
  width: 13px;
  height: 13px;
  border-radius: 0;
  background: var(--persona-red);
  transform: rotate(45deg);
}
body.persona-mode .menu { display: none; }
body.persona-mode .topbar-controls { gap: 6px; }
body.persona-mode .theme-btn,
body.persona-mode .lang {
  min-height: 44px;
  background: var(--persona-paper);
  border: 2px solid var(--persona-ink);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--persona-red);
}
body.persona-mode .theme-btn { min-width: 44px; padding: 8px; }
body.persona-mode .lang { padding: 0; }
body.persona-mode .lang-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 0;
  color: var(--persona-ink);
}
body.persona-mode .lang-btn[aria-pressed="true"] {
  background: var(--persona-yellow);
  color: var(--persona-ink);
}
body.persona-mode main {
  height: 100svh;
  min-height: 0;
  padding: 0;
}
body.persona-mode .screen {
  display: none;
  width: 100%;
  height: 100svh;
  min-height: 0;
  margin: 0;
  padding: 92px clamp(16px, 5vw, 80px) 40px;
  border: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--persona-red) transparent;
  scrollbar-width: thin;
}
body.persona-mode .screen.active { display: block; }
body.persona-mode .hero.active {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .75fr);
  grid-template-rows: minmax(min-content, 1fr) auto;
  gap: 14px clamp(24px, 5vw, 82px);
  align-items: center;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(133deg, var(--persona-red) 0 11%, transparent 11% 100%),
    linear-gradient(319deg, var(--persona-yellow) 0 12%, transparent 12% 100%),
    repeating-linear-gradient(-42deg, rgb(255 255 255 / .055) 0 2px, transparent 2px 12px);
}
body.persona-mode .hero::before { display: none; }
body.persona-mode .hero-media::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10% -16% -8% -14%;
  background: var(--persona-paper);
  clip-path: polygon(8% 0, 100% 6%, 94% 100%, 0 90%);
  transform: rotate(-4deg);
}
body.persona-mode .hero-copy { align-self: center; max-width: 710px; }
body.persona-mode .eyebrow {
  display: inline-block;
  padding: 5px 10px;
  color: var(--persona-paper);
  background: var(--persona-ink);
  font-family: var(--mono-font);
  font-size: clamp(.66rem, .5rem + .35vw, .84rem);
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
body.persona-mode .display,
body.persona-mode .section-title,
body.persona-mode .project-title {
  font-family: var(--display-font);
  color: var(--persona-paper);
  font-weight: 700;
  letter-spacing: -.055em;
  text-shadow: 4px 4px 0 var(--persona-red);
}
body.persona-mode .display {
  max-width: 8ch;
  margin-block: 16px 12px;
  font-size: clamp(3.45rem, min(6.7vw, 9svh), 7.5rem);
  line-height: .86;
}
body.persona-mode .lede {
  max-width: 53ch;
  color: var(--persona-paper);
  font-size: clamp(.95rem, .88rem + .3vw, 1.13rem);
  line-height: 1.5;
  text-wrap: balance;
}
body.persona-mode .cta-row { margin-top: 18px; }
body.persona-mode .btn {
  min-height: 42px;
  border: 2px solid var(--persona-ink);
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--persona-ink);
  font-family: var(--mono-font);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body.persona-mode .btn-primary { background: var(--persona-yellow); color: var(--persona-ink); }
body.persona-mode .btn-ghost { background: var(--persona-paper); color: var(--persona-ink); }
body.persona-mode .btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--persona-ink); }
body.persona-mode .persona-menu {
  display: grid;
  gap: 2px;
  width: min(100%, 520px);
  margin-top: clamp(22px, 3.8vh, 42px);
}
body.persona-mode .persona-menu a {
  display: grid;
  grid-template-columns: 2.4em auto;
  align-items: baseline;
  gap: 10px;
  width: fit-content;
  padding: 2px 12px 3px 5px;
  color: var(--persona-paper);
  font-family: var(--display-font);
  font-size: clamp(1.55rem, min(3.7vw, 5svh), 3.25rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  text-decoration: none;
  text-shadow: 3px 3px 0 var(--persona-ink);
  transition: transform 160ms ease, color 160ms ease, background-color 160ms ease;
}
body.persona-mode .persona-index {
  color: var(--persona-yellow);
  font-family: var(--mono-font);
  font-size: .38em;
  letter-spacing: 0;
  text-shadow: none;
}
body.persona-mode .persona-menu a:hover,
body.persona-mode .persona-menu a:focus-visible,
body.persona-mode .persona-menu a.is-selected {
  color: var(--persona-ink);
  background: var(--persona-yellow);
  text-shadow: none;
  transform: translateX(12px) rotate(-1deg);
  outline: 0;
}
body.persona-mode .persona-menu a:hover .persona-index,
body.persona-mode .persona-menu a:focus-visible .persona-index,
body.persona-mode .persona-menu a.is-selected .persona-index { color: var(--persona-ink); }
body.persona-mode .hero-media {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: min(100%, 430px);
  justify-self: center;
  align-self: center;
  margin: 0;
  transform: rotate(3deg);
}
body.persona-mode .hero-media img {
  max-height: min(60svh, 620px);
  border: 6px solid var(--persona-ink);
  border-radius: 0;
  box-shadow: 12px 12px 0 var(--persona-red);
  object-position: 52% 30%;
}
body.persona-mode .receipt {
  grid-column: 1 / -1;
  grid-row: 2;
  width: min(100%, 980px);
  padding: 13px 18px;
  color: var(--persona-ink);
  background: var(--persona-paper);
  border: 3px solid var(--persona-ink);
  border-top: 8px solid var(--persona-yellow);
  border-radius: 0;
  box-shadow: 7px 7px 0 var(--persona-ink);
}
/* The receipt remains in the normal document and print view; the console home
   prioritizes showing every navigable section in its first frame. */
body.persona-mode .receipt { display: none; }
body.persona-mode .receipt-cmd { margin-bottom: 8px; }
body.persona-mode .receipt-lines { gap: 5px; }
body.persona-mode .receipt-foot { margin-top: 9px; padding-top: 8px; }
body.persona-mode .receipt a { color: var(--accent); }
body.persona-mode .receipt .rc-mark { color: var(--persona-red); }

body.persona-mode .section {
  position: relative;
  max-width: none;
  color: var(--ink);
  background:
    linear-gradient(136deg, var(--persona-red) 0 9%, transparent 9% 100%),
    linear-gradient(316deg, var(--persona-yellow) 0 11%, transparent 11% 100%),
    var(--surface);
}
body.persona-mode .section::before {
  content: attr(id);
  position: absolute;
  right: clamp(18px, 4vw, 64px);
  top: 78px;
  color: rgb(17 17 23 / .07);
  font: 700 clamp(4rem, 15vw, 13rem)/.8 var(--display-font);
  letter-spacing: -.09em;
  text-transform: uppercase;
  pointer-events: none;
}
body.persona-mode .section-head { position: relative; max-width: 880px; margin-bottom: 22px; }
body.persona-mode .section-title {
  width: fit-content;
  padding: 7px 16px 10px;
  color: var(--persona-paper);
  background: var(--persona-ink);
  font-size: clamp(2.55rem, 5vw, 5.1rem);
  line-height: .88;
  text-shadow: 3px 3px 0 var(--persona-red);
  transform: rotate(-1.5deg);
}
body.persona-mode .section-title::after { width: 62px; height: 5px; margin-top: 15px; border-radius: 0; background: var(--persona-yellow); }
body.persona-mode .section-note { color: var(--muted); font-weight: 500; }
body.persona-mode .persona-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-bottom: 20px;
  padding: 7px 12px;
  color: var(--persona-ink);
  background: var(--persona-yellow);
  border: 2px solid var(--persona-ink);
  box-shadow: 3px 3px 0 var(--persona-red);
  font: 500 .74rem/1.1 var(--mono-font);
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}
body.persona-mode .persona-back:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--persona-red); }
body.persona-mode .project,
body.persona-mode .skill-group,
body.persona-mode .facts {
  background: color-mix(in srgb, var(--surface) 92%, var(--persona-paper));
  border: 2px solid var(--persona-ink);
  border-radius: 0;
  box-shadow: 5px 5px 0 rgb(17 17 23 / .18);
}
body.persona-mode .project { gap: 24px; padding: clamp(18px, 3vw, 34px); }
body.persona-mode .project:hover,
body.persona-mode .project:focus-within,
body.persona-mode .skill-group:hover { border-color: var(--persona-red); box-shadow: 7px 7px 0 var(--persona-red); }
body.persona-mode .project .eyebrow { color: var(--persona-paper); background: var(--accent); transform: none; }
body.persona-mode .project-title { color: var(--persona-ink); text-shadow: 2px 2px 0 var(--persona-yellow); }
body.persona-mode .evidence a,
body.persona-mode .more-links a,
body.persona-mode .contact-list a,
body.persona-mode .facts a { color: var(--accent); font-weight: 600; }
body.persona-mode .chips li { border-radius: 0; border-color: var(--persona-ink); background: var(--persona-paper); }
body.persona-mode .more-list > li { border-bottom: 2px solid var(--persona-line); }
body.persona-mode .skill-group { padding: 18px; }
body.persona-mode .skill-group h3 { font-family: var(--display-font); font-size: 1.2rem; }
body.persona-mode .role { padding: 18px 0; border-bottom: 2px solid var(--persona-line); }
body.persona-mode .role-title { font-family: var(--display-font); font-size: 1.45rem; }
body.persona-mode .cert img { border: 2px solid var(--persona-ink); border-radius: 0; }
body.persona-mode .cert:hover img { border-color: var(--persona-red); box-shadow: 4px 4px 0 var(--persona-yellow); }
body.persona-mode .contact-list { width: min(100%, 760px); background: var(--surface); border: 2px solid var(--persona-ink); box-shadow: 6px 6px 0 var(--persona-red); }
body.persona-mode .contact-list li { padding-inline: 18px; border-bottom: 1px solid var(--persona-line); }
body.persona-mode .footer { display: none; }
body.persona-mode .lightbox { border-radius: 0; border: 3px solid var(--persona-ink); box-shadow: 8px 8px 0 var(--persona-red); }

body.persona-mode.is-transitioning .screen.active { animation: persona-screen-in 280ms cubic-bezier(.18, .9, .25, 1) both; }
@keyframes persona-screen-in {
  from { opacity: .4; clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: translateX(-10px); }
  to { opacity: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translateX(0); }
}
@media (min-width: 900px) {
  body.persona-mode .project { grid-template-columns: minmax(0, 3.4fr) minmax(0, 8.6fr); }
}
@media (max-width: 719px) {
  body.persona-mode .topbar { height: 58px; }
  body.persona-mode .topbar-inner { padding: 7px 12px; }
  body.persona-mode .brand-name { display: none; }
  body.persona-mode .theme-btn,
  body.persona-mode .lang { min-height: 44px; box-shadow: 2px 2px 0 var(--persona-red); }
  body.persona-mode .theme-btn { min-width: 44px; min-height: 44px; padding: 6px; }
  body.persona-mode .lang-btn { min-width: 44px; min-height: 44px; font-size: .76rem; }
  body.persona-mode .screen { padding: 78px 16px 24px; }
  body.persona-mode .hero.active { display: block; overflow: hidden auto; }
  body.persona-mode .display { font-size: clamp(3.15rem, 16vw, 5.1rem); }
  body.persona-mode .persona-menu { margin-top: 24px; }
  body.persona-mode .persona-menu a { font-size: clamp(1.7rem, 9.8vw, 2.7rem); }
  body.persona-mode .hero-media { width: min(72vw, 300px); margin: 27px auto 22px; transform: rotate(2deg); }
  body.persona-mode .hero-media img { max-height: none; }
  body.persona-mode .receipt { padding: 12px; font-size: .7rem; }
  body.persona-mode .receipt .rc-line { grid-template-columns: 16px minmax(0, 1fr); gap: 0 7px; }
  body.persona-mode .receipt .rc-meta { grid-column: 2; }
  body.persona-mode .section::before { top: 105px; }
  body.persona-mode .section-title { font-size: clamp(2.3rem, 13vw, 3.7rem); }
}
@media (prefers-reduced-motion: reduce) {
  body.persona-mode.is-transitioning .screen.active { animation: none; }
}
@media print {
  body.persona-mode { height: auto; overflow: visible; }
  body.persona-mode .screen,
  body.persona-mode .screen.active { display: block; height: auto; overflow: visible; padding: 24px 16px; }
  body.persona-mode .hero.active { display: grid; }
  body.persona-mode .persona-menu,
  body.persona-mode .persona-back { display: none; }
  body.persona-mode .footer { display: block; }
}

/* Readability: focus ring and light-theme home. Yellow is invisible on the paper
   screens, and paper text is invisible on the cream home in the light theme. */
body.persona-mode:not([data-screen="home"]) { --focus: var(--accent); }
html[data-theme="light"] body.persona-mode .brand,
html[data-theme="light"] body.persona-mode .display,
html[data-theme="light"] body.persona-mode .lede,
html[data-theme="light"] body.persona-mode .persona-menu a { color: var(--persona-ink); }
html[data-theme="light"] body.persona-mode .display { text-shadow: 4px 4px 0 var(--persona-yellow); }
html[data-theme="light"] body.persona-mode .persona-menu a { text-shadow: 3px 3px 0 var(--persona-yellow); }
html[data-theme="light"] body.persona-mode .persona-index { color: var(--accent); }
html[data-theme="light"] body.persona-mode .hero.active {
  background:
    linear-gradient(133deg, var(--persona-red) 0 11%, transparent 11% 100%),
    linear-gradient(319deg, var(--persona-yellow) 0 12%, transparent 12% 100%),
    repeating-linear-gradient(-42deg, rgb(17 17 23 / .04) 0 2px, transparent 2px 12px);
}

/* Motion: one load sequence (script.js), one screen-enter sequence (below), and
   hover replies. Everything here lives under no-preference, so reduced motion
   needs no overrides. */
body.persona-mode .persona-menu a { position: relative; }
body.persona-mode .persona-menu a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -16px;
  border: 8px solid transparent;
  border-left: 11px solid var(--persona-red);
  opacity: 0;
  transform: translate(-8px, -50%);
}
body.persona-mode .persona-menu a:hover::after,
body.persona-mode .persona-menu a:focus-visible::after,
body.persona-mode .persona-menu a.is-selected::after { opacity: 1; transform: translate(0, -50%); }
@media (prefers-reduced-motion: no-preference) {
  body.persona-mode .persona-menu a::after { transition: transform 160ms ease, opacity 160ms ease; }
  body.persona-mode .project,
  body.persona-mode .skill-group,
  body.persona-mode .facts { transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
  body.persona-mode .cert img { transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
  body.persona-mode .chips li { transition: background-color 160ms ease, transform 160ms ease; }
  body.persona-mode .hero-media { transition: transform 320ms cubic-bezier(.22, 1, .36, 1); }
  body.persona-mode .hero-media img { transition: box-shadow 320ms cubic-bezier(.22, 1, .36, 1); }
  body.persona-mode .brand-mark { transition: transform 420ms cubic-bezier(.22, 1, .36, 1); }
  body.persona-mode .persona-back { transition: transform 160ms ease, box-shadow 160ms ease; }
  body.persona-mode.is-transitioning .screen.active .section-title { animation: persona-title-in 460ms cubic-bezier(.22, 1, .36, 1) both; }
  body.persona-mode.is-transitioning .screen.active::before { animation: persona-mark-in 640ms ease-out both; }
  body.persona-mode.is-transitioning .screen.active .persona-back { animation: persona-rise 420ms 120ms cubic-bezier(.22, 1, .36, 1) both; }
  @keyframes persona-title-in {
    from { opacity: 0; transform: translateX(-22px) rotate(-5deg); }
    to { opacity: 1; transform: translateX(0) rotate(-1.5deg); }
  }
  @keyframes persona-mark-in {
    from { opacity: 0; transform: translateX(48px); }
    to { opacity: 1; transform: translateX(0); }
  }
  @keyframes persona-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (hover: hover) and (pointer: fine) {
  body.persona-mode .project:hover,
  body.persona-mode .skill-group:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--persona-red); }
  body.persona-mode .cert:hover img { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--persona-yellow); }
  body.persona-mode .chips li:hover { background: var(--persona-yellow); transform: translateY(-1px); }
  body.persona-mode .hero-media:hover { transform: rotate(1deg) scale(1.015); }
  body.persona-mode .hero-media:hover img { box-shadow: 16px 16px 0 var(--persona-red); }
  body.persona-mode .brand:hover .brand-mark { transform: rotate(225deg); }
}
@media (min-width: 900px) and (max-height: 860px) {
  /* Short laptop viewports: keep the whole menu in the first frame. */
  body.persona-mode .display { font-size: clamp(3rem, min(5.4vw, 8.5svh), 5.6rem); margin-block: 12px 10px; }
  body.persona-mode .lede { font-size: 1rem; }
  body.persona-mode .persona-menu { margin-top: 18px; }
  body.persona-mode .persona-menu a { font-size: clamp(1.4rem, min(2.9vw, 4.6svh), 2.5rem); }
  body.persona-mode .hero-media img { max-height: min(56svh, 520px); }
}

@media (min-width: 900px) and (max-height: 720px) {
  /* 13-inch laptops in a short browser window still expose every menu action. */
  body.persona-mode .screen-home { padding-top: 72px; padding-bottom: 16px; }
  body.persona-mode .display { font-size: 2.6rem; margin-block: 8px; }
  body.persona-mode .lede { font-size: .9rem; line-height: 1.42; }
  body.persona-mode .cta-row { margin-top: 12px; }
  body.persona-mode .persona-menu { gap: 0; margin-top: 12px; }
  body.persona-mode .persona-menu a { font-size: 1.65rem; line-height: .94; }
  body.persona-mode .hero-media img { max-height: min(50svh, 380px); }
}

/* The desktop home is a menu, not a reading surface. Detail screens retain
   their own vertical scroll containers; touch-sized layouts keep home scrollable. */
@media screen and (min-width: 900px) {
  body.persona-mode .screen-home { overflow: clip; }
}
