:root {
  color-scheme: dark;
  --bg: #050608;
  --paper: #10151b;
  --paper-soft: #0b0f14;
  --sidebar: #07090d;
  --ink: #f4f7fb;
  --text: #dce5ec;
  --muted: #9aa7b1;
  --subtle: #748491;
  --border: #24313b;
  --border-strong: #3b4d5d;
  --blue: #7dd3fc;
  --teal: #7ee7d6;
  --rose: #f48fb1;
  --amber: #f2c879;
  --pixel-green: #7cf0a8;
  --pixel-purple: #b39dff;
  --focus: #f48fb1;
  --max-width: 1120px;
  --sidebar-width: 278px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  padding-left: var(--sidebar-width);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  background:
    linear-gradient(90deg, rgba(125, 211, 252, 0.05) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(180deg, rgba(244, 143, 177, 0.11), transparent 360px),
    var(--bg);
  text-rendering: optimizeLegibility;
}

body.command-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1.6px);
  background-size: 120px 120px, 180px 180px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 30;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--rose), var(--blue), var(--teal));
}

.ambient-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.78;
}

.ambient-aurora span {
  position: absolute;
  width: min(46vw, 620px);
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(58px);
  opacity: 0.28;
  transform: translate3d(0, 0, 0);
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

.ambient-aurora span:nth-child(1) {
  top: -16%;
  left: 18%;
  background: rgba(125, 211, 252, 0.28);
}

.ambient-aurora span:nth-child(2) {
  right: -12%;
  top: 24%;
  background: rgba(244, 143, 177, 0.24);
  animation-delay: -8s;
}

.ambient-aurora span:nth-child(3) {
  left: 34%;
  bottom: -22%;
  background: rgba(126, 231, 214, 0.18);
  animation-delay: -14s;
}

@keyframes aurora-drift {
  from {
    transform: translate3d(-2rem, -1rem, 0) scale(0.92);
  }
  to {
    transform: translate3d(2.5rem, 1.5rem, 0) scale(1.08);
  }
}

.command-trigger {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 28;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.55rem;
  padding: 0.4rem 0.52rem 0.4rem 0.42rem;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(10, 14, 19, 0.82);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.command-trigger:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 143, 177, 0.5);
  background: rgba(16, 21, 27, 0.92);
}

.command-trigger span {
  padding: 0.22rem 0.42rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.command-trigger b {
  padding-right: 0.25rem;
  font-size: 0.85rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  padding: 0.6rem 0.8rem;
  color: var(--bg);
  background: var(--rose);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--sidebar-width);
  border-right: 1px solid var(--border);
  background: rgba(7, 9, 13, 0.94);
  backdrop-filter: blur(10px);
}

.nav {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem 1.4rem;
}

