/* ===== Design tokens ===== */
:root {
  --bg:        #222831;  /* base / darkest */
  --surface:   #393E46;  /* cards, alt sections */
  --accent:    #00ADB5;  /* teal highlight */
  --light:     #EEEEEE;  /* primary text */

  /* brighter teal for small/thin text on --surface: #00ADB5 on #393E46 is only
     3.92:1 (fails AA for body text). Use --accent-hi there; keep --accent for
     large text, fills, borders, and icons. */
  --accent-hi: #4FD8DF;

  --muted:     rgba(238, 238, 238, 0.62);
  --line:      rgba(238, 238, 238, 0.10);
  --accent-soft: rgba(0, 173, 181, 0.12);
  --shadow:    0 18px 40px -20px rgba(0, 0, 0, 0.65);

  --maxw: 1080px;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong { color: var(--light); font-weight: 600; }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ===== Navigation ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(34, 40, 49, 0.0);
  transition: transform .35s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
  padding: 18px 0;
}
.nav.scrolled {
  background: rgba(34, 40, 49, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 0;
}
.nav.hidden { transform: translateY(-110%); }
.nav.menu-open { transform: none; backdrop-filter: none; background: rgba(34, 40, 49, 0.92); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__brand { font-weight: 800; font-size: 1.35rem; letter-spacing: .5px; }
.nav__brand span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: .92rem; font-weight: 500; color: var(--muted);
  transition: color .2s var(--ease); position: relative;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s var(--ease);
}
.nav__links a:hover { color: var(--light); }
.nav__links a:hover::after { width: 100%; }
.nav__links a.active { color: var(--light); }
.nav__links a.active::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--accent); color: var(--accent) !important;
  padding: 8px 18px; border-radius: 8px;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--accent-soft); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 14px 9px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--light); transition: .3s var(--ease); }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Scroll progress bar ===== */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 100;
  width: 100%; height: 2px; transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transform: scaleX(0);
  box-shadow: 0 0 12px rgba(0, 173, 181, 0.6);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block; font-weight: 600; font-size: .95rem;
  padding: 14px 28px; border-radius: 10px; cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -10px var(--accent); }
.btn--ghost { border: 1px solid var(--accent); color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); transform: translateY(-3px); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 75% 10%, rgba(0,173,181,0.12), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(57,62,70,0.55), transparent 55%);
}
.hero__aurora { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.hero__aurora span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.hero__aurora span:nth-child(1) {
  width: 520px; height: 520px; top: -140px; right: -100px;
  background: radial-gradient(circle, rgba(0,173,181,.4), transparent 70%);
  animation: auroraDrift1 18s ease-in-out infinite;
}
.hero__aurora span:nth-child(2) {
  width: 440px; height: 440px; bottom: -160px; left: -120px;
  background: radial-gradient(circle, rgba(0,173,181,.22), transparent 70%);
  animation: auroraDrift2 22s ease-in-out infinite;
}
.hero__aurora span:nth-child(3) {
  width: 340px; height: 340px; top: 32%; left: 42%;
  background: radial-gradient(circle, rgba(238,238,238,.08), transparent 70%);
  animation: auroraDrift3 26s ease-in-out infinite;
}
@keyframes auroraDrift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, 34px); } }
@keyframes auroraDrift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(36px, -24px); } }
@keyframes auroraDrift3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-24px, -30px) scale(1.12); } }
.hero__canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .7; }
.hero__inner { position: relative; z-index: 1; padding-top: 90px; padding-bottom: 90px; max-width: 820px; }
.hero__eyebrow { font-family: var(--mono); color: var(--accent); font-size: 1rem; margin-bottom: 16px; }
.hero__title { font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 800; line-height: 1.05; letter-spacing: -1px; text-wrap: balance; }
.hero__subtitle { font-size: clamp(1.6rem, 5vw, 3rem); font-weight: 700; color: var(--muted); line-height: 1.1; margin-top: 6px; text-wrap: balance; }
.hero__lede { max-width: 600px; color: var(--muted); margin-top: 24px; font-size: 1.08rem; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 42px; margin-top: 60px; }
.hero__stats li { display: flex; flex-direction: column; }
.stat__num { font-size: 2.2rem; font-weight: 800; color: var(--accent); font-family: var(--mono); }
.stat__label { color: var(--muted); font-size: .85rem; margin-top: 2px; }

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: var(--accent); border-radius: 2px;
  animation: scroll 1.6s infinite;
}
@keyframes scroll { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 22px; } 100% { opacity: 0; } }

