/* =========================================================
   Hussein Ali · Portfolio
   Tokens (night default + light) → base → nav → sections → motion
   Brand sections (Wise, Uber) override the tokens locally.
   ========================================================= */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0a0b0d;
  --bg-rgb: 10, 11, 13;
  --surface: #111318;
  --surface-2: #161922;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --tint-1: rgba(255, 255, 255, 0.02);
  --tint-2: rgba(255, 255, 255, 0.045);
  --tint-3: rgba(255, 255, 255, 0.075);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8);
  --shadow-card: none;

  /* Text */
  --text: #eceef1;
  --text-soft: #c5cad3;
  --muted: #a3aab5;

  /* Accents */
  --accent: #7dd3fc;
  --accent-web: #a78bfa;
  --wise-label: #9fe870;

  /* Hero stat accents */
  --stat-1: #7dd3fc;
  --stat-2: #9fe870;
  --stat-3: #fbbf24;
  --stat-4: #c4b5fd;

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

  /* Layout */
  --gutter: clamp(20px, 5vw, 48px);
  --maxw: 1200px;
  --nav-h: 68px;
  --radius: 16px;
  --section-pad: clamp(96px, 14vh, 168px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f6f2;
  --bg-rgb: 246, 246, 242;
  --surface: #ffffff;
  --surface-2: #fbfbf8;
  --line: rgba(14, 15, 12, 0.09);
  --line-strong: rgba(14, 15, 12, 0.16);
  --tint-1: rgba(14, 15, 12, 0.025);
  --tint-2: rgba(14, 15, 12, 0.045);
  --tint-3: rgba(14, 15, 12, 0.075);
  --shadow: 0 1px 2px rgba(14, 15, 12, 0.05), 0 16px 36px -20px rgba(14, 15, 12, 0.25);
  --shadow-card: 0 1px 2px rgba(14, 15, 12, 0.04), 0 12px 28px -18px rgba(14, 15, 12, 0.2);

  --text: #0e0f0c;
  --text-soft: #3b3e37;
  --muted: #5f635a;

  --accent: #0369a1;
  --accent-web: #6d28d9;
  --wise-label: #2f6b0f;

  --stat-1: #0369a1;
  --stat-2: #3f7d1c;
  --stat-3: #b45309;
  --stat-4: #6d28d9;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
[tabindex="-1"]:focus { outline: none; }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); color: var(--bg); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.1em; height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Canvas backgrounds ---------- */
.has-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip; /* unlike hidden, keeps position: sticky working inside */
}

.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
  pointer-events: none;
}

/* Overlay between canvas and content: guarantees text contrast.
   Uses --bg-rgb, so it follows the theme and each brand section. */
.scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.scrim--hero {
  background:
    radial-gradient(90% 75% at 18% 50%, rgba(var(--bg-rgb), 0.72) 0%, rgba(var(--bg-rgb), 0.3) 55%, rgba(var(--bg-rgb), 0) 100%),
    linear-gradient(to bottom, rgba(var(--bg-rgb), 0) 78%, rgba(var(--bg-rgb), 1) 100%);
}

.scrim--role {
  background: linear-gradient(to right, rgba(var(--bg-rgb), 0.7) 0%, rgba(var(--bg-rgb), 0.5) 36%, rgba(var(--bg-rgb), 0) 62%);
}

.scrim--web {
  background:
    linear-gradient(to bottom, rgba(var(--bg-rgb), 1) 0%, rgba(var(--bg-rgb), 0.3) 16%, rgba(var(--bg-rgb), 0.3) 84%, rgba(var(--bg-rgb), 1) 100%);
}

.scrim--projects {
  background: radial-gradient(60% 34% at 20% 12%, rgba(var(--bg-rgb), 0.72) 0%, rgba(var(--bg-rgb), 0) 72%);
}

/* About: the map lives bottom-left; keep the text column calm */
.scrim--about {
  background: linear-gradient(to left, rgba(var(--bg-rgb), 0.6) 0%, rgba(var(--bg-rgb), 0.35) 38%, rgba(var(--bg-rgb), 0) 56%);
}
@media (max-width: 900px) {
  .scrim--about { background: rgba(var(--bg-rgb), 0.5); }
}

