/* askerov.pro — values follow style-book.md (cyan accent, dark theme first). */

/* Fonts are served from this domain (SIL Open Font License). */
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark light;

  --ground: #0B0D10;
  --ground-raised: #14181D;
  --text: #E8E6E1;
  --text-secondary: #C9CCD0;
  --text-muted: #9AA0A6;
  --outline-dashed: #3A4048;
  --outline-frame: #2A3037;
  --rule: #1E2329;
  --accent: #00E5FF;

  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 5vw, 80px);
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: #F4F3EF;
    --ground-raised: #ECEAE4;
    --text: #14171A;
    --text-secondary: #2B3035;
    --text-muted: #4A4F55;
    --outline-dashed: #8A8F95;
    --outline-frame: #8A8F95;
    --rule: #D5D3CC;
    --accent: #006B7B;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 10;
  padding: 12px 20px; background: var(--ground); border: 1px solid var(--accent);
  font: 400 14px var(--font-mono);
}
.skip:focus { top: 16px; }

/* Header */
.site-header { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 32px; }
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 600 14px var(--font-mono); text-transform: uppercase; letter-spacing: 0.18em;
}
.nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; font: 400 13px var(--font-mono); }
.nav a[aria-current="page"] { color: var(--accent); }

/* Headings */
h1 {
  margin: 0 0 24px; font: 500 clamp(30px, 4.4vw, 52px)/1.15 var(--font-mono); letter-spacing: -0.01em;
}
h2, h3 { font-family: var(--font-mono); font-weight: 500; }
h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }

.label {
  margin: 0 0 32px; color: var(--text-muted);
  font: 400 13px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em;
}
.date { font: 400 13px var(--font-mono); color: var(--text-muted); letter-spacing: 0; text-transform: none; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 48px; padding: 80px 0 64px; }
.hero-text { flex: 3 1 480px; }
.hero-photo { flex: 2 1 320px; }
.hook { margin: 0 0 24px; font: 500 22px/1.5 var(--font-sans); }
.lead { margin: 0 0 24px; max-width: 760px; color: var(--text-secondary); font: 400 18px/1.6 var(--font-sans); }
.accent-rule { width: 64px; height: 2px; margin: 36px 0; border: 0; background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 16px; }

.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  font: 400 14px var(--font-mono);
}
.button:hover { background: var(--accent); color: var(--ground); }

/* Placeholder and photograph */
.placeholder {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5;
  padding: 16px; border: 1px dashed var(--outline-dashed); background: var(--ground-raised);
  color: var(--text-muted); font: 400 13px/1.5 var(--font-mono); text-align: center;
}
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.slot { padding: 32px; border: 1px dashed var(--outline-dashed); color: var(--text-muted); font: 400 13px/1.6 var(--font-mono); }

/* Figures */
.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 32px;
  margin: 0; padding: 32px 0; border-block: 1px solid var(--rule);
}
.figure { margin: 0; }
.figure .number { display: block; font: 500 40px/1 var(--font-mono); }
.figure .caption { display: block; margin: 8px 0 0; color: var(--text-muted); font: 400 14px/1.5 var(--font-sans); }

/* Sections */
.section { margin-top: 80px; }
.section > p, .prose p, .prose li { max-width: 760px; }
.section-text { margin: 0 0 32px; max-width: 760px; color: var(--text-secondary); font: 400 20px/1.6 var(--font-sans); }

/* Cards */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 40px 32px;
  margin: 0; padding: 0; list-style: none;
}
.card { padding-top: 20px; border-top: 1px solid var(--rule); }
.card .num { display: block; margin-bottom: 8px; color: var(--accent); font: 400 13px var(--font-mono); }
.card p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* List rows */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.rows li { border-bottom: 1px solid var(--rule); }
.rows a, .rows .row {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px;
  padding: 20px 0; font-size: 18px;
}
.rows .meta { color: var(--text-muted); font: 400 13px var(--font-mono); }
.prose .rows { padding-left: 0; }
.prose .rows li { max-width: none; margin-bottom: 0; }
.rows .meta { white-space: nowrap; margin-left: 24px; }
.file { color: var(--accent); font: 600 13px var(--font-mono); letter-spacing: 0.04em; }

/* Inner pages */
.page-head { padding: 64px 0 0; }
.page-head h1 { max-width: 20ch; }
.prose { padding-bottom: 8px; }
.prose p { margin: 0 0 20px; color: var(--text-secondary); font-size: 18px; line-height: 1.6; }
.prose h2 { margin: 48px 0 16px; font-size: 22px; line-height: 1.3; }
.prose h3 { margin: 40px 0 12px; }
.prose ul { padding-left: 20px; color: var(--text-secondary); font-size: 18px; }
.prose li { margin-bottom: 8px; }
.prose ol { padding-left: 24px; color: var(--text-secondary); font-size: 18px; }
.prose blockquote { margin: 0 0 20px; padding-left: 16px; border-left: 2px solid var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--border, var(--text-secondary)); margin: 40px 0; opacity: .4; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 24px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; font-family: var(--font-mono, "IBM Plex Mono", monospace); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid rgba(128,128,128,.35); }
.prose th { color: var(--text); font-weight: 500; }
.prose td { color: var(--text-secondary); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; color: var(--text); }
.prose a:hover { color: var(--accent); }
.prose .rows a { text-decoration: none; }
.prose a.button { text-decoration: none; color: var(--accent); }
.prose a.button:hover { color: var(--ground); }
.back { margin: 48px 0 0; font: 400 13px var(--font-mono); }

/* Footer */
.site-footer { margin-top: 80px; padding: 32px 0; border-top: 1px solid var(--rule); color: var(--text-muted); font: 400 12px var(--font-mono); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer-links { display: flex; gap: 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Spacing utilities (steps of 4 px) */
.mt-16 { margin-top: 16px !important; }
.mt-32 { margin-top: 32px !important; }
.mt-48 { margin-top: 48px !important; }
.mt-64 { margin-top: 64px !important; }
.mb-48 { margin-bottom: 48px !important; }

/* Jump links */
.jump { display: flex; flex-wrap: wrap; gap: 0 24px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; font: 400 13px var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Book announcement */
.announce { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--accent); border-bottom: 1px solid var(--rule); }
.announce .label { margin: 0; color: var(--accent); }
.announce p { flex: 1 1 320px; margin: 0; font: 400 16px/1.5 var(--font-sans); color: var(--text-secondary); }
.announce p strong { font-weight: 600; color: var(--text); }
.book-link { display: inline-flex; align-items: center; min-height: 44px; font: 400 14px var(--font-mono); color: var(--accent); }
.prose a.book-link { color: var(--accent); }