.brand {
  display: grid;
  gap: 0.1rem;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand small {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.nav-note {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.nav-links {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  font-size: 0.96rem;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.nav-links a:hover {
  color: var(--blue);
  background: rgba(125, 211, 252, 0.08);
  transform: translateX(2px);
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: rgba(244, 143, 177, 0.11);
}

.nav-meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.86rem;
  line-height: 1.55;
}

.nav-meta span,
.nav-meta a {
  display: block;
}

main,
.site-footer {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
  scroll-margin-top: 5rem;
  padding: 4.25rem 0 3.75rem;
  border-bottom: 1px solid var(--border);
}

.hero-text {
  max-width: 760px;
}

.eyebrow,
.section-label,
.project-type,
.note-meta,
.focus-kicker {
  margin: 0 0 0.7rem;
  color: var(--rose);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 0.7rem;
  font-size: 6.6rem;
  line-height: 0.92;
}

h2 {
  margin-bottom: 0.9rem;
  font-size: 2.45rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.35;
}

p {
  color: var(--muted);
}

.hero-statement {
  max-width: 700px;
  margin-bottom: 1.15rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.15rem;
  font-weight: 700;
  line-height: 1.08;
}

.hero-context {
  max-width: 650px;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  list-style: none;
}

.hero-proof li {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  min-width: 0;
  padding: 0 0.85rem;
  border-left: 1px solid var(--border);
}

.hero-proof li:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-proof strong {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.3;
}

.hero-proof span {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hero-button svg,
.hero-socials svg,
.demo-links svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.8;
}

.hero-brand-icon {
  width: 1rem;
  height: 1rem;
}

.hero-brand-icon-mono {
  filter: invert(88%);
}

.hero-button-primary {
  color: #080a0d;
  background: var(--teal);
}

.hero-button-secondary {
  border-color: var(--border-strong);
  color: var(--ink);
  background: rgba(16, 21, 27, 0.7);
}

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

.hero-button-primary:hover,
.hero-button-primary:focus-visible {
  /* Pin dark text on hover; otherwise the global a:hover turns it teal
     (teal-on-teal reads as washed-out grey). */
  color: #080a0d;
  background: #9af0e2;
}

.hero-button-secondary:hover,
.hero-button-secondary:focus-visible {
  border-color: rgba(126, 231, 214, 0.5);
  background: rgba(126, 231, 214, 0.08);
}

.hero-socials {
  display: flex;
  gap: 0.4rem;
  margin-left: 0.15rem;
}

.hero-socials a {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hero-socials a:hover,
.hero-socials a:focus-visible {
  border-color: rgba(244, 143, 177, 0.45);
  color: var(--ink);
  background: rgba(244, 143, 177, 0.08);
}

.project-link,
.contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: rgba(244, 247, 251, 0.3);
}

.project-link::after {
  content: " ->";
  margin-left: 0.25rem;
  color: var(--subtle);
  font-size: 0.9em;
}

.hero-demo {
  min-width: 0;
}

.hero-demo-heading {
  margin-bottom: 1rem;
}

.hero-demo-heading .eyebrow {
  margin-bottom: 0.35rem;
}

.hero-demo-heading h2 {
  margin-bottom: 0.35rem;
  font-size: 1.75rem;
}

.hero-demo-heading p:last-child {
  margin-bottom: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.model-widget {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.9);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.model-widget-header,
.knn-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.model-widget-header span,
.model-widget-header output,
.knn-control span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

#model-canvas {
  width: 100%;
  aspect-ratio: 1.45;
  min-height: 168px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  background: #0b0f14;
}

.knn-control input {
  width: 48%;
  min-width: 110px;
  accent-color: var(--rose);
}

.project-facts {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.project-facts div {
  display: grid;
  gap: 0.12rem;
}

.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.85rem;
}

.demo-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration-color: rgba(148, 163, 184, 0.35);
}

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

dt {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--text);
}

.section {
  scroll-margin-top: 5rem;
  padding: 5.4rem 0;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.7rem;
}

.section-heading p,
.section-copy {
  max-width: 720px;
}

.two-column,
.contact-section {
  display: grid;
  grid-template-columns: 0.38fr minmax(0, 1fr);
  gap: 4rem;
}

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

.focus-grid article,
.note-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 21, 27, 0.78);
}

.focus-grid p,
.note-card p {
  margin-bottom: 0;
}

.lifecycle-layout {
  display: grid;
  grid-template-columns: 0.34fr minmax(0, 1fr);
  gap: 1rem;
}

.lifecycle-steps {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.lifecycle-steps button,
.project-controls button {
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(16, 21, 27, 0.78);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.lifecycle-steps button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem;
  border-radius: 8px;
  text-align: left;
}

.lifecycle-steps button span {
  color: var(--rose);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.lifecycle-steps button:hover,
.project-controls button:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: rgba(125, 211, 252, 0.08);
}

.lifecycle-steps button.active,
.lifecycle-steps button[aria-selected="true"],
.project-controls button.active,
.project-controls button[aria-pressed="true"] {
  color: var(--ink);
  border-color: rgba(244, 143, 177, 0.45);
  background: rgba(244, 143, 177, 0.12);
}

.lifecycle-panels {
  min-height: 100%;
}

.lifecycle-panels article {
  height: 100%;
  min-height: 258px;
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 18%, rgba(125, 211, 252, 0.12), transparent 28%),
    rgba(16, 21, 27, 0.82);
}