.scrim--skills {
  background: radial-gradient(60% 26% at 20% 9%, rgba(var(--bg-rgb), 0.72) 0%, rgba(var(--bg-rgb), 0) 72%);
}

.scrim--contact {
  background:
    linear-gradient(to bottom, rgba(var(--bg-rgb), 1) 0%, rgba(var(--bg-rgb), 0.45) 40%, rgba(var(--bg-rgb), 0.6) 100%);
}

/* ---------- Navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(var(--bg-rgb), 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 3%, transparent));
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

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

.nav-links a {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover { color: var(--text); background: var(--tint-2); }

.nav-links a.is-active {
  color: var(--text);
  background: var(--tint-3);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 3px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.nav-links .nav-cta {
  margin-left: 8px;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.nav-toggle {
  position: relative;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--tint-1);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.theme-toggle {
  display: grid;
  place-items: center;
  border-radius: 999px;
}
.theme-toggle:hover { background: var(--tint-3); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .icon { width: 18px; height: 18px; }

/* Night mode shows the sun (switch to light); light mode shows the moon. */
.icon-moon { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
:root[data-theme="light"] .icon-sun { display: none; }

.nav-toggle {
  display: none;
  border-radius: 12px;
}

.nav-toggle-bar {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out);
}
.nav-toggle-bar:nth-of-type(2) { top: 16px; }
.nav-toggle-bar:nth-of-type(3) { top: 24px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) { top: 20px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .brand-name { display: none; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 24px;
    background: rgba(var(--bg-rgb), 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
  }
  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out), visibility 0s;
  }
  .nav-links a { display: block; padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav-links a.is-active::after { left: auto; right: 16px; top: 50%; bottom: auto; transform: translateY(-50%); width: 6px; height: 6px; }
  .nav-links .nav-cta { margin: 8px 0 0; text-align: center; }
  .site-header.menu-open { background: rgba(var(--bg-rgb), 0.97); border-bottom-color: var(--line); }
}

/* ---------- Shared section bits ---------- */
.section { padding-block: var(--section-pad); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.kicker--web { color: var(--accent-web); }

.section-head h2,
.contact-title {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
}

.section-sub {
  margin-top: 20px;
  color: var(--text-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  max-width: 640px;
}

.subhead {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.subhead--spaced { margin-top: 36px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--tint-1);
}
.chips--sm li { font-size: 0.82rem; padding: 5px 12px; }
.chips .chip--strong {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(var(--bg-rgb), 0.5);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, transform 0.2s var(--ease-out);
}
.btn:hover { border-color: color-mix(in srgb, var(--text) 32%, transparent); background: var(--tint-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--primary:hover { background: var(--text); color: var(--bg); border-color: var(--text); opacity: 0.9; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + 48px) 96px;
}

.hero-inner { position: relative; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.hero-lede {
  margin-top: 28px;
  max-width: 640px;
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  line-height: 1.55;
  color: var(--text-soft);
}
.hl { color: var(--text); font-weight: 500; }

/* Company names in the hero, as brand-coloured markers */
.hl-brand {
  display: inline-block;
  padding: 0.02em 0.36em 0.06em;
  border-radius: 0.32em;
  font-weight: 600;
  line-height: 1.3;
}
/* Uber: white marker at night, black marker in light mode */
.hl-brand--uber { background: #ffffff; color: #000000; }
:root[data-theme="light"] .hl-brand--uber { background: #000000; color: #ffffff; }
/* Wise: Bright Green with Forest Green text in both modes */
.hl-brand--wise { background: #9fe870; color: #163300; }

.hero-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* Career-in-numbers cards */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(48px, 8vh, 80px);
  max-width: 980px;
}
.hero-stats > li { --stat-accent: var(--stat-1); }
.hero-stats > li:nth-child(2) { --stat-accent: var(--stat-2); }
.hero-stats > li:nth-child(3) { --stat-accent: var(--stat-3); }
.hero-stats > li:nth-child(4) { --stat-accent: var(--stat-4); }

.stat {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 24px 22px 22px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--stat-accent) 30%, var(--line));
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--stat-accent) 18%, transparent) 0%, transparent 62%),
    linear-gradient(180deg, var(--tint-2), var(--tint-1)),
    rgba(var(--bg-rgb), 0.72);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.35s var(--ease-out), border-color 0.25s ease, box-shadow 0.35s var(--ease-out);
}
.stat::before {
  content: "";
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, var(--stat-accent), transparent);
}
.stat:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--stat-accent) 60%, var(--line));
  box-shadow: var(--shadow), 0 20px 50px -24px color-mix(in srgb, var(--stat-accent) 60%, transparent);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.8vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--stat-accent);
  background: linear-gradient(165deg, var(--text) 25%, var(--stat-accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  display: block;
  margin-top: 12px;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text-soft);
}

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 28px;
  width: 26px; height: 42px;
  margin-left: -13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  left: 50%; top: 9px;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text-soft);
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  80%, 100% { transform: translateY(14px); opacity: 0; }
}

