/* ============================================
   base.css - リセット・変数・タイポグラフィ
   ============================================ */

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

:root {
  /* 領域カラー */
  --color-quantity:       #7c6cf8;
  --color-change:         #f8706c;
  --color-structure:      #3ecfca;
  --color-space:          #4ab8d8;
  --color-finite-math:    #6dcc98;
  --color-math-sciences:  #f5c842;

  /* ベースカラー（ダーク） */
  --bg-primary:    #0d0d1a;
  --bg-secondary:  #12122a;
  --bg-card:       #1a1a35;
  --bg-card-hover: #22224a;
  --border:        #2a2a50;

  /* テキスト */
  --text-primary:   #e8e8f8;
  --text-secondary: #9090b8;
  --text-muted:     #5a5a88;

  /* アクセント */
  --accent:         #7c6cf8;
  --accent-glow:    rgba(124, 108, 248, 0.3);

  /* スペーシング */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* タイポグラフィ */
  --font-sans:  'Inter', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
  --font-math:  'Latin Modern Math', serif;

  /* 角丸・影 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);

  /* トランジション */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  line-height: 1.8;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--text-primary); }

code, pre {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.05);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
}

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

/* スクロールバー */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
