:root,
html[data-theme="dark"] {
  --bg: #050a12;
  --bg-elevated: rgba(12, 22, 38, 0.72);
  --bg-card: rgba(14, 28, 48, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f6fb;
  --muted: #9aa3b8;
  --faint: #6b7388;
  --accent: #0a66c2;
  --accent-2: #1e4d8c;
  --accent-3: #3b9eff;
  --danger: #ff6b8a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --header-surface: rgba(10, 12, 22, 0.42);
  --header-surface-strong: rgba(10, 12, 22, 0.55);
  --nav-panel: rgba(6, 7, 14, 0.98);
  --btn-primary-fg: #ffffff;
  --btn-primary-bg: #0a66c2;
  --btn-primary-bg-hover: #1a7ad9;
  --icon-btn-bg: rgba(255, 255, 255, 0.03);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header-h: 72px;
}

html[data-theme="light"] {
  --bg: #f3f5fa;
  --bg-elevated: rgba(255, 255, 255, 0.86);
  --bg-card: rgba(255, 255, 255, 0.78);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --muted: #475569;
  --faint: #64748b;
  --accent: #0a66c2;
  --accent-2: #1e40af;
  --accent-3: #0284c7;
  --danger: #e11d48;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
  --header-surface: rgba(255, 255, 255, 0.48);
  --header-surface-strong: rgba(255, 255, 255, 0.62);
  --nav-panel: rgba(255, 255, 255, 0.98);
  --btn-primary-fg: #ffffff;
  --btn-primary-bg: #0a66c2;
  --btn-primary-bg-hover: #1a7ad9;
  --icon-btn-bg: rgba(15, 23, 42, 0.04);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  /* Multi-stop elliptical washes — same palette, smoother falloff */
  background-color: var(--bg);
  background-image:
    radial-gradient(
      ellipse 90% 70% at 8% -5%,
      rgba(10, 102, 194, 0.22) 0%,
      rgba(15, 40, 80, 0.14) 35%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 80% 60% at 92% 0%,
      rgba(59, 158, 255, 0.14) 0%,
      rgba(10, 102, 194, 0.06) 40%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 70% 55% at 50% 105%,
      rgba(8, 40, 90, 0.35) 0%,
      rgba(10, 102, 194, 0.08) 42%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 40% at 70% 40%,
      rgba(30, 77, 140, 0.08) 0%,
      transparent 60%
    );
  background-attachment: fixed;
  line-height: 1.6;
  /* avoid overflow-x:hidden on body — it breaks position:fixed mobile menus */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

main {
  overflow-x: clip;
}

html[data-theme="light"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(
      ellipse 90% 70% at 8% -5%,
      rgba(10, 102, 194, 0.12) 0%,
      rgba(30, 64, 175, 0.05) 38%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 80% 60% at 92% 0%,
      rgba(59, 158, 255, 0.12) 0%,
      rgba(10, 102, 194, 0.04) 40%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 70% 55% at 50% 105%,
      rgba(2, 132, 199, 0.09) 0%,
      rgba(2, 132, 199, 0.03) 42%,
      transparent 70%
    );
  background-attachment: fixed;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
}

/* High-quality film grain: dense tile + soft blend (same look, less blocky) */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256' viewBox='0 0 256 256'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch' seed='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  image-rendering: auto;
  mix-blend-mode: soft-light;
  transform: translateZ(0);
}

html[data-theme="light"] .noise {
  opacity: 0.28;
  mix-blend-mode: multiply;
}

/* Soft ambient orbs — radial falloff + heavy blur (no hard edges) */
.orb {
  pointer-events: none;
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.85;
}

.orb-a {
  width: 560px;
  height: 560px;
  top: 4%;
  left: -180px;
  background: radial-gradient(
    circle at 42% 40%,
    rgba(10, 102, 194, 0.48) 0%,
    rgba(15, 45, 95, 0.22) 42%,
    transparent 72%
  );
  /* Static orbs: filter+animation is non-composited (Lighthouse) */
}

.orb-b {
  width: 500px;
  height: 500px;
  bottom: 0%;
  right: -160px;
  background: radial-gradient(
    circle at 55% 50%,
    rgba(59, 158, 255, 0.32) 0%,
    rgba(10, 102, 194, 0.12) 45%,
    transparent 72%
  );
}

html[data-theme="light"] .orb-a {
  background: radial-gradient(
    circle at 42% 40%,
    rgba(10, 102, 194, 0.26) 0%,
    rgba(30, 64, 175, 0.08) 45%,
    transparent 72%
  );
}

html[data-theme="light"] .orb-b {
  background: radial-gradient(
    circle at 55% 50%,
    rgba(59, 158, 255, 0.2) 0%,
    rgba(10, 102, 194, 0.06) 45%,
    transparent 72%
  );
}

/* iOS/Safari: fixed bg can look muddy — fall back gracefully */
@supports (-webkit-touch-callout: none) {
  body,
  html[data-theme="light"] body {
    background-attachment: scroll;
  }
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Blur lives on ::before so position:fixed mobile menu is not trapped
     inside a backdrop-filter containing block (zero-height drawer bug). */
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  padding-top: env(safe-area-inset-top);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.07) 0%,
      rgba(255, 255, 255, 0.02) 40%,
      transparent 100%
    ),
    var(--header-surface);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
  /* Frosted edge */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-header.scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.site-header.scrolled::before {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.09) 0%,
      rgba(255, 255, 255, 0.03) 45%,
      transparent 100%
    ),
    var(--header-surface-strong);
  backdrop-filter: blur(32px) saturate(1.55);
  -webkit-backdrop-filter: blur(32px) saturate(1.55);
}

