:root {
  color-scheme: light;
  --ink: #101827;
  --muted: #526173;
  --line: #dbe2e9;
  --surface: #f4f6f8;
  --white: #ffffff;
  --accent: #1769aa;
  --accent-dark: #0d4f86;
  --max: 75rem;
  --header-height: 4.75rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.25rem);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

a:focus-visible {
  outline: 3px solid #54a7e8;
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.container {
  width: min(calc(100% - 3rem), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  overflow-x: hidden;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: var(--header-height);
}

.wordmark {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.025em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark::before {
  display: inline-block;
  width: .65rem;
  height: .65rem;
  margin-right: .6rem;
  background: var(--accent);
  content: "";
}

.primary-nav { min-width: 0; }

.primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.85rem, 2vw, 1.65rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  color: #344154;
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover { color: var(--accent-dark); }

.nav-social {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.nav-social svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

.hero {
  overflow: hidden;
  padding: clamp(3.5rem, 7vw, 6.25rem) 0;
  background: linear-gradient(135deg, #f7f9fb 0%, #fff 55%, #eef3f7 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(20rem, .82fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.hero-copy { max-width: 46rem; }

.eyebrow,
.section-number,
.company {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 7.5vw, 6.7rem);
  line-height: .92;
  letter-spacing: -.065em;
}

.role {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  color: #28364a;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.02em;
}

.summary {
  max-width: 44rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 2rem;
  padding: .8rem 1.05rem;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}

.button:hover { color: var(--white); background: var(--accent-dark); border-color: var(--accent-dark); }

.portrait-frame {
  position: relative;
  margin: 0;
  padding: .55rem;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 1.5rem 4rem rgba(16, 24, 39, .13);
}

.portrait-frame::after {
  position: absolute;
  right: -1rem;
  bottom: -1rem;
  z-index: -1;
  width: 38%;
  height: 38%;
  background: var(--accent);
  content: "";
}

.portrait-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 38%;
}

.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  scroll-margin-top: var(--header-height);
}

.section-muted { background: var(--surface); }

.section-layout {
  display: grid;
  grid-template-columns: minmax(12rem, .34fr) minmax(0, .66fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.section-heading h2,
.section-heading-row h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.section-number { margin-bottom: .8rem; }

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}

.section-heading-row > p {
  max-width: 25rem;
  margin: 0 0 .25rem;
  color: var(--muted);
  text-align: right;
}

.prose p { margin: 0; }
.prose p + p { margin-top: 1.25rem; }

.lead-prose {
  max-width: 48rem;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.55;
  letter-spacing: -.018em;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.expertise-grid li {
  min-height: 5.5rem;
  padding: 1.15rem 1.25rem 1.15rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 620;
  line-height: 1.45;
}

.expertise-grid li:not(:nth-child(3n + 1)) {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.section-dark {
  color: var(--white);
  background: var(--ink);
}

.section-dark .section-number,
.section-dark .company { color: #73b9ee; }

.timeline { min-width: 0; }

.experience-item {
  padding-top: 1.5rem;
  border-top: 1px solid #536071;
}

.experience-item + .experience-item { margin-top: 4.25rem; }

.experience-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.experience-header h3 {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: -.025em;
}

.company { margin-bottom: .55rem; }

.experience-meta {
  min-width: 13rem;
  color: #bfc9d5;
  font-size: .88rem;
  text-align: right;
}

.experience-meta p,
.experience-item > p { margin: 0; }
.experience-item > p { max-width: 47rem; color: #d6dee7; }

.highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem 2rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.highlights li {
  position: relative;
  padding-left: 1.25rem;
  color: #d6dee7;
}

.highlights li::before {
  position: absolute;
  top: .68rem;
  left: 0;
  width: .35rem;
  height: .35rem;
  background: #73b9ee;
  content: "";
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 .6rem 1.8rem rgba(16, 24, 39, .05);
}

.project-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.project-card h3,
.project-card p { margin: 0; }
.project-card h3 { font-size: 1.2rem; letter-spacing: -.025em; }
.project-topline p { color: var(--accent-dark); font-size: .82rem; font-weight: 750; }

.project-card .project-type {
  min-height: 4.6rem;
  margin: 1rem 0;
  color: #263448;
  font-weight: 700;
  line-height: 1.45;
}

.project-card > p:last-child { color: var(--muted); }

.education-list { border-top: 1px solid var(--ink); }

.education-list article {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.education-list h3,
.education-list p { margin: 0; }
.education-list h3 { font-size: 1.1rem; letter-spacing: -.02em; }
.education-list p { color: var(--muted); }
.education-list article > p { white-space: nowrap; }

.site-footer {
  padding: 2.3rem 0;
  color: #bdc7d4;
  background: #0a111d;
  border-top: 1px solid #283447;
  font-size: .88rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-inner p { margin: 0; }
.footer-name { color: var(--white); font-weight: 750; }
.footer-inner a { color: var(--white); font-weight: 700; text-underline-offset: .25rem; }

@media (max-width: 64rem) {
  .primary-nav ul { gap: 1rem; }
  .primary-nav a { font-size: .8rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(18rem, .72fr); gap: 3.5rem; }
  .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expertise-grid li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .expertise-grid li:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
}

@media (max-width: 56rem) {
  .header-inner { gap: 1.5rem; }
  .primary-nav { overflow: hidden; }
  .primary-nav ul {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-block: 1rem;
    scrollbar-width: thin;
  }
}

@media (max-width: 48rem) {
  :root { --header-height: 4.25rem; }
  .container { width: min(calc(100% - 2rem), var(--max)); }
  .hero-grid,
  .section-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 3.25rem; }
  .hero-copy { max-width: none; }
  .portrait-frame { width: min(100%, 27rem); }
  .section-layout { gap: 2.5rem; }
  .highlights { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card .project-type { min-height: 0; }
}

@media (max-width: 36rem) {
  .header-inner { gap: 1rem; }
  .wordmark { font-size: .9rem; }
  .wordmark::before { width: .55rem; height: .55rem; margin-right: .4rem; }
  .hero { padding-top: 3.2rem; }
  h1 { font-size: clamp(3.35rem, 17vw, 4.7rem); }
  .section-heading-row { align-items: start; flex-direction: column; margin-bottom: 2.25rem; }
  .section-heading-row > p { text-align: left; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-grid li:nth-child(even) { padding-left: 0; border-left: 0; }
  .experience-header { grid-template-columns: 1fr; gap: 1rem; }
  .experience-meta { text-align: left; }
  .education-list article,
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .site-header,
  .button { display: none; }
  .section,
  .hero { padding-block: 2rem; }
  .section-dark { color: var(--ink); background: var(--white); }
  .section-dark .experience-item > p,
  .section-dark .highlights li,
  .section-dark .experience-meta { color: var(--ink); }
}
