:root {
  --bg: #05070a;
  --surface: #0c0f14d1;
  --surface-soft: #1013199e;
  --surface-glass: linear-gradient(180deg, #ffffff09, #ffffff02);
  --border: #252a31;
  --border-soft: #ffffff1a;
  --text: #f2f4f7;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;
  --muted: var(--text-muted);
  --faint: var(--text-faint);
  --line: var(--border-soft);
  --line-strong: #ffffff24;
  --body-bg: radial-gradient(circle at 47% -18%, #8a8e9429, #767a7e0e 28%, #0000 52%), radial-gradient(circle at 16% 22%, #56585c29, #4446490e 30%, #0000 54%), radial-gradient(circle at 88% 18%, #40424621, #3032350c 31%, #0000 52%), radial-gradient(circle at 50% 108%, #38393c26, #2a2b2d0e 34%, #0000 58%), linear-gradient(#111214 0%, #090a0b 50%, #060606 100%);
  --content-bg: linear-gradient(180deg, rgba(255, 255, 255, .018), rgba(255, 255, 255, 0) 18%), rgba(5, 7, 10, .76);
  --sidebar-bg: linear-gradient(#0a0b0d29, #06070938);
  --active-bg: linear-gradient(90deg, rgba(122, 167, 255, .10), rgba(255, 255, 255, .018));
  --card: linear-gradient(180deg, rgba(18, 21, 27, .82), rgba(8, 10, 14, .76));
  --card-bg: var(--card);
  --panel: var(--card-bg);
  --card-hover: linear-gradient(180deg, rgba(22, 25, 31, .88), rgba(10, 12, 16, .82));
  --card-hover-bg: var(--card-hover);
  --accent: #7aa7ff;
  --accent-2: #b9c1cf;
  --accent-soft: #7aa7ff1a;
  --accent-line: #7aa7ff75;
  --radius: 6px;
  --panel-radius: 6px;
  --soft-corner: 6px;
  --soft-corner-small: 4px;
  --sidebar: 282px;
  --ease: cubic-bezier(.2, .9, .2, 1);
  --shadow: 0 18px 55px rgba(0, 0, 0, .26);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--body-bg);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--body-bg, inherit);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.mobile-bar,
.mobile-nav { display: none; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  background: var(--body-bg);
  transition: grid-template-columns .22s var(--ease);
}

.sidebar {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 22px 24px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  -webkit-backdrop-filter: blur(10px) saturate(1.02);
  backdrop-filter: blur(10px) saturate(1.02);
  box-shadow: inset -1px 0 #ffffff05;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
}

.brand-mark,
.nav-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: #ffffff09;
  color: #dce5ef;
  cursor: pointer;
  font-size: 0;
}

.brand-mark {
  box-shadow: none;
}

.brand-mark svg,
.nav-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.55px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav a,
.nav .theme-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--soft-corner);
  color: #c6cfda;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease), border .22s var(--ease);
}

.nav .theme-toggle {
  width: 100%;
  font: inherit;
  appearance: none;
  text-align: left;
  cursor: pointer;
}

.nav svg {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  color: #d8dfeb;
  stroke-width: 1.9;
}

.nav a:hover,
.nav .theme-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, .045);
  transform: translateX(3px);
}

.nav a.active {
  border-color: var(--accent-line);
  background: var(--active-bg);
  color: #f5f7fb;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav a.active svg { color: var(--accent); }

.theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: block; }

.sidebar-profile,
.profile {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: auto;
  padding: 16px 6px 0;
  border-top: 1px solid #ffffff0a;
}

.profile-dot,
.avatar {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px var(--accent-soft);
  color: #fff;
  font-size: 18px;
  font-weight: 760;
}

.profile-copy strong,
.profile-copy span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  color: #f0f2f5;
  font-size: 15px;
  font-weight: 500;
}

.profile-copy span {
  margin-top: 2px;
  color: #8a98aa;
  font-size: 12px;
  letter-spacing: .02em;
}

.profile-theme-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: rgba(255, 255, 255, .045);
  color: #c9d1dd;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.profile-theme-toggle:hover {
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, .075);
  color: var(--text);
  transform: translateY(-1px);
}

.profile-theme-toggle svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.75;
}

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

.main {
  position: relative;
  min-width: 0;
  height: 100vh;
  padding: 14px 16px 18px;
  overflow: auto;
}

.main:before {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - var(--sidebar) - 160px));
  margin: 0 auto;
  padding: 72px 0 42px;
  animation: page-in .34s ease both;
}

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

html.pa-route-loading {
  cursor: progress;
}

.main.pa-route-animating .hero-title,
.main.pa-route-animating .summary-panel > :not(.profile-column) {
  transition: opacity .22s var(--ease);
  will-change: opacity;
}

.main.pa-route-leaving .hero-title,
.main.pa-route-leaving .summary-panel > :not(.profile-column),
.main.pa-route-entering .hero-title,
.main.pa-route-entering .summary-panel > :not(.profile-column) {
  opacity: 0;
}

.main.pa-route-entering.pa-route-enter-active .hero-title,
.main.pa-route-entering.pa-route-enter-active .summary-panel > :not(.profile-column) {
  opacity: 1;
}

.summary-panel.pa-height-lock {
  overflow: hidden !important;
  transition: height .42s var(--ease), min-height .42s var(--ease);
  will-change: height, min-height;
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .main.pa-route-animating .hero-title,
  .main.pa-route-animating .summary-panel > :not(.profile-column),
  .summary-panel.pa-height-lock {
    animation: none;
    transition: none;
  }
}

.hero-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 660;
  letter-spacing: 0;
}

.summary-panel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background:
    radial-gradient(circle at 9% 15%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 30%),
    var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.summary-panel.flush { grid-template-columns: minmax(0, 1fr); }
.summary-panel.office-panel { min-height: calc(100vh - 180px); }
.summary-panel > * { min-width: 0; }

.hero-summary {
  grid-template-columns: 160px minmax(0, 1fr);
}

.summary-panel.hero-summary {
  overflow: visible;
}

.summary-panel.hero-summary > .profile-column {
  align-self: start;
}

.profile-column {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 9px;
  min-width: 0;
}

