/* ─── Google Fonts ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;1,9..144,300;1,9..144,400&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&family=IBM+Plex+Mono:wght@300;400&family=Noto+Serif+KR:wght@300;400&display=swap');

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {
  --bg:           #FDFBF7;
  --bg-warm:      #F8F4ED;
  --bg-deep:      #EDE9E1;
  --ink:          #1f1d1a;
  --ink-mid:      #4A4540;
  --ink-soft:     #665e54;
  --accent:       #0a5d4f;
  --accent-hover: #0d7560;
  --accent-pale:  #E8F5F2;
  --accent-row:   rgba(10, 93, 79, 0.03);
  --accent-feat:  rgba(10, 93, 79, 0.055);
  --border:       #E8E2D5;
  --cream-card:   #FAF8F3;
  --hairline:     rgba(31,29,26,0.08);
  --hairline-mid: rgba(31,29,26,0.13);
  --hairline-row: rgba(31,29,26,0.06);

  --font-display: 'Fraunces', 'Noto Serif KR', Georgia, serif;
  --font-body:    'IBM Plex Sans', 'Pretendard Variable', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;
  --font-kr:      'Noto Serif KR', 'Apple SD Gothic Neo', serif;

  --shadow-sm: 0 1px 2px rgba(31,29,26,0.04), 0 3px 10px rgba(31,29,26,0.05);
  --shadow-md: 0 1px 2px rgba(31,29,26,0.04), 0 6px 20px rgba(31,29,26,0.07), 0 24px 56px rgba(31,29,26,0.04);
  --shadow-lg: 0 2px 4px rgba(31,29,26,0.04), 0 8px 32px rgba(31,29,26,0.08), 0 40px 80px rgba(31,29,26,0.06);

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-std:  cubic-bezier(0.32, 0.72, 0, 1);

  /* Nav dash lengths */
  --dash-inactive: 24px;
  --dash-hover:    40px;
  --dash-active:   64px;
}

/* ─── Korean lang overrides ──────────────────────────────────── */
:lang(ko) { line-height: 1.85; word-break: keep-all; }
:lang(ko) p, :lang(ko) li { font-family: 'IBM Plex Sans', 'Noto Serif KR', system-ui, sans-serif; }

/* ─── Base ───────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-warm); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ─── Selection ──────────────────────────────────────────────── */
::selection { background: var(--accent); color: #fff; }

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

/* ─── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  padding: 0.5rem 1rem; background: var(--accent); color: #fff;
  font-family: var(--font-body); font-size: 0.85rem; border-radius: 4px;
  text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ─── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