.js-enabled .lifecycle-panels article:not(.active) {
  display: none;
}

.panel-kicker {
  margin-bottom: 0.55rem;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.projects-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  gap: 1rem;
  align-items: start;
}

.projects-main,
.project-list {
  display: grid;
  gap: 1rem;
}

.project-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: -0.35rem 0 1.2rem;
}

.project-controls button {
  min-height: 2.2rem;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
}

.project-filter-status {
  min-height: 1.3rem;
  margin: -0.45rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 21, 27, 0.86);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(0);
  transform-style: preserve-3d;
  transition: border-color 160ms ease, transform 180ms ease, box-shadow 160ms ease, background 160ms ease;
}

.project-card[hidden],
.project-card.is-filtered-out {
  display: none !important;
}

.project-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-2px);
  border-color: var(--border-strong);
  background: var(--paper);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.project-card.is-previewed {
  border-color: rgba(126, 231, 214, 0.38);
  box-shadow: 0 0 0 1px rgba(126, 231, 214, 0.08), 0 16px 36px rgba(0, 0, 0, 0.3);
}

.project-card[id] {
  scroll-margin-top: 6rem;
}

.project-card-featured {
  border-color: rgba(244, 143, 177, 0.35);
  background:
    linear-gradient(135deg, rgba(244, 143, 177, 0.12), rgba(125, 211, 252, 0.08)),
    var(--paper);
}

.project-thumb {
  grid-column: 1 / -1;
  position: relative;
  display: block;
  margin-bottom: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #0a0e13;
  transform: translateZ(0);
}

.project-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

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

.project-thumb:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.thumb-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.78);
  border: 1px solid rgba(126, 231, 214, 0.35);
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

.thumb-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.project-main p {
  max-width: 720px;
}

