/* Design Read: HR portfolio with editorial magazine spreads, restrained luxury hover.
   Dials: DESIGN_VARIANCE 7 / MOTION_INTENSITY 7 / VISUAL_DENSITY 3 */

html[data-theme="classic"] {
  --clash-a: #20bca4;
  --clash-b: #4f7cff;
  --clash-a-rgb: 32, 188, 164;
  --clash-b-rgb: 79, 124, 255;
  --ink: #162033;
  --ink-soft: #36538e;
  --muted: #5f6f88;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --bg: #f6f9ff;
  --assistant-bg: #f2f7ff;
  --user-bg: #eef7f5;
  --bg-composite:
    radial-gradient(circle at top left, rgba(79, 124, 255, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(32, 188, 164, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fd 42%, #eef4fb 100%);
}

html[data-theme="volt"] {
  --clash-a: #fff9b8;
  --clash-b: #6a0dad;
  --clash-a-rgb: 255, 249, 184;
  --clash-b-rgb: 106, 13, 173;
  --ink: #1c1524;
  --ink-soft: #4a3d58;
  --muted: #6b6278;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #fffef9;
  --bg: #faf9f5;
  --assistant-bg: rgba(255, 249, 184, 0.28);
  --user-bg: rgba(106, 13, 173, 0.06);
  --bg-composite:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(var(--clash-a-rgb), 0.35), transparent 58%),
    radial-gradient(ellipse 50% 35% at 100% 6%, rgba(var(--clash-b-rgb), 0.06), transparent 52%),
    var(--bg);
}

html[data-theme="mint"] {
  --clash-a: #d4f0eb;
  --clash-b: #ff6f2c;
  --clash-a-rgb: 212, 240, 235;
  --clash-b-rgb: 255, 111, 44;
  --ink: #1a2422;
  --ink-soft: #3d4f4b;
  --muted: #5f6f6b;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: #f8fcfb;
  --bg: #f4faf8;
  --assistant-bg: rgba(212, 240, 235, 0.45);
  --user-bg: rgba(255, 111, 44, 0.06);
  --bg-composite:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(var(--clash-a-rgb), 0.35), transparent 58%),
    radial-gradient(ellipse 50% 35% at 100% 6%, rgba(var(--clash-b-rgb), 0.06), transparent 52%),
    var(--bg);
}

html[data-theme="lime"] {
  --clash-a: #e8f8d8;
  --clash-b: #05a5fa;
  --clash-a-rgb: 232, 248, 216;
  --clash-b-rgb: 5, 165, 250;
  --ink: #152028;
  --ink-soft: #3a4f5c;
  --muted: #5a6d78;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #f9fdf5;
  --bg: #f6faf2;
  --assistant-bg: rgba(232, 248, 216, 0.5);
  --user-bg: rgba(5, 165, 250, 0.06);
  --bg-composite:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(var(--clash-a-rgb), 0.35), transparent 58%),
    radial-gradient(ellipse 50% 35% at 100% 6%, rgba(var(--clash-b-rgb), 0.06), transparent 52%),
    var(--bg);
}

html[data-theme="blush"] {
  --clash-a: #f8eef0;
  --clash-b: #e72d48;
  --clash-a-rgb: 248, 238, 240;
  --clash-b-rgb: 231, 45, 72;
  --ink: #2a181c;
  --ink-soft: #5c4248;
  --muted: #7a6268;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #fffbfc;
  --bg: #faf6f7;
  --assistant-bg: rgba(248, 238, 240, 0.65);
  --user-bg: rgba(231, 45, 72, 0.06);
  --bg-composite:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(var(--clash-a-rgb), 0.35), transparent 58%),
    radial-gradient(ellipse 50% 35% at 100% 6%, rgba(var(--clash-b-rgb), 0.06), transparent 52%),
    var(--bg);
}

:root {
  --accent-muted: color-mix(in srgb, rgb(var(--clash-b-rgb)) 42%, var(--ink) 58%);
  --accent-soft: color-mix(in srgb, rgb(var(--clash-b-rgb)) 18%, white 82%);
  --border-faint: rgba(var(--clash-b-rgb), 0.08);
  --border-subtle: rgba(var(--clash-b-rgb), 0.09);
  --border-soft: rgba(var(--clash-b-rgb), 0.1);
  --border-hover: rgba(var(--clash-b-rgb), 0.12);
  --border-focus: rgba(var(--clash-b-rgb), 0.14);
  --line: var(--border-faint);
  --line-strong: var(--border-soft);
  --text: var(--ink);
  --primary: var(--accent-muted);
  --primary-strong: var(--accent-muted);
  --accent: var(--accent-muted);
  --heading: var(--ink);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 14px;
  --radius-xl: 14px;
  --shadow: 0 10px 36px rgba(var(--clash-b-rgb), 0.05);
  --shadow-soft: 0 4px 18px rgba(var(--clash-b-rgb), 0.035);
  --shadow-hover: 0 16px 44px rgba(var(--clash-b-rgb), 0.07);
  --frame: 1px solid var(--border-subtle);
  --max-width: 1240px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-section: cubic-bezier(0.19, 1, 0.22, 1);
  --font-display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
  --transition-theme: background-color 0.55s var(--ease-out), color 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

html[data-theme="classic"] {
  --accent-muted: #315fdc;
  --accent-soft: #edf8f6;
  --primary: #4f7cff;
  --primary-strong: #315fdc;
  --accent: #20bca4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg-composite);
  transition: var(--transition-theme);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body::after {
  content: none;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
li {
  color: var(--muted);
  line-height: 1.78;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

h1,
h2,
h3,
strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
}

button,
textarea,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding-bottom: 72px;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, 1160px);
  max-height: 72px;
  margin: 16px auto 0;
  padding: 10px 16px;
  border: var(--frame);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(120%);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-theme);
  animation: barSettle 0.9s var(--ease-section) both;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  color: var(--accent-muted);
  transition: color 0.3s var(--ease-out);
}

.brand:hover {
  color: var(--ink);
}

