/* ---------- Design tokens ---------- */
:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --bg-card: #1a212c;
  --border: #2a3340;
  --text: #e6edf3;
  --text-muted: #9aa7b4;
  --accent: #4f9cf9;
  --accent-soft: rgba(79, 156, 249, 0.12);
  --radius: 14px;
  --maxw: 1040px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(13, 17, 23, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand-dot { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 28px; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }

/* ---------- Hero ---------- */
.hero { padding: 110px 24px 90px; max-width: 820px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--accent); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1;
  letter-spacing: -0.03em; font-weight: 700; margin-bottom: 24px;
}
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.12s, background 0.15s, border-color 0.15s; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #061018; }
.btn-primary:hover { background: #6fb0ff; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 70px 24px; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 1.8rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.section-head p { color: var(--text-muted); }

/* ---------- Work grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column;
  transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-tag {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 20px; align-self: flex-start; margin-bottom: 16px;
}
.card h3 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.97rem; flex-grow: 1; }
.card-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.card-meta li {
  font-family: var(--mono); font-size: 0.75rem; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px;
}
.card-link { color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.card-link:hover { text-decoration: underline; }

/* ---------- About / stack / contact ---------- */
.about-body { max-width: 720px; display: grid; gap: 18px; color: var(--text-muted); font-size: 1.05rem; }
.about-body p strong, .about-body p { color: var(--text-muted); }

.stack { display: flex; flex-wrap: wrap; gap: 12px; }
.stack span {
  font-family: var(--mono); font-size: 0.85rem; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
}

.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Project detail pages ---------- */
.detail-hero { padding: 80px 24px 50px; max-width: 760px; }
.back-link { display: inline-block; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.back-link:hover { color: var(--accent); }
.detail-hero .card-tag { display: inline-block; margin-bottom: 18px; }
.detail-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.03em; margin-bottom: 18px; }
.detail-hero .lede { font-size: 1.15rem; color: var(--text-muted); }

.detail-section { padding: 24px 24px 0; max-width: 760px; }
.detail-section h2 { font-size: 1.4rem; letter-spacing: -0.02em; margin: 36px 0 14px; }
.detail-section p { color: var(--text-muted); margin-bottom: 14px; }
.detail-section ul.feature-list { list-style: none; display: grid; gap: 12px; margin: 8px 0 8px; }
.detail-section ul.feature-list li {
  position: relative; padding-left: 26px; color: var(--text-muted);
}
.detail-section ul.feature-list li::before {
  content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.detail-cta { padding: 40px 24px 80px; max-width: 760px; }
.detail-note {
  font-size: 0.85rem; color: #6a7480; border-left: 2px solid var(--border);
  padding: 6px 0 6px 14px; margin-top: 20px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 24px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.9rem; }
.footer-muted { color: #6a7480; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-soft);
    border-bottom: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height 0.25s;
  }
  .nav-links.open { max-height: 280px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px 24px; border-top: 1px solid var(--border); }
  .grid { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; gap: 8px; text-align: center; }
}