@media (max-width: 760px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .scroll-cue { display: none; }
}

@media (max-width: 420px) {
  .hero-links { flex-direction: column; }
  .hero-links .btn { width: 100%; justify-content: center; }
  .stat { padding: 20px 16px 18px; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about-grid .section-head { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + 32px); }
.about-body > p + p { margin-top: 18px; }
.about-body p { color: var(--text-soft); font-size: 1.05rem; }
.about-body .lead { color: var(--text); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.about-body .subhead { margin-top: 44px; }

/* One line per big role: small label, then the highlight */
.about-roles { display: grid; gap: 18px; margin-top: 24px; }
.about-roles li {
  --role-line: color-mix(in srgb, var(--accent) 55%, transparent);
  position: relative;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
}
.about-roles li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em; bottom: 0.3em;
  width: 2px;
  border-radius: 1px;
  background: var(--role-line);
}
.about-role {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
/* the Wise line picks up Wise green, like the timeline */
.about-roles__wise { --role-line: color-mix(in srgb, var(--wise-label) 60%, transparent); }
.about-roles__wise .about-role { color: var(--wise-label); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .section-head { position: static; }
}

/* ---------- Experience intro + timeline ---------- */
.experience-intro { padding-bottom: clamp(48px, 8vh, 96px); }
.experience-intro .section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.timeline a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.25s var(--ease-out), background-color 0.2s ease;
}
.timeline a:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-2px); }
.tl-co { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.tl-co--wise { color: var(--wise-label); }
.tl-role { font-size: 0.92rem; font-weight: 500; color: var(--text); line-height: 1.35; }
.tl-date { margin-top: auto; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }

@media (max-width: 1024px) { .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .timeline { grid-template-columns: 1fr; } .timeline a { flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 12px; } .tl-date { margin-top: 0; margin-left: auto; } }

/* ---------- Role sections ---------- */
/* Sections whose canvas and scrim fade out gently at the top and bottom */
.role,
.projects,
.about,
.skills {
  --fade: clamp(120px, 20vh, 200px);
  /* eased (smoothstep) fade: no visible line where it starts or ends */
  --edge-mask: linear-gradient(to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.1) calc(var(--fade) * 0.2),
    rgba(0, 0, 0, 0.35) calc(var(--fade) * 0.4),
    rgba(0, 0, 0, 0.65) calc(var(--fade) * 0.6),
    rgba(0, 0, 0, 0.9) calc(var(--fade) * 0.8),
    #000 var(--fade),
    #000 calc(100% - var(--fade)),
    rgba(0, 0, 0, 0.9) calc(100% - var(--fade) * 0.8),
    rgba(0, 0, 0, 0.65) calc(100% - var(--fade) * 0.6),
    rgba(0, 0, 0, 0.35) calc(100% - var(--fade) * 0.4),
    rgba(0, 0, 0, 0.1) calc(100% - var(--fade) * 0.2),
    transparent 100%);
}

.role {
  --sec-bg: var(--bg);
  --panel: rgba(var(--bg-rgb), 0.6);
  --brand: var(--text);
  --role-accent: var(--accent);
  --badge-bg: var(--text);
  --badge-fg: var(--bg);

  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(96px, 14vh, 140px);
  background-color: var(--sec-bg);
  color: var(--text);
}

/* Wise: a soft Wise-green glow on the page colour instead of a solid block.
   Forest Green at night, Bright Green in light mode; it fades out before
   the section edges so it blends into the sections around it. */
