@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap");

:root {
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-display: Inter, system-ui, -apple-system, sans-serif;
  --bg: #ffffff;
  --card: #fafaf9;
  --card-hover: #f5f5f4;
  --header-bg: #ffffff;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: rgba(29, 78, 216, 0.08);
  --text: #1c1917;
  --muted: #57534e;
  --muted-light: #78716c;
  --border: #e7e5e4;
  --border-hover: #d6d3d1;
  --link: #1d4ed8;
  --hero-gradient: var(--bg);
  --metric-gradient: linear-gradient(135deg, #eff6ff 0%, #fafaf9 100%);
  --metric-value: #1e40af;
  --tag-bg: #eff6ff;
  --tag-text: #1e40af;
  --tag-border: rgba(29, 78, 216, 0.18);
  --figcaption-bg: #f5f5f4;
  --card-shadow: 0 12px 32px rgba(28, 25, 23, 0.08);
  --takeaways-bg: linear-gradient(135deg, #eff6ff 0%, #fafaf9 100%);
  --profile-ring: rgba(29, 78, 216, 0.28);
  --related-section-bg: #f5f5f4;
  --exec-hero-bg: linear-gradient(125deg, #f8fafc 0%, #f1f5f9 40%, #eff6ff 75%, #fafaf9 100%);
  --exec-hero-border: #e7e5e4;
  --exec-hero-eyebrow: #57534e;
  --exec-hero-headline: #1c1917;
  --exec-hero-roles: #1d4ed8;
  --exec-hero-tagline: #78716c;
  --exec-hero-metrics-border: #e7e5e4;
  --exec-hero-metric-value: #1c1917;
  --exec-hero-metric-label: #57534e;
  --exec-hero-photo-border: #e7e5e4;
  --exec-hero-photo-shadow: 0 20px 40px rgba(28, 25, 23, 0.1), 0 0 0 1px rgba(29, 78, 216, 0.1);
  --exec-hero-outline-border: #d6d3d1;
  --exec-hero-outline-color: #1c1917;
  --exec-hero-outline-hover-bg: rgba(29, 78, 216, 0.08);
  --exec-hero-outline-hover-border: #1d4ed8;
  --exec-hero-note: #57534e;
  --article-max: 42rem;
  --article-sidebar: 280px;
  --article-gap: 24px;
  --article-layout-max: calc(var(--article-max) + var(--article-sidebar) + var(--article-gap));
  --site-header-height: 68px;
  --portfolio-subnav-height: 52px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --font-body: Inter, system-ui, -apple-system, sans-serif;
  --font-display: Inter, system-ui, -apple-system, sans-serif;
  --bg: #0a0f1f;
  --card: #111827;
  --card-hover: #1a2332;
  --header-bg: #08101f;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-light: #cbd5e1;
  --border: #1e293b;
  --border-hover: #334155;
  --link: #60a5fa;
  --hero-gradient: var(--bg);
  --metric-gradient: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.9));
  --metric-value: #93c5fd;
  --tag-bg: rgba(37, 99, 235, 0.15);
  --tag-text: #93c5fd;
  --tag-border: rgba(37, 99, 235, 0.25);
  --figcaption-bg: rgba(0, 0, 0, 0.2);
  --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --takeaways-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(30, 58, 95, 0.4));
  --profile-ring: rgba(37, 99, 235, 0.45);
  --related-section-bg: rgba(8, 16, 31, 0.6);
  --exec-hero-bg: linear-gradient(125deg, #060b14 0%, #0a0f1f 38%, #0f172a 72%, #111827 100%);
  --exec-hero-border: rgba(255, 255, 255, 0.06);
  --exec-hero-eyebrow: rgba(148, 163, 184, 0.92);
  --exec-hero-headline: #ffffff;
  --exec-hero-roles: #93c5fd;
  --exec-hero-tagline: rgba(203, 213, 225, 0.92);
  --exec-hero-metrics-border: rgba(255, 255, 255, 0.1);
  --exec-hero-metric-value: #ffffff;
  --exec-hero-metric-label: rgba(148, 163, 184, 0.88);
  --exec-hero-photo-border: rgba(255, 255, 255, 0.12);
  --exec-hero-photo-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(37, 99, 235, 0.15);
  --exec-hero-outline-border: rgba(255, 255, 255, 0.35);
  --exec-hero-outline-color: #ffffff;
  --exec-hero-outline-hover-bg: rgba(255, 255, 255, 0.08);
  --exec-hero-outline-hover-border: rgba(255, 255, 255, 0.5);
  --exec-hero-note: rgba(148, 163, 184, 0.85);
}

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

html {
  scroll-padding-top: var(--site-header-height);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html.smooth-scroll-active {
  scroll-behavior: auto;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overscroll-behavior-y: none;
}

h1,
h2,
h3,
h4,
header nav,
.nav-links,
.nav-toggle,
.btn,
.tag,
.tech-tag,
.metric-value,
.theme-toggle,
.nav-print-pdf,
.breadcrumb,
.case-meta-list,
.tech-tags,
.resume-aside-card,
header nav .brand {
  font-family: var(--font-display);
}

[data-theme="light"] .page-blog-article .article-body,
[data-theme="light"] .page-blog-article .article-block,
[data-theme="light"] .resume-summary-card,
[data-theme="light"] .resume-timeline-item,
[data-theme="light"] ul.clean li {
  font-family: var(--font-body);
}

.page-blog-article .article-block h2,
.page-blog-article .takeaways-box h2 {
  scroll-margin-top: 88px;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 1.25rem 0 1.5rem;
}

.metric-card {
  background: var(--metric-gradient);
  border: 1px solid var(--tag-border);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--metric-value);
  line-height: 1.2;
  margin-bottom: 6px;
}

.metric-label {
  display: block;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted-light);
}

