/* ==========================================================
   Theme tokens (dark by default, light via the toggle)
   ========================================================== */
:root {
  --bg: #0a0d14;
  --bg-elev: #0f1420;
  --surface: rgba(20, 26, 40, 0.72);
  --surface-solid: #141a28;
  --text: #e8ecf4;
  --muted: #98a2b8;
  --border: rgba(148, 163, 196, 0.16);
  --border-strong: rgba(148, 163, 196, 0.3);

  --accent: #8b7bff;         /* violet: AI */
  --accent-2: #22d3ee;       /* cyan: cloud */
  --aws: #ff9900;            /* AWS orange */
  --ok: #34d399;
  --gradient: linear-gradient(120deg, #8b7bff 0%, #22d3ee 100%);
  --accent-soft: rgba(139, 123, 255, 0.14);
  --glow: 0 0 0 1px rgba(139, 123, 255, 0.25), 0 20px 60px -20px rgba(139, 123, 255, 0.35);
  --grid-line: rgba(148, 163, 196, 0.06);
  --on-accent: #0a0d14;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 16px;
  --max-width: 1120px;
  --header-h: 68px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-solid: #ffffff;
  --text: #0f1424;
  --muted: #535d75;
  --border: rgba(15, 20, 36, 0.1);
  --border-strong: rgba(15, 20, 36, 0.2);

  --accent: #5b47e0;
  --accent-2: #0891b2;
  --aws: #d97706;
  --ok: #059669;
  --gradient: linear-gradient(120deg, #5b47e0 0%, #0891b2 100%);
  --accent-soft: rgba(91, 71, 224, 0.1);
  --glow: 0 0 0 1px rgba(91, 71, 224, 0.18), 0 20px 50px -24px rgba(91, 71, 224, 0.35);
  --grid-line: rgba(15, 20, 36, 0.05);
  --on-accent: #ffffff;
  color-scheme: light;
}

/* ==========================================================
   Base
   ========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Faint grid with a glow behind the hero */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 60% 50% at 75% 10%, rgba(139, 123, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 30%, rgba(34, 211, 238, 0.1), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================
   Header & navigation
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 20px -6px rgba(139, 123, 255, 0.6);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

.nav-links a.active {
  box-shadow: inset 0 -2px 0 var(--accent-2);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Show the icon for the theme you would switch to */
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   Buttons, tags, cards
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 12px;
  font: 600 0.95rem var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(139, 123, 255, 0.7);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px -10px rgba(34, 211, 238, 0.7);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 4px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--muted);
}

.bullets li strong {
  color: var(--text);
  font-weight: 600;
}

.bullets li::before {
  content: "▹";
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--accent-2);
}

.date,
.meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.role {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 56px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 10px;
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  font-weight: 600;
  margin-bottom: 22px;
  min-height: 1.3em;
}

.role-static {
  color: var(--muted);
}

.role-rotator {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.caret {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--accent-2);
  animation: blink 1s steps(1) infinite;
}

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

.hero-tagline {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 30px;
}

.hero-tagline strong {
  color: var(--text);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.social-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.93rem;
}

.social-links a:hover {
  color: var(--text);
}

/* Agentic architecture diagram */
.agent-diagram {
  margin: 0;
  min-width: 0;
  padding: 18px 18px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--glow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.agent-diagram-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}

.agent-diagram-head .kicker {
  margin: 0;
  white-space: nowrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.agent-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.dg-link {
  stroke: var(--accent-2);
  stroke-opacity: 0.55;
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  animation: dash-flow 1.4s linear infinite;
}

/* The human line flows inward (approvals), the others flow out to tools */
.dg-link-human {
  stroke: var(--accent);
  stroke-opacity: 0.8;
  animation-direction: reverse;
}

.dg-link-edge {
  stroke: var(--aws);
  stroke-opacity: 0.7;
}

@keyframes dash-flow {
  to { stroke-dashoffset: -20; }
}

.dg-orbit {
  transform-origin: 240px 215px;
  animation: spin 40s linear infinite;
}

.dg-orbit-ring {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
}

.dg-orbit-text {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  fill: var(--accent-2);
  opacity: 0.85;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.dg-core {
  fill: var(--bg-elev);
  stroke: url(#dg-grad);
  stroke-width: 2.5;
}

.dg-core-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--text);
}

.dg-core-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  text-anchor: middle;
  fill: var(--muted);
}

.dg-node rect {
  fill: var(--bg-elev);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.dg-node text {
  text-anchor: middle;
}

.dg-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  fill: var(--text);
}

.dg-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--muted);
}

