/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #FAFAF8;   /* warm cream — Economist page bg */
  --bg-hero:     #0D1B2A;   /* dark navy for hero */
  --bg-card:     #FFFFFF;
  --bg-stats:    #E3120B;   /* Economist signature red */
  --border:      #DDD9D3;
  --text:        #1A1A1A;
  --muted:       #696969;
  --accent:      #E3120B;   /* Economist red */
  --navy:        #0D1B2A;   /* dark navy secondary */
  --font:        'Inter', sans-serif;
  --serif:       'Playfair Display', Georgia, serif;
  --mono:        'JetBrains Mono', monospace;
  --max-w:       760px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.mono   { font-family: var(--mono); }
.accent { color: var(--accent); }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  border-top: 4px solid var(--accent);   /* Economist red top rule */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--navy);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--accent); }

/* Hamburger button — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

/* Animate burger → X when open */
#main-nav.is-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#main-nav.is-open .nav-burger span:nth-child(2) { opacity: 0; }
#main-nav.is-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  nav { flex-wrap: wrap; padding: 0.85rem 1.25rem; }

  .nav-burger { display: flex; }

  #nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    gap: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #main-nav.is-open #nav-links { max-height: 400px; }

  #nav-links li { border-top: 1px solid var(--border); }

  #nav-links li a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
  }
}

/* ── Shared ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

/* Section heading with red rule — classic Economist style */
h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  padding-top: 1rem;
  border-top: 3px solid var(--accent);
  display: inline-block;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy);
}

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

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  transition: background 0.2s;
}

.btn-primary:hover { background: #b50e08; }

.btn-secondary {
  display: inline-block;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── Hero ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  background: var(--bg-hero);
}

#scatter {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
  transition: transform 0.15s ease-out;
}

/* Hero mouse-parallax: each layer has a transition so it eases to cursor position */
.hero-query,
.hero-eyebrow,
#hero h1,
.hero-tagline,
.hero-cta {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.hero-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 4rem 1.5rem 2rem;
}

.hero-query {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero-query .accent { color: #fca5a5; }   /* softer red on dark bg */

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

#hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #F8F5F0;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.05rem;
  color: #94a3b8;
  margin-bottom: 2.25rem;
  max-width: 480px;
  min-height: 1.7rem;
  font-style: italic;
}

.hero-tagline::after {
  content: '|';
  color: var(--accent);
  font-style: normal;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Stats Bar ── */
.stats-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,27,42,0.92);
  border-top: 4px solid var(--accent);
  padding: 2rem 1.5rem;
  flex-wrap: wrap;
  gap: 0;
}

