:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-alt: #eceae3;
  --text: #18202a;
  --muted: #5e6872;
  --faint: #858c93;
  --accent: #1f4f78;
  --accent-hover: #173c5b;
  --border: #cbc9c0;
  --header-bg: rgba(245, 244, 239, 0.94);
  --container: 1100px;
  --header-height: 64px;
}

html[data-theme="dark"] {
  --bg: #161a1e;
  --surface: #1d2227;
  --surface-alt: #20262c;
  --text: #edf0f2;
  --muted: #b1b8bf;
  --faint: #858e97;
  --accent: #8ab7dc;
  --accent-hover: #b2d2eb;
  --border: #3a4249;
  --header-bg: rgba(22, 26, 30, 0.94);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { top: 12px; }

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  text-decoration: none;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.desktop-nav { display: flex; align-items: center; gap: 24px; }
.desktop-nav a,
.mobile-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.desktop-nav a:hover,
.mobile-nav a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-button,
.menu-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.theme-button {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  font-size: 16px;
}
.menu-button {
  width: 38px;
  height: 34px;
  padding: 7px 8px;
  border-radius: 4px;
  display: none;
}
.menu-button span {
  display: block;
  height: 1px;
  margin: 4px 0;
  background: currentColor;
}
.mobile-nav {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  padding: 12px 20px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a { display: block; padding: 8px 0; }

.hero {
  padding: 70px 0 0;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 60px;
  align-items: center;
}
.overline {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-size: clamp(52px, 7vw, 86px);
  line-height: .93;
  letter-spacing: -.055em;
  font-weight: 760;
}
.hero-lead {
  max-width: 680px;
  margin: 28px 0 0;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.35;
  letter-spacing: -.02em;
}
.hero-detail {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--text);
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}
.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { opacity: .86; }
.button-secondary { color: var(--text); background: transparent; }
.button-secondary:hover { background: var(--surface-alt); }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}
.contact-links a { text-underline-offset: 3px; }
.hero-photo {
  --photo-size: 320px;
  width: var(--photo-size);
  margin: 0;
  justify-self: end;
}
.hero-photo-frame {
  width: var(--photo-size);
  height: var(--photo-size);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 35%;
}
.hero-photo figcaption {
  margin-top: 12px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: .05em;
  text-align: center;
  text-transform: uppercase;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 54px;
  border-top: 1px solid var(--border);
}
.facts > div {
  padding: 22px 18px 24px 0;
  border-right: 1px solid var(--border);
}
.facts > div:not(:first-child) { padding-left: 18px; }
.facts > div:last-child { border-right: 0; }
.facts strong {
  display: block;
  margin-bottom: 4px;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.03em;
}
.facts span { color: var(--muted); font-size: 12px; }

.section { padding: 62px 0; }
.section-tinted {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-grid {
  display: grid;
  grid-template-columns: minmax(230px, .62fr) minmax(0, 1.38fr);
  gap: 72px;
}
.section-heading h2 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(30px, 3.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 720;
}
.section-heading-wide { margin-bottom: 34px; }
.section-heading-wide h2 { max-width: 760px; }

.impact-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.impact-list article:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.item-number { color: var(--faint); font-size: 12px; font-weight: 750; }
.impact-list h3,
.work-list h3,
.experience-body h3,
.skills-list h3,
.credentials h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -.015em;
}
.impact-list p,
.work-list p,
.skills-list p,
.credentials p {
  margin: 8px 0 0;
  color: var(--muted);
}

.experience-list { border-top: 1px solid var(--border); }
.experience-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 42px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.experience-meta p { margin: 0; }
.date { font-size: 13px; font-weight: 750; }
.location { margin-top: 6px !important; color: var(--muted); font-size: 13px; }
.role-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.role-line span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.experience-body ul {
  margin: 12px 0 0;
  padding-left: 19px;
}
.experience-body li { margin: 5px 0; color: var(--muted); }
.experience-body li::marker { color: var(--accent); }

.work-list { border-top: 1px solid var(--border); }
.work-list article { padding: 22px 0; border-bottom: 1px solid var(--border); }
.work-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.work-title-row span { color: var(--faint); font-size: 12px; text-align: right; }

.skills-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.skills-list > div {
  min-height: 150px;
  padding: 22px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.skills-list h3 { font-size: 16px; }
.skills-list p { font-size: 14px; }
.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  margin-top: 34px;
}
.credentials > div { padding-top: 18px; border-top: 1px solid var(--border); }
.credentials h3 { font-size: 17px; }
.credentials p { font-size: 14px; }
.certification-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 24px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.certification-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.45;
}
.certification-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.contact-section { padding: 56px 0; background: var(--text); color: var(--bg); }
.contact-section .overline { color: var(--bg); opacity: .65; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
}
.contact-grid h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.contact-details { display: grid; gap: 8px; text-align: right; }
.contact-details a { color: var(--bg); text-underline-offset: 4px; }

.site-footer { padding: 22px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-inner a { text-underline-offset: 3px; }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-button { display: block; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-photo { --photo-size: 300px; width: var(--photo-size); justify-self: start; }
  .hero-photo img { object-position: center 35%; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div:nth-child(2) { border-right: 0; }
  .facts > div:nth-child(3), .facts > div:nth-child(4) { border-top: 1px solid var(--border); }
  .section-grid { grid-template-columns: 1fr; gap: 34px; }
  .section-heading h2 { max-width: 700px; }
  .skills-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: 54px; }
  .hero-lead { font-size: 21px; }
  .hero-photo { --photo-size: min(76vw, 260px); width: var(--photo-size); }
  .facts { margin-top: 38px; }
  .facts > div { padding: 18px 12px 20px 0; }
  .facts > div:not(:first-child) { padding-left: 12px; }
  .facts strong { font-size: 22px; }
  .section { padding: 48px 0; }
  .experience-item { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .work-title-row { display: block; }
  .work-title-row span { display: block; margin-top: 5px; text-align: left; }
  .skills-list { grid-template-columns: 1fr; }
  .certification-list { grid-template-columns: 1fr; }
  .credentials { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .contact-details { text-align: left; }
  .footer-inner { display: block; }
  .footer-inner a { display: inline-block; margin-top: 8px; }
}