.project-facts {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.project-facts dd {
  color: var(--muted);
}

.project-link {
  justify-self: end;
  white-space: nowrap;
}

.project-inspector {
  position: sticky;
  top: 1.25rem;
  isolation: isolate;
  display: grid;
  gap: 0.9rem;
  min-height: 320px;
  padding: 1rem;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at var(--cx, 80%) var(--cy, 16%), rgba(125, 211, 252, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(16, 21, 27, 0.94), rgba(9, 13, 18, 0.92));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-inspector::before {
  content: "";
  position: absolute;
  inset: 0.65rem;
  z-index: -1;
  border-radius: 7px;
  border: 1px dashed rgba(148, 163, 184, 0.14);
  pointer-events: none;
}

.inspector-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.inspector-kicker,
.command-kicker {
  margin: 0;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.inspector-current {
  max-width: 10.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: right;
}

.project-inspector h3 {
  margin-bottom: 0;
  font-size: 1.18rem;
  text-wrap: balance;
}

.inspector-type {
  width: fit-content;
  padding: 0.28rem 0.48rem;
  border: 1px solid rgba(244, 143, 177, 0.22);
  border-radius: 6px;
  margin-bottom: 0;
  color: var(--rose);
  background: rgba(244, 143, 177, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.inspector-signals {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.inspector-signals div {
  padding-left: 0.75rem;
  border-left: 1px solid rgba(125, 211, 252, 0.22);
}

.inspector-signals dt,
.inspector-stack > span {
  margin-bottom: 0.24rem;
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.inspector-signals dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.inspector-stack {
  display: grid;
  gap: 0.45rem;
}

.inspector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  align-content: start;
}

.inspector-tags span {
  padding: 0.22rem 0.45rem;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(11, 15, 20, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
}

.inspector-link {
  align-self: end;
  justify-self: start;
  color: var(--ink);
  font-weight: 800;
  text-decoration-color: rgba(244, 247, 251, 0.3);
}

.inspector-link::after {
  content: " ->";
  color: var(--subtle);
}

.tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.26rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.notes-section {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 4rem;
}

.note-list {
  display: grid;
  gap: 0.85rem;
}

.note-card h3 {
  margin-bottom: 0.35rem;
}

.note-meta {
  color: var(--teal);
}

.skills-section {
  grid-template-columns: minmax(18rem, 0.44fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.skills-intro h2 {
  max-width: 8ch;
  margin-bottom: 0.8rem;
  font-size: 3.55rem;
  line-height: 0.98;
}

.skills-lede {
  max-width: 28rem;
  margin-bottom: 0;
  color: var(--text);
  text-wrap: pretty;
}

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

.skill-map {
  position: sticky;
  top: 1.25rem;
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
  padding: 1rem;
  border: 1px solid rgba(126, 231, 214, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 18%, rgba(126, 231, 214, 0.13), transparent 36%),
    rgba(12, 17, 23, 0.86);
}

.skill-map-header,
.skill-evidence-title,
.tool-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.skill-map-header,
.skill-evidence-title span,
.skill-projects > span,
.tool-group-heading > span {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

#skill-selection-state {
  color: var(--teal);
}

#skill-map-canvas {
  width: 100%;
  aspect-ratio: 1.42;
  min-height: 230px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 6px;
  background: rgba(5, 8, 12, 0.62);
}

.skill-evidence {
  display: grid;
  gap: 0.58rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.skill-evidence-title strong {
  color: var(--ink);
  font-size: 1rem;
  text-align: right;
}

.skill-evidence p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.skill-projects {
  display: grid;
  gap: 0.32rem;
}

#skill-project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
}

#skill-project-links a {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration-color: rgba(126, 231, 214, 0.32);
  text-underline-offset: 0.22rem;
}

#skill-project-links a::after {
  content: " ->";
  color: var(--teal);
}

#skill-project-links a:hover,
#skill-project-links a:focus-visible {
  color: var(--ink);
}

.skill-project-placeholder {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.tool-group {
  display: grid;
  gap: 0.8rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.tool-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

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

.tool-group-data .tool-list,
.tool-group-delivery .tool-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-group-backend .tool-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-group-database .tool-list,
.tool-group-systems .tool-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-group-systems {
  grid-column: 1 / -1;
}

.tool-group-systems .tool-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-chip-wide {
  grid-column: span 2;
}

.tool-chip {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 5.55rem;
  place-items: center;
  gap: 0.48rem;
  padding: 0.72rem 0.45rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(14, 20, 26, 0.68);
  cursor: pointer;
  transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms cubic-bezier(0.22, 1, 0.36, 1), transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-chip::after {
  content: "";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--rose);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 180ms ease, transform 180ms ease;
}

.tool-chip img,
.tool-lucide {
  width: 2.4rem;
  height: 2.4rem;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-chip img {
  object-fit: contain;
  filter: saturate(0.9);
}

.tool-chip img.icon-mono {
  filter: invert(0.92) saturate(0.65);
}

.tool-lucide {
  color: var(--teal);
  stroke-width: 1.6;
}

.tool-chip span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
}

.tool-chip:hover,
.tool-chip:focus-visible,
.tool-chip.is-skill-active {
  transform: translateY(-2px);
  border-color: rgba(126, 231, 214, 0.42);
  background: rgba(20, 29, 36, 0.94);
}

.tool-chip:hover img,
.tool-chip:hover .tool-lucide,
.tool-chip:focus-visible img,
.tool-chip:focus-visible .tool-lucide,
.tool-chip.is-skill-active img,
.tool-chip.is-skill-active .tool-lucide {
  transform: translateY(-1px) scale(1.05);
}

.tool-chip[aria-pressed="true"] {
  border-color: rgba(244, 143, 177, 0.5);
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 143, 177, 0.12), transparent 58%),
    rgba(20, 29, 36, 0.96);
}

.tool-chip[aria-pressed="true"]::after {
  opacity: 1;
  transform: scale(1);
}

.tool-chip:focus-visible {
  outline: 2px solid rgba(126, 231, 214, 0.62);
  outline-offset: 3px;
}

.contact-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.contact-list li + li {
  margin-top: 0.45rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--subtle);
  font-size: 0.95rem;
}

.site-footer p {
  margin-bottom: 0;
}

.command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 4, 8, 0.62);
  backdrop-filter: blur(10px);
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: grid;
  place-items: start center;
  padding: min(12vh, 6rem) 1rem 1rem;
}

.command-backdrop[hidden],
.command-palette[hidden] {
  display: none;
}

.command-shell {
  width: min(100%, 680px);
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(244, 143, 177, 0.16), transparent 36%),
    rgba(10, 14, 19, 0.96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

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

.command-header h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

.command-close {
  min-width: 2.6rem;
  min-height: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(16, 21, 27, 0.8);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
}

.command-search {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.command-search span {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.command-search input {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 0 0.8rem;
  color: var(--ink);
  background: rgba(5, 8, 12, 0.76);
}

.command-search input:focus {
  outline: 2px solid rgba(244, 143, 177, 0.55);
  outline-offset: 2px;
}

.command-list {
  display: grid;
  gap: 0.35rem;
  max-height: min(52vh, 430px);
  overflow: auto;
  padding: 0.8rem;
}

.command-list button {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.command-list button:hover,
.command-list button:focus-visible,
.command-list button.is-command-active {
  transform: translateX(2px);
  border-color: rgba(126, 231, 214, 0.28);
  background: rgba(126, 231, 214, 0.08);
}

.command-list span {
  color: var(--ink);
  font-weight: 800;
}

.command-list small {
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1120px) {
  body {
    padding-left: 0;
  }

  .scroll-progress {
    left: 0;
  }

  .site-header {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 9, 13, 0.96);
  }

  .nav {
    width: min(100% - 2rem, var(--max-width));
    height: auto;
    margin: 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 0;
  }

  .nav-note,
  .nav-meta {
    display: none;
  }

  .nav-links {
    width: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem 0.8rem;
  }

  .nav-links a {
    padding: 0;
    border-radius: 0;
  }

  .nav-links a:hover {
    background: transparent;
    transform: none;
  }

  .two-column,
  .lifecycle-layout,
  .notes-section,
  .projects-shell,
  .contact-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-inspector,
  .skill-map {
    position: static;
  }

  .skills-intro {
    max-width: 42rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 2rem;
    align-items: start;
    padding: 3.25rem 0;
  }

  .hero-demo {
    width: min(100%, 720px);
  }

  .hero,
  .section {
    scroll-margin-top: 6rem;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  main,
  .site-footer {
    width: min(100% - 1.5rem, var(--max-width));
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 0.65rem 0.9rem;
  }

  .nav-links a.active,
  .nav-links a[aria-current="page"] {
    background: transparent;
    color: var(--rose);
  }

  .hero,
  .section {
    scroll-margin-top: 12rem;
  }

  .project-card[id] {
    scroll-margin-top: 12rem;
  }

  .hero {
    gap: 1.75rem;
    padding: 2.4rem 0 2.2rem;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-statement {
    font-size: 2.15rem;
  }

  .hero-context {
    font-size: 0.98rem;
  }

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

  .hero-proof li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .hero-demo-heading p:last-child {
    display: none;
  }

  .hero-demo-heading h2 {
    font-size: 1.45rem;
  }

  #model-canvas {
    aspect-ratio: 1.75;
    min-height: 140px;
  }

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

  .command-trigger {
    display: none;
  }

  .project-inspector {
    min-height: auto;
  }

  .lifecycle-panels article {
    min-height: auto;
  }

  .project-link {
    justify-self: start;
  }

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

  .skills-section h2 {
    max-width: none;
    font-size: 2.65rem;
  }

  .tool-group-data .tool-list,
  .tool-group-backend .tool-list,
  .tool-group-database .tool-list,
  .tool-group-delivery .tool-list,
  .tool-group-systems .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #skill-map-canvas {
    min-height: 210px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 3.5rem;
  }

  .hero-statement {
    font-size: 1.85rem;
  }

  .hero-button {
    flex: 1 1 10rem;
  }

  .hero-socials {
    width: 100%;
    margin: 0.1rem 0 0;
  }

  .command-trigger b {
    display: none;
  }

  .command-trigger {
    right: 0.8rem;
    bottom: 0.8rem;
  }

  .tool-chip {
    min-height: 5.2rem;
    padding-inline: 0.35rem;
  }

  .tool-chip img,
  .tool-lucide {
    width: 2.15rem;
    height: 2.15rem;
  }
}

/* ============================================================
   Tech-feel upgrades: spotlight, reveal, card glow, and the
   interactive KNN classifier readout.
   ============================================================ */

/* Hero cursor spotlight */
.hero {
  position: relative;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    460px circle at var(--spot-x, 28%) var(--spot-y, 22%),
    rgba(125, 211, 252, 0.12),
    rgba(244, 143, 177, 0.06) 38%,
    transparent 62%
  );
  opacity: 0;
  transition: opacity 320ms ease;
}

.hero.spotlight-on .hero-glow {
  opacity: 1;
}

/* KNN classifier widget */
.model-canvas-wrap {
  position: relative;
}

#model-canvas {
  cursor: grab;
  touch-action: none;
}

#model-canvas:active {
  cursor: grabbing;
}

.knn-readout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.45rem 0.7rem;
}

.knn-pred-label {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.knn-pred {
  justify-self: start;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 800;
  transition: color 220ms ease;
}

.knn-votes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.knn-vote {
  display: grid;
  gap: 0.24rem;
}

.knn-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.knn-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 240ms ease;
}

.knn-vote b {
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

/* Card cursor glow */
.has-glow {
  position: relative;
  isolation: isolate;
}

.has-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    240px circle at var(--cx, -200px) var(--cy, -200px),
    rgba(125, 211, 252, 0.16),
    rgba(244, 143, 177, 0.08) 42%,
    transparent 68%
  );
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}

