:root {
  --bg:           #09090b;
  --bg-card:      #111115;
  --bg-hover:     #18181b;
  --border:       #27272a;
  --border-light: #3f3f46;
  --text:         #fafafa;
  --text-dim:     #a1a1aa;
  --text-muted:   #71717a;
  --accent:       #3b82f6;
  --accent-hover: #2563eb;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --radius:       8px;
  --max-w:        1100px;
  --nav-h:        60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header / Nav ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color 0.15s;
}
.nav-logo:hover { color: var(--accent); text-decoration: none; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 7rem 1.5rem 5rem;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.hero-name {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-dim);
  margin-bottom: 1.75rem;
}

.hero-bio {
  max-width: 560px;
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

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

.btn-outline {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border-light);
}
.btn-outline:hover { color: var(--text); border-color: var(--text-muted); background: var(--bg-hover); }

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-dim);
  border-color: var(--border);
}
.btn-secondary:hover { color: var(--text); border-color: var(--border-light); }

/* ── Section layout ───────────────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

/* ── Project cards ────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

a.project-card, .project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
a.project-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 0 1px var(--border-light), 0 6px 28px rgba(0,0,0,0.5);
  text-decoration: none;
}
a.project-card:hover .project-card-title { color: var(--accent); }

.project-card-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.project-card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.15s;
  margin-bottom: 0.7rem;
}

.project-card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

/* ── Tags ─────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}

/* ── Skills ───────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem 1.5rem;
}

.skill-group h3 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; }

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy { font-size: 0.82rem; color: var(--text-muted); }
.footer-copy a { color: var(--text-dim); }
.footer-copy a:hover { color: var(--text); }

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* ── Project detail page ──────────────────────────────── */
.project-main {
  min-height: calc(100vh - var(--nav-h) - 80px);
  padding-bottom: 4rem;
}

.project-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.project-breadcrumb {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.project-breadcrumb a { color: var(--text-muted); }
.project-breadcrumb a:hover { color: var(--text); text-decoration: none; }
.project-breadcrumb span { color: var(--border-light); margin: 0 0.35rem; }

.project-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.project-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.project-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.project-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.project-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  margin: 1.5rem 0 0.5rem;
}
.project-section p,
.project-content p { color: var(--text-dim); line-height: 1.8; margin-bottom: 0.75rem; }

.project-section ol,
.project-section ul,
.project-content ol,
.project-content ul {
  padding-left: 1.5rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.project-section li,
.project-content li { margin-bottom: 0.3rem; }

.project-content strong { color: var(--text); font-weight: 600; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 4rem 1.25rem 3rem; }
  .section { padding: 3rem 1.25rem; }
  .nav-links { gap: 1.25rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.5rem 1rem; }
}