.stat {
  text-align: center;
  padding: 0 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stat-viz {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
}

.stat-num-row {
  display: flex;
  align-items: baseline;
  gap: 1px;
}

.stat-num {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-suffix {
  font-family: var(--mono);
  font-size: 1.4rem;
  color: rgba(255,255,255,0.4);
  margin-left: 2px;
  align-self: flex-start;
  margin-top: 9px;
}

.stat-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-sub {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.03em;
}

.stat-divider {
  width: 1px;
  height: 110px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

/* Sparkline */
.stat-sparkline { display: block; }

/* Company bar blocks */
.stat-blocks {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 44px;
}

.stat-block {
  width: 12px;
  border-radius: 2px 2px 0 0;
  background: rgba(255,255,255,0.32);
}

.stat-block:first-child { background: var(--accent); opacity: 0.85; }
.stat-block--dim { background: rgba(255,255,255,0.15) !important; }

/* Donut */
.stat-donut { display: block; }

/* Curiosity progress bar */
.stat-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-progress-track {
  width: 88px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.stat-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-progress-pct {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
}

/* ── About ── */
#about { background: var(--bg); border-top: 1px solid var(--border); }

.about-bio {
  max-width: 780px;
  margin-bottom: 2.5rem;
}

.about-bio p {
  line-height: 1.82;
  margin-bottom: 1rem;
  color: #333;
}

.about-section-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  display: block;
}

/* Education */
.about-education {
  margin-top: 0;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.edu-entry {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.edu-degree {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edu-meta { font-size: 0.72rem; color: #888; }


/* Stacked industry bar */
.about-industry { margin-bottom: 2rem; }

.ind-stacked {
  display: flex;
  height: 8px;
  border-radius: 2px;
  overflow: hidden;
  margin: 0.6rem 0 0.75rem;
}

.ind-seg { height: 100%; }
.ind-seg--finance { background: var(--accent); }
.ind-seg--tech    { background: var(--navy); }
.ind-seg--retail  { background: #aaa; }

.ind-legend {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.ind-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: #777;
}

.ind-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ind-dot--finance { background: var(--accent); }
.ind-dot--tech    { background: var(--navy); }
.ind-dot--retail  { background: #aaa; }

/* Skill category bars */
.about-skills-section {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.skill-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 4rem;
  margin-top: 1rem;
}

.skill-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.3rem;
}

.skill-cat-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}

.skill-cat-pct { font-size: 0.68rem; color: var(--accent); }

.skill-cat-track {
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.skill-cat-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-cat-fill.is-animated { width: var(--sw); }

.skill-cat-tools { font-size: 0.65rem; color: #aaa; letter-spacing: 0.02em; margin: 0; }

@media (max-width: 768px) {
  .skill-cats { grid-template-columns: 1fr; }
}

/* ── Work Scrollytelling ── */
#work {
  position: relative;
  background: #F2EFEA;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#work > .strip-eyebrow { position: absolute; top: 1.1rem; left: 1.5rem; z-index: 2; }

.work-wrap {
  max-width: 1140px;
  margin: 0 auto;
}

.work-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.work-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5rem;
  border-top: none;
}

.work-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
}

/* Left sticky index */
.work-left {
  flex: 0 0 34%;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2rem 2rem 2rem;
  border-right: 1px solid rgba(0,0,0,0.08);
}

.work-index-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.4rem;
}

.work-index-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;
  margin-bottom: 1.75rem;
}

.work-nav { display: flex; flex-direction: column; gap: 0; }

.work-nav-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  opacity: 0.3;
  transition: opacity 0.35s;
  cursor: default;
}

.work-nav-item:first-child { border-top: 1px solid rgba(0,0,0,0.06); }
.work-nav-item.is-active   { opacity: 1; }

.work-nav-num {
  font-size: 0.65rem;
  color: var(--accent);
  flex-shrink: 0;
  width: 1.4rem;
}

.work-nav-label {
  font-size: 0.78rem;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.3;
}

/* Scrollable panels — full width */
.work-right { width: 100%; max-width: 760px; margin: 0 auto; padding: 4rem 2rem 5rem; }

.work-panel {
  padding: 0 0 3rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  opacity: 0.2;
  transition: opacity 0.45s;
}

.work-panel:last-child { border-bottom: none; margin-bottom: 0; }
.work-panel.is-active  { opacity: 1; }

.work-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.work-panel-co  { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: #888; }
.work-panel-idx { font-size: 1.5rem; color: var(--accent); opacity: 0.4; }

.work-panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 1rem;
}

/* Mini SVG charts */
.work-chart {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.6rem 0.6rem 0.4rem;
  margin: 0 0 1.25rem;
  box-sizing: border-box;
}

.wc-label  { font-family: 'Inter', sans-serif; font-size: 6.5px; fill: #aaa; }
.wc-bar    { fill: var(--navy); opacity: 0.55; }
.wc-bar--hi { fill: var(--accent); opacity: 0.85; }
.wc-track  { fill: rgba(0,0,0,0.07); }
.wc-line   { fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-linejoin: round; }
.wc-baseline { stroke: #D5D0C8; stroke-width: 0.8; }
.wc-marker { fill: var(--accent); opacity: 0.75; }
.wc-axis   { font-family: 'JetBrains Mono', monospace; font-size: 6px; fill: #bbb; }
.wc-axis--hi { fill: var(--accent); }
.wc-hlabel { font-family: 'JetBrains Mono', monospace; font-size: 6.5px; fill: #999; }
.wc-hval   { font-family: 'JetBrains Mono', monospace; font-size: 6.5px; fill: var(--accent); }

.work-panel-desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #444;
  margin-bottom: 1.25rem;
}

/* Impact metrics row */
.work-impact {
  display: flex;
  gap: 0;
  margin-bottom: 1.1rem;
  background: var(--border);
  gap: 1px;
}

.work-impact-item {
  flex: 1;
  background: #F2EFEA;
  padding: 0.7rem 0.8rem;
  border-top: 2px solid var(--accent);
}

.work-impact-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.work-impact-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: #888; }

/* Tech stack tags */
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.work-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.67rem;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .work-right { padding: 2rem 1.5rem 3rem; }
  .work-panel { opacity: 1; }
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: 2px;
  padding: 1.5rem;
  transition: border-top-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-top-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Mini bar chart */
.card-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
  margin-bottom: 1rem;
}

.bar {
  flex: 1;
  height: var(--h);
  background: var(--accent);
  border-radius: 1px 1px 0 0;
  opacity: 0.18;
  transform-origin: bottom;
  animation: barGrow 0.7s ease forwards;
  transition: opacity 0.2s;
}

.card:hover .bar { opacity: 0.6; }

@keyframes barGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.card-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.card h3 { margin-top: 0.5rem; font-family: var(--serif); font-size: 1.05rem; }
.card p  { font-size: 0.875rem; margin-top: 0.4rem; line-height: 1.6; }

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  transition: opacity 0.2s;
}

.card-link:hover { opacity: 0.75; }

.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.card-stack span {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

/* ── Blog ── */
#blog { background: var(--bg); border-top: 1px solid var(--border); }

.blog-list { display: flex; flex-direction: column; }

.blog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}

.blog-item:hover { padding-left: 0.5rem; }

.blog-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.25rem;
}

.blog-item h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.blog-item p { font-size: 0.875rem; margin-top: 0.2rem; }

.blog-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: color 0.2s;
}

.blog-item:hover .blog-arrow { color: var(--accent); }

/* ── Contact ── */
#contact {
  background: var(--navy);
  border-top: 4px solid var(--accent);
}

#contact h2 {
  color: #F8F5F0;
  border-top-color: rgba(255,255,255,0.15);
}

.contact-inner { text-align: center; }

.contact-query {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.contact-inner > p {
  max-width: 420px;
  margin: 0 auto 2rem;
  color: #94a3b8;
  font-style: italic;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-links a {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  transition: color 0.2s;
}

.social-links a:hover { color: #F8F5F0; }

/* ── Footer ── */
footer {
  background: #080f1a;
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid #1e2d40;
}

footer p { font-size: 0.75rem; color: #475569; }
footer .accent { color: var(--accent); }

/* ── Chart Strips ── */
.chart-strip {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: #F0ECE5;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.chart-strip--navy {
  background: #0D1B2A;
  border-top-color: #1e2d40;
  border-bottom-color: #1e2d40;
}

.strip-eyebrow {
  position: absolute;
  top: 1.1rem;
  left: 1.5rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  z-index: 2;
}

.chart-inner {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 1rem;
  will-change: transform;
}

.econ-svg {
  width: 100%;
  max-width: 860px;
  height: auto;
  display: block;
}

/* SVG element styles */
.svg-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  fill: var(--navy);
}

.svg-title--light { fill: #F8F5F0; }

.svg-sub {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  fill: #888;
}

.svg-sub--light { fill: #64748b; }

.svg-grid {
  stroke: #D5D0C8;
  stroke-width: 0.8;
}

.svg-grid--light {
  stroke: rgba(255,255,255,0.08);
  stroke-width: 0.8;
}

.svg-bar {
  fill: var(--accent);
  opacity: 0.88;
}

.svg-bar--faint {
  opacity: 0.45;
}

/* Vertical bars start collapsed and animate up via JS */
.svg-vbar {
  transform-origin: bottom;
  transition: height 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              y      0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Horizontal bars start at width=0 and grow right via JS (query plan) */
.svg-hbar {
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.svg-row-label {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  fill: var(--navy);
}

.svg-bar-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  fill: #fff;
  dominant-baseline: middle;
}

.svg-col-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  fill: #94a3b8;
  text-anchor: middle;
}

.svg-axis {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  fill: #999;
}

.svg-axis--light { fill: #475569; }

.svg-now-line {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.svg-now-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  fill: var(--accent);
}

.svg-source {
  font-family: 'Inter', sans-serif;
  font-size: 7.5px;
  fill: #bbb;
}

.svg-source--light { fill: #334155; }

/* ── Query Plan Scrollytelling ── */
#queryplan-scroll {
  position: relative;
  background: #F0ECE5;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#queryplan-scroll > .strip-eyebrow { position: absolute; top: 1.1rem; left: 1.5rem; z-index: 2; }

.qp-wrap {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  max-width: 1140px;
  margin: 0 auto;
}

.qp-left {
  flex: 0 0 44%;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 2rem 3rem;
}

/* Terminal card */
.qp-terminal {
  width: 100%;
  max-width: 370px;
  background: #0a1520;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.qp-chrome {
  background: #1a2535;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tc { width: 10px; height: 10px; border-radius: 50%; }
.tc--red    { background: #ff5f57; }
.tc--yellow { background: #febc2e; }
.tc--green  { background: #28c840; }

.qp-chrome-title {
  margin-left: auto;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
}

.qp-body { padding: 1.25rem 1.25rem 1rem; }

.qp-line {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin: 0;
}

.qp-indent { padding-left: 1.1rem; }
.qp-gap    { height: 0.9rem; }

/* Terminal stage rows */
.term-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.term-row--visible {
  opacity: 1;
  transform: translateX(0);
}

.term-row--visible .term-fill { width: var(--tw); }

.term-stage {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.5);
  width: 7rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.term-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}

.term-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.term-cost {
  font-size: 0.62rem;
  width: 2.5rem;
  text-align: right;
  flex-shrink: 0;
}

.qp-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0.7rem 0;
}

.qp-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
}

.qp-total-val { font-weight: 600; }

.qp-cursor {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  margin: 0.5rem 0 0;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.qp-blink { animation: blink 1.1s step-end infinite; }

/* Right scrollable panels */
.qp-right {
  flex: 0 0 56%;
  padding: 5rem 3rem 5rem 2rem;
}

.qp-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.qp-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

.qp-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
}

.qp-panel {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  opacity: 0.25;
  transition: opacity 0.45s ease;
}

.qp-panel:last-child { border-bottom: none; padding-bottom: 0; }
.qp-panel.is-active  { opacity: 1; }

.qp-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.qp-stage-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.9rem;
}

.qp-desc {
  font-size: 0.875rem;
  line-height: 1.72;
  color: #444;
}

@media (max-width: 768px) {
  .qp-wrap  { flex-direction: column; }
  .qp-left  { position: relative; height: auto; flex: none; width: 100%; padding: 3.5rem 1.5rem 2rem; }
  .qp-right { flex: none; width: 100%; padding: 1.5rem 1.5rem 3rem; }
  .qp-panel { opacity: 1; }
}

/* ── Pipeline Scrollytelling ── */
#pipeline-scroll {
  position: relative;
  background: var(--navy);
  border-top: 1px solid #1e2d40;
  border-bottom: 1px solid #1e2d40;
}

#pipeline-scroll > .strip-eyebrow { position: absolute; top: 1.1rem; left: 1.5rem; z-index: 2; }

.pipeline-wrap {
  display: flex;
  align-items: flex-start;
  max-width: 1140px;
  margin: 0 auto;
}

.pipeline-left {
  flex: 0 0 38%;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 2rem 2rem;
}

.pipeline-svg { width: 100%; max-width: 240px; height: auto; display: block; }

/* Pipeline SVG element styles */
.pipeline-node rect {
  fill: rgba(255,255,255,0.04);
  stroke: rgba(255,255,255,0.14);
  stroke-width: 1;
  transition: fill 0.4s, stroke 0.4s, stroke-width 0.4s;
}

.pipe-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  fill: rgba(255,255,255,0.35);
  transition: fill 0.4s;
}

.pipe-sub {
  font-family: 'Inter', sans-serif;
  font-size: 7px;
  fill: rgba(255,255,255,0.22);
  transition: fill 0.4s;
}

.pipe-connector { stroke: rgba(255,255,255,0.12); stroke-width: 1; }
.pipe-arrow     { fill: rgba(255,255,255,0.12); }
.pipe-source    { font-family: 'Inter', sans-serif; font-size: 7px; fill: rgba(255,255,255,0.2); }

.pipeline-node--active rect {
  fill: rgba(227,18,11,0.12);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.pipeline-node--active .pipe-label { fill: var(--accent); }
.pipeline-node--active .pipe-sub   { fill: rgba(255,255,255,0.55); }

/* Right scrollable panels */
.pipeline-right {
  flex: 0 0 62%;
  padding: 5rem 2rem 5rem 3rem;
}

.pipeline-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pipeline-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.15;
  color: #F8F5F0;
  margin: 0 0 0.5rem;
}

.pipeline-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

.pipeline-panel {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  opacity: 0.25;
  transition: opacity 0.45s ease;
}

.pipeline-panel:last-child { border-bottom: none; padding-bottom: 0; }
.pipeline-panel.is-active  { opacity: 1; }

.pipeline-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.pipeline-company {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #F8F5F0;
  margin: 0 0 0.9rem;
}

.pipeline-desc {
  font-size: 0.875rem;
  line-height: 1.72;
  color: rgba(255,255,255,0.68);
  margin-bottom: 1rem;
}

.pipeline-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.pipeline-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  background: rgba(227,18,11,0.12);
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .pipeline-wrap    { flex-direction: column; }
  .pipeline-left    { position: relative; height: auto; flex: none; width: 100%; padding: 3rem 2rem 1.5rem; }
  .pipeline-right   { flex: none; width: 100%; padding: 1.5rem 1.5rem 3rem; }
  .pipeline-panel   { opacity: 1; }
}

/* ── Technical Arsenal Scrollytelling ── */
#arsenal-scroll {
  position: relative;
  background: var(--navy);
  border-top: 1px solid #1e2d40;
  border-bottom: 1px solid #1e2d40;
}

#arsenal-scroll > .strip-eyebrow { position: absolute; top: 1.1rem; left: 1.5rem; z-index: 2; }

.arsenal-wrap {
  display: flex;
  align-items: flex-start;
  max-width: 1140px;
  margin: 0 auto;
}

.arsenal-left {
  flex: 0 0 42%;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 2rem 2rem;
}

.arsenal-svg { width: 100%; max-width: 320px; height: auto; display: block; }

.arsenal-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  fill: rgba(255,255,255,0.45);
  transition: fill 0.4s;
}

.arsenal-track { fill: rgba(255,255,255,0.06); }

.arsenal-fill {
  fill: var(--accent);
  opacity: 0.9;
}

.arsenal-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  fill: rgba(255,255,255,0.28);
  transition: fill 0.4s;
}

.arsenal-bar-group { transition: opacity 0.45s ease; }
#arsenal-scroll .arsenal-bar-group               { opacity: 0.18; }
#arsenal-scroll .arsenal-bar-group--active       { opacity: 1; }
#arsenal-scroll .arsenal-bar-group--active .arsenal-label { fill: var(--accent); }
#arsenal-scroll .arsenal-bar-group--active .arsenal-pct   { fill: rgba(255,255,255,0.7); }

.arsenal-right {
  flex: 0 0 58%;
  padding: 5rem 2rem 5rem 3rem;
}

.arsenal-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.arsenal-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.15;
  color: #F8F5F0;
  margin: 0 0 0.5rem;
}

.arsenal-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

.arsenal-panel {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  opacity: 0.25;
  transition: opacity 0.45s ease;
}

.arsenal-panel:last-child { border-bottom: none; padding-bottom: 0; }
.arsenal-panel.is-active  { opacity: 1; }

.arsenal-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.arsenal-skill-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #F8F5F0;
  margin: 0 0 0.9rem;
}