.profile-portrait {
  position: relative;
  display: block;
  align-self: start;
  width: 68px;
  height: 68px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.profile-portrait::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.profile-portrait img {
  display: block;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: 50% 36%;
  filter: saturate(.96) contrast(1.03);
  transform: translate(2.5%, -3.5%);
}

.profile-meta {
  display: grid;
  gap: 5px;
  color: var(--text-faint);
}

.profile-meta a,
.profile-meta > span {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  max-width: 156px;
  color: #89919d;
  font-size: 10.5px;
  line-height: 1.22;
}

.profile-meta a:hover {
  color: #c7ccd4;
}

.profile-meta svg {
  width: 12px;
  height: 12px;
  color: #8f98a6;
  stroke-width: 1.8;
}

.profile-meta span span,
.profile-meta a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-callout {
  position: absolute;
  z-index: 4;
  top: 2px;
  right: calc(100% - 18px);
  width: min(184px, calc(100vw - 56px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 6px;
  background: rgba(48, 52, 60, .94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .08);
  color: #edf0f5;
  font-size: 11.5px;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, 4px) scale(.97);
  transform-origin: calc(100% - 8px) 8px;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}

.profile-callout::before {
  content: "";
  position: absolute;
  top: 17px;
  right: -5px;
  width: 9px;
  height: 9px;
  border-top: 1px solid rgba(255, 255, 255, .17);
  border-right: 1px solid rgba(255, 255, 255, .17);
  background: inherit;
  transform: rotate(45deg);
}

.profile-callout.is-visible {
  opacity: 1;
  transform: translate(-8px, -6px) scale(1);
}

.nav a.site-pulse,
.mobile-nav a.site-pulse,
[data-highlight-key].site-pulse {
  animation: site-pulse 1.9s var(--ease) infinite;
}

@keyframes site-pulse {
  0% {
    border-color: var(--accent-line);
    background: rgba(122, 167, 255, .18);
    box-shadow: 0 0 0 0 rgba(122, 167, 255, .26), 0 0 0 rgba(122, 167, 255, 0);
  }
  45% {
    border-color: var(--accent-line);
    background: rgba(122, 167, 255, .13);
    box-shadow: 0 0 0 8px rgba(122, 167, 255, .06), 0 0 24px rgba(122, 167, 255, .26);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(122, 167, 255, 0), 0 0 0 rgba(122, 167, 255, 0);
  }
}

.metric-badge {
  display: grid;
  place-items: center;
  align-self: start;
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  border-radius: var(--soft-corner);
  background: var(--accent-soft);
  text-align: center;
}

.metric-badge strong {
  display: block;
  font-family: ui-serif, Georgia, serif;
  font-size: 24px;
  line-height: .85;
}

.metric-badge span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.hero-panel-head {
  justify-content: flex-start;
}

.panel-title-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.audio-play,
.intro-toggle {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: color-mix(in srgb, var(--accent) 38%, #bec4ce);
  cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}

.audio-play svg {
  width: 9px;
  height: 9px;
  transform: translateX(1px);
}

.intro-toggle svg {
  width: 10px;
  height: 10px;
}

.audio-play:hover,
.audio-play:focus-visible,
.audio-play.is-playing,
.intro-toggle:hover,
.intro-toggle:focus-visible {
  border-color: var(--accent-line);
  background: rgba(122, 167, 255, .13);
  color: #f4f7ff;
  box-shadow: 0 0 0 3px rgba(122, 167, 255, .08);
  outline: none;
}

.audio-play:active,
.intro-toggle:active {
  transform: scale(.96);
}

.audio-play span,
.intro-toggle span {
  display: grid;
  place-items: center;
  grid-area: 1 / 1;
}

.audio-play .icon-pause {
  display: none;
}

.audio-play.is-playing .icon-play {
  display: none;
}

.audio-play.is-playing .icon-pause {
  display: grid;
}

.audio-play .icon-pause svg {
  transform: none;
}

.intro-toggle .icon-paragraph {
  display: none;
}

.intro-toggle.is-bullets .icon-bullets {
  display: none;
}

.intro-toggle.is-bullets .icon-paragraph {
  display: grid;
}

.panel-head strong,
.section-card h2,
.mini-card h3,
.project-card h2 {
  color: color-mix(in srgb, var(--accent) 44%, #f1f2f3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.lead {
  margin: 0 0 14px;
  color: #ecedf0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.intro-copy {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.intro-copy[hidden] {
  display: none;
}

.intro-copy .lead,
.intro-copy .subtle {
  margin: 0;
}

.audio-play:disabled {
  cursor: not-allowed;
  opacity: .42;
  box-shadow: none;
}

.audio-play:disabled:hover {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .045);
  color: color-mix(in srgb, var(--accent) 38%, #bec4ce);
}

.intro-summary {
  gap: 12px;
}

.intro-cover {
  margin: 0;
  color: #edf0f4;
  font-size: 14px;
  line-height: 1.55;
}

.intro-bullets {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 9px;
  margin: 0;
}

.intro-bullets[hidden] {
  display: none;
}

.intro-bullets li {
  position: relative;
  margin: 0;
  padding-left: 18px;
  color: #d7dde7;
  font-size: 12.25px;
  line-height: 1.45;
}

.hero-summary .intro-bullets li {
  font-size: 12.25px;
  line-height: 1.45;
}

.intro-bullets li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .66em;
  width: 4.5px;
  height: 4.5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.experience-copy {
  display: grid;
  gap: 16px;
}

.experience-section {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 0 0 100%;
  overflow: visible;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: rgba(255, 255, 255, .022);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.experience-section:first-of-type {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.experience-section h2 {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 44%, #f1f2f3);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.experience-list,
.tool-groups,
.experience-bullets {
  display: grid;
  gap: 9px;
  margin: 0;
}

.experience-slider {
  --slider-gutter: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 2px;
  padding: 1px var(--slider-gutter) 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--slider-gutter);
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.experience-slider::-webkit-scrollbar,
.experience-section::-webkit-scrollbar {
  display: none;
}

.experience-slider-controls {
  display: inline-flex;
  justify-self: end;
  margin-top: -6px;
}

.experience-slider-controls .slider-button--pause {
  display: none;
}

.experience-slider + .slider-dots {
  display: flex;
}

.experience-entry {
  display: grid;
  gap: 6px;
}

.experience-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.experience-entry-head strong {
  color: #eef1f5;
  font-size: 13.5px;
  font-weight: 700;
}

.experience-entry-head span {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 11px;
}

.experience-entry p,
.tool-groups p {
  margin: 0;
  color: #cfd5df;
  font-size: 13px;
  line-height: 1.55;
}

.experience-entry-points {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-entry-points li {
  position: relative;
  margin: 0;
  padding-left: 15px;
  color: #cfd5df;
  font-size: 12.5px;
  line-height: 1.45;
}

.experience-entry-points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .68em;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tool-groups strong {
  color: #edf0f4;
  font-weight: 700;
}

.tool-groups p {
  display: grid;
  gap: 2px;
}

.tool-groups span {
  color: #cfd5df;
}

.experience-bullets {
  list-style: none;
  padding: 0;
}

.experience-bullets li {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 0;
  padding-left: 18px;
  color: #cfd5df;
  font-size: 13px;
  line-height: 1.55;
}

.experience-bullets li strong {
  color: #edf0f4;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.experience-bullets li span {
  color: #cfd5df;
}

.experience-bullets--split {
  gap: 11px;
}

.experience-bullets li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

.mini-grid,
.project-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

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

.section-card,
.mini-card,
.content-card,
.project-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: var(--card);
}

.section-card { min-height: 112px; padding: 14px 15px; transition: transform .25s var(--ease), background .25s var(--ease), border .25s var(--ease); }
.mini-card, .content-card { padding: 16px; }

.section-card:hover,
.mini-card:hover,
.project-card:hover {
  border-color: var(--accent-line);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.section-card h2,
.mini-card h3,
.project-card h2 {
  margin: 0 0 12px;
  text-transform: uppercase;
}

.section-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #d8dde6;
  font-size: 13px;
  line-height: 1.42;
}

.content-card {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.content-card p,
.mini-card p {
  margin: 0;
  color: #cfd5df;
  font-size: 14px;
  line-height: 1.55;
}

.stat strong {
  display: block;
  font-size: 23px;
  font-weight: 650;
}

.stat span { color: var(--muted); font-size: 12px; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-weight: 650;
  font-size: 12px;
}

.button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.button span {
  min-width: 0;
}

.button.primary {
  color: #f3f3f1;
  border-color: rgba(255,255,255,.12);
  background: linear-gradient(135deg, #3a3a3d, #55565a);
}

.project-card {
  display: grid;
  overflow: hidden;
}

.project-card img,
.project-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(255, 255, 255, .035);
}

.project-image--valet_van_platform {
  object-position: 50% 6%;
}

.project-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.project-body p {
  margin: 0;
  color: #cfd5df;
  font-size: 15px;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  color: #d9def8;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, .035);
}

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

.project-toolbar {
  justify-content: flex-end;
}

.slider-controls {
  display: none;
  align-items: center;
  gap: 7px;
}

.slider-controls.experience-slider-controls {
  display: inline-flex;
}

.slider-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}

.slider-button svg {
  width: 17px;
  height: 17px;
}

.slider-button span {
  display: grid;
  place-items: center;
  grid-area: 1 / 1;
}

.slider-button--pause .icon-play {
  display: none;
}

.slider-button--pause.is-paused .icon-pause {
  display: none;
}

.slider-button--pause.is-paused .icon-play {
  display: grid;
}

.slider-button:hover,
.slider-button:focus-visible {
  border-color: var(--accent-line);
  background: rgba(122, 167, 255, .12);
  color: #f4f7ff;
  outline: none;
}

.slider-button:active {
  transform: scale(.96);
}

.slider-dots {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
}

.slider-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04);
  transition: width .18s var(--ease), background .18s var(--ease), opacity .18s var(--ease);
}

.slider-dots span.is-active {
  width: 18px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search {
  flex: 1;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
  color: var(--text);
}

.article {
  display: grid;
  gap: 14px;
  color: #d8dde6;
  font-size: 15px;
  line-height: 1.68;
}

.article p { margin: 0; }

.office-frame {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: #050607;
  overflow: hidden;
}

.office-frame iframe {
  width: 100%;
  height: 620px;
  border: 0;
  display: block;
}

.office-main {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #050607;
}

.office-full-scene {
  display: block;
  width: 100%;
  height: 100vh;
  border: 0;
  background: #050607;
}

.office-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(122, 167, 255, .11), transparent 32%),
    rgba(5, 6, 7, .92);
  opacity: 1;
  visibility: visible;
  transition: opacity .42s var(--ease), visibility .42s var(--ease);
  pointer-events: none;
}

.office-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.office-loader-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(86vw, 420px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 10, 12, .62);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.office-loader-inner strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 520;
}

.office-loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: loader-dot 1.2s ease-in-out infinite;
}

@keyframes loader-dot {
  0%, 100% { transform: scale(.78); opacity: .62; box-shadow: 0 0 0 0 rgba(122, 167, 255, .28); }
  50% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 8px rgba(122, 167, 255, .08); }
}

.footer-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 980px) {
  body { overflow: hidden; }

  .app { display: block; }
  .sidebar { display: none; }

  .mobile-bar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 10;
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 10, 14, .82);
    backdrop-filter: blur(16px);
  }

  .mobile-bar strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.1;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
    border-top: 1px solid var(--line);
    background: rgba(8, 10, 14, .82);
    backdrop-filter: blur(16px);
  }

  .mobile-nav a {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 50px;
    border-radius: var(--radius);
    color: #aeb5c0;
    font-size: 10px;
    font-weight: 760;
    line-height: 1.05;
  }

  .mobile-nav .theme-toggle {
    display: grid;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: #aeb5c0;
    place-items: center;
    cursor: pointer;
    padding: 0;
  }

  .mobile-nav .theme-toggle svg {
    grid-area: 1 / 1;
  }

  .mobile-nav .theme-toggle .theme-icon-light {
    display: none;
  }

  [data-theme="light"] .mobile-nav .theme-toggle .theme-icon-dark {
    display: none;
  }

  [data-theme="light"] .mobile-nav .theme-toggle .theme-icon-light {
    display: block;
  }

  .mobile-nav a.active { background: rgba(255, 255, 255, .07); color: var(--text); }

  .mobile-nav a.active svg { color: var(--accent); }

  .mobile-nav a.site-pulse {
    color: #f4f7ff;
    background: rgba(122, 167, 255, .16);
    box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 20px rgba(122, 167, 255, .2);
  }

  .mobile-nav .theme-toggle:hover,
  .mobile-nav .theme-toggle:focus-visible {
    background: rgba(255, 255, 255, .07);
    color: var(--text);
    outline: none;
  }

  .mobile-nav a.site-pulse svg {
    color: var(--accent);
  }

  .mobile-nav svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.9;
  }

  .mobile-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main {
    height: 100dvh;
    overflow: hidden;
    padding: 10px 8px 68px;
  }

  .office-main {
    height: calc(100dvh - 68px);
    padding: 0;
  }

  .office-full-scene {
    height: calc(100dvh - 68px);
    min-height: 0;
  }

  .main:before { display: none; }

  .page {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: auto;
  }

  .hero-title {
    display: block;
    margin: 0 0 12px;
    color: #d2d7df;
    text-align: center;
    font-size: clamp(15px, 4.2vw, 20px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .summary-panel {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
    border-radius: var(--soft-corner);
  }

  .summary-panel.flush { grid-template-columns: minmax(0, 1fr); }

  .hero-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .profile-column {
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 10px;
  }

  .profile-portrait {
    width: 60px;
    height: 60px;
  }

  .profile-meta {
    gap: 3px;
  }

  .profile-meta a,
  .profile-meta > span {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 5px;
    max-width: none;
    font-size: 10px;
    line-height: 1.18;
  }

  .profile-meta svg {
    width: 11px;
    height: 11px;
  }

  .audio-play,
  .intro-toggle {
    width: 24px;
    height: 24px;
  }

  .audio-play svg {
    width: 11px;
    height: 11px;
  }

  .intro-toggle svg {
    width: 12px;
    height: 12px;
  }

  .profile-callout {
    top: -1px;
    right: auto;
    left: 44px;
    width: min(210px, calc(100vw - 88px));
    padding: 8px 9px;
    font-size: 10.5px;
    line-height: 1.32;
    transform-origin: 8px 8px;
  }

  .profile-callout::before {
    right: auto;
    left: -5px;
    border-top: 0;
    border-right: 0;
    border-left: 1px solid rgba(255, 255, 255, .17);
    border-bottom: 1px solid rgba(255, 255, 255, .17);
  }

  .profile-callout.is-visible {
    transform: translate(8px, -6px) scale(1);
  }

  .summary-panel.office-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-panel.office-panel .metric-badge {
    display: none;
  }

  .metric-badge { width: 44px; height: 44px; }
  .metric-badge strong { font-size: 20px; }
  .metric-badge span { font-size: 8px; }
  .lead { font-size: 14px; }

  .panel-title-inline strong {
    font-size: 13.5px;
    line-height: 1.28;
  }

  .intro-copy {
    gap: 8px;
    margin-bottom: 14px;
  }
  .intro-copy .lead {
    font-size: 13px;
    line-height: 1.5;
  }
  .intro-copy .subtle {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .intro-bullets li {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .home-contact-panel {
    display: grid;
  }

  .grid,
  .mini-grid,
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-slider {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-right: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-slider::-webkit-scrollbar {
    display: none;
  }

  .experience-slider.mobile-slider {
    max-height: none;
  }

  .project-grid.mobile-slider {
    grid-template-columns: none;
  }

  .project-grid.mobile-slider .project-card,
  .experience-slider.mobile-slider .experience-section {
    flex: 0 0 min(292px, 78vw);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .project-grid.mobile-slider .project-card {
    min-height: 0;
  }

  .project-grid.mobile-slider .project-image {
    aspect-ratio: 16 / 10;
  }

  .experience-slider.mobile-slider .experience-section {
    max-height: none;
    overflow: visible;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--soft-corner);
    background: var(--card);
  }

  .experience-slider.mobile-slider .experience-section:first-of-type {
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .slider-controls {
    display: inline-flex;
  }

  .slider-button {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .075);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  }

  .slider-dots {
    display: flex;
  }

  .experience-slider-controls {
    justify-content: flex-end;
  }

  .section-card { min-height: 0; padding: 12px; }
  .section-card ul,
  .content-card p,
  .mini-card p,
  .project-body p { font-size: 13px; }

  .toolbar { display: flex; }
  .office-frame,
  .office-frame iframe { min-height: 520px; height: 520px; }

  .chat-page {
    padding: 10px;
  }

  .chat-shell {
    height: 100%;
    min-height: 0;
  }

  .chat-log {
    min-height: 0;
  }

  .chat-composer {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    padding: 10px;
  }

  .chat-input {
    min-height: 44px;
    max-height: 118px;
  }
}

@media (min-width: 901px) {
  :root {
    --sidebar: 242px;
    --border: rgba(255, 255, 255, .078);
    --border-soft: rgba(255, 255, 255, .12);
    --text-muted: #aaa9a4;
    --text-faint: #75746f;
    --sidebar-bg: linear-gradient(#0a0b0d29, #06070938);
    --active-bg: linear-gradient(90deg, #7aa7ff1a, #ffffff05);
    --card-bg: linear-gradient(180deg, #12151bd1, #080a0ec2);
    --card-hover-bg: linear-gradient(180deg, #16191fe0, #0a0c10d1);
    --content-bg: linear-gradient(180deg, #ffffff05, #fff0 18%), #05070ac2;
  }

  .sidebar {
    border-right: 1px solid #ffffff0a;
    background: var(--sidebar-bg);
    -webkit-backdrop-filter: blur(10px) saturate(1.02);
    backdrop-filter: blur(10px) saturate(1.02);
    box-shadow: inset -1px 0 #ffffff05;
    padding: 30px 28px 20px;
    transition: padding .22s var(--ease);
  }

  .app.nav-collapsed {
    --sidebar: 86px;
  }

  .sidebar.collapsed {
    align-items: center;
    padding: 30px 14px 20px;
  }

  .sidebar-top {
    margin-bottom: 22px;
  }

  .sidebar.collapsed .sidebar-top {
    justify-content: center;
    width: 100%;
  }

  .brand-mark,
  .nav-toggle {
    width: 40px;
    height: 40px;
    border-color: var(--border);
    border-radius: 2px;
    background: #ffffff05;
    color: #aaa9a4;
  }

  .brand-mark svg,
  .nav-toggle svg {
    width: 20px;
    height: 20px;
    color: #aaa9a4;
    stroke-width: 1.55px;
  }

  .nav {
    gap: 7px;
  }

  .sidebar.collapsed .nav {
    align-items: center;
    width: 100%;
  }

  .nav a {
    position: relative;
    height: 43px;
    gap: 14px;
    padding: 0 14px 0 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 450;
    letter-spacing: .01em;
  }

  .sidebar.collapsed .nav a,
  .sidebar.collapsed .nav .theme-toggle {
    justify-content: center;
    width: 54px;
    padding: 0;
  }

  .sidebar.collapsed .nav a:hover,
  .sidebar.collapsed .nav .theme-toggle:hover {
    transform: translateY(-2px);
  }

  .sidebar.collapsed .nav span,
  .sidebar.collapsed .profile-copy {
    display: none;
  }

  .nav a::before {
    content: "";
    position: absolute;
    inset: 7px auto 7px -28px;
    width: 2px;
    background: transparent;
    opacity: .55;
  }

  .nav a:hover {
    color: var(--text);
    background: #ffffff05;
    box-shadow: inset 0 1px #ffffff03;
    transform: none;
  }

  .nav a.active {
    color: var(--text);
    border-color: transparent;
    background: #ffffff05;
    box-shadow: inset 0 1px #ffffff03;
  }

  .nav a.active::before {
    background: var(--accent);
  }

  .nav svg {
    width: 18px;
    height: 18px;
    color: currentColor;
  }

  .nav a.active svg {
    color: var(--accent);
  }

  .sidebar-profile,
  .profile {
    gap: 12px;
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
  }

  .profile-dot,
  .avatar {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    background: #ffffff0e;
    box-shadow: none;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
  }

  .profile-copy strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
  }

  .sidebar.collapsed .sidebar-profile,
  .sidebar.collapsed .profile {
    justify-content: center;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar.collapsed .profile-theme-toggle {
    margin-left: 0;
  }

  .profile-copy span {
    color: var(--text-faint);
    font-size: 11px;
  }

  .main {
    padding: 0;
    background: var(--body-bg);
    box-shadow: inset 1px 0 #ffffff09;
  }

  .page {
    width: min(980px, calc(100vw - var(--sidebar) - 120px));
    padding: 106px 0 42px;
  }

  .hero-title {
    margin: 0 0 44px;
    color: var(--text);
    font-size: 38px;
    font-weight: 430;
    line-height: 1.06;
    letter-spacing: 0;
  }

  .summary-panel,
  .section-card,
  .mini-card,
  .content-card,
  .project-card,
  .office-frame {
    border: 1px solid var(--line);
    border-radius: var(--soft-corner);
    background: var(--card-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  }

  .summary-panel {
    position: relative;
    overflow: hidden;
    gap: 18px;
    padding: 22px 24px 18px;
    border-color: rgba(255, 255, 255, .06);
    background:
      radial-gradient(circle at 7% 14%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 35%),
      radial-gradient(circle at 17% 5%, rgba(255, 255, 255, .026), transparent 23%),
      linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .014));
    backdrop-filter: none;
  }

  .hero-summary {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 13px;
  }

  .profile-portrait {
    width: 76px;
    height: 76px;
    border-color: rgba(255, 255, 255, .13);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
  }

  .profile-meta a,
  .profile-meta > span {
    max-width: 150px;
    font-size: 11px;
  }

  .summary-panel:hover,
  .section-card:hover,
  .mini-card:hover,
  .project-card:hover {
    border-color: var(--accent-line);
    transform: none;
  }

  .section-card:hover,
  .mini-card:hover,
  .project-card:hover {
    background: var(--card-hover-bg);
  }

  .metric-badge {
    width: 58px;
    height: 58px;
    border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
    border-radius: var(--soft-corner);
    background: color-mix(in srgb, var(--accent) 12%, #ffffff09);
    box-shadow: none;
  }

  .metric-badge strong {
    font-size: 25px;
    font-weight: 650;
  }

  .metric-badge span {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .panel-head strong,
  .section-card h2,
  .mini-card h3,
  .project-card h2 {
    color: color-mix(in srgb, var(--accent) 42%, #f1f2f3);
    font-size: 12px;
    font-weight: 550;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .panel-head span,
  .subtle,
  .stat span,
  .footer-note {
    color: var(--text-muted);
  }

  .lead {
    color: var(--text);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
  }

  .intro-copy .lead {
    font-size: 15px;
    line-height: 1.55;
  }

  .intro-copy .subtle {
    font-size: 13px;
    line-height: 1.6;
  }

  .section-card {
    min-height: 112px;
    padding: 16px 18px;
  }

  .mini-card,
  .content-card,
  .project-body {
    padding: 16px 18px;
  }

  .section-card ul,
  .content-card p,
  .mini-card p,
  .project-body p,
  .article {
    color: #cbd1da;
    font-size: 13px;
    line-height: 1.58;
  }

  .stat strong {
    color: var(--text);
    font-size: 25px;
    font-weight: 650;
  }

  .button,
  .search,
  .tag,
  .pill {
    border: 1px solid var(--border);
    border-radius: var(--soft-corner);
    background: #ffffff05;
    color: var(--text);
    box-shadow: inset 0 1px #ffffff0d;
    font-size: 12px;
    font-weight: 500;
  }

  .button:hover,
  .search:focus {
    border-color: var(--border-soft);
    background: #ffffff0a;
    outline: 0;
  }

  .button.primary {
    border-color: var(--border-soft);
    background: #ffffff12;
    color: var(--text);
  }

  .project-card img,
  .project-media img {
    background: #ffffff08;
  }

  .office-frame {
    background: var(--card-bg);
  }
}

.chat-page {
  width: min(980px, calc(100vw - var(--sidebar) - 120px));
}

.chat-summary {
  align-items: stretch;
}

.chat-panel-wrap {
  display: grid;
  min-width: 0;
  min-height: 0;
}

.chat-summary .profile-column {
  align-self: start;
}

.chat-summary .chat-shell {
  width: 100%;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(680px, calc(100vh - 280px));
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background:
    radial-gradient(circle at 8% 12%, rgba(132, 134, 140, .13), transparent 30%),
    linear-gradient(180deg, rgba(24, 24, 25, .84), rgba(12, 12, 13, .86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
}

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

.chat-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.chat-orb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--accent-line);
  border-radius: var(--soft-corner);
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  font-weight: 650;
  overflow: hidden;
}

.chat-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
}

.chat-title h1 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 520;
  line-height: 1.12;
  letter-spacing: 0;
}

.chat-title p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 12px;
}

.chat-status:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7b7d82;
  box-shadow: 0 0 0 4px rgba(123, 125, 130, .13);
}

.chat-status.online:before {
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .16);
}

.chat-status.working:before {
  background: #facc15;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, .17);
}

.chat-status.error:before {
  background: #ff6969;
  box-shadow: 0 0 0 4px rgba(255, 105, 105, .13);
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  padding: 18px 20px;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-color: rgba(255, 255, 255, .18) rgba(255, 255, 255, .03);
  scrollbar-width: thin;
}

.chat-log::-webkit-scrollbar {
  width: 8px;
}

.chat-log::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .03);
}

.chat-log::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
}

.chat-message {
  display: grid;
  gap: 5px;
  max-width: min(76%, 680px);
}

.chat-message.user {
  align-self: flex-end;
}

.chat-message.assistant,
.chat-message.phil,
.chat-message.system {
  align-self: flex-start;
}

.chat-sender {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.chat-message.user .chat-sender {
  text-align: right;
}

.chat-bubble {
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  padding: 11px 13px;
  background: rgba(255, 255, 255, .055);
  color: #dfe3ea;
  font-size: 14px;
  line-height: 1.52;
  white-space: pre-wrap;
}

.chat-message.user .chat-bubble {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .12);
  color: var(--text);
}

.chat-message.assistant .chat-bubble,
.chat-message.phil .chat-bubble,
.chat-message.system .chat-bubble {
  background: rgba(9, 10, 12, .58);
}

.contact-card-message {
  max-width: min(86%, 720px);
}

.chat-contact-bubble {
  width: min(100%, 560px);
  padding: 0;
  overflow: hidden;
  white-space: normal;
  background: linear-gradient(180deg, rgba(24, 26, 30, .88), rgba(9, 10, 12, .76));
}

.phil-contact-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 15px;
}

.phil-contact-card--compact {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.phil-contact-photo {
  width: 86px;
  height: 86px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  object-fit: cover;
  object-position: 53% 36%;
  background: #08090b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}

.phil-contact-copy {
  min-width: 0;
}

.phil-contact-copy strong,
.phil-contact-copy span {
  display: block;
}

.phil-contact-copy strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 560;
  line-height: 1.16;
}

.phil-contact-copy span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.phil-contact-list {
  display: grid;
  gap: 7px;
  margin: 13px 0 0;
}

.phil-contact-list div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.phil-contact-list dt,
.phil-contact-list dd {
  margin: 0;
  min-width: 0;
}

.phil-contact-list dt {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.phil-contact-list dd,
.phil-contact-list a {
  color: #e8edf5;
  font-size: 13px;
}

.phil-contact-list a {
  text-decoration: none;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 48px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 6, .52);
}

.chat-input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  max-height: 142px;
  resize: none;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  outline: 0;
  padding: 13px 14px;
  font: inherit;
  line-height: 1.35;
  scrollbar-color: rgba(255, 255, 255, .2) rgba(255, 255, 255, .04);
  scrollbar-width: thin;
}

.chat-input::-webkit-scrollbar {
  width: 8px;
}

.chat-input::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .04);
  border-radius: 999px;
}

.chat-input::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, .04);
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
}