.case-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted-light);
  line-height: 1.55;
}

.case-meta-list li {
  margin-bottom: 8px;
}

.case-meta-list strong {
  color: var(--muted);
  font-weight: 600;
}

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

.tech-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
}

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

@media (max-width: 720px) {
  .portfolio-related-grid {
    grid-template-columns: 1fr;
  }
}

a {
  color: inherit;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    backdrop-filter 0.25s ease;
}

header.is-scrolled,
header.nav-open {
  background-color: var(--header-bg);
  border-bottom-color: var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] header.is-scrolled,
[data-theme="dark"] header.nav-open {
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
}

/* Portfolio case + article posts: header sits over dark cover hero */
.page-blog-article header:not(.is-scrolled):not(.nav-open) nav .brand {
  color: #f8fafc;
}

.page-blog-article header:not(.is-scrolled):not(.nav-open) .nav-links a {
  color: #cbd5e1;
}

.page-blog-article header:not(.is-scrolled):not(.nav-open) .nav-links a:hover,
.page-blog-article header:not(.is-scrolled):not(.nav-open) .nav-links a.active {
  color: #ffffff;
  font-weight: 600;
}

.page-blog-article header:not(.is-scrolled):not(.nav-open) .nav-toggle,
.page-blog-article header:not(.is-scrolled):not(.nav-open) .theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f8fafc;
}

header nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 0;
  gap: 16px;
}

header nav .brand {
  grid-column: 1;
  justify-self: start;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  grid-column: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px 14px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  background: var(--hero-gradient);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, rgba(30, 58, 95, 0.45), transparent 65%);
  pointer-events: none;
}

[data-theme="light"] .hero::before {
  display: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35em;
}

.hero .subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 1rem auto 2rem;
}

/* ——— Executive Hero (CTO / Portfolio / About / Home) ——— */
.executive-hero {
  position: relative;
  padding: 56px 0 64px;
  background: var(--exec-hero-bg);
  overflow: hidden;
  border-bottom: 1px solid var(--exec-hero-border);
}

.executive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 12% 0%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 88% 100%, rgba(30, 58, 95, 0.22), transparent 50%);
  pointer-events: none;
}