.theme-wise {
  --text: #f4fbef;
  --text-soft: #d6e8c8;
  --muted: #a9c29a;
  --line: rgba(159, 232, 112, 0.16);
  --line-strong: rgba(159, 232, 112, 0.3);
  --accent: #9fe870;
  --brand: #9fe870;
  --role-accent: #9fe870;
  --panel: rgba(22, 51, 0, 0.55);
  --badge-bg: #9fe870;
  --badge-fg: #163300;
  --glow-core: 22, 51, 0;        /* Forest Green */
  --glow-side: 22, 51, 0;
}
:root[data-theme="light"] .theme-wise {
  --text: #163300;
  --text-soft: #1f3a12;
  --muted: #35551f;
  --line: rgba(22, 51, 0, 0.16);
  --line-strong: rgba(22, 51, 0, 0.3);
  --accent: #163300;
  --brand: #163300;
  --role-accent: #163300;
  --panel: rgba(255, 255, 255, 0.45);
  --badge-bg: #163300;
  --badge-fg: #9fe870;
  --glow-core: 159, 232, 112;    /* Bright Green */
  --glow-side: 226, 246, 213;    /* Wise light green */
}
.theme-wise::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(62% 72% at 66% 50%, rgba(var(--glow-core), 1) 0%, rgba(var(--glow-core), 0.85) 34%, rgba(var(--glow-core), 0) 100%),
    radial-gradient(48% 62% at 14% 56%, rgba(var(--glow-side), 0.7) 0%, rgba(var(--glow-side), 0) 100%);
  --glow-mask: linear-gradient(to bottom,
    transparent 0%, rgba(0, 0, 0, 0.1) 6%, rgba(0, 0, 0, 0.35) 12%, rgba(0, 0, 0, 0.65) 18%, rgba(0, 0, 0, 0.9) 24%, #000 30%,
    #000 70%, rgba(0, 0, 0, 0.9) 76%, rgba(0, 0, 0, 0.65) 82%, rgba(0, 0, 0, 0.35) 88%, rgba(0, 0, 0, 0.1) 94%, transparent 100%);
  -webkit-mask-image: var(--glow-mask);
  mask-image: var(--glow-mask);
}

/* Uber: Uber black in both themes; each role keeps a small accent */
.theme-uber {
  --sec-bg: #000000;
  --bg-rgb: 0, 0, 0;
  --text: #ffffff;
  --text-soft: #d9d9d9;
  --muted: #b3b3b3;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #ffffff;
  --brand: #ffffff;
  --role-accent: #f5b544;
  --panel: rgba(10, 10, 10, 0.7);
  --badge-bg: #ffffff;
  --badge-fg: #000000;
}
/* Soft join where the Uber run meets the page. At night it hides the
   step from the page colour to Uber black; in light mode both are the
   page colour, so it does nothing. */
.theme-uber.edge-top { background-image: linear-gradient(to bottom, var(--bg), var(--sec-bg) var(--fade)); }
.theme-uber.edge-bottom { background-image: linear-gradient(to top, var(--bg), var(--sec-bg) var(--fade)); }

/* Moving objects and the text scrim fade out near every section edge */
.role > .bg-canvas,
.role > .scrim,
.projects > .bg-canvas,
.projects > .scrim,
.about > .bg-canvas,
.about > .scrim,
.skills > .bg-canvas,
.skills > .scrim {
  -webkit-mask-image: var(--edge-mask);
  mask-image: var(--edge-mask);
}