.arsenal-desc {
  font-size: 0.875rem;
  line-height: 1.72;
  color: rgba(255,255,255,0.68);
  margin-bottom: 1rem;
}

.arsenal-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.arsenal-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  background: rgba(227,18,11,0.12);
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .arsenal-wrap  { flex-direction: column; }
  .arsenal-left  { position: relative; height: auto; flex: none; width: 100%; padding: 3rem 2rem 1.5rem; }
  .arsenal-right { flex: none; width: 100%; padding: 1.5rem 1.5rem 3rem; }
  .arsenal-panel { opacity: 1; }
}

/* ── Career Scrollytelling ── */
#career-scroll {
  position: relative;
  background: #F0ECE5;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#career-scroll > .strip-eyebrow {
  position: absolute;
  top: 1.1rem;
  left: 1.5rem;
  z-index: 2;
}

.career-wrap {
  display: flex;
  align-items: flex-start;
  max-width: 1140px;
  margin: 0 auto;
}

.career-left {
  flex: 0 0 44%;
  padding: 4.5rem 3rem 4.5rem 2rem;
}

.career-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.career-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

.career-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
}

.career-panel {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  opacity: 0.25;
  transition: opacity 0.45s ease;
}

.career-panel:last-child { border-bottom: none; padding-bottom: 0; }
.career-panel.is-active  { opacity: 1; }