[data-theme="light"] .executive-hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 12% 0%, rgba(29, 78, 216, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 88% 100%, rgba(29, 78, 216, 0.05), transparent 50%);
}

.executive-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
  pointer-events: none;
}

[data-theme="light"] .executive-hero::after {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

.executive-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(260px, 28%);
  gap: 32px 56px;
  align-items: center;
}

.executive-hero-content {
  min-width: 0;
}

.executive-hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--exec-hero-eyebrow);
  margin-bottom: 14px;
}

.executive-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--exec-hero-headline);
  margin-bottom: 10px;
}

.executive-hero-roles {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 500;
  color: var(--exec-hero-roles);
  margin-bottom: 18px;
  line-height: 1.45;
}

.executive-hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.55;
  color: var(--exec-hero-tagline);
  max-width: 36rem;
  margin-bottom: 24px;
}

.executive-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 36rem;
  margin-bottom: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--exec-hero-metrics-border);
}

.executive-metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--exec-hero-metric-value);
  line-height: 1;
  margin-bottom: 4px;
}

.executive-metric span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--exec-hero-metric-label);
  line-height: 1.3;
}

.executive-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.executive-hero-actions .btn-outline {
  border-color: var(--exec-hero-outline-border);
  color: var(--exec-hero-outline-color);
  background: transparent;
}

.executive-hero-actions .btn-outline:hover {
  background: var(--exec-hero-outline-hover-bg);
  border-color: var(--exec-hero-outline-hover-border);
}

.executive-hero-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--exec-hero-note);
  max-width: 32rem;
}

.executive-hero-photo {
  justify-self: end;
  width: min(260px, 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--exec-hero-photo-border);
  box-shadow: var(--exec-hero-photo-shadow);
  line-height: 0;
}

.executive-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

.executive-hero-diagram {
  position: absolute;
  top: 50%;
  right: max(12px, calc((100% - 1120px) / 2 + 12px));
  z-index: 0;
  width: min(42%, 480px);
  transform: translateY(-48%);
  opacity: 0.35;
  pointer-events: none;
}

.executive-hero-diagram img {
  display: block;
  width: 100%;
  height: auto;
}

.executive-hero--resume .executive-hero-inner {
  grid-template-columns: minmax(0, 1fr) min(200px, 24%);
}

@media (max-width: 960px) {
  .executive-hero {
    padding: 40px 0 48px;
  }

  .executive-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .executive-hero-photo {
    order: -1;
    justify-self: center;
    width: min(180px, 56vw);
  }

  .executive-hero-tagline,
  .executive-hero-note {
    margin-left: auto;
    margin-right: auto;
  }

  .executive-hero-metrics {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .executive-hero-actions {
    justify-content: center;
  }

  .executive-hero-diagram {
    display: none;
  }
}

@media (max-width: 520px) {
  .executive-hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
  }
}

/* ——— Page intro (About / Portfolio - no duplicate hero) ——— */
.page-intro {
  padding: 52px 0 36px;
  background: var(--bg);
}

.page-intro-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.page-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-intro-lead {
  color: var(--muted-light);
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* ——— Home landing ——— */
.landing-summary-text {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--muted-light);
  max-width: 42rem;
}

.landing-paths-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.landing-path-card {
  display: block;
  padding: 24px 22px;
  border-radius: 12px;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.landing-path-card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
}

.landing-path-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.landing-path-card p {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.landing-path-card span {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--link);
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 1.5rem;
}

.section-head-row .section-lead {
  margin: 0;
}

.landing-contact-band {
  text-align: center;
  padding: 48px 28px;
  border-radius: 16px;
  background: var(--card);
}

.landing-contact-band p {
  color: var(--muted);
  max-width: 32rem;
  margin: 0 auto 22px;
}

.landing-contact-band .btn-outline {
  margin-left: 8px;
}

@media (max-width: 768px) {
  .landing-contact-band .btn-outline {
    margin-left: 0;
    margin-top: 10px;
  }
}

/* ——— About ——— */
.about-bio-text {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted-light);
  max-width: 46rem;
}