.hero-brand-mark {
  margin: 0 0 10px;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--accent-muted);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav a {
  color: var(--muted);
  padding: 6px 0;
  position: relative;
  transition: color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-muted);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 0.4s var(--ease-section), opacity 0.4s var(--ease-section);
}

.nav a:hover,
.nav a.is-active {
  color: var(--accent-muted);
}

.nav a.is-active::after,
.nav a:hover::after {
  transform: scaleX(1);
  opacity: 0.55;
}

.mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(var(--clash-a-rgb), 0.35);
}

.mode-button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.22s var(--ease-out), color 0.22s var(--ease-out), transform 0.15s var(--ease-out);
}

.mode-button:hover {
  transform: translateY(-1px);
}

.mode-button.is-active {
  background: var(--accent-muted);
  color: #fff;
}

.mode-button:active {
  transform: scale(0.98);
}

/* ---------- Theme switcher ---------- */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.theme-swatch {
  display: inline-grid;
  grid-template-columns: 10px 10px auto;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.theme-swatch:hover {
  transform: translateY(-2px);
}

.theme-swatch:active {
  transform: scale(0.97);
}

.theme-swatch.is-active {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-soft);
}

.theme-swatch-a,
.theme-swatch-b {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.theme-swatch-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.theme-swatch[data-theme-option="classic"] .theme-swatch-a { background: #20bca4; }
.theme-swatch[data-theme-option="classic"] .theme-swatch-b { background: #4f7cff; }
.theme-swatch[data-theme-option="volt"] .theme-swatch-a { background: #fff300; }
.theme-swatch[data-theme-option="volt"] .theme-swatch-b { background: #6a0dad; }
.theme-swatch[data-theme-option="mint"] .theme-swatch-a { background: #a1e6dd; }
.theme-swatch[data-theme-option="mint"] .theme-swatch-b { background: #ff6f2c; }
.theme-swatch[data-theme-option="lime"] .theme-swatch-a { background: #d3ffaf; }
.theme-swatch[data-theme-option="lime"] .theme-swatch-b { background: #05a5fa; }
.theme-swatch[data-theme-option="blush"] .theme-swatch-a { background: #f1dddf; }
.theme-swatch[data-theme-option="blush"] .theme-swatch-b { background: #e72d48; }

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.section {
  padding: 56px 0;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition:
    opacity 1.05s var(--ease-section),
    transform 1.05s var(--ease-section),
    filter 1.05s var(--ease-section);
}

.section.is-section-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.section#hero {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- Editorial magazine spreads ---------- */
.editorial-spread {
  position: relative;
  isolation: isolate;
  padding: clamp(52px, 7vw, 80px) clamp(16px, 2.5vw, 28px);
  margin-inline: clamp(-8px, -1vw, -4px);
  border-radius: calc(var(--radius-md) + 2px);
  transition:
    background 0.65s var(--ease-section),
    box-shadow 0.65s var(--ease-section);
}

.editorial-spread::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  pointer-events: none;
  z-index: 0;
  transition:
    border-color 0.55s var(--ease-section),
    inset 0.55s var(--ease-section);
}

.editorial-spread:hover::before {
  inset: 6px;
  border-color: var(--border-soft);
}

.editorial-spread:hover {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 0 1px var(--border-faint);
}

.editorial-spread--cover {
  padding-top: clamp(28px, 4vw, 40px);
  margin-inline: 0;
}

.editorial-spread--cover:hover {
  background: transparent;
  box-shadow: none;
}

.editorial-spread--cover:hover::before {
  border-color: transparent;
}

.editorial-chrome {
  position: absolute;
  inset: clamp(14px, 2vw, 22px);
  pointer-events: none;
  z-index: 2;
}

.editorial-body {
  position: relative;
  z-index: 1;
}

.editorial-meta {
  position: absolute;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.32;
  transition:
    opacity 0.55s var(--ease-section),
    letter-spacing 0.65s var(--ease-section),
    color 0.45s var(--ease-section);
}

.editorial-meta--tl {
  top: 0;
  left: 0;
}

.editorial-meta--tr {
  top: 0;
  right: 0;
  text-align: right;
}

.editorial-spread:hover .editorial-meta {
  opacity: 0.88;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}

.editorial-mark {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1;
  color: var(--muted);
  opacity: 0.18;
  transition:
    opacity 0.5s var(--ease-section),
    transform 0.65s var(--ease-section);
}

.editorial-mark--left {
  left: -2px;
}

.editorial-mark--right {
  right: -2px;
}

.editorial-spread:hover .editorial-mark {
  opacity: 0.55;
  transform: translateY(-50%) rotate(45deg);
}

.editorial-rule {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
  transform: scaleX(0.12);
  transform-origin: left center;
  transition: transform 0.75s var(--ease-section);
}

.editorial-rule--head {
  top: clamp(28px, 3.5vw, 36px);
}

.editorial-spread:hover .editorial-rule {
  transform: scaleX(1);
}

.section-headline--editorial {
  margin-bottom: clamp(24px, 3.5vw, 40px);
  padding-top: clamp(20px, 2.5vw, 28px);
}

.editorial-title-block {
  max-width: 56rem;
}

.editorial-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.06em;
  color: var(--heading);
  transition: letter-spacing 0.7s var(--ease-section);
}

.editorial-spread:hover .editorial-title {
  letter-spacing: 0.1em;
}

.editorial-spread.is-editorial-active .editorial-title {
  letter-spacing: 0.1em;
}

.editorial-title--compact {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.section-headline--editorial .section-lead {
  margin-top: 14px;
  max-width: 38ch;
  font-size: 0.98rem;
  opacity: 0.82;
  transition: opacity 0.5s var(--ease-section), transform 0.55s var(--ease-section);
}

.editorial-spread:hover .section-lead {
  opacity: 1;
  transform: translateX(4px);
}

.editorial-spread.is-editorial-active .section-lead {
  opacity: 1;
  transform: translateX(4px);
}

.editorial-spread--cover:hover .hero-manifest {
  transform: scale(1.008);
  box-shadow: var(--shadow-hover);
}

.editorial-spread--cover:hover .hero-manifest h1 {
  letter-spacing: 0.04em;
}

.editorial-spread--cover:hover .bento-cell {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.editorial-spread--cover.is-editorial-active .hero-manifest {
  transform: scale(1.008);
  box-shadow: var(--shadow-hover);
}

.editorial-spread--cover.is-editorial-active .hero-manifest h1 {
  letter-spacing: 0.04em;
}

.editorial-spread--cover.is-editorial-active .bento-cell {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.editorial-spread--cover .bento-cell {
  transition:
    var(--transition-theme),
    transform 0.55s var(--ease-section),
    box-shadow 0.55s var(--ease-section),
    border-color 0.45s var(--ease-section);
}

.editorial-spread--cover .bento-cell:nth-child(2) {
  transition-delay: 0.04s;
}

.editorial-spread--cover .bento-cell:nth-child(3) {
  transition-delay: 0.08s;
}

.editorial-spread--cover .bento-cell:nth-child(4) {
  transition-delay: 0.12s;
}

.editorial-spread--cover .hero-manifest {
  transition:
    var(--transition-theme),
    transform 0.65s var(--ease-section),
    box-shadow 0.65s var(--ease-section);
}

.editorial-spread--cover .hero-manifest h1 {
  transition: letter-spacing 0.7s var(--ease-section);
}

.editorial-spread .info-card,
.editorial-spread .timeline-item,
.editorial-spread .award-chip,
.editorial-spread .strength-card,
.editorial-spread .metric-tile {
  position: relative;
  overflow: hidden;
  transition:
    var(--transition-theme),
    transform 0.5s var(--ease-section),
    box-shadow 0.5s var(--ease-section),
    border-color 0.45s var(--ease-section);
}

.editorial-spread .info-card::after,
.editorial-spread .timeline-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-muted), transparent);
  transition: width 0.65s var(--ease-section);
}

.editorial-spread .info-card:hover,
.editorial-spread .timeline-item:hover,
.editorial-spread .award-chip:hover,
.editorial-spread .strength-card:hover,
.editorial-spread .metric-tile:hover {
  transform: translateY(-4px) scale(1.006);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.editorial-spread .info-card:hover::after,
.editorial-spread .timeline-item:hover::after {
  width: 100%;
}

.editorial-spread:hover .experience-rail::before {
  background: linear-gradient(180deg, var(--accent-muted), rgba(var(--clash-b-rgb), 0.22));
  width: 2px;
  transition: background 0.55s var(--ease-section), width 0.45s var(--ease-section);
}

.editorial-spread .experience-rail::before {
  transition: background 0.55s var(--ease-section), width 0.45s var(--ease-section);
}

.editorial-spread:hover .timeline-item::before {
  transform: scale(1.35);
  box-shadow: 0 0 0 6px rgba(var(--clash-b-rgb), 0.12);
}

.editorial-spread .timeline-item::before {
  transition: transform 0.45s var(--ease-section), box-shadow 0.45s var(--ease-section);
}

.editorial-spread--contact:hover {
  background:
    linear-gradient(120deg, rgba(var(--clash-a-rgb), 0.28), transparent 50%),
    rgba(255, 255, 255, 0.55);
}

.editorial-body--contact {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.editorial-spread--contact:hover .contact-list a {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-2px);
}

.editorial-spread--contact .contact-list a {
  transition:
    border-color 0.4s var(--ease-section),
    background 0.4s var(--ease-section),
    transform 0.45s var(--ease-section);
}

.editorial-spread.is-editorial-active {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 0 1px var(--border-faint);
}

.editorial-spread.is-editorial-active::before {
  inset: 6px;
  border-color: var(--border-soft);
}

.editorial-spread.is-editorial-active .editorial-meta {
  opacity: 0.88;
  letter-spacing: 0.24em;
}

.editorial-spread.is-editorial-active .editorial-rule {
  transform: scaleX(1);
}

.editorial-spread.is-editorial-active .editorial-mark {
  opacity: 0.55;
  transform: translateY(-50%) rotate(45deg);
}

.hero {
  padding-top: 20px;
  padding-bottom: 32px;
  min-height: calc(100dvh - 96px);
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
  min-height: calc(100dvh - 140px);
}

.hero-manifest {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 40px);
  border: var(--frame);
  border-radius: var(--radius-md);
  background:
    linear-gradient(155deg, rgba(var(--clash-a-rgb), 0.2) 0%, transparent 52%),
    var(--surface-strong);
  box-shadow: var(--shadow);
  animation: heroSettle 1.1s var(--ease-section) both;
  position: relative;
  overflow: hidden;
}

.hero-manifest::after {
  content: "";
  position: absolute;
  width: min(42vw, 340px);
  height: min(42vw, 340px);
  right: -18%;
  bottom: -28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--clash-b-rgb), 0.12), transparent 68%);
  pointer-events: none;
}

.hero-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 12px;
  animation: heroSettle 1.1s var(--ease-section) 0.1s both;
}

.bento-cell {
  border: var(--frame);
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
}

.bento-scan {
  grid-column: 1 / -1;
  background: rgba(var(--clash-a-rgb), 0.28);
}

.bento-metrics {
  grid-column: 1 / -1;
  padding-bottom: 14px;
}

.bento-tags {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 14px;
  padding-bottom: 14px;
}

.bento-note {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.55);
}

.bento-label {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-muted);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-tile {
  padding: 14px 12px;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  transition: transform 0.35s var(--ease-section), box-shadow 0.35s var(--ease-section);
  transition-delay: calc(var(--metric-i, 0) * 0.06s);
}

.metric-tile strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  color: var(--accent-muted);
  line-height: 1.1;
}

.metric-tile span {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero-manifest,
.bento-cell,
.info-card,
.timeline-item,
.project-card,
.footer,
.chat-shell,
.admin-login-card,
.admin-section {
  border: var(--frame);
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(130%);
  box-shadow: var(--shadow);
  transition: var(--transition-theme), transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
}

.info-card,
.project-card,
.timeline-item,
.footer,
.chat-shell,
.bento-cell,
.hero-manifest {
  border-radius: var(--radius-md);
}

.info-card,
.project-card,
.timeline-item {
  padding: 24px;
  background: var(--surface-strong);
}

.timeline {
  display: grid;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.ai-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7.5vw, 4.8rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  font-weight: 600;
  text-wrap: balance;
}

.hero-role {
  margin: 16px 0 10px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
}

.hero-summary {
  max-width: 42rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.hero-note {
  max-width: none;
  margin: 0;
  padding: 0;
  border-left: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

.hero-tags {
  margin-top: 16px;
}

.hero-tags,
.chips,
.contact-list,
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.chips span,
.contact-list a,
.suggestion-chip {
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  font-weight: 500;
  font-size: 0.86rem;
  box-shadow: none;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.suggestion-chip {
  cursor: pointer;
  font: inherit;
}

.hero-actions,
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.button:active {
  transform: translateY(0) scale(0.99);
}

.button-primary {
  background: var(--accent-muted);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}

.button-secondary {
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  box-shadow: none;
}

.button-ghost {
  border: 1px solid var(--border-faint);
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.button-ghost:hover {
  color: var(--accent-muted);
  border-color: var(--border-soft);
}

.small-button {
  margin-top: 14px;
  min-height: 42px;
}

.button-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.78rem;
  border-radius: var(--radius-xs);
}

.panel-card {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: rgba(var(--clash-a-rgb), 0.35);
  border: 1px solid var(--border-soft);
}

.panel-title,
.sub-label {
  margin: 0 0 10px;
  color: var(--accent-muted);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.panel-list {
  padding-left: 1rem;
}

.stats-grid,
.about-grid,
.project-grid,
.project-showcase,
.strength-grid,
.strength-mosaic,
.ai-layout {
  display: grid;
  gap: 16px;
}

.section-headline {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section-headline h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 2.65rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.section-headline--split {
  max-width: 52rem;
}

.section-lead {
  margin: 10px 0 0;
  max-width: 42ch;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  letter-spacing: 0.03em;
  line-height: 1.2;
  font-weight: 600;
}

.about-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.about-card--1 {
  grid-column: span 7;
}

.about-card--2 {
  grid-column: span 5;
}

.about-card--3,
.about-card:nth-child(3n) {
  grid-column: span 12;
}

.about-card:nth-child(n + 4) {
  grid-column: span 6;
}

.experience-rail {
  position: relative;
  padding-left: clamp(18px, 2.5vw, 28px);
}

.experience-rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent-muted), rgba(var(--clash-b-rgb), 0.08));
}

.experience-stage .timeline {
  gap: 20px;
}

.timeline-item {
  display: block;
  padding: clamp(22px, 3vw, 30px);
  background: var(--surface-strong);
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(18px, 2.5vw, 28px) - 4px);
  top: 28px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-muted);
  box-shadow: 0 0 0 4px rgba(var(--clash-b-rgb), 0.08);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-faint);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-muted);
  padding: 4px 10px;
  border: 1px solid var(--border-faint);
  border-radius: 999px;
  background: rgba(var(--clash-a-rgb), 0.25);
}

.timeline-org {
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.timeline-summary {
  font-size: 1.02rem;
  max-width: 62ch;
}

.timeline-wins li {
  color: var(--ink-soft);
}

.project-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.project-main {
  min-width: 0;
}

.awards-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.award-chip {
  padding: 14px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.68);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: transform 0.35s var(--ease-section), border-color 0.35s var(--ease-section);
  transition-delay: calc(var(--award-i, 0) * 0.05s);
}

.award-chip:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.strength-mosaic {
  grid-template-columns: 1.15fr 0.85fr;
  grid-auto-rows: minmax(120px, auto);
  gap: 14px;
}

.strength-card--1 {
  grid-row: span 2;
  padding: clamp(24px, 3vw, 32px);
  background:
    linear-gradient(160deg, rgba(var(--clash-b-rgb), 0.06), transparent 50%),
    var(--surface-strong);
}

.strength-card--1 h3 {
  font-size: 1.25rem;
}

.contact-stage {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-md);
  background:
    linear-gradient(120deg, rgba(var(--clash-a-rgb), 0.22), transparent 45%),
    var(--surface-strong);
}

.editorial-spread--contact.contact-stage {
  display: block;
  padding: clamp(36px, 5vw, 52px) clamp(20px, 3vw, 32px);
}

.contact-stage-copy h2 {
  margin: 0 0 8px;
}

.contact-stage-actions {
  justify-content: flex-end;
}

.stat-card {
  padding: 18px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent-muted);
  letter-spacing: 0.02em;
  font-weight: 600;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.timeline-body h3,
.project-top h3,
.info-card h3,
.chat-header h3 {
  margin-top: 0;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.project-date {
  color: var(--accent-muted);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  font-family: var(--font-body);
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 20px;
  border: var(--frame);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(var(--clash-b-rgb), 0.22);
}

.project-card:nth-child(even)::before {
  background: rgba(var(--clash-a-rgb), 0.55);
}

.project-top {
  margin-bottom: 0;
  padding-left: 8px;
}

.project-repo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.project-repo-label {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--accent-muted);
}

.project-repo-url {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--accent-muted);
  font-weight: 500;
  word-break: break-all;
}