/* ===== Sections ===== */
main { counter-reset: section-num; }
.section { padding: 110px 0; scroll-margin-top: 90px; }
.section--alt { background: var(--surface); }
.section__title {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.5px;
  margin-bottom: 48px; display: flex; align-items: center; gap: 18px;
  text-wrap: balance;
}
.section__title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.section__num { font-family: var(--mono); color: var(--accent-hi); font-size: .5em; font-weight: 500; counter-increment: section-num; }
.section__num::before { content: counter(section-num, decimal-leading-zero) '. '; }
.section__lede { color: var(--muted); max-width: 640px; margin: -28px 0 44px; font-size: 1.04rem; text-wrap: balance; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about__text p { color: var(--muted); margin-bottom: 16px; }
.about__list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; margin-top: 14px;
}
.about__list li { position: relative; padding-left: 22px; font-family: var(--mono); font-size: .88rem; color: var(--muted); }
.about__list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }

.about__card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; text-align: center; box-shadow: var(--shadow);
}
.section--alt .about__card { background: var(--bg); }
.about__avatar {
  position: relative; overflow: hidden;
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 1.8rem;
  color: var(--bg); background: linear-gradient(135deg, var(--accent), #00838a);
}
.about__avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.about__card h3 { font-size: 1.25rem; }
.about__role { color: var(--accent); font-family: var(--mono); font-size: .9rem; margin-bottom: 20px; }
.about__meta { text-align: left; display: grid; gap: 12px; }
.about__meta li { font-size: .9rem; display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 10px; }
.about__meta span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }

/* ===== Skills: interactive data-stack pipeline ===== */
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tags span {
  font-family: var(--mono); font-size: .8rem; padding: 6px 12px; border-radius: 7px;
  background: var(--accent-soft); color: var(--light); border: 1px solid var(--line);
}

.stack__rail {
  position: relative; display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 48px; padding: 0 6px;
}
.stack__spine { position: absolute; top: 7px; left: 6px; right: 6px; height: 2px; background: var(--line); z-index: 0; }
.stack__spine-fill {
  position: absolute; inset: 0; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  transition: width .5s var(--ease);
}
.stack__pulse {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%; background: var(--accent-hi); filter: blur(2px);
  box-shadow: 0 0 12px 3px rgba(79, 216, 223, 0.65);
  animation: pulseTravel 3.6s linear infinite;
}
@keyframes pulseTravel {
  0%   { left: -2%;  opacity: 0; }
  10%  { opacity: .9; }
  90%  { opacity: .9; }
  100% { left: 100%; opacity: 0; }
}

.stage {
  position: relative; z-index: 1; background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  flex: 1; padding: 0 4px 4px; font-family: var(--font);
}
.stage__dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--line);
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.section--alt .stage__dot { background: var(--bg); }
.stage__label {
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; text-align: center;
  transition: color .3s var(--ease);
}
.stage:hover .stage__dot { border-color: var(--accent); }
.stage:hover .stage__label { color: var(--light); }
.stage.is-done .stage__dot { background: var(--accent); border-color: var(--accent); }
.stage[aria-selected="true"] .stage__dot {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft); transform: scale(1.3);
}
.stage[aria-selected="true"] .stage__label { color: var(--light); font-weight: 600; }

.stack__panels { position: relative; }
.stage-panel {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow);
}
.stage-panel[hidden] { display: none; }
.stage-panel.is-entering { animation: stackPanelIn .45s var(--ease); }
@keyframes stackPanelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.stage-panel__kicker {
  font-family: var(--mono); color: var(--accent-hi); font-size: .82rem;
  letter-spacing: .04em; margin-bottom: 10px;
}
.stage-panel h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-bottom: 16px; }
.stage-panel p { color: var(--muted); margin-bottom: 14px; }
.stage-panel p:last-of-type { margin-bottom: 0; }
.stage-panel .tags { margin: 22px 0 20px; }
.stage-panel__proof { display: grid; gap: 9px; }
.stage-panel__proof li { position: relative; padding-left: 22px; color: var(--muted); font-size: .92rem; }
.stage-panel__proof li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }
.stage-panel__proof strong { color: var(--light); }

/* ===== Capabilities: How I Work process rail ===== */
.process { position: relative; padding: 10px 0; }
.process::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--bg), var(--accent) 15%, var(--accent) 85%, var(--bg));
  opacity: .35; transform: translateX(-50%);
}
.process__item { position: relative; width: calc(50% - 50px); margin-bottom: 64px; }
.process__item:last-child { margin-bottom: 0; }
.process__item:nth-child(odd) { margin-right: auto; text-align: right; }
.process__item:nth-child(even) { margin-left: auto; text-align: left; }
.process__num {
  position: absolute; top: -54px; font-size: 4.6rem; font-weight: 800;
  font-family: var(--mono); color: rgba(0, 173, 181, 0.45); line-height: 1; z-index: 2; user-select: none;
}
.process__item:nth-child(odd) .process__num { right: -14px; }
.process__item:nth-child(even) .process__num { left: -14px; }
.process__dot {
  position: absolute; top: 10px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line); z-index: 2;
}
.process__item:nth-child(odd) .process__dot { right: -57px; }
.process__item:nth-child(even) .process__dot { left: -57px; }
.process__body {
  position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow);
}
.process__body h3 { font-size: 1.2rem; margin-bottom: 12px; }
.process__body p { color: var(--muted); font-size: .96rem; }

