:root {
  color-scheme: dark;
  --bg: #040816;
  --bg-alt: #08101f;
  --bg-soft: rgba(12, 18, 34, 0.68);
  --surface: rgba(13, 20, 39, 0.68);
  --surface-strong: rgba(18, 27, 50, 0.86);
  --surface-solid: #10192f;
  --surface-light: rgba(255, 255, 255, 0.08);
  --line: rgba(147, 183, 255, 0.18);
  --line-strong: rgba(147, 183, 255, 0.34);
  --text: #f5f8ff;
  --text-soft: rgba(232, 239, 255, 0.76);
  --text-muted: rgba(220, 231, 255, 0.58);
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.22);
  --accent: #7cb4ff;
  --accent-strong: #5a8dff;
  --accent-2: #76f2d4;
  --accent-3: #d78eff;
  --accent-wash: rgba(124, 180, 255, 0.12);
  --success: #6ef0bb;
  --danger: #ff6f9a;
  --warning: #ffd16f;
  --radius-sm: 16px;
  --radius: 24px;
  --radius-lg: 32px;
  --max-width: 1220px;
  --header-height: 88px;
  --section-gap: clamp(4.5rem, 8vw, 7rem);
  --font-sans: Inter, "SF Pro Display", "SF Pro Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-alt: #ffffff;
  --bg-soft: rgba(255, 255, 255, 0.82);
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-light: rgba(81, 112, 166, 0.08);
  --line: rgba(52, 92, 164, 0.14);
  --line-strong: rgba(52, 92, 164, 0.26);
  --text: #0b1425;
  --text-soft: rgba(11, 20, 37, 0.78);
  --text-muted: rgba(11, 20, 37, 0.56);
  --shadow: 0 24px 60px rgba(29, 49, 83, 0.12);
  --shadow-soft: 0 14px 32px rgba(29, 49, 83, 0.08);
  --accent: #3474ff;
  --accent-strong: #2158d8;
  --accent-2: #0bb99a;
  --accent-3: #9a48f7;
  --accent-wash: rgba(52, 116, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 12% -10%, rgba(124, 180, 255, 0.22), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(118, 242, 212, 0.14), transparent 26%),
    radial-gradient(circle at 50% 45%, rgba(90, 141, 255, 0.1), transparent 48%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 42%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 40%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

body.is-modal-open {
  overflow: hidden;
}

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

button,
input,
textarea,
iframe {
  font: inherit;
}

img,
canvas,
svg,
iframe {
  display: block;
  max-width: 100%;
}

button {
  color: inherit;
}

main {
  position: relative;
  z-index: 1;
}

code {
  padding: 0.14rem 0.4rem;
  border-radius: 0.55rem;
  background: var(--surface-light);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

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

[hidden] {
  display: none !important;
}

.shell {
  width: min(var(--max-width), calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: var(--section-gap) 0;
}

.section:first-of-type {
  padding-top: calc(var(--section-gap) * 0.6);
}

.section-intro {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 2rem;
  max-width: 760px;
}

.section-intro-center {
  text-align: center;
  margin-inline: auto;
}

.section-intro h2,
.page-hero h1,
.hero h1,
.contact-card h2,
.resume-summary h2,
.chat-sidebar h2,
.publication-card h3,
.service-card h2,
.service-card h3,
.post-card h3,
.research-card h3,
.placeholder-card h2,
.terminal-copy h2,
.architecture-panel-copy h3,
.github-graph-card h3,
.github-repos-card h3,
.hero-panel-head h2,
.feature-project-card h3,
.testimonial-card h3,
.contact-note h3,
.chat-head h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-intro h2,
.page-hero h1,
.contact-card h2,
.resume-summary h2,
.chat-sidebar h2,
.terminal-copy h2,
.hero-panel-head h2,
.github-graph-card h3,
.github-repos-card h3 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.service-card h2,
.service-card h3,
.post-card h3,
.research-card h3,
.placeholder-card h2,
.feature-project-card h3,
.testimonial-card h3,
.contact-note h3,
.chat-head h3,
.publication-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.section-intro p,
.page-hero p,
.hero-description,
.chat-sidebar p,
.contact-card p,
.contact-note p,
.post-card p,
.research-card p,
.publication-card p,
.service-card p,
.placeholder-card p,
.resume-summary p,
.terminal-copy p,
.architecture-panel-copy p,
.testimonial-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.1vw, 1.08rem);
}

.eyebrow,
.card-eyebrow,
.footer-heading,
.terminal-caption {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.terminal-caption {
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-light);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-accent {
  background: linear-gradient(135deg, rgba(124, 180, 255, 0.18), rgba(118, 242, 212, 0.12));
  border-color: rgba(124, 180, 255, 0.34);
  color: var(--text);
}

.badge-soft {
  background: rgba(255, 255, 255, 0.04);
}

.glass-card,
.page-hero,
.hero-panel,
.mobile-nav-panel,
.command-dialog,
.pdf-dialog,
.metric-pill,
.icon-button,
.button,
.filter-chip,
.suggestion-chip,
.architecture-node {
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.glass-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)), var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.glass-card::before,
.page-hero::before,
.hero-panel::before,
.mobile-nav-panel::before,
.command-dialog::before,
.pdf-dialog::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at top right, rgba(118, 242, 212, 0.08), transparent 24%);
  pointer-events: none;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 620;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.button:hover,
