/* ============================================================
   Ronnie Mbuthia — Platform Engineer portfolio
   Vanilla CSS. No frameworks.
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-2: #080b14;
  --surface: rgba(13, 18, 32, 0.66);
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #e6eaf2;
  --text-dim: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #8b7cf6;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: rgba(34, 211, 238, 0.28); }

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---------- ambient background ---------- */
.grid-overlay {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 85%);
}

.aurora {
  position: fixed; inset: -20%; z-index: -3; pointer-events: none;
  background:
    radial-gradient(38% 30% at 20% 12%, rgba(34, 211, 238, 0.10), transparent 70%),
    radial-gradient(34% 28% at 82% 8%, rgba(139, 124, 246, 0.12), transparent 70%),
    radial-gradient(40% 34% at 55% 96%, rgba(34, 211, 238, 0.05), transparent 70%);
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.05); }
}

/* ---------- glass ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(5, 7, 13, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(5, 7, 13, 0.85); }

.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 14px; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px var(--accent); }
.cursor-blink { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--bg) !important;
  background: var(--grad);
  padding: 7px 16px; border-radius: 999px; font-weight: 600 !important;
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }
.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); }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-family: var(--font-mono); font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad); color: #04121a; box-shadow: 0 8px 30px rgba(34, 211, 238, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(34, 211, 238, 0.4); }
.btn-ghost { background: rgba(148, 163, 184, 0.06); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0); animation: ripple 0.6s ease-out forwards;
}
@keyframes ripple { to { transform: scale(3.2); opacity: 0; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 130px 0 80px;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; }

.hero-inner {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ok); letter-spacing: 0.04em;
  border: 1px solid rgba(52, 211, 153, 0.25); border-radius: 999px;
  padding: 6px 14px; background: rgba(52, 211, 153, 0.06);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  display: inline-block; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 8.5vw, 104px);
  line-height: 0.98; letter-spacing: -0.03em; font-weight: 700;
  margin: 22px 0 18px;
}
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-tagline { font-size: 14px; color: var(--accent); letter-spacing: 0.02em; margin-bottom: 18px; }
.hero-sub { max-width: 560px; color: var(--text-dim); font-size: 17px; margin-bottom: 30px; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 42px; }

.hero-stats { display: flex; gap: 40px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 26px; color: var(--text); font-weight: 600; }
.hero-stats span { font-size: 12px; color: var(--text-dim); }

/* hero photo */
.hero-photo { position: relative; }
.photo-frame {
  position: relative; border-radius: 22px; overflow: visible;
  transition: transform 0.25s ease;
  will-change: transform;
}
.photo-frame::before {
  content: ""; position: absolute; inset: -2px; border-radius: 24px; z-index: -1;
  background: var(--grad); opacity: 0.55; filter: blur(22px);
  animation: glowPulse 5s ease-in-out infinite;
}
@keyframes glowPulse { 50% { opacity: 0.3; } }
.photo-frame img {
  width: 100%; height: auto; display: block; border-radius: 22px;
  border: 1px solid var(--line-strong);
}
.photo-badge {
  position: absolute; padding: 8px 13px; font-size: 11.5px; color: var(--text);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  animation: floaty 6s ease-in-out infinite;
}
.badge-uptime { top: 20px; left: -34px; color: var(--ok); }
.badge-deploy { bottom: 60px; right: -28px; color: var(--accent); animation-delay: -2s; }
.badge-k8s { bottom: -16px; left: 26px; color: var(--accent-2); animation-delay: -4s; }
@keyframes floaty { 50% { transform: translateY(-9px); } }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--text-dim); font-size: 11px; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-line { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- sections ---------- */
.section { padding: 110px 24px; }
.section-eyebrow { color: var(--accent); font-size: 13px; letter-spacing: 0.03em; margin-bottom: 14px; }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.02em; line-height: 1.12;
  margin-bottom: 22px;
}
.section-sub { color: var(--text-dim); max-width: 620px; margin-bottom: 36px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; margin-top: 34px; }
.about-text p { color: var(--text-dim); margin-bottom: 18px; font-size: 16.5px; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-card { padding: 28px; align-self: start; position: sticky; top: 100px; }
.card-label { color: var(--text-dim); font-size: 12px; margin-bottom: 16px; }
.principle-list { list-style: none; font-size: 13px; }
.principle-list li { padding: 11px 0; border-bottom: 1px dashed var(--line); color: var(--text); display: flex; gap: 12px; }
.principle-list li:last-child { border-bottom: 0; }

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.skill-card { padding: 22px; transition: transform 0.25s ease, border-color 0.25s; }
.skill-card:hover { border-color: rgba(34, 211, 238, 0.4); }
.skill-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.skill-head h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; }
.skill-icon { font-size: 18px; filter: grayscale(0.2); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
  background: rgba(148, 163, 184, 0.05);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.chips span:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.chips.small span { font-size: 10.5px; padding: 3px 9px; }

/* ---------- timeline ---------- */
.timeline { position: relative; margin-top: 26px; padding-left: 36px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
  opacity: 0.5;
}
.tl-item { position: relative; margin-bottom: 34px; }
.tl-marker {
  position: absolute; left: -36px; top: 26px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.12), 0 0 18px rgba(34, 211, 238, 0.5);
}
.tl-marker::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: var(--accent); animation: pulse 2.4s ease-in-out infinite;
}
.tl-card { padding: 26px 28px; transition: transform 0.25s ease, border-color 0.25s; }
.tl-card:hover { border-color: rgba(139, 124, 246, 0.45); }
.tl-date { color: var(--accent); font-size: 12px; margin-bottom: 8px; }
.tl-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.tl-loc { font-size: 11px; color: var(--text-dim); font-weight: 400; }
.tl-card > p { color: var(--text-dim); font-size: 15px; margin-bottom: 14px; }
.tl-achievements { list-style: none; margin-bottom: 16px; font-size: 12.5px; color: var(--ok); }
.tl-achievements li { padding: 3px 0; }

