/* ==========================================================================
   Токены
   ========================================================================== */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --text: #1b2430;
  --text-2: #445264;
  --muted: #687586;
  --border: #dde3ea;
  --border-strong: #c9d2dc;
  --accent: #3d5a7c;
  --accent-hover: #2c4562;
  --accent-soft: #e5ebf3;
  --accent-contrast: #ffffff;
  --warm: #b4654a;
  --warm-soft: #f6e9e3;
  --focus: #5a80ab;
  --shadow: 0 1px 2px rgb(20 30 45 / .05), 0 8px 24px -12px rgb(20 30 45 / .14);
  --shadow-hover: 0 2px 4px rgb(20 30 45 / .06), 0 14px 32px -14px rgb(20 30 45 / .22);
  --header-bg: rgb(243 245 248 / .82);

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121820;
    --surface: #18202a;
    --surface-2: #1f2833;
    --text: #e6ebf1;
    --text-2: #b6c1ce;
    --muted: #8a97a6;
    --border: #283340;
    --border-strong: #354352;
    --accent: #9fbadb;
    --accent-hover: #c0d3ea;
    --accent-soft: #223042;
    --accent-contrast: #101722;
    --warm: #e0a084;
    --warm-soft: #33261f;
    --focus: #8fb0d8;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / .35), 0 14px 32px -14px rgb(0 0 0 / .6);
    --header-bg: rgb(18 24 32 / .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121820;
  --surface: #18202a;
  --surface-2: #1f2833;
  --text: #e6ebf1;
  --text-2: #b6c1ce;
  --muted: #8a97a6;
  --border: #283340;
  --border-strong: #354352;
  --accent: #9fbadb;
  --accent-hover: #c0d3ea;
  --accent-soft: #223042;
  --accent-contrast: #101722;
  --warm: #e0a084;
  --warm-soft: #33261f;
  --focus: #8fb0d8;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / .35), 0 14px 32px -14px rgb(0 0 0 / .6);
  --header-bg: rgb(18 24 32 / .8);
  color-scheme: dark;
}

/* ==========================================================================
   База
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
strong { font-weight: 650; }
small { font-size: .82em; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
a:active { opacity: .8; }

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

::selection { background: var(--accent-soft); color: var(--text); }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.2em;
}
.icon-fill { fill: currentColor; stroke: none; }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

abbr[title] { text-decoration: none; cursor: help; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--accent-contrast); }

/* ==========================================================================
   Шапка
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { border-radius: 8px; }
.brand:hover { color: var(--accent); }

.site-nav { margin-left: auto; min-width: 0; }
.site-nav ul { display: flex; gap: 2px; }
.site-nav a {
  display: block;
  padding: .45rem .7rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: .92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--border-strong); background: var(--surface-2); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(32px, 6vw, 72px) clamp(24px, 4vw, 40px); }

.hero-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  background: #3d4957;
  box-shadow: 0 24px 48px -24px rgb(31 42 56 / .55);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: .3rem .75rem .3rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .88rem;
}
.eyebrow .icon { color: var(--warm); }

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.h1-family { display: block; }

.hero-role {
  margin-top: 14px;
  color: var(--accent);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 550;
}

.hero-lead {
  max-width: 60ch;
  margin-top: 14px;
  color: var(--text-2);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: .6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .95rem;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }

.stats {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.stat dd { font-size: 1.15rem; font-weight: 650; line-height: 1.3; }
.stat dd small { color: var(--warm); font-weight: 600; }
.stat dt { color: var(--muted); font-size: .8rem; line-height: 1.35; }

/* ==========================================================================
   Секции
   ========================================================================== */
.section { padding-block: clamp(36px, 6vw, 64px); }
.section + .section { border-top: 1px solid var(--border); }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 14px;
  row-gap: 4px;
  margin-bottom: 28px;
}
.section-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  grid-row: span 2;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.2rem;
}
.section-head h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
.section-note { grid-column: 2; color: var(--text-2); font-size: .95rem; }
.section-head:not(:has(.section-note)) .section-icon { grid-row: auto; }

.card {
  position: relative;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); }

.card h3 { font-size: 1.15rem; }
.card h3 a { color: var(--text); text-decoration-color: transparent; }
.card h3 a:hover { color: var(--accent); text-decoration-color: currentColor; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.card-sub { margin-top: 2px; color: var(--text-2); font-size: .93rem; }
.card-text { color: var(--text-2); }
.period, .job-period {
  flex: none;
  color: var(--muted);
  font-size: .88rem;
  text-align: right;
  white-space: nowrap;
}

.stack { display: grid; gap: 16px; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: .2rem .6rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .8rem;
  line-height: 1.5;
}
.tags-soft li { background: var(--accent-soft); color: var(--accent); font-weight: 550; }
.tags .tag-accent { background: var(--warm-soft); color: var(--warm); }

.badge {
  display: inline-block;
  margin-left: 4px;
  padding: .05rem .45rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  vertical-align: .1em;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: .3rem .7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.chip-link .icon { width: .95em; height: .95em; transition: transform .2s var(--ease); }
.chip-link:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }
.chip-link:hover .icon { transform: translate(1px, -1px); }

.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.plain-list { margin-top: 14px; color: var(--text-2); }
.plain-list li { position: relative; padding-left: 18px; }
.plain-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
}

/* ==========================================================================
   Опыт
   ========================================================================== */
.timeline { position: relative; display: grid; gap: 16px; }