.has-glow:hover::before {
  opacity: 1;
}

/* ============================================================
   Anton Skvortsov-inspired polish: hero mask-reveal,
   kinetic marquee, and magnetic buttons.
   ============================================================ */

/* Hero entrance: masked title rise + staggered fade-up */
.hero-title .reveal-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.js-enabled .hero-title .reveal-inner {
  display: inline-block;
  transform: translateY(115%);
  animation: hero-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--rise-delay, 0ms);
}

.js-enabled .hero-rise {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--rise-delay, 0ms);
}

@keyframes hero-rise {
  to { transform: translateY(0); }
}

@keyframes hero-fade-up {
  to { opacity: 1; transform: none; }
}

/* Kinetic marquee band */
.marquee {
  margin: 0;
  overflow: hidden;
  padding: 0.95rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(168, 140, 255, 0.06), transparent 62%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 42s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 1.45rem;
  padding-right: 1.45rem;
}

/* Pixel-font ticker: alternating green / purple words */
.marquee-group span {
  color: var(--pixel-green);
  font-family: "Press Start 2P", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.58rem, 0.9vw, 0.78rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0.88;
  transition: opacity 200ms ease, text-shadow 200ms ease;
}

.marquee-group span:nth-of-type(even) {
  color: var(--pixel-purple);
}

.marquee-group span:hover {
  opacity: 1;
  text-shadow: 0 0 12px currentColor;
}

.marquee-group i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--pixel-purple);
  font-size: 0;
  transform: rotate(45deg);
  opacity: 0.7;
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

.magnetic-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ambient-aurora span {
    animation: none;
  }

  .js-enabled .hero-title .reveal-inner,
  .js-enabled .hero-rise {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }


  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