/* ===== Projects ===== */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.project:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.project__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.project__icon { width: 40px; height: 40px; color: var(--accent); }
.project__tag { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.project h3 { font-size: 1.2rem; margin-bottom: 12px; }
.project p { color: var(--muted); font-size: .94rem; }
.project__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; padding-top: 6px; }
.project__links a {
  font-family: var(--mono); font-size: .82rem; color: var(--accent);
  transition: opacity .2s var(--ease);
}
.project__links a:hover { opacity: .7; }

/* Whole-card link: the anchor carries the stretched hit area, because the card's
   own ::before/::after are already used by the spotlight and gradient border. */
.project__link { color: inherit; }
.project__link::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: var(--radius); }
.project__link:focus-visible { outline: none; }
.project__link:focus-visible::after { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.project:hover .project__link { color: var(--accent-hi); }
.project__cta {
  margin-top: auto; padding-top: 18px;
  font-family: var(--mono); font-size: .82rem; color: var(--accent);
  transition: transform .25s var(--ease);
}
.project:hover .project__cta { transform: translateX(4px); }

/* ===== Live dashboard ===== */
.dashboard__lede { color: var(--muted); margin: -24px 0 32px; max-width: 640px; }
.dashboard__frame {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.dashboard__frame .tableauPlaceholder { width: 100%; }

/* ===== Case study pages ===== */
.case { padding: 150px 0 40px; }
.breadcrumb {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 34px;
  font-family: var(--mono); font-size: .84rem; color: var(--muted);
  transition: color .2s var(--ease);
}
.breadcrumb:hover { color: var(--accent-hi); }
.case__eyebrow { font-family: var(--mono); color: var(--accent); font-size: .9rem; margin-bottom: 14px; }
.case__title {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; line-height: 1.08;
  letter-spacing: -1px; text-wrap: balance; margin-bottom: 20px;
}
.case__lede { color: var(--muted); font-size: 1.12rem; max-width: 680px; text-wrap: balance; }
.case__meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  margin-top: 42px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.case__meta div { display: flex; flex-direction: column; gap: 6px; }
.case__meta dt, .case__meta span:first-child {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.case__meta dd, .case__meta span:last-child { font-size: .95rem; color: var(--light); margin: 0; }

.case-body { padding: 30px 0 90px; }
.case-block { max-width: 760px; margin-bottom: 54px; }
.case-block:last-child { margin-bottom: 0; }
.case-block h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 700; margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px; text-wrap: balance;
}
.case-block h2::before {
  content: ''; width: 22px; height: 2px; background: var(--accent); flex: none;
}
.case-block p { color: var(--muted); margin-bottom: 16px; }
.case-block p:last-child { margin-bottom: 0; }
.case-block ul { display: grid; gap: 10px; margin: 18px 0 0; }
.case-block li { position: relative; padding-left: 22px; color: var(--muted); }
.case-block li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }
.case-block .tags { margin-top: 6px; }

.case-outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-top: 26px; }
.case-outcome {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.section--alt .case-outcome { background: var(--bg); }
.case-outcome strong {
  display: block; font-family: var(--mono); color: var(--accent); margin-bottom: 8px;
  font-size: clamp(1.02rem, 2.2vw, 1.28rem); line-height: 1.25; text-wrap: balance;
}
.case-outcome span { font-size: .88rem; color: var(--muted); }

/* Live embed (desktop) vs static preview (mobile) */
.dash-static { display: none; }
.dash-static img { width: 100%; height: auto; border-radius: 10px; display: block; }
.dash-static .btn { margin-top: 18px; }
.dash-note-static { margin-bottom: 16px; }

.case-pager {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 30px; margin-top: 20px;
}
.case-pager a {
  font-family: var(--mono); font-size: .86rem; color: var(--muted);
  transition: color .2s var(--ease);
}
.case-pager a:hover { color: var(--accent-hi); }

/* ===== Contact ===== */
.contact__inner { max-width: 620px; margin: 0 auto; text-align: center; }
.contact .section__num { display: block; margin-bottom: 14px; font-size: 1rem; }
.contact__title { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; margin-bottom: 20px; }
.contact__text { color: var(--muted); margin-bottom: 36px; }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin-top: 40px; }
.contact__links a { font-family: var(--mono); font-size: .88rem; color: var(--muted); transition: color .2s var(--ease); }
.contact__links a:hover { color: var(--accent); }

