/* =====================================================================
   Shared design tokens — atanaderi.dev portfolio
   ---------------------------------------------------------------------
   Every page in this repo inherits these primitives: typography, spacing,
   motion language, base reset, theme switching. Per-project accent and
   imagery overrides live in each project's own `theme.css`.
   ===================================================================== */

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

:root {
  /* ── Type ── */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* ── Spacing scale ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* ── Layout ── */
  --container: 1200px;
  --nav-h: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* ── Motion ── */
  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.15s;
  --t-mid:  0.25s;
  --t-slow: 0.45s;

  /* ── Neutral palette (dark default) ── */
  --bg:       #0A0A0A;
  --bg-elev:  #131313;
  --card:     #161616;
  --card-hover: #1E1E1E;
  --border:   #2A2A2A;
  --border-strong: #3A3A3A;
  --text:     #ECECEC;
  --text-dim: #B0B0B0;
  --muted:    #6E6E6E;

  /* ── Per-project accent (default) — projects override these in their own theme.css ── */
  --accent:        #C9A84C;  /* gold (CodeLegion's house accent — used as default here) */
  --accent-bright: #E0BF6B;
  --accent-dim:    #8A7330;
  --info:   #5BB3FF;
  --green:  #4CAF50;
  --red:    #E03E3E;

  --shadow-soft: 0 12px 40px -12px rgba(0,0,0,0.6);
}

html[data-theme="light"] {
  --bg:       #F8F5EE;
  --bg-elev:  #FBF9F3;
  --card:     #FFFFFF;
  --card-hover: #FAF6EC;
  --border:   #E5DFD0;
  --border-strong: #C9C1AC;
  --text:     #1A1A1A;
  --text-dim: #4A4A4A;
  --muted:    #8A8275;

  --accent:        #A88838;
  --accent-bright: #C9A84C;
  --accent-dim:    #6B5520;

  --shadow-soft: 0 12px 40px -12px rgba(60, 50, 20, 0.18);
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--t-slow) ease, color var(--t-slow) ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--text); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }

h1, h2, h3 { color: var(--text); line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: var(--space-4); }
h3 { font-size: 18px; font-weight: 600; }

p.lead {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 720px;
  margin-bottom: var(--space-5);
}

code, .code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.text-grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Reveal-on-scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) ease, transform var(--t-slow) ease;
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Util ── */
.hidden-on-mobile { }
@media (max-width: 720px) { .hidden-on-mobile { display: none !important; } }
