:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242736;
  --border: #2e3347;
  --accent: #6c63ff;
  --accent-soft: rgba(108,99,255,0.12);
  --text: #e6e8f0;
  --text-muted: #8b90a7;
  --text-dim: #5a5f7a;
  --green: #3ecf8e;
  --radius: 12px;
  --ease: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

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

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

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

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--ease), background var(--ease);
}

.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--accent); }

/* ── HERO ── */
.hero {
  padding: 72px 24px 60px;
  text-align: center;
}

.hero-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #e6e8f0 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.hero-bio {
  max-width: 480px;
  margin: 12px auto 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all var(--ease);
}

.hero-links a:hover { border-color: var(--accent); color: var(--accent); }
.hero-links svg { width: 14px; height: 14px; fill: currentColor; }

/* ── QUICK NAV ── */
.quicknav {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 24px 40px;
}

.quicknav-link {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--ease);
}

.quicknav-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ── SECTION LABEL ── */
.section-label {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* ── PROJECT GRID ── */
.project-grid {
  max-width: 1000px;
  margin: 0 auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 20px;
}

/* ── TIMELINE ── */
.timeline {
  max-width: 1000px;
  margin: 0 auto 16px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: calc(24px + 7px);
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 28px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.timeline-body {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--ease);
}

.timeline-body:hover { border-color: var(--accent); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-company {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-role {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 2px;
}

.timeline-meta { text-align: right; flex-shrink: 0; }

.timeline-period {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-location {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.timeline-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-points li {
  position: relative;
  padding-left: 16px;
  font-size: 0.835rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.timeline-points li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.2;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 600px) {
  .timeline::before { left: calc(24px + 7px); }
  .timeline-meta { text-align: left; }
}

/* ── PROJECT CARD ── */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
  animation: fadeUp 0.4s ease both;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px var(--accent-soft);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.project-card:nth-child(2) { animation-delay: 60ms; }
.project-card:nth-child(3) { animation-delay: 120ms; }
.project-card:nth-child(4) { animation-delay: 180ms; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.card-title-group { flex: 1; }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.card-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface2);
}

.tag.lang { border-color: currentColor; opacity: 0.85; }

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ease);
  border: 1px solid transparent;
}

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

.btn-primary:hover { background: #7b73ff; }

.btn-ghost {
  border-color: var(--border);
  color: var(--text-muted);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn svg { width: 13px; height: 13px; fill: currentColor; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

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

/* ── PROJECT PAGE ── */
.project-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  transition: color var(--ease);
}

.back-link:hover { color: var(--accent); }
.back-link svg { width: 14px; height: 14px; fill: currentColor; }

.project-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.project-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.project-header-info h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.project-header-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.project-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.project-header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-self: flex-start;
}

/* ── SECTIONS ── */
.prose-section {
  margin-bottom: 40px;
}

.prose-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prose-section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.prose-section p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.feature-list li::before {
  content: '→';
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tech-chip svg { width: 14px; height: 14px; fill: currentColor; }

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.use-case-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.use-case-card .uc-icon { font-size: 1.5rem; margin-bottom: 8px; }
.use-case-card h3 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.use-case-card p { font-size: 0.78rem; color: var(--text-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .project-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .project-header { gap: 14px; }
  .project-header-actions { margin-left: 0; }
}
