:root {
  --paper: #faf8f4;
  --paper-2: #f3efe7;
  --surface: #ffffff;
  --ink: #16202f;
  --ink-2: #414b5c;
  --muted: #6b7384;
  --line: #e4dfd5;
  --navy: #12284a;
  --navy-2: #1c3862;
  --navy-deep: #0c1c35;
  --gold: #b08d57;
  --gold-soft: #efe5d4;
  --gold-ink: #7d6035;
  --ok: #1f7a4d;
  --err: #b3261e;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(18, 40, 74, 0.06), 0 8px 24px rgba(18, 40, 74, 0.06);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.icon { flex: none; }
.nowrap { white-space: nowrap; }

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

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); }
.btn--ghost { border-color: var(--line); color: var(--navy); background: var(--surface); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--gold { background: var(--gold); color: #1a1407; }
.btn--gold:hover { background: #c29e67; }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-ink);
  font: 600 11px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; vertical-align: middle;
}
.pill--muted { background: var(--paper-2); color: var(--muted); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--navy); color: #fff; font: 600 14px/1 var(--serif); letter-spacing: .04em;
}
.brand__name { font: 600 16px/1 var(--sans); color: var(--navy); }
.nav__links { display: flex; gap: 26px; }
.nav__links a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 6px 0; }
.nav__links a:hover { color: var(--navy); }
.nav__toggle { display: none; background: none; border: 0; color: var(--navy); padding: 6px; cursor: pointer; }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 24px;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: #2e9e63; box-shadow: 0 0 0 4px rgba(46, 158, 99, .15); }
.hero__name {
  font: 500 clamp(40px, 5.6vw, 64px)/1.05 var(--serif);
  color: var(--navy); letter-spacing: -0.02em; font-variation-settings: 'opsz' 144;
}
.hero__headline {
  margin-top: 18px; font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink);
}
.hero__tagline { margin-top: 18px; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 38em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: 14.5px; color: var(--muted); }
.hero__meta li, .hero__meta a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.hero__meta a:hover { color: var(--navy); }

.hero__photo { margin: 0 auto; width: 100%; max-width: 310px; }
.hero__frame { position: relative; }
.hero__frame::before {
  content: ''; position: absolute; inset: -14px;
  border: 1.5px solid var(--gold); border-radius: 30px;
}
.hero__frame img {
  position: relative; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%;
  border-radius: 22px; box-shadow: var(--shadow); background: var(--paper-2);
}
.hero__photo--circle .hero__frame::before, .hero__photo--circle img { border-radius: 50%; }
.hero__badge {
  position: relative; margin: -34px auto 0; width: max-content; max-width: 280px; text-align: center;
  display: grid; gap: 2px; padding: 12px 18px; border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.hero__badge strong { color: var(--navy); font-size: 15px; line-height: 1.3; }
.hero__badge-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }

/* Stats */
.stats { background: var(--navy); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { padding: 34px 24px; border-left: 1px solid rgba(255, 255, 255, .12); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value { font: 500 44px/1 var(--serif); color: #e6cfa6; letter-spacing: -0.01em; }
.stat__label { margin-top: 10px; font-weight: 600; font-size: 15px; }
.stat__detail { margin-top: 2px; font-size: 13.5px; color: rgba(255, 255, 255, .66); }

/* Sections */
.section { padding: 88px 0; }
.section--tint { background: var(--paper-2); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px; }
.section__title { font: 500 clamp(28px, 3.4vw, 38px)/1.15 var(--serif); color: var(--navy); letter-spacing: -0.01em; margin-bottom: 34px; }

.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.prose p { color: var(--ink-2); font-size: 17px; }
.prose p + p { margin-top: 16px; }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.facts__title { font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.facts dl { margin: 0; display: grid; gap: 16px; }
.facts dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0 24px; font-weight: 500; color: var(--ink); }
.facts__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 600; font-size: 14.5px; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }

/* Timeline */
.timeline { position: relative; display: grid; gap: 18px; }
.job {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px;
}
.job--current { border-color: #d8c49f; box-shadow: var(--shadow); }
.job__when { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.job__title { font: 500 22px/1.25 var(--serif); color: var(--navy); }
.job__company { margin-top: 4px; font-weight: 600; color: var(--ink-2); }
.job__loc { font-weight: 400; color: var(--muted); }
.job__points { margin-top: 16px; display: grid; gap: 8px; }
.job__points li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.job__points li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 7px; height: 1.5px; background: var(--gold); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skills__group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.skills__group--wide { grid-column: 1 / -1; }
.skills__group h3 { font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 14.5px; font-weight: 500; color: var(--ink); }

/* Education & certs */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.edu--single { grid-template-columns: 1fr; max-width: 760px; }
.cards, .certs { display: grid; gap: 14px; }
.card { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-ink); flex: none; }
.card h3, .cert h3 { font: 600 16.5px/1.35 var(--sans); color: var(--ink); }
.card__meta { margin-top: 3px; font-size: 14.5px; color: var(--muted); }
.card__detail { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.cert { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
.cert__link { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.cert__link:hover { text-decoration: underline; }

/* Contact */
.contact { background: var(--navy-deep); color: #fff; }
.contact .section__title { color: #fff; }
.eyebrow--light { color: #d9bd8c; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact__grid--single { grid-template-columns: 1fr; max-width: 880px; }
.contact__grid--single .contact__list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.contact__lead { color: rgba(255, 255, 255, .75); font-size: 17px; margin-top: -14px; }
.contact__list { display: grid; gap: 10px; margin-top: 28px; }
.contact__list a {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12);
  transition: background-color .18s ease, border-color .18s ease;
}
.contact__list a:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .25); }
.contact__list .icon { color: #d9bd8c; }
.contact__list span { display: grid; font-weight: 500; overflow-wrap: anywhere; }
.contact__list small { font-size: 12px; color: rgba(255, 255, 255, .6); font-weight: 500; }

.form { background: var(--surface); color: var(--ink); border-radius: 18px; padding: 30px; display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.form .opt { font-weight: 400; color: var(--muted); }
.form input, .form textarea {
  width: 100%; font: 400 16px/1.5 var(--sans); color: var(--ink);
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18, 40, 74, .12); background: #fff; }
.form textarea { resize: vertical; min-height: 130px; }
.form .btn { justify-self: start; }
.form__status { font-size: 14.5px; min-height: 1.4em; }
.form__status.is-ok { color: var(--ok); font-weight: 600; }
.form__status.is-error { color: var(--err); font-weight: 600; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { background: var(--navy-deep); color: rgba(255, 255, 255, .6); font-size: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.footer__links { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: #1f9d55; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  transition: transform .18s ease;
}
.wa-float:hover { transform: scale(1.06); }

/* Responsive */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__photo { max-width: 270px; }
  .about, .contact__grid, .edu { grid-template-columns: 1fr; gap: 40px; }
  .skills { grid-template-columns: 1fr 1fr; }
  .job { grid-template-columns: 1fr; gap: 10px; }
  .job__when { flex-direction: row; align-items: center; }
}

@media (max-width: 760px) {
  .nav__links {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; gap: 0; padding: 8px 24px 16px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__toggle { display: block; }
  .nav__inner { gap: 12px; }
  .brand__name { display: none; }
  .stat { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); padding: 24px 0; }
  .stat:first-child { border-top: 0; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 32px 0 56px; }
  .hero__tagline { font-size: 16.5px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__name { font-size: 38px; }
  .hero__photo { max-width: 230px; margin-top: 10px; }
  .hero__frame::before { inset: -10px; }
  .stats__grid { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .stat { padding: 22px 0; }
  .stat:nth-child(2) { border-top: 0; }
  .stat__value { font-size: 36px; }
  .section { padding: 64px 0; }
  .skills { grid-template-columns: 1fr; }
  .job { padding: 22px 20px; }
  .form { padding: 22px 18px; }
  .form__row { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
  .cert { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wa-float { width: 50px; height: 50px; right: 16px; bottom: 16px; }
}

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

/* Print: the page prints as a clean CV */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .nav, .hero__actions, .hero__photo, .wa-float, .form, .footer, .facts__link, .skip, .contact__lead { display: none !important; }
  .hero, .section { padding: 10pt 0; }
  .stats, .contact, .section--tint { background: none; color: var(--ink); }
  .stat__value { color: var(--navy); }
  .stat__detail, .contact__list small { color: var(--muted); }
  .contact .section__title { color: var(--navy); }
  .hero__grid, .about, .edu, .contact__grid { grid-template-columns: 1fr; gap: 12pt; }
  .job, .card, .cert, .skills__group, .facts { box-shadow: none; break-inside: avoid; }
  .contact__list a { border: 0; padding: 2pt 0; }
}