.project-repo-url:hover {
  text-decoration: underline;
}

.project-link {
  display: inline-flex;
  margin-top: 6px;
  margin-bottom: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--accent-muted);
}

.project-link:hover {
  text-decoration: underline;
}

.project-video {
  margin-top: 12px;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: rgba(var(--clash-b-rgb), 0.05);
}

.project-video video {
  display: block;
  width: 100%;
  max-height: 200px;
  background: #121212;
  object-fit: cover;
}

.project-desc {
  margin-top: 4px;
}

.project-video-editor {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(var(--clash-a-rgb), 0.28);
}

.project-video-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.project-video-toolbar > span {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--heading);
}

.project-video-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-video-file {
  max-width: 240px;
}

.project-video-status {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.project-video-status.is-uploaded {
  color: var(--text);
  font-weight: 600;
}

.project-video-upload-form {
  margin: 0;
}

.project-video-preview {
  margin: 6px 0 0;
  font-size: 0.84rem;
}

.project-video-preview a {
  font-weight: 600;
}

.chips span {
  background: rgba(var(--clash-a-rgb), 0.55);
}

.strength-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  background: var(--surface-strong);
}

.contact-list a {
  font-weight: 700;
}

/* ---------- Snapshot band (below hero) ---------- */
.snapshot-band {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

/* ---------- AI ---------- */
.ai-hero {
  padding-top: 28px;
}

.ai-headline {
  margin-bottom: 22px;
  max-width: 42rem;
}

.ai-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.ai-layout--full {
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.ai-sidebar {
  display: grid;
  gap: 18px;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(var(--clash-a-rgb), 0.35);
  border: 1px solid var(--border-soft);
}

.status-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.94rem;
}

.status-item span {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
  font-weight: 500;
}

.status-item--loading span {
  color: var(--muted);
}

.status-item--error span {
  color: #b42318;
}

.admin-grid .info-card p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.admin-grid .info-card p:last-child {
  margin-bottom: 0;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: 760px;
  padding: 22px;
  background: var(--surface-strong);
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-faint);
}

