:root {
  --bg: #0b0d10;
  --bg-elevated: #14171b;
  --bg-elevated-2: #1b1f24;
  --text: #e8eaed;
  --text-muted: #9aa2ad;
  --accent: #5cc8ff;
  --accent-dim: rgba(92, 200, 255, 0.14);
  --border: #23272d;
  --max-width: 820px;
  --radius: 12px;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfa;
    --bg-elevated: #ffffff;
    --bg-elevated-2: #f2f3f4;
    --text: #1a1d21;
    --text-muted: #5b636e;
    --accent: #0072b1;
    --accent-dim: rgba(0, 114, 177, 0.08);
    --border: #e4e6e9;
    --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.12);
  }
}

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

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

/* ---------- Header ---------- */

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

header.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--text);
  background: var(--bg-elevated-2);
}

/* ---------- Hero ---------- */

main.wrap { padding-bottom: 160px; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  margin-top: 0;
  padding: 48px 0 8px;
}

.hero-photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-elevated);
  box-shadow: var(--shadow);
  justify-self: end;
}

.hero-intro .eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.hero h1 {
  font-size: 2.3rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.hero .tagline {
  color: var(--text-muted);
  font-size: 1.12rem;
  margin: 0 0 16px;
  max-width: 46ch;
}

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

.hero .location svg { width: 14px; height: 14px; opacity: 0.8; }

.social-links {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 11px;
  text-decoration: none;
  font-size: 0.87rem;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.social-links a svg { width: 15px; height: 15px; }

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */

section { margin-top: 72px; scroll-margin-top: 84px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 28px;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- About ---------- */

#about p { color: var(--text-muted); max-width: 62ch; }

/* ---------- Experience timeline ---------- */

.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

.entry {
  position: relative;
  margin-bottom: 36px;
  padding-bottom: 2px;
}

.entry:last-child { margin-bottom: 0; }

.entry::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.entry .entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.entry h3 {
  margin: 0;
  font-size: 1.03rem;
  letter-spacing: -0.01em;
}

.entry .org {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.entry .dates {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.entry ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.entry ul li { margin-bottom: 6px; }

/* ---------- Skills ---------- */

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.skills span {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

/* ---------- Blog ---------- */

.post-list { list-style: none; padding: 0; margin: 0; }

.post-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child { padding-top: 0; }

.post-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.post-list a:hover { color: var(--accent); }

.post-list .post-date {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

article.post h1 {
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

article.post .post-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

article.post p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 28px;
}

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

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer.site-footer .footer-social {
  display: flex;
  gap: 14px;
}

footer.site-footer .footer-social a {
  color: var(--text-muted);
  display: inline-flex;
}

footer.site-footer .footer-social a:hover { color: var(--accent); }

footer.site-footer .footer-social svg { width: 17px; height: 17px; }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 48px;
  }

  .hero-photo { justify-self: center; width: 128px; height: 128px; }

  .hero .location { justify-content: center; }

  .social-links { justify-content: center; }

  .timeline { padding-left: 22px; }

  .entry::before { left: -27px; }

  nav.site-nav a { padding: 6px 9px; font-size: 0.85rem; }
}