.career-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.career-company {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.2rem;
}

.career-loc {
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
  margin-bottom: 0.9rem;
}

.career-desc {
  font-size: 0.875rem;
  line-height: 1.72;
  color: #444;
  margin-bottom: 1rem;
}

.career-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.career-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  background: rgba(227, 18, 11, 0.08);
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.career-right {
  flex: 0 0 56%;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 2rem 1rem;
}

/* Gantt bar highlight states */
.gantt-bar { transition: opacity 0.45s ease; }
#career-scroll .gantt-bar               { opacity: 0.18; }
#career-scroll .gantt-bar--active       { opacity: 1; }

/* Mobile: stack panels, no sticky */
@media (max-width: 768px) {
  .career-wrap     { flex-direction: column; }
  .career-left     { flex: none; width: 100%; padding: 3.5rem 1.5rem 2rem; }
  .career-right    { position: relative; height: auto; flex: none; width: 100%; padding: 0 1.5rem 3rem; }
  .career-panel    { opacity: 1; }
}

/* ── Data rail ticker ── */
#data-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  overflow: hidden;
  z-index: 90;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

#data-rail-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  will-change: transform;
}

.rail-item {
  display: block;
  font-family: var(--mono);
  font-size: 0.5rem;
  color: var(--navy);
  opacity: 0.22;
  text-align: center;
  line-height: 2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}

@media (max-width: 900px) {
  #data-rail { display: none; }
}

/* ── Section entrance (scale + fade on scroll) ── */
.section-reveal {
  opacity: 0;
  transform: scale(0.97) translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.section-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .section-reveal { opacity: 1; transform: none; transition: none; }
  #scatter, .hero-query, .hero-eyebrow, #hero h1, .hero-tagline, .hero-cta {
    transition: none;
  }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  nav ul { gap: 1rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .stat { padding: 0.75rem 1.25rem; }
  .stat-divider { display: none; }
}
