:root {
  --ink: #102a2b;
  --muted: #5b6c68;
  --paper: #f3f0e7;
  --paper-2: #e8e4d9;
  --card: #fbfaf5;
  --line: #c9cec5;
  --green: #0e5a4f;
  --green-2: #0b453d;
  --lime: #c9f26b;
  --orange: #e96c3d;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
  --shadow: 0 22px 60px rgba(16, 42, 43, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
}
.cursor-glow {
  position: fixed; width: 420px; height: 420px; left: -500px; top: -500px;
  border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(201,242,107,.18), rgba(201,242,107,0) 68%);
  transform: translate(-50%, -50%);
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 14px;
  z-index: 10;
  background: rgba(243, 240, 231, .88);
  border: 1px solid rgba(16, 42, 43, .15);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--ink); color: var(--lime); font: 500 12px var(--mono);
}
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { font-size: 13px; font-weight: 700; text-decoration: none; }
.site-nav a:hover { color: var(--orange); }
.site-nav .nav-resume { padding: 8px 13px; border: 1px solid var(--ink); }
.menu-button { display: none; border: 0; background: transparent; font: 700 13px var(--sans); color: var(--ink); }

.section { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 112px 0; }
.eyebrow {
  margin: 0 0 18px;
  font: 500 12px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
}
.status-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 9px;
  background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 5px rgba(233,108,61,.13);
}
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 900px; margin-bottom: 24px; font-size: clamp(48px, 7.2vw, 96px); line-height: .98; letter-spacing: -.06em; }
h2 { max-width: 760px; margin-bottom: 26px; font-size: clamp(36px, 5vw, 64px); line-height: 1.02; letter-spacing: -.05em; }
h3 { letter-spacing: -.025em; }

.hero { min-height: calc(100vh - 85px); padding-top: 100px; display: grid; grid-template-columns: 1.45fr .8fr; gap: 64px 70px; align-content: center; }
.hero-intro { max-width: 730px; font-size: clamp(17px, 2vw, 21px); color: var(--muted); }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex; min-height: 48px; padding: 12px 19px; align-items: center; justify-content: center;
  border: 1px solid var(--ink); text-decoration: none; font-size: 13px; font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--ink); color: var(--paper); }
.button.primary:hover { background: var(--green); }
.button.secondary { background: transparent; }
.button.secondary:hover { background: var(--card); }

