:root {
  --bg-color: #0f172a;
  --text-color: #f8fafc;
  --accent-color: #3b82f6;
  --surface-color: #1e293b;
  --border-color: #334155;
  --error-color: #ef4444;
  --success-color: #22c55e;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  background-image: url('../images/bg_pattern.png');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: var(--text-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Base interactive elements */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-accent {
  color: var(--error-color);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Micro animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* ========================================================================= */
/* THEMES */
/* ========================================================================= */

/* Base Theme Overrides (Defaults) */
.hero {
  padding: 4rem 0;
}
.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero-subtitle {
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 3rem;
  font-size: 1.1rem;
  max-width: 600px;
}

/* -------------------------------------------------------------------------
   Theme 1: Hacker / Glitch
   Font: JetBrains Mono
------------------------------------------------------------------------- */
.theme-hacker .brand-text {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  position: relative;
  display: inline-block;
}
.theme-hacker .brand-error {
  color: #ef4444;
}
.theme-hacker .brand-page {
  color: #94a3b8;
}
.theme-hacker .brand-text:hover {
  animation: hacker-glitch 0.3s infinite;
}
@keyframes hacker-glitch {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 1px) }
  40% { transform: translate(-1px, -1px) }
  60% { transform: translate(2px, 1px) }
  80% { transform: translate(1px, -1px) }
  100% { transform: translate(0) }
}
.theme-hacker .hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3.5rem;
  position: relative;
  display: inline-block;
  color: #22c55e;
  text-transform: uppercase;
  text-shadow: 2px 0 0 #ef4444, -2px 0 0 #3b82f6;
  white-space: nowrap;
  overflow: hidden;
  border-right: 15px solid #22c55e;
  animation: typing 2s steps(20, end), blink-caret .75s step-end infinite;
}
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}
@keyframes blink-caret {
  from, auto { border-color: transparent }
  50% { border-color: #22c55e; }
}

/* -------------------------------------------------------------------------
   Theme 2: Neo-Brutalist
   Font: Space Grotesk
------------------------------------------------------------------------- */
.theme-brutalist .brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  display: inline-flex;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  background: white;
  transform: rotate(-2deg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.theme-brutalist .brand-text:hover {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
}
.theme-brutalist .brand-error {
  background-color: #fde047;
  color: #000;
  padding: 0.1rem 0.3rem;
  border-right: 3px solid #000;
}
.theme-brutalist .brand-page {
  color: #000;
  padding: 0.1rem 0.3rem;
}
.theme-brutalist .hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -2px;
  color: #ef4444;
  -webkit-text-stroke: 2px #000;
  text-shadow: 6px 6px 0 #000;
  transition: transform 0.2s, text-shadow 0.2s;
  display: inline-block;
}
.theme-brutalist .hero-title:hover {
  transform: translate(-4px, -4px);
  text-shadow: 10px 10px 0 #000;
}
.theme-brutalist .hero-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  background: #000;
  color: #fde047;
  padding: 1rem;
  border: 4px solid #fde047;
  box-shadow: 6px 6px 0 #fde047;
  opacity: 1;
}

/* -------------------------------------------------------------------------
   Theme 3: Glassmorphic / Premium Minimalist
   Font: Outfit
------------------------------------------------------------------------- */
.theme-glass .brand-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}
.theme-glass .brand-error {
  background: linear-gradient(135deg, #c084fc, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.theme-glass .brand-page {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}
.theme-glass .hero {
  position: relative;
  z-index: 1;
}
.theme-glass .hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(139, 92, 246, 0) 70%);
  filter: blur(40px);
  z-index: -1;
  border-radius: 50%;
  animation: glass-pulse 8s infinite alternate ease-in-out;
}
.theme-glass .hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 4rem;
  font-weight: 300;
  letter-spacing: -1px;
}
.theme-glass .hero-subtitle {
  font-family: 'Outfit', sans-serif;
}
@keyframes glass-pulse {
  0% { transform: scale(1) translate(0, 0); opacity: 0.5; }
  100% { transform: scale(1.5) translate(50px, 20px); opacity: 1; }
}