.dg-node-human rect {
  stroke: var(--accent);
  stroke-width: 1.5;
}

.dg-node-edge rect {
  stroke: var(--aws);
  stroke-width: 1.5;
}

/* ==========================================================
   Sections
   ========================================================== */
.section {
  padding-top: 80px;
  padding-bottom: 80px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 40px;
}

/* Focus areas */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.focus-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.97rem;
}

.focus-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  margin-bottom: 18px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-2);
}

.focus-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.focus-card:nth-child(2) .focus-icon {
  color: var(--aws);
}

/* Projects */
.project {
  padding: 34px;
  margin-bottom: 24px;
}

.project.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
    var(--gradient) border-box;
  border: 1px solid transparent;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.project h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 4px;
}

.project .meta {
  margin: 0;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
}

.project-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-summary {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 820px;
}

.project-summary strong {
  color: var(--text);
}

.project .tags {
  margin-top: 18px;
}

.project-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}

/* Architecture diagram */
.arch {
  display: flex;
  align-items: stretch;
  margin: 28px 0 30px;
  padding: 22px;
  border-radius: 14px;
  border: 1px dashed var(--border-strong);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}

.arch-node {
  flex: 1 1 0;
  min-width: 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
}

.arch-node h4 {
  font-size: 1rem;
  margin: 6px 0 6px;
}

.arch-node p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.arch-step {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-2);
}

.arch-ai {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 30px -12px var(--accent);
}

.arch-edge {
  border-color: color-mix(in srgb, var(--aws) 55%, transparent);
}

.arch-arrow {
  position: relative;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-arrow::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 10px;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent-2) 0 6px, transparent 6px 10px);
  background-size: 20px 2px;
  animation: flow 1s linear infinite;
}

.arch-arrow::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--accent-2);
  border-right: 0;
}

.arch-arrow span {
  position: absolute;
  top: calc(50% + 8px);
  width: 90px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--muted);
}

@keyframes flow {
  to { background-position: 20px 0; }
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.skill-aws {
  border-color: color-mix(in srgb, var(--aws) 45%, transparent);
}

/* Wider AWS (and languages) cards so the 7 cards fill complete rows */
@media (min-width: 961px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .skill-aws,
  .skill-spoken {
    grid-column: span 2;
  }
}

@media (min-width: 761px) and (max-width: 960px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-aws {
    grid-column: span 2;
  }
}

.skill-aws h3 {
  color: var(--aws);
}

.skill-aws .tags li {
  background: color-mix(in srgb, var(--aws) 12%, transparent);
  border-color: color-mix(in srgb, var(--aws) 30%, transparent);
}

/* Experience timeline */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 38px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-2);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 4px;
}

.timeline-head h3 {
  font-size: 1.25rem;
}

.loc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.93rem;
  color: var(--muted);
}

.timeline .bullets {
  margin-top: 12px;
}

/* Collapsible older roles */
.earlier summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
  transition: border-color 0.2s ease;
}

.earlier summary::-webkit-details-marker {
  display: none;
}

.earlier summary:hover {
  border-color: var(--accent-2);
}

.earlier-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.earlier-title::before {
  content: "▸";
  display: inline-block;
  margin-right: 10px;
  color: var(--accent-2);
  transition: transform 0.2s ease;
}