/* ---------- projects ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 10px; }
.project-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s; }
.project-card:hover { border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 22px 60px rgba(34, 211, 238, 0.08); }
.project-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.project-meta { font-size: 11.5px; color: var(--accent); }
.project-detail dt { font-family: var(--font-mono); font-size: 11px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 10px; }
.project-detail dd { color: var(--text-dim); font-size: 14px; }

.project-diagram { border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 7, 13, 0.5); overflow: hidden; }
.project-diagram svg { display: block; width: 100%; height: auto; }
.pd-nodes rect { fill: rgba(34, 211, 238, 0.06); stroke: var(--line-strong); }
.pd-nodes text { fill: var(--text-dim); font-family: var(--font-mono); font-size: 9px; text-anchor: middle; }
.pd-edge {
  fill: none; stroke: var(--accent); stroke-width: 1.4; opacity: 0.6;
  stroke-dasharray: 5 6; animation: dashFlow 1.6s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -22; } }
.project-card:hover .pd-edge { opacity: 1; stroke: var(--accent-2); }

/* ---------- architecture ---------- */
.arch-tabs { display: flex; gap: 8px; justify-content: center; margin: 26px 0 20px; flex-wrap: wrap; }
.arch-tab {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim);
  background: rgba(148, 163, 184, 0.05); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 18px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.arch-tab:hover { color: var(--text); }
.arch-tab.active { color: var(--accent); border-color: var(--accent); background: rgba(34, 211, 238, 0.08); }

.arch-stage { position: relative; max-width: 1120px; margin: 0 auto; padding: 18px; }
#archSvg { display: block; width: 100%; height: auto; }