.chat-subtitle,
.composer-tip {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-messages {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 420px;
  max-height: 560px;
  margin: 18px 0;
  padding-right: 6px;
  overflow-y: auto;
}

.message {
  display: flex;
}

.message-user {
  justify-content: flex-end;
}

.message-assistant {
  justify-content: flex-start;
}

.message-bubble {
  max-width: min(760px, 88%);
  padding: 15px 17px;
  border-radius: var(--radius-md);
  border: var(--frame);
  box-shadow: var(--shadow-soft);
}

.message-assistant .message-bubble {
  background: var(--assistant-bg);
}

.message-user .message-bubble {
  background: var(--user-bg);
}

.message-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.ai-progress-panel { margin: 0 0 12px; padding: 11px 12px; border: 1px solid rgba(var(--clash-b-rgb), 0.14); border-radius: 10px; background: rgba(255, 255, 255, 0.58); }
.ai-progress-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.8rem; }
.ai-progress-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(var(--clash-b-rgb), 0.35); animation: aiProgressPulse 1.2s infinite; }
.ai-progress-panel.is-complete .ai-progress-pulse { animation: none; background: #23a55a; }
.ai-progress-list { display: grid; gap: 6px; }
.ai-progress-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 7px; align-items: start; color: var(--muted); font-size: 0.78rem; }
.ai-progress-item small { display: block; margin-top: 2px; opacity: 0.78; }
.ai-progress-check { opacity: 0.25; }
.ai-progress-item.is-active { color: var(--text); }
.ai-progress-item.is-active .ai-progress-check { color: var(--primary); opacity: 1; }
.ai-progress-item.is-done .ai-progress-check { color: #23a55a; opacity: 1; }

@keyframes aiProgressPulse {
  70% { box-shadow: 0 0 0 7px rgba(var(--clash-b-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--clash-b-rgb), 0); }
}

.message-sources {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.source-chip {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--border-subtle);
}

.source-chip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.chat-composer {
  padding-top: 14px;
  border-top: 1px solid var(--border-faint);
}

.chat-composer textarea {
  width: 100%;
  min-height: 110px;
  padding: 15px 16px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  resize: vertical;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.chat-composer textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(var(--clash-b-rgb), 0.05);
}

.chat-actions {
  align-items: center;
  justify-content: space-between;
}

.message-loading::after {
  content: none;
}

.typing-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-muted);
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-faint);
  transition: opacity 0.3s ease, max-height 0.3s ease;
  max-height: 200px;
  opacity: 1;
}