.chat-input::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .28);
}

.chat-input:focus {
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, .08);
}

.chat-input::placeholder {
  color: var(--text-faint);
}

.chat-icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  cursor: pointer;
}

.chat-icon-button svg {
  width: 20px;
  height: 20px;
}

.chat-icon-button:hover {
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, .12);
}

.chat-icon-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.chat-icon-button.recording {
  border-color: rgba(255, 105, 105, .7);
  color: #ff8f8f;
  background: rgba(255, 105, 105, .12);
}

.chat-clear {
  border: 1px solid var(--line);
  border-radius: var(--soft-corner);
  background: rgba(255, 255, 255, .045);
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 10px;
}

.chat-clear svg {
  width: 17px;
  height: 17px;
}

.chat-clear:hover {
  color: var(--text);
  border-color: var(--border-soft);
}

@media (min-width: 1800px) {
  .page,
  .chat-page {
    width: min(1225px, calc(100vw - var(--sidebar) - 180px));
  }

  .page {
    padding-top: 124px;
  }

  .hero-title {
    font-size: 47.5px;
    margin-bottom: 54px;
  }

  .summary-panel {
    gap: 23px;
    padding: 28px 30px 25px;
  }

  .hero-summary {
    grid-template-columns: 188px minmax(0, 1fr);
    gap: 18px;
  }

  .profile-portrait {
    width: 96px;
    height: 96px;
  }

  .profile-column {
    gap: 11px;
  }

  .profile-meta a,
  .profile-meta > span {
    grid-template-columns: 15px minmax(0, 1fr);
    gap: 7px;
    max-width: 188px;
    font-size: 12.5px;
  }

  .profile-meta svg {
    width: 14px;
    height: 14px;
  }

  .panel-head strong,
  .section-card h2,
  .mini-card h3,
  .project-card h2 {
    font-size: 15px;
  }

  .panel-head span {
    font-size: 15.5px;
  }

  .audio-play,
  .intro-toggle {
    width: 23px;
    height: 23px;
  }

  .audio-play svg {
    width: 10.5px;
    height: 10.5px;
  }

  .intro-toggle svg {
    width: 11.5px;
    height: 11.5px;
  }

  .lead,
  .intro-copy .lead {
    font-size: 18.75px;
  }

  .intro-copy .subtle,
  .intro-bullets li,
  .section-card ul,
  .content-card p,
  .mini-card p,
  .project-body p,
  .article {
    font-size: 16.25px;
  }

  .section-card {
    padding: 20px 23px;
  }

  .mini-card,
  .content-card,
  .project-body {
    padding: 20px 23px;
  }

  .button,
  .search,
  .tag,
  .pill {
    font-size: 15px;
  }

  .chat-shell {
    height: min(850px, calc(100vh - 320px));
    min-height: 650px;
  }

  .chat-title h1 {
    font-size: 25px;
  }

  .chat-title p,
  .chat-status {
    font-size: 15px;
  }

  .chat-bubble,
  .chat-input {
    font-size: 17.5px;
  }
}