.arch-node rect, .arch-node circle { fill: rgba(13, 18, 32, 0.9); stroke: var(--line-strong); stroke-width: 1.2; transition: stroke 0.2s, filter 0.2s; }
.arch-node text { fill: var(--text); font-family: var(--font-mono); font-size: 12px; text-anchor: middle; pointer-events: none; }
.arch-node .sub { fill: var(--text-dim); font-size: 9.5px; }
.arch-node .icon { font-size: 16px; }
.arch-node { cursor: pointer; }
.arch-node:hover rect, .arch-node.active rect { stroke: var(--accent); filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.55)); }
.arch-edge { fill: none; stroke: rgba(148, 163, 184, 0.3); stroke-width: 1.4; }
.arch-edge-pulse { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 90; opacity: 0.85; animation: edgePulse 3.2s linear infinite; }
@keyframes edgePulse { to { stroke-dashoffset: -188; } }
.arch-packet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.arch-packet.violet { fill: var(--accent-2); filter: drop-shadow(0 0 6px var(--accent-2)); }
.arch-group-label { fill: var(--text-dim); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.arch-group-box { fill: rgba(34, 211, 238, 0.025); stroke: var(--line); stroke-dasharray: 6 6; rx: 12; }

.arch-tooltip {
  position: absolute; z-index: 5; max-width: 280px; padding: 12px 14px;
  font-size: 12px; color: var(--text); pointer-events: none;
  border-color: rgba(34, 211, 238, 0.4);
}
.arch-tooltip strong { color: var(--accent); display: block; margin-bottom: 4px; }

/* ---------- observability ---------- */
.dash { padding: 0; overflow: hidden; }
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-dim);
}
.dash-title { display: flex; align-items: center; gap: 8px; color: var(--text); }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.dash-panel { background: var(--bg-2); padding: 16px; }
.dash-panel.wide { grid-column: span 3; }
.panel-label { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.dash-panel canvas { width: 100%; display: block; }
.dash-stats { background: var(--bg-2); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.dash-stats .stat strong { font-family: var(--font-mono); font-size: 22px; color: var(--ok); }

/* ---------- terminal ---------- */
.terminal { max-width: 780px; margin: 10px auto 0; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.red { background: #ff5f57; } .term-dot.yellow { background: #febc2e; } .term-dot.green { background: #28c840; }
.term-title { margin-left: 10px; font-size: 12px; color: var(--text-dim); }
.term-body { padding: 18px 20px 8px; min-height: 260px; max-height: 380px; overflow-y: auto; font-size: 13px; line-height: 1.7; }
.term-body .t-line { white-space: pre-wrap; word-break: break-word; }
.term-body .t-cmd { color: var(--text); }
.term-body .t-out { color: var(--text-dim); }
.term-body .t-ok { color: var(--ok); }
.term-body .t-accent { color: var(--accent); }
.term-body .t-err { color: var(--err); }
.term-prompt { color: var(--ok); }
.term-input-row { display: flex; gap: 10px; padding: 10px 20px 18px; font-size: 13px; }
#termInput {
  flex: 1; background: none; border: 0; outline: none; color: var(--text);
  font-family: var(--font-mono); font-size: 13px; caret-color: var(--accent);
}
#termInput::placeholder { color: rgba(148, 163, 184, 0.4); }

/* ---------- devsecops ---------- */
.sec-rail {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  list-style: none; margin: 0 0 26px; position: relative;
}
.sec-rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}
.sec-stage { position: relative; padding: 26px 20px 0 0; }
.sec-stage::before {
  content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--accent);
  transition: box-shadow 0.3s, background 0.3s;
}
.sec-stage:hover::before { background: var(--accent); box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.14); }
.sec-stage-name {
  display: block; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.sec-stage p { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }

.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.sec-card { padding: 26px; transition: transform 0.25s ease, border-color 0.25s; }
.sec-card:hover { border-color: rgba(34, 211, 238, 0.4); }
.sec-card > p { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }
.sec-metric {
  font-size: 12.5px; color: var(--text-dim);
  border-left: 2px solid var(--accent); padding-left: 12px;
  margin: 16px 0 18px;
}
.sec-metric strong { color: var(--text); font-weight: 600; }

/* ---------- credentials ---------- */
.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 10px; }
.cred-card { padding: 26px; transition: transform 0.25s ease, border-color 0.25s; }
.cred-card:hover { border-color: rgba(139, 124, 246, 0.5); }
.cred-badge {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent-2);
  border: 1px solid rgba(139, 124, 246, 0.4); border-radius: 6px; padding: 4px 10px;
  margin-bottom: 14px; background: rgba(139, 124, 246, 0.08);
}
.cred-card h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; margin-bottom: 8px; }
.cred-card p { font-size: 12px; color: var(--text-dim); }