.job { display: grid; grid-template-columns: 48px 1fr; gap: 18px; }
.job-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(160deg, #4a6280, #1f2a38);
  color: #eef2f7;
  font-size: 1.25rem;
}
.job-logo-letter { font-size: 1.35rem; font-weight: 700; }
.job-body { min-width: 0; }

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px 16px;
}
.job-company { margin-top: 2px; color: var(--text-2); }
.job-company a { color: inherit; }
.job-company a:hover { color: var(--accent); }
.job-period { display: flex; flex-direction: column; align-items: flex-end; }
.job-duration { color: var(--text-2); font-weight: 550; }
.job-duration:empty { display: none; }


.job-points { display: grid; gap: 6px; margin-block: 14px; color: var(--text-2); }
.job-points li { position: relative; padding-left: 18px; }
.job-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* ==========================================================================
   Преподавание и образование
   ========================================================================== */
.course { padding-block: 14px; border-top: 1px dashed var(--border); }
.course:first-of-type { border-top: 0; padding-top: 0; }
.course h4 { margin-bottom: 6px; font-size: 1rem; }
.course p { color: var(--text-2); }
.course .chip-link { margin-top: 10px; }
.course .tags { margin-top: 12px; }

.highlight {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warm-soft);
  font-size: .92rem;
}
.course .highlight { color: var(--text); }
.highlight .icon { margin-top: .2em; color: var(--warm); }

.facts { display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.facts dt { color: var(--muted); font-size: .88rem; padding-top: .1em; }

.honor {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm);
  font-weight: 600;
  font-size: .9rem;
}

/* ==========================================================================
   Публикации
   ========================================================================== */
.pubs { display: grid; gap: 16px; }
.pub h3 { margin-top: 12px; font-size: 1.08rem; line-height: 1.4; }
.cite { margin-top: 8px; color: var(--text-2); font-size: .93rem; }

/* ==========================================================================
   Обо мне
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
}
.prose { display: grid; gap: 14px; color: var(--text-2); font-size: 1.02rem; }
.prose p:first-child { color: var(--text); }

.skills h3 { margin-bottom: 14px; }
.skills dl { display: grid; gap: 14px; }
.skills dt { margin-bottom: 6px; color: var(--muted); font-size: .85rem; }

.meter { display: flex; gap: 6px; margin-bottom: 8px; }
.meter span { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); }
.meter span.on { background: var(--accent); }

/* ==========================================================================
   Дополнительно: достижения и проекты
   ========================================================================== */
.subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 16px;
  font-size: 1.15rem;
}
.subhead .icon { color: var(--warm); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid-3 > li, .achievements > li { display: flex; }

.achievement { display: flex; flex-direction: column; width: 100%; }
.achievement-value { color: var(--accent); font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.achievement-value small { margin-left: 2px; color: var(--warm); font-size: .55em; font-weight: 600; letter-spacing: 0; }
.achievement h4 { margin-top: 8px; font-size: 1rem; line-height: 1.35; }
.achievement .card-text { margin: 6px 0 14px; font-size: .92rem; }
.achievement .chip-link { align-self: flex-start; margin-top: auto; }

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.projects > li { display: flex; }
.project {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.project:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); transform: translateY(-1px); }
.project:hover strong { color: var(--accent); }
.project:active { transform: translateY(0); }
.project-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.project-top strong { font-weight: 650; transition: color .2s var(--ease); }
.project-top .badge { margin-left: 0; }
.project-year { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.project-desc { color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.project .tags { margin-top: auto; padding-top: 4px; }

.tags > span {
  padding: .2rem .6rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .8rem;
  line-height: 1.5;
}

.more-link { margin-top: 16px; }

/* ==========================================================================
   Ссылки
   ========================================================================== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.link-card > .icon:first-child {
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.link-card span { display: grid; min-width: 0; }
.link-card strong { font-weight: 600; }
.link-card small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.link-card .link-arrow { margin-left: auto; color: var(--muted); transition: transform .2s var(--ease), color .2s var(--ease); }
.link-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); transform: translateY(-1px); }
.link-card:hover .link-arrow { color: var(--accent); transform: translate(2px, -2px); }
.link-card:active { transform: translateY(0); }

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer { padding-block: 28px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.to-top { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; }
.to-top:hover { color: var(--accent); }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 1060px) {
  html { scroll-padding-top: 116px; }
  .header-inner { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 10px; }
  .theme-toggle { margin-left: auto; }
  .site-nav {
    order: 3;
    width: calc(100% + var(--gutter) * 2);
    margin: 6px calc(var(--gutter) * -1) 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { padding: 2px var(--gutter) 10px; width: max-content; }
}

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 24px; }
  .hero-photo { width: 200px; }
  .hero-photo img { border-radius: 24px; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; width: 100%; }
  .stat:first-child { grid-column: 1 / -1; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }

  .job { grid-template-columns: 1fr; gap: 14px; }
  .job-head, .card-head { flex-direction: column; }
  .job-period { flex-direction: row; flex-wrap: wrap; gap: 0 6px; align-items: baseline; text-align: left; white-space: normal; }
  .job-duration::before { content: "· "; color: var(--muted); font-weight: 400; }
  .period { text-align: left; }

  .facts div { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 420px) {
  .hero-actions .btn-primary { flex: 1 1 100%; }
  .hero-actions .btn-ghost { flex: 1 1 0; min-width: 0; padding-inline: .5rem; }
  .stat { padding: 10px 12px; }
  .stat dd { font-size: 1.05rem; }
  .brand span { font-size: .95rem; }
}

@media (hover: none) {
  .card:hover { box-shadow: var(--shadow); border-color: var(--border); }
  .link-card:hover { transform: none; }
}

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

@media print {
  .site-header, .skip-link, .theme-toggle, .hero-actions, .to-top { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  .section + .section { border-top: 0; }
}