.theme-uber--night { --role-accent: #fcd34d; }
.theme-uber--green { --role-accent: #4ade80; }
.theme-uber--dawn  { --role-accent: #fb923c; }

/* Light mode: Uber sections sit on the light page (Uber's own light look);
   black stays the brand colour for type, badge and details. */
:root[data-theme="light"] .theme-uber {
  --sec-bg: var(--bg);
  --bg-rgb: inherit;
  --text: #000000;
  --text-soft: #333333;
  --muted: #5e5e5e;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --accent: #000000;
  --brand: #000000;
  --role-accent: #b45309;
  --panel: rgba(255, 255, 255, 0.62);
  --badge-bg: #000000;
  --badge-fg: #ffffff;
}
:root[data-theme="light"] .theme-uber--night { --role-accent: #a16207; }
:root[data-theme="light"] .theme-uber--green { --role-accent: #15803d; }
:root[data-theme="light"] .theme-uber--dawn  { --role-accent: #c2410c; }

.role-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

/* soft halo keeps meta text readable over moving objects */
.role-meta {
  text-shadow: 0 0 22px rgba(var(--bg-rgb), 0.9), 0 1px 3px rgba(var(--bg-rgb), 0.55);
}

.role-company {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.co-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  box-shadow: 0 0 0 1px var(--line-strong), 0 8px 20px -10px rgba(0, 0, 0, 0.6);
}
.co-badge svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.co-badge--uber svg { width: 28px; height: 28px; }

.role-index { margin-left: auto; color: var(--muted); letter-spacing: 0.04em; }

.role-title {
  margin-top: 20px;
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  line-height: 1.08;
}
.role-team { margin-top: 12px; color: var(--text-soft); font-size: 1.02rem; }
.role-when {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.role-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.role-tags li {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role-accent) 40%, transparent);
  color: var(--text-soft);
}

.role-metric {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--brand);
}
.metric-label { font-size: 0.9rem; color: var(--muted); max-width: 320px; }

.role-points,
.role-points-wrap {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  backdrop-filter: blur(8px) saturate(115%);
}
.role-points-wrap .role-points {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.role-points li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.65;
}
.role-points li + li { margin-top: 16px; }
.role-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 8px; height: 2px;
  border-radius: 1px;
  background: var(--role-accent);
}

.role-earlier {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--line-strong);
}
.role-earlier-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.role-earlier-title { margin-top: 8px; font-size: 1.2rem; }
.role-earlier .role-when { margin-top: 4px; }
.role-points--compact { margin-top: 12px; }

@media (max-width: 900px) {
  .role { min-height: 0; padding-block: 96px; }
  .role, .projects, .about, .skills { --fade: 96px; }
  .role-grid { grid-template-columns: 1fr; }
  .scrim--role { background: rgba(var(--bg-rgb), 0.35); }
}

/* ---------- Projects ---------- */
.projects .section-head { text-shadow: 0 0 22px rgba(var(--bg-rgb), 0.9); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* frosted: the analytics background shows through softly */
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 78%, transparent), color-mix(in srgb, var(--surface) 78%, transparent));
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, transform 0.35s var(--ease-out);
}
.project-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.project-card--featured {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  background:
    radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 78%, transparent), color-mix(in srgb, var(--surface) 78%, transparent));
}
.project-card--featured h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.project-card--featured > p:not(.project-org):not(.project-metric) { max-width: 760px; font-size: 1.02rem; }
.project-org {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.project-card h3 { margin-top: 14px; font-size: clamp(1.3rem, 2vw, 1.55rem); }
.project-card > p:not(.project-org):not(.project-metric) { margin-top: 14px; color: var(--text-soft); font-size: 0.97rem; }
.project-metric { margin-top: 18px; color: var(--muted); font-size: 0.9rem; }
.project-metric strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.02em; margin-right: 4px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }
.project-tags li { font-size: 0.75rem; font-family: var(--font-mono); color: var(--muted); padding: 4px 10px; border-radius: 6px; background: var(--tint-2); }

@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; } }

/* ---------- Web development ---------- */
.web { --accent: var(--accent-web); }
.web .section-head { margin-bottom: 48px; text-shadow: 0 0 22px rgba(var(--bg-rgb), 0.9); }

