@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;600&display=swap');

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

:root {
  --bg: #0d0f12;
  --surface: #161a20;
  --border: #2a2f38;
  --accent: #4af7c4;
  --accent-dim: #1a3d33;
  --text: #e2e8f0;
  --muted: #637089;
  --substack: #4af7c4;
  --hackernoon: #c8a84b;
  --linkedin: #637089;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

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

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }

/* ── SECTIONS ── */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before { content: '//'; color: var(--accent); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── HERO ── */
#hero {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero-name {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  margin-left: 0.1em;
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-title {
  font-family: var(--mono);
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-bio {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-bio strong { color: var(--text); font-weight: 500; }

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 3px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

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

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

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── PROJECT CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s;
  text-decoration: none;
  color: inherit;
}

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

.card-name {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-arrow {
  color: var(--muted);
  font-size: 1rem;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.card:hover .card-arrow { color: var(--accent); transform: translate(2px, -2px); }

.card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.2rem 0.5rem;
}

/* ── ARTICLES ── */
.article-list { display: flex; flex-direction: column; gap: 0; }

.article-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
  border-radius: 2px;
}

.article-row:first-child { border-top: 1px solid var(--border); }
.article-row:hover .article-title { color: var(--accent); }

.pub-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 90px;
  flex-shrink: 0;
}

.pub-badge.Substack { color: var(--substack); }
.pub-badge.Hackernoon { color: var(--hackernoon); }
.pub-badge.LinkedIn { color: var(--linkedin); }

.article-body { flex: 1; min-width: 0; }

.article-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
  margin-bottom: 0.2rem;
}

.article-summary {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.about-block h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.about-block p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
}

.about-block p + p { margin-top: 0.75rem; }

.about-block strong { color: var(--text); font-weight: 500; }

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.stack-list li {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.25rem 0.6rem;
}

/* ── RESUME ── */
#resume {
  border-top: 1px solid var(--border);
}

.resume-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.resume-text h2 {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.resume-text p {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.footer-copy a { color: var(--muted); text-decoration: none; }
.footer-copy a:hover { color: var(--accent); }

.footer-claude {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-claude span { color: var(--accent); }

.back-top {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.back-top:hover { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }
  .nav-links { gap: 1.25rem; }
  section { padding: 3.5rem 1.25rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .article-summary { display: none; }
  .resume-inner { flex-direction: column; align-items: flex-start; }
  footer { padding: 2rem 1.25rem; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .pub-badge { width: 70px; }
}

