/* ==========================================================================
   rismayilov.dev
   Plain CSS, no build step. Theme tokens first, then layout, then sections.
   ========================================================================== */

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f3f2f6;
  --text: #15141a;
  --muted: #565465;
  --faint: #7c7a8c;
  --border: #e6e4ec;
  --border-strong: #cfcbdc;
  --accent: #512bd4;           /* .NET purple */
  --accent-hover: #4321b8;
  --accent-ink: #ffffff;
  --accent-soft: #efeafd;
  --accent-text: #4a25c4;
  --dot: rgba(81, 43, 212, 0.16);
  --glow: rgba(81, 43, 212, 0.14);
  --code-bg: #17161e;
  --code-border: #17161e;
  --shadow: 0 1px 2px rgba(20, 18, 30, 0.04), 0 8px 24px rgba(20, 18, 30, 0.06);
  --shadow-lg: 0 2px 4px rgba(20, 18, 30, 0.04), 0 24px 60px -12px rgba(40, 20, 110, 0.28);

  --radius: 14px;
  --maxw: 1120px;
  --header-h: 64px;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c0b10;
  --surface: #14131a;
  --surface-2: #1c1b24;
  --text: #edecf3;
  --muted: #a7a5b6;
  --faint: #7d7b8e;
  --border: #25242e;
  --border-strong: #3a3846;
  --accent: #9480f8;
  --accent-hover: #a896ff;
  --accent-ink: #0c0b10;
  --accent-soft: rgba(148, 128, 248, 0.13);
  --accent-text: #b5a8ff;
  --dot: rgba(181, 168, 255, 0.13);
  --glow: rgba(148, 128, 248, 0.16);
  --code-bg: #111017;
  --code-border: #2a2935;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 60px -12px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
