:root {
  --ink: #15191b;
  --ink-2: #1a2023;
  --surface: #181d20;
  --surface-2: #20272a;
  --plate-band: #1b2125;

  --text: #f0ede0;
  --text-2: #c6c3b6;
  --text-3: #8b8878;

  --rule: rgba(232, 229, 214, 0.1);
  --rule-strong: rgba(232, 229, 214, 0.22);
  --line: rgba(240, 237, 224, 0.13);
  --line-soft: rgba(240, 237, 224, 0.075);

  --accent: #38e000;
  --accent-rgb: 56, 224, 0;
  --accent-bright: #4aeb1f;
  --swiss-red: #d62229;
  --on-accent: #15191b;
  --header-bg: rgba(21, 25, 27, 0.84);
  --button-bg: #fff;
  --button-text: #15191b;
  --button-hover: #f0ede0;
  --grid-dot: rgba(232, 229, 214, 0.1);
  --logo-color: #38e000;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  --max: 1240px;
  --gutter: 72px;
  --head-h: 78px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #f4f1e8;
  --ink-2: #e9e5db;
  --surface: #fbf9f4;
  --surface-2: #efeae0;
  --plate-band: #e7e3da;
  --text: #181b1d;
  --text-2: #41484b;
  --text-3: #687074;
  --rule: rgba(24, 27, 29, 0.1);
  --rule-strong: rgba(24, 27, 29, 0.22);
  --line: rgba(24, 27, 29, 0.14);
  --line-soft: rgba(24, 27, 29, 0.08);
  --header-bg: rgba(244, 241, 232, 0.86);
  --grid-dot: rgba(24, 27, 29, 0.12);

  --accent: #1f7a00;
  --accent-rgb: 31, 122, 0;
  --accent-bright: #2a9e00;
  --on-accent: #f4f1e8;
  --logo-color: #000000;
}

@media (max-width: 1080px) {
  :root {
    --gutter: 48px;
  }
}
@media (max-width: 820px) {
  :root {
    --gutter: 36px;
  }
}
@media (max-width: 720px) {
  :root {
    --head-h: 68px;
  }
}
@media (max-width: 520px) {
  :root {
    --gutter: 28px;
  }
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 72% 8%, rgba(var(--accent-rgb), 0.035), transparent 26%), var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.22s ease, color 0.22s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

section[id] {
  scroll-margin-top: 82px;
}

.wrap {
  width: min(var(--max), calc(100vw - var(--gutter)));
  margin: 0 auto;
}

.it {
  color: var(--accent);
}

.red {
  color: var(--accent);
}

.nb {
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: 12px;
}
.skip:focus {
  left: 16px;
  top: 16px;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  will-change: width;
}

.grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.4px);
  background-size: 28px 28px;
  opacity: 0.52;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