.button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.filter-chip:hover,
.filter-chip:focus-visible,
.suggestion-chip:hover,
.suggestion-chip:focus-visible,
.command-item:hover,
.command-item:focus-visible,
.architecture-node:hover,
.architecture-node:focus-visible,
.graph-bar:hover,
.graph-bar:focus-visible,
.repo-row:hover,
.repo-row:focus-visible,
.feature-project-card:hover,
.feature-project-card:focus-visible,
.service-card:hover,
.post-card:hover,
.publication-card:hover,
.research-card:hover,
.testimonial-card:hover,
.placeholder-card:hover,
.contact-note:hover,
.metric-card:hover,
.terminal-card:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 14px 32px rgba(52, 116, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.button-ghost,
.icon-button,
.filter-chip,
.suggestion-chip,
.command-item,
.architecture-node {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.icon-button-link {
  cursor: pointer;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.theme-icon-sun,
.theme-icon-moon {
  display: inline-flex;
}

[data-theme-toggle][data-state='dark'] .theme-icon-sun,
[data-theme-toggle][data-state='light'] .theme-icon-moon {
  display: none;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  z-index: 25;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: 0.9rem;
  transition: padding 220ms ease;
}

.site-header.is-scrolled {
  padding-top: 0.55rem;
}

.header-shell {
  position: relative;
}

.header-bar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
  padding: 0.9rem 1rem;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(147, 183, 255, 0.14);
  background: rgba(8, 12, 24, 0.65);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

html[data-theme='light'] .header-bar {
  background: rgba(255, 255, 255, 0.78);
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.9rem;
  background:
    linear-gradient(135deg, rgba(124, 180, 255, 0.26), rgba(118, 242, 212, 0.22)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(147, 183, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-weight: 760;
  letter-spacing: -0.05em;
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
}

.brand-copy strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.brand-mark-compact .brand-copy small {
  display: none;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  color: var(--text-soft);
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-active {
  box-shadow: inset 0 0 0 1px rgba(147, 183, 255, 0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.mobile-menu-button {
  display: none;
}

.mobile-nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  width: min(26rem, 100%);
  padding: 1rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.mobile-nav {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
}

.mobile-nav-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.mobile-nav-link span {
  font-weight: 650;
}

.mobile-nav-link small {
  color: var(--text-muted);
}

.mobile-nav-link.is-active {
  background: rgba(124, 180, 255, 0.09);
  border-color: rgba(124, 180, 255, 0.32);
}

.mobile-nav-footer {
  padding-top: 0.5rem;
}

.hero {
  position: relative;
  overflow: clip;
  min-height: 100vh;
  padding: 4rem 0 2.4rem;
}

.hero-neural-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 2.2rem;
  align-items: center;
  min-height: calc(100vh - 8rem);
}

.hero-copy {
  display: grid;
  gap: 1.2rem;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(3.5rem, 7vw, 7rem);
}

.hero-highlight {
  display: inline-block;
  margin-inline: 0.15ch;
  background: linear-gradient(135deg, var(--text) 5%, var(--accent) 40%, var(--accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(124, 180, 255, 0.18);
}

.hero-description {
  max-width: 42rem;
  font-size: clamp(1.06rem, 1.25vw, 1.18rem);
}

.hero-roles {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  padding: 0.95rem 1.05rem;
  width: fit-content;
  max-width: 100%;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.hero-role-label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.typewriter {
  position: relative;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.typewriter::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 1em;
  margin-left: 0.08em;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: blink 1s steps(2, jump-none) infinite;
}

.hero-actions,
.page-hero-actions,
.contact-actions,
.research-actions,
.terminal-actions,
.chat-sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 36rem;
}

.metric-pill,
.metric-card {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.metric-pill {
  display: grid;
  gap: 0.22rem;
  min-height: 5rem;
}

.metric-pill strong,
.metric-card strong {
  font-size: clamp(1.35rem, 1.8vw, 1.9rem);
  letter-spacing: -0.04em;
}

.metric-pill span,
.metric-card span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero-visual {
  display: grid;
  gap: 1rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)), var(--surface-strong);
  box-shadow: var(--shadow);
}

.hero-panel-main {
  min-height: 36rem;
  padding: 1.15rem;
}

.hero-panel-head,
.project-visualizer-head,
.chat-head,
.graph-head,
.pdf-dialog-head,
.command-head,
.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-panel-head {
  margin-bottom: 1rem;
}

.hero-panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-panel-tags span,
.project-tags span,
.post-tags span,
.repo-meta span,
.legend-ramp,
.filter-chip,
.suggestion-chip,
.hero-status,
.chat-status,
.feature-project-metric,
.card-outcome {
  border-radius: 999px;
}

.hero-panel-tags span,
.project-tags span,
.post-tags span,
.filter-chip,
.suggestion-chip,
.card-outcome {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.78rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-webgl,
.project-webgl-canvas {
  width: 100%;
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 180, 255, 0.12), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(118, 242, 212, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-webgl {
  height: 27rem;
}

.project-webgl-canvas {
  height: 30rem;
}

.is-webgl-fallback {
  background:
    radial-gradient(circle at 30% 20%, rgba(124, 180, 255, 0.18), transparent 24%),
    radial-gradient(circle at 70% 60%, rgba(118, 242, 212, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.hero-panel-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1rem;
}

.hero-status,
.chat-status,
.feature-project-metric,
.card-outcome {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.status-dot,
.terminal-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.status-dot {
  background: var(--success);
  box-shadow: 0 0 14px rgba(110, 240, 187, 0.45);
}

.hero-panel-code {
  padding: 1rem 1.1rem 1.15rem;
}

.mini-terminal {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.94rem;
  color: var(--text-soft);
}

.mini-terminal div {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.82rem 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.mini-terminal span {
  color: var(--accent-2);
  font-weight: 700;
}

.page-hero {
  position: relative;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: calc(var(--header-height) + 1.4rem) auto 0;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)), var(--surface-strong);
  box-shadow: var(--shadow);
}

.page-hero-copy {
  display: grid;
  gap: 1rem;
  max-width: 50rem;
}

.projects-layout,
.github-layout,
.resume-layout,
.contact-shell,
.terminal-shell,
.chat-console-layout,
.publication-grid,
.services-page-grid,
.placeholder-grid,
.research-preview-grid,
.testimonial-grid,
.posts-grid,
.services-preview-grid {
  display: grid;
  gap: 1rem;
}

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

.project-visualizer-card {
  padding: 1.1rem;
}

.project-card-stack {
  display: grid;
  gap: 1rem;
}

.feature-project-card,
.service-card,
.post-card,
.research-card,
.publication-card,
.testimonial-card,
.placeholder-card,
.contact-note,
.resume-summary,
.chat-sidebar,
.chat-shell,
.github-graph-card,
.github-repos-card,
.terminal-card {
  padding: 1.25rem;
}

.feature-project-card {
  cursor: pointer;
}

.feature-project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.feature-project-card p,
.service-card p,
.post-card p,
.research-card p,
.publication-card p,
.testimonial-card p,
.placeholder-card p,
.contact-note p {
  margin-top: 0.8rem;
}

.feature-project-metric {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 7.5rem;
}

.feature-project-metric strong {
  font-size: 1.15rem;
}

.project-tags,
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.project-detail {
  margin-top: 1rem;
  color: var(--text-soft);
}

.section-cta {
  margin-top: 1.25rem;
}

.services-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.service-card ul {
  display: grid;
  gap: 0.7rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.service-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(124, 180, 255, 0.32);
}

.card-outcome {
  margin-top: 1.2rem;
  color: var(--text);
  background: linear-gradient(135deg, rgba(124, 180, 255, 0.1), rgba(118, 242, 212, 0.08));
  border-color: rgba(124, 180, 255, 0.28);
}

.terminal-shell {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
}

.terminal-copy {
  display: grid;
  gap: 1rem;
}

.terminal-card {
  position: relative;
  min-height: 24rem;
}

.terminal-head {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.terminal-dot-red {
  background: var(--danger);
}

.terminal-dot-yellow {
  background: var(--warning);
}

.terminal-dot-green {
  background: var(--success);
}

.terminal-body {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-soft);
}

.terminal-line {
  padding: 0.82rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: opacity 320ms ease, transform 320ms ease;
}

.architecture-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.architecture-tab {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.58rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.architecture-tab.is-active {
  color: var(--text);
  background: rgba(124, 180, 255, 0.1);
  border-color: rgba(124, 180, 255, 0.28);
}

.architecture-shell {
  position: relative;
}

.architecture-panel {
  display: none;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 1rem;
  align-items: stretch;
}

.architecture-panel.is-active {
  display: grid;
}

.architecture-panel-copy,
.architecture-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)), var(--surface);
  box-shadow: var(--shadow-soft);
}

.architecture-panel-copy {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.architecture-detail {
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.architecture-detail h4 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.architecture-stage {
  min-height: 28rem;
}

.architecture-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.architecture-lines line {
  stroke: rgba(124, 180, 255, 0.3);
  stroke-width: 0.3;
  stroke-linecap: round;
}

.architecture-lines text {
  fill: var(--text-muted);
  font-size: 2.2px;
  text-anchor: middle;
}

.architecture-node {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 10rem;
  padding: 0.8rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 16, 31, 0.78);
  color: var(--text);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  text-align: left;
}

html[data-theme='light'] .architecture-node {
  background: rgba(255, 255, 255, 0.88);
}

.architecture-node span {
  font-weight: 650;
}

.architecture-node.is-active {
  border-color: rgba(124, 180, 255, 0.44);
  box-shadow: 0 18px 36px rgba(52, 116, 255, 0.18);
}

.testimonial-grid,
.research-preview-grid,
.placeholder-grid,
.posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.posts-grid-compact,
.testimonial-grid,
.research-preview-grid {
  align-items: stretch;
}

.post-topline,
.research-topline,
.publication-topline,
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-footer {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.testimonial-metric {
  margin-top: 1rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.publication-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.publication-search {
  position: relative;
  flex: 1 1 20rem;
  display: flex;
  align-items: center;
  min-height: 3.15rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.publication-search .icon {
  color: var(--text-muted);
}

.publication-search input,
.command-input-wrap input,
.chat-form textarea {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.publication-search input::placeholder,
.command-input-wrap input::placeholder,
.chat-form textarea::placeholder {
  color: var(--text-muted);
}

.publication-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-chip {
  min-height: 2.8rem;
  padding: 0.45rem 0.88rem;
  border: 1px solid var(--line);
  color: var(--text-soft);
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.filter-chip.is-active {
  color: var(--text);
  background: rgba(124, 180, 255, 0.1);
  border-color: rgba(124, 180, 255, 0.28);
}

.publication-count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.publication-authors {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.grant-card {
  border-color: rgba(118, 242, 212, 0.24);
}

.github-layout {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr) minmax(0, 0.9fr);
  align-items: start;
}

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

.metric-card {
  min-height: 10rem;
  display: grid;
  gap: 0.35rem;
  align-content: end;
}

.skeleton-card {
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.14) 46%, transparent 72%);
  transform: translateX(-120%);
  animation: shimmer 1.6s ease-in-out infinite;
}

.github-graph-card {
  position: relative;
}

.graph-head {
  margin-bottom: 1.1rem;
}

.graph-legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.legend-ramp {
  width: 5rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(124, 180, 255, 0.08), rgba(124, 180, 255, 0.55));
}

.graph-stage {
  min-height: 24rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top left, rgba(124, 180, 255, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  padding: 1.4rem 1rem 1rem;
}

.graph-plane {
  display: flex;
  align-items: flex-end;
  gap: 0.24rem;
  min-height: 20rem;
  height: 100%;
  perspective: 1100px;
  transform-style: preserve-3d;
}

.graph-week {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.22rem;
}

.graph-bar {
  position: relative;
  width: 0.68rem;
  height: calc(var(--bar-height) + 10px);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
}

.graph-bar::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--bar-height);
  border-radius: 0.38rem 0.38rem 0.18rem 0.18rem;
  background: linear-gradient(180deg, rgba(124, 180, 255, calc(0.18 + var(--bar-level) * 0.08)), rgba(52, 116, 255, calc(0.18 + var(--bar-level) * 0.08)));
  box-shadow: 0 8px 18px rgba(52, 116, 255, 0.16);
  transform: translateZ(0);
}

.graph-bar-top {
  position: absolute;
  left: 0.06rem;
  bottom: calc(var(--bar-height) - 1px);
  width: calc(100% - 0.12rem);
  height: 0.38rem;
  border-radius: 0.35rem;
  background: rgba(198, 222, 255, 0.86);
  transform: translateY(-2px) rotateX(66deg);
  transform-origin: center bottom;
}

.graph-bar:hover::before,
.graph-bar:focus-visible::before {
  box-shadow: 0 12px 24px rgba(52, 116, 255, 0.28);
}

.graph-tooltip {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.95rem;
  border: 1px solid var(--line);
  background: rgba(8, 16, 31, 0.88);
  box-shadow: var(--shadow-soft);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.repo-list {
  display: grid;
  gap: 0.8rem;
}

.repo-row {
  display: grid;
  gap: 0.5rem;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.repo-row strong {
  font-size: 1rem;
}

.repo-row p {
  margin: 0.28rem 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.repo-meta span {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.repo-empty {
  padding: 1.15rem;
  border-radius: 1rem;
  border: 1px dashed var(--line-strong);
  color: var(--text-muted);
}

.section-contact {
  padding-bottom: calc(var(--section-gap) + 1rem);
}

.contact-shell {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: stretch;
}

.contact-card,
.contact-side {
  display: grid;
  gap: 1rem;
}

.contact-side {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.resume-layout {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.resume-frame-card {
  overflow: hidden;
}

.resume-frame {
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: white;
}

.chat-console-layout {
  grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.16fr);
  align-items: stretch;
}

.chat-sidebar,
.chat-shell {
  min-height: 36rem;
}

.chat-sidebar {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.chat-prompt-list {
  display: grid;
  gap: 0.7rem;
}

.suggestion-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.95rem;
  text-align: left;
  border: 1px solid var(--line);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

.chat-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.chat-messages {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  max-height: 33rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.chat-message {
  display: flex;
}

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

.chat-bubble {
  max-width: min(34rem, 85%);
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: pre-wrap;
}

.chat-message-user .chat-bubble {
  background: linear-gradient(135deg, rgba(52, 116, 255, 0.18), rgba(124, 180, 255, 0.08));
  border-color: rgba(124, 180, 255, 0.3);
}

.chat-bubble.is-pending {
  position: relative;
}

.chat-bubble.is-pending::after {
  content: '';
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.22rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(124, 180, 255, 0.44);
  animation: pulse 1s ease-in-out infinite;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
}

.chat-form textarea {
  min-height: 5.6rem;
  resize: vertical;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.command-palette,
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.command-backdrop,
.pdf-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.command-dialog,
.pdf-dialog {
  position: relative;
  width: min(42rem, calc(100% - 1.5rem));
  margin: 8vh auto 0;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.command-dialog {
  overflow: hidden;
}

.command-head {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.command-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3rem;
  padding: 0 0.2rem;
}

.command-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.command-results {
  display: grid;
  gap: 0.55rem;
  max-height: 24rem;
  overflow: auto;
  padding: 0 1rem 1rem;
}

.command-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 4.3rem;
  padding: 0.9rem 1rem;
  text-align: left;
  border: 1px solid var(--line);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.command-item p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.command-item span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.command-item.is-active {
  background: rgba(124, 180, 255, 0.1);
  border-color: rgba(124, 180, 255, 0.28);
}

.command-empty {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px dashed var(--line-strong);
  color: var(--text-muted);
}

.pdf-dialog {
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(72rem, calc(100% - 1.5rem));
  height: 86vh;
  margin-top: 5vh;
}

.pdf-dialog-head {
  padding: 1rem 1rem 0.95rem;
  border-bottom: 1px solid var(--line);
}

.pdf-dialog-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pdf-frame-wrap {
  min-height: 0;
}

.pdf-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  border: 0;
  background: white;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 0 0 2rem;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  padding: 1.3rem;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
}

.footer-brand {
  display: grid;
  gap: 1rem;
}

.footer-brand p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-soft);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(10rem, auto));
  gap: 1.6rem;
}

.footer-links > div {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-soft);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.7);
    opacity: 0.55;
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(120%);
  }
}

html[data-motion='reduced'] *,
@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;
  }
}

@media (max-width: 1100px) {
  .hero-shell,
  .projects-layout,
  .terminal-shell,
  .github-layout,
  .contact-shell,
  .resume-layout,
  .chat-console-layout,
  .architecture-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

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

  .services-preview-grid,
  .publication-grid,
  .posts-grid,
  .testimonial-grid,
  .research-preview-grid,
  .placeholder-grid,
  .services-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .github-metrics-grid {
    order: 2;
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .header-bar {
    grid-template-columns: auto 1fr;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .brand-copy small {
    display: none;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.8rem, 11vw, 5rem);
  }

  .hero-stats,
  .github-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .architecture-stage {
    min-height: 30rem;
  }

  .architecture-node {
    min-width: 8rem;
  }
}

@media (max-width: 640px) {
  .shell,
  .page-hero {
    width: min(var(--max-width), calc(100% - 1rem));
  }

  .header-bar {
    padding-inline: 0.8rem;
  }

  .icon-button {
    width: 2.7rem;
    height: 2.7rem;
  }

  .hero,
  .section {
    padding-top: 3.6rem;
    padding-bottom: 3.6rem;
  }

  .hero-stats,
  .services-preview-grid,
  .publication-grid,
  .posts-grid,
  .testimonial-grid,
  .research-preview-grid,
  .placeholder-grid,
  .services-page-grid,
  .footer-links,
  .github-metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .page-hero-actions,
  .contact-actions,
  .research-actions,
  .terminal-actions,
  .chat-sidebar-actions,
  .chat-form,
  .publication-toolbar,
  .feature-project-top,
  .graph-head,
  .post-topline,
  .research-topline,
  .publication-topline,
  .post-footer,
  .pdf-dialog-head,
  .command-meta,
  .hero-panel-footer,
  .chat-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .filter-chip,
  .suggestion-chip {
    width: 100%;
  }

  .hero-panel-main,
  .project-visualizer-card,
  .chat-sidebar,
  .chat-shell,
  .github-graph-card,
  .github-repos-card,
  .service-card,
  .post-card,
  .research-card,
  .publication-card,
  .placeholder-card,
  .contact-note,
  .resume-summary,
  .terminal-card,
  .feature-project-card,
  .testimonial-card {
    padding: 1rem;
  }

  .hero-webgl,
  .project-webgl-canvas {
    height: 22rem;
  }

  .page-hero {
    margin-top: calc(var(--header-height) + 0.8rem);
    padding: 1.35rem;
  }

  .publication-count {
    margin-left: 0;
  }

  .command-dialog,
  .pdf-dialog {
    width: calc(100% - 1rem);
  }

  .pdf-dialog {
    height: 88vh;
  }

  .graph-stage {
    overflow-x: auto;
  }

  .graph-plane {
    min-width: 46rem;
  }

  .chat-bubble {
    max-width: 92%;
  }
}

/* ==== V2 premium UI system overrides ==== */

:root {
  --max-width: 1280px;
  --radius: 26px;
  --radius-lg: 38px;
  --radius-xl: 46px;
  --header-height: 84px;
  --section-gap: clamp(5rem, 8vw, 7.75rem);
  --pointer-x: 50vw;
  --pointer-y: 22vh;
}

html[data-theme='light'] {
  --shadow: 0 24px 90px rgba(35, 58, 104, 0.14);
  --shadow-soft: 0 18px 48px rgba(35, 58, 104, 0.11);
}

body {
  position: relative;
  background:
    radial-gradient(circle at 16% -8%, rgba(124, 180, 255, 0.24), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(118, 242, 212, 0.18), transparent 20%),
    radial-gradient(circle at 58% 38%, rgba(90, 141, 255, 0.12), transparent 40%),
    linear-gradient(180deg, #08101f 0%, #050b18 44%, #040816 100%);
}

html[data-theme='light'] body {
  background:
    radial-gradient(circle at 16% -8%, rgba(52, 116, 255, 0.14), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(11, 185, 154, 0.12), transparent 20%),
    radial-gradient(circle at 58% 38%, rgba(90, 141, 255, 0.08), transparent 40%),
    linear-gradient(180deg, #f8fbff 0%, #f2f6fd 48%, #eef4fb 100%);
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.07), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 100%);
  background-size: auto, auto, 120px 120px;
  opacity: 0.94;
}

.cursor-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(520px circle at var(--pointer-x) var(--pointer-y), rgba(124, 180, 255, 0.12), transparent 54%),
    radial-gradient(420px circle at calc(var(--pointer-x) + 10%) calc(var(--pointer-y) - 8%), rgba(118, 242, 212, 0.08), transparent 56%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

html[data-theme='light'] .cursor-spotlight {
  mix-blend-mode: normal;
  opacity: 0.5;
}

.viewport-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.viewport-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(124, 180, 255, 0.4);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 1.8rem;
  padding: 0 0.5rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font: 600 0.8rem/1 var(--font-sans);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  filter: blur(10px);
  transition:
    opacity 720ms cubic-bezier(0.2, 1, 0.22, 1),
    transform 720ms cubic-bezier(0.2, 1, 0.22, 1),
    filter 720ms cubic-bezier(0.2, 1, 0.22, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  filter: none;
}

[data-tilt] {
  position: relative;
  transform: translate3d(0, 0, 0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
  will-change: transform;
}

[data-tilt]::after {
  content: '';
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--tilt-shine-x, 50%) var(--tilt-shine-y, 50%), rgba(255, 255, 255, 0.18), transparent 34%);
  opacity: 0;
  transition: opacity 220ms ease;
}

[data-tilt]:hover,
[data-tilt]:focus-visible {
  transform: translate3d(0, -4px, 0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

[data-tilt]:hover::after,
[data-tilt]:focus-visible::after {
  opacity: 1;
}

.glass-card,
.page-hero,
.hero-panel,
.mobile-nav-panel,
.command-dialog,
.pdf-dialog,
.metric-pill,
.icon-button,
.button,
.filter-chip,
.suggestion-chip,
.architecture-node {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    rgba(10, 18, 35, 0.72);
  border-color: rgba(147, 183, 255, 0.18);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

html[data-theme='light'] .glass-card,
html[data-theme='light'] .page-hero,
html[data-theme='light'] .hero-panel,
html[data-theme='light'] .mobile-nav-panel,
html[data-theme='light'] .command-dialog,
html[data-theme='light'] .pdf-dialog,
html[data-theme='light'] .metric-pill,
html[data-theme='light'] .icon-button,
html[data-theme='light'] .button,
html[data-theme='light'] .filter-chip,
html[data-theme='light'] .suggestion-chip,
html[data-theme='light'] .architecture-node {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.8);
}

.button {
  min-height: 3.15rem;
  padding-inline: 1.2rem;
}

.button-primary {
  background: linear-gradient(135deg, rgba(72, 119, 255, 0.98), rgba(124, 180, 255, 0.98));
  box-shadow: 0 18px 36px rgba(52, 116, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.07);
}

.section-cta {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.5rem;
}

.section-split-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.section-split-head .section-intro {
  margin-bottom: 0;
}

.site-header {
  padding-top: 1rem;
}

.site-header.is-scrolled {
  padding-top: 0.6rem;
}

.header-bar {
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: calc(var(--radius) + 10px);
  background: rgba(8, 12, 24, 0.62);
  border: 1px solid rgba(147, 183, 255, 0.16);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

html[data-theme='light'] .header-bar {
  background: rgba(255, 255, 255, 0.84);
}

.header-brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.header-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.7rem;
  max-width: min(32rem, 100%);
  padding: 0.25rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.3;
}

.command-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.9rem;
  padding: 0.25rem 0.3rem 0.25rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.command-hint:hover,
.command-hint:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.header-resume-cta {
  min-height: 2.9rem;
  padding-inline: 1rem;
}

.mobile-nav-status {
  margin-top: 0.95rem;
}

.mobile-nav-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.brand-badge-shell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
}

.brand-badge-glow {
  position: absolute;
  inset: -0.35rem;
  border-radius: 1rem;
  background: radial-gradient(circle at 30% 30%, rgba(124, 180, 255, 0.45), rgba(118, 242, 212, 0.18), transparent 70%);
  filter: blur(12px);
  opacity: 0.8;
}

.brand-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(124, 180, 255, 0.38), rgba(118, 242, 212, 0.2)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(147, 183, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-weight: 760;
  letter-spacing: -0.06em;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-mark-compact .brand-copy small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 15rem;
}

.hero {
  padding-top: 4.6rem;
  padding-bottom: 3.4rem;
}

.hero-neural-mesh {
  opacity: 0.78;
  mix-blend-mode: screen;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.72) 68%, transparent 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(44px);
  pointer-events: none;
  opacity: 0.45;
}

.hero-orb-a {
  width: 18rem;
  height: 18rem;
  left: -5rem;
  top: 9rem;
  background: rgba(92, 169, 255, 0.24);
}

.hero-orb-b {
  width: 14rem;
  height: 14rem;
  right: 8%;
  top: 18%;
  background: rgba(215, 142, 255, 0.18);
}

.hero-shell {
  gap: 2rem 2.4rem;
  align-items: start;
}

.hero-copy {
  gap: 1.15rem;
  padding-top: clamp(0.5rem, 3vw, 2rem);
}

.hero-prelude {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.6rem;
  padding: 0.25rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.7rem;
  padding: 0.28rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  font-size: 0.88rem;
}

.hero h1 {
  max-width: 11.3ch;
  font-size: clamp(4rem, 7vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-description {
  max-width: 44rem;
  font-size: clamp(1.08rem, 1.25vw, 1.22rem);
}

.hero-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.hero-trust-card {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 1rem 1.05rem;
  min-height: 11rem;
}

.hero-trust-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.1;
}

.hero-trust-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.hero-stats {
  max-width: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-pill {
  min-height: 5.4rem;
}

.hero-visual {
  position: relative;
  gap: 1rem;
}

.hero-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    rgba(7, 14, 28, 0.74);
}

.hero-panel-main {
  min-height: 38rem;
  padding: 1rem;
}

.hero-panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.hero-panel-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-panel-caption {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero-webgl {
  height: 29rem;
  border-radius: calc(var(--radius-lg) - 10px);
}

.hero-floating-cards {
  position: absolute;
  inset: auto 1rem 5.2rem 1rem;
  pointer-events: none;
}

.hero-float-card {
  position: absolute;
  width: min(17rem, 46%);
  padding: 0.9rem 1rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(6, 12, 24, 0.82);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme='light'] .hero-float-card {
  background: rgba(255, 255, 255, 0.9);
}

.hero-float-card-a {
  left: 0;
  bottom: 0;
}

.hero-float-card-b {
  right: 0;
  top: 0;
}

.hero-float-label {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-float-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1rem;
  line-height: 1.15;
}

.hero-float-card p {
  margin: 0.4rem 0 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.hero-panel-code {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.mini-terminal {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.mini-terminal div {
  padding: 0.7rem 0.8rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(147, 183, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.mini-terminal span {
  color: var(--accent-2);
}

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

.hero-mini-card,
.terminal-mini-card,
.chat-sidebar-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.hero-mini-card strong,
.terminal-mini-card strong,
.chat-sidebar-card strong {
  line-height: 1.15;
}

.hero-mini-card p,
.terminal-mini-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-scroll-line {
  display: inline-block;
  width: 4.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.page-hero {
  position: relative;
  margin: calc(var(--header-height) + 1.3rem) auto 0;
  padding: 1rem;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 6px);
}

.page-hero::after {
  content: '';
  position: absolute;
  right: -10%;
  bottom: -25%;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 180, 255, 0.22), transparent 64%);
  filter: blur(24px);
  pointer-events: none;
}

.page-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 1rem;
  align-items: stretch;
}

.page-hero-copy {
  display: grid;
  gap: 1rem;
  padding: clamp(1.4rem, 2vw, 2rem);
}

.page-hero-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: clamp(1.25rem, 1.8vw, 1.6rem);
}

.page-hero-panel h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.06;
}

.page-hero-panel p {
  margin: 0;
  color: var(--text-soft);
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.page-hero-meta span,
.project-visualizer-foot span,
.service-overview-tags span,
.footer-status-row span,
.signal-card-bullets span,
.terminal-chip-row span,
.chat-context-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.82rem;
}

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

.signal-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  min-height: 15rem;
}

.signal-card-default {
  grid-column: span 2;
}

.signal-card-large,
.signal-card-wide {
  grid-column: span 3;
}

.signal-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.signal-card-icon {
  display: inline-grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
  flex: 0 0 auto;
}

.signal-card h3,
.flow-card h3,
.service-overview-card h3,
.signals-summary-card h3,
.flow-summary-card h3,
.project-side-note h3,
.architecture-summary-card h3,
.github-side-note h3,
.research-side-note h3,
.footer-note h3 {
  margin: 0;
  font-size: clamp(1.24rem, 2vw, 1.6rem);
  line-height: 1.08;
}

.signal-card p,
.flow-card p,
.service-overview-card p,
.signals-summary-card p,
.flow-summary-card p,
.project-side-note p,
.architecture-summary-card p,
.github-side-note p,
.research-side-note p,
.footer-note p {
  margin: 0;
  color: var(--text-soft);
}

.flow-summary-card,
.service-overview-card,
.signals-summary-card,
.project-side-note,
.architecture-summary-card,
.github-side-note,
.research-side-note,
.footer-note {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.flow-summary-actions,
.footer-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.flow-card {
  display: grid;
  gap: 0.95rem;
  min-height: 17.5rem;
  padding: 1.2rem;
}

.flow-step {
  display: inline-grid;
  place-items: center;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(124, 180, 255, 0.2), rgba(118, 242, 212, 0.14));
  border: 1px solid rgba(147, 183, 255, 0.22);
  font-weight: 760;
  letter-spacing: -0.04em;
}

.flow-deliverable,
.card-outcome {
  margin-top: auto;
  padding: 0.8rem 0.92rem;
  border-radius: 1rem;
  border: 1px solid rgba(147, 183, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.92rem;
}

.service-overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.service-overview-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.service-card,
.service-card-large,
.post-card,
.research-card,
.publication-card,
.placeholder-card,
.contact-note,
.resume-summary,
.terminal-card,
.feature-project-card,
.testimonial-card,
.project-visualizer-card,
.github-graph-card,
.github-repos-card,
.chat-sidebar,
.chat-shell,
.contact-card {
  padding: clamp(1.1rem, 1.6vw, 1.35rem);
}

.signals-summary-metrics,
.hero-mini-grid,
.terminal-footer-grid,
.chat-sidebar-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.terminal-chip-row,
.project-visualizer-foot,
.footer-status-row,
.chat-context-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.terminal-footer-grid {
  padding-top: 1rem;
}

.project-visualizer-foot {
  margin-top: 1rem;
}

.project-visualizer-card,
.github-graph-card,
.github-repos-card,
.project-side-note {
  min-height: 100%;
}

.architecture-tabs {
  margin-bottom: 1rem;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.chat-context-row {
  padding: 0 1.2rem 1rem;
  border-bottom: 1px solid var(--line);
}

.chat-messages {
  padding: 1.2rem;
  min-height: 26rem;
  max-height: 34rem;
  overflow: auto;
  display: grid;
  gap: 0.9rem;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 1rem 1.2rem 1.2rem;
  border-top: 1px solid var(--line);
}

.chat-form textarea {
  min-height: 3.2rem;
  resize: vertical;
  padding: 0.95rem 1rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.chat-message {
  display: flex;
}

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

.chat-bubble {
  max-width: min(78%, 34rem);
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
}

.chat-message-user .chat-bubble {
  color: white;
  border-color: transparent;
  background: linear-gradient(145deg, rgba(72, 119, 255, 0.98), rgba(124, 180, 255, 0.92));
}

.chat-bubble.is-pending {
  opacity: 0.72;
}

.resume-frame-card {
  overflow: hidden;
}

.footer-shell {
  grid-template-columns: minmax(0, 1fr) auto minmax(320px, 0.92fr);
  gap: 1rem;
  align-items: start;
}

.footer-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.research-preview-grid {
  align-items: stretch;
}

html[data-theme='light'] .hero-panel,
html[data-theme='light'] .page-hero,
html[data-theme='light'] .hero-float-card,
html[data-theme='light'] .header-status-pill,
html[data-theme='light'] .command-hint,
html[data-theme='light'] .hero-chip,
html[data-theme='light'] .hero-availability,
html[data-theme='light'] .page-hero-meta span,
html[data-theme='light'] .project-visualizer-foot span,
html[data-theme='light'] .service-overview-tags span,
html[data-theme='light'] .footer-status-row span,
html[data-theme='light'] .signal-card-bullets span,
html[data-theme='light'] .terminal-chip-row span,
html[data-theme='light'] .chat-context-row span {
  background: rgba(255, 255, 255, 0.78);
}

html[data-motion='reduced'] .cursor-spotlight,
html[data-motion='reduced'] .hero-orb {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-spotlight,
  .hero-orb {
    display: none;
  }
}

@media (max-width: 1180px) {
  .footer-shell,
  .section-split-head,
  .page-hero-grid,
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-trust-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .signal-matrix {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .signal-card-large,
  .signal-card-wide {
    grid-column: span 4;
  }

  .signal-card-default {
    grid-column: span 2;
  }

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

  .hero-panel-main {
    min-height: 34rem;
  }
}

@media (max-width: 960px) {
  .header-status-pill,
  .header-resume-cta {
    display: none;
  }

  .command-hint span {
    display: none;
  }

  .hero-trust-grid,
  .hero-stats,
  .signals-summary-metrics,
  .hero-mini-grid,
  .terminal-footer-grid,
  .chat-sidebar-signal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-floating-cards {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.9rem;
  }

  .hero-float-card {
    position: relative;
    inset: auto;
    width: auto;
  }

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

  .signal-card-large,
  .signal-card-wide {
    grid-column: span 2;
  }

  .signal-card-default {
    grid-column: span 1;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .command-hint {
    display: none;
  }

  .brand-mark-compact .brand-copy small {
    max-width: 9rem;
  }
}

@media (max-width: 640px) {
  .viewport-progress {
    height: 2px;
  }

  .page-hero,
  .shell {
    width: min(var(--max-width), calc(100% - 1rem));
  }

  .header-bar {
    padding-inline: 0.8rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 12vw, 4.8rem);
  }

  .hero-prelude,
  .hero-chip-row,
  .hero-actions,
  .page-hero-actions,
  .flow-summary-actions,
  .footer-note-actions,
  .project-visualizer-foot,
  .mobile-nav-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-trust-grid,
  .hero-stats,
  .signal-matrix,
  .flow-grid,
  .signals-summary-metrics,
  .hero-mini-grid,
  .terminal-footer-grid,
  .chat-sidebar-signal-grid {
    grid-template-columns: 1fr;
  }

  .signal-card-large,
  .signal-card-wide,
  .signal-card-default {
    grid-column: span 1;
  }

  .hero-floating-cards {
    grid-template-columns: 1fr;
  }

  .hero-panel-main {
    min-height: auto;
  }

  .hero-scroll-cue {
    display: none;
  }

  .page-hero-copy,
  .page-hero-panel {
    padding: 1.2rem;
  }

  .chat-context-row {
    padding-inline: 1rem;
  }

  .chat-messages {
    padding: 1rem;
    min-height: 22rem;
  }

  .chat-form {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .mobile-nav-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-visualizer-foot span,
  .service-overview-tags span,
  .footer-status-row span,
  .signal-card-bullets span,
  .terminal-chip-row span,
  .chat-context-row span,
  .page-hero-meta span {
    width: 100%;
    justify-content: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   V3 polish: wider, cleaner, more personal
   ============================== */

:root {
  --max-width: 1460px;
  --header-height: 86px;
}

body {
  background:
    radial-gradient(circle at 10% -10%, rgba(124, 180, 255, 0.16), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(118, 242, 212, 0.1), transparent 24%),
    radial-gradient(circle at 50% 34%, rgba(124, 180, 255, 0.08), transparent 40%),
    linear-gradient(180deg, #050a16 0%, #060b14 36%, #060b14 100%);
}

html[data-theme='light'] body {
  background:
    radial-gradient(circle at 14% -8%, rgba(52, 116, 255, 0.1), transparent 24%),
    radial-gradient(circle at 88% 0%, rgba(11, 185, 154, 0.08), transparent 18%),
    linear-gradient(180deg, #f7f9fc 0%, #f4f7fb 36%, #eef3fa 100%);
}

.site-header {
  z-index: 40;
  padding-top: 1rem;
}

.site-header.is-scrolled {
  padding-top: 0.45rem;
}

.header-bar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 4.6rem;
  padding: 0.72rem 0.84rem;
  border-radius: 999px;
  background: rgba(6, 10, 20, 0.64);
  border-color: rgba(147, 183, 255, 0.13);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

html[data-theme='light'] .header-bar {
  background: rgba(255, 255, 255, 0.86);
}

.desktop-nav {
  display: flex;
  justify-content: center;
}

.desktop-nav-track {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 3.1rem;
  padding: 0.26rem;
  border-radius: 999px;
  border: 1px solid rgba(147, 183, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme='light'] .desktop-nav-track {
  background: rgba(255, 255, 255, 0.72);
}

.nav-link {
  min-height: 2.55rem;
  padding: 0.25rem 0.88rem;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 560;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-link.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
  color: var(--text);
  border: 1px solid rgba(147, 183, 255, 0.18);
}

.brand-badge-shell {
  width: 3rem;
  height: 3rem;
}

.brand-badge-glow {
  inset: -0.45rem;
}

.brand-badge-outline {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-badge-core {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(124, 180, 255, 0.42), rgba(90, 141, 255, 0.18) 52%, rgba(118, 242, 212, 0.16));
  border: 1px solid rgba(147, 183, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-badge-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.08) 28% 29%, transparent 29% 71%, rgba(255, 255, 255, 0.08) 71% 72%, transparent 72%),
    linear-gradient(transparent 0 28%, rgba(255, 255, 255, 0.08) 28% 29%, transparent 29% 71%, rgba(255, 255, 255, 0.08) 71% 72%, transparent 72%);
  opacity: 0.6;
}

.brand-badge-text {
  position: relative;
  z-index: 1;
  font-weight: 760;
  letter-spacing: -0.08em;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-mark-compact .brand-copy small {
  display: block;
  max-width: 18rem;
}

.header-actions {
  gap: 0.6rem;
}

.header-meta-chip,
.header-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.7rem;
  padding: 0.25rem 0.88rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.84rem;
}

.header-inline-link:hover,
.header-inline-link:focus-visible,
.command-hint:hover,
.command-hint:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.command-hint {
  min-height: 2.7rem;
  padding: 0.25rem 0.3rem 0.25rem 0.86rem;
}

.header-resume-cta {
  min-height: 2.7rem;
  padding-inline: 1rem;
}

.hero {
  padding-top: 4.2rem;
  padding-bottom: 4rem;
}

.hero-shell {
  grid-template-columns: minmax(0, 1.08fr) minmax(460px, 0.92fr);
  gap: 2.1rem;
  align-items: start;
}

.hero-copy {
  gap: 1.25rem;
  padding-top: clamp(0.7rem, 2vw, 1.8rem);
}

.hero h1 {
  max-width: 11.8ch;
  font-size: clamp(3.8rem, 6.6vw, 6.9rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero-highlight {
  display: inline-block;
  color: transparent;
  background: linear-gradient(135deg, var(--text), rgba(124, 180, 255, 0.92) 36%, rgba(118, 242, 212, 0.92) 78%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-description {
  max-width: 42rem;
  font-size: clamp(1.03rem, 1.1vw, 1.18rem);
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.hero-role-label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-trust-card {
  min-height: auto;
  padding: 1rem;
}

.hero-trust-card h3 {
  font-size: 1rem;
}

.hero-trust-card p {
  font-size: 0.9rem;
}

.hero-visual {
  gap: 1rem;
}

.hero-panel {
  border-radius: calc(var(--radius-lg) + 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(7, 14, 28, 0.72);
}

.hero-panel-main {
  min-height: 0;
  padding: 1.1rem;
}

.hero-stage-copy {
  margin: 0 0 0.95rem;
  color: var(--text-soft);
  font-size: 0.97rem;
}

.hero-stage {
  position: relative;
}

.hero-webgl {
  height: 31rem;
  border-radius: 1.6rem;
}

.hero-stage-overlay {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: end;
  pointer-events: none;
}

.hero-stage-window,
.hero-stage-actions {
  display: grid;
  gap: 0.4rem;
  padding: 0.8rem 0.9rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(147, 183, 255, 0.18);
  background: rgba(6, 12, 24, 0.76);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-stage-window strong {
  font-size: 0.92rem;
}

.hero-stage-window span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.hero-stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-stage-actions span,
.background-toolkit-row span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.78rem;
}

.hero-panel-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.hero-panel-footer span {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.8rem;
}

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

.hero-mini-card {
  min-height: 100%;
}

.personal-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 1rem;
  align-items: stretch;
}

.signature-card,
.signature-project-card,
.background-panel,
.skills-cluster-card,
.working-style-panel {
  padding: 1.25rem;
}

.signature-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1rem;
}

.signature-badge,
.signature-location {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.3rem;
  padding: 0.22rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.signature-card h3,
.signature-project-card h3,
.background-panel h3,
.skills-cluster-card h3,
.working-style-panel h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.06;
}

.signature-card p,
.signature-project-card p,
.background-panel p,
.skills-cluster-card p,
.working-style-card p {
  margin: 0;
  color: var(--text-soft);
}

.signature-card {
  display: grid;
  gap: 1rem;
}

.signature-role-row,
.signature-focus-grid,
.signature-actions,
.signature-project-actions,
.chat-prompt-list,
.copilot-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.signature-role-row span,
.signature-focus-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.82rem;
}

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

.signature-focus-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0.2rem rgba(118, 242, 212, 0.14);
}

.signature-project-stack {
  display: grid;
  gap: 1rem;
}

.signature-project-metric {
  min-width: 8.5rem;
}

.background-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.94fr) minmax(0, 1.06fr);
  gap: 1rem;
}

.background-panel,
.working-style-panel {
  display: grid;
  gap: 1rem;
}

.background-entry-list {
  display: grid;
  gap: 0.75rem;
}

.background-entry {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.background-entry-restore {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.06);
}

.background-entry-label,
.working-style-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 1.9rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.background-entry strong {
  display: block;
  margin-top: 0.5rem;
  line-height: 1.2;
}

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

.skills-cluster-card,
.working-style-card {
  display: grid;
  gap: 1rem;
}

.skills-chip-list {
  gap: 0.55rem;
}

.working-style-card {
  padding: 1rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.chat-bubble {
  white-space: pre-wrap;
}

.chat-message-meta {
  display: grid;
  gap: 0.6rem;
  width: min(78%, 34rem);
  margin-top: 0.55rem;
}

.chat-message-user .chat-message-meta {
  margin-left: auto;
}

.message-provider,
.source-chip,
.message-action {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.18rem 0.66rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.76rem;
}

.source-chip-row,
.message-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.message-provider {
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.message-action {
  background: rgba(124, 180, 255, 0.08);
  color: var(--text);
}

.copilot-root {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: 0.8rem;
}

.copilot-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  min-height: 4rem;
  padding: 0.42rem 1rem 0.42rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(147, 183, 255, 0.2);
  background: rgba(8, 14, 28, 0.8);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.copilot-launch-icon {
  display: inline-grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(124, 180, 255, 0.26), rgba(118, 242, 212, 0.16));
  border: 1px solid rgba(147, 183, 255, 0.22);
}

.copilot-launch-copy {
  display: grid;
  text-align: left;
}

.copilot-launch-copy strong {
  line-height: 1.1;
}

.copilot-launch-copy small {
  color: var(--text-muted);
}

.copilot-dock {
  width: min(27rem, calc(100vw - 1.5rem));
  max-height: min(76vh, 52rem);
  padding: 1rem;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.copilot-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.copilot-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.copilot-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.copilot-head-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.16rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.76rem;
}

.copilot-context-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.95rem 0 0.2rem;
}

.copilot-context-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.76rem;
}

.copilot-prompt-row {
  padding: 0.85rem 0 0.2rem;
}

.copilot-messages {
  min-height: 14rem;
  overflow: auto;
  padding: 0.65rem 0.05rem 0.2rem;
  display: grid;
  gap: 0.9rem;
}

.copilot-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  padding-top: 0.8rem;
}

.copilot-form textarea {
  min-height: 3rem;
  resize: none;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme='light'] .header-meta-chip,
html[data-theme='light'] .header-inline-link,
html[data-theme='light'] .desktop-nav-track,
html[data-theme='light'] .signature-badge,
html[data-theme='light'] .signature-location,
html[data-theme='light'] .signature-role-row span,
html[data-theme='light'] .signature-focus-item,
html[data-theme='light'] .background-entry,
html[data-theme='light'] .working-style-card,
html[data-theme='light'] .message-provider,
html[data-theme='light'] .source-chip,
html[data-theme='light'] .message-action,
html[data-theme='light'] .copilot-launch,
html[data-theme='light'] .copilot-head-link,
html[data-theme='light'] .copilot-context-row span,
html[data-theme='light'] .hero-stage-window,
html[data-theme='light'] .hero-stage-actions {
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1240px) {
  .hero-shell,
  .personal-profile-grid,
  .background-layout,
  .section-split-head {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-visual {
    order: 2;
  }

  .hero-stage-overlay {
    position: static;
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }

  .header-meta-chip,
  .header-inline-link {
    display: none;
  }

  .hero-stats,
  .hero-trust-grid,
  .signature-focus-grid,
  .skills-cluster-grid,
  .working-style-grid,
  .hero-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .brand-mark-compact .brand-copy small,
  .command-hint span,
  .command-hint kbd,
  .header-resume-cta {
    display: none;
  }

  .copilot-root {
    left: 0.8rem;
    right: 0.8rem;
    justify-items: stretch;
  }

  .copilot-launch {
    justify-content: center;
  }

  .copilot-dock {
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --max-width: 100%;
  }

  .header-bar {
    border-radius: 1.6rem;
    padding: 0.7rem 0.75rem;
  }

  .hero {
    padding-top: 3.3rem;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 13vw, 4.5rem);
  }

  .hero-stats,
  .hero-trust-grid,
  .signature-focus-grid,
  .skills-cluster-grid,
  .working-style-grid,
  .hero-visual-grid {
    grid-template-columns: 1fr;
  }

  .signature-topline,
  .copilot-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .signature-topline {
    display: grid;
  }

  .copilot-dock {
    max-height: min(78vh, 40rem);
  }

  .source-chip-row,
  .message-action-row,
  .copilot-context-row,
  .copilot-prompt-row,
  .signature-actions,
  .signature-role-row,
  .hero-chip-row,
  .hero-actions,
  .hero-panel-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stage-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1080px) {
  .mobile-menu-button {
    display: inline-flex;
  }
}


/* ===== V4 visual + layout overrides ===== */
:root {
  --bg: #03040d;
  --bg-alt: #060915;
  --bg-soft: rgba(8, 12, 24, 0.72);
  --surface: rgba(10, 13, 27, 0.64);
  --surface-strong: rgba(14, 18, 36, 0.86);
  --surface-solid: #0b1020;
  --surface-light: rgba(255, 255, 255, 0.06);
  --line: rgba(145, 161, 255, 0.14);
  --line-strong: rgba(142, 243, 255, 0.28);
  --text: #f8f9ff;
  --text-soft: rgba(232, 237, 255, 0.8);
  --text-muted: rgba(206, 216, 248, 0.58);
  --shadow: 0 40px 120px rgba(1, 4, 12, 0.42);
  --shadow-soft: 0 18px 48px rgba(1, 4, 12, 0.26);
  --accent: #8ef3ff;
  --accent-strong: #7b7dff;
  --accent-2: #b18bff;
  --accent-3: #ff78c9;
  --accent-wash: rgba(142, 243, 255, 0.11);
  --success: #73f1bb;
  --radius: 26px;
  --radius-lg: 34px;
  --max-width: 1460px;
  --header-height: 76px;
}

html[data-theme='light'] {
  --bg: #eef3ff;
  --bg-alt: #ffffff;
  --bg-soft: rgba(255, 255, 255, 0.84);
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-light: rgba(85, 108, 180, 0.08);
  --line: rgba(88, 112, 214, 0.14);
  --line-strong: rgba(71, 208, 233, 0.22);
  --text: #0f1731;
  --text-soft: rgba(15, 23, 49, 0.78);
  --text-muted: rgba(15, 23, 49, 0.54);
  --shadow: 0 28px 70px rgba(42, 58, 115, 0.14);
  --shadow-soft: 0 16px 36px rgba(42, 58, 115, 0.1);
  --accent: #2dcde8;
  --accent-strong: #5d6fff;
  --accent-2: #8a5dff;
  --accent-3: #ea5ab2;
  --accent-wash: rgba(45, 205, 232, 0.09);
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(142, 243, 255, 0.16), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(177, 139, 255, 0.18), transparent 30%),
    radial-gradient(circle at 74% 72%, rgba(255, 120, 201, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg-alt) 0%, #050813 48%, var(--bg) 100%);
}

html[data-theme='light'] body {
  background:
    radial-gradient(circle at 12% -8%, rgba(45, 205, 232, 0.13), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(138, 93, 255, 0.1), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 40%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 52%, transparent 100%);
}

.shell {
  width: min(var(--max-width), calc(100% - 2.25rem));
}

.section {
  padding: clamp(4.75rem, 8vw, 7rem) 0;
}

.section-split-head,
.projects-layout,
.background-layout,
.personal-profile-grid,
.contact-shell,
.page-hero-grid {
  gap: 1rem;
  align-items: start;
}

.glass-card,
.hero-panel,
.page-hero,
.header-bar,
.mobile-nav-panel,
.copilot-dock {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(8, 11, 24, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
}

html[data-theme='light'] .glass-card,
html[data-theme='light'] .hero-panel,
html[data-theme='light'] .page-hero,
html[data-theme='light'] .header-bar,
html[data-theme='light'] .mobile-nav-panel,
html[data-theme='light'] .copilot-dock {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.85);
}

.glass-card::before,
.hero-panel::before,
.page-hero::before,
.header-bar::before,
.mobile-nav-panel::before,
.copilot-dock::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 0% 0%, rgba(142, 243, 255, 0.12), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(177, 139, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%);
}

.button {
  border-radius: 999px;
  min-height: 2.8rem;
  padding-inline: 1rem;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, rgba(142, 243, 255, 0.18), rgba(123, 125, 255, 0.24));
  border-color: rgba(142, 243, 255, 0.26);
  box-shadow: 0 14px 30px rgba(83, 118, 255, 0.18);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
}

.icon-button,
.command-hint {
  min-height: 2.8rem;
  border-radius: 999px;
}

.site-header {
  padding-top: 0.75rem;
}

.site-header.is-scrolled {
  padding-top: 0.45rem;
}

.header-shell {
  position: relative;
}

.header-bar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  min-height: var(--header-height);
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
}

.brand-link {
  min-width: 0;
}

.brand-mark {
  gap: 0.75rem;
  min-width: 0;
}

.brand-emblem {
  width: 2.85rem;
  height: 2.85rem;
  flex: 0 0 auto;
  border-radius: 1rem;
  box-shadow: 0 14px 30px rgba(5, 8, 20, 0.28);
}

.brand-emblem-svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.brand-copy small {
  color: var(--text-muted);
  font-size: 0.73rem;
  white-space: nowrap;
}

.desktop-nav {
  min-width: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.desktop-nav-track {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: max-content;
  max-width: 100%;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav-track::-webkit-scrollbar {
  display: none;
}

.nav-link {
  min-height: 2.5rem;
  padding: 0.15rem 0.8rem;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.nav-link.is-active {
  border: 1px solid rgba(142, 243, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(123, 125, 255, 0.12);
}

.header-actions {
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.header-chat-cta,
.header-resume-cta {
  white-space: nowrap;
}

.header-chat-cta .icon {
  width: 1rem;
  height: 1rem;
}

.mobile-menu-button {
  display: none;
}

.mobile-nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.65rem);
  width: min(27rem, 100%);
  padding: 1rem;
  border-radius: 1.6rem;
}

.mobile-nav-link {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
}

.hero {
  min-height: auto;
  padding: clamp(4.2rem, 8vw, 6.8rem) 0 3rem;
}

.hero-shell {
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  align-items: start;
  gap: 1rem;
  min-height: auto;
}

.hero-copy {
  gap: 1.1rem;
}

.hero h1 {
  max-width: 11.1ch;
  font-size: clamp(3.9rem, 6.9vw, 7.25rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 34%, var(--accent-2) 72%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 42px rgba(142, 243, 255, 0.18);
}

.hero-description {
  max-width: 48rem;
  font-size: clamp(1.08rem, 1.2vw, 1.2rem);
}

.hero-availability,
.hero-chip,
.hero-meta-chip,
.hero-panel-live,
.hero-panel-footer span,
.hero-stage-metric,
.signature-badge,
.signature-location,
.signature-role-row span,
.hero-proof-period {
  border-radius: 999px;
}

.hero-availability,
.hero-chip,
.hero-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.55rem;
  padding: 0.25rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-pill {
  min-height: 5.5rem;
}

.hero-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.hero-proof-card {
  display: grid;
  gap: 0.55rem;
  min-height: 15rem;
  padding: 1rem;
}

.hero-proof-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.08;
}

.hero-proof-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.hero-proof-period {
  align-self: end;
  justify-self: start;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-visual {
  display: grid;
  gap: 1rem;
}

.hero-panel-main {
  min-height: auto;
  padding: 1rem;
}

.hero-stage-copy {
  margin: 0 0 0.85rem;
  color: var(--text-soft);
  max-width: 60ch;
}

.hero-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 0.85rem;
  align-items: stretch;
}

.hero-webgl {
  height: 29rem;
  border-radius: 24px;
}

.hero-stage-rail {
  display: grid;
  gap: 0.75rem;
}

.hero-stage-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding: 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stage-card strong {
  line-height: 1.1;
  font-size: 1.02rem;
}

.hero-stage-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.hero-stage-metric {
  justify-self: start;
  padding: 0.32rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  font-size: 0.78rem;
}

.hero-panel-footer {
  margin-top: 0.85rem;
  gap: 0.55rem;
}

.hero-panel-footer span {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.81rem;
}

.personal-profile-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
  gap: 1rem;
  align-items: start;
}

.profile-rail {
  display: grid;
  gap: 1rem;
}

.signature-card,
.background-panel,
.working-style-panel,
.project-visualizer-card,
.contact-card,
.contact-note,
.personal-side-note,
.background-side-note,
.project-side-note,
.research-side-note,
.experience-highlight-card,
.signature-project-card,
.hero-proof-card,
.skills-cluster-card,
.feature-project-card {
  padding: clamp(1.05rem, 1.6vw, 1.3rem);
}

.signature-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.signature-badge,
.signature-location,
.signature-role-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.signature-card h3,
.experience-highlight-card h3,
.signature-project-card h3,
.skills-cluster-card h3 {
  margin: 0;
  line-height: 1.08;
}

.signature-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.signature-focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.signature-focus-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.signature-focus-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(142, 243, 255, 0.4);
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

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

.experience-highlight-org {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

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

.background-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  gap: 1rem;
}

.background-entry-list {
  display: grid;
  gap: 0.75rem;
}

.background-entry {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.background-entry strong {
  display: block;
  margin-top: 0.2rem;
  line-height: 1.16;
}

.background-entry p {
  margin: 0.45rem 0 0;
}

.background-entry-label {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.skills-cluster-card {
  min-height: 100%;
  display: grid;
  gap: 0.85rem;
}

.skills-cluster-card h3 {
  font-size: 1rem;
  color: var(--text-soft);
}

.working-style-panel {
  margin-top: 1rem;
}

.working-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.working-style-card {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-height: 100%;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.working-style-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(142, 243, 255, 0.06);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 1rem;
  align-items: start;
}

.project-visualizer-card {
  overflow: hidden;
}

.project-webgl-canvas {
  height: 35rem;
}

.project-card-stack {
  display: grid;
  gap: 1rem;
}

.feature-project-card {
  min-height: 0;
}

.feature-project-card h3 {
  margin: 0;
}

.project-detail {
  color: var(--text-soft);
}

.signal-matrix,
.research-preview-grid,
.contact-side,
.testimonials-grid,
.services-preview-grid,
.posts-grid,
.publication-grid {
  align-items: stretch;
}

.signal-card,
.research-card,
.post-card,
.service-card,
.testimonial-card,
.contact-note {
  min-height: 100%;
}

.page-hero {
  width: min(var(--max-width), calc(100% - 2.25rem));
  margin-top: calc(var(--header-height) + 1.15rem);
  padding: 1rem;
  border-radius: calc(var(--radius-lg) + 4px);
}

.page-hero-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: stretch;
}

.page-hero-copy,
.page-hero-panel {
  padding: clamp(1.25rem, 2vw, 1.6rem);
}

.page-hero h1 {
  max-width: 12ch;
}

.chat-console-layout,
.resume-layout,
.github-layout {
  align-items: start;
}

.copilot-root {
  z-index: 35;
}

.copilot-launch {
  box-shadow: 0 18px 42px rgba(4, 8, 18, 0.28);
}

.copilot-dock {
  width: min(28rem, calc(100vw - 1.5rem));
  border-radius: 1.4rem;
}

[data-tilt]:hover,
[data-tilt]:focus-visible {
  transform: translate3d(0, 0, 0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(1.005);
}

@media (max-width: 1360px) {
  .hero-shell,
  .page-hero-grid,
  .projects-layout,
  .background-layout,
  .personal-profile-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1 {
    max-width: none;
  }

  .hero-stage-grid {
    grid-template-columns: 1fr;
  }

  .project-webgl-canvas {
    height: 30rem;
  }
}

@media (max-width: 1240px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .header-chat-cta,
  .command-hint span {
    display: none;
  }

  .hero-stats,
  .hero-proof-grid,
  .experience-highlight-grid,
  .signature-project-stack,
  .working-style-grid {
    grid-template-columns: 1fr 1fr;
  }

  .skills-cluster-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .header-resume-cta {
    display: none;
  }

  .hero-stats,
  .hero-proof-grid,
  .experience-highlight-grid,
  .signature-project-stack,
  .skills-cluster-grid,
  .working-style-grid,
  .signature-focus-grid {
    grid-template-columns: 1fr;
  }

  .hero-webgl,
  .project-webgl-canvas {
    height: 24rem;
  }
}

@media (max-width: 640px) {
  .shell,
  .page-hero {
    width: min(var(--max-width), calc(100% - 1rem));
  }

  .header-bar {
    padding: 0.7rem 0.8rem;
  }

  .brand-copy {
    display: none;
  }

  .command-hint {
    display: none;
  }

  .hero {
    padding-top: 3.8rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.85rem);
  }

  .hero-chip-row,
  .hero-actions,
  .hero-meta-row,
  .page-hero-actions,
  .research-actions,
  .signature-actions,
  .mobile-nav-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-scroll-cue {
    display: none;
  }
}

/* === V5 UI hardening overrides === */
:root {
  --bg: #03050c;
  --bg-alt: #050913;
  --bg-soft: rgba(8, 13, 25, 0.76);
  --surface: rgba(10, 15, 30, 0.74);
  --surface-strong: rgba(13, 19, 38, 0.9);
  --surface-solid: #0a0f1d;
  --surface-light: rgba(255, 255, 255, 0.05);
  --line: rgba(126, 240, 255, 0.12);
  --line-strong: rgba(143, 124, 255, 0.26);
  --text: #f6fbff;
  --text-soft: rgba(229, 239, 255, 0.8);
  --text-muted: rgba(196, 210, 232, 0.62);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);
  --accent: #7ef0ff;
  --accent-strong: #57d8ff;
  --accent-2: #8f7cff;
  --accent-3: #ff58c8;
  --accent-wash: rgba(126, 240, 255, 0.1);
  --max-width: 1380px;
  --header-height: 76px;
}

html[data-theme='light'] {
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --bg-soft: rgba(255, 255, 255, 0.86);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-light: rgba(88, 108, 255, 0.06);
  --line: rgba(86, 132, 255, 0.14);
  --line-strong: rgba(160, 103, 255, 0.22);
  --text: #08101e;
  --text-soft: rgba(8, 16, 30, 0.78);
  --text-muted: rgba(8, 16, 30, 0.56);
  --shadow: 0 24px 60px rgba(28, 41, 70, 0.14);
  --shadow-soft: 0 14px 32px rgba(28, 41, 70, 0.09);
  --accent: #20bff0;
  --accent-strong: #177ff0;
  --accent-2: #7f62ff;
  --accent-3: #ff5fa5;
  --accent-wash: rgba(32, 191, 240, 0.08);
}

body {
  background:
    radial-gradient(circle at 16% -8%, rgba(126, 240, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% -12%, rgba(143, 124, 255, 0.2), transparent 30%),
    radial-gradient(circle at 50% 40%, rgba(255, 88, 200, 0.08), transparent 42%),
    linear-gradient(180deg, #05070f 0%, #040713 36%, #03050c 100%);
}

html[data-theme='light'] body {
  background:
    radial-gradient(circle at 16% -8%, rgba(32, 191, 240, 0.08), transparent 24%),
    radial-gradient(circle at 86% -6%, rgba(127, 98, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 40%, #eef3fa 100%);
}

body::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(126, 240, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 16%);
  opacity: 0.96;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
  opacity: 0.32;
}

html[data-theme='light'] body::after {
  opacity: 0.14;
}

.shell {
  width: min(var(--max-width), calc(100% - 1.5rem));
}

.glass-card,
.metric-pill,
.page-hero,
.header-bar,
.mobile-nav-panel,
.copilot-dock,
.hero-stage-card,
.metric-card,
.repo-row,
.working-style-card,
.signature-focus-item,
.background-entry {
  background: linear-gradient(180deg, rgba(10, 15, 30, 0.82), rgba(8, 12, 24, 0.7));
  border-color: rgba(126, 240, 255, 0.1);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme='light'] .glass-card,
html[data-theme='light'] .metric-pill,
html[data-theme='light'] .page-hero,
html[data-theme='light'] .header-bar,
html[data-theme='light'] .mobile-nav-panel,
html[data-theme='light'] .copilot-dock,
html[data-theme='light'] .hero-stage-card,
html[data-theme='light'] .metric-card,
html[data-theme='light'] .repo-row,
html[data-theme='light'] .working-style-card,
html[data-theme='light'] .signature-focus-item,
html[data-theme='light'] .background-entry {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.72));
}

.hero h1,
.page-hero h1,
.section-intro h2,
.hero-panel-head h2,
.github-graph-card h3,
.github-repos-card h3,
.metric-card strong,
.feature-project-card h3,
.publication-card h3 {
  text-wrap: balance;
}

.site-header {
  padding-top: 0.9rem;
}

.site-header.is-scrolled {
  padding-top: 0.45rem;
}

.header-bar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.55rem;
  padding: 0.55rem 0.75rem 0.55rem 0.9rem;
  border-radius: 1.55rem;
  overflow: visible;
}

.brand-link {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  gap: 0.65rem;
  min-width: 0;
}

.brand-emblem {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.95rem;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(126, 240, 255, 0.12);
}

.brand-copy strong {
  font-size: 0.95rem;
}

.brand-copy small {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-nav {
  min-width: 0;
  display: flex !important;
  justify-content: center;
  overflow: hidden;
}

.desktop-nav-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.18rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.24rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}

.desktop-nav-track::-webkit-scrollbar {
  display: none;
}

.nav-link {
  flex: 0 0 auto;
  min-height: 2.35rem;
  padding: 0 0.72rem;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 560;
  color: var(--text-muted);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border-color: rgba(126, 240, 255, 0.16);
}

.header-actions,
.header-cta-group,
.header-icon-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.header-actions {
  flex-wrap: nowrap;
}

.command-hint,
.header-chat-cta,
.header-resume-cta,
.icon-button {
  min-height: 2.45rem;
}

.command-hint {
  gap: 0.45rem;
  padding-inline: 0.68rem 0.58rem;
}

.command-hint-label {
  display: inline-flex;
}

.command-hint kbd {
  padding: 0 0.42rem;
  min-width: auto;
  font-size: 0.72rem;
}

.header-chat-cta,
.header-resume-cta {
  padding-inline: 0.85rem;
}

.header-chat-cta .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.icon-button {
  width: 2.45rem;
  height: 2.45rem;
}

.mobile-nav-panel {
  right: 0;
  top: calc(100% + 0.7rem);
  width: min(24rem, calc(100vw - 1rem));
  padding: 1rem;
  border-radius: 1.45rem;
}

.hero {
  padding: clamp(6rem, 10vw, 8.3rem) 0 3.5rem;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(440px, 0.9fr);
  align-items: start;
  gap: 1.25rem;
}

.hero-copy {
  gap: 1.15rem;
}

.hero-prelude {
  display: grid;
  gap: 0.7rem;
}

.hero h1 {
  max-width: 8.25ch;
  font-size: clamp(3.85rem, 7vw, 6.6rem);
  line-height: 0.93;
  letter-spacing: -0.065em;
}

.hero-highlight {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 30%, var(--accent-2) 64%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 42px rgba(126, 240, 255, 0.15);
}

.hero-description {
  max-width: 44rem;
  font-size: clamp(1.05rem, 1.24vw, 1.16rem);
}

.hero-chip-row,
.hero-actions,
.hero-meta-row,
.hero-panel-footer,
.hero-stage-actions,
.background-toolkit-row,
.skills-chip-list,
.experience-highlight-stack,
.signal-card-bullets,
.source-chip-row,
.message-action-row,
.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-availability,
.hero-chip,
.hero-meta-chip,
.hero-stage-metric,
.hero-stage-actions span,
.background-toolkit-row span,
.skills-chip-list span,
.experience-highlight-stack span,
.signal-card-bullets span,
.source-chip,
.message-provider,
.message-action,
.repo-meta span,
.hero-panel-footer span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 240, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.78rem;
}

.hero-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-pill {
  min-height: 5.15rem;
}

.hero-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.hero-proof-card {
  min-height: 14.5rem;
}

.hero-proof-card h3 {
  font-size: 1rem;
}

.hero-visual {
  display: grid;
  gap: 1rem;
  min-width: 0;
  align-self: stretch;
}

.hero-panel-main {
  padding: 1.05rem;
  border-radius: 1.75rem;
}

.hero-panel-topline,
.graph-head,
.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-panel-head {
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.hero-panel-head h2 {
  font-size: clamp(1.45rem, 2.3vw, 1.95rem) !important;
}

.hero-panel-caption {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-stage-copy {
  margin: 0 0 0.9rem;
  max-width: none;
  font-size: 0.96rem;
}

.hero-stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.hero-stage-canvas-shell {
  position: relative;
  min-width: 0;
}

.hero-webgl {
  width: 100%;
  height: 24rem;
  border-radius: 1.45rem;
  border: 1px solid rgba(126, 240, 255, 0.1);
  background:
    radial-gradient(circle at 50% 12%, rgba(143, 124, 255, 0.18), transparent 26%),
    radial-gradient(circle at 75% 78%, rgba(255, 88, 200, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(7, 12, 24, 0.68), rgba(7, 12, 24, 0.94));
}

.hero-stage-window {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.78rem 0.9rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 12, 24, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.hero-stage-window strong {
  display: block;
  font-size: 0.95rem;
}

.hero-stage-window span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.hero-stage-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-stage-card {
  align-content: start;
  min-height: 100%;
  padding: 1rem;
  border-radius: 1.15rem;
}

.hero-stage-card strong {
  font-size: 0.98rem;
  line-height: 1.12;
}

.hero-stage-card p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
}

.hero-panel-footer {
  margin-top: 0.9rem;
}

.page-hero {
  width: min(var(--max-width), calc(100% - 1.5rem));
}

.github-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 1rem;
  align-items: start;
}

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

.metric-card {
  display: grid;
  gap: 0.55rem;
  min-height: 11rem;
  padding: 1rem;
}

.metric-card strong {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.metric-card span {
  color: var(--text-soft);
}

.github-graph-card,
.github-repos-card,
.github-side-note {
  padding: 1rem;
}

.github-graph-card h3,
.github-repos-card h3,
.github-side-note h3 {
  font-size: clamp(1.22rem, 2vw, 1.6rem) !important;
  line-height: 1.05;
}

.graph-head {
  margin-bottom: 0.9rem;
}

.graph-stage {
  min-height: 23rem;
  overflow: hidden;
}

.repo-list {
  display: grid;
  gap: 0.75rem;
}

.repo-row {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem;
  border-radius: 1rem;
}

.repo-row strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.repo-row p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

.repo-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.background-toolkit-row,
.skills-chip-list,
.experience-highlight-stack,
.signal-card-bullets,
.page-hero-meta,
.copilot-prompt-row,
.chat-prompt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

[data-tilt]:hover,
[data-tilt]:focus-visible {
  transform: translate3d(0, 0, 0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(1.002);
}

@media (max-width: 1480px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.88fr);
  }

  .hero h1 {
    font-size: clamp(3.6rem, 6vw, 5.9rem);
  }
}

@media (max-width: 1360px) {
  .hero-shell,
  .page-hero-grid,
  .projects-layout,
  .background-layout,
  .personal-profile-grid,
  .github-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage-rail,
  .hero-proof-grid,
  .experience-highlight-grid,
  .signature-project-stack,
  .working-style-grid,
  .skills-cluster-grid,
  .hero-stats,
  .github-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-webgl,
  .project-webgl-canvas {
    height: 22.5rem;
  }
}

@media (max-width: 1320px) {
  .desktop-nav {
    display: none !important;
  }

  .mobile-menu-button {
    display: inline-flex !important;
  }

  .command-hint {
    display: none;
  }

  .header-chat-cta {
    display: none;
  }
}

@media (max-width: 1040px) {
  .hero-stage-rail,
  .hero-proof-grid,
  .experience-highlight-grid,
  .signature-project-stack,
  .working-style-grid,
  .skills-cluster-grid,
  .hero-stats,
  .github-metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero-webgl,
  .project-webgl-canvas,
  .graph-stage {
    height: 21rem;
  }
}

@media (max-width: 920px) {
  .header-resume-cta {
    display: none;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    padding-top: 5.35rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(3.25rem, 12vw, 4.95rem);
  }

  .hero-stage-window {
    position: static;
    margin-top: 0.75rem;
  }
}

@media (max-width: 640px) {
  .shell,
  .page-hero {
    width: min(var(--max-width), calc(100% - 1rem));
  }

  .header-bar {
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    padding: 0.5rem 0.55rem 0.5rem 0.7rem;
  }

  .brand-copy {
    display: none;
  }

  .hero,
  .section {
    padding-top: max(4rem, env(safe-area-inset-top));
  }

  .hero-chip-row,
  .hero-actions,
  .hero-meta-row,
  .page-hero-actions,
  .research-actions,
  .signature-actions,
  .mobile-nav-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-scroll-cue {
    display: none;
  }
}



/* ===== V6 FINAL OVERRIDES ===== */

:root {
  --bg: #080705;
  --bg-alt: #12100c;
  --surface: rgba(17, 15, 11, 0.86);
  --surface-2: rgba(24, 20, 13, 0.9);
  --surface-3: rgba(31, 26, 18, 0.94);
  --border: rgba(255, 220, 116, 0.16);
  --border-strong: rgba(255, 226, 139, 0.28);
  --text: #f8f3e4;
  --muted: #c3b8a0;
  --accent: #ffd451;
  --accent-strong: #fff2b0;
  --accent-2: #ffb24b;
  --accent-3: #ffe183;
  --accent-wash: rgba(255, 212, 81, 0.11);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.34);
}

html[data-theme='light'] {
  --bg: #f5efe2;
  --bg-alt: #fff8ee;
  --surface: rgba(255, 248, 234, 0.9);
  --surface-2: rgba(255, 251, 242, 0.95);
  --surface-3: rgba(255, 255, 255, 0.98);
  --border: rgba(116, 86, 13, 0.14);
  --border-strong: rgba(116, 86, 13, 0.24);
  --text: #201910;
  --muted: #5f5039;
  --accent: #b37a00;
  --accent-strong: #8b6000;
  --accent-2: #d48d12;
  --accent-3: #f0b84a;
  --accent-wash: rgba(204, 145, 31, 0.08);
}

body {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 214, 84, 0.12), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(255, 166, 72, 0.1), transparent 25%),
    radial-gradient(circle at 74% 66%, rgba(255, 230, 134, 0.08), transparent 32%),
    linear-gradient(180deg, #060504 0%, #090806 32%, #0b0906 100%);
  color: var(--text);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent 14.5%, rgba(255, 211, 92, 0.024) 22%, transparent 29%, transparent 100%),
    linear-gradient(90deg, transparent 0, transparent 63%, rgba(255, 176, 75, 0.026) 74%, transparent 82%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.shell {
  width: min(1480px, calc(100vw - 48px));
}

.glass-card,
.feature-project-card,
.signature-project-card,
.publication-card,
.skills-cluster-card,
.metric-card,
.repo-card,
.archive-project-card,
.award-card,
.contact-form-card {
  min-width: 0;
  overflow: hidden;
}

.glass-card h1,
.glass-card h2,
.glass-card h3,
.glass-card p,
.archive-project-card h3,
.archive-project-card p,
.featured-project-card h3,
.featured-project-card p,
.repo-list * {
  overflow-wrap: anywhere;
}

.project-tags,
.page-hero-meta,
.hero-chip-row,
.hero-link-row,
.hero-panel-footer,
.skills-chip-list,
.signal-card-bullets,
.experience-highlight-stack,
.research-topline,
.publication-filters,
.contact-note-links,
.contact-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge,
.hero-chip,
.hero-meta-chip,
.hero-stage-metric,
.hero-panel-footer span,
.project-tags span,
.skills-chip-list span,
.signal-card-bullets span,
.page-hero-meta span,
.contact-note-links a {
  white-space: normal;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 40;
  padding-top: 0;
}

.site-header.is-scrolled {
  top: 12px;
}

.header-shell {
  position: relative;
}

.header-bar,
.mobile-nav-panel,
.desktop-nav-track,
.command-hint,
.hero-stage-card,
.hero-meta-chip,
.hero-chip,
.featured-project-card,
.archive-project-card,
.contact-form-card,
.contact-note,
.award-card {
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}

.header-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(17, 14, 10, 0.92), rgba(13, 12, 9, 0.88));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.brand-link {
  min-width: 0;
}

.brand-mark {
  gap: 12px;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.brand-copy strong {
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.brand-copy small {
  color: var(--muted);
}

.desktop-nav {
  min-width: 0;
}

.desktop-nav-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 216, 81, 0.05);
  border: 1px solid rgba(255, 216, 81, 0.09);
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav-track::-webkit-scrollbar {
  display: none;
}

.nav-link {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: rgba(255, 216, 81, 0.08);
  border-color: rgba(255, 216, 81, 0.12);
}

.nav-link.is-active {
  color: #111;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 245, 204, 0.42);
  box-shadow: 0 10px 24px rgba(255, 187, 52, 0.22);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.command-hint.command-hint-compact {
  flex: 0 0 auto;
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(255, 216, 81, 0.05);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.command-hint.command-hint-compact kbd {
  font-size: 0.74rem;
  opacity: 0.7;
}

.header-chat-cta,
.header-resume-cta {
  flex: 0 0 auto;
}

.header-chat-cta.is-active,
.header-resume-cta.is-active {
  border-color: rgba(255, 216, 81, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 216, 81, 0.06);
}

.mobile-menu-button {
  display: inline-flex;
}

.mobile-nav-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  width: min(430px, calc(100vw - 28px));
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(15, 13, 10, 0.97), rgba(12, 10, 8, 0.94));
  border: 1px solid var(--border-strong);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.52);
  z-index: 50;
}

.mobile-nav-panel[hidden] {
  display: none !important;
}

.mobile-nav-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.mobile-nav-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.mobile-nav-group + .mobile-nav-group {
  margin-top: 16px;
}

.mobile-nav-label {
  margin-bottom: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.mobile-nav {
  display: grid;
  gap: 10px;
}

.mobile-nav-link {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 18px;
  text-decoration: none;
  border: 1px solid rgba(255, 216, 81, 0.1);
  background: rgba(255, 216, 81, 0.04);
  color: var(--text);
}

.mobile-nav-link small {
  color: var(--muted);
}

.mobile-nav-link.is-active {
  background: rgba(255, 216, 81, 0.1);
  border-color: rgba(255, 216, 81, 0.22);
}

.mobile-nav-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button-primary {
  color: #120f08;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 247, 215, 0.28);
  box-shadow: 0 14px 28px rgba(255, 187, 52, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.button-secondary,
.button-ghost,
.icon-button,
.command-hint,
.hero-meta-chip,
.hero-chip,
.filter-chip,
.suggestion-chip {
  border-color: rgba(255, 216, 81, 0.12);
  background: rgba(255, 216, 81, 0.04);
}

.button-secondary:hover,
.button-ghost:hover,
.icon-button:hover,
.command-hint:hover,
.filter-chip:hover,
.filter-chip:focus-visible,
.suggestion-chip:hover,
.suggestion-chip:focus-visible {
  background: rgba(255, 216, 81, 0.09);
  border-color: rgba(255, 216, 81, 0.22);
}

.viewport-progress span {
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-strong));
}

.hero {
  padding-top: 188px;
  padding-bottom: 72px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(440px, 0.96fr);
  gap: 44px;
  align-items: start;
}

.hero-prelude {
  display: grid;
  gap: 14px;
}

.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 216, 81, 0.05);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #8bff9a;
  box-shadow: 0 0 0 6px rgba(139, 255, 154, 0.12);
}

.hero-chip-row {
  margin-top: 22px;
  gap: 12px;
}

.hero-chip,
.hero-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.hero-copy h1 {
  max-width: 11ch;
  margin: 24px 0 18px;
  font-size: clamp(4.3rem, 7vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.hero-title-accent {
  display: block;
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 48%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy-lead {
  max-width: 64ch;
  font-size: 1.16rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--text) 84%, transparent);
}

.hero-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-link-row {
  margin-top: 18px;
}

.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.metric-pill {
  min-width: 0;
  padding: 22px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 11, 8, 0.9), rgba(18, 15, 10, 0.86));
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.metric-pill strong {
  display: block;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.06em;
  margin-bottom: 10px;
}

.metric-pill span {
  display: block;
  color: var(--muted);
  line-height: 1.55;
}

.hero-stage {
  padding: 26px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(18, 15, 11, 0.95), rgba(14, 12, 9, 0.88));
  border: 1px solid rgba(255, 216, 81, 0.12);
}

.hero-stage-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.hero-stage-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-stage-tabs span {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 216, 81, 0.05);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.hero-stage-copy {
  margin-top: 18px;
}

.hero-stage-copy h2 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

.hero-stage-copy p {
  color: color-mix(in srgb, var(--text) 82%, transparent);
  line-height: 1.72;
}

.hero-stage-visual {
  position: relative;
  margin-top: 18px;
  min-height: 240px;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(circle at 44% 36%, rgba(255, 212, 81, 0.18), transparent 28%), #090806;
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.hero-webgl,
.project-webgl-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 240px;
}

.hero-stage-window,
.featured-project-stage-window {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(8, 8, 7, 0.82);
  border: 1px solid rgba(255, 216, 81, 0.12);
}

.hero-stage-window strong,
.featured-project-stage-window strong {
  font-size: 1.05rem;
}

.hero-stage-window span,
.featured-project-stage-window span {
  color: var(--muted);
  line-height: 1.55;
}

.hero-stage-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.hero-stage-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.hero-stage-card strong {
  font-size: 1.1rem;
  line-height: 1.25;
}

.hero-stage-card p {
  color: var(--muted);
  line-height: 1.58;
}

.hero-stage-metric {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 216, 81, 0.08);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.hero-panel-footer {
  margin-top: 18px;
}

.hero-panel-footer span {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.08);
}

.section-split-head {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: start;
}

.personal-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  margin-top: 22px;
}

.signature-card,
.trajectory-panel,
.background-panel,
.working-style-panel,
.featured-project-stage,
.contact-form-card {
  padding: 26px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(17, 15, 11, 0.95), rgba(13, 12, 9, 0.9));
  border: 1px solid rgba(255, 216, 81, 0.11);
}

.signature-topline,
.featured-project-stage-head,
.publication-topline,
.research-topline,
.chat-head,
.graph-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.signature-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.signature-role-row span {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 216, 81, 0.05);
  border: 1px solid rgba(255, 216, 81, 0.1);
  color: var(--muted);
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.signature-focus-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.signature-focus-item {
  display: inline-flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.signature-focus-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.career-timeline {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.career-timeline-item {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 216, 81, 0.1);
}

.career-timeline-item:first-child {
  border-top: none;
  padding-top: 0;
}

.career-timeline-period {
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.career-timeline-org {
  color: var(--muted);
  margin: 6px 0 8px;
}

.career-timeline-item p {
  color: var(--muted);
  line-height: 1.65;
}

.experience-highlight-grid,
.awards-grid,
.skills-cluster-grid,
.project-archive-grid,
.research-preview-grid {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.experience-highlight-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.award-card,
.experience-highlight-card,
.skills-cluster-card,
.archive-project-card,
.research-card,
.publication-card,
.metric-card,
.github-graph-card,
.github-repos-card,
.chat-sidebar,
.chat-shell,
.page-hero-panel {
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(16, 14, 10, 0.92), rgba(12, 11, 8, 0.88));
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.experience-highlight-card p,
.award-card p,
.skills-cluster-card p,
.archive-project-card p,
.featured-project-card p,
.research-card p,
.publication-card p {
  color: var(--muted);
  line-height: 1.65;
}

.background-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  margin-top: 22px;
}

.background-entry-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.background-entry {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.background-entry strong {
  display: block;
  margin-top: 6px;
}

.background-entry p {
  margin-top: 10px;
  color: var(--muted);
}

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

.working-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.working-style-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.working-style-index {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.featured-projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.85fr));
  gap: 18px;
  align-items: stretch;
  margin-top: 24px;
}

.featured-project-stage {
  grid-row: span 2;
}

.featured-project-stage-visual {
  position: relative;
  min-height: 420px;
  margin-top: 18px;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(circle at 45% 35%, rgba(255, 214, 84, 0.18), transparent 26%), #090806;
  border: 1px solid rgba(255, 216, 81, 0.12);
}

.featured-project-stage-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.featured-project-stage-footer span {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.08);
}

.project-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.filter-chip.is-active {
  color: #111;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(255, 244, 211, 0.34);
}

.project-archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-project-card,
.featured-project-card {
  display: grid;
  gap: 14px;
}

.featured-project-card {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 14, 10, 0.95), rgba(13, 11, 9, 0.9));
  border: 1px solid rgba(255, 216, 81, 0.12);
}

.feature-project-top {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.feature-project-metric {
  display: inline-grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
  color: var(--muted);
}

.feature-project-metric strong {
  color: var(--accent);
}

.project-detail {
  color: color-mix(in srgb, var(--text) 80%, transparent);
  line-height: 1.64;
}

.contact-shell {
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 20px;
  margin-top: 24px;
}

.contact-form-copy {
  color: var(--muted);
  line-height: 1.65;
}

.contact-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

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

.contact-form-fields span {
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-form-fields input,
.contact-form-fields textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 216, 81, 0.12);
  background: rgba(255, 216, 81, 0.04);
  color: var(--text);
  resize: vertical;
}

.contact-form-fields input::placeholder,
.contact-form-fields textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.contact-form-fields input:focus-visible,
.contact-form-fields textarea:focus-visible {
  outline: 2px solid rgba(255, 216, 81, 0.28);
  outline-offset: 0;
  border-color: rgba(255, 216, 81, 0.22);
}

.contact-form-full {
  grid-column: 1 / -1;
}

.contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.contact-form-hint {
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.contact-form-status {
  min-height: 24px;
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-form-status[data-tone='success'] {
  color: #b7f093;
}

.contact-form-status[data-tone='error'] {
  color: #ff9e8c;
}

.contact-side {
  display: grid;
  gap: 18px;
}

.contact-note-actions {
  margin-top: 16px;
}

.research-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.github-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 0.88fr);
  gap: 18px;
}

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

.metric-card strong {
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.graph-stage {
  min-height: 320px;
}

.chat-console-layout {
  grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
}

.chat-context-row,
.terminal-chip-row,
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-context-row span,
.terminal-chip-row span {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.08);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 20px;
}

.page-hero-panel h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.08;
}

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

.hero-scroll-cue,
.cursor-spotlight {
  opacity: 0.85;
}

@media (max-width: 1420px) {
  .shell {
    width: min(1360px, calc(100vw - 40px));
  }

  .hero-shell,
  .section-split-head,
  .page-hero-grid,
  .contact-grid,
  .background-layout,
  .personal-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-projects-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .featured-project-stage {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .hero-metrics-grid,
  .experience-highlight-grid,
  .project-archive-grid,
  .research-preview-grid,
  .publication-grid,
  .awards-grid,
  .working-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-console-layout,
  .github-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-nav-track {
    gap: 6px;
  }

  .command-hint-label {
    display: none;
  }
}

@media (max-width: 1180px) {
  .header-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .desktop-nav {
    display: none;
  }

  .hero {
    padding-top: 170px;
  }

  .hero-copy h1 {
    max-width: 8ch;
    font-size: clamp(3.4rem, 8vw, 5.8rem);
  }

  .hero-stage-featured-grid,
  .skills-cluster-grid,
  .github-metrics-grid,
  .publication-grid,
  .research-preview-grid,
  .project-archive-grid,
  .experience-highlight-grid,
  .awards-grid,
  .working-style-grid,
  .featured-projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-project-stage-visual {
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100vw - 24px, 100%);
  }

  .site-header {
    top: 10px;
  }

  .header-bar {
    gap: 10px;
    padding: 12px;
  }

  .brand-copy small {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .header-chat-cta span,
  .header-resume-cta {
    font-size: 0.92rem;
  }

  .command-hint.command-hint-compact {
    display: none;
  }

  .hero {
    padding-top: 150px;
    padding-bottom: 56px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .hero-metrics-grid,
  .signature-focus-grid,
  .contact-form-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .career-timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .hero-stage,
  .signature-card,
  .trajectory-panel,
  .background-panel,
  .working-style-panel,
  .featured-project-stage,
  .contact-form-card,
  .award-card,
  .experience-highlight-card,
  .skills-cluster-card,
  .archive-project-card,
  .research-card,
  .publication-card {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-stage-visual,
  .featured-project-stage-visual {
    min-height: 260px;
  }

  .hero-stage-window,
  .featured-project-stage-window {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 14px 16px;
  }
}

@media (max-width: 640px) {
  .header-chat-cta span {
    display: none;
  }

  .header-resume-cta {
    display: none;
  }

  .hero-chip,
  .hero-meta-chip {
    width: 100%;
    justify-content: center;
  }

  .hero-action-row,
  .signature-actions,
  .contact-form-actions,
  .mobile-nav-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stage-tabs,
  .hero-panel-footer,
  .project-filter-row,
  .page-hero-actions {
    gap: 8px;
  }

  .feature-project-top,
  .featured-project-stage-head {
    align-items: flex-start;
  }
}

/* ===== V7 NAV + ATLAS + ROLE FIT OVERRIDES ===== */

:root {
  --v7-warm-black: #080603;
  --v7-warm-panel: rgba(16, 12, 7, 0.9);
  --v7-warm-border: rgba(255, 212, 91, 0.18);
  --v7-warm-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

html[data-theme='light'] {
  --bg: #efe2c6;
  --bg-alt: #f6eddc;
  --surface: rgba(250, 241, 224, 0.88);
  --surface-2: rgba(247, 236, 214, 0.93);
  --surface-3: rgba(255, 250, 239, 0.96);
  --border: rgba(116, 79, 13, 0.14);
  --border-strong: rgba(116, 79, 13, 0.22);
  --text: #1d170d;
  --muted: #66553d;
  --accent: #bc8718;
  --accent-strong: #8d5f04;
  --accent-2: #d59a2d;
  --accent-3: #f1c46c;
  --accent-wash: rgba(196, 142, 24, 0.08);
  --shadow-soft: 0 20px 44px rgba(76, 47, 4, 0.09);
}

html[data-theme='light'] body {
  background:
    radial-gradient(circle at 12% 16%, rgba(240, 200, 106, 0.16), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(209, 154, 71, 0.14), transparent 24%),
    radial-gradient(circle at 72% 76%, rgba(224, 176, 88, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f1e1 0%, #f1e5cc 50%, #eadcc0 100%);
}

html[data-theme='light'] body::before {
  background:
    linear-gradient(90deg, transparent 0, transparent 16%, rgba(196, 143, 46, 0.038) 24%, transparent 31%, transparent 100%),
    linear-gradient(90deg, transparent 0, transparent 66%, rgba(181, 118, 31, 0.032) 76%, transparent 84%, transparent 100%);
}

html[data-theme='light'] .cursor-spotlight {
  background: radial-gradient(circle, rgba(219, 160, 60, 0.14), rgba(219, 160, 60, 0.06) 36%, transparent 70%);
}

.site-header {
  top: 14px;
}

.header-bar {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.header-nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.desktop-nav {
  display: block;
  width: 100%;
  min-width: 0;
}

.desktop-nav-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 6px;
  overflow: visible;
}

.nav-link {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 14px;
}

.desktop-nav-meta {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.desktop-nav-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 216, 81, 0.05);
  border: 1px solid rgba(255, 216, 81, 0.1);
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.command-hint.command-hint-compact {
  min-width: 144px;
}

.mobile-nav-panel {
  width: min(960px, calc(100vw - 28px));
  max-height: min(82vh, 760px);
  overflow: hidden auto;
  overscroll-behavior: contain;
  padding: 18px;
}

.mobile-nav-scroll {
  display: grid;
  gap: 22px;
}

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

.mobile-nav-summary {
  padding-top: 4px;
}

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

.mobile-nav-summary-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.mobile-nav-summary-card strong {
  display: block;
  margin-bottom: 8px;
}

.mobile-nav-summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.evidence-atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 20px;
  margin-top: 24px;
}

.evidence-atlas-stage,
.evidence-detail-card,
.role-fit-lens-rail,
.role-fit-main,
.evidence-side-note,
.role-fit-note {
  padding: 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(16, 14, 10, 0.94), rgba(11, 10, 8, 0.9));
  border: 1px solid rgba(255, 216, 81, 0.11);
}

html[data-theme='light'] .evidence-atlas-stage,
html[data-theme='light'] .evidence-detail-card,
html[data-theme='light'] .role-fit-lens-rail,
html[data-theme='light'] .role-fit-main,
html[data-theme='light'] .evidence-side-note,
html[data-theme='light'] .role-fit-note {
  background: linear-gradient(180deg, rgba(252, 244, 229, 0.94), rgba(245, 235, 214, 0.92));
}

.evidence-stage-topline,
.role-fit-score-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.evidence-stage-shell {
  position: relative;
  min-height: 560px;
  margin-top: 18px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 34%, rgba(255, 203, 80, 0.16), transparent 26%),
    radial-gradient(circle at 70% 70%, rgba(213, 127, 46, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(10, 8, 6, 0.98), rgba(9, 8, 7, 0.94));
  border: 1px solid rgba(255, 216, 81, 0.11);
}

html[data-theme='light'] .evidence-stage-shell {
  background:
    radial-gradient(circle at 48% 34%, rgba(231, 173, 60, 0.14), transparent 26%),
    radial-gradient(circle at 70% 70%, rgba(207, 141, 34, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(246, 236, 215, 0.9), rgba(239, 226, 198, 0.86));
}

.evidence-atlas-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.evidence-atlas-links line {
  stroke: rgba(255, 214, 101, 0.18);
  stroke-width: 0.42;
  transition: stroke 220ms ease, stroke-width 220ms ease, opacity 220ms ease;
  opacity: 0.8;
}

html[data-theme='light'] .evidence-atlas-links line {
  stroke: rgba(165, 112, 23, 0.18);
}

.evidence-atlas-links line.is-active {
  stroke: rgba(255, 190, 77, 0.38);
  stroke-width: 0.68;
  opacity: 1;
}

.evidence-atlas-links line.is-direct {
  stroke: rgba(255, 223, 129, 0.68);
  stroke-width: 0.86;
}

html[data-theme='light'] .evidence-atlas-links line.is-active {
  stroke: rgba(170, 108, 20, 0.38);
}

html[data-theme='light'] .evidence-atlas-links line.is-direct {
  stroke: rgba(185, 121, 18, 0.66);
}

.evidence-atlas-grid {
  position: relative;
  width: 100%;
  height: 100%;
}

.evidence-node {
  position: absolute;
  left: var(--node-x);
  top: var(--node-y);
  transform: translate(-50%, -50%);
  display: grid;
  gap: 4px;
  min-width: 160px;
  max-width: 220px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 216, 81, 0.14);
  background: rgba(10, 10, 9, 0.88);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  color: var(--text);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.evidence-node::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, rgba(255, 214, 101, 0.18), transparent 62%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.evidence-node:hover,
.evidence-node:focus-visible,
.evidence-node.is-active {
  transform: translate(-50%, -50%) scale(1.02);
  border-color: rgba(255, 223, 129, 0.28);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.34);
}

.evidence-node:hover::before,
.evidence-node:focus-visible::before,
.evidence-node.is-active::before {
  opacity: 1;
}

.evidence-node-label {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.evidence-node small {
  color: var(--muted);
  line-height: 1.45;
}

.evidence-tone-gold {
  background: linear-gradient(180deg, rgba(18, 15, 9, 0.96), rgba(10, 10, 8, 0.9));
}

.evidence-tone-amber {
  background: linear-gradient(180deg, rgba(29, 17, 8, 0.94), rgba(12, 10, 8, 0.92));
}

.evidence-tone-olive {
  background: linear-gradient(180deg, rgba(19, 19, 10, 0.94), rgba(11, 10, 8, 0.92));
}

html[data-theme='light'] .evidence-node {
  background: linear-gradient(180deg, rgba(252, 246, 235, 0.98), rgba(245, 234, 210, 0.96));
  box-shadow: 0 18px 32px rgba(97, 68, 10, 0.08);
}

.evidence-detail-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.evidence-detail-card h3,
.role-fit-main h3 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.evidence-score-chip {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 216, 81, 0.08);
  border: 1px solid rgba(255, 216, 81, 0.12);
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.evidence-detail-description,
.role-fit-summary {
  margin: 16px 0 0;
  color: color-mix(in srgb, var(--text) 84%, transparent);
  line-height: 1.72;
}

.evidence-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.evidence-list-title {
  margin-bottom: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}

.evidence-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.evidence-list-soft li {
  color: color-mix(in srgb, var(--text) 78%, transparent);
}

.evidence-detail-actions,
.role-fit-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.evidence-stage-footer,
.role-fit-pill-row,
.role-fit-rail-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.evidence-stage-footer span,
.role-fit-pill-row span,
.role-fit-rail-footer span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.role-fit-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
  gap: 20px;
  margin-top: 24px;
}

.role-fit-lens-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.role-fit-lens {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 216, 81, 0.1);
  background: rgba(255, 216, 81, 0.04);
  color: var(--text);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.role-fit-lens:hover,
.role-fit-lens:focus-visible,
.role-fit-lens.is-active {
  background: rgba(255, 216, 81, 0.1);
  border-color: rgba(255, 216, 81, 0.22);
  transform: translateY(-1px);
}

.role-fit-lens span {
  font-weight: 700;
}

.role-fit-lens small {
  color: var(--muted);
}

.role-fit-score-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.role-fit-score-ring {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(11, 10, 8, 0.92) 0 50%, transparent 51%),
    conic-gradient(from -90deg, var(--accent), var(--accent-2), var(--accent-strong), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255, 216, 81, 0.16), 0 22px 50px rgba(0, 0, 0, 0.24);
}

.role-fit-score-ring span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(9, 8, 6, 0.96);
  color: var(--text);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

html[data-theme='light'] .role-fit-score-ring {
  box-shadow: inset 0 0 0 1px rgba(165, 112, 23, 0.16), 0 18px 34px rgba(89, 60, 8, 0.08);
}

html[data-theme='light'] .role-fit-score-ring span {
  background: rgba(252, 246, 235, 0.98);
}

.role-fit-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.role-fit-evidence-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 216, 81, 0.04);
  border: 1px solid rgba(255, 216, 81, 0.1);
}

.role-fit-evidence-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
}

.role-fit-evidence-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.role-fit-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.4fr);
  gap: 18px;
  margin-top: 20px;
}

.role-fit-copy-status {
  min-height: 24px;
  margin-top: 10px;
  color: var(--muted);
}

html[data-theme='light'] .header-bar {
  background: linear-gradient(180deg, rgba(245, 232, 205, 0.92), rgba(239, 224, 192, 0.9));
}

html[data-theme='light'] .desktop-nav-track,
html[data-theme='light'] .desktop-nav-status,
html[data-theme='light'] .command-hint.command-hint-compact,
html[data-theme='light'] .button-secondary,
html[data-theme='light'] .button-ghost,
html[data-theme='light'] .icon-button,
html[data-theme='light'] .hero-meta-chip,
html[data-theme='light'] .hero-chip,
html[data-theme='light'] .filter-chip,
html[data-theme='light'] .suggestion-chip {
  background: rgba(188, 135, 24, 0.06);
  border-color: rgba(116, 79, 13, 0.13);
}

html[data-theme='light'] .nav-link.is-active,
html[data-theme='light'] .filter-chip.is-active {
  color: #2a1e08;
}

@media (max-width: 1400px) {
  .desktop-nav-meta {
    display: none;
  }

  .header-main-row {
    gap: 12px;
  }

  .command-hint.command-hint-compact {
    min-width: auto;
  }
}

@media (max-width: 1180px) {
  .header-bar {
    gap: 10px;
  }

  .header-nav-row {
    display: none;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav-panel {
    width: min(720px, calc(100vw - 20px));
  }
}

@media (max-width: 1040px) {
  .evidence-atlas-layout,
  .role-fit-layout,
  .evidence-detail-columns,
  .role-fit-bottom-row,
  .role-fit-evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .evidence-stage-shell {
    min-height: 520px;
  }
}

@media (max-width: 900px) {
  .header-main-row {
    align-items: center;
  }

  .header-actions {
    gap: 8px;
  }

  .mobile-nav-columns,
  .mobile-nav-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-nav-panel {
    max-height: min(84vh, 700px);
  }

  .evidence-node {
    min-width: 136px;
    max-width: 176px;
    padding: 12px 13px;
  }

  .evidence-stage-shell {
    min-height: 560px;
  }
}

@media (max-width: 640px) {
  .header-main-row {
    align-items: stretch;
  }

  .brand-link {
    min-width: 0;
  }

  .header-actions {
    justify-content: flex-end;
    align-items: center;
  }

  .evidence-node {
    max-width: 150px;
    min-width: 120px;
    padding: 10px 11px;
  }

  .evidence-node-label {
    font-size: 0.94rem;
  }

  .evidence-stage-shell {
    min-height: 600px;
  }
}
