:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #16191d;
  --text-muted: #5c646e;
  --text-faint: #858d97;
  --border: #e3e2dd;
  --accent: #1f6f5c;
  --accent-soft: #e8f1ee;
  --chip-bg: #f2f1ec;
  --shadow: 0 1px 2px rgba(20, 24, 28, .05), 0 8px 24px rgba(20, 24, 28, .04);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101316;
    --surface: #171b1f;
    --text: #e8eaec;
    --text-muted: #9aa3ad;
    --text-faint: #767f89;
    --border: #262b31;
    --accent: #5cc5a7;
    --accent-soft: #16302a;
    --chip-bg: #1e2429;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  --bg: #101316;
  --surface: #171b1f;
  --text: #e8eaec;
  --text-muted: #9aa3ad;
  --text-faint: #767f89;
  --border: #262b31;
  --accent: #5cc5a7;
  --accent-soft: #16302a;
  --chip-bg: #1e2429;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: .5rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ---- hero ---- */

.hero {
  padding: clamp(3rem, 9vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 .75rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  font-weight: 700;
}

.tagline {
  margin: .5rem 0 0;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 500;
}

.summary {
  margin: 1.5rem 0 0;
  max-width: 38rem;
  color: var(--text-muted);
}

/* ---- buttons ---- */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .925rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
:root[data-theme="dark"] .btn-primary,
.btn-primary { color: #fff; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { color: #0c1512; }
}

.btn-ghost { background: transparent; color: var(--text-muted); }

/* ---- sections ---- */

main { padding: clamp(2rem, 5vw, 3rem) 16px; }

section + section { margin-top: clamp(2.5rem, 6vw, 3.5rem); }

h2 {
  margin: 0 0 1.5rem;
  font-size: .8rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

h3.sub {
  margin: 2rem 0 .85rem;
  font-size: .9rem;
  color: var(--text-muted);
}

.entry + .entry { margin-top: 2rem; }

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem 1rem;
}

.dates {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.role {
  margin: .15rem 0 0;
  color: var(--accent);
  font-size: .95rem;
  font-weight: 500;
}

.muted { color: var(--text-faint); font-weight: 400; }

.bullets {
  margin: .85rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}
.bullets li { margin-bottom: .5rem; }
.bullets li::marker { color: var(--text-faint); }

.certs { list-style: none; margin: 0; padding: 0; }
.certs li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .6rem;
  padding: .7rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.certs .status { color: var(--text-faint); font-size: .85rem; }

/* ---- skills ---- */

.skills { margin: 0; }

.skill-group {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: .5rem 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}
.skill-group:last-child { border-bottom: none; }

.skill-group dt {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-faint);
  padding-top: .2rem;
}

.skill-group dd { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-group dd.plain { display: block; color: var(--text-muted); font-size: .95rem; }

.chip {
  display: inline-block;
  padding: .22rem .65rem;
  border-radius: 6px;
  background: var(--chip-bg);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
}

/* ---- contact ---- */

.contact {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--accent-soft);
  border-radius: 14px;
}
.contact h2 { border: none; padding: 0; margin-bottom: .5rem; }
.contact p { margin: 0; color: var(--text-muted); max-width: 32rem; }

footer {
  padding: 2.5rem 16px 3rem;
  color: var(--text-faint);
  font-size: .85rem;
}

.notfound { padding: 6rem 16px; }

/* ---- small screens ---- */

@media (max-width: 34rem) {
  .skill-group { grid-template-columns: 1fr; gap: .4rem; }
  .skill-group dt { padding-top: 0; }
  .dates { white-space: normal; }
}

/* ---- print / save as PDF ---- */

@media print {
  :root {
    --bg: #fff; --surface: #fff; --text: #000; --text-muted: #222;
    --text-faint: #555; --border: #ccc; --accent: #000;
    --accent-soft: #fff; --chip-bg: #fff;
  }
  body { font-size: 10.5pt; line-height: 1.4; }
  .wrap { max-width: none; padding: 0; }
  .hero { padding: 0 0 .75rem; }
  main { padding: .75rem 0 0; }
  h1 { font-size: 22pt; }
  .links, .skip, footer, .btn { display: none !important; }
  .contact { display: none; }
  .chip { border: 1px solid #ccc; padding: .05rem .35rem; }
  section + section { margin-top: 1.1rem; }
  .entry, section { break-inside: avoid; }
  .summary { max-width: none; }
}
