/* ==========================================================================
   Engineering Notes — tokens
   ========================================================================== */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --warm: #f4f1eb;
  --ink: #020a0f;
  --muted: #646470;
  --faint: #70707b;
  --line: #e6e6eb;
  --line-strong: #020a0f;
  --yellow: #fbb401;
  --yellow-strong: #eba700;
  --yellow-soft: #fff3c9;
  --purple: #7022ff;
  --purple-soft: #f1ebff;
  --invert-bg: #020a0f;
  --invert-text: #f4f1eb;
  --hard: #020a0f;
  --code-bg: #11151b;
  --code-text: #e8edf2;
  --code-muted: #a9b4c0;

  --sans: "IBM Plex Sans", "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
    system-ui, sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
    Consolas, monospace;

  --home-max: 1280px;
  --kb-max: 1440px;
  --article-max: 760px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 2px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;

  --step--1: 0.6875rem;
  --step-0: 0.8125rem;
  --step-1: 0.875rem;
  --step-2: 1rem;
  --step-3: 1.125rem;
  --step-4: 1.375rem;
  --step-5: 1.75rem;
  --step-6: 2.25rem;
  --step-7: 3.25rem;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0b0c;
  --warm: #171512;
  --ink: #f3f1ec;
  --muted: #a8a6a1;
  --faint: #93918c;
  --line: #2a2927;
  --line-strong: #f3f1ec;
  --yellow: #ffc21a;
  --yellow-strong: #ffcf4d;
  --yellow-soft: #2a2410;
  --purple: #b79cff;
  --purple-soft: #1d1630;
  --invert-bg: #f3f1ec;
  --invert-text: #020a0f;
  --hard: #000000;
  --code-bg: #07090c;
  --code-text: #e8edf2;
  --code-muted: #9aa7b4;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--purple-soft);
  color: var(--ink);
}

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

.mono {
  font-family: var(--mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--home-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wrap--kb {
  max-width: var(--kb-max);
}

.sample-note {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--faint);
}

@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;
  }
}
