*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:     #22c55e;
  --green-dim: #16a34a;
  --green-glow: rgba(34, 197, 94, 0.08);
  --bg:        #0a0a0a;
  --bg2:       #111111;
  --bg3:       #1a1a1a;
  --border:    #222222;
  --text:      #e5e7eb;
  --muted:     #6b7280;
  --font:      'Space Grotesk', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --yellow:    #fbbf24;
  --blue:      #38bdf8;
  --orange:    #f97316;
  --indigo:    #818cf8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv01';
}

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

/* ─── NAV ─── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 0 2rem; height: 64px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
#navbar.scrolled { border-color: var(--border); }
.nav-inner {
  max-width: 1100px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--mono); font-weight: 500; font-size: 1.1rem;
  color: var(--green); border: 1px solid var(--green-dim);
  padding: 4px 10px; border-radius: 4px;
}
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { font-size: 0.875rem; color: var(--muted); transition: color 0.2s; font-weight: 500; }
.nav-links a:hover { color: var(--green); }

/* Hamburger */
.nav-hamburger {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); padding: 6px 10px; border-radius: 5px;
  cursor: pointer; align-items: center; transition: border-color 0.2s;
}
.nav-hamburger:hover { border-color: rgba(255,255,255,0.2); }

/* Mobile menu */
.nav-mobile {
  display: none; position: fixed;
  top: 64px; left: 0; right: 0; z-index: 190;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem 1.5rem;
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; display: flex; flex-direction: column; gap: 0; }
.nav-mobile li a {
  display: block; font-size: 1rem; color: var(--text);
  padding: 0.7rem 0; border-bottom: 1px solid var(--border);
  font-weight: 500; transition: color 0.15s;
}
.nav-mobile li:last-child a { border-bottom: none; }
.nav-mobile li a:hover { color: var(--green); }
.nav-mobile-cta { margin-top: 1.25rem; }

/* ─── HERO ─── */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; padding: 0 2rem; overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  opacity: 0.35; z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 460px;
  gap: 5rem; align-items: center; padding-top: 64px;
}
.hero-badge {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--muted); letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards 0.1s;
}
.status-dot {
  width: 7px; height: 7px; background: var(--green); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  animation: dotPulse 2.5s ease-in-out infinite; flex-shrink: 0;
}
.status-dot.small { width: 5px; height: 5px; }
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
  50%      { box-shadow: 0 0 0 7px rgba(34,197,94,0.04); }
}
.hero-name {
  font-size: clamp(3rem, 6.5vw, 5.5rem); font-weight: 700;
  letter-spacing: -0.04em; line-height: 1.0; margin-bottom: 1.25rem;
  opacity: 0; animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards 0.2s;
}
.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 400;
  color: var(--muted); letter-spacing: -0.01em; line-height: 1.4;
  margin-bottom: 1.25rem;
  opacity: 0; animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards 0.3s;
}
.hero-sub {
  font-size: 0.97rem; color: #9ca3af; max-width: 520px;
  line-height: 1.75; margin-bottom: 2rem;
  opacity: 0; animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards 0.4s;
}

/* Hero CTAs */
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  opacity: 0; animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards 0.5s;
}
.hero-secondary {
  display: flex; align-items: center; gap: 0.6rem;
  margin-top: 1.25rem;
  opacity: 0; animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards 0.6s;
}
.hero-link-sec {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.82rem; color: var(--muted);
  transition: color 0.15s;
}
.hero-link-sec:hover { color: var(--text); }
.hero-sep { color: var(--border); font-size: 0.9rem; }

