:root {
  --ink: #071522;
  --ink-2: #0d2233;
  --paper: #f4f0e8;
  --paper-2: #ebe4d7;
  --white: #fffdf8;
  --blue: #2d6cdf;
  --cyan: #4ed2c3;
  --orange: #f08a5d;
  --yellow: #e8c547;
  --muted: #66727b;
  --line: rgba(7, 21, 34, 0.16);
  --radius: 22px;
  --shadow: 0 24px 80px rgba(7, 21, 34, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
canvas { display: block; max-width: 100%; }
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 1000;
  padding: .7rem 1rem; color: var(--white); background: var(--blue); border-radius: 8px;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  width: 100%; min-height: 76px; padding: 0 clamp(1.2rem, 4vw, 4.5rem);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem;
  color: var(--white); background: rgba(7, 21, 34, .94); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand, .site-header nav, .nav-cta { display: flex; align-items: center; }
.brand { gap: .8rem; font-weight: 750; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font-size: .72rem; letter-spacing: .08em;
}
.site-header nav { gap: 1.6rem; color: #c7d0d6; font-size: .9rem; }
.site-header nav a { transition: color .2s ease; }
.site-header nav a:hover { color: var(--white); }
.nav-cta { justify-self: end; padding: .58rem 1rem; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; font-size: .85rem; }
.nav-cta:hover { background: var(--white); color: var(--ink); }

.hero {
  min-height: calc(100vh - 76px); padding: clamp(4rem, 7vw, 7rem) clamp(1.2rem, 6vw, 6.5rem);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); align-items: center; gap: clamp(2.5rem, 6vw, 7rem);
  color: var(--white); background:
    radial-gradient(circle at 18% 18%, rgba(45,108,223,.22), transparent 32%),
    radial-gradient(circle at 78% 78%, rgba(78,210,195,.12), transparent 34%), var(--ink);
  overflow: hidden;
}
.eyebrow {
  margin: 0 0 1rem; color: var(--blue); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.hero .eyebrow { color: #9bbcff; }
.hero .eyebrow span { display: inline-block; width: 7px; height: 7px; margin-right: .6rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 6px rgba(78,210,195,.12); }
.hero h1, .section-heading h2, .about h2, .contact h2 {
  margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; line-height: .98;
}
.hero h1 { max-width: 850px; font-size: clamp(3.7rem, 7vw, 7.4rem); }
.hero h1 em, .contact h2 em { color: var(--cyan); font-weight: 400; }
.hero-lede { max-width: 680px; margin: 2rem 0 0; color: #c8d1d7; font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.hero-actions, .case-actions, .contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; }
.hero-actions { margin-top: 2.2rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .9rem;
  min-height: 48px; padding: .78rem 1.2rem; border: 1px solid transparent; border-radius: 999px; font-weight: 750; font-size: .9rem; transition: transform .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--blue); }
.button-primary:hover { background: #1f59c2; }
.button-ghost { color: var(--white); border-color: rgba(255,255,255,.28); }
.button-ghost:hover { background: rgba(255,255,255,.08); }
.button-light { color: var(--ink); background: var(--white); }
.hero-facts { margin: 3.4rem 0 0; padding: 0; display: flex; gap: 2.3rem; }
.hero-facts div { padding-left: 1rem; border-left: 1px solid rgba(255,255,255,.18); }
.hero-facts dt { color: #8e9aa3; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.hero-facts dd { margin: .2rem 0 0; font-size: .9rem; font-weight: 700; }
.hero-visual {
  position: relative; padding: 1.1rem; border: 1px solid rgba(255,255,255,.16); border-radius: 30px;
  background: rgba(255,255,255,.04); box-shadow: 0 40px 120px rgba(0,0,0,.24); transform: rotate(1.5deg);
}
.visual-toolbar { height: 28px; display: flex; align-items: center; gap: 6px; color: #92a0aa; font-family: Consolas, monospace; font-size: .68rem; }
.visual-toolbar span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25); }
.visual-toolbar b { margin-left: auto; font-weight: 400; }
.hero-visual canvas { width: 100%; border-radius: 18px; background: rgba(3,14,23,.55); }
.visual-note { position: absolute; padding: .8rem 1rem; display: grid; min-width: 145px; border-radius: 14px; color: var(--ink); background: var(--white); box-shadow: var(--shadow); transform: rotate(-2deg); }
.visual-note strong { font-size: 1rem; }
.visual-note span { color: var(--muted); font-size: .7rem; }
.note-a { left: -35px; bottom: 60px; }
.note-b { right: -25px; top: 80px; background: var(--yellow); }

.marquee { overflow: hidden; padding: .85rem 0; color: var(--ink); background: var(--yellow); font-size: .72rem; font-weight: 850; letter-spacing: .15em; white-space: nowrap; }
.marquee div { width: max-content; min-width: 100%; text-align: center; }
.marquee i { display: inline-block; width: 5px; height: 5px; margin: 0 1.5rem; border-radius: 50%; background: var(--ink); vertical-align: middle; }

.section { padding: clamp(5rem, 9vw, 9rem) clamp(1.2rem, 6vw, 6.5rem); }
.section-heading { max-width: 870px; margin-bottom: 3.2rem; }
.section-heading h2, .about h2, .contact h2 { font-size: clamp(3rem, 5.5vw, 6rem); }
.section-heading > p:last-child { max-width: 650px; color: var(--muted); font-size: 1.05rem; }
.section-heading.compact { margin-bottom: 3.5rem; }

.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.4rem; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset; }
.project-card:nth-child(1) { grid-column: span 7; }
.project-card:nth-child(2) { grid-column: span 5; }
.project-card:nth-child(3) { grid-column: 4 / span 7; }
.project-index { padding: 1.1rem 1.3rem; font-family: Consolas, monospace; font-size: .7rem; letter-spacing: .12em; border-bottom: 1px solid var(--line); }
.project-card > canvas { width: 100%; height: 220px; background: var(--ink-2); }
.covid-card > canvas { background: #1a3150; }
.stock-card > canvas { background: #122a26; }
.project-card-body { padding: 1.5rem; }
.project-meta, .skill-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.project-meta span, .skill-list span { padding: .27rem .58rem; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .68rem; }
.project-card h3 { margin: 1rem 0 .5rem; font-size: clamp(1.7rem, 2.3vw, 2.35rem); line-height: 1.05; letter-spacing: -.035em; }
.project-card p { margin: 0; color: var(--muted); }
.mini-metrics { margin: 1.4rem 0; padding: 1rem 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mini-metrics div + div { padding-left: .9rem; border-left: 1px solid var(--line); }
.mini-metrics dt { font-size: 1.05rem; font-weight: 850; }
.mini-metrics dd { margin: .05rem 0 0; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.text-link { padding: 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font-weight: 800; font-size: .85rem; }
.text-link span { margin-left: .5rem; }

.case-study-shell { margin-top: 6rem; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; color: var(--white); background: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.case-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,.13); }
.case-tabs button { flex: 1; padding: 1rem; border: 0; color: #8f9ba4; background: transparent; cursor: pointer; font-size: .82rem; font-weight: 800; }
.case-tabs button[aria-selected="true"] { color: var(--white); background: rgba(255,255,255,.06); box-shadow: inset 0 -3px var(--cyan); }
.case-panel { padding: clamp(1.4rem, 4vw, 4rem); display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; }
.case-kicker { color: var(--cyan); font-family: Consolas, monospace; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; }
.case-panel h3 { margin: .5rem 0 1rem; font-family: Georgia, serif; font-size: clamp(2.3rem, 4vw, 4.2rem); font-weight: 400; line-height: 1.03; letter-spacing: -.045em; }
.case-summary { color: #c2cbd1; font-size: 1.03rem; }
.case-columns { margin: 2rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.case-columns h4 { margin: 0 0 .4rem; color: var(--yellow); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.case-columns p { margin: 0; color: #9ca8b1; font-size: .78rem; }
.source-link { color: #c2cbd1; border-bottom: 1px solid rgba(255,255,255,.28); font-size: .8rem; }
.case-chart { padding: 1rem; border: 1px solid rgba(255,255,255,.13); border-radius: 18px; background: rgba(255,255,255,.04); }
.chart-head { min-height: 52px; display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.chart-head div:first-child { display: grid; }
.chart-head span, .chart-head b { color: #84919b; font-family: Consolas, monospace; font-size: .62rem; letter-spacing: .08em; }
.chart-head strong { font-size: .95rem; }
.case-chart canvas { width: 100%; border-radius: 12px; background: rgba(1,9,15,.58); }
.case-chart > p { margin: .75rem .2rem .2rem; color: #84919b; font-size: .7rem; }
.range-control { display: flex; }
.range-control button { padding: .25rem .5rem; border: 1px solid rgba(255,255,255,.15); color: #9ba7af; background: transparent; cursor: pointer; font-size: .62rem; }
.range-control button:first-child { border-radius: 8px 0 0 8px; }
.range-control button:last-child { border-radius: 0 8px 8px 0; }
.range-control button.active { color: var(--ink); background: var(--cyan); }

.process { background: var(--paper-2); }
.process-grid { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border-top: 1px solid var(--line); }
.process-grid li { min-height: 250px; padding: 1.5rem 1.3rem 1rem; border-right: 1px solid var(--line); }
.process-grid li:last-child { border-right: 0; }
.process-grid span { color: var(--blue); font-family: Consolas, monospace; font-size: .75rem; }
.process-grid h3 { margin: 3.2rem 0 .5rem; font-family: Georgia, serif; font-size: 2rem; font-weight: 400; }
.process-grid p { margin: 0; color: var(--muted); font-size: .9rem; }

.about-card { padding: clamp(2rem, 5vw, 5rem); display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; color: var(--white); background: var(--ink-2); border-radius: 30px; }
.about h2 { font-size: clamp(3rem, 5vw, 5.5rem); }
.about-copy { align-self: end; color: #c5ced4; font-size: 1.05rem; }
.skill-list { margin-top: 1.7rem; }
.skill-list span { color: #c5ced4; border-color: rgba(255,255,255,.18); }

.contact { padding: clamp(5rem, 10vw, 10rem) clamp(1.2rem, 8vw, 9rem); text-align: center; color: var(--white); background: var(--blue); }
.contact .eyebrow { color: #d5e1ff; }
.contact h2 { max-width: 1000px; margin: 0 auto; }
.contact h2 em { color: var(--yellow); }
.contact-actions { justify-content: center; margin-top: 2.4rem; }
.copy-email { padding: .72rem 1rem; color: var(--white); border: 1px solid rgba(255,255,255,.4); border-radius: 99px; background: transparent; cursor: pointer; }

footer { min-height: 110px; padding: 1.5rem clamp(1.2rem, 6vw, 6.5rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; color: var(--white); background: var(--ink); font-size: .8rem; }
footer > div { display: flex; align-items: center; gap: .8rem; }
footer p { color: #8f9ba4; }
footer > a { justify-self: end; color: #c5ced4; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { max-width: 720px; }
  .project-card:nth-child(n) { grid-column: span 6; }
  .project-card:nth-child(3) { grid-column: 4 / span 6; }
  .case-panel { grid-template-columns: 1fr; }
  .about-card { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  .site-header { min-height: 66px; padding: 0 1rem; }
  .brand > span:last-child { display: none; }
  .nav-cta { font-size: .76rem; }
  .hero { padding-top: 4rem; }
  .hero h1 { font-size: clamp(3.1rem, 16vw, 5rem); }
  .hero-facts { gap: 1rem; flex-wrap: wrap; }
  .hero-visual { margin: 1rem .5rem 0; }
  .visual-note { display: none; }
  .project-card:nth-child(n) { grid-column: 1 / -1; }
  .case-tabs { overflow-x: auto; }
  .case-tabs button { min-width: 120px; }
  .case-columns, .process-grid { grid-template-columns: 1fr; }
  .process-grid li { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--line); }
  .process-grid h3 { margin-top: 1.5rem; }
  .case-panel { padding: 1.2rem; }
  footer { grid-template-columns: 1fr; text-align: left; }
  footer > a { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
