:root {
  --bg: #fcfcfd;
  --bg-alt: #f5f6f8;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5f6672;
  --line: #e6e8ec;
  --accent: #0f766e;
  --accent-soft: #e6f2f0;
  --radius: 14px;
  --max: 1040px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

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

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 650; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 620; }
h3 { font-size: 1.15rem; font-weight: 620; }

p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--text); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 252, 253, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  font-family: var(--mono); font-size: 0.95rem; font-weight: 600;
  color: var(--text); letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); margin-right: 0.2rem; }

.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-size: 0.93rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.95rem; background: var(--surface);
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav-toggle { display: none; }

/* Hero */
.hero { padding: clamp(4rem, 12vw, 7.5rem) 0 3.5rem; }

.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem;
}

.accent { color: var(--accent); }

.aka {
  font-family: var(--mono); font-size: 0.62em; color: var(--muted);
  font-weight: 500; letter-spacing: -0.01em;
}

.hero-grid {
  display: grid; grid-template-columns: 1fr auto;
  gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center;
}

.avatar {
  width: clamp(220px, 32vw, 400px); height: auto; aspect-ratio: 1;
  border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(22, 24, 29, 0.12);
}

/* Feature strip */
.grid.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem; margin-top: 3rem;
}
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
}
.feature-num {
  font-family: var(--mono); font-size: 0.75rem; color: var(--accent);
  letter-spacing: 0.1em; display: block; margin-bottom: 0.5rem;
}
.feature p { margin: 0; font-size: 0.95rem; }

.lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); max-width: 62ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }

.btn {
  display: inline-block; padding: 0.65rem 1.3rem; border-radius: 999px;
  font-size: 0.93rem; font-weight: 550; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  list-style: none; padding: 0; margin: 3.5rem 0 0;
}
.hero-stats li { background: var(--surface); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.15rem; }
.stat-num { font-family: var(--mono); font-weight: 600; color: var(--accent); font-size: 0.85rem; letter-spacing: 0.08em; }
.stat-label { font-size: 0.9rem; color: var(--muted); }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.prose p { color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }

/* Cards */
.grid.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.grid.cards.cards-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: #cfd3da; transform: translateY(-2px); }

.ticks { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 0.95rem; }
.ticks li { position: relative; padding-left: 1.15rem; margin-bottom: 0.45rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

.tools { margin-top: 2.5rem; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.tool-tags li {
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.3rem 0.7rem; border-radius: 999px;
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item {
  display: grid; grid-template-columns: 240px 1fr; gap: clamp(1rem, 4vw, 3rem);
  padding: 1.75rem 0; border-top: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.timeline-role { font-weight: 620; }
.timeline-org { color: var(--accent); font-size: 0.95rem; }
.timeline-date { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.timeline-body p { color: var(--muted); }

/* Projects */
.project-tag {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem;
}
.project h3 a { color: var(--text); }
.project h3 a:hover { color: var(--accent); text-decoration: none; }
.project p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* Contact */
.contact h2 { max-width: 18ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; font-size: 0.87rem; color: var(--muted); }
.footer-inner a { font-size: 0.87rem; }

/* Responsive */
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }

  .hero-grid { grid-template-columns: 1fr; }
  .avatar { order: -1; width: clamp(180px, 45vw, 240px); }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0;
    background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); margin-inline: auto; transition: transform 0.2s ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.7rem 0; }
  .nav-cta { text-align: center; margin-top: 0.4rem; }
}

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