/* Site styles. Type: Inter. Light/dark via data-theme or system setting. */
:root {
  --bg: #fafaf7; --surface: #ffffff; --text: #142120; --muted: #566766; --line: #e3e8e4;
  --brand: #0f766e; --brand-strong: #0b5953; --on-brand: #ffffff; --accent: #b45309;
  --chip: #edf4f1; --shadow: 0 1px 2px rgba(16,32,30,.04), 0 8px 24px rgba(16,32,30,.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px; --measure: 68ch; --wrap: 960px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1514; --surface: #131c1b; --text: #e6eeec; --muted: #93a9a6; --line: #233533;
  --brand: #2dd4bf; --brand-strong: #5eead4; --on-brand: #06201d; --accent: #fbbf24;
  --chip: #16312e; --shadow: none; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1514; --surface: #131c1b; --text: #e6eeec; --muted: #93a9a6; --line: #233533;
    --brand: #2dd4bf; --brand-strong: #5eead4; --on-brand: #06201d; --accent: #fbbf24;
    --chip: #16312e; --shadow: none; color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--font); font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.75rem); font-weight: 650; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: .4em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
ul { padding-left: 1.15rem; margin: 0 0 1em; }
li { margin: .35rem 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.125rem, 2vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); margin: 0 0 .9rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-brand); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }


/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); }
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.brand { font-weight: 650; letter-spacing: -0.02em; color: var(--text); text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a {
  display: block; padding: .45rem .8rem; border-radius: 999px; font-size: .9375rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
}
.nav-links a:hover { color: var(--text); background: var(--chip); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--chip); }
.icon-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  width: 2.25rem; height: 2.25rem; border-radius: 999px; font-size: 1rem; cursor: pointer; line-height: 1;
}
.icon-btn:hover { border-color: var(--brand); }
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; row-gap: .25rem; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: .15rem; }
  .nav-links a { padding: .4rem .7rem; white-space: nowrap; }
}

/* Sections */
main { display: block; }
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; }
.hero { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 6vw, 3.5rem); }
.hero h1 { max-width: 16ch; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1.15rem; border-radius: 999px;
  font: 600 .9375rem var(--font); text-decoration: none; border: 1px solid var(--brand); cursor: pointer;
  background: var(--brand); color: var(--on-brand);
}
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.btn.secondary { background: transparent; color: var(--brand); }
.btn.secondary:hover { background: var(--chip); color: var(--brand-strong); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--brand); text-decoration: underline; }
.card .meta { font-size: .8125rem; color: var(--muted); margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips li { margin: 0; }
.chip { display: inline-block; background: var(--chip); color: var(--text); border-radius: 999px; padding: .3rem .8rem; font-size: .875rem; font-weight: 500; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.text-link { font-weight: 600; font-size: .9375rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Blog */
.featured { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: center; padding: 0; overflow: hidden; }
.featured .body { padding: 1.5rem; }
.featured img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--chip); }
@media (min-width: 760px) { .featured { grid-template-columns: 1.1fr 1fr; } .featured .body { padding: 2rem 2rem 2rem 0; } }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin: 0; padding: 1.1rem 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.post-list a { font-weight: 600; color: var(--text); text-decoration: none; }
.post-list a:hover { color: var(--brand); }
.post-list time { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }

/* Resume */
.resume-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: flex-end; }
.contact-line { color: var(--muted); margin: 0; }
.job { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.job-head { display: flex; justify-content: space-between; gap: .25rem 1rem; flex-wrap: wrap; align-items: baseline; margin-bottom: .6rem; }
.job-head h3 { margin: 0; }
.job-org { color: var(--muted); font-weight: 500; }
.job-date { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.job .env { font-size: .9rem; color: var(--muted); }
.rd-item { margin-bottom: 1rem; }
.rd-item strong { display: block; }
details.certs { margin-top: .5rem; }
details.certs summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: .4rem 0; }
.cert-list { list-style: none; padding: 0; }
.cert-list li { padding: .5rem 0; border-top: 1px solid var(--line); margin: 0; }
.cert-list small { display: block; color: var(--muted); }

/* FAQ */
.faq-card { margin:.5rem 0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface); }
.faq-card summary { padding:.75rem 1rem;font-weight:600;cursor:pointer;list-style:none;background:var(--bg);color:var(--text); }
.faq-card p { margin:.75rem 1rem;color:var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

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

/* Print (used by the resume "Print / Save as PDF" button) */
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --text: #000; --muted: #333; --line: #bbb; --brand: #0b5953; --chip: #fff; --shadow: none;
    color-scheme: light;
  }
  body { font-size: 10.5pt; line-height: 1.45; }
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  .wrap { width: 100%; }
  .section, .page-head { padding: .6rem 0; }
  h1 { font-size: 22pt; } h2 { font-size: 13pt; margin-top: .8rem; } h3 { font-size: 11pt; }
  .job, .card, .rd-item { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .chip { border: 1px solid #bbb; }
}