.web-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
}
.web-card {
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent-web) 20%, transparent);
  border-radius: 14px;
  background: rgba(var(--bg-rgb), 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, transform 0.35s var(--ease-out);
}
.web-card:hover { border-color: color-mix(in srgb, var(--accent-web) 45%, transparent); transform: translateY(-2px); }
.web-glyph {
  display: inline-grid;
  place-items: center;
  min-width: 40px; height: 40px;
  padding-inline: 8px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-web);
  background: color-mix(in srgb, var(--accent-web) 12%, transparent);
}
.web-card h3 { margin-top: 16px; font-size: 1.08rem; letter-spacing: -0.01em; }
.web-card p { margin-top: 6px; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.web-note { margin-top: 32px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

@media (max-width: 860px) { .web-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .web-grid { grid-template-columns: 1fr; } }

/* ---------- Skills & credentials ---------- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.skills .section-head { text-shadow: 0 0 22px rgba(var(--bg-rgb), 0.9); }
/* room beside the heading for the radar chart; short top fade so it isn't dimmed */
.skills { --fade: clamp(80px, 10vh, 110px); }
@media (min-width: 768px) {
  .skills .section-head { min-height: 270px; }
}

.skill-group {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* frosted: the radar shows through softly */
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: var(--shadow-card);
}
.skill-group h3 { font-size: 1.05rem; margin-bottom: 16px; letter-spacing: -0.01em; }

.cred-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
  margin-top: 20px;
}
.cred-block {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: var(--shadow-card);
}
.cert-list > div + div { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.cert-list dt { font-weight: 600; font-family: var(--font-display); font-size: 1.02rem; }
.cert-list dd { margin-top: 6px; color: var(--text-soft); font-size: 0.93rem; line-height: 1.6; }
.cred-main { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.35; }
.cred-sub { margin-top: 6px; color: var(--muted); font-size: 0.92rem; }
.lang-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.lang-list li:last-child { border-bottom: 0; }
.lang-level { color: var(--muted); font-weight: 400; font-size: 0.92rem; text-align: right; }

@media (max-width: 1100px) { .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .skill-grid, .cred-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact footer ---------- */
.contact {
  padding-block: clamp(120px, 18vh, 200px) 40px;
  border-top: 1px solid var(--line);
}
.contact-inner { text-align: center; }
.contact .kicker { margin-bottom: 20px; }
.contact-title { font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.04em; }
.contact-sub { margin: 18px auto 0; max-width: 520px; color: var(--text-soft); font-size: 1.05rem; }
.contact-email {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.6vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding-bottom: 4px;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact-email:hover { border-color: var(--accent); }
.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.95rem;
}
.contact-list a { color: var(--text-soft); border-bottom: 1px solid transparent; transition: border-color 0.2s ease, color 0.2s ease; }
.contact-list a:hover { color: var(--text); border-color: var(--line-strong); }
.footer-meta { margin-top: clamp(80px, 12vh, 140px); color: var(--muted); font-size: 0.82rem; font-family: var(--font-mono); }
.footer-meta a:hover { color: var(--text); }

/* ---------- 30-second summary ---------- */
html.summary-open { overflow: hidden; }

/* hero link */
.hero-summary { margin-top: 18px; }
.summary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  color: var(--muted);
}
.summary-link .icon { width: 17px; height: 17px; color: var(--accent); }
.summary-link__text {
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  transition: border-color 0.2s ease;
}
.summary-link__arrow { color: var(--accent); transition: transform 0.25s var(--ease-out); }
.summary-link:hover .summary-link__text { border-color: var(--accent); }
.summary-link:hover .summary-link__arrow { transform: translateX(3px); }

/* the panel */
.summary {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90vh, 940px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.85);
  overflow: auto;
  overscroll-behavior: contain;
}
.summary { --ok: #4ade80; }
/* the panel itself never shows a focus ring; its controls do */
.summary:focus, .summary:focus-visible { outline: none; }
:root[data-theme="light"] .summary { --ok: #15803d; }
.summary::backdrop { background: rgba(4, 5, 7, 0.72); }
:root[data-theme="light"] .summary::backdrop { background: rgba(20, 22, 18, 0.35); }
.summary[open] { animation: summary-in 0.4s var(--ease-out); }
.summary[open]::backdrop { animation: summary-fade 0.3s ease; }
@keyframes summary-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes summary-fade { from { opacity: 0; } to { opacity: 1; } }

.summary__inner { position: relative; padding: clamp(24px, 4vw, 44px); }

.summary__close {
  position: absolute;
  top: clamp(16px, 3vw, 28px); right: clamp(16px, 3vw, 28px);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--tint-1);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s var(--ease-out);
}
.summary__close:hover { background: var(--tint-3); }
.summary__close:active { transform: scale(0.94); }
.summary__close .icon { width: 18px; height: 18px; }

.summary__head { padding-right: 56px; }
.summary__head .kicker { margin-bottom: 12px; }
.summary__head h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 700; letter-spacing: -0.035em; }
.summary__role { margin-top: 10px; font-family: var(--font-display); font-size: clamp(1.02rem, 1.8vw, 1.2rem); font-weight: 500; color: var(--text-soft); }
.summary__pitch { margin-top: 12px; max-width: 640px; font-size: 1rem; line-height: 1.6; color: var(--text-soft); }
.summary__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.summary__tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--tint-1);
  font-size: 0.8rem;
  color: var(--text-soft);
}
.summary__tags .summary__status {
  color: var(--text);
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line-strong));
}
.summary__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent);
  animation: summary-pulse 2.4s ease-in-out infinite;
}
@keyframes summary-pulse {
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 8%, transparent); }
}

