:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --surface-muted: #f6f8fb;
  --text: #111827;
  --muted: #5f6b7a;
  --line: #e5e7eb;
  --accent: #1f5eff;
  --accent-strong: #1748c7;
  --accent-soft: #edf3ff;
  --gold: #2563eb;
  --success: #16a34a;
  --shadow: 0 16px 38px rgba(17, 24, 39, 0.07);
  --shadow-soft: 0 1px 2px rgba(17, 24, 39, 0.05);
  --radius: 8px;
  --max: 1160px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --surface: #151922;
  --surface-strong: #10141b;
  --surface-muted: #111722;
  --text: #f4f7fb;
  --muted: #a3adbb;
  --line: #28313d;
  --accent: #6ea8ff;
  --accent-strong: #a9c9ff;
  --accent-soft: #18243a;
  --gold: #8ab4ff;
  --success: #4ade80;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 180ms ease, color 180ms ease;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
}

.expert-page {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --surface-muted: #f6f8fb;
  --text: #111827;
  --muted: #5f6b7a;
  --line: #e5e7eb;
  --accent: #1f5eff;
  --accent-strong: #1748c7;
  --accent-soft: #edf3ff;
  --gold: #2563eb;
  background: #f4f5fb;
}

.expert-page .site-header {
  position: fixed;
  left: 0;
  right: 0;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  transition: background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.expert-page.nav-scrolled .site-header {
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.expert-nav {
  width: 100%;
  min-height: 80px;
  padding: 18px 28px;
  justify-content: center;
  align-items: center;
  color: #ffffff;
}

.expert-center-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  backdrop-filter: none;
}

.expert-center-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 13px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
  transition: background 160ms ease, color 160ms ease, text-shadow 160ms ease;
}

.expert-center-links a:hover,
.expert-center-links a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.expert-page.nav-scrolled .expert-center-links a {
  color: var(--text);
  text-shadow: none;
}

.expert-page.nav-scrolled .expert-center-links {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130' viewBox='0 0 130 130'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='130' height='130' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"),
    linear-gradient(135deg, rgba(238, 223, 184, 0.38), rgba(114, 151, 142, 0.24), rgba(244, 245, 251, 0.34));
  background-size: 130px 130px, 100% 100%;
  background-blend-mode: soft-light, normal;
  backdrop-filter: blur(12px) saturate(1.08);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.expert-page.nav-scrolled .expert-center-links a:hover,
.expert-page.nav-scrolled .expert-center-links a.active {
  background: rgba(17, 24, 39, 0.07);
  color: var(--text);
}

.expert-mobile-links {
  display: none;
}

.expert-apply,
.expert-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 8px;
  background: #ffffff;
  color: #101015;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.expert-cta {
  padding-left: 20px;
  font-size: 16px;
}

.expert-arrow {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-left: 14px;
  border-radius: 5px;
  background: #0d0d13;
}

.expert-arrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid #b6a7ff;
  border-right: 2px solid #b6a7ff;
  transform: rotate(45deg);
}

.expert-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #f4f5fb;
}

.expert-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../assets/expert-hero.webp") center / cover no-repeat;
  filter: saturate(0.86) contrast(0.92) brightness(0.98);
  transform: scale(1.01);
}

.expert-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130' viewBox='0 0 130 130'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='130' height='130' filter='url(%23n)' opacity='.72'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 58%, rgba(244, 245, 251, 0.84) 86%, #f4f5fb 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.09) 42%, rgba(0, 0, 0, 0) 78%),
    linear-gradient(rgba(238, 223, 184, 0.2), rgba(69, 94, 80, 0.16));
  background-size: 130px 130px, 100% 100%, 100% 100%, 100% 100%;
  background-blend-mode: soft-light, normal, normal, color;
  pointer-events: none;
}

.expert-hero-copy {
  position: relative;
  z-index: 1;
  width: min(100% - 64px, 720px);
  margin-left: 5vw;
  padding-top: 84px;
  color: #ffffff;
}

.expert-hero-copy h1 {
  max-width: 650px;
  margin-bottom: 30px;
  color: #ffffff;
  font-size: 50px;
  line-height: 1.23;
  font-weight: 850;
}

.expert-kicker {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.22);
}

.expert-summary {
  max-width: 590px;
  margin: -10px 0 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 650;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.24);
}

.expert-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.expert-secondary {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  padding: 0 20px;
  color: #ffffff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.18);
}

.themed-page .page {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.themed-page .page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 430px;
  z-index: -2;
  background: url("../assets/expert-hero.webp") center 38% / cover no-repeat;
  filter: saturate(0.86) contrast(0.92) brightness(0.92);
}