.career-journey {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.career-journey-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.career-journey-item:last-child {
  border-bottom: none;
}

.career-journey-period {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
}

.career-journey-item h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.career-journey-item p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .landing-paths-grid {
    grid-template-columns: 1fr;
  }

  .career-journey-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.page-hero {
  padding: 72px 0 0px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--muted-light);
  max-width: 720px;
}

.section {
  padding: 64px 0;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.section h3 {
  font-size: 1.15rem;
  margin: 1rem 0 0.5rem;
}

.card {
  background: var(--card);
  padding: 28px;
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  margin-left: 12px;
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

ul.clean {
  list-style: none;
  padding: 0;
}

ul.clean li {
  padding: 0.35rem 0;
  color: var(--muted);
}

ul.clean li::before {
  content: "-> ";
  color: var(--primary);
}

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin: 4px 6px 4px 0;
  border: 1px solid var(--tag-border);
}

.timeline-item {
  border-left: 2px solid var(--primary);
  padding-left: 24px;
  margin-bottom: 32px;
}

.timeline-item .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-top: 48px;
}

.metric {
  text-align: center;
  min-width: 140px;
}

.metric strong {
  display: block;
  font-size: 2rem;
  color: var(--primary);
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
}

form {
  max-width: 520px;
}

form input,
form textarea {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
}

form textarea {
  min-height: 140px;
  resize: vertical;
}

footer {
  margin-top: 64px;
  padding: 48px 24px;
  text-align: center;
  background: #050b17;
  border-top: 1px solid var(--border);
  color: #f8fafc;
}

footer h3 {
  margin-bottom: 8px;
  color: #ffffff;
}

footer p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 6px 0;
}

.blog-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.blog-meta a {
  color: var(--link);
  text-decoration: none;
}

.blog-meta a:hover {
  text-decoration: underline;
}

/* ——— Blog index ——— */
.page-blog-index .blog-index-hero {
  background: var(--hero-gradient);
}

.hero-deck {
  color: var(--muted-light);
  font-size: 1.1rem;
  max-width: 640px;
  margin-top: 12px;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-list-actions {
  margin-top: 28px;
  text-align: center;
}

.blog-list-actions[hidden] {
  display: none;
}

.blog-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.blog-load-more-icon {
  flex-shrink: 0;
}

.blog-load-more[hidden] {
  display: none;
}

.blog-load-more:disabled {
  opacity: 0.65;
  cursor: wait;
}

@keyframes blog-card-reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card.blog-card-reveal {
  animation: blog-card-reveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--reveal-i, 0) * 65ms);
}

@media (prefers-reduced-motion: reduce) {
  .blog-card.blog-card-reveal {
    animation: none;
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-height: 220px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.blog-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: 22px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow);
}

.blog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.blog-card-date {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.blog-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text);
}

.blog-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.blog-card-more {
  color: var(--link);
  font-weight: 600;
}

.category-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--metric-value);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--tag-border);
}

/* ——— Blog article ——— */
.page-blog-article .article-hero-stage {
  margin-top: calc(-1 * var(--site-header-height));
  padding-top: var(--site-header-height);
  min-height: calc(100vh + var(--site-header-height));
}

.article-hero-stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--bg);
  overflow: hidden;
}

.page-blog-article .article-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  max-height: none;
  min-height: 100%;
  z-index: 0;
}

.page-blog-article .article-cover-img {
  width: 100%;
  height: 100%;
  min-height: calc(100vh + var(--site-header-height));
  object-fit: cover;
  display: block;
}

.page-blog-article .article-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 31, 0.3) 0%,
    rgba(10, 15, 31, 0.72) 50%,
    rgba(10, 15, 31, 0.96) 100%
  );
  pointer-events: none;
}

.page-blog-article .article-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 0;
  padding: 0 0 52px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(10, 15, 31, 0.55) 100%);
}

