* { box-sizing: border-box; }

:root {
  --bg: #0a0c0e;
  --bg-alt: #0d1114;
  --panel: #12161a;
  --panel-hover: #161b20;
  --line: rgba(232,236,239,0.10);
  --line-strong: rgba(232,236,239,0.20);
  --text: #e8ecef;
  --text-dim: #aab2bc;
  --muted: #707b87;

  --accent: #ffb454;
  --accent-dim: rgba(255,180,84,0.14);
  --accent-border: rgba(255,180,84,0.35);
  --cyan: #5fd4e3;
  --cyan-dim: rgba(95,212,227,0.14);
  --green: #7ed99a;
  --green-dim: rgba(126,217,154,0.14);
  --red: #ff7a7a;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans","IBM Plex Sans KR", ui-sans-serif, system-ui, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 252px;
  --topbar-h: 46px;
}

/* KR mode: same accent colors as EN */


/* Language visibility */
[data-mode="en"] .lang-kr { display: none !important; }
[data-mode="kr"] .lang-en { display: none !important; }


/* Korean text improvements */
[data-mode="kr"] body,
[data-mode="kr"] p,
[data-mode="kr"] li,
[data-mode="kr"] h2,
[data-mode="kr"] h3 {
  word-break: keep-all;
  overflow-wrap: break-word;
}
[data-mode="kr"] .about-copy p,
[data-mode="kr"] .timeline-item li,
[data-mode="kr"] .card p {
  line-height: 1.85;
}

html, body { height: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15.5px;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
ul { padding-left: 1.1rem; }
li { margin: .35rem 0; }
button { font: inherit; cursor: pointer; }
svg { display: block; }

code {
  font-family: var(--mono);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .86em;
  color: var(--cyan);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #0a0c0e; font-family: var(--mono); font-weight: 700; padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }

.sep { color: var(--muted); }
.accent-amber { color: var(--accent); }

/* ===== App shell ===== */
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

/* ===== Topbar ===== */
.app-topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 0 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
}

.topbar-left { display: flex; align-items: center; gap: .4rem; flex: 1; min-width: 0; }

.dot { width: .65rem; height: .65rem; border-radius: 50%; flex-shrink: 0; }
.dot-red { background: var(--red); }
.dot-amber { background: #ffb454; }
.dot-green { background: var(--green); }

.topbar-title { margin-left: .5rem; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title span { color: var(--cyan); }

/* Mode toggle */
.mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .18rem .3rem;
  gap: .1rem;
  flex-shrink: 0;
}

.mode-sep { color: var(--line-strong); font-size: .8rem; padding: 0 .1rem; }

.mode-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .74rem;
  padding: .22rem .55rem;
  border-radius: 999px;
  transition: background 140ms, color 140ms;
}

.mode-btn.is-active {
  background: var(--accent);
  color: #0a0c0e;
  font-weight: 700;
}

.sidebar-toggle { display: none; border: 1px solid var(--line-strong); background: transparent; color: var(--text); padding: .35rem .6rem; border-radius: var(--radius-sm); font-family: var(--mono); font-size: .78rem; }

.tlp-pill { display: flex; align-items: center; gap: .4rem; font-size: .7rem; color: var(--text-dim); border: 1px solid var(--line-strong); border-radius: 999px; padding: .25rem .65rem; white-space: nowrap; flex-shrink: 0; }
.tlp-swatch { width: .55rem; height: .55rem; border-radius: 2px; background: var(--text); }

/* ===== App body ===== */
.app-body { flex: 1; display: flex; min-height: 0; }

/* ===== Sidebar ===== */
.app-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-alt);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.2rem .9rem;
  overflow-y: auto;
}

.sidebar-id { display: flex; align-items: center; gap: .7rem; padding: 0 .3rem 1.2rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }

.sidebar-avatar {
  width: 2.4rem; height: 2.4rem;
  border-radius: .6rem;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #0a0c0e;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
}

.sidebar-name { font-weight: 600; font-size: .92rem; margin: 0; }
.sidebar-role { font-size: .74rem; color: var(--muted); margin: .1rem 0 0; transition: color 200ms; }

.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }

.nav-item {
  display: flex; align-items: center; gap: .65rem;
  background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--text-dim); font-family: var(--mono); font-size: .82rem;
  padding: .55rem .6rem; text-align: left;
  transition: background 120ms, color 120ms;
}
.nav-item:hover { background: var(--panel-hover); color: var(--text); }
.nav-item.is-active { background: var(--accent-dim); color: var(--accent); }

.nav-icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-footer { display: flex; align-items: center; gap: .5rem; padding-top: 1rem; margin-top: .6rem; border-top: 1px solid var(--line); }
.sidebar-link { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); color: var(--text-dim); font-family: var(--mono); font-size: .8rem; background: transparent; transition: border-color 140ms, color 140ms; }
.sidebar-link:hover { border-color: var(--accent); color: var(--accent); }
.terminal-trigger { margin-left: auto; }

/* ===== Section labels (mode-aware) ===== */
.section-label { font-family: var(--mono); font-size: .76rem; font-weight: 600; color: var(--accent); margin-bottom: .8rem; display: block; }


/* ===== Main panels ===== */
.app-main { flex: 1; min-width: 0; position: relative; }

.panel { display: none; height: 100%; overflow-y: auto; padding: 2.6rem clamp(1.2rem,4vw,3.2rem); }
.panel.is-active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .panel.is-active { animation: panel-in 300ms ease; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tag { display: inline-block; font-family: var(--mono); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cyan); background: var(--cyan-dim); border: 1px solid rgba(95,212,227,.3); border-radius: 999px; padding: .28rem .65rem; margin-bottom: .7rem; }
.tag-status { color: var(--accent); background: var(--accent-dim); border-color: var(--accent-border); }
.role-tag { display: inline-block; font-family: var(--mono); font-size: .68rem; color: var(--green); background: var(--green-dim); border: 1px solid rgba(126,217,154,.3); border-radius: 999px; padding: .22rem .55rem; margin-top: .35rem; }

.eyebrow { font-family: var(--mono); font-size: .76rem; color: var(--cyan); margin-bottom: 1.1rem; }
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: clamp(1.7rem,3vw,2.4rem); line-height: 1.14; letter-spacing: -.02em; margin-bottom: 1.3rem; max-width: 26ch; }
h3 { font-size: 1.1rem; line-height: 1.3; margin-bottom: .4rem; }
.edu-en { color: var(--text-dim); font-weight: 400; font-size: .85em; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .7rem 1rem; color: var(--text); background: var(--panel);
  font-family: var(--mono); font-size: .85rem;
  transition: transform 140ms, border-color 140ms, background 140ms;
}
.button:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--accent-dim); }
.button.primary { background: var(--accent); color: #0a0c0e; border-color: var(--accent); font-weight: 700; }
.button.primary:hover { filter: brightness(1.1); }
.project-link { margin-top: 1rem; padding: .45rem .8rem; font-size: .78rem; }

/* ===== Q&A Home ===== */
.qa-layout { display: flex; flex-direction: column; gap: 1.4rem; max-width: 760px; }

.qa-intro { display: flex; align-items: center; gap: 1.6rem; }

.qa-avatar {
  width: 72px; height: 90px; flex-shrink: 0;
  filter: drop-shadow(0 4px 16px rgba(95,212,227,.3));
}
.qa-avatar svg { width: 100%; height: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .qa-avatar svg { animation: mascot-idle 3.2s ease-in-out infinite; }
}

.qa-name { font-family: var(--mono); font-size: clamp(1.4rem,3vw,2rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .3rem; }
.qa-tagline { font-family: var(--mono); font-size: .84rem; color: var(--text-dim); margin-bottom: .4rem; }
[data-mode="kr"] .qa-tagline { content: "Cyber Risk & Compliance Consultant · IT Audit"; }
.qa-hint { font-family: var(--mono); font-size: .76rem; color: var(--muted); margin: 0; }

.qa-thread { display: flex; flex-direction: column; gap: .8rem; min-height: 60px; }

.qa-bubble {
  border-radius: 12px 12px 12px 3px;
  padding: .9rem 1.1rem;
  font-size: .94rem;
  line-height: 1.6;
  max-width: 94%;
}
.qa-bubble.question {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 12px 12px 3px 12px;
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent);
}
.qa-bubble.answer {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-dim);
}