.earlier[open] .earlier-title::before {
  transform: rotate(90deg);
}

.earlier-list {
  display: grid;
  gap: 30px;
  padding: 26px 0 0 4px;
}

/* Several roles at one employer */
.role-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.role-list li {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 16px;
}

.role-list .role-title {
  color: var(--text);
  font-weight: 500;
}

.role-list li:first-child .role-title {
  color: var(--accent-2);
}

@media (max-width: 560px) {
  .role-list {
    gap: 10px;
  }

  .role-list li {
    grid-template-columns: 1fr auto;
  }

  .role-list .loc {
    grid-row: 2;
  }
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

@media (min-width: 761px) {
  .edu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.edu-grid .date {
  margin-bottom: 10px;
}

.edu-grid h3 {
  margin-bottom: 6px;
}

.honors {
  font-size: 0.93rem;
  margin: 12px 0 0;
  color: var(--muted);
}

.honors strong {
  color: var(--ok);
}

/* Contact */
.contact {
  padding-bottom: 110px;
}

.contact-card {
  text-align: center;
  padding: 56px 28px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}

.contact .section-title {
  margin-bottom: 16px;
}

.contact-text {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-actions {
  justify-content: center;
  margin-bottom: 8px;
}

.copy-status {
  min-height: 1.5em;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ok);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-inner p {
  margin: 0;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ==========================================================
   Scroll reveal (only hides sections when JS can reveal them)
   ========================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding-top: 56px;
  }

  .arch {
    flex-direction: column;
  }

  .arch-arrow {
    flex-basis: 52px;
  }

  .arch-arrow::before {
    left: 50%;
    right: auto;
    top: 4px;
    bottom: 10px;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--accent-2) 0 6px, transparent 6px 10px);
    background-size: 2px 20px;
    animation-name: flow-down;
  }

  .arch-arrow::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 2px;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--accent-2);
    border-bottom: 0;
  }

  .arch-arrow span {
    top: 50%;
    left: calc(50% + 12px);
    transform: translateY(-50%);
    width: auto;
    text-align: left;
  }

  .project-cols {
    grid-template-columns: 1fr;
  }
}

@keyframes flow-down {
  to { background-position: 0 20px; }
}

@media (max-width: 760px) {
  .container {
    padding: 0 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-links.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 10px 0;
    font-size: 1.05rem;
  }

  .nav-links a.active {
    box-shadow: none;
    color: var(--accent-2);
  }

  .theme-toggle {
    margin-top: 8px;
  }

  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .project {
    padding: 22px;
  }

  .project-head {
    flex-direction: column;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .agent-diagram {
    padding: 14px 10px 4px;
  }

  .agent-diagram-head .kicker,
  .live-pill {
    font-size: 0.7rem;
  }

  .contact-card {
    padding: 40px 18px;
  }
}

/* ==========================================================
   AWS certification
   ========================================================== */
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  margin-bottom: 28px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--aws) 45%, transparent);
  background: color-mix(in srgb, var(--aws) 9%, var(--surface));
  font-size: 0.93rem;
  color: var(--muted);
}

a.cert-badge {
  transition: transform 0.15s ease, border-color 0.2s ease;
}

a.cert-badge:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--aws);
}

.cert-verify {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid color-mix(in srgb, var(--aws) 35%, transparent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--aws);
  white-space: nowrap;
}

.cert-link {
  margin-top: 14px;
  color: var(--aws);
}

.edu-tags {
  margin-top: 14px;
}

.cert-badge strong {
  color: var(--aws);
  margin-right: 4px;
}

.cert-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--aws) 16%, transparent);
  color: var(--aws);
}

.cert-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-note {
  margin: -4px 0 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.cert-card {
  border-color: color-mix(in srgb, var(--aws) 45%, transparent);
}

.cert-card .date {
  color: var(--aws);
}

/* Promotion tag on a role */
.promo-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  color: var(--ok);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: 2px;
}