.page-blog-article .article-hero .article-hero-inner {
  width: min(94%, var(--article-layout-max));
  max-width: var(--article-layout-max);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-blog-article .article-section > .container {
  width: min(94%, var(--article-layout-max));
  max-width: var(--article-layout-max);
  margin-left: auto;
  margin-right: auto;
}

.page-blog-article .article-section.section {
  padding: 24px 0 28px;
}

.article-related-section {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--related-section-bg);
}

.article-related-section h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.article-related-deck {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-related-actions {
  margin-top: 22px;
  text-align: center;
}

.article-related-actions .btn-outline {
  margin-left: 0;
}

@media (max-width: 960px) {
  .article-related-grid {
    grid-template-columns: 1fr;
  }
}

.article-cover {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0f172a;
}

.article-cover-img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.article-cover-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

nav.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 0;
  width: 100%;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--link);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span:last-child {
  color: var(--muted-light);
}

.article-hero .category-badge {
  margin-bottom: 16px;
}

.article-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.article-deck {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--muted-light);
  margin-bottom: 24px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.article-byline .dot {
  opacity: 0.5;
}

/* Light theme: article hero on dark cover - keep light text, not light-palette --text */
[data-theme="light"] .page-blog-article .article-hero-stage {
  color: #f8fafc;
}

[data-theme="light"] .page-blog-article .article-hero h1 {
  color: #ffffff;
}

[data-theme="light"] .page-blog-article .article-hero .breadcrumb {
  color: #94a3b8;
}

[data-theme="light"] .page-blog-article .article-hero .breadcrumb a {
  color: #93c5fd;
}

[data-theme="light"] .page-blog-article .article-hero .breadcrumb span:last-child {
  color: #cbd5e1;
}

[data-theme="light"] .page-blog-article .article-hero .article-deck {
  color: #e2e8f0;
}

[data-theme="light"] .page-blog-article .article-hero .article-byline {
  color: #94a3b8;
}

[data-theme="light"] .page-blog-article .article-hero .category-badge {
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
  border-color: rgba(147, 197, 253, 0.35);
}

[data-theme="light"] .page-blog-article .article-hero a:not(.btn) {
  color: #93c5fd;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--article-sidebar);
  gap: var(--article-gap);
  align-items: start;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.article-prose {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 18px;
  max-width: 100%;
}

@media (min-width: 961px) {
  .article-prose {
    padding: 18px 20px;
  }
}

.article-block {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
}

.article-block:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.article-block h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.article-list {
  margin: 0.65rem 0 0.85rem 1.1rem;
  color: var(--muted-light);
}

.article-list li {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}

.article-figure {
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-figure figcaption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}

.takeaways-box {
  margin-top: 1.25rem;
  padding: 14px 16px;
  background: var(--takeaways-bg);
  border: 1px solid var(--tag-border);
  border-radius: 12px;
}

.takeaways-box h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--metric-value);
  margin-bottom: 14px;
  border: none;
  padding: 0;
}

.takeaways-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.takeaways-box li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.65rem;
  color: var(--muted-light);
  line-height: 1.65;
}

.takeaways-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--link);
  font-weight: 700;
}

.aside-outline .article-outline ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-outline li {
  margin-bottom: 4px;
}

.article-outline a {
  display: block;
  padding: 5px 0 5px 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted-light);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.article-outline a:hover,
.article-outline a.is-active {
  color: var(--metric-value);
  border-left-color: var(--primary);
}

.aside-outline {
  max-height: min(42vh, 300px);
  overflow-y: auto;
}

.aside-thumb {
  padding: 0 !important;
  overflow: hidden;
}

.aside-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.article-prose .lead {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--muted-light);
  margin-bottom: 0.85rem;
}

.article-aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 96px;
}

.aside-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.aside-card h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.aside-card p {
  font-size: 0.92rem;
  color: var(--muted-light);
  line-height: 1.6;
}

.btn-block {
  display: block;
  text-align: center;
  width: 100%;
}

.btn-outline.btn-block {
  margin-left: 0;
  margin-top: 0;
}