/* ===== Footer ===== */
.footer { padding: 30px 0; text-align: center; border-top: 1px solid var(--line); }
.footer p { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

/* ===== Card accents: top hairline + cursor spotlight ===== */
.project, .stage-panel, .process__body, .about__card {
  position: relative; overflow: hidden;
}
.project::after, .stage-panel::after, .process__body::after, .about__card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .4; transition: opacity .3s var(--ease);
}
.project:hover::after, .stage-panel:hover::after, .process__body:hover::after, .about__card:hover::after {
  opacity: 1;
}
.project::before, .stage-panel::before, .process__body::before, .about__card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 173, 181, .18), transparent 70%);
  transition: opacity .3s var(--ease);
}
.project:hover::before, .stage-panel:hover::before, .process__body:hover::before, .about__card:hover::before {
  opacity: 1;
}
@media (pointer: coarse) {
  .project::before, .stage-panel::before, .process__body::before, .about__card::before { display: none; }
}

/* ===== Tech marquee ===== */
.marquee {
  position: relative; overflow: hidden; padding: 26px 0;
  background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee__track { display: flex; width: max-content; gap: 48px; animation: marqueeScroll 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--mono); font-size: .95rem; color: var(--muted);
  letter-spacing: .04em; white-space: nowrap;
}
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
.projects-hint { display: none; }
.projects-dots { display: none; }

@media (max-width: 860px) {
  .hero__aurora, .hero__canvas { display: none; }

  /* Tableau's embed does not fit a phone, so show its static preview instead. */
  .dashboard__frame { display: none; }
  .dash-note-live { display: none; }
  .dash-static { display: block; }
  .case { padding: 120px 0 30px; }
  .case__meta { grid-template-columns: 1fr; gap: 18px; }

  .about, .projects { grid-template-columns: 1fr; }
  .nav__links {
    /* header.nav has position:fixed itself, which makes it the containing
       block for this fixed child regardless of transform/backdrop-filter,
       so bottom:0 would resolve against the header's own short box instead
       of the viewport. Use an explicit viewport-relative height instead. */
    position: fixed; top: 0; right: 0; left: auto; bottom: auto;
    width: min(78%, 320px); height: 100vh; height: 100dvh;
    flex-direction: column; justify-content: center; gap: 34px;
    background: var(--surface); padding: 40px; transform: translateX(100%);
    transition: transform .35s var(--ease); box-shadow: var(--shadow);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__toggle { display: flex; z-index: 60; }
  .hero__stats { gap: 28px; }

  .projects-hint {
    display: flex; align-items: center; gap: 7px;
    color: var(--muted); font-family: var(--mono); font-size: .78rem;
    margin-bottom: 14px;
  }
  .projects {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .projects::-webkit-scrollbar { display: none; }
  .project {
    flex: 0 0 82vw;
    min-width: 260px;
    scroll-snap-align: start;
  }
  .projects-dots {
    display: flex; justify-content: center; gap: 8px; margin-top: 20px;
  }
  .projects-dots .dot {
    width: 24px; height: 24px; padding: 0; background: none; border: none;
    display: grid; place-items: center; cursor: pointer;
  }
  .projects-dots .dot::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--line); border: 1px solid var(--muted);
    transition: background .2s var(--ease), transform .2s var(--ease);
  }
  .projects-dots .dot.active::before {
    background: var(--accent); border-color: var(--accent); transform: scale(1.25);
  }

  /* Stack rail becomes a scroll-snap chip strip */
  .stack__rail {
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    gap: 26px; padding: 0 4px 10px; scrollbar-width: none; justify-content: flex-start;
  }
  .stack__rail::-webkit-scrollbar { display: none; }
  .stack__spine, .stack__pulse { display: none; }
  .stage { flex: 0 0 auto; min-width: 84px; scroll-snap-align: start; }
  .stage-panel { padding: 28px 24px; }

  /* Process rail collapses to a single left-aligned column */
  .process::before { left: 20px; transform: none; }
  .process__item, .process__item:nth-child(odd), .process__item:nth-child(even) {
    width: auto; margin: 0 0 50px 52px; text-align: left;
  }
  .process__item:nth-child(odd) .process__num, .process__item:nth-child(even) .process__num {
    left: -8px; right: auto; font-size: 3.4rem;
  }
  .process__item:nth-child(odd) .process__dot, .process__item:nth-child(even) .process__dot {
    left: -40px; right: auto;
  }
  .process__body { padding: 24px 22px; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .hero__stats { width: 100%; justify-content: space-between; gap: 16px; }
  .stat__num { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  /* decorative motion: the canvas particle field and pipeline autoplay are also
     gated in JS via the same media query, this just covers the pure-CSS pieces */
  .hero__aurora, .hero__canvas, .stack__pulse { display: none; }
  .marquee__track { transform: none; }
}