.hero-panel { align-self: center; border: 1px solid var(--ink); background: var(--green-2); color: #eff6e7; box-shadow: 14px 14px 0 var(--lime); }
.terminal-bar { height: 40px; padding: 0 14px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid rgba(255,255,255,.17); }
.terminal-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.terminal-bar span:nth-child(2) { background: var(--orange); }
.terminal-bar span:nth-child(3) { background: #f5c25b; }
.terminal-bar p { margin: 0 0 0 auto; font: 400 10px var(--mono); opacity: .65; }
pre { margin: 0; padding: 30px; overflow: auto; font: 400 13px/1.8 var(--mono); }
.key { color: var(--lime); }
.system-map { height: 90px; margin: 0 20px 20px; position: relative; border-top: 1px solid rgba(255,255,255,.14); }
.map-node { position: absolute; top: 33px; padding: 7px 9px; z-index: 2; border: 1px solid rgba(255,255,255,.3); background: var(--green-2); font: 500 9px var(--mono); letter-spacing: .06em; }
.map-node span { margin-right: 5px; color: var(--lime); }
.node-data { left: 4px; }.node-model { left: 50%; transform: translateX(-50%); }.node-ship { right: 4px; }
.map-line { position: absolute; top: 48px; height: 1px; background: rgba(201,242,107,.7); overflow: hidden; }
.map-line::after { content: ""; display: block; width: 30%; height: 100%; background: white; animation: signal 2.2s linear infinite; }
.line-a { left: 70px; right: 58%; }.line-b { left: 58%; right: 66px; }
.map-pulse { position: absolute; left: 50%; top: 44px; width: 9px; height: 9px; margin-left: -4px; border: 1px solid var(--lime); border-radius: 50%; animation: pulse 2s ease-out infinite; }
@keyframes signal { from { transform: translateX(-120%); } to { transform: translateX(350%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201,242,107,.6); } 100% { box-shadow: 0 0 0 14px rgba(201,242,107,0); } }
.hero-metrics { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-metrics article { padding: 24px 28px; border-right: 1px solid var(--line); }
.hero-metrics article:last-child { border-right: 0; }
.hero-metrics strong { display: block; font-size: 29px; line-height: 1.1; letter-spacing: -.04em; }
.hero-metrics span { font-size: 12px; color: var(--muted); }
.marquee { overflow: hidden; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--lime); }
.marquee-track { width: max-content; display: flex; align-items: center; gap: 28px; animation: marquee 28s linear infinite; font: 500 12px var(--mono); }
.marquee-track i { color: var(--orange); font-style: normal; font-size: 8px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.work-section { width: 100%; max-width: none; padding-left: max(20px, calc((100% - 1120px)/2)); padding-right: max(20px, calc((100% - 1120px)/2)); background: var(--ink); color: #f4f2e9; }
.work-section .eyebrow { color: var(--lime); }
.work-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 70px; }
.work-story { padding: 36px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.04); }
.story-meta { margin-bottom: 35px; display: flex; justify-content: space-between; gap: 20px; font: 400 11px var(--mono); color: var(--lime); }
.work-story h3 { margin-bottom: 18px; font-size: 30px; }
.work-story > p { max-width: 700px; color: #cfd7d1; font-size: 17px; }
.evidence-grid { margin: 34px 0; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid rgba(255,255,255,.2); }
.evidence-grid div { padding: 20px; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
.evidence-grid div:nth-child(2n) { border-right: 0; }
.evidence-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.evidence-grid strong { display: block; color: var(--lime); font-size: 27px; }
.evidence-grid span { font-size: 12px; color: #b7c3bc; }
.text-link { font: 500 12px var(--mono); color: var(--lime); text-decoration: none; }
.text-link span { margin-left: 6px; }
.process { display: flex; flex-direction: column; justify-content: center; }
.process-item { padding: 22px 0; display: grid; grid-template-columns: 45px 1fr; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.2); }
.process-item > span { font: 500 11px var(--mono); color: var(--orange); }
.process-item strong { font-size: 17px; }
.process-item p { margin: 5px 0 0; color: #b7c3bc; font-size: 13px; }

.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.filters { display: flex; gap: 7px; margin-bottom: 31px; }
.filter { padding: 8px 11px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 11px var(--mono); cursor: pointer; }
.filter.active, .filter:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-card {
  min-height: 410px; padding: 30px; display: flex; flex-direction: column;
  border: 1px solid var(--line); background: var(--card);
  transition: transform .25s ease, box-shadow .25s ease, opacity .2s ease;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-card.featured { background: var(--green); color: #f7f4eb; }
.project-card[hidden] { display: none; }
.project-visual { height: 155px; margin: -30px -30px 24px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.featured .project-visual { border-color: rgba(255,255,255,.2); background: #093f38; }
.aqua-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-grid { position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 32px 32px; }
.chart-baseline, .chart-model { fill: none; stroke-width: 3; stroke-linecap: round; }
.chart-baseline { stroke: rgba(255,255,255,.35); stroke-dasharray: 5 7; }
.chart-model { stroke: var(--lime); filter: drop-shadow(0 0 6px rgba(201,242,107,.35)); }
.aqua-visual circle { fill: var(--orange); }
.visual-label { position: absolute; left: 18px; right: 18px; bottom: 13px; display: flex; justify-content: space-between; font: 400 9px var(--mono); text-transform: uppercase; }
.visual-label strong { color: var(--lime); }
.agent-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.agent-visual path { stroke: rgba(14,90,79,.35); stroke-width: 1; stroke-dasharray: 4 5; }
.agent-center, .agent-dot { position: absolute; z-index: 2; display: grid; place-items: center; border-radius: 50%; font: 500 8px var(--mono); }
.agent-center { width: 55px; height: 55px; left: calc(50% - 27px); top: 47px; background: var(--green); color: white; box-shadow: 0 0 0 8px rgba(14,90,79,.1); }
.agent-dot { width: 39px; height: 39px; border: 1px solid var(--green); background: var(--card); color: var(--green); }
.a1 { left: 42px; top: 10px; }.a2 { right: 42px; top: 10px; }.a3 { left: 20px; bottom: 10px; }.a4 { right: 20px; bottom: 10px; }.a5 { left: calc(50% - 19px); bottom: -4px; }
.sql-visual { padding: 17px; font-family: var(--mono); }
.query-chip { display: inline-block; padding: 6px 9px; background: var(--card); border: 1px solid var(--line); font-size: 9px; }
.pipeline-chip, .pipeline-arrow { display: inline-block; margin-top: 14px; font-size: 8px; }
.pipeline-chip { padding: 5px 7px; border: 1px solid var(--green); color: var(--green); }
.pipeline-chip.success { background: var(--green); color: white; }
.pipeline-arrow { margin: 0 4px; color: var(--orange); }
.sql-code { margin-top: 14px; padding: 9px 11px; background: var(--ink); color: var(--lime); font-size: 9px; line-height: 1.5; }
.rag-visual { display: flex; align-items: center; padding: 25px 30px; }
.paper-stack { width: 75px; height: 95px; position: relative; }
.paper-stack span { position: absolute; inset: 0; border: 1px solid var(--green); background: var(--card); }
.paper-stack span:nth-child(1) { transform: rotate(-8deg); }.paper-stack span:nth-child(2) { transform: rotate(5deg); }.paper-stack span:nth-child(3) { transform: none; background: linear-gradient(var(--card) 20%, transparent 20%), repeating-linear-gradient(transparent 0 10px, rgba(14,90,79,.15) 10px 12px); }
.retrieval-beam { flex: 1; height: 1px; position: relative; background: var(--orange); }
.retrieval-beam::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 7px solid var(--orange); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.citation-answer { width: 150px; padding: 17px; border: 1px solid var(--green); background: var(--card); font: 400 9px/1.8 var(--mono); }
.citation-answer b { color: var(--orange); }
.project-top { display: flex; justify-content: space-between; font: 500 11px var(--mono); color: var(--orange); }
.project-top a { font-size: 20px; text-decoration: none; }
.project-card h3 { margin: 32px 0 12px; font-size: 29px; }
.project-card p { color: var(--muted); font-size: 15px; }
.project-card.featured p { color: #d8e4de; }
.project-card ul { margin: 14px 0 26px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.project-card.featured ul { color: #d8e4de; }
.card-result { margin-top: auto; padding-top: 20px; display: flex; align-items: end; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); }
.featured .card-result { border-color: rgba(255,255,255,.25); }
.card-result span { font: 500 10px var(--mono); text-transform: uppercase; }
.card-result strong { text-align: right; font-size: 16px; }

.about-section { border-top: 1px solid var(--line); }
.journey-section { border-top: 1px solid var(--line); }
.journey-intro { max-width: 390px; margin-bottom: 31px; color: var(--muted); font-size: 15px; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 54px; height: 1px; background: var(--line); }
.timeline article { position: relative; padding-right: 34px; }
.timeline-year { margin-bottom: 25px; font: 500 12px var(--mono); color: var(--green); }
.timeline-dot { width: 11px; height: 11px; margin-bottom: 29px; position: relative; z-index: 1; border: 2px solid var(--green); border-radius: 50%; background: var(--paper); }
.timeline-dot.active { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 7px rgba(233,108,61,.13); }
.timeline article span { font: 500 10px var(--mono); color: var(--orange); text-transform: uppercase; }
.timeline h3 { margin: 8px 0; font-size: 18px; }
.timeline p { color: var(--muted); font-size: 13px; }
.about-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 75px; }
.about-copy p { font-size: 19px; color: var(--muted); }
.principles { border-top: 1px solid var(--line); }
.principles article { padding: 25px 0; display: grid; grid-template-columns: 40px 1fr 1.3fr; gap: 14px; border-bottom: 1px solid var(--line); }
.principles span { font: 500 11px var(--mono); color: var(--orange); }
.principles h3 { margin: 0; font-size: 16px; }
.principles p { margin: 0; color: var(--muted); font-size: 13px; }
.toolbelt { margin-top: 75px; display: flex; flex-wrap: wrap; gap: 8px; }
.toolbelt span { padding: 9px 12px; border: 1px solid var(--line); background: var(--card); font: 400 11px var(--mono); }

.contact-section { padding: 85px; background: var(--lime); }
.contact-section h2 { max-width: 850px; }
.contact-section > p:not(.eyebrow) { font-size: 18px; }
.site-footer {
  width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0;
  display: flex; justify-content: space-between; border-top: 1px solid var(--line);
  color: var(--muted); font: 400 11px var(--mono);
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .cursor-glow { display: none; }
  .site-header { width: calc(100% - 24px); }
  .menu-button { display: block; }
  .site-nav {
    position: fixed; top: 74px; left: 12px; right: 12px; padding: 26px;
    display: none; flex-direction: column; align-items: stretch; gap: 18px;
    background: var(--paper); border: 1px solid var(--ink); box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .section { width: calc(100% - 32px); padding: 78px 0; }
  .hero { display: block; min-height: auto; padding-top: 85px; }
  .hero-panel { margin: 50px 12px 60px 0; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-metrics article:nth-child(2) { border-right: 0; }
  .hero-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .work-section { width: 100%; padding-left: 16px; padding-right: 16px; }
  .work-grid, .about-grid { grid-template-columns: 1fr; gap: 45px; }
  .split-heading { display: block; }
  .filters { overflow-x: auto; padding-bottom: 6px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 370px; }
  .principles article { grid-template-columns: 35px 1fr; }
  .principles p { grid-column: 2; }
  .contact-section { width: calc(100% - 24px); padding: 55px 24px; }
  .timeline { grid-template-columns: 1fr; padding-left: 24px; }
  .timeline::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .timeline article { padding: 0 0 38px 20px; }
  .timeline-year { margin-bottom: 6px; }
  .timeline-dot { position: absolute; left: -24px; top: 5px; }
  .site-footer { width: calc(100% - 32px); display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .project-card, .button { transition: none; }
  .marquee-track, .map-line::after, .map-pulse { animation: none; }
}