/* Hero viz */
.hero-viz {
  display: flex; flex-direction: column; gap: 0.6rem;
  opacity: 0; animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) forwards 0.35s;
}
#hero-waveform {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg2);
}
.hero-viz-label {
  font-family: var(--mono); font-size: 0.65rem;
  color: var(--muted); letter-spacing: 0.07em;
  display: flex; align-items: center; gap: 0.5rem;
  justify-content: center;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.4rem; border-radius: 6px;
  font-size: 0.875rem; font-weight: 500; transition: all 0.18s; cursor: pointer;
  font-family: var(--font); white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn-sm { padding: 0.45rem 0.875rem; font-size: 0.8rem; }
.btn-outline {
  border: 1px solid var(--border); color: var(--text); background: transparent;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }
.btn-primary { background: var(--green); color: #000; font-weight: 600; }
.btn-primary:hover { background: var(--green-dim); }
.btn-caiso {
  border: 1px solid rgba(34,197,94,0.35); color: var(--green);
  background: rgba(34,197,94,0.06);
}
.btn-caiso:hover { background: rgba(34,197,94,0.13); border-color: var(--green); }

/* ─── SECTIONS ─── */
section { padding: 7rem 2rem; }
.container { max-width: 1000px; margin: 0 auto; }
.section-header { margin-bottom: 3.5rem; }
.section-eyebrow {
  font-family: var(--mono); font-size: 0.68rem; color: var(--green);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
}
.section-title {
  font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: 0.5rem; position: relative; display: inline-block;
}
.section-title::after {
  content: ''; display: block; height: 2px; width: 40px;
  background: var(--green); margin-top: 8px; border-radius: 2px;
}
.section-sub { color: var(--muted); margin-top: 0.75rem; font-size: 1rem; }

/* ─── TAGS ─── */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-size: 0.72rem; font-family: var(--mono);
  color: var(--muted); background: transparent;
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 4px;
}

/* ─── GRID CONTROL CENTER ─── */
#status { background: var(--bg); border-top: 1px solid var(--border); }

.control-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.625rem 1rem;
  margin-bottom: 1rem;
  font-family: var(--mono); font-size: 0.65rem;
}
.control-left { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); }
.control-source { color: var(--text); font-weight: 500; }
.control-badge {
  color: var(--green); background: var(--green-glow);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 2px 8px; border-radius: 3px; letter-spacing: 0.06em;
}
.control-right { display: flex; align-items: center; gap: 0.875rem; color: var(--muted); }
.control-time { color: var(--text); }
.control-refresh { opacity: 0.6; }