.qa-cursor { display: inline-block; width: .5em; height: 1em; background: var(--accent); margin-left: 2px; vertical-align: text-bottom; animation: cursor-blink 700ms step-end infinite; }

.qa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.qa-chip {
  font-family: var(--mono);
  font-size: .78rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-dim);
  padding: .45rem .9rem;
  transition: border-color 140ms, color 140ms, background 140ms, opacity 140ms;
}
.qa-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.qa-chip.is-used { opacity: .35; pointer-events: none; }

/* ===== Journey Map ===== */
.map-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 900/440;
  background: #080b0f;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background-image:
    linear-gradient(rgba(95,212,227,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95,212,227,.04) 1px, transparent 1px);
  background-size: 45px 45px;
}

.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: .45;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  cursor: pointer;
  z-index: 2;
}

.pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px var(--cyan);
  transition: transform 140ms;
}

.pin-dot.pin-home {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  width: 13px;
  height: 13px;
}

@media (prefers-reduced-motion: no-preference) {
  .pin-dot { animation: pin-ping 2.4s ease-out infinite; }
  .map-pin:nth-child(3) .pin-dot { animation-delay: .4s; }
  .map-pin:nth-child(4) .pin-dot { animation-delay: .8s; }
  .map-pin:nth-child(5) .pin-dot { animation-delay: 1.2s; }
  .map-pin:nth-child(6) .pin-dot { animation-delay: 1.6s; }
}

@keyframes pin-ping {
  0%  { box-shadow: 0 0 0 0 rgba(95,212,227,.7); }
  70% { box-shadow: 0 0 0 8px rgba(95,212,227,0); }
  100%{ box-shadow: 0 0 0 0 rgba(95,212,227,0); }
}

.map-pin:hover .pin-dot { transform: scale(1.4); }

.pin-label {
  font-family: var(--mono);
  font-size: .66rem;
  color: var(--text-dim);
  white-space: nowrap;
  background: rgba(10,12,14,.75);
  padding: .1rem .35rem;
  border-radius: 3px;
  pointer-events: none;
}

.pin-card {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  min-width: 220px;
  max-width: 280px;
  font-size: .88rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 10;
  display: none;
  animation: pin-card-in 180ms ease;
}

.pin-card.is-open { display: block; }

@keyframes pin-card-in {
  from { opacity: 0; transform: scale(.95) translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.pin-card-tag { font-family: var(--mono); font-size: .7rem; color: var(--accent); margin: 0 0 .4rem; }
.pin-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.pin-card ul { color: var(--text-dim); font-size: .84rem; padding-left: 1rem; margin: 0; }
.pin-card ul li { margin: .3rem 0; }

.pin-card-close {
  position: absolute;
  top: .6rem; right: .7rem;
  background: transparent; border: none;
  color: var(--muted); font-size: .85rem;
}
.pin-card-close:hover { color: var(--red); }

.map-hint { font-family: var(--mono); font-size: .76rem; color: var(--muted); margin-top: .8rem; }

/* Pin card positions — adjusted per pin location */
#card-seoul    { bottom: 52%; right: 2%; }
#card-nj       { top: 30%; left: 18%; }
#card-sandiego { top: 38%; left: 10%; }
#card-bucharest{ top: 20%; left: 40%; }
#card-taoyuan  { bottom: 45%; right: 14%; }

/* ===== About Venn ===== */
.venn-diagram { width: 100%; max-width: 460px; height: auto; margin: .4rem 0 1.8rem; }
.venn-circle { fill-opacity: .10; stroke-width: 1.4; }
.venn-cyan  { fill: var(--cyan);  stroke: var(--cyan); }
.venn-amber { fill: var(--accent); stroke: var(--accent); }
.venn-label { font-family: var(--mono); font-size: 11px; font-weight: 700; fill: var(--text); letter-spacing: .04em; }
.venn-sub   { font-family: var(--mono); font-size: 9.5px; fill: var(--muted); }
.venn-center { font-family: var(--mono); font-size: 13px; font-weight: 700; fill: var(--text); text-anchor: middle; }
.venn-center-sub { font-family: var(--mono); font-size: 9px; fill: var(--text-dim); text-anchor: middle; }
.about-copy { max-width: 680px; display: grid; gap: 1rem; color: var(--text-dim); }

/* ===== Education ===== */
.edu-group-label { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); margin: 0 0 1rem; }
.edu-group-label-second { margin-top: 2.4rem; }

.edu-timeline { position: relative; padding-left: 2.1rem; border-left: 1px dashed var(--line-strong); display: grid; gap: 1.7rem; max-width: 720px; }
.edu-item { position: relative; }
.edu-marker { position: absolute; left: -2.55rem; top: -.1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--cyan); }
.edu-marker-uni { color: var(--accent); }
.edu-marker-program { color: var(--green); }
.edu-marker svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.edu-stage { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; margin-bottom: .25rem; }
.edu-detail { margin-top: .45rem; font-size: .9rem; color: var(--text-dim); }
.edu-meta { color: var(--text-dim); font-size: .92rem; }