abbr[title] { text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.container {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.nowrap { white-space: nowrap; }
.print-contact { display: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand__name {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
}
.brand__tld { color: var(--accent-text); }

.nav__links { display: flex; gap: 0.25rem; }
.nav__links a {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active { color: var(--text); background: var(--surface-2); }

.nav__actions { display: flex; align-items: center; gap: 0.4rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.nav__menu { display: none; }

[data-theme-toggle] .icon-sun { display: none; }
[data-theme="dark"] [data-theme-toggle] .icon-sun { display: block; }
[data-theme="dark"] [data-theme-toggle] .icon-moon { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 46px;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--border-strong); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 75% at 78% 40%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 75% at 78% 40%, #000 15%, transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -260px;
  right: -180px;
  width: 720px;
  height: 720px;
  background: radial-gradient(closest-side, var(--glow), transparent);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}

.hero__title {
  font-size: clamp(2.75rem, 6.6vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.hero__lede {
  max-width: 35rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  line-height: 1.6;
}
.hero__lede strong { color: var(--text); font-weight: 600; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.stats {
  display: flex;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  margin: 2.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.stats > div { display: flex; flex-direction: column-reverse; gap: 0.3rem; }
.stats dd {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}
.stats dt { color: var(--muted); font-size: 0.86rem; }

/* Hero entrance */
.hero__copy > *,
.code-card { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.05s; }
.hero__copy > :nth-child(3) { animation-delay: 0.1s; }
.hero__copy > :nth-child(4) { animation-delay: 0.15s; }
.hero__copy > :nth-child(5) { animation-delay: 0.2s; }
.code-card { animation-delay: 0.18s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Code card ---------- */

.code-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--code-border);
  border-radius: 16px;
  background: var(--code-bg);
  box-shadow: var(--shadow-lg);
}
.code-card__bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}
.code-card__dots { display: flex; gap: 6px; }
.code-card__dots i { width: 11px; height: 11px; border-radius: 50%; background: #3b3a47; }
.code-card__dots i:nth-child(1) { background: #ff5f57; }
.code-card__dots i:nth-child(2) { background: #febc2e; }
.code-card__dots i:nth-child(3) { background: #28c840; }
.code-card__file { color: #9c9aae; font-family: var(--font-mono); font-size: 0.78rem; }

.code {
  margin: 0;
  padding: 1.25rem 1.4rem 1.45rem;
  overflow-x: auto;
  color: #d4d4d4;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  tab-size: 4;
}
.code .k { color: #569cd6; }
.code .t { color: #4ec9b0; }
.code .s { color: #ce9178; }
.code .p { color: #9cdcfe; }
.code .c { color: #6a9955; font-style: italic; }

/* ---------- Sections ---------- */

.section {
  padding: clamp(4rem, 9vw, 7rem) 0;
  border-top: 1px solid var(--border);
}

.section__head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section__eyebrow {
  margin-bottom: 0.8rem;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.section__intro {
  margin-top: 1rem;
  text-wrap: pretty;
  color: var(--muted);
  font-size: 1.08rem;
}

.subhead {
  margin: clamp(3rem, 6vw, 4.25rem) 0 1.25rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Scroll reveal (only when JS is running; see main.js) */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.75rem, 4.5vw, 3.75rem);
}

.about__photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.about__text {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}
.about__text p + p { margin-top: 1.1rem; }
.about__text strong { color: var(--text); font-weight: 600; }

.competencies {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.competency {
  padding: 1.3rem 1.3rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.competency:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.competency__index {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}
.competency h4 { margin-bottom: 0.45rem; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.competency p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---------- Experience timeline ---------- */

.job {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 2.25rem;
}

.job__meta { padding-top: 0.15rem; }
.job__dates {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
}
.job__duration { margin-top: 0.2rem; color: var(--faint); font-size: 0.86rem; }

.job__body {
  position: relative;
  padding: 0 0 3.25rem 2.1rem;
  border-left: 1px solid var(--border);
}
.job:last-child .job__body { padding-bottom: 0.25rem; }
.job__body::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: -6px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
}
.job[data-current] .job__body::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.job__title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; }
.job__mode {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 0.2em;
}

.job__company {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
  margin-top: 0.3rem;
  color: var(--muted);
  font-weight: 500;
}
.job__company strong { color: var(--accent-text); font-weight: 700; }
.job__domain {
  margin-left: 0.35rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.74rem;
  font-weight: 600;
}

.job__project { margin-top: 0.85rem; font-size: 0.95rem; font-weight: 600; }
.job__project span {
  margin-right: 0.45rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.job__points { display: grid; gap: 0.55rem; margin-top: 1rem; }
.job__points li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.job__points li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.75;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.15rem; }
.tags li {
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

/* ---------- Skills ---------- */

.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 1rem;
}
.skill-card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.skill-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.skill-card--wide { grid-column: span 2; }
.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.05rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.skill-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.skill-card__icon svg { width: 17px; height: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips li {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ---------- Education & languages ---------- */

.edu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1rem;
}
.card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.card__label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card__label svg { width: 17px; height: 17px; color: var(--accent-text); }

.edu__degree { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.edu__school { margin-top: 0.35rem; color: var(--accent-text); font-weight: 600; }
.edu__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.edu__facts li {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.86rem;
}

.table-wrap { overflow-x: auto; }
.lang-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.lang-table th,
.lang-table td {
  padding: 0.7rem 0.35rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.lang-table tbody tr:last-child th,
.lang-table tbody tr:last-child td { border-bottom: 0; }
.lang-table th:first-child { padding-left: 0; text-align: left; }
.lang-table thead th {
  padding-top: 0;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lang-table tbody th { font-weight: 700; white-space: nowrap; }

.level {
  display: inline-block;
  min-width: 2.4rem;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}
.level--native { min-width: 0; padding-inline: 0.8rem; background: var(--accent); color: var(--accent-ink); font-family: var(--font-sans); font-weight: 600; }
.level--c { background: var(--accent); color: var(--accent-ink); }
.level--b { background: var(--accent-soft); color: var(--accent-text); }
.level--a { background: var(--surface-2); color: var(--muted); }
.lang-note { margin-top: 1rem; color: var(--faint); font-size: 0.82rem; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 4.25rem) clamp(1.25rem, 5vw, 4rem);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
}
.contact::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(600px 260px at 50% -10%, var(--glow), transparent 70%),
    radial-gradient(var(--dot) 1px, transparent 1.2px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(#000, transparent 75%);
  mask-image: linear-gradient(#000, transparent 75%);
}
.contact h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.contact__lede {
  max-width: 34rem;
  text-wrap: balance;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.contact__links {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem;
  max-width: 940px;
  margin: 2.4rem auto 0;
  text-align: left;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-link:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-link > span:last-child { min-width: 0; }
.contact-link__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.contact-link__icon svg { width: 18px; height: 18px; }
.contact-link__label {
  display: block;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.contact-link__value {
  display: block;
  font-size: 0.93rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.contact__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
  color: var(--faint);
  font-size: 0.9rem;
}
.contact__meta svg { width: 16px; height: 16px; }

/* ---------- Footer ---------- */

.site-footer { padding: 2rem 0 2.5rem; color: var(--faint); font-size: 0.88rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: 4rem 0;
  text-align: center;
}
.not-found__code {
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.not-found h1 { margin: 0.75rem 0 1rem; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.035em; }
.not-found p { color: var(--muted); }
.not-found .btn { margin-top: 2rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .competencies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-card--wide { grid-column: auto; }
  .skill-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .code-card { max-width: 560px; }
  .edu-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .nav__menu { display: inline-grid; }
  .nav__links {
    position: absolute;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    box-shadow: var(--shadow);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.8rem 0.6rem; font-size: 1rem; }
}

@media (max-width: 720px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about__photo { width: 150px; }

  .job {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
    position: relative;
    padding: 0 0 2.75rem 1.6rem;
    border-left: 1px solid var(--border);
  }
  .job:last-child { padding-bottom: 0.25rem; }
  .job__body { padding: 0; border-left: 0; }
  .job:last-child .job__body { padding-bottom: 0; }
  .job__body::before { display: none; }
  .job::before {
    content: "";
    position: absolute;
    top: 0.3rem;
    left: -6px;
    width: 11px;
    height: 11px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--bg);
  }
  .job[data-current]::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
  }
  .job__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6rem; }
  .job__duration { margin-top: 0; }
  .job__duration::before { content: "· "; }
  .job__title { margin-top: 0.35rem; }

  .contact__links { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .container { width: min(100% - 2rem, var(--maxw)); }
  .competencies { grid-template-columns: minmax(0, 1fr); }
  .skills { grid-template-columns: minmax(0, 1fr); }
  .hero__cta .btn { flex: 1 1 auto; }
  .stats { justify-content: space-between; gap: 1rem; }
  .code { font-size: 0.7rem; padding: 1rem 0.875rem; tab-size: 2; }
  .card { padding: 1.35rem; }
  .lang-table { font-size: 0.85rem; }
  .lang-table th, .lang-table td { padding-inline: 0.15rem; }
  .lang-table thead th { font-size: 0.6rem; letter-spacing: 0; }
  .level { min-width: 2rem; padding-inline: 0.25rem; font-size: 0.75rem; }
  .contact { padding-inline: 1rem; }
  .contact-link { gap: 0.75rem; padding: 0.9rem; }
  .contact-link__icon { width: 36px; height: 36px; }
  .contact-link__value { font-size: 0.88rem; }
}

@media (max-width: 380px) {
  .code { font-size: 0.62rem; }
  .stats dt { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print: "Save CV as PDF" produces a clean resume ---------- */

@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }

  html[data-theme] {
    --bg: #fff; --surface: #fff; --surface-2: #f4f3f7;
    --text: #111; --muted: #333; --faint: #666;
    --border: #ddd; --border-strong: #bbb;
    --accent: #512bd4; --accent-ink: #fff; --accent-soft: #efeafd; --accent-text: #3d1fa8;
    color-scheme: light;
  }
  html { scroll-behavior: auto; }
  body { font-size: 10pt; line-height: 1.45; background: #fff; }

  .site-header, .skip-link, .hero__cta, .code-card, .site-footer__top, #contact, .tags,
  .hero::before, .hero::after, .contact::before,
  .competency__index, .skill-card__icon, .card__label svg { display: none !important; }

  .js .reveal, .hero__copy > *, .code-card { opacity: 1 !important; transform: none !important; animation: none !important; }

  .container { width: 100%; }
  .hero { padding: 0 0 10pt; }
  .hero__grid { display: block; }
  .eyebrow { margin-bottom: 6pt; padding: 0; background: none; }
  .hero__title { font-size: 26pt; }
  .hero__lede { max-width: none; margin-top: 6pt; font-size: 11pt; }
  .stats { margin-top: 10pt; padding-top: 8pt; }
  .stats dd { font-size: 16pt; }
  .print-contact { display: block; margin-top: 10pt; font-size: 9.5pt; font-weight: 600; }

  .section { padding: 14pt 0 4pt; }
  .section__head, .subhead { margin-bottom: 10pt; max-width: none; break-inside: avoid; break-after: avoid; page-break-after: avoid; }
  .section h2 { font-size: 15pt; }
  .section__intro { display: none; }
  .subhead { margin: 12pt 0 6pt; }

  .about { grid-template-columns: 80pt 1fr; gap: 14pt; }
  .about__text { max-width: none; font-size: 10pt; }
  .about__text p + p { margin-top: 5pt; }
  .about__photo img { box-shadow: none; }

  .competencies { grid-template-columns: repeat(2, 1fr); gap: 6pt; }
  .competency { padding: 6pt 8pt; }
  .competency p { font-size: 9pt; }

  .job { grid-template-columns: 118pt 1fr; gap: 10pt; break-inside: avoid; }
  .job__dates { font-size: 8.5pt; }
  .job__duration { font-size: 8.5pt; }
  .job__body { padding: 0 0 12pt 12pt; }
  .job__title { font-size: 11.5pt; }
  .job__points { gap: 2pt; margin-top: 5pt; }
  .job__points li { font-size: 9.5pt; }
  .tags { margin-top: 5pt; }

  .skills { grid-template-columns: repeat(2, 1fr); gap: 6pt; }
  .skill-card, .skill-card--wide, .skill-card:last-child { grid-column: auto; padding: 8pt 10pt; break-inside: avoid; }
  .skill-card h3 { margin-bottom: 5pt; }
  .chips li { padding: 1pt 5pt; font-size: 8.5pt; }

  .edu-grid { grid-template-columns: 1fr 1.2fr; gap: 6pt; }
  .card { padding: 10pt; break-inside: avoid; }

  #contact { break-inside: avoid; }
  .contact { padding: 10pt; text-align: left; border-radius: 8pt; }
  .contact h2 { font-size: 15pt; }
  .contact__lede { margin: 4pt 0 0; }
  .contact__links { grid-template-columns: 1.4fr 1fr 1fr; max-width: none; margin: 8pt 0 0; }
  .contact-link { padding: 6pt 8pt; }
  .contact-link__icon { display: none; }

  .competency, .skill-card, .card, .contact-link, .contact, .tags li, .chips li, .edu__facts li {
    box-shadow: none !important;
  }
  a { text-decoration: none; }
}