.quick-chips.is-hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  border-bottom: none;
}

/* ---------- Digital human ---------- */
.digital-human-dock {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.digital-human-bubble {
  max-width: 280px;
  padding: 14px 16px;
  border: var(--frame);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-xs) var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.digital-human-bubble p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  white-space: pre-wrap;
}

.digital-human-button {
  display: block;
  width: 236px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.digital-human-live2d-frame {
  display: block;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.digital-human-live2d {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: transparent;
}

.digital-human-meta {
  display: none;
}

.digital-human-transcript {
  width: min(260px, calc(100vw - 40px));
  padding: 10px 12px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.digital-human-transcript-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--clash-b);
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.digital-human-transcript p {
  margin: 0;
  min-height: 2.6em;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.digital-human-dock[data-state="listening"] .digital-human-transcript {
  box-shadow: 0 0 0 4px rgba(var(--clash-a-rgb), 0.45), var(--shadow-soft);
}

.digital-human-dock[data-state="listening"] .digital-human-live2d-frame {
  filter: drop-shadow(0 0 16px rgba(var(--clash-a-rgb), 0.55));
}

.digital-human-dock[data-state="thinking"] .digital-human-live2d-frame,
.digital-human-dock[data-state="talking"] .digital-human-live2d-frame {
  filter: drop-shadow(0 0 16px rgba(var(--clash-b-rgb), 0.4));
}

/* ---------- Admin ---------- */
.admin-page {
  padding-top: 36px;
}

.admin-login-card,
.admin-section {
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.admin-login-card {
  max-width: 560px;
  margin: 0 auto;
  animation: heroSettle 0.9s var(--ease-section) both;
}

.admin-dashboard {
  display: grid;
  gap: 20px;
  opacity: 1;
  transform: none;
  filter: none;
}

.admin-dashboard.is-ready .admin-grid,
.admin-dashboard.is-ready .admin-section,
.admin-dashboard.is-ready .admin-hero-strip {
  animation: adminPanelIn 0.35s var(--ease-out) both;
}

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

.admin-section {
  display: grid;
  gap: 14px;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-section-head h3,
.admin-section h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 8px;
}

.admin-form span {
  color: var(--accent-muted);
  font-weight: 500;
  font-size: 0.88rem;
}

.admin-form input,
.visibility-editor input,
.digital-human-config input,
.module-editor input,
.json-editor,
.module-textarea,
.admin-form textarea,
.visibility-editor textarea,
.digital-human-config textarea,
.module-editor textarea {
  width: 100%;
  padding: 13px 15px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  outline: none;
  transition: box-shadow 0.2s var(--ease-out);
}

.admin-form input:focus,
.visibility-editor input:focus,
.digital-human-config input:focus,
.module-editor input:focus,
.json-editor:focus,
.module-textarea:focus,
.admin-form textarea:focus,
.visibility-editor textarea:focus,
.digital-human-config textarea:focus,
.module-editor textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(var(--clash-b-rgb), 0.05);
}

.json-editor {
  min-height: 420px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.7;
}

.small-editor {
  min-height: 220px;
}

.compact-form {
  align-content: start;
}

.module-editor {
  display: grid;
  gap: 16px;
}

.visibility-editor,
.digital-human-config {
  display: grid;
  gap: 14px;
}

.visibility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.visibility-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(var(--clash-a-rgb), 0.28);
  color: var(--text);
  font-weight: 600;
}

.visibility-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--clash-b);
}

