:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a24;
  --border: #2a2a3a;
  --text: #e2e8f0;
  --muted: #6b7280;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --mono: "Fira Code", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Nav ── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

#nav .logo {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent2);
  text-decoration: none;
  letter-spacing: 0.05em;
}

#nav .logo span { color: var(--muted); }

#nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

#nav ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

#nav ul a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}

#nav ul a:hover,
#nav ul a.active {
  color: var(--text);
}

#nav ul a:hover::after,
#nav ul a.active::after {
  width: 100%;
}

/* hamburger */
#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

#nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

@media (max-width: 640px) {
  #nav-toggle { display: flex; }

  #nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2.5rem;
    gap: 1.25rem;
  }

  #nav ul.open { display: flex; }
}

/* ── Page wrapper ── */
.page {
  padding-top: 5rem;
  min-height: 100vh;
}

/* ── Section ── */
.section {
  max-width: 860px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

/* ── Mono tag ── */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent2);
  margin: 0.2rem 0.15rem;
}

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-family: var(--mono);
  font-size: 0.82rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

.btn-solid {
  background: var(--accent);
  color: #fff;
}

.btn-solid:hover {
  background: #6d28d9;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* ── Footer ── */
#footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  height: 1.2em;
  margin-bottom: 0.5rem;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Fade-in on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
