:root {
  --accent: #0284c7;
  --accent-dark: #075985;
  --accent-soft: #e0f2fe;
  --accent-line: #7dd3fc;
  --bg: #f8fbfd;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --pill: #f1f5f9;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

a { color: inherit; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.2; margin: 0; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--text);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 100;
}
.skip:focus { left: 8px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 251, 253, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}
.brand:hover { color: var(--text); }
.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
}
.nav-links {
  display: flex;
  gap: 24px;
  margin-right: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-block { display: block; text-align: center; }

/* Profile header */
.profile {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 56px 0 40px;
}
.profile-logo {
  width: 96px;
  height: 96px;
  flex: none;
}
.profile h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tagline {
  margin: 8px 0 18px;
  font-size: 20px;
  color: var(--muted);
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--pill);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a35a;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  padding-bottom: 80px;
}
.block { padding: 32px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; padding-top: 0; }
.block h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}
.lead { font-size: 18px; margin-top: 0; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-label { font-size: 14px; color: var(--muted); }

/* Experience cards */
.card {
  padding: 24px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.card h3 { font-size: 18px; font-weight: 600; }
.card-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.date {
  flex: none;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.card ul { margin: 14px 0 0; padding-left: 20px; }
.card li { margin-bottom: 4px; }

/* Projects */
.section-intro { margin: -8px 0 8px; color: var(--muted); }
.subhead {
  margin: 28px 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.project {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.project-wide { grid-column: 1 / -1; }
.project:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}
.project-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.project-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; }
.status-live .dot { background: #22a35a; }
.status-wip .dot { background: #eab308; }
.project h3 { font-size: 17px; font-weight: 600; }
.project-tag { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.project p { margin-top: 0; font-size: 15px; }
.project .tags { margin-top: auto; }
.project-link {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.project-link:hover { color: var(--accent-dark); text-decoration: underline; }

.mini-list { margin: 0; padding: 0; list-style: none; }
.mini-list li {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.mini-list li:last-child { border-bottom: 0; }
.mini-list a, .mini-title { font-weight: 600; color: var(--text); }
.mini-list a { text-decoration: none; }
.mini-list a::after { content: " ↗"; color: var(--accent); }
.mini-list a:hover { color: var(--accent); }
.mini-list span:not(.mini-title) { color: var(--muted); }

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 2px 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 13px;
}

/* Skills */
.skills {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px 20px;
  margin: 0;
}
.skills dt { font-weight: 600; font-size: 14px; padding-top: 2px; }
.skills dd { margin: 0; }

/* Education */
.edu { margin: 0; padding: 0; list-style: none; }
.edu li {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.edu li:last-child { border-bottom: 0; }
.edu span { color: var(--muted); font-size: 15px; }

/* Sidebar */
.side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 88px;
}
.side-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.facts { margin: 0; }
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.facts div:first-child { padding-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 500; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.side-cta h2 { font-size: 18px; margin-bottom: 8px; }
.side-cta p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  font-size: 14px;
  color: var(--muted);
}
.footer p { margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side-col { position: static; order: -1; margin-bottom: 32px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .profile { flex-direction: column; gap: 18px; padding-top: 36px; }
  .profile h1 { font-size: 32px; }
  .tagline { font-size: 17px; }
  .stats { grid-template-columns: 1fr; }
  .card-top { flex-direction: column; gap: 4px; }
  .skills { grid-template-columns: 1fr; gap: 4px; }
  .grid { grid-template-columns: 1fr; }
  .mini-list li { grid-template-columns: 1fr; gap: 2px; }
  .skills dd { margin-bottom: 12px; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