.prose p {
  margin-bottom: 0.9rem;
  color: var(--muted-light);
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose h2 {
  color: var(--text);
  margin-top: 1.35rem;
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.prose ul {
  margin: 0.65rem 0 1rem 1.25rem;
  color: var(--muted-light);
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .aside-card {
    flex: 1 1 240px;
  }

  .article-prose {
    padding: 14px 16px;
  }

  .article-aside {
    gap: 8px;
  }
}

.card h2 a,
.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h2 a:hover {
  color: var(--metric-value);
}

/* ——— Resume page ——— */
.resume-hero-banner {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #0f172a;
}

.resume-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.resume-hero-banner-diagram {
  position: absolute;
  top: 50%;
  right: max(16px, calc((100% - 1120px) / 2 + 16px));
  z-index: 1;
  width: min(52%, 580px);
  transform: translateY(-52%);
  pointer-events: none;
}

.resume-hero-banner-diagram img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(37, 99, 235, 0.28));
  opacity: 0.96;
}

.resume-hero-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    105deg,
    rgba(10, 15, 31, 0.15) 0%,
    rgba(10, 15, 31, 0.35) 38%,
    rgba(10, 15, 31, 0.72) 62%,
    rgba(10, 15, 31, 0.88) 100%
  );
}

.resume-hero-banner--compact {
  height: 180px;
}

.page-hero.resume-hero {
  padding: 0 0 36px;
  margin-top: -72px;
  position: relative;
  z-index: 3;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    transparent 0,
    transparent 72px,
    var(--bg) 72px,
    var(--bg) 100%
  );
}

.page-hero.portfolio-hero,
.page-hero.about-hero {
  padding: 0 0 48px;
  margin-top: -56px;
  position: relative;
  z-index: 3;
  background: transparent;
  border-bottom: none;
}

[data-theme="light"] .page-hero.resume-hero h1 {
  color: #ffffff;
  text-shadow: 0 1px 14px rgba(10, 15, 31, 0.5);
}

[data-theme="light"] .page-hero.portfolio-hero h1,
[data-theme="light"] .page-hero.about-hero h1 {
  color: var(--text);
  text-shadow: none;
}

.profile-hero-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px 32px;
  align-items: start;
  padding: 32px 36px 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.page-portfolio .profile-hero-card .resume-profile-wrap,
.page-about .profile-hero-card .resume-profile-wrap {
  margin-top: -88px;
}

.resume-hero-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.resume-hero-text {
  padding-top: 0;
}

.page-hero.resume-hero .resume-hero-text > p,
.page-hero.portfolio-hero .resume-hero-text > p,
.page-hero.about-hero .resume-hero-text > p {
  color: var(--muted);
  max-width: 720px;
}

.page-hero.resume-hero .resume-hero-name,
.page-hero.portfolio-hero .resume-hero-name,
.page-hero.about-hero .resume-hero-name {
  color: var(--text);
}

.resume-profile-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--profile-ring);
  box-shadow: var(--card-shadow);
  background: var(--card);
}

.resume-profile-photo {
  display: block;
  width: 200px;
  height: 250px;
  object-fit: cover;
}

.page-contact .contact-layout.grid-2 {
  gap: 16px;
  align-items: stretch;
}

.page-contact .contact-form-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-contact .contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: none;
  height: 100%;
}

.page-contact .contact-form textarea {
  flex: 1;
  min-height: 140px;
}

.page-contact .contact-direct-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 16px 20px;
  box-sizing: border-box;
}

.page-contact .contact-direct-layout {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
}

.page-contact .contact-profile-wrap {
  width: 100%;
  max-width: 120px;
  margin: 0;
}

.page-contact .contact-profile-wrap .resume-profile-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

.page-contact .contact-direct-info h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.page-contact .contact-direct-info p {
  color: var(--muted);
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.page-contact .contact-direct-info p:last-child {
  margin-bottom: 0;
}

.page-contact .contact-direct-links {
  margin-top: 8px;
}

.page-contact .contact-direct-info a {
  color: inherit;
  text-decoration: underline;
}

.page-contact .contact-direct-info a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .page-contact .contact-form {
    height: auto;
  }

  .page-contact .contact-form textarea {
    flex: none;
  }

  .page-contact .contact-direct-card {
    height: auto;
    justify-content: flex-start;
  }

  .page-contact .contact-direct-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .page-contact .contact-profile-wrap {
    max-width: 140px;
  }
}

