/* ==========================================================================
   theme-core.css
   Core Theme Variables, Typography, Resets & Ambient Background
   ========================================================================== */

/* ==========================================================================
   custom-modern.css
   Modern, sleek front-end enhancements for indexGin's personal tech blog
   ========================================================================== */

:root,
html[data-theme="light"] {
  --global-font: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --title-font: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --code-font: 'Fira Code', Consolas, Menlo, Monaco, "Courier New", monospace;
  --global-font-size: 15.5px;
  --primary-color: #7c3aed;
  --primary-light: #a78bfa;
  --secondary-color: #0284c7;
  --accent-cyan: #38bdf8;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-hover-border: #c4b5fd;
  --header-bg: radial-gradient(circle at 18% 25%, rgba(124, 58, 237, 0.08), transparent 45%),
               radial-gradient(circle at 82% 75%, rgba(56, 189, 248, 0.08), transparent 45%),
               linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #ede9fe 100%);
  --header-title-gradient: linear-gradient(135deg, #0f172a 30%, #4338ca 100%);
  --header-subtext: #475569;
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-border: rgba(124, 58, 237, 0.2);
  --nav-text: #334155;
  --nav-text-hover: #7c3aed;
  --nav-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.08), 0 0 15px -4px rgba(124, 58, 237, 0.1);
  --footer-bg: #f1f5f9;
  --footer-border: #e2e8f0;
  --footer-text: #64748b;
  --footer-terminal-bg: rgba(255, 255, 255, 0.9);
  --footer-terminal-border: #cbd5e1;
  --ambient-opacity: 0.14;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --transition-smooth: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
  --primary-color: #a855f7;
  --primary-light: #c084fc;
  --secondary-color: #38bdf8;
  --accent-cyan: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --bg-page: #090d16;
  --card-bg: #0f172a;
  --card-border: rgba(168, 85, 247, 0.2);
  --card-hover-border: #a855f7;
  --header-bg: radial-gradient(circle at 18% 25%, rgba(124, 58, 237, 0.4), transparent 45%),
               radial-gradient(circle at 82% 75%, rgba(56, 189, 248, 0.3), transparent 45%),
               linear-gradient(135deg, #090d16 0%, #111827 50%, #1e1b4b 100%);
  --header-title-gradient: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  --header-subtext: #94a3b8;
  --nav-bg: rgba(10, 15, 29, 0.9);
  --nav-border: rgba(168, 85, 247, 0.25);
  --nav-text: #cbd5e1;
  --nav-text-hover: #ffffff;
  --nav-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.65), 0 0 20px -5px rgba(124, 58, 237, 0.25);
  --footer-bg: #060911;
  --footer-border: rgba(168, 85, 247, 0.25);
  --footer-text: #94a3b8;
  --footer-terminal-bg: rgba(10, 15, 29, 0.85);
  --footer-terminal-border: rgba(168, 85, 247, 0.3);
  --ambient-opacity: 0.25;
}

body {
  font-family: var(--global-font);
  font-size: var(--global-font-size, 15.5px);
  line-height: 1.85;
  background-color: transparent !important;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--title-font);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------------

   5. Ambient Mathematical & Frontier Research SVG Background Layer
   -------------------------------------------------------------------------- */
.frontier-ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--ambient-opacity);
  transition: opacity 0.3s ease;
}

.frontier-svg-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.container, header.intro-header, footer.matrix-footer {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   6. Editorial & Technical Typography Utilities
   -------------------------------------------------------------------------- */
.font-editorial {
  font-family: var(--title-font) !important;
  letter-spacing: -0.015em;
}

.font-mono {
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* --------------------------------------------------------------------------