@media (max-width: 980px) {
  .chat-page {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 10px;
  }

  .chat-page .hero-title {
    margin-bottom: 0;
  }

  .chat-summary {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    height: 100%;
    min-height: 0;
    gap: 8px;
  }

  .chat-summary .profile-column {
    align-self: start;
  }

  .chat-panel-wrap {
    height: 100%;
    min-height: 0;
  }

  .chat-shell {
    height: 100%;
    min-height: 0;
  }

  .chat-header {
    padding: 13px;
  }

  .chat-title h1 {
    font-size: 17px;
  }

  .chat-title p,
  .chat-status {
    display: none;
  }

  .chat-orb {
    width: 40px;
    height: 40px;
  }

  .chat-log {
    min-height: 0;
    padding: 12px;
  }

  .chat-composer {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    padding: 10px;
  }

  .chat-input {
    min-height: 44px;
    max-height: 118px;
  }

  .chat-message {
    max-width: 88%;
  }

  .contact-card-message {
    width: 100%;
    max-width: 100%;
  }

  .contact-card-message .chat-contact-bubble {
    width: 100%;
  }

  .chat-bubble {
    font-size: 13px;
  }

  .phil-contact-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 13px;
  }

  .phil-contact-photo {
    width: 62px;
    height: 62px;
  }

  .phil-contact-copy strong {
    font-size: 15px;
  }

  .phil-contact-list {
    gap: 5px;
    margin-top: 10px;
  }

  .phil-contact-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .phil-contact-list dt {
    font-size: 9.5px;
  }

  .phil-contact-list dd,
  .phil-contact-list a {
    font-size: 12px;
  }
}

