/* Onest and JetBrains Mono (SIL Open Font License 1.1): Cyrillic with the Kazakh letters, and Latin; self-hosted */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/jetbrains-mono-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/jetbrains-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/onest-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* An engineer's dossier: a pinned identity card with contacts on the left, the record on the right in compact
   blocks (skills by group, experience as a timeline, education). Sky blue and gold
   from Kazakhstan's flag, used sparingly. No scripts: the language switch is links. */
:root {
  --paper: #f6f8fb;
  --card: #ffffff;
  --ink: #0f1b2d;
  --muted: #586a80;
  --line: #dde5ee;
  --sky: #0a7ea6;
  --sky-soft: #e5f4f9;
  --gold: #f2b705;
  --gold-soft: #fdf3d3;
  --shadow: 0 1px 2px rgb(15 27 45 / .05), 0 10px 30px -14px rgb(15 27 45 / .18);
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1320; --card: #111c2e; --ink: #e9eff7; --muted: #94a5ba; --line: #1f2d43;
    --sky: #4fc6e8; --sky-soft: #10293a; --gold: #f5c33b; --gold-soft: #2b2410;
    --shadow: 0 1px 2px rgb(0 0 0 / .45), 0 16px 36px -16px rgb(0 0 0 / .75); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, ul { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }
.sprite { display: none; }
.ic { width: 18px; height: 18px; fill: currentColor; flex: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.mono-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--paper); font: 600 13px/1 var(--mono); letter-spacing: .02em; }
.mono-mark.big { width: 64px; height: 64px; font-size: 22px; border-radius: 18px; }
.langs { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.langs a { padding: 6px 12px; border-radius: 999px; font: 600 13px/1 var(--mono); text-decoration: none; color: var(--muted); }
.langs a:hover { color: var(--ink); }
.langs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.langs.small a { padding: 5px 10px; font-size: 12px; }

/* layout: pinned identity card + content */
.layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; padding-block: 32px 56px; }
.id-card { position: sticky; top: 84px; padding: 26px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.avatar { width: 96px; height: 96px; border-radius: 26px; margin-bottom: 14px; position: relative; background: linear-gradient(135deg, var(--sky-soft), var(--gold-soft)); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 4px solid var(--card); }
.who { display: grid; gap: 2px; min-width: 0; }
.id-card h1 { font: 800 26px/1.15 var(--sans); letter-spacing: -.025em; }
.role { color: var(--sky); font-weight: 700; }
.keywords { font: 500 12.5px/1.5 var(--mono); color: var(--muted); margin-top: 2px; }
.where { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.label { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contacts { list-style: none; padding: 0; display: grid; gap: 4px; margin-top: 10px; }
.contacts a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-inline: -12px; border-radius: 12px; text-decoration: none; }
.contacts a:hover { background: var(--sky-soft); }
.contacts .ic { color: var(--sky); }
.c-text { display: grid; min-width: 0; }
.c-label { font-size: 12px; color: var(--muted); line-height: 1.3; }
.c-value { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; line-height: 1.35; }

/* content */
.content { display: grid; gap: 44px; min-width: 0; }
.sec { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* experience timeline */
.jobs { display: grid; }
.job { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 24px; padding-block: 16px; border-top: 1px solid var(--line); }
.job:first-child { border-top: none; padding-top: 4px; }
.job-when { padding-top: 3px; }
.period { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.is-current .job-when .period { color: var(--sky); font-weight: 600; }
.job-body { display: grid; gap: 6px; min-width: 0; }
.job-head h3 { font: 700 18px/1.3 var(--sans); letter-spacing: -.01em; }
.note { font-weight: 500; color: var(--muted); font-size: 15px; letter-spacing: 0; }
.job-role { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.points { padding-left: 18px; display: grid; gap: 3px; color: var(--ink); font-size: 15px; }
.points li::marker { color: var(--gold); }

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 500 13px/1 var(--mono); padding: 7px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); }
.stackline { font: 500 12.5px/1.5 var(--mono); color: var(--muted); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skill-group { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.skill-group h3 { font: 700 15px/1.3 var(--sans); }

/* education */
.schools { list-style: none; padding: 0; display: grid; gap: 10px; }
.schools li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.schools b { font-weight: 700; }
.schools span:not(.period) { grid-column: 1; color: var(--muted); font-size: 14.5px; }
.schools .period { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* footer, mobile actions */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 24px 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.actions { display: none; }

/* 404 */
.notfound { display: grid; gap: 18px; justify-items: start; padding-block: 96px; }
.notfound h1 { font: 800 clamp(30px, 5vw, 46px)/1.1 var(--sans); letter-spacing: -.03em; }
.notfound p { color: var(--muted); font-size: 18px; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.button.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; padding-top: 20px; }
  .id-card { position: static; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: center; }
  .avatar { margin: 0; width: 80px; height: 80px; border-radius: 22px; }
  .id-card .label, .id-card .contacts { grid-column: 1 / -1; }
  .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .brand-name { display: none; }
  .contacts { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .skills { grid-template-columns: 1fr; }
  .schools li { grid-template-columns: 1fr; }
  .schools .period { grid-column: 1; grid-row: auto; }
  .actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .actions a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; border-radius: 14px; font-weight: 700; font-size: 14.5px; text-decoration: none; background: var(--sky-soft); color: var(--ink); }
  .actions a:first-child { background: var(--ink); color: var(--paper); }
  .actions .ic { width: 17px; height: 17px; }
}
