/* ============================================================
   GLOBAL DESIGN SYSTEM — Black & White + Dark / Light Theme
   Developer Portfolio · style.css
   ============================================================ */

/* ── Theme Tokens ──────────────────────────────────────── */

/* DARK THEME (default) */
[data-theme="dark"] {
  --bg:           #0a0a0a;
  --bg-raised:    #111111;
  --surface:      rgba(255,255,255,0.06);
  --surface-hover:rgba(255,255,255,0.1);
  --border:       rgba(255,255,255,0.1);
  --border-strong:rgba(255,255,255,0.2);
  --text-primary: #f0f0f0;
  --text-secondary:#888888;
  --text-muted:   #555555;
  --ink:          #ffffff;
  --ink-inv:      #000000;
  --nav-bg:       rgba(12,12,12,0.75);
  --nav-border:   rgba(255,255,255,0.1);

  /* Unified Accent (Violet/Purple) */
  --accent:       #a78bfa;
  --accent-dim:   rgba(167,139,250,0.15);
  --accent-glow:  rgba(167,139,250,0.25);
}

/* LIGHT THEME */
[data-theme="light"] {
  --bg:           #f5f5f5;
  --bg-raised:    #ffffff;
  --surface:      rgba(0,0,0,0.05);
  --surface-hover:rgba(0,0,0,0.09);
  --border:       rgba(0,0,0,0.1);
  --border-strong:rgba(0,0,0,0.2);
  --text-primary: #1a1a1a;
  --text-secondary:#666666;
  --text-muted:   #aaaaaa;
  --ink:          #000000;
  --ink-inv:      #ffffff;
  --nav-bg:       rgba(245,245,245,0.8);
  --nav-border:   rgba(0,0,0,0.1);

  /* Unified Accent (Violet/Purple) */
  --accent:       #7c3aed;
  --accent-dim:   rgba(124,58,237,0.10);
  --accent-glow:  rgba(124,58,237,0.20);
}

/* ── Shared Variables ──────────────────────────────────── */
:root {
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h:       56px;
  --nav-radius:  999px;
  --radius-sm:   8px;
  --radius-md:   16px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background: none; border: none; font-family: inherit; color: inherit; }

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

/* ── Custom Cursor ─────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 32px; height: 32px;
  border: 1.5px solid var(--text-secondary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  opacity: 0; /* hidden until JS positions it */
  transition: width 0.25s var(--ease-out),
              height 0.25s var(--ease-out),
              border-color 0.25s ease,
              background-color 0.25s ease,
              opacity 0.25s ease;
}
.cursor-dot {
  position: fixed;
  width: 4px; height: 4px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  will-change: transform;
  opacity: 0; /* hidden until JS positions it */
  transition: background 0.3s ease, opacity 0.25s ease;
}

/* When cursor is active (JS adds this class) */
body.custom-cursor-active {
  cursor: none;
}
body.custom-cursor-active a,
body.custom-cursor-active button {
  cursor: none;
}

/* Expand on hover */
body.cursor-hover .cursor {
  width: 48px; height: 48px;
  background: var(--surface-hover);
  border-color: var(--ink);
}

/* ── Placeholder Sections ──────────────────────────────── */
.ph-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border);
}
.ph-section span {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.04em;
}

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

/* ── No-JS Fallback ────────────────────────────────────── */
html.no-js .hero-topbar,
html.no-js .hero-sub,
html.no-js .hero-bottombar,
html.no-js .hero-portrait,
html.no-js .nav-header {
  opacity: 1 !important;
  transform: none !important;
}