[data-theme="light"] {
  --bg: #e9edf2;
  --surface: rgba(241, 244, 248, .9);
  --surface-soft: rgba(232, 236, 242, .84);
  --surface-glass: linear-gradient(180deg, rgba(242, 245, 249, .86), rgba(230, 235, 242, .66));
  --border: rgba(15, 23, 42, .22);
  --border-soft: rgba(15, 23, 42, .28);
  --text: #07111f;
  --text-muted: #283547;
  --text-faint: #405066;
  --muted: var(--text-muted);
  --faint: var(--text-faint);
  --line: rgba(15, 23, 42, .20);
  --line-strong: rgba(15, 23, 42, .32);
  --body-bg:
    radial-gradient(circle at 12% 7%, rgba(126, 134, 146, .18), rgba(126, 134, 146, .05) 32%, transparent 56%),
    radial-gradient(circle at 88% 20%, rgba(122, 167, 255, .10), rgba(122, 167, 255, .03) 30%, transparent 54%),
    linear-gradient(#f1f3f6 0%, #e8ecf1 52%, #e2e7ed 100%);
  --content-bg: linear-gradient(180deg, rgba(241, 244, 248, .78), rgba(229, 234, 241, .58));
  --sidebar-bg: linear-gradient(rgba(239, 242, 246, .78), rgba(224, 229, 236, .66));
  --active-bg: linear-gradient(90deg, rgba(85, 123, 210, .14), rgba(17, 24, 39, .025));
  --card: linear-gradient(180deg, rgba(241, 244, 248, .94), rgba(230, 235, 242, .88));
  --card-bg: var(--card);
  --panel: var(--card-bg);
  --card-hover: linear-gradient(180deg, rgba(246, 248, 251, .98), rgba(226, 232, 240, .94));
  --card-hover-bg: var(--card-hover);
  --accent-2: #667085;
  --accent-soft: rgba(90, 126, 220, .14);
  --accent-line: rgba(37, 99, 235, .56);
  --shadow: 0 20px 58px rgba(44, 54, 70, .14);
}

[data-theme="light"] body,
[data-theme="light"] .app {
  background: var(--body-bg);
}

[data-theme="light"] .sidebar {
  border-right-color: rgba(19, 30, 46, .10);
  box-shadow: inset -1px 0 rgba(255, 255, 255, .65);
}

[data-theme="light"] .brand-mark,
[data-theme="light"] .nav-toggle,
[data-theme="light"] .nav .theme-toggle,
[data-theme="light"] .profile-theme-toggle {
  border-color: rgba(19, 30, 46, .14);
  background: rgba(234, 238, 244, .66);
  color: #263449;
}

[data-theme="light"] .brand-mark svg,
[data-theme="light"] .nav-toggle svg,
[data-theme="light"] .nav svg {
  color: #07111f;
}

[data-theme="light"] .nav a,
[data-theme="light"] .nav .theme-toggle {
  color: #243246;
}

[data-theme="light"] .nav a:hover,
[data-theme="light"] .nav .theme-toggle:hover {
  color: #07111f;
  background: rgba(19, 30, 46, .055);
}

[data-theme="light"] .nav a.active {
  color: #07111f;
}

[data-theme="light"] .sidebar-profile,
[data-theme="light"] .profile {
  border-top-color: rgba(19, 30, 46, .11);
}

[data-theme="light"] .profile-copy strong {
  color: #07111f;
}

[data-theme="light"] .profile-copy span {
  color: #07111f;
}

[data-theme="light"] .summary-panel,
[data-theme="light"] .section-card,
[data-theme="light"] .mini-card,
[data-theme="light"] .content-card,
[data-theme="light"] .project-card,
[data-theme="light"] .office-frame {
  border-color: var(--line);
  background: var(--card-bg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .72);
}

[data-theme="light"] .summary-panel {
  background:
    radial-gradient(circle at 7% 14%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 34%),
    linear-gradient(135deg, rgba(240, 243, 247, .95), rgba(226, 232, 239, .84));
}

[data-theme="light"] .profile-portrait {
  border-color: rgba(19, 30, 46, .13);
  box-shadow: 0 16px 34px rgba(44, 54, 70, .16), inset 0 1px 0 rgba(255, 255, 255, .8);
}

[data-theme="light"] .section-card ul,
[data-theme="light"] .content-card p,
[data-theme="light"] .mini-card p,
[data-theme="light"] .project-body p,
[data-theme="light"] .article {
  color: #07111f;
}

[data-theme="light"] .experience-section {
  border-top-color: rgba(19, 30, 46, .13);
}

[data-theme="light"] .experience-section h2 {
  color: #2d5494;
}

[data-theme="light"] .experience-entry-head strong,
[data-theme="light"] .tool-groups strong {
  color: #07111f;
}

[data-theme="light"] .experience-entry-head span {
  color: #334155;
}

[data-theme="light"] .experience-entry p,
[data-theme="light"] .tool-groups p,
[data-theme="light"] .experience-bullets li {
  color: #07111f;
}

[data-theme="light"] .experience-bullets li::before {
  background: #5276d2;
  box-shadow: 0 0 0 4px rgba(82, 118, 210, .14);
}

[data-theme="light"] .panel-head strong,
[data-theme="light"] .section-card h2,
[data-theme="light"] .mini-card h3,
[data-theme="light"] .project-card h2 {
  color: color-mix(in srgb, var(--accent) 50%, #111827);
}

[data-theme="light"] .button,
[data-theme="light"] .search,
[data-theme="light"] .tag,
[data-theme="light"] .pill,
[data-theme="light"] .chat-clear {
  border-color: var(--border);
  background: rgba(235, 239, 245, .72);
  color: var(--text);
  box-shadow: inset 0 1px rgba(255, 255, 255, .72);
}

[data-theme="light"] .button:hover,
[data-theme="light"] .search:focus {
  border-color: var(--accent-line);
  background: rgba(243, 246, 250, .9);
}

[data-theme="light"] .button.primary {
  border-color: var(--accent-line);
  background: rgba(89, 126, 220, .12);
  color: #07111f;
}

[data-theme="light"] .project-card img,
[data-theme="light"] .project-media img {
  background: rgba(19, 30, 46, .045);
}

[data-theme="light"] .mobile-bar,
[data-theme="light"] .mobile-nav {
  background: rgba(234, 238, 244, .88);
}

[data-theme="light"] .mobile-nav a {
  color: #283547;
}

[data-theme="light"] .mobile-nav a.active {
  background: rgba(82, 118, 210, .13);
  color: var(--text);
}

[data-theme="light"] .chat-shell {
  border-color: var(--line);
  background:
    radial-gradient(circle at 8% 12%, rgba(122, 167, 255, .13), transparent 30%),
    linear-gradient(180deg, rgba(240, 243, 247, .95), rgba(226, 232, 239, .9));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .74);
}

[data-theme="light"] .chat-header,
[data-theme="light"] .chat-composer {
  background: rgba(232, 237, 244, .58);
}

[data-theme="light"] .chat-orb,
[data-theme="light"] .chat-input,
[data-theme="light"] .chat-icon-button {
  background: rgba(237, 241, 247, .76);
}

[data-theme="light"] .chat-orb {
  border-color: rgba(82, 118, 210, .18);
  background: rgba(247, 249, 252, .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

[data-theme="light"] .chat-orb img {
  filter: saturate(.95) contrast(1.02);
}

[data-theme="light"] .chat-log {
  scrollbar-color: rgba(19, 30, 46, .24) rgba(19, 30, 46, .05);
}

[data-theme="light"] .chat-bubble {
  border-color: var(--line);
  background: rgba(236, 240, 246, .78);
  color: #0f172a;
}

[data-theme="light"] .chat-message.user .chat-bubble {
  border-color: rgba(82, 118, 210, .24);
  background: rgba(82, 118, 210, .12);
  color: #07111f;
}

[data-theme="light"] .chat-message.assistant .chat-bubble,
[data-theme="light"] .chat-message.phil .chat-bubble,
[data-theme="light"] .chat-message.system .chat-bubble {
  background: rgba(238, 242, 247, .84);
}

[data-theme="light"] .chat-contact-bubble {
  background: linear-gradient(180deg, rgba(241, 244, 248, .96), rgba(229, 234, 241, .94));
}

[data-theme="light"] .phil-contact-photo {
  border-color: rgba(19, 30, 46, .13);
  background: #e9edf3;
  box-shadow: 0 12px 28px rgba(44, 54, 70, .16);
}

[data-theme="light"] .phil-contact-list dd,
[data-theme="light"] .phil-contact-list a {
  color: #0f172a;
}

[data-theme="light"] .chat-input:focus,
[data-theme="light"] .chat-icon-button:hover,
[data-theme="light"] .chat-clear:hover {
  border-color: var(--accent-line);
  background: rgba(244, 247, 251, .92);
}

[data-theme="light"] .office-full-scene {
  background: #e8ecf1;
}

[data-theme="light"] .office-main {
  background: #e8ecf1;
}

[data-theme="light"] .office-loader {
  background:
    radial-gradient(circle at 50% 44%, rgba(82, 118, 210, .12), transparent 32%),
    rgba(232, 236, 242, .92);
}

[data-theme="light"] .office-loader-inner {
  background: rgba(239, 242, 246, .76);
  box-shadow: 0 18px 44px rgba(44, 54, 70, .14), inset 0 1px rgba(255, 255, 255, .82);
}
/* Light theme readability repair. Keep all light-mode text comfortably dark on pale panels. */
[data-theme="light"] .hero-title,
[data-theme="light"] .lead,
[data-theme="light"] .intro-copy .lead,
[data-theme="light"] .intro-cover,
[data-theme="light"] .chat-title h1,
[data-theme="light"] .chat-input,
[data-theme="light"] .chat-bubble,
[data-theme="light"] .button,
[data-theme="light"] .project-body p,
[data-theme="light"] .article {
  color: var(--text);
}

[data-theme="light"] .subtle,
[data-theme="light"] .intro-copy .subtle,
[data-theme="light"] .panel-head span,
[data-theme="light"] .footer-note,
[data-theme="light"] .chat-title p,
[data-theme="light"] .chat-status,
[data-theme="light"] .chat-clear,
[data-theme="light"] .chat-sender,
[data-theme="light"] .profile-meta,
[data-theme="light"] .profile-meta a,
[data-theme="light"] .profile-meta > span {
  color: var(--text-muted);
}

[data-theme="light"] .intro-bullets li,
[data-theme="light"] .experience-entry-points li,
[data-theme="light"] .experience-entry p,
[data-theme="light"] .experience-bullets li,
[data-theme="light"] .experience-bullets li span,
[data-theme="light"] .tool-groups p,
[data-theme="light"] .tool-groups span,
[data-theme="light"] .section-card ul,
[data-theme="light"] .content-card p,
[data-theme="light"] .mini-card p {
  color: #172033;
}

[data-theme="light"] .panel-title-inline strong,
[data-theme="light"] .panel-head strong,
[data-theme="light"] .experience-section h2,
[data-theme="light"] .experience-entry-head strong,
[data-theme="light"] .experience-bullets li strong,
[data-theme="light"] .tool-groups strong,
[data-theme="light"] .section-card h2,
[data-theme="light"] .mini-card h3,
[data-theme="light"] .project-card h2,
[data-theme="light"] .chat-contact-bubble strong,
[data-theme="light"] .phil-contact-copy strong {
  color: #07111f;
}

[data-theme="light"] .summary-panel,
[data-theme="light"] .experience-section,
[data-theme="light"] .section-card,
[data-theme="light"] .mini-card,
[data-theme="light"] .content-card,
[data-theme="light"] .project-card,
[data-theme="light"] .chat-shell,
[data-theme="light"] .chat-bubble,
[data-theme="light"] .chat-input,
[data-theme="light"] .chat-icon-button,
[data-theme="light"] .button,
[data-theme="light"] .tag,
[data-theme="light"] .pill {
  border-color: var(--line);
}

[data-theme="light"] .chat-input::placeholder {
  color: #526071;
}

[data-theme="light"] .profile-callout {
  border-color: rgba(15, 23, 42, .22);
  background: rgba(247, 249, 252, .96);
  box-shadow: 0 14px 34px rgba(44, 54, 70, .16), inset 0 1px rgba(255, 255, 255, .82);
  color: #07111f;
}

[data-theme="light"] .profile-callout::before {
  border-top-color: rgba(15, 23, 42, .22);
  border-right-color: rgba(15, 23, 42, .22);
}
