:root {
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-hover: #222;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #60a5fa;
  --accent-dim: #2563eb;
  --border: #2a2a2a;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 720px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #93c5fd; }

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav .site-name {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
nav .nav-links { display: flex; gap: 1.5rem; }
nav .nav-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color .2s;
}
nav .nav-links a:hover,
nav .nav-links a.active { color: var(--accent); }

/* ── Main content ── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Hero ── */
.hero { margin-bottom: 3rem; }
.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.hero .tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.hero .intro {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}

/* ── Section headings ── */
.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 3rem 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Role cards ── */
.role-list { list-style: none; }
.role-item {
  padding: 0.6rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.role-item .bullet {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.role-item .role-text { font-size: 0.95rem; }
.role-item .role-org { color: var(--text-muted); }

/* ── Highlights / stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
  transition: border-color .2s;
}
.stat-card:hover { border-color: var(--accent-dim); }
.stat-card .stat-number {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  display: block;
}

/* ── Social links ── */
.social-links {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.social-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all .2s;
}
.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(96, 165, 250, 0.05);
}

/* ── Timeline (About page) ── */
.timeline { position: relative; margin-top: 1rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin: 2.5rem 0 0.8rem 0;
  position: relative;
  padding-left: 28px;
}
.timeline-year:first-child { margin-top: 0.5rem; }
.timeline-item {
  position: relative;
  padding-left: 28px;
  margin-bottom: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
}
.timeline-item .tl-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.timeline-item .tl-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.timeline-item .tl-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Project cards ── */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  transition: border-color .2s;
}
.project-card:hover { border-color: var(--accent-dim); }
.project-card .proj-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.project-card .proj-title {
  font-size: 1.05rem;
  font-weight: 600;
}
.project-card .proj-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.project-card .proj-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.7rem;
}
.project-card .proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.proj-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

/* ── Skills grid ── */
.skills-section { margin-top: 1rem; }
.skill-group { margin-bottom: 1.2rem; }
.skill-group .skill-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.skill-group .skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ── Certifications ── */
.cert-list { list-style: none; margin-top: 0.5rem; }
.cert-list li {
  padding: 0.5rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.cert-list li:last-child { border-bottom: none; }
.cert-issuer {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Footer ── */
footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card .proj-header { flex-direction: column; gap: 0.2rem; }
  nav .nav-links { gap: 1rem; }
  nav .nav-links a { font-size: 0.82rem; }
}