html[data-theme="light"] .site-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .site-header::before {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.2) 50%,
      transparent 100%
    ),
    var(--header-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

html[data-theme="light"] .site-header.scrolled {
  border-bottom-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .site-header.scrolled::before {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.7) 0%,
      rgba(255, 255, 255, 0.35) 55%,
      transparent 100%
    ),
    var(--header-surface-strong);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  position: relative;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  order: 2;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.nav-links {
  order: 1;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--icon-btn-bg);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover,
a.icon-btn.resume-download:hover,
button.icon-btn.theme-toggle:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: none;
  transform: none;
}

html[data-theme="light"] .icon-btn:hover,
html[data-theme="light"] a.icon-btn.resume-download:hover,
html[data-theme="light"] button.icon-btn.theme-toggle:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, rgba(15, 23, 42, 0.12));
  background: color-mix(in srgb, var(--accent) 9%, #ffffff);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(10, 102, 194, 0.2), rgba(30, 77, 140, 0.25));
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  flex-shrink: 0;
}

.logo-photo {
  display: block;
  object-fit: cover;
  object-position: center top;
  padding: 0;
  background: #0c0e18;
  box-shadow: 0 0 0 1px rgba(10, 102, 194, 0.35);
}

.logo-text {
  font-size: 1.05rem;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem 0.35rem;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.22rem;
  height: 1.5px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-links a:focus-visible {
  color: var(--text);
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

html[data-theme="light"] .nav-links a:hover {
  color: #0f172a;
  background: color-mix(in srgb, var(--accent) 9%, #ffffff);
}

.nav-toggle {
  display: none;
  order: 0;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

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

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

.btn-primary {
  color: var(--btn-primary-fg);
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.btn-primary:hover {
  filter: none;
  transform: none;
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-bg-hover);
  color: #ffffff;
  box-shadow: none;
}

.btn-primary:active {
  transform: none;
  background: #0958a8;
  border-color: #0958a8;
  box-shadow: none;
}

.nav-links .btn-primary {
  color: var(--btn-primary-fg);
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-bg);
  padding: 0.55rem 1.15rem;
}

html[data-theme="light"] .nav-links .btn-primary:hover,
html[data-theme="dark"] .nav-links .btn-primary:hover {
  background: var(--btn-primary-bg-hover);
  color: #ffffff;
  border-color: var(--btn-primary-bg-hover);
  filter: none;
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  padding: 4.5rem 0 3rem;
  min-height: calc(100vh - var(--header-h));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(10, 102, 194, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(10, 102, 194, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(10, 102, 194, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 102, 194, 0); }
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.gradient-text {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 1.35rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.4rem 0 0;
  padding: 0;
}

.stats div {
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
}

.stats dt {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stats dd {
  margin: 0.2rem 0 0;
  color: var(--faint);
  font-size: 0.86rem;
}

.hero-card {
  position: relative;
}

/* Match shared card surface (about / skills / experience) — no gradient border shell */
.hero-card-inner {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.7rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  box-shadow: none;
}

html[data-theme="light"] .hero-card-inner {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: none;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  color: var(--accent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent-2) 18%, transparent)),
    var(--bg);
  border: 1px solid var(--border-strong);
  margin-bottom: 1.1rem;
}

.avatar-photo {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  object-fit: cover;
  object-position: center top;
  display: block;
  padding: 0;
  border: 2px solid #0a66c2;
  box-shadow:
    0 0 0 4px rgba(10, 102, 194, 0.18),
    0 16px 40px rgba(0, 0, 0, 0.18);
  background: var(--bg);
}

html[data-theme="light"] .avatar-photo {
  border-color: #0a66c2;
  box-shadow:
    0 0 0 4px rgba(10, 102, 194, 0.14),
    0 12px 28px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .hero-card h2 {
  color: var(--text);
}

html[data-theme="light"] .meta-label {
  color: var(--faint);
}

.hero-card h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.card-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.role {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Verified mark — Bootstrap Icons "patch-check-fill" (MIT) */
.verify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  min-width: 18px;
  min-height: 18px;
  color: #2aabee;
  background: transparent;
  border: 0;
  flex-shrink: 0;
  line-height: 0;
  vertical-align: middle;
  margin-inline-start: 0.15em;
  transform: translateY(0.05em);
}

.verify-badge svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Seal = brand blue; checkmark = solid white (not cutout) */
.verify-badge .verify-seal {
  fill: currentColor;
}

.verify-badge .verify-check {
  fill: none;
  stroke: #ffffff;
}

html[data-theme="light"] .verify-badge {
  color: #2aabee;
}

html[data-theme="light"] .verify-badge .verify-check {
  stroke: #ffffff;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  padding: 0;
}

/* Soft muted chips — low focus, gray palette */
.tags li,
.chip-list li {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(156, 163, 175, 0.88);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: none;
  opacity: 0.82;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.tags li:hover,
.chip-list li:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.28);
  color: rgba(203, 213, 225, 0.95);
  opacity: 0.95;
}

.tags li:active,
.tags li.is-active,
.tags li[aria-selected="true"],
.chip-list li:active,
.chip-list li.is-active,
.chip-list li[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.32);
  color: rgba(203, 213, 225, 0.98);
  opacity: 1;
}

html[data-theme="dark"] .tags li,
html[data-theme="dark"] .chip-list li {
  color: rgba(156, 163, 175, 0.88);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: none;
}

html[data-theme="light"] .tags li,
html[data-theme="light"] .chip-list li {
  color: rgba(100, 116, 139, 0.9);
  background: rgba(15, 23, 42, 0.025);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: none;
  opacity: 0.8;
}

html[data-theme="light"] .tags li:hover,
html[data-theme="light"] .chip-list li:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(148, 163, 184, 0.38);
  color: rgba(71, 85, 105, 0.95);
  opacity: 0.92;
}

html[data-theme="light"] .tags li:active,
html[data-theme="light"] .tags li.is-active,
html[data-theme="light"] .tags li[aria-selected="true"],
html[data-theme="light"] .chip-list li:active,
html[data-theme="light"] .chip-list li.is-active,
html[data-theme="light"] .chip-list li[aria-selected="true"] {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(148, 163, 184, 0.42);
  color: rgba(71, 85, 105, 1);
  opacity: 1;
}

.card-meta {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.9rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.card-meta div {
  display: grid;
  gap: 0.15rem;
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  font-weight: 600;
}

.section {
  padding: 5rem 0 1rem;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.4rem;
}

.experience-note {
  margin: 0.75rem 0 0;
}

.experience-more-wrap {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 0.25rem;
}

.experience-more-btn {
  min-width: 160px;
  min-height: 46px;
}

.experience-more-btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.experience-more-btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 0.45rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: expSpin 0.7s linear infinite;
}

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

.timeline-item--enter {
  animation: expItemIn 0.45s ease both;
}

@keyframes expItemIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section-kicker {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-head h2,
.contact-card h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-weight: 800;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
}

.about-copy a.about-link,
.about-copy a.about-link:link,
.about-copy a.about-link:visited,
.certs-note a.about-link,
.certs-note a.about-link:link,
.certs-note a.about-link:visited {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.about-copy a.about-link:hover,
.certs-note a.about-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.certs-note a.about-link strong {
  font-weight: 700;
  color: inherit;
}

.about-copy,
.point,
.timeline-card,
.skill-card,
.cert,
.quote,
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.about-copy {
  padding: 1.7rem;
}

.about-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.about-copy p:last-child {
  margin-bottom: 0;
}

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

.about-points {
  display: grid;
  gap: 1rem;
}

.point {
  padding: 1.25rem 1.35rem;
}

.point h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.point p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.timeline {
  --rail-w: 24px;
  --dot-size: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  position: relative;
}

/* Vertical rail centered in the rail column */
.timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--rail-w) / 2);
  top: 8px;
  bottom: 8px;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(10, 102, 194, 0.55), rgba(15, 45, 95, 0.2));
  border-radius: 1px;
  pointer-events: none;
  z-index: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: var(--dot-size);
  height: var(--dot-size);
  margin: 0;
  margin-block-start: 1.35rem;
  justify-self: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 102, 194, 0.14);
  position: relative;
  z-index: 1;
}