.module-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: var(--frame);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.module-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-card h4 {
  margin: 0;
  color: var(--accent-muted);
  font-family: var(--font-display);
  font-weight: 600;
}

.module-card-tip {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.repeat-list {
  display: grid;
  gap: 12px;
}

.repeat-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(var(--clash-a-rgb), 0.22);
}

.repeat-item-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drag-handle {
  color: var(--muted);
  cursor: grab;
  user-select: none;
  letter-spacing: 0.2em;
}

.repeat-item.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.repeat-item-grid {
  display: grid;
  gap: 12px;
}

.repeat-item-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-textarea,
.admin-form textarea {
  resize: vertical;
}

.rich-text-field {
  display: grid;
  gap: 8px;
}

.rich-text-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rich-text-label {
  color: var(--accent-muted);
  font-weight: 500;
  font-size: 0.88rem;
}

.rich-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  transition:
    background 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

.rich-text-btn:hover {
  border-color: var(--border-hover);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.rich-text-btn:active {
  transform: translateY(0);
}

.rich-text-btn strong {
  font-weight: 800;
  color: var(--ink);
}

.hero-summary strong,
.hero-note strong,
.info-card p strong,
.timeline-summary strong,
.timeline-stack strong,
.project-desc strong,
.strength-card p strong,
.award-chip strong,
.contact-stage-copy strong,
.panel-list strong {
  font-weight: 700;
  color: var(--ink);
}

.preview-frame {
  width: 100%;
  min-height: 860px;
  border: var(--frame);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.preview-frame--portal {
  min-height: 720px;
  background: #f6f9ff;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-feedback {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: var(--frame);
  background: rgba(255, 255, 255, 0.9);
}

.admin-feedback.is-visible {
  display: block;
  animation: feedbackIn 0.35s var(--ease-out) both;
}

.admin-feedback.is-success {
  background: rgba(var(--clash-a-rgb), 0.45);
}

.admin-feedback.is-error {
  background: rgba(231, 45, 72, 0.12);
  border-color: #e72d48;
}

.admin-hint {
  margin: 0;
  font-size: 0.9rem;
}

.admin-hero-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.snapshot-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.snapshot-note {
  margin: 0;
  max-width: 36ch;
}

.section-heading--flush {
  margin: 0;
}

.admin-hint--spaced {
  margin-top: 8px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-stat-card {
  padding: 18px 20px;
  display: grid;
  gap: 8px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
}

.avatar-preview-row {
  display: flex;
  justify-content: flex-start;
}

.avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, rgba(var(--clash-a-rgb), 1), rgba(var(--clash-b-rgb), 1));
  background-size: cover;
  background-position: center;
  border: var(--frame);
}

.avatar-preview.has-image {
  color: transparent;
}

.admin-stat-label {
  color: var(--muted);
  font-size: 13px;
}

.admin-stat-value {
  font-size: 28px;
  line-height: 1.1;
  color: var(--ink);
}

.admin-chat-stats {
  margin-bottom: 4px;
}

.admin-chat-filter-row {
  margin-bottom: 8px;
}

.admin-filter-row {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.admin-filter-actions {
  margin-top: 0;
}

.admin-search-field input {
  width: 100%;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(var(--clash-a-rgb), 0.18);
}

.admin-empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 28px 14px;
}

.admin-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.admin-tag-digital_human_2d {
  background: rgba(var(--clash-b-rgb), 0.12);
  color: var(--ink-soft);
}

.admin-tag-ai_assistant {
  background: rgba(var(--clash-a-rgb), 0.45);
  color: var(--ink-soft);
}

.admin-question-cell,
.admin-answer-cell {
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-question-cell {
  min-width: 280px;
}

.admin-answer-cell {
  min-width: 220px;
  color: var(--muted);
}

.admin-result-meta {
  color: var(--muted);
  font-size: 13px;
}

.admin-chat-stats--single {
  grid-template-columns: minmax(0, 220px);
}

.admin-search-field--wide {
  flex: 1;
  min-width: 240px;
}

.chat-log-list-wrap {
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.chat-log-list {
  display: grid;
}

.chat-log-item {
  border-bottom: 1px solid var(--border-soft);
}

.chat-log-item:last-child {
  border-bottom: 0;
}

.chat-log-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.chat-log-question {
  margin: 0;
  flex: 1;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.55;
  word-break: break-word;
}

.chat-log-detail {
  padding: 0 16px 16px;
}

.chat-log-detail.is-hidden {
  display: none;
}

.chat-log-item.is-expanded {
  background: rgba(var(--clash-a-rgb), 0.14);
}

.chat-log-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
}

.chat-log-detail-item {
  display: grid;
  gap: 6px;
}

.chat-log-detail-item--full {
  grid-column: 1 / -1;
}

.chat-log-detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.chat-log-detail-item p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  color: var(--ink-soft);
}

.chat-log-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

/* ---- 提问记录工具栏（看板 + 搜索同行）---- */
.chat-log-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}

.admin-stat-card--inline {
  flex-shrink: 0;
  min-width: 120px;
  padding: 14px 18px;
  display: grid;
  gap: 4px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
}

.admin-stat-card--inline .admin-stat-value {
  font-size: 24px;
}