.themed-page .page::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 430px;
  z-index: -1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130' viewBox='0 0 130 130'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='130' height='130' filter='url(%23n)' opacity='.72'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(244, 245, 251, 0) 54%, #f4f5fb 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.08) 55%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(rgba(238, 223, 184, 0.2), rgba(69, 94, 80, 0.16));
  background-size: 130px 130px, 100% 100%, 100% 100%, 100% 100%;
  background-blend-mode: soft-light, normal, normal, color;
  pointer-events: none;
}

.themed-page .page-hero {
  max-width: 1100px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 118px;
  color: #ffffff;
}

.themed-page .page-hero h1 {
  max-width: none;
  font-size: clamp(2.45rem, 3.65vw, 3.85rem);
}

.themed-page .page-hero h1.single-line-title {
  white-space: nowrap;
}

.themed-page .page-hero .eyebrow,
.themed-page .page-hero h1,
.themed-page .page-hero p {
  color: #ffffff;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.26);
}

.themed-page .page-hero p {
  font-weight: 650;
}

.themed-page .page-hero .btn.primary {
  width: max-content;
  margin-top: 12px;
  background: #ffffff;
  color: #101015;
  border-color: #ffffff;
}

.nav {
  width: min(100% - 32px, var(--max));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 760;
  letter-spacing: 0;
  margin-right: auto;
}

.brand-mark,
.profile-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 640;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface-strong);
  color: var(--text);
}

.expert-page .expert-mobile-links {
  display: none;
}

.expert-page .expert-mobile-links a {
  color: #ffffff;
}

.theme-toggle,
.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: none;
}

.theme-toggle {
  width: 42px;
  height: 42px;
}

.theme-icon {
  display: inline-block;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.section,
.section-narrow {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

.section-narrow {
  padding: 86px 0 64px;
}

.hero {
  min-height: calc(92vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.56fr);
  align-items: center;
  gap: 72px;
}

.page-hero {
  max-width: 850px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 4.4vw, 4rem);
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  font-size: 1.1rem;
}

.headline {
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  line-height: 1.45;
  font-weight: 620;
}

.intro,
.page-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1rem;
}

.flag {
  display: inline-block;
  margin: 0 2px;
  font-size: 0.95em;
  line-height: 1;
  vertical-align: -0.05em;
}

.button-row,
.card-actions,
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn,
.card-actions a,
.article-card a,
.social-row a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 680;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.btn {
  padding: 12px 17px;
  border: 1px solid var(--line);
}

.btn:hover,
.card-actions a:hover,
.article-card a:hover,
.social-row a:hover,
.profile-card:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
  box-shadow: none;
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

.hero-panel,
.feature-card,
.profile-card,
.project-card,
.content-panel,
.article-card,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.hero-panel {
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.profile-art {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.profile-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 13%, transparent);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.metric-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-muted);
}

.metric-grid strong,
.metric-grid span {
  display: block;
}

.metric-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

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

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.project-card,
.content-panel,
.article-card,
.contact-form {
  padding: 24px;
}

.feature-card:hover,
.project-card:hover,
.content-panel:hover,
.article-card:hover {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
  box-shadow: var(--shadow-soft);
}

.feature-card p,
.project-card p,
.content-panel p,
.article-card p,
.contact-form p {
  color: var(--muted);
}

.profile-card {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.profile-card:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow: none;
}

.profile-card strong,
.profile-card small {
  display: block;
}

.profile-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-card {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    var(--surface);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #1f5eff, #16a34a);
  opacity: 0;
  transition: opacity 160ms ease;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card h2 {
  margin-bottom: 16px;
  line-height: 1.12;
}

.project-card-featured {
  grid-column: 1 / -1;
  min-height: 360px;
}

.project-card-featured .project-highlights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.project-highlights li {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(246, 248, 251, 0.86);
}

.project-highlights strong,
.project-highlights span {
  display: block;
}

.project-highlights strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.2;
}

.project-highlights span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.stack-list,
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 20px 0;
  list-style: none;
}

.stack-list li,
.skill-cloud span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: color-mix(in srgb, var(--text) 74%, var(--muted));
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 640;
}

.card-actions a,
.article-card a,
.social-row a {
  border: 1px solid var(--line);
  padding: 10px 13px;
  background: var(--surface);
  color: var(--text);
}

.project-card .card-actions a {
  min-width: 88px;
  background: #ffffff;
  font-weight: 800;
}

.project-card .card-actions a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 12px;
  align-items: start;
}

.about-intro {
  grid-column: 1 / -1;
}

.about-intro h2,
.skill-panel h2,
.timeline-panel h2 {
  max-width: 780px;
  margin-bottom: 16px;
}

.about-intro > p:not(.card-kicker) {
  max-width: 850px;
  font-size: 1.03rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.about-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    var(--surface-muted);
}

.about-stats strong,
.about-stats span {
  display: block;
}

.about-stats strong {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.2;
}

.about-stats span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.skill-panel {
  grid-column: 1 / -1;
}

