:root {
  --bg: #050706;
  --bg-raised: #0a100d;
  --bg-card: #0e1211;
  --border: #1a2a25;
  --border-bright: #7ad8a5;
  --text: #edf5ee;
  --text-dim: #b3c7bb;
  --text-faint: #6f8479;
  --accent: #6ad89a;
  --accent-dim: #2a5a46;
  --accent-glow: rgba(106, 216, 154, 0.12);
  --warn: #d5a95f;
  --gold: #e0b76a;

  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ---------- NAV ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 11, 13, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-brand .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.nav-links {
  display: flex;
  gap: 4px;
  font-size: 13px;
  font-family: var(--font-mono);
}
.nav-links a {
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-raised); }
.nav-links a.active {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
}
.nav-links .idx { color: var(--text-faint); margin-right: 6px; }

.nav-links .cv-button {
  margin-left: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
}
.nav-links .cv-button:hover {
  border-color: var(--accent);
  background: rgba(52, 199, 149, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 20px; height: 2px;
  background: var(--text);
}

@media (max-width: 780px) {
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-links .cv-button {
    margin-left: 0;
    margin-top: 4px;
    width: fit-content;
    padding: 9px 12px;
  }
  .nav-toggle { display: flex; }
}

/* ---------- PAGE HEADER (non-hero pages) ---------- */
.page-header {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--border);
}
.page-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-kicker::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 800px;
}
.page-sub {
  margin-top: 20px;
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--text-dim);
}

/* ---------- SECTION SCAFFOLDING ---------- */
section { padding: 80px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: none; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 48px;
}
.section-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ---------- CARDS (generic) ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  padding: 28px;
  transition: border-color 0.25s ease;
}
.card:hover { border-color: var(--border-bright); }

.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  border: 1px solid var(--border);
  background: transparent;
  padding: 5px 10px;
  border-radius: 3px;
  display: inline-block;
}
.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 3px;
  display: inline-block;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 13px 24px;
  border-radius: 3px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary { background: transparent; color: var(--accent); font-weight: 600; border-color: var(--border); }
.btn-primary:hover { background: transparent; border-color: var(--accent); box-shadow: none; transform: translateY(-1px); }
.btn-ghost { color: var(--text-dim); background: transparent; }
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); }

.link-arrow { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); border: 1px solid var(--border); padding: 7px 14px; border-radius: 3px; transition: all 0.2s; white-space: nowrap; display: inline-block; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

footer {
  padding: 60px 0 60px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}
.footer-links {
  display: flex; justify-content: center; gap: 24px; margin-bottom: 20px;
  font-size: 12px;
}
.footer-links a { color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
