:root {
  color-scheme: dark;
  --bg: #0d101a;
  --panel: #151b29;
  --surface: #101723;
  --line: #303a4c;
  --text: #f3f6f0;
  --muted: #b4bdcc;
  --lime: #dafa81;
  --sky: #a5c5ff;
  --mono: "Space Mono", ui-monospace, monospace;
  color: var(--text);
  background: var(--bg);
  font-family: "Geist", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 76% 0, #1a2338 0, transparent 34rem); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 4px; }
h1, h2, h3, h4, figure { margin: 0; }
p { color: var(--muted); line-height: 1.65; margin: 0 0 .95rem; }
.wrap { width: min(1160px, calc(100% - 76px)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 1rem; left: 1rem; transform: translateY(-180%); background: var(--lime); color: var(--bg); padding: .7rem; }
.skip:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 3; background: #0d101af2; border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.header-inner { min-height: 67px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-inner a { text-decoration: none; }
.brand { display: flex; gap: .7rem; align-items: center; font-weight: 700; white-space: nowrap; }
.monogram { display: grid; place-items: center; min-width: 33px; height: 33px; border-radius: 6px; color: var(--bg); background: var(--lime); font: 700 .86rem var(--mono); }
nav { display: flex; gap: clamp(.7rem, 2.8vw, 2.1rem); align-items: center; }
nav a { color: var(--muted); font-size: .92rem; }
nav a:hover { color: var(--lime); }
.languages, .routes { display: inline-flex; gap: .32rem; }
.languages button, .routes button { color: var(--muted); background: #101724; border: 1px solid var(--line); border-radius: 6px; min-height: 38px; padding: .36rem .6rem; font-size: .88rem; }
.languages button[aria-pressed=true], .routes button[aria-pressed=true] { color: #141d14; border-color: var(--lime); background: var(--lime); font-weight: 700; }
.hero { padding-top: clamp(3.4rem, 8vw, 6.8rem); padding-bottom: 2.25rem; }
.eyebrow { color: var(--sky); font: .88rem/1.45 var(--mono); letter-spacing: .075em; text-transform: uppercase; margin: 0 0 .65rem; }
h1 { font-size: clamp(3.1rem, 7.5vw, 7.15rem); line-height: .96; letter-spacing: -.075em; }
h1 em { color: var(--lime); font-style: normal; }
.intro { max-width: 48rem; margin-top: 1.2rem; font-size: clamp(1rem, 2vw, 1.21rem); }
.availability { display: flex; align-items: center; gap: .6rem; color: var(--lime); margin: 0 0 1.2rem; font-size: .94rem; }
.availability > span[aria-hidden] { height: 7px; width: 7px; border-radius: 50%; background: var(--lime); flex: none; }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: .58rem .9rem; border: 1px solid transparent; border-radius: 6px; font-weight: 700; text-decoration: none; }
.primary { background: var(--lime); color: #141d14; }
.primary:hover { background: #edffb8; }
.secondary { border-color: #4b586c; background: #141b28; }
.secondary:hover { background: #26334a; }
.system { border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(#283346 1px, transparent 1px), var(--surface); background-size: 18px 18px; overflow: hidden; padding: clamp(1rem, 3vw, 2rem); }
.system-header { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.system-header h2 { font-size: clamp(1.35rem, 3vw, 2.1rem); letter-spacing: -.045em; }
.system-header .eyebrow { margin-bottom: .3rem; }
.flow { margin: 1.6rem 0; display: grid; grid-template-columns: 1fr minmax(18px, .24fr) 1fr 2.05fr 1.15fr; align-items: center; }
.node { min-width: 0; padding: .75rem .4rem; border: 1px solid #506283; border-radius: 7px; background: #192437; text-align: center; }
.node strong, .node small { display: block; overflow-wrap: anywhere; }
.node small { color: var(--muted); margin-top: .26rem; line-height: 1.3; font-size: .8rem; }
.flow-input, .flow-output { border-color: #73834d; }
.flow-routes { display: grid; gap: .65rem; min-width: 0; }
.flow-lane { display: grid; grid-template-columns: .24fr 1fr .24fr; align-items: center; min-width: 0; opacity: .58; }
.system[data-route=sql] .sql, .system[data-route=vector] .vector { opacity: 1; }
.system[data-route=sql] .sql .node, .system[data-route=vector] .vector .node { border-color: var(--lime); background: #243329; }
.trace { height: 2px; position: relative; background: repeating-linear-gradient(90deg,#667796 0 5px,transparent 5px 9px); }
.trace::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); top: -2px; left: 0; opacity: 0; box-shadow: 0 0 9px #ccfc7290; }
.trace-in::after, .system[data-route=sql] .sql .trace::after, .system[data-route=vector] .vector .trace::after { animation: packet 2.8s linear infinite; }
.flow-lane .trace:last-child::after { animation-delay: .65s !important; }
@keyframes packet { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 75% { left: calc(100% - 7px); opacity: 1; } 85%,100% { left: calc(100% - 7px); opacity: 0; } }
.workflow-summary { padding: .75rem .9rem; margin: 0; border: 1px solid var(--line); border-radius: 7px; background: #121b2a; }
.workflow-summary strong, .workflow-summary span { display: block; }
.workflow-summary strong { color: var(--text); }
.overview { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.3rem 0 0; border-block: 1px solid var(--line); }
.overview > div { padding: 1rem 1.1rem; }
.overview > div + div { border-left: 1px solid var(--line); }
.overview dt { color: var(--lime); font: 700 clamp(1.28rem, 3vw, 2.35rem) var(--mono); letter-spacing: -.065em; }
.overview dd { margin: .2rem 0 0; color: var(--muted); line-height: 1.5; }
.section { margin-top: clamp(2.9rem, 6.5vw, 5.6rem); scroll-margin-top: 5.9rem; }
.section-title { margin-bottom: 1.2rem; }
.section-title .eyebrow { margin-bottom: .32rem; }
.section h2 { font-size: clamp(2.25rem, 4.8vw, 4rem); line-height: 1.05; letter-spacing: -.064em; }
h3 { font-size: 1.25rem; line-height: 1.18; letter-spacing: -.025em; }
.projects { display: grid; gap: .95rem; }
.project { display: grid; grid-template-columns: 1.06fr .94fr; gap: .9rem clamp(1.35rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 11px; padding: clamp(1rem, 3.3vw, 2.25rem); background: var(--panel); scroll-margin-top: 5.9rem; }
.project-intro { grid-column: 1; }
.project h3 { margin-bottom: .7rem; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.project .eyebrow { font-size: .83rem; }
.tags { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { border: 1px solid #3b465e; background: #1b2334; color: #e0e8f8; font-size: .87rem; line-height: 1.25; border-radius: 4px; padding: .35rem .5rem; }
.project-demo { grid-column: 1; min-width: 0; }
.project-demo video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; background: #080b13; border: 1px solid var(--line); border-radius: 7px; }
.project-demo figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem .75rem; color: var(--muted); font-size: .9rem; padding-top: .45rem; }
.project-details { grid-column: 2; grid-row: 1 / span 2; align-self: start; padding-left: 1rem; border-left: 1px solid var(--line); }
.project-details h4 { color: var(--lime); font: .9rem var(--mono); }
.project-details ul { padding-left: 1.12rem; color: var(--muted); line-height: 1.65; margin: .65rem 0 0; }
.project-details li + li { margin-top: .55rem; }
.project-details li::marker { color: var(--sky); }
.timeline, .stack-grid, .education-grid { display: grid; gap: .75rem; }
.timeline { grid-template-columns: repeat(3, 1fr); }
.stack-grid { grid-template-columns: repeat(3, 1fr); }
.education-grid { grid-template-columns: repeat(2, 1fr); }
.timeline article, .stack-grid > div, .education-grid article { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 1.1rem; }
.timeline h3, .education-grid h3 { margin-bottom: .5rem; }
.timeline p:last-child, .education-grid p:last-child { margin-bottom: 0; }
.timeline a, .project-demo a, .email { color: var(--sky); text-underline-offset: 3px; }
.timeline a:hover, .project-demo a:hover, .email:hover { color: var(--lime); }
.contact-panel { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; padding: clamp(1rem, 4vw, 2.4rem); background: linear-gradient(120deg,#151e2d,#1d2a28); border: 1px solid #43544f; border-radius: 11px; }
.contact-panel p:not(.eyebrow) { margin-top: .75rem; }
.email { overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .55rem 1rem; justify-content: space-between; margin-top: 2.5rem; padding: 1.15rem 0; color: var(--muted); font-size: .94rem; }
@media (max-width: 850px) {
  .wrap { width: calc(100% - 46px); }
  .timeline, .stack-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 630px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding-block: .55rem; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .languages { justify-self: end; }
  h1 { font-size: clamp(2.9rem, 10vw, 4.2rem); }
  .system-header { align-items: start; }
  .flow { grid-template-columns: 1fr; justify-items: stretch; gap: .35rem; }
  .flow > .trace { display: none; }
  .flow-routes { grid-template-columns: 1fr 1fr; gap: .4rem; }
  .flow-lane { display: block; }
  .flow-lane .trace { display: none; }
  .flow-input, .flow-router, .flow-routes { position: relative; margin-bottom: 6px; }
  .flow-input::after, .flow-router::after, .flow-routes::after { content: ""; height: 7px; width: 2px; background: var(--lime); position: absolute; bottom: -9px; left: 50%; animation: mobile-packet 2s ease-in-out infinite; }
  .flow-router::after { animation-delay: .25s; }
  .flow-routes::after { animation-delay: .5s; }
  @keyframes mobile-packet { 0%,100% { opacity: .45; } 45% { opacity: 1; } }
  .overview { grid-template-columns: 1fr; }
  .overview > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .overview > div { padding: .65rem .2rem; }
  .project, .timeline, .stack-grid, .education-grid { grid-template-columns: 1fr; }
  .project-details { grid-column: 1; grid-row: auto; padding: .75rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
}