/* Scrollable telemetry container */
.telemetry-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.telemetry-scroll::-webkit-scrollbar { height: 4px; }
.telemetry-scroll::-webkit-scrollbar-track { background: transparent; }
.telemetry-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.telemetry-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  min-width: 0;
}
.telemetry-card {
  background: var(--bg2); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  min-width: 0;
}
.telemetry-card.primary { background: #0d150d; }
.telemetry-top { display: flex; align-items: center; justify-content: space-between; }
.telemetry-label {
  font-family: var(--mono); font-size: 0.58rem;
  color: var(--muted); letter-spacing: 0.09em; text-transform: uppercase;
}
.telemetry-status {
  font-family: var(--mono); font-size: 0.56rem;
  letter-spacing: 0.07em; padding: 2px 7px; border-radius: 3px;
  white-space: nowrap; flex-shrink: 0;
}
.telemetry-status.normal  { color: var(--green);  background: rgba(34,197,94,0.08);  border: 1px solid rgba(34,197,94,0.18); }
.telemetry-status.high    { color: var(--yellow); background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.18); }
.telemetry-status.charging{ color: var(--blue);   background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.18); }
.telemetry-value-row { display: flex; align-items: baseline; gap: 0.25rem; }
.telemetry-value {
  font-family: var(--mono); font-size: 1.75rem; font-weight: 500;
  color: var(--green); line-height: 1; letter-spacing: -0.02em;
}
.telemetry-unit { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.telemetry-sparkline { width: 100%; height: 44px; display: block; }
.telemetry-range { font-family: var(--mono); font-size: 0.58rem; color: var(--muted); margin-top: auto; }

.gen-mix-bar { display: flex; height: 4px; border-radius: 2px; overflow: hidden; gap: 1px; margin-top: 0.25rem; }
.gen-solar { background: var(--yellow); }
.gen-wind  { background: var(--blue); }
.gen-hydro { background: var(--indigo); }
.gen-gas   { background: var(--orange); }
.gen-other { background: #374151; }
.gen-mix-legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.56rem; color: var(--muted); margin-top: 0.25rem;
}
.gen-mix-legend span { display: flex; align-items: center; gap: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.solar { background: var(--yellow); }
.dot.wind  { background: var(--blue); }
.dot.hydro { background: var(--indigo); }
.dot.gas   { background: var(--orange); }

.soc-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.soc-bar-fill  { height: 100%; background: var(--blue); border-radius: 2px; transition: width 1.5s ease; }

.status-footer {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 1.25rem; font-family: var(--mono);
  font-size: 0.65rem; color: var(--muted);
}

/* ─── PROJECTS ─── */
#projects { background: var(--bg2); }

.case-study {
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg3); margin-bottom: 1.5rem; overflow: hidden;
  transition: border-color 0.2s;
}
.case-study:hover { border-color: rgba(255,255,255,0.09); }

/* Flagship treatment */
.case-study.flagship {
  border-color: rgba(34,197,94,0.2);
  background: linear-gradient(180deg, rgba(34,197,94,0.03) 0%, var(--bg3) 100%);
  margin-bottom: 2.5rem;
}
.case-study.flagship:hover { border-color: rgba(34,197,94,0.35); }

.case-study-header {
  padding: 1.75rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 1.25rem; flex-wrap: wrap;
}
.case-study-num {
  font-family: var(--mono); font-size: 0.7rem; color: var(--green);
  background: rgba(34,197,94,0.07); border: 1px solid rgba(34,197,94,0.18);
  padding: 4px 10px; border-radius: 4px; flex-shrink: 0; margin-top: 3px;
}
.flagship-num {
  font-size: 0.62rem; letter-spacing: 0.1em;
  background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3);
}
.case-study-meta { flex: 1; min-width: 0; }
.case-study-title {
  font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.6rem;
}
.case-study-link {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--muted); font-size: 0.82rem; font-weight: 500;
  transition: color 0.2s; flex-shrink: 0; margin-top: 3px;
}
.case-study-link svg { width: 17px; height: 17px; }
.case-study-link:hover { color: var(--green); }
.flagship-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; flex-wrap: wrap; }

.case-study-body {
  display: grid; grid-template-columns: 1fr 1fr;
}
.case-study-body.reverse .case-study-chart-wrap { order: -1; }