/* ===== Experience ===== */
.timeline { display: grid; gap: 0; max-width: 880px; }
.timeline-item { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 1.4rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-meta { display: flex; flex-direction: column; gap: .45rem; }
.date { color: var(--accent); font-family: var(--mono); font-size: .78rem; font-weight: 600; }
.timeline-sub { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.timeline-item li, .project li { font-size: .93rem; color: var(--text-dim); }

/* ===== Projects ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.filter-chip { font-family: var(--mono); font-size: .74rem; color: var(--text-dim); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: .38rem .8rem; transition: border-color 140ms, color 140ms, background 140ms; }
.filter-chip:hover { border-color: var(--accent); color: var(--text); }
.filter-chip.is-active { color: #0a0c0e; background: var(--accent); border-color: var(--accent); font-weight: 700; }

.grid { display: grid; gap: 1rem; }
.project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }

.card { background: linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.card.is-hidden { display: none; }
.card p { color: var(--text-dim); font-size: .95rem; }

.project-icon { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .7rem; }

.pipeline-diagram { width: 100%; max-width: 520px; height: auto; margin-top: 1rem; }
.pipe-step rect { fill: var(--bg-alt); stroke: var(--line-strong); stroke-width: 1; }
.pipe-step text { font-family: var(--mono); font-size: 10.5px; fill: var(--cyan); }
.pipe-arrow { stroke: var(--muted); stroke-width: 1.3; fill: none; }

/* ===== Publications ===== */
.list { display: grid; gap: .9rem; max-width: 760px; }
.list-item { background: linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.list-item p { color: var(--text-dim); }

/* ===== Talks ===== */
.talks-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2.4rem; max-width: 880px; }
.talks-grid h3 { font-family: var(--mono); font-size: .98rem; color: var(--cyan); }
.talks-grid li { color: var(--text-dim); font-size: .94rem; }

/* ===== Contact ===== */
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: .3rem 0 1.6rem; }
.tlp-badge { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--mono); font-size: .8rem; color: var(--text-dim); border: 1px dashed var(--line-strong); border-radius: 999px; padding: .5rem 1rem; margin-bottom: 2.2rem; }
.footer-prompt { color: var(--green); font-family: var(--mono); font-size: .86rem; margin-bottom: .4rem; }
.copyright { font-family: var(--mono); font-size: .78rem; color: var(--text-dim); }

.t-prompt { color: var(--green); margin-right: .45rem; }
.cursor { display: inline-block; width: .5em; height: .95em; background: var(--green); margin-left: .2rem; vertical-align: text-bottom; }
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: cursor-blink 1s step-end infinite; }
}
@keyframes cursor-blink { 50% { opacity: 0; } }