/* ---------- tech cloud ---------- */
.cloud-field { position: relative; height: 340px; margin-top: 10px; }
.cloud-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  will-change: transform; transition: border-color 0.2s, color 0.2s;
  animation: floaty var(--dur, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  white-space: nowrap;
}
.cloud-chip:hover { border-color: var(--accent); color: var(--accent); }
.cloud-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 8px var(--c, var(--accent)); }

/* ---------- metrics ---------- */
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 10px; }
.metric { padding: 26px 22px; text-align: center; transition: transform 0.25s ease, border-color 0.25s; }
.metric:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); }
.metric strong { display: block; font-size: 36px; font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.metric span { font-size: 12.5px; color: var(--text-dim); }

/* ---------- references ---------- */
.ref-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 10px; }
.ref-card { padding: 24px; transition: transform 0.25s ease, border-color 0.25s; }
.ref-card:hover { border-color: rgba(34, 211, 238, 0.4); }
.ref-avatar {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: #04121a; background: var(--grad); margin-bottom: 14px;
}
.ref-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.ref-card p.mono { font-size: 11px; color: var(--accent); margin: 4px 0 10px; }
.ref-note { font-size: 13px; color: var(--text-dim); }

/* ---------- contact ---------- */
.contact-card { padding: 60px 48px; text-align: center; position: relative; overflow: hidden; }
.contact-card::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: radial-gradient(40% 40% at 50% 50%, rgba(34, 211, 238, 0.08), transparent 70%);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}
.contact-card .section-sub { margin-left: auto; margin-right: auto; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 30px 0 24px; }
.contact-meta { font-size: 12px; color: var(--text-dim); }

/* ---------- footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
  padding: 34px 24px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-dim);
}
.footer-sep { opacity: 0.4; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .skills-grid, .cred-grid { grid-template-columns: repeat(2, 1fr); }
  .ref-grid, .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-panel.wide { grid-column: span 2; }
  .sec-rail { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .sec-rail::before { display: none; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-photo { max-width: 380px; margin: 0 auto; }
  .badge-uptime { left: -10px; }
  .badge-deploy { right: -10px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .projects-grid { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: 1fr; }
  .sec-rail { grid-template-columns: repeat(2, 1fr); }
  .nav-links {
    position: fixed; top: 60px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(5, 7, 13, 0.97); border-bottom: 1px solid var(--line);
    padding: 10px 24px 20px;
    transform: translateY(-130%); transition: transform 0.3s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 12px 0; font-size: 15px; }
  .nav-cta { text-align: center; margin-top: 10px; }
  .nav-toggle { display: block; }
}

@media (max-width: 560px) {
  .section { padding: 80px 16px; }
  .skills-grid, .cred-grid, .ref-grid, .metrics-grid { grid-template-columns: 1fr; }
  .sec-rail { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-panel.wide { grid-column: span 1; }
  .hero-stats { gap: 24px; }
  .contact-card { padding: 44px 22px; }
  .cloud-field { height: 420px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  #heroCanvas { display: none; }
}

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
