/* ============================================================
   Service: base.css
   Variables, reset, typography, preloader, cursor
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@400;600;700&family=Roboto+Mono:wght@400&family=Montserrat:wght@700&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
    --bg-color: #05050e;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #00d2ff;
    --accent-secondary-color: #a78bfa;
    --accent-dark-color: #0d9488;
    --card-bg: rgba(10, 10, 25, 0.45);
    --navbar-bg: rgba(5, 5, 14, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --skill-bg: #0f1026;
    --skill-track: #1b1c3a;
    --scrollbar-track: #05050f;
    --footer-bg: #030309;
    --form-bg: rgba(12, 12, 30, 0.7);
    --highlight-primary: var(--accent-color);
    --highlight-secondary: var(--accent-secondary-color);
    --radius-card: 1rem;
    --shadow-glow: 0 0 50px rgba(0, 210, 255, 0.12);
    
    /* Background Glow Blobs */
    --glow-blob-1: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    --glow-blob-2: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 60%);
}

body.light-mode {
    --bg-color: linear-gradient(135deg, #f0f7ff 0%, #faf5ff 50%, #f0fdfa 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #0284c7;
    --accent-secondary-color: #7c3aed;
    --accent-dark-color: #0d9488;
    --card-bg: rgba(255, 255, 255, 0.7);
    --navbar-bg: rgba(240, 247, 255, 0.75);
    --border-color: rgba(15, 23, 42, 0.08);
    --skill-bg: #f1f5f9;
    --skill-track: #e2e8f0;
    --scrollbar-track: #f1f5f9;
    --footer-bg: #e2e8f0;
    --form-bg: rgba(255, 255, 255, 0.85);
    --highlight-primary: #0284c7;
    --highlight-secondary: #7c3aed;
    
    /* Background Glow Blobs for Light Mode */
    --glow-blob-1: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 60%);
    --glow-blob-2: radial-gradient(circle, rgba(45, 212, 191, 0.1) 0%, transparent 60%);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg-color);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
    cursor: default;
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

.hidden { display: none !important; }

/* ── Typography Helpers ─────────────────────────────────────── */
.font-display { font-family: "Poppins", sans-serif; }
.font-mono    { font-family: "Roboto Mono", monospace; }
.font-logo    { font-family: "Montserrat", sans-serif; }

.text-highlight-primary   { color: var(--highlight-primary); }
.text-highlight-secondary { color: var(--highlight-secondary); }

/* ── Will-change hints ──────────────────────────────────────── */
.project-card, .skill-button, .about-shape, #navbar { will-change: transform, opacity; }

/* ── Preloader ──────────────────────────────────────────────── */
#preloader {
    position: fixed; inset: 0;
    background-color: #000;
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    color: #00bfff;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}
.preloader-wrapper { width: 300px; text-align: center; }
#preloader-logo { position: relative; width: 250px; height: 150px; margin: 0 auto 20px; }
#preloader-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 2; transform-origin: center center; }
.logo-path { stroke: var(--accent-color); stroke-dasharray: 3000; stroke-dashoffset: 3000; }
.progress-bar-container { width: 100%; height: 4px; background-color: rgba(0, 191, 255, 0.2); border-radius: 2px; margin-top: 1rem; }
#progress-bar { width: 0%; height: 100%; background-color: var(--accent-color); border-radius: 2px; transition: width 0.3s ease; }
#status-text { margin-top: 1rem; font-family: "Roboto Mono", monospace; color: var(--text-secondary); }

/* ── Custom Cursor ──────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0;
    z-index: 1100; pointer-events: none; border-radius: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference; display: none;
}
@media (hover: hover) and (pointer: fine) { .cursor-dot, .cursor-ring { display: block; } }
.cursor-dot  { width: 10px; height: 10px; background-color: var(--text-primary); transition: transform 0.3s ease; }
.cursor-ring { width: 30px; height: 30px; border: 2px solid var(--text-primary); transition: width 0.3s ease, height 0.3s ease, border-width 0.3s ease, opacity 0.3s ease; }
body.link-hover .cursor-ring { width: 50px; height: 50px; border-width: 1px; opacity: 0.5; }
body.link-hover .cursor-dot  { transform: translate(-50%, -50%) scale(0.7); }

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