.case-study-text {
  padding: 2rem; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 1rem;
}
.case-study-body.reverse .case-study-text {
  border-right: none; border-left: 1px solid var(--border);
}
.case-study-text p { color: #9ca3af; font-size: 0.93rem; line-height: 1.75; }

/* Problem/Approach/Outcome blocks */
.cs-block { display: flex; flex-direction: column; gap: 0.35rem; }
.cs-block-label {
  font-family: var(--mono); font-size: 0.6rem; color: var(--green);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.cs-block-outcome { display: flex; flex-direction: column; gap: 0.35rem; }

.flagship-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }

.case-study-findings {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.finding { background: #131313; padding: 0.75rem 0.875rem; display: flex; flex-direction: column; gap: 0.2rem; }
.finding-label { font-family: var(--mono); font-size: 0.58rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.finding-value { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; color: var(--green); }

.cs-btn { align-self: flex-start; }

.case-study-chart-wrap {
  padding: 2rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.chart-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.25rem; }
.chart-title  { font-family: var(--mono); font-size: 0.68rem; color: var(--text); font-weight: 500; letter-spacing: 0.04em; }
.chart-subtitle { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }

/* Scrollable chart containers on mobile */
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-scroll canvas { display: block; width: 100%; height: auto; max-width: 100%; }
#chart-lmp-24h, #chart-bess { display: block; }

.chart-legend { display: flex; gap: 1rem; font-family: var(--mono); font-size: 0.62rem; color: var(--muted); flex-wrap: wrap; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.legend-line { width: 16px; height: 2px; display: inline-block; border-radius: 1px; }
.legend-line.green  { background: var(--green); }
.legend-line.yellow { background: var(--yellow); }
.legend-line.orange { background: var(--orange); }

/* Secondary projects separator */
.secondary-projects-label {
  font-family: var(--mono); font-size: 0.65rem; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.secondary-projects-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── ARCH DIAGRAM ─── */
.arch-diagram {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.4rem; font-family: var(--mono); font-size: 0.78rem;
}
.arch-layer {
  position: relative; width: 100%;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.875rem 1rem; background: #131313;
}
.arch-layer::before {
  content: attr(data-label);
  position: absolute; top: -0.5rem; left: 0.875rem;
  background: #131313; padding: 0 0.4rem;
  font-size: 0.58rem; color: var(--muted); letter-spacing: 0.09em; text-transform: uppercase;
}
.arch-row { display: flex; gap: 0.6rem; justify-content: center; }
.arch-box {
  padding: 0.55rem 0.875rem; border: 1px solid var(--border);
  border-radius: 4px; text-align: center; font-size: 0.72rem;
  color: var(--text); line-height: 1.4; flex: 1;
}
.arch-box small { color: var(--muted); font-size: 0.62rem; display: block; }
.arch-box.terraform { color: var(--green);  border-color: rgba(34,197,94,0.2);  background: rgba(34,197,94,0.04); }
.arch-box.ec2       { color: var(--orange); border-color: rgba(249,115,22,0.2); }
.arch-box.s3        { color: var(--blue);   border-color: rgba(56,189,248,0.2); }
.arch-box.iam       { color: var(--indigo); border-color: rgba(129,140,248,0.2); }
.arch-box.output    { color: var(--green);  border-color: rgba(34,197,94,0.2); }
.arch-arrow { color: var(--muted); font-size: 1rem; line-height: 1; align-self: center; }

/* ─── OTHER PROJECTS ─── */
.projects-sub-title { font-size: 0.95rem; font-weight: 600; color: var(--muted); margin-top: 2.5rem; margin-bottom: 1rem; }
.projects-other { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.project-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  padding: 1.25rem; transition: border-color 0.2s, background 0.2s;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.project-card:hover { border-color: rgba(255,255,255,0.1); background: #1f1f1f; }
.project-card.small h4 { font-size: 0.92rem; font-weight: 600; }
.project-card.small .project-header { display: flex; align-items: center; justify-content: space-between; }
.project-card.small .project-header a { color: var(--muted); transition: color 0.2s; }
.project-card.small .project-header a:hover { color: var(--green); }
.project-card.small .project-header a svg { width: 18px; height: 18px; }
.project-card p { color: #9ca3af; font-size: 0.85rem; line-height: 1.6; }

/* ─── EXPERIENCE ─── */
#experience { background: var(--bg); }
.timeline { margin-top: 3rem; position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 0; width: 1px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute; left: -2.375rem; top: 6px;
  width: 12px; height: 12px; background: var(--green); border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--green-dim);
}
.timeline-content {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem; transition: border-color 0.2s, background 0.2s;
}
.timeline-content:hover { border-color: rgba(255,255,255,0.1); background: #161616; }
.timeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; flex-wrap: wrap; gap: 0.5rem; }
.timeline-header h3 { font-size: 1.05rem; font-weight: 600; }
.timeline-date {
  font-size: 0.75rem; font-family: var(--mono); color: var(--green);
  background: var(--green-glow); padding: 2px 10px; border-radius: 20px;
  border: 1px solid rgba(34,197,94,0.18);
}
.timeline-company { color: var(--green); font-size: 0.88rem; font-weight: 500; margin-bottom: 0.75rem; display: block; }
.timeline-company-link:hover { text-decoration: underline; text-decoration-color: var(--green-dim); }
.timeline-desc { color: #9ca3af; font-size: 0.92rem; line-height: 1.7; margin-bottom: 1rem; }

/* ─── ENGINEERING STACK ─── */
#skills { background: var(--bg2); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-top: 3rem; }
.skill-group-title {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  color: var(--green); text-transform: uppercase; letter-spacing: 0.09em;
  margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.skill-list li { font-size: 0.88rem; color: #9ca3af; padding-left: 1rem; position: relative; }
.skill-list li::before { content: '▹'; position: absolute; left: 0; color: var(--green); font-size: 0.7rem; top: 2px; }

/* ─── ABOUT ─── */
#about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 1fr 270px; gap: 4rem; margin-top: 3rem; align-items: start; }
.about-text p { color: #9ca3af; margin-bottom: 1.25rem; font-size: 0.97rem; line-height: 1.8; }
.about-text p:last-child { margin-bottom: 0; }
.about-card { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.about-stat { background: var(--bg2); padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; align-items: center; text-align: center; }
.stat-num { font-size: 1.25rem; font-weight: 700; font-family: var(--mono); }
.stat-label { font-size: 0.68rem; color: var(--muted); line-height: 1.3; }

/* ─── CONTACT ─── */
#contact { background: var(--bg2); }
.contact-sub { color: var(--muted); margin-top: 1rem; margin-bottom: 3rem; max-width: 480px; font-size: 0.97rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 8px;
  transition: border-color 0.2s; min-width: 230px;
}
.contact-item:hover { border-color: rgba(255,255,255,0.1); }
.contact-icon { width: 40px; height: 40px; background: var(--green-glow); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--green); flex-shrink: 0; }
.contact-icon svg { width: 20px; height: 20px; }
.contact-label { font-size: 0.7rem; color: var(--muted); font-family: var(--mono); margin-bottom: 2px; }
.contact-value { font-size: 0.88rem; font-weight: 500; }

/* ─── FOOTER ─── */
footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; color: var(--muted); font-size: 0.78rem; }
footer a { color: var(--green); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Disable heavy animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .status-dot { animation: none; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .telemetry-grid { grid-template-columns: repeat(3, 1fr); }
  .telemetry-card:nth-child(4),
  .telemetry-card:nth-child(5) { border-top: 1px solid var(--border); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-viz { display: none; }
  .case-study-body,
  .case-study-body.reverse { grid-template-columns: 1fr; }
  .case-study-text { border-right: none !important; border-left: none !important; border-bottom: 1px solid var(--border); }
  .case-study-body.reverse .case-study-chart-wrap { order: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  section { padding: 4.5rem 1.25rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .telemetry-grid { grid-template-columns: repeat(3, 1fr); }
  .telemetry-card:nth-child(4) { border-top: 1px solid var(--border); }
  .telemetry-card:nth-child(5) { border-top: 1px solid var(--border); grid-column: span 1; }
  .hero-name { letter-spacing: -0.03em; }
  .contact-links { flex-direction: column; }
  .contact-item { min-width: unset; width: 100%; }
  .case-study-header { flex-wrap: wrap; }
  .flagship-actions { width: 100%; }
}

@media (max-width: 600px) {
  /* Horizontal scroll for telemetry on small screens */
  .telemetry-grid {
    grid-template-columns: repeat(5, minmax(168px, 1fr));
    min-width: 840px;
  }
  .telemetry-card:nth-child(4),
  .telemetry-card:nth-child(5) { border-top: none; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  section { padding: 3.5rem 1rem; }
  .case-study-header { padding: 1.25rem; }
  .case-study-text,
  .case-study-chart-wrap { padding: 1.25rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -1.875rem; }
  .flagship-btns { flex-direction: column; }
  .flagship-btns .btn { width: 100%; justify-content: center; }
}