.admin-chat-filter-row {
  margin-bottom: 0;
  flex: 1;
}

/* ---- 分页跳页 ---- */
.chat-log-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.chat-log-jump input {
  width: 52px;
  padding: 4px 6px;
  font-size: 13px;
  text-align: center;
  border: var(--frame);
  border-radius: var(--radius-sm);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 22, 38, 0.4);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(1120px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-hover);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-head h3 {
  margin: 0 0 6px;
}

.knowledge-modal-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.knowledge-list-panel,
.knowledge-detail-panel {
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
}

.knowledge-list-panel {
  padding: 14px;
}

.knowledge-list {
  display: grid;
  gap: 10px;
}

.knowledge-list-empty {
  padding: 18px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--muted);
}

.knowledge-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: var(--frame);
  border-radius: var(--radius-sm);
  background: rgba(var(--clash-a-rgb), 0.18);
}

.knowledge-item.is-active {
  border-color: rgba(var(--clash-b-rgb), 0.3);
  box-shadow: 0 0 0 2px rgba(var(--clash-b-rgb), 0.08);
}

.knowledge-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-item-head strong {
  font-family: var(--font-body);
  font-weight: 700;
}

.knowledge-item-meta {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  word-break: break-all;
}

.knowledge-item-actions,
.knowledge-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-detail-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.knowledge-detail-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.knowledge-detail-toolbar h4 {
  margin: 0 0 6px;
}

.knowledge-detail-content {
  min-height: 520px;
  resize: vertical;
}

/* ---------- Utility / motion ---------- */
.view-panel {
  display: none;
}

.view-panel.is-visible {
  display: block;
  animation: viewElegant 0.85s var(--ease-section) both;
}

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.994);
  filter: blur(4px);
  transition:
    opacity 0.9s var(--ease-section) calc(var(--reveal-i, 0) * 0.08s),
    transform 0.9s var(--ease-section) calc(var(--reveal-i, 0) * 0.08s),
    filter 0.9s var(--ease-section) calc(var(--reveal-i, 0) * 0.08s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.metric-tile:hover,
.project-stage .project-card:hover,
.stat-card:hover,
.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.project-stage .project-card:hover {
  transform: translateY(-2px);
}

.contact-list a:hover,
.chips span:hover,
.hero-tags span:hover,
.suggestion-chip:hover {
  transform: none;
  border-color: var(--border-soft);
  background: rgba(255, 255, 255, 0.88);
}

@keyframes heroSettle {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes adminPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes barSettle {
  from {
    opacity: 0;
    transform: translateY(-8px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes viewElegant {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.996);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@keyframes viewFade {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes feedbackIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .reveal,
  .section {
    opacity: 1;
    transform: none;
    filter: none;
  }

  body::after {
    display: none;
  }
}

@media (max-width: 1100px) {
  .topbar {
    width: 100%;
    max-height: none;
    flex-wrap: wrap;
  }

  .nav {
    flex-wrap: wrap;
    white-space: normal;
  }

  .hero-stage,
  .contact-stage,
  .strength-mosaic,
  .about-grid,
  .about-card--1,
  .about-card--2,
  .about-card--3,
  .about-card:nth-child(n + 4),
  .project-grid,
  .strength-grid,
  .ai-layout,
  .admin-grid,
  .repeat-item-grid--2,
  .visibility-grid {
    grid-template-columns: 1fr;
  }

  .about-card--1,
  .about-card--2,
  .about-card--3,
  .about-card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-showcase {
    grid-template-columns: 1fr;
  }

  .strength-card--1 {
    grid-row: span 1;
  }

  .editorial-body--contact {
    grid-template-columns: 1fr;
  }

  .editorial-mark {
    display: none;
  }

  .editorial-meta {
    font-size: 0.62rem;
  }

  .editorial-title {
    letter-spacing: 0.04em;
  }

  .footer,
  .contact-stage {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-stage-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(calc(100% - 18px), var(--max-width));
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

  .nav,
  .mode-switch,
  .topbar-tools,
  .theme-switcher {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero {
    min-height: auto;
    padding-top: 18px;
  }

  .hero-stage {
    min-height: auto;
  }

  .hero-manifest,
  .bento-cell,
  .timeline-item,
  .project-card,
  .info-card,
  .footer,
  .chat-shell,
  .admin-login-card,
  .admin-section {
    padding: 20px;
    box-shadow: var(--shadow-soft);
  }

  .metrics-row {
    grid-template-columns: 1fr 1fr;
  }

  .button,
  .mode-button {
    width: 100%;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .chat-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .digital-human-dock {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    gap: 6px;
    contain: layout paint;
  }

  .digital-human-button {
    width: min(25vw, 108px);
    min-width: 72px;
  }

  .digital-human-live2d-frame {
    width: 100%;
    height: min(25vh, 148px);
    min-height: 96px;
  }

  .digital-human-bubble {
    max-width: min(76vw, 280px);
    padding: 10px 12px;
  }

  .digital-human-transcript {
    width: min(76vw, 280px);
    padding: 8px 10px;
  }

  .digital-human-transcript p {
    min-height: 0;
  }

  .project-stage,
  .project-showcase,
  .project-card {
    min-height: 0;
  }

  .project-card {
    height: auto;
  }

  .admin-actions,
  .admin-section-head,
  .admin-hero-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .message-bubble {
    max-width: 100%;
  }

  .theme-swatch-label {
    display: none;
  }
}

/* Mobile profile pages must follow their content height. Some Android browsers
   retain desktop viewport minimums while their address bar is collapsing. */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  body.has-site-grid .section,
  body.has-site-grid .editorial-spread,
  body.has-site-grid .editorial-body,
  body.has-site-grid .hero,
  body.has-site-grid .hero-stage,
  body.has-site-grid .about-stage,
  body.has-site-grid .experience-stage,
  body.has-site-grid .project-stage {
    min-height: 0 !important;
    height: auto !important;
  }

  body.has-site-grid .section {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  body.has-site-grid .editorial-spread {
    margin: 0;
    padding: 42px 10px 24px;
  }

  body.has-site-grid .editorial-spread--cover {
    padding-top: 12px;
  }

  body.has-site-grid .about-stage {
    margin-bottom: 0 !important;
    padding-bottom: 18px;
  }

  body.has-site-grid .experience-stage {
    margin-top: 0 !important;
    padding-top: 42px;
  }

  body.has-site-grid .digital-human-dock:not([data-state="listening"]):not([data-state="thinking"]):not([data-state="talking"]) .digital-human-bubble,
  body.has-site-grid .digital-human-dock:not([data-state="listening"]):not([data-state="thinking"]):not([data-state="talking"]) .digital-human-transcript {
    display: none;
  }

  body.has-site-grid .digital-human-dock {
    z-index: 60;
  }
}

/* ---------- Site grid + portal sidebar (profile / admin) ---------- */
body.has-site-grid {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}

.site-grid-bg,
.profile-grid-bg,
.admin-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-grid-bg canvas,
.profile-grid-bg canvas,
.admin-grid-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.profile-site-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  width: min(calc(100% - 32px), 1400px);
  max-width: 1400px;
  align-items: start;
}

.profile-site-main {
  min-width: 0;
}

.profile-site-sidebar {
  position: sticky;
  top: 14px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 18px 14px;
  border-radius: var(--radius-md);
  border: var(--frame);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(120%);
}

.profile-site-sidebar-brand {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-faint);
}

.profile-site-sidebar-brand strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--heading);
}

.profile-site-sidebar-brand span {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.profile-site-nav {
  display: grid;
  gap: 6px;
}

.profile-site-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.profile-site-nav-item:hover,
.profile-site-nav-item.is-active {
  color: var(--heading);
  background: rgba(var(--clash-b-rgb), 0.08);
  transform: translateX(3px);
}

.profile-site-nav-index {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-muted);
  min-width: 1.6em;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
  margin-top: 8px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 14px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 18px 14px;
  border-radius: var(--radius-md);
  border: var(--frame);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(120%);
}

.admin-sidebar-brand {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-faint);
}

.admin-sidebar-brand strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--heading);
}

.admin-sidebar-brand span {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.admin-sidebar-nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.admin-sidebar-item:hover,
.admin-sidebar-item.is-active {
  color: var(--heading);
  background: rgba(var(--clash-b-rgb), 0.08);
  transform: translateX(3px);
}

.admin-sidebar-index {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-muted);
  min-width: 1.6em;
}

.admin-main {
  min-width: 0;
}

.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: block;
  animation: adminPanelIn 0.35s var(--ease-out) both;
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .profile-site-layout {
    grid-template-columns: 1fr;
  }

  .profile-site-sidebar {
    position: static;
  }

  .profile-site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.site-filing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  width: 100%;
  padding: 20px 24px;
  font-size: 0.82rem;
}