.timeline-card {
  min-width: 0;
}

.timeline-card {
  padding: 1.4rem 1.5rem;
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.timeline-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.timeline-card h3 .exp-title-link,
.timeline-card h3 .exp-title-link:link,
.timeline-card h3 .exp-title-link:visited,
.timeline-card h3 .exp-title-link:hover,
.timeline-card h3 .exp-title-link:active {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.timeline-card h3 .exp-title-link:hover {
  opacity: 0.88;
  text-decoration: none;
}

.timeline-card h3 .exp-title-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
  text-decoration: none;
}

html[data-theme="light"] .timeline-card h3 .exp-title-link,
html[data-theme="light"] .timeline-card h3 .exp-title-link:link,
html[data-theme="light"] .timeline-card h3 .exp-title-link:visited,
html[data-theme="light"] .timeline-card h3 .exp-title-link:hover,
html[data-theme="light"] .timeline-card h3 .exp-title-link:active {
  color: #0f172a;
  text-decoration: none;
}

html[data-theme="light"] .timeline-card h3 .exp-title-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

.company {
  margin: 0.35rem 0 0.25rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

html[data-theme="light"] .company {
  color: #0f172a;
}

.exp-period {
  margin: 0 0 0.75rem;
  color: var(--faint);
  font-size: 0.86rem;
  font-weight: 500;
}

.timeline-card > p:not(.company):not(.exp-period) {
  margin: 0;
  color: var(--muted);
}

.exp-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.chip-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
}

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.pill-live {
  color: #ffffff;
  background: var(--btn-primary-bg, #0a66c2);
  border-color: var(--btn-primary-bg, #0a66c2);
}

html[data-theme="light"] .pill {
  background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .pill-live {
  color: #ffffff;
  background: #0a66c2;
  border-color: #0a66c2;
}

html[data-theme="light"] .voice-text {
  color: #1e293b;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
  box-shadow: 0 14px 36px color-mix(in srgb, var(--accent) 12%, transparent);
}

html[data-theme="light"] .skill-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .skill-card:hover {
  background: #ffffff;
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(15, 23, 42, 0.1));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  color: var(--text);
}

html[data-theme="light"] .skill-card:hover h3,
html[data-theme="light"] .skill-card:hover p {
  color: inherit;
}

html[data-theme="light"] .skill-card:hover p {
  color: var(--muted);
}

.skill-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1 1 auto;
}

.skill-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.95rem 0 0;
  padding: 0;
}

.skill-chips li {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(156, 163, 175, 0.85);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  opacity: 0.8;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.skill-chips li:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(148, 163, 184, 0.26);
  color: rgba(203, 213, 225, 0.92);
  opacity: 0.92;
}

.skill-chips li:active,
.skill-chips li.is-active,
.skill-chips li[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(148, 163, 184, 0.3);
  color: rgba(203, 213, 225, 0.96);
  opacity: 1;
}

html[data-theme="dark"] .skill-chips li {
  color: rgba(156, 163, 175, 0.85);
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="light"] .skill-chips li {
  color: rgba(100, 116, 139, 0.88);
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(148, 163, 184, 0.26);
  opacity: 0.78;
}

html[data-theme="light"] .skill-chips li:hover {
  background: rgba(15, 23, 42, 0.035);
  border-color: rgba(148, 163, 184, 0.36);
  color: rgba(71, 85, 105, 0.92);
  opacity: 0.9;
}

html[data-theme="light"] .skill-chips li:active,
html[data-theme="light"] .skill-chips li.is-active,
html[data-theme="light"] .skill-chips li[aria-selected="true"] {
  background: rgba(15, 23, 42, 0.045);
  border-color: rgba(148, 163, 184, 0.4);
  color: rgba(71, 85, 105, 0.98);
  opacity: 1;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.cert {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cert:hover {
  transform: translateY(-3px);
  border-color: rgba(10, 102, 194, 0.35);
}

.cert-year {
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--accent);
}

.cert strong {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.cert span:last-child {
  color: var(--faint);
  font-size: 0.84rem;
}

.certs-note {
  margin-top: 1.2rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.muted a {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.center {
  text-align: center;
}

/* Voices slider (API-driven recommendations) */
.voices-slider {
  position: relative;
}

.voices-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.voices-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.voices-nav {
  display: flex;
  gap: 0.5rem;
}

.voices-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.voices-btn:hover:not(:disabled) {
  background: rgba(10, 102, 194, 0.08);
  border-color: rgba(10, 102, 194, 0.35);
  transform: translateY(-1px);
}

.voices-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.voices-viewport {
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  touch-action: pan-y;
}

.voices-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.voice-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0.15rem;
  box-sizing: border-box;
  display: flex;
}

.voice-card {
  margin: 0;
  width: 100%;
  min-height: 300px;
  height: 100%;
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background:
    radial-gradient(500px 180px at 0% 0%, rgba(10, 102, 194, 0.08), transparent 55%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.voice-avatar,
.voice-avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
}

.voice-avatar {
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(10, 102, 194, 0.4);
  background: #0c0e18;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: block;
}

.voice-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(10, 102, 194, 0.16), rgba(15, 45, 95, 0.2));
  border: 2px solid rgba(10, 102, 194, 0.3);
}

.voice-avatar-fallback[hidden] {
  display: none !important;
}

.voice-quote-mark {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  line-height: 0.8;
  opacity: 0.55;
  user-select: none;
}

.voice-text {
  margin: 0;
  flex: 1 1 auto;
  color: #d5dced;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.75;
}

.voice-person {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}

.voice-person-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.voice-person-meta strong {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.voice-person-meta span {
  color: var(--faint);
  font-size: 0.88rem;
}

.voice-person a {
  color: inherit;
  text-decoration: none;
}

.voice-person a:hover strong {
  color: var(--accent);
}

.voices-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
}

.voices-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  transition: width 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

.voices-dot[aria-current="true"],
.voices-dot[aria-selected="true"] {
  width: 22px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

/* Light mode: inactive dots need real contrast on pale backgrounds */
html[data-theme="light"] .voices-dot {
  background: rgba(15, 23, 42, 0.22);
}

html[data-theme="light"] .voices-dot:hover {
  background: rgba(15, 23, 42, 0.38);
}

html[data-theme="light"] .voices-dot[aria-current="true"],
html[data-theme="light"] .voices-dot[aria-selected="true"] {
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.voices-status {
  margin: 1rem 0 0;
}

.voices-status[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .voice-card {
    min-height: 280px;
  }

  .voice-avatar,
  .voice-avatar-fallback {
    width: 48px;
    height: 48px;
  }
}

.contact-section {
  padding-bottom: 5rem;
}

.contact-card {
  padding: clamp(1.8rem, 4vw, 3rem);
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(10, 102, 194, 0.12), transparent 55%),
    radial-gradient(600px 260px at 100% 100%, rgba(10, 102, 194, 0.14), transparent 50%),
    var(--bg-card);
}

.contact-card > p:not(.section-kicker) {
  max-width: 38rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.contact-meta {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 1.3rem 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.contact-meta li {
  display: grid;
  gap: 0.25rem;
  color: var(--text);
  font-size: 0.95rem;
}

.contact-meta span {
  color: var(--faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Floating back-to-top (bottom-right) */
.back-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1.15rem, env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--btn-primary-bg, #0a66c2) 45%, var(--border));
  background: var(--btn-primary-bg, #0a66c2);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  box-shadow: 0 10px 28px rgba(10, 102, 194, 0.28);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--btn-primary-bg-hover, #1a7ad9);
  border-color: var(--btn-primary-bg-hover, #1a7ad9);
}

.back-to-top:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, #fff);
  outline-offset: 3px;
}

html[data-theme="light"] .back-to-top {
  box-shadow: 0 10px 24px rgba(10, 102, 194, 0.22);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.9rem;
  min-height: 48px;
}

.footer-copy {
  margin: 0;
  line-height: 1.4;
  color: var(--muted);
}

.footer-build-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -0.18em;
  margin: 0 0.12em;
  color: var(--muted);
  opacity: 0.95;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-social-link {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.footer-social-link:hover {
  color: var(--accent);
  background: rgba(10, 102, 194, 0.1);
  border-color: rgba(10, 102, 194, 0.4);
  box-shadow: none;
  transform: none;
}

.footer-social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ——— Tablet ——— */
@media (max-width: 960px) {
  :root {
    --header-h: 64px;
  }

  .container {
    width: min(100% - 1.5rem, var(--max));
  }

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

  .certs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding: 2.5rem 0 2rem;
    gap: 1.75rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .section {
    padding: 3.5rem 0 0.75rem;
  }

  .contact-section {
    padding-bottom: 3.5rem;
  }

  .contact-meta {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    gap: 0.85rem;
  }

  .voices-toolbar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

/* ——— Mobile ——— */
@media (max-width: 760px) {
  .container {
    /* More side breathing room so body copy isn't flush to phone edges */
    width: min(100% - 2.25rem, var(--max));
  }

  .site-header {
    z-index: 200;
    overflow: visible;
  }

  .nav {
    height: var(--header-h);
    flex-wrap: nowrap;
  }

  /* Mobile bar: hamburger LEFT · download/theme RIGHT */
  .nav-toggle {
    display: inline-flex !important;
    order: 0;
    min-width: 44px;
    min-height: 44px;
    z-index: 230;
    background: var(--icon-btn-bg);
    color: var(--text);
    margin-inline-end: 0;
  }

  .nav-actions {
    margin-inline-start: auto;
    order: 2;
    z-index: 220;
  }

  /* Full-viewport mobile drawer — moved to body by JS, fixed to viewport */
  .nav-links {
    position: fixed !important;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px)) !important;
    min-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px)) !important;
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.15rem !important;
    margin: 0 !important;
    margin-inline: 0 !important;
    padding: 0.85rem 1.15rem calc(1.75rem + env(safe-area-inset-bottom, 0px)) !important;
    background: #07080f !important;
    border-top: 1px solid var(--border);
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 400 !important;
    order: unset;
    box-shadow: none;
    list-style: none;
  }

  html[data-theme="light"] .nav-links {
    background: #f7f8fc !important;
  }

  .nav-links.open {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body.nav-open .site-header {
    z-index: 450;
  }

  body.nav-open .site-header::before {
    background: #07080f;
  }

  html[data-theme="light"] body.nav-open .site-header::before {
    background: #f7f8fc;
  }

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

  .nav-links a {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 0.95rem 0.9rem !important;
    font-size: 1.08rem;
    font-weight: 500;
    border-radius: 14px;
    color: var(--text) !important;
  }

  .nav-links a:hover,
  .nav-links a:active {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--text) !important;
  }

  .hero {
    padding: 1.35rem 0 1rem;
    gap: 1.25rem;
  }

  .hero-copy {
    min-width: 0;
  }

  .eyebrow {
    max-width: 100%;
    margin-bottom: 0.85rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    white-space: normal;
    line-height: 1.3;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 8vw, 2.1rem);
  }

  .gradient-text {
    margin-top: 0.3rem;
    font-size: 0.92rem;
  }

  .lead {
    margin-top: 0.9rem;
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: none;
    /* Slight optical inset so long lines feel less edge-hugging */
    padding-inline: 0.1rem;
  }

  /* Compact side-by-side CTAs — not giant full-width stacks */
  .hero-cta {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    gap: 0.55rem;
    margin-top: 1.15rem;
  }

  .hero-cta .btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
    gap: 0.3rem;
  }

  .hero-cta .btn svg {
    width: 14px;
    height: 14px;
  }

  /* Stats as a tight 3-up row instead of tall stacked blocks */
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 1.35rem;
  }

  .stats div {
    padding: 0.65rem 0.15rem 0;
    text-align: center;
  }

  .stats dt {
    font-size: 1.15rem;
  }

  .stats dd {
    font-size: 0.68rem;
    line-height: 1.25;
    margin-top: 0.15rem;
  }

  .hero-card-inner {
    padding: 1.1rem;
  }

  .avatar-photo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .tags {
    gap: 0.35rem;
  }

  .tags li {
    font-size: 0.7rem;
    padding: 0.28rem 0.55rem;
  }

  .section {
    padding: 2.5rem 0 0.5rem;
  }

  .section-head {
    margin-bottom: 1.1rem;
  }

  .section-head h2,
  .contact-card h2 {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .section-kicker {
    font-size: 0.72rem;
    margin-bottom: 0.4rem;
  }

  .about-copy,
  .timeline-card,
  .skill-card,
  .cert,
  .contact-card {
    padding: 1rem;
  }

  .timeline {
    --rail-w: 20px;
    --dot-size: 10px;
    gap: 0.75rem;
  }

  .timeline-dot {
    margin-block-start: 1.05rem;
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.14);
  }

  .timeline-card {
    min-width: 0;
    border-radius: 16px;
  }

  .timeline-card h3 {
    font-size: 0.98rem;
    line-height: 1.25;
    flex: 1 1 auto;
    min-width: 0;
  }

  .timeline-top {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .pill {
    font-size: 0.62rem;
    padding: 0.22rem 0.48rem;
    flex-shrink: 0;
  }

  .company {
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .exp-period {
    font-size: 0.78rem;
    margin-bottom: 0.55rem;
  }

  .exp-summary {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .chip-list {
    gap: 0.3rem;
    margin-top: 0.75rem;
  }

  .chip-list li {
    font-size: 0.68rem;
    padding: 0.28rem 0.55rem;
  }

  .experience-more-wrap {
    margin-top: 1rem;
  }

  .experience-more-btn {
    min-height: 40px;
    padding: 0.55rem 1.1rem;
    font-size: 0.86rem;
  }

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

  .skill-card h3 {
    font-size: 0.98rem;
  }

  .skill-card p {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .certs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .cert {
    padding: 0.85rem;
  }

  .cert strong {
    font-size: 0.86rem;
  }

  .cert span {
    font-size: 0.72rem;
  }

  .voices-count {
    font-size: 0.8rem;
  }

  .voices-btn {
    min-width: 40px;
    min-height: 40px;
  }

  .voice-card {
    min-height: 220px;
    padding: 1.05rem;
  }

  .voice-text {
    font-size: 0.92rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .contact-card > p:not(.section-kicker) {
    font-size: 0.92rem;
  }

  .contact-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.55rem;
  }

  .contact-actions .btn {
    flex: 1 1 auto;
    width: auto;
    min-height: 40px;
    padding: 0.55rem 1rem;
    font-size: 0.86rem;
  }

  .site-footer {
    padding: 1.1rem 0 calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
  }

  .footer-copy {
    font-size: 0.8rem;
  }

  .footer-social-link {
    width: 40px;
    height: 40px;
  }

  /* Reduce decorative overflow on small screens */
  .orb-a,
  .orb-b {
    width: 160px;
    height: 160px;
    opacity: 0.2;
  }
}

/* ——— Small phones ——— */
@media (max-width: 400px) {
  .container {
    width: min(100% - 1.75rem, var(--max));
  }

  .logo-text {
    font-size: 0.92rem;
  }

  .hero h1 {
    font-size: 1.6rem;
    letter-spacing: -0.03em;
  }

  .gradient-text {
    font-size: 0.86rem;
  }

  /* Keep journey + LinkedIn side-by-side even on small phones */
  .hero-cta {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .hero-cta .btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 0.5rem 0.55rem;
    font-size: 0.78rem;
  }

  .stats dd {
    font-size: 0.64rem;
  }

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

  .section {
    padding: 2.25rem 0 0.4rem;
  }

  .voice-card {
    min-height: 210px;
  }
}

/* ——— Landscape phones ——— */
@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
  .hero {
    padding-top: 1.25rem;
  }

  .nav-links {
    bottom: 0;
  }

  .section {
    padding-top: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .orb-a,
  .orb-b,
  .pulse {
    animation: none;
  }
}
