/* ---------- Design tokens ---------- */
:root {
  --bg: #0b0e14;
  --bg-elevated: #11151f;
  --bg-card: #141926;
  --border: #232a3a;
  --text: #e7eaf1;
  --text-dim: #9aa4b8;
  --text-faint: #6b7386;
  --accent: #7c8cff;
  --accent-2: #22d3ee;
  --radius: 12px;
  --max-width: 960px;
  --shadow: 0 10px 30px -12px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafc;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --border: #e6e8ee;
    --text: #14171f;
    --text-dim: #565f75;
    --text-faint: #8891a3;
    --accent: #4f5fe0;
    --accent-2: #0891b2;
    --shadow: 0 10px 30px -14px rgba(20,23,31,0.15);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.nav-brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--accent); }

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

/* ---------- Hero ---------- */
.hero {
  padding: 110px 24px 90px;
  max-width: 760px;
}

.hero-eyebrow {
  color: var(--accent-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--text-dim);
  margin: 0 0 20px;
  font-weight: 600;
}

.hero-tagline {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-links {
  color: var(--text-faint);
  font-size: 0.92rem;
}
.hero-links a {
  color: var(--text-dim);
  text-decoration: none;
}
.hero-links a:hover { color: var(--accent); }
.hero-links .dot { margin: 0 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); }

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

/* ---------- Sections ---------- */
.section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.6rem;
  margin: 0 0 28px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-num {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
}

.section-note {
  color: var(--text-faint);
  font-size: 0.92rem;
  margin: -16px 0 28px;
  max-width: 620px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-bio { color: var(--text-dim); margin: 0; }

.about-stack h3, .skill-group h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 14px;
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- Experience ---------- */
.experience-block + .experience-block {
  margin-top: 48px;
}

.experience-header {
  margin-bottom: 20px;
}

.experience-company {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.experience-meta {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* ---------- Projects ---------- */
.projects {
  display: grid;
  gap: 24px;
}

.project-card-placeholder {
  display: block;
  padding: 24px;
  color: var(--text-dim);
  box-shadow: none;
}
.project-card-placeholder .project-body { padding: 0; }
.project-card-placeholder p { margin: 0; }
.project-card-placeholder a { color: var(--accent); text-decoration: none; }
.project-card-placeholder a:hover { text-decoration: underline; }

.project-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.project-shot {
  background: linear-gradient(135deg, var(--from), var(--to));
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-shot-label {
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.project-body {
  padding: 24px 24px 24px 0;
}

.project-body h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
}

.project-role {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.project-body p {
  color: var(--text-dim);
  margin: 0 0 14px;
}

.tech-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 12px;
}

.tech-list li {
  font-size: 0.78rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
}

.project-note {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-style: italic;
  margin: 0 !important;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

/* ---------- Contact ---------- */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 640px;
  box-shadow: var(--shadow);
}

.contact-card p { color: var(--text-dim); margin-top: 0; }

.contact-links {
  margin-top: 20px;
  display: flex;
  gap: 20px;
}

.contact-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
}
.contact-links a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 24px 60px;
  color: var(--text-faint);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-shot { min-height: 100px; }
  .project-body { padding: 20px; }
  .contact-card { padding: 28px; }
}