.resume-hero-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.resume-hero-location {
  font-size: 0.9rem;
  color: var(--muted);
}

.resume-hero-actions {
  margin-top: 18px;
}

.page-resume .resume-section.section {
  padding: 32px 0 48px;
}

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.resume-section-title {
  margin-top: 36px;
  margin-bottom: 16px;
}

.resume-section-title:first-child {
  margin-top: 0;
}

.resume-inline-figure {
  margin: 0 0 18px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.resume-inline-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.resume-inline-figure figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--figcaption-bg);
}

.resume-summary-card {
  padding: 18px 20px;
}

.resume-timeline-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.resume-timeline-thumb {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.resume-leadership-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
}

.resume-card-side-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.resume-project-card {
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.resume-project-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.resume-project-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.resume-project-body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.resume-project-body p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
  margin: 0;
}

.resume-project-link {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--link);
  font-weight: 600;
}

.resume-cred-card {
  padding: 0;
  overflow: hidden;
}

.resume-cred-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.resume-cred-card h3,
.resume-cred-card p {
  padding: 0 18px;
}

.resume-cred-card h3 {
  margin-top: 14px;
}

.resume-cred-card p {
  padding-bottom: 18px;
}

.resume-speaking-card {
  padding: 0;
  overflow: hidden;
}

.resume-speaking-card > img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.resume-speaking-card p {
  padding: 0 18px 18px;
}

.resume-speaking-body {
  padding: 18px;
}

.resume-speaking-body ul {
  margin: 0 0 12px;
}

.resume-speaking-note {
  color: var(--muted);
  margin: 0;
  padding: 0;
}

.resume-aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: calc(var(--site-header-height) + var(--portfolio-subnav-height) + 16px);
}

.resume-aside-card {
  padding: 14px 16px;
}

.resume-aside-watermark {
  width: 100%;
  max-height: 340px;
  height: auto;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  margin-bottom: 10px;
  opacity: 0.95;
}

.resume-gallery-item {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.resume-gallery-item img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.resume-gallery-item span {
  display: block;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--muted-light);
}

.resume-gallery-item:hover {
  border-color: var(--primary);
}

@media (max-width: 960px) {
  .resume-hero-grid,
  .profile-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }

  .profile-hero-card {
    padding: 24px 20px 28px;
  }

  .page-portfolio .profile-hero-card .resume-profile-wrap,
  .page-about .profile-hero-card .resume-profile-wrap {
    margin-top: -56px;
  }

  .page-hero.resume-hero {
    margin-top: -48px;
    background: linear-gradient(
      180deg,
      transparent 0,
      transparent 48px,
      var(--bg) 48px,
      var(--bg) 100%
    );
  }

  .page-hero.portfolio-hero,
  .page-hero.about-hero {
    margin-top: -40px;
  }

  .resume-profile-wrap {
    margin: 0 auto;
  }

  .resume-hero-banner,
  .resume-hero-banner--compact {
    height: 160px;
  }

  .resume-hero-banner-diagram {
    display: none;
  }

  .resume-hero-banner-overlay {
    background: linear-gradient(180deg, rgba(10, 15, 31, 0.2), rgba(10, 15, 31, 0.92));
  }

  .resume-layout {
    grid-template-columns: 1fr;
  }

  .resume-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .resume-aside-gallery {
    flex: 1 1 100%;
  }

  .resume-timeline-item,
  .resume-leadership-card {
    grid-template-columns: 1fr;
  }

  .resume-timeline-thumb {
    max-width: 280px;
  }
}

/* ——— Executive Portfolio page ——— */
.page-portfolio .portfolio-profile-wrap {
  max-width: min(200px, 14vw);
}