.summary__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}
.summary__stats li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--tint-1);
}
.summary__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.summary__stats span { display: block; margin-top: 4px; font-size: 0.78rem; line-height: 1.35; color: var(--muted); }
.summary__stats li:nth-child(1) strong { color: var(--stat-1); }
.summary__stats li:nth-child(2) strong { color: var(--stat-2); }
.summary__stats li:nth-child(3) strong { color: var(--stat-3); }
.summary__stats li:nth-child(4) strong { color: var(--stat-4); }

.summary__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  margin-top: 30px;
}
.summary__side { display: grid; gap: 26px; align-content: start; }
.summary__block h3 {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.summary__company + .summary__company { margin-top: 20px; }
.summary__company-head { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.summary__company-head b { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.summary__tenure { margin-left: auto; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); white-space: nowrap; }

/* roles on a progression line, latest role filled */
.summary__roles {
  --dot: var(--accent);
  margin: 10px 0 0 11px;
  padding-left: 22px;
  border-left: 1px solid var(--line-strong);
}
.summary__company--wise .summary__roles { --dot: var(--wise-label); }
.summary__roles li { position: relative; }
.summary__roles li + li { margin-top: 13px; }
.summary__roles li::before {
  content: "";
  position: absolute;
  left: -26.5px; top: 0.45em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--dot);
}
.summary__roles li:first-child::before { background: var(--dot); }
.summary__what { font-size: 0.93rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.summary__when {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

/* small company badges (the same logos as the role sections) */
.co-badge--sm {
  width: 24px; height: 24px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.co-badge--sm svg { width: 14px; height: 14px; }
.co-badge--uber.co-badge--sm svg { width: 19px; height: 19px; }
.summary .co-badge--wise { --badge-bg: #9fe870; --badge-fg: #163300; }
.summary .co-badge--uber { --badge-bg: #ffffff; --badge-fg: #000000; }
:root[data-theme="light"] .summary .co-badge--uber { --badge-bg: #000000; --badge-fg: #ffffff; }
.summary__note { margin-top: 3px; font-size: 0.87rem; line-height: 1.55; color: var(--text-soft); }

.summary__wins li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-soft);
}
.summary__wins li + li { margin-top: 11px; }
.summary__wins strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  white-space: nowrap;
}

.summary__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.summary__copy .icon { width: 16px; height: 16px; }
.summary__copy.is-copied { border-color: color-mix(in srgb, var(--ok) 55%, var(--line-strong)); }
.summary__copy.is-copied .icon { color: var(--ok); }

.summary__more {
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
}
.summary__more:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  .summary__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* full-screen sheet on phones */
  .summary {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .summary__more { margin-left: 0; width: 100%; }
}

/* floating pill, shown between the hero and the contact section */
.summary-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--text);
  font: 500 0.85rem var(--font-body);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out), visibility 0s linear 0.35s, border-color 0.2s ease;
}
.summary-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out), visibility 0s, border-color 0.2s ease;
}
.summary-fab .icon { width: 17px; height: 17px; color: var(--accent); }
.summary-fab:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong)); }

@media (prefers-reduced-motion: reduce) {
  .summary[open], .summary[open]::backdrop, .summary__dot { animation: none; }
}

/* ---------- Scroll reveals ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* stat cards land after the rest of the hero */
.js .hero-stats .reveal { transition-delay: calc(380ms + var(--reveal-delay, 0ms)); }

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