.site-filing a {
  color: inherit;
  text-decoration: none;
}

.site-filing a:hover {
  text-decoration: underline;
}

/* Phone-only linear portfolio layout.
   Keep every module in normal document flow and remove desktop reveal spacing. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  body.has-site-grid,
  body.has-site-grid .page-shell,
  body.has-site-grid #app-root,
  body.has-site-grid .view-panel,
  body.has-site-grid .view-panel.is-visible {
    min-height: 0 !important;
    height: auto !important;
  }

  body.has-site-grid .view-panel.is-visible,
  body.has-site-grid .section,
  body.has-site-grid .reveal,
  body.has-site-grid .is-section-visible,
  body.has-site-grid .hero-manifest,
  body.has-site-grid .hero-bento,
  body.has-site-grid .timeline-item,
  body.has-site-grid .project-card,
  body.has-site-grid .info-card,
  body.has-site-grid .award-chip,
  body.has-site-grid .strength-card {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }

  body.has-site-grid .section,
  body.has-site-grid .editorial-spread,
  body.has-site-grid .editorial-spread--cover,
  body.has-site-grid .hero,
  body.has-site-grid .hero-stage,
  body.has-site-grid .about-stage,
  body.has-site-grid .experience-stage,
  body.has-site-grid .project-stage,
  body.has-site-grid .awards-stage,
  body.has-site-grid .strength-stage {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.has-site-grid .editorial-spread::before,
  body.has-site-grid .editorial-chrome,
  body.has-site-grid .editorial-mark,
  body.has-site-grid .editorial-rule {
    display: none !important;
  }

  body.has-site-grid .editorial-body,
  body.has-site-grid .hero-stage,
  body.has-site-grid .hero-manifest,
  body.has-site-grid .hero-bento,
  body.has-site-grid .about-grid,
  body.has-site-grid .experience-rail,
  body.has-site-grid .timeline,
  body.has-site-grid .project-showcase,
  body.has-site-grid .awards-wall,
  body.has-site-grid .strength-mosaic {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  body.has-site-grid .section-headline {
    margin: 0 !important;
    padding: 18px 14px 10px !important;
  }

  body.has-site-grid .hero-manifest,
  body.has-site-grid .bento-cell,
  body.has-site-grid .about-card,
  body.has-site-grid .timeline-item,
  body.has-site-grid .project-card,
  body.has-site-grid .strength-card {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 16px 14px !important;
    border-radius: 0 !important;
  }

  body.has-site-grid .bento-cell + .bento-cell,
  body.has-site-grid .about-card + .about-card,
  body.has-site-grid .timeline-item + .timeline-item,
  body.has-site-grid .project-card + .project-card,
  body.has-site-grid .strength-card + .strength-card {
    border-top: 0 !important;
  }

  body.has-site-grid .experience-rail {
    padding-left: 0 !important;
  }

  body.has-site-grid .experience-rail::before,
  body.has-site-grid .timeline-item::before {
    display: none !important;
  }

  body.has-site-grid .award-chip {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  body.has-site-grid .digital-human-dock:not([data-state="listening"]):not([data-state="thinking"]):not([data-state="talking"]) .digital-human-bubble,
  body.has-site-grid .digital-human-dock:not([data-state="listening"]):not([data-state="thinking"]):not([data-state="talking"]) .digital-human-transcript {
    display: none !important;
  }
}