.portfolio-hero-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.portfolio-contact-list {
  font-size: 0.9rem;
  margin: 12px 0 16px;
}

.portfolio-contact-list li {
  padding: 0.25rem 0;
  color: var(--muted-light);
}

.portfolio-contact-list a {
  color: var(--link);
  text-decoration: none;
}

.portfolio-contact-list a:hover {
  text-decoration: underline;
}

.portfolio-brand-statement {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted-light);
  margin: 0 0 8px;
  max-width: 640px;
}

.portfolio-cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.portfolio-cv-card--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-soft);
}

.portfolio-cv-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.portfolio-case-card .label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 12px 0 4px;
}

.portfolio-case-card h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.portfolio-testimonial {
  margin: 0;
}

.portfolio-testimonial p {
  font-style: italic;
  color: var(--muted-light);
  margin-bottom: 12px;
}

.portfolio-testimonial footer {
  font-size: 0.85rem;
  color: var(--muted);
}

.portfolio-cta .card {
  text-align: center;
  padding: 40px 28px;
}

.portfolio-cta .section-lead {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.portfolio-cta .card > p:last-of-type {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.portfolio-cta .btn-outline {
  margin-left: 0;
}

@media (max-width: 768px) {
  .page-portfolio .portfolio-profile-wrap {
    max-width: 180px;
  }

  .portfolio-cta .btn-outline {
    margin-left: 0;
    margin-top: 0;
  }

  .portfolio-subnav-inner,
  .resume-subnav-inner {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .portfolio-subnav-inner a,
  .resume-subnav-inner a {
    flex-shrink: 0;
  }
}

/* ——— About page ——— */
.section-lead {
  color: var(--muted);
  margin: -8px 0 24px;
  max-width: 720px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portfolio-subnav,
.resume-subnav {
  position: sticky;
  top: var(--site-header-height);
  z-index: 900;
  background: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .portfolio-subnav,
[data-theme="dark"] .resume-subnav {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

.portfolio-subnav-inner,
.resume-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 20px;
  padding: 12px 0 3px 0;
}

.portfolio-subnav-inner a,
.resume-subnav-inner a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-display);
  padding: 2px 0 8px;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.2s, border-color 0.2s;
}

.portfolio-subnav-inner a:hover,
.resume-subnav-inner a:hover {
  color: var(--text);
}

.portfolio-subnav-inner a.is-active,
.resume-subnav-inner a.is-active {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.portfolio-section,
.page-resume .resume-anchor {
  scroll-margin-top: calc(var(--site-header-height) + var(--portfolio-subnav-height));
}

.theme-toggle {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-display);
  line-height: 1;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

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

.nav-print-pdf {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.2s;
}

header nav .nav-print-pdf,
header nav .nav-print-pdf:hover {
  color: #fff;
}

.nav-print-pdf:hover {
  background: var(--primary-hover);
  color: #fff;
}

header nav .nav-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

[data-theme="light"] .article-body a,
[data-theme="light"] .blog-card a,
[data-theme="light"] .page-blog-article .article-prose a:not(.btn),
[data-theme="light"] .page-blog-article .article-related-section a:not(.btn),
[data-theme="light"] .page-blog-article .article-aside a:not(.btn) {
  color: var(--link);
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 4px 10px;
    font-size: 0.85rem;
  }

  header nav .nav-actions {
    gap: 8px;
  }

  .nav-print-pdf,
  .theme-toggle {
    padding: 8px 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 12px;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .nav-links.open {
    display: flex;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;
  }

  header nav .brand {
    margin-right: auto;
  }

  header nav .nav-actions {
    order: 3;
    margin-left: auto;
    grid-column: auto;
    justify-self: auto;
  }

  .nav-toggle {
    order: 2;
    margin-left: auto;
  }

  .btn-outline {
    margin-left: 0;
    margin-top: 12px;
  }
}

@media print {
  header,
  footer,
  .nav-toggle,
  .theme-toggle,
  .nav-print-pdf,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: #1c1917;
    font-family: "Source Serif 4", Georgia, serif;
  }

  .card {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
