:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #15181d;
  --muted: #5b6270;
  --line: #e4e4de;
  --accent: #0f6b62;
  --accent-soft: #e3f1ee;
  --radius: 12px;
  --max: 980px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --surface: #171b21;
    --ink: #e8eaed;
    --muted: #9aa3b0;
    --line: #262c35;
    --accent: #4fc1b1;
    --accent-soft: #15302d;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; line-height: 1.2; margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Nav */
header.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; font-size: 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
nav a:hover, nav a.active { color: var(--ink); text-decoration: none; }

/* Hero */
.hero { padding: 88px 0 56px; }
.hero-id { display: flex; align-items: center; gap: 24px; }
.avatar {
  width: 112px; height: 112px; flex: none;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0,0,0,.08);
}
@media (max-width: 760px) {
  .hero-id { flex-direction: column; align-items: flex-start; gap: 18px; }
  .avatar { width: 88px; height: 88px; }
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 600; letter-spacing: -0.01em; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 680px; margin: 20px 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: 15px;
  border: 1px solid var(--line); color: var(--ink); background: var(--surface);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0b1a18; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 22px 20px; }
.stat b { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 30px; font-weight: 600; color: var(--accent); }
.stat span { color: var(--muted); font-size: 14px; }

/* Sections */
section { padding: 64px 0 8px; }
section > .wrap > h2 { font-size: 28px; font-weight: 600; margin-bottom: 28px; }
.muted { color: var(--muted); }

/* Experience */
.job { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.job .when { color: var(--muted); font-size: 14px; }
.job .when .place { display: block; margin-top: 2px; }
.job h3 { font-size: 20px; font-weight: 600; }
.job h3 .co { color: var(--accent); }
.job ul { margin: 12px 0 0; padding-left: 18px; }
.job li { margin: 6px 0; }
.job li strong { font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }

/* Education */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card ul { margin: 0; padding-left: 18px; }
.card li { margin: 5px 0; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project { display: flex; flex-direction: column; }
.project .status { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.project h3 { font-size: 20px; margin-bottom: 8px; }
.project p { margin: 0 0 12px; color: var(--muted); }
.project .links { margin-top: auto; padding-top: 14px; display: flex; gap: 16px; font-size: 14.5px; font-weight: 500; }
.page-head { padding: 72px 0 32px; }
.page-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 600; }
.page-head p { color: var(--muted); max-width: 640px; font-size: 18px; margin-top: 14px; }

/* Footer */
footer { margin-top: 80px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Mobile */
@media (max-width: 760px) {
  nav ul { gap: 14px; }
  nav li.hide-sm { display: none; }
  .hero { padding: 56px 0 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .skills, .two, .projects { grid-template-columns: 1fr; }
}
