/* --- GLOBAL VARIABLES --- */
:root {
  --bg: #020617;
  --card-bg: rgba(30, 41, 59, 0.4);
  --card-border: rgba(148, 163, 184, 0.15);
  --accent: #38bdf8; /* Sky Blue */
  --accent-glow: rgba(56, 189, 248, 0.2);
  --secondary: #a855f7; /* Purple */
  --text: #f1f5f9;
  --muted: #94a3b8;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --nav-height: 70px;
  --max-width: 1040px;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  /* Subtle mesh gradient for depth */
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08), transparent 25%);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 { line-height: 1.2; font-weight: 700; color: #fff; }
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- HEADER & NAV --- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-weight: 700; font-size: 1.2rem; color: #fff;
  display: flex; align-items: center; gap: 0.5rem;
}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.mobile-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; padding: 0.75rem 1.5rem; border-radius: 99px;
  font-weight: 500; font-size: 0.95rem; border: 1px solid transparent;
}
.btn-primary {
  background: var(--text); color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent); border-color: var(--accent); color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-ghost { border-color: var(--card-border); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); background: rgba(255,255,255,0.05); }

/* --- CARDS & GRID --- */
.grid-3 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;
}

.card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(56, 189, 248, 0.3); }

.tag {
  font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 4px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--card-border); color: var(--accent);
  display: inline-block; margin-right: 0.5rem; margin-top: 0.5rem;
}

/* --- PAGE SECTIONS --- */
main { flex: 1; padding: 3rem 0; }
.section-header { margin-bottom: 2.5rem; max-width: 600px; }
.page-title { font-size: 2.5rem; margin-bottom: 1rem; }
.page-intro { font-size: 1.1rem; color: var(--muted); }

/* --- FOOTER --- */
footer {
  padding: 2rem 0; border-top: 1px solid var(--card-border);
  text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: auto;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: var(--bg); padding: 1rem; border-bottom: 1px solid var(--card-border); }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: block; }
  .page-title { font-size: 2rem; }
}