/* ===== Terminal ===== */
.terminal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 0 1rem 1rem; }
.terminal-overlay[hidden] { display: none; }
.terminal-window { width: 100%; max-width: 720px; background: var(--bg-alt); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); font-family: var(--mono); }
.terminal-titlebar { display: flex; align-items: center; gap: .45rem; padding: .65rem .85rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.terminal-title { margin-left: .5rem; font-size: .74rem; color: var(--muted); }
.terminal-close { margin-left: auto; background: transparent; border: none; color: var(--muted); font-size: .9rem; }
.terminal-close:hover { color: var(--red); }
.terminal-body { padding: 1rem; min-height: 160px; max-height: 38vh; overflow-y: auto; font-size: .84rem; }
.t-line { margin: 0 0 .5rem; word-break: break-word; }
.t-output { color: var(--text-dim); }
.t-hint { color: var(--muted); }
.t-error { color: var(--red); }
.terminal-inputline { display: flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border-top: 1px solid var(--line); background: var(--panel); }
.terminal-inputline input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: .84rem; }
.terminal-inputline input::placeholder { color: var(--muted); }

/* ===== Mascot ===== */
#mascot { position: fixed; bottom: 1.4rem; right: 1.6rem; z-index: 200; pointer-events: none; user-select: none; filter: drop-shadow(0 4px 18px rgba(95,212,227,.3)); transition: filter 200ms; }
#mascot.is-excited { filter: drop-shadow(0 4px 28px rgba(255,180,84,.55)); }
#mascot-svg { width: 54px; height: 68px; display: block; transform-origin: bottom center; }
@media (prefers-reduced-motion: no-preference) {
  #mascot-svg { animation: mascot-idle 3.2s ease-in-out infinite; }
  #chest-light { animation: chest-pulse 2s ease-in-out infinite; }
}
@keyframes mascot-idle { 0%,100%{transform:translateY(0) rotate(0deg)}30%{transform:translateY(-4px) rotate(-1.5deg)}70%{transform:translateY(-4px) rotate(1.5deg)} }
@keyframes chest-pulse { 0%,100%{opacity:.85}50%{opacity:.35} }
@keyframes mascot-blink-anim { 0%,100%{transform:scaleY(1)}50%{transform:scaleY(0.1)} }
.mascot-blink #eye-l, .mascot-blink #eye-r { animation: mascot-blink-anim 120ms ease; }
@keyframes pin-ping { 0%{box-shadow:0 0 0 0 rgba(95,212,227,.7)}70%{box-shadow:0 0 0 8px rgba(95,212,227,0)}100%{box-shadow:0 0 0 0 rgba(95,212,227,0)} }

.mascot-bubble { position: absolute; bottom: calc(100% + 10px); right: 0; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px 10px 2px 10px; padding: .5rem .75rem; font-family: var(--mono); font-size: .72rem; color: var(--accent); max-width: 220px; line-height: 1.45; box-shadow: 0 4px 20px rgba(0,0,0,.4); pointer-events: none; opacity: 0; transform: translateY(6px) scale(.9); transform-origin: bottom right; transition: opacity 180ms, transform 180ms; }
.mascot-bubble.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.mascot-bubble::after { content: ""; position: absolute; bottom: -7px; right: 16px; width: 12px; height: 7px; background: var(--accent); clip-path: polygon(0 0,100% 0,100% 100%); }

@keyframes mascot-idle { 0%,100%{transform:translateY(0) rotate(0deg)}30%{transform:translateY(-4px) rotate(-1.5deg)}70%{transform:translateY(-4px) rotate(1.5deg)} }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; }
  .sidebar-toggle { display: inline-flex; }
  .app-body { flex-direction: column; }
  .app-sidebar { width: 100%; min-width: 0; max-height: 0; padding: 0 .9rem; overflow: hidden; border-right: none; border-bottom: 1px solid var(--line); transition: max-height 220ms, padding 220ms; }
  .app-sidebar.is-open { max-height: 70vh; padding: 1rem .9rem; overflow-y: auto; }
  .panel { height: auto; min-height: calc(100vh - var(--topbar-h)); }
  .project-grid { grid-template-columns: 1fr; }
  .talks-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-meta { flex-direction: row; align-items: center; gap: .7rem; }
  .mode-toggle { display: none; }
}

@media (max-width: 600px) {
  .qa-intro { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .map-wrap { aspect-ratio: 4/3; }
  .pin-label { display: none; }
}