:root {
  --primary: #0066cc;
  --primary-glow: rgba(0, 102, 204, 0.15);
  --secondary: #6e5494;
  --accent: #00d1b2;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --nav-bg: #1a202c;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --border: #334155;
  --card-bg: #1e293b;
  --nav-bg: #020617;
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.15);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  transition: var(--transition);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; }

/* Global Nav */
.global-nav {
  background: rgba(26, 32, 44, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
[data-theme="dark"] .global-nav { background: rgba(2, 6, 23, 0.8); }

.global-nav .container { display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; max-width: 1200px; margin: 0 auto; }
.global-nav a { color: #e2e8f0; text-decoration: none; margin-left: 1.5rem; transition: var(--transition); font-weight: 500; font-size: 0.95rem; }
.global-nav a:hover { color: var(--primary); }
.global-nav .brand { margin-left: 0; font-weight: 800; color: white; display: flex; align-items: center; gap: 0.75rem; font-size: 1.1rem; }

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  background: radial-gradient(circle at top right, var(--primary-glow), transparent 40%),
              radial-gradient(circle at bottom left, var(--primary-glow), transparent 40%);
}

/* Cards & Containers */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

/* Grid Layouts */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin: 3rem 0; }

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; border: none; }
.btn-primary:hover { background: var(--primary-dark); transform: scale(1.02); }

/* Citation Section */
.cite-section {
  margin-top: 6rem;
  padding: 3rem;
  background: var(--bg-alt);
  border-radius: 20px;
  border: 1px solid var(--border);
  text-align: left;
}
.cite-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  margin-top: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}
.cite-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate { animation: fadeIn 0.6s ease-out forwards; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 4rem 0; text-align: center; color: var(--text-muted); background: var(--bg-alt); }

@media (max-width: 768px) {
  .container { padding: 1.5rem; }
  .grid { grid-template-columns: 1fr; }
  .global-nav .container { padding: 0 1rem; }
}
