/* =============================================
   Design tokens
   ============================================= */
:root {
  --bg: #0a0a0f;
  --bg-alt: #0f0f18;
  --surface: #16161f;
  --border: #1e1e2e;
  --text: #e2e2f0;
  --text-muted: #7878a0;
  --accent: #7c6af7;
  --accent-soft: rgba(124, 106, 247, 0.12);
  --link: #a89cf7;
  --radius: 12px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1100px;
  --narrow: 680px;
}

/* =============================================
   Reset & base
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent); }

/* =============================================
   Layout helpers
   ============================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: var(--narrow);
}

/* =============================================
   Header / Nav
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
}

.nav-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* =============================================
   Hero
   ============================================= */
.hero {
  padding: 120px 0 80px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 0%, #a89cf7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.hero-bio {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #6b59e8;
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   Sections
   ============================================= */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 40px;
  max-width: 600px;
}

/* =============================================
   Cards (Work)
   ============================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 99px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.card-links {
  display: flex;
  gap: 16px;
}

/* =============================================
   Post list (Writing)
   ============================================= */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.post-item:first-child { border-top: 1px solid var(--border); }

.post-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.post-title:hover { color: var(--accent); }

.post-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =============================================
   Contact
   ============================================= */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  width: fit-content;
}
.contact-item:hover { color: var(--accent); }

/* =============================================
   Icons
   ============================================= */
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =============================================
   Links (inline)
   ============================================= */
.link {
  color: var(--link);
  font-weight: 500;
  transition: color 0.2s;
}
.link:hover { color: var(--accent); }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 80px 0 60px; }
  .post-item { flex-direction: column; gap: 4px; }
  .post-meta { order: -1; }
}
