:root {
  --bg: #FAFAF8; --ink: #121212; --mute: #5E5E5A; --line: #E2E2DD; --soft: #F0F0EC; --card: #121212;
  --cbg: #121212; --cink: #FAFAF8; --cmute: #A3A39E; --cline: #3A3A37;
  --accent: #2F4BFF;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E0D; --ink: #EDEDE8; --mute: #9A9A94; --line: #2A2A27; --soft: #1C1C1A; --card: #1C1C1A;
    --cbg: #EDEDE8; --cink: #0E0E0D; --cmute: #5E5E5A; --cline: #C9C9C3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0E0D; --ink: #EDEDE8; --mute: #9A9A94; --line: #2A2A27; --soft: #1C1C1A; --card: #1C1C1A;
  --cbg: #EDEDE8; --cink: #0E0E0D; --cmute: #5E5E5A; --cline: #C9C9C3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; transition: background .4s, color .4s; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.muted { color: var(--mute); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { font-size: 14px; font-weight: 500; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.brand::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.top-right { display: flex; align-items: center; gap: 24px; }
.nav { display: flex; gap: 24px; font-size: 13px; color: var(--mute); }
.lang { display: flex; align-items: center; color: var(--mute); font-size: 13px; }
.lang button { min-height: 44px; min-width: 40px; padding: 0 8px; background: none; border: 0; cursor: pointer; color: var(--mute); }
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 500; }
.theme { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.theme svg { transition: transform .5s cubic-bezier(.2,.7,.1,1); }
:root[data-theme="dark"] .theme svg { transform: rotate(180deg); }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--mute); }
.back svg { transition: transform .3s cubic-bezier(.2,.7,.1,1); }
.back:hover svg { transform: translateX(-4px); }

@supports (animation-timeline: view()) {
  .rv { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}
@keyframes rv { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) { .nav, .clock { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
