/* ---------------------------------------------------------------
   Anton Rusakov — personal site
   Style: minimal single-column + bento cards, mono + blue accent
   Fonts: Archivo (headings) / Space Grotesk (body)
------------------------------------------------------------------ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F4F4F5;
  --fg: #09090B;
  --muted: #52525B;
  --border: #E4E4E7;
  --accent: #2563EB;
  --accent-fg: #FFFFFF;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(9,9,11,.04), 0 8px 24px rgba(9,9,11,.05);
  --shadow-hover: 0 2px 4px rgba(9,9,11,.06), 0 14px 34px rgba(9,9,11,.09);
  --maxw: 940px;
  --font-head: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090B;
    --surface: #18181B;
    --surface-2: #1F1F23;
    --fg: #FAFAFA;
    --muted: #A1A1AA;
    --border: #27272A;
    --accent: #3B82F6;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-hover: 0 2px 4px rgba(0,0,0,.5), 0 14px 34px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(160%) blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; letter-spacing: -.01em;
  color: var(--fg); text-decoration: none; font-size: 1.02rem;
}
.brand .monogram {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--fg); color: var(--bg);
  font-size: .82rem; font-weight: 700; letter-spacing: .02em;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; font-size: .95rem;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--fg); background: var(--surface-2); }
.nav-links a.active { color: var(--fg); background: var(--surface-2); }

/* ---------- Generic sections ---------- */
main { padding: 40px 0 20px; }
section { margin: 0 0 40px; }

h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 600; margin-top: 0; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent); }

.eyebrow {
  font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
  margin: 0 0 14px;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.section-title {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 22px;
}
.section-title .num { font-family: var(--font-body); color: var(--accent); font-size: .9rem; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: 26px 0 10px; }
.hero h1 { margin-bottom: .2em; }
.hero .tagline { color: var(--muted); font-size: 1.15rem; margin-bottom: 1.4em; }
.hero .tagline strong { color: var(--fg); font-weight: 600; }

/* ---------- Buttons / links row ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
  font-weight: 600; font-size: .95rem; border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-ghost { background: var(--surface); color: var(--fg); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }

/* ---------- Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card.link:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card h3 { margin-bottom: .3em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .95rem; }
.card .kicker { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 10px; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }
.col-6 { grid-column: span 6; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  font-size: .82rem; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
}

/* ---------- Resume ---------- */
.entry { position: relative; padding: 0 0 26px 22px; border-left: 2px solid var(--border); margin-left: 4px; }
.entry:last-child { padding-bottom: 0; }
.entry::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent);
}
.entry .role { font-family: var(--font-head); font-weight: 600; font-size: 1.06rem; }
.entry .org { color: var(--fg); font-weight: 600; }
.entry .meta { color: var(--muted); font-size: .9rem; margin: 2px 0 8px; }
.entry ul { margin: 8px 0 0; padding-left: 18px; }
.entry li { margin-bottom: 5px; color: var(--muted); }
.entry li strong { color: var(--fg); font-weight: 600; }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 6px; padding: 1px 8px; margin-left: 6px; vertical-align: middle;
}

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-block h3 { margin-bottom: 10px; }
.skill-block p { color: var(--muted); font-size: .94rem; margin: 0; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { text-align: left; }
.fact .n { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; }
.fact .l { color: var(--muted); font-size: .88rem; }

/* ---------- Prose (hobby) ---------- */
.prose p { color: var(--muted); max-width: 66ch; }
.prose p strong { color: var(--fg); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 30px;
  padding: 26px 0; color: var(--muted); font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.foot-links { display: flex; gap: 16px; }

/* ---------- Accessibility ---------- */
a:focus-visible, .btn:focus-visible, .nav-links a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 12px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .col-3, .col-2 { grid-column: span 6; }
  .skills-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .nav-links a { padding: 8px 9px; }
}