.education-panel {
  grid-column: 1;
  grid-row: 3;
}

.language-panel {
  grid-column: 1;
  grid-row: 4;
}

.experience-panel {
  grid-column: 2;
  grid-row: 3 / span 2;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.skill-groups > div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(248, 250, 252, 0.76);
}

.skill-groups h3 {
  margin-bottom: 12px;
}

.skill-groups .skill-cloud {
  margin: 0;
}

.language-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.language-list div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(248, 250, 252, 0.76);
}

.language-list strong,
.language-list span {
  display: block;
}

.language-list strong {
  color: var(--text);
  font-size: 1rem;
}

.language-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 16px 20px;
  background: rgba(248, 250, 252, 0.72);
}

.timeline div::before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--success));
}

.timeline span {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: space-between;
}

.article-meta {
  font-size: 0.9rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.contact-details {
  display: grid;
  gap: 18px;
}

.text-link {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-note {
  min-height: 24px;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.site-footer {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

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

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

  .expert-page .site-header {
    background: color-mix(in srgb, #0f141a 44%, transparent);
    backdrop-filter: blur(10px);
  }

  .expert-nav {
    min-height: 70px;
    padding: 14px 18px;
    align-items: center;
  }

  .expert-center-links {
    display: none;
  }

  .expert-menu-toggle {
    display: block;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
  }

  .expert-menu-toggle span {
    background: #ffffff;
  }

  .nav-links {
    position: fixed;
    inset: 76px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .expert-page .nav-links {
    inset: 82px 18px auto 18px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(14, 18, 24, 0.9);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  }

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

  .expert-page.menu-open .expert-mobile-links {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
  }

  .expert-page .nav-links a {
    color: #ffffff;
    background: transparent;
  }

  .expert-hero {
    align-items: flex-end;
    min-height: 760px;
    background-position: 58% center;
  }

  .expert-hero-copy {
    width: min(100% - 36px, 620px);
    margin: 0 auto;
    padding: 0 0 22vh;
  }

  .expert-hero-copy h1 {
    font-size: 42px;
  }

  .expert-summary {
    max-width: 540px;
    font-size: 17px;
  }

  .themed-page .page::before,
  .themed-page .page::after {
    height: 390px;
  }

  .themed-page .page-hero {
    min-height: 330px;
    padding-top: 104px;
  }

  .themed-page .page-hero h1 {
    white-space: normal;
  }

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

  .education-panel,
  .language-panel,
  .experience-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .about-stats,
  .skill-groups,
  .language-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    max-width: 520px;
  }

  .feature-grid,
  .project-grid,
  .article-grid,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card,
  .project-card-featured {
    grid-column: auto;
    min-height: auto;
  }

  .project-highlights,
  .project-card-featured .project-highlights {
    grid-template-columns: 1fr;
  }

  .project-highlights li {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .nav {
    width: min(100% - 24px, var(--max));
  }

  .expert-nav {
    width: 100%;
  }

  .brand span:last-child {
    display: none;
  }

  .expert-hero {
    min-height: 720px;
    background-position: 62% center;
  }

  .expert-hero-copy {
    width: min(100% - 28px, 430px);
    padding-bottom: 18vh;
  }

  .expert-hero-copy h1 {
    max-width: 390px;
    margin-bottom: 24px;
    font-size: 36px;
    line-height: 1.18;
  }

  .expert-kicker {
    font-size: 12px;
  }

  .expert-summary {
    margin: -8px 0 22px;
    font-size: 15px;
    line-height: 1.5;
  }

  .expert-hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 260px;
  }

  .expert-cta {
    min-height: 52px;
    padding-left: 17px;
    font-size: 15px;
  }

  .expert-secondary {
    min-height: 50px;
    width: 100%;
  }

  .expert-cta .expert-arrow {
    width: 44px;
    height: 44px;
    margin-left: 12px;
  }

  .themed-page .page::before,
  .themed-page .page::after {
    height: 360px;
  }

  .themed-page .page-hero {
    min-height: 310px;
    padding-top: 96px;
  }

  .themed-page .page-hero h1 {
    font-size: clamp(2.35rem, 13vw, 3.4rem);
  }

  .themed-page .page-hero .btn.primary {
    width: 100%;
  }

  .section,
  .section-narrow {
    width: min(100% - 24px, var(--max));
  }

  .section-narrow {
    padding: 64px 0 44px;
  }

  .section {
    padding: 44px 0;
  }

  h1,
  .page-hero h1 {
    font-size: clamp(2.45rem, 15vw, 4rem);
  }

  .button-row,
  .card-actions,
  .social-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .card-actions a,
  .article-card a,
  .social-row a {
    width: 100%;
  }

  .feature-grid,
  .project-grid,
  .article-grid,
  .profile-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: min(100% - 24px, var(--max));
    flex-direction: column;
  }
}
