/* ============================================================
   RESET + CUSTOM PROPERTIES
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

img, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   DARK THEME (default)
   ============================================================ */
:root,
[data-theme="dark"] {
  /* Backgrounds */
  --bg-deep:        #05080f;
  --bg-surface:     #0a1220;
  --bg-card:        rgba(15, 28, 48, 0.55);
  --bg-nav:         rgba(10, 18, 32, 0.82);

  /* Text */
  --text-primary:   #e6f1ff;
  --text-secondary: #8aa6c8;
  --text-muted:     #4d6a8a;

  /* Accents */
  --accent:         #4ea3ff;
  --accent-light:   #87c2ff;
  --accent-pale:    #b6e1ff;
  --accent-glow:    rgba(78, 163, 255, 0.18);
  --accent-glow-md: rgba(78, 163, 255, 0.30);

  /* Borders */
  --border:         rgba(78, 163, 255, 0.18);
  --border-strong:  rgba(78, 163, 255, 0.38);

  /* Shadows */
  --shadow-sm:      0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-md:      0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-lg:      0 20px 60px rgba(0, 0, 0, 0.65);
  --shadow-glow:    0 0 24px rgba(78, 163, 255, 0.22);

  /* Typography */
  --font-serif:     'Playfair Display', Georgia, serif;
  --font-sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:      ui-monospace, 'SF Mono', 'Cascadia Code', 'Courier New', monospace;

  /* Radius */
  --radius-sm:      2px;
  --radius-md:      4px;
  --radius-lg:      8px;

  /* Transitions */
  --ease-out:       cubic-bezier(0.2, 0.9, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:  160ms;
  --duration-mid:   280ms;
  --duration-slow:  480ms;

  /* Layout */
  --nav-height:     68px;
  --container-max:  1200px;
  --section-pad:    clamp(64px, 10vw, 120px);
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
[data-theme="light"] {
  --bg-deep:        #eef3fa;
  --bg-surface:     #dde6f2;
  --bg-card:        rgba(255, 255, 255, 0.72);
  --bg-nav:         rgba(238, 243, 250, 0.90);

  --text-primary:   #0d1e35;
  --text-secondary: #3d5a80;
  --text-muted:     #6b87a8;

  --accent:         #1a6fd4;
  --accent-light:   #3b8de8;
  --accent-pale:    #0a4fa0;
  --accent-glow:    rgba(26, 111, 212, 0.14);
  --accent-glow-md: rgba(26, 111, 212, 0.26);

  --border:         rgba(26, 111, 212, 0.18);
  --border-strong:  rgba(26, 111, 212, 0.38);

  --shadow-sm:      0 2px 12px rgba(13, 30, 53, 0.12);
  --shadow-md:      0 8px 32px rgba(13, 30, 53, 0.16);
  --shadow-lg:      0 20px 60px rgba(13, 30, 53, 0.20);
  --shadow-glow:    0 0 24px rgba(26, 111, 212, 0.18);
}

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--duration-mid) var(--ease-in-out),
              color var(--duration-mid) var(--ease-in-out);
}

em {
  font-style: italic;
  color: var(--accent);
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

::selection {
  background: var(--accent-glow-md);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
