:root {
  --bg:        #0f172a;
  --bg-card:   #1e293b;
  --bg-subtle: #1e2d40;
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --accent:    #818cf8;
  --accent-dim:#6366f1;
  --rule:      #1e293b;
  --font-serif: ui-serif, Georgia, 'Palatino Linotype', serif;
  --font-sans:  system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Mono', 'Consolas', 'Courier New', monospace;
}

*, *::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.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--rule);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

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

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

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

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

/* ── Hero ── */
#hero {
  padding: 140px 0 100px;
  border-bottom: 1px solid var(--rule);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  font-weight: 300;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  font-weight: 600;
}

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

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

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

/* ── Section shared ── */
section {
  padding: 80px 0;
  border-bottom: 1px solid var(--rule);
}

section:last-child { border-bottom: none; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  color: var(--text);
}

/* ── Projects ── */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.project-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  position: relative;
}

.project-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.project-item::before {
  content: '';
  position: absolute;
  left: -2rem; right: -2rem; top: 0; bottom: 0;
  background: var(--bg-card);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.project-item:hover::before { opacity: 1; }

.project-info { position: relative; z-index: 1; }

.project-name {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.project-name .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
  max-width: 480px;
}

.project-arrow {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-dim);
  padding-top: 0.15rem;
  transition: color 0.2s, transform 0.2s;
  white-space: nowrap;
}

.project-item:hover .project-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.skill-cell {
  background: var(--bg);
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.15s;
}

.skill-cell:hover {
  background: var(--bg-subtle);
}

.skill-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
  color: var(--accent);
}

.skill-icon svg {
  width: 22px;
  height: 22px;
}

.skill-icon-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.skill-name {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Footer ── */
footer {
  padding: 3rem 0;
}

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

.footer-sig {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-sig span {
  color: var(--accent);
  font-weight: 700;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--accent); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.15s; }
.fade-up:nth-child(3) { animation-delay: 0.25s; }
.fade-up:nth-child(4) { animation-delay: 0.35s; }
.fade-up:nth-child(5) { animation-delay: 0.45s; }

/* ── Icons ── */
.github-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 3px;
  padding: 2px;
  flex-shrink: 0;
}

/* ── Prose ── */
.prose {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  font-weight: 300;
}

.prose h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
}

.prose p { margin-bottom: 1rem; }

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

.prose a {
  color: var(--accent);
  text-decoration: none;
}

.prose a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 560px) {
  .nav-links { display: none; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  #hero { padding: 110px 0 70px; }
  .footer-inner { flex-direction: column; }
}
