/* sergey-grekov.name: professional site, terminal style.
   The page reads as one shell session: each section is a command, its content
   the output. System monospace only.

   This file is the chosen look (2026-11-16): theme=amber bg=scanlines hero=plain
   nav=top exp=graph skills=tags. The other variants live in lab.css and are only
   loaded by the theme lab (lab.js); scripts/build.py leaves both out of dist/. */

:root {
  color-scheme: dark;
  /* amber phosphor: one hue, a little bloom */
  --bg: #17120a;
  --fg: #ffc46b;
  --muted: #b0884a;
  --rule: #3a2c15;
  --prompt: #ffe0a0;
  --cmd: #ffad33;
  --ok: #e8a64d;
  --scan: rgba(0, 0, 0, 0.3);
  --glow: 0 0 6px rgba(255, 170, 60, 0.35);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", Consolas,
          "Liberation Mono", "DejaVu Sans Mono", monospace;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font: 1rem/1.7 var(--mono);
  text-shadow: var(--glow);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--cmd); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--prompt); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100% - 2rem, 74ch); margin-inline: auto; }

/* scanlines and a soft vignette over the whole page */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, var(--scan) 2px 3px),
    radial-gradient(ellipse at center, transparent 55%, var(--scan) 100%);
}

/* ---------- nav ---------- */

.top { border-bottom: 1px solid var(--rule); }
.top ul {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem;
  list-style: none; margin: 0; padding: 0.9rem 0;
  font-size: 0.9rem;
}
.top a { color: var(--muted); text-decoration: none; }
.top a:hover { color: var(--fg); }
.top .lang { margin-left: auto; }
.top .session { display: none; }   /* shown only by the tmux variant in lab.css */

/* ---------- prompt lines ---------- */

.ps { color: var(--prompt); }
.ps .host { color: var(--ok); }
.cmdline { color: var(--fg); }

h2 { margin: 0 0 1.25rem; font: 600 1rem/1.5 var(--mono); }
h2 .cmdline { color: var(--cmd); font-weight: 400; }

/* ---------- hero ---------- */

.hero { padding: clamp(3rem, 10vw, 6.5rem) 0 clamp(1rem, 3vw, 2rem); }
.hero .prompt-line { margin: 0 0 1.25rem; color: var(--muted); }

h1 {
  margin: 0;
  font: 700 clamp(2.2rem, 7.5vw, 3.75rem)/1.05 var(--mono);
  letter-spacing: -0.03em;
}
.role { margin: 0.6rem 0 0; font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--prompt); }
.lede { margin: 1.75rem 0 0; max-width: 64ch; }

dl.facts {
  margin: 2rem 0 0; display: grid; gap: 0.15rem 2ch;
  grid-template-columns: max-content 1fr;
  font-size: 0.92rem;
}
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

.cursor-line { margin: 2.25rem 0 0; }
.cursor {
  display: inline-block; width: 0.6em; height: 1.15em; vertical-align: text-bottom;
  background: var(--fg); margin-left: 0.35em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------- sections ---------- */

main section { padding: clamp(2rem, 5vw, 3rem) 0; }
main section p { margin: 0 0 1em; max-width: 68ch; }
main section p:last-child { margin-bottom: 0; }

/* experience: git log --graph, one commit per role */
.entry { position: relative; padding: 0 0 2.25rem 2ch; margin-left: 0.5ch; border-left: 1px solid var(--rule); }
.entry:last-child { padding-bottom: 0.25rem; }
.entry::before {
  content: "*"; position: absolute; left: -0.5ch; top: 0;
  width: 1ch; background: var(--bg); color: var(--prompt); font-weight: 700; text-align: center;
}
.when { margin: 0; color: var(--prompt); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
h3 { margin: 0.1rem 0 0; font: 700 1.05rem/1.5 var(--mono); }
.where { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.92rem; }
.entry ul { margin: 0 0 0.75rem; padding: 0; list-style: none; max-width: 68ch; }
.entry li { position: relative; padding-left: 2ch; margin-bottom: 0.35rem; }
.entry li::before { content: "-"; position: absolute; left: 0; color: var(--muted); }
.stack { color: var(--ok); font-size: 0.9rem; }
.stack .k { color: var(--muted); }

/* key/value blocks: skills, education, contact */
dl.kv { margin: 0; display: grid; gap: 0.6rem 2ch; grid-template-columns: 1fr; max-width: 68ch; }
dl.kv dt { color: var(--prompt); }
dl.kv dd { margin: 0; }
@media (min-width: 40rem) { dl.kv { grid-template-columns: 14ch 1fr; } }

/* skills as [tags] */
.sk { display: inline-block; margin: 0 1ch 0.2rem 0; white-space: nowrap; }
.sk::before { content: "["; color: var(--muted); }
.sk::after { content: "]"; color: var(--muted); }

.list { margin: 0 0 1.5rem; padding: 0; list-style: none; max-width: 68ch; }
.list li { position: relative; padding-left: 2ch; margin-bottom: 0.5rem; }
.list li::before { content: "-"; position: absolute; left: 0; color: var(--muted); }

footer { border-top: 1px solid var(--rule); padding: 1.25rem 0 2.5rem; font-size: 0.85rem; color: var(--muted); }

@media print {
  :root { --bg: #fff; --fg: #111; --muted: #555; --prompt: #6b4f0c; --cmd: #1d4b70; --ok: #3d4e18; --rule: #ccc; --glow: none; }
  .top, .cursor-line, body::before, body::after, .lab { display: none; }
}
