:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --panel: #ffffff;
  --text: #1d1d1f;
  --secondary: #515158;
  --line: #d9d9df;
  --nav: rgb(245 245 247 / 90%);
  --accent: #0066cc;
  --accent-button: #0066cc;
  --accent-ink: #ffffff;
  --contact-tint: #e9f1ff;
  --radius: 1.75rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #111113;
  --panel: #1d1d20;
  --text: #f5f5f7;
  --secondary: #b6b6bf;
  --line: #44444b;
  --nav: rgb(17 17 19 / 90%);
  --accent: #82baff;
  --accent-button: #82baff;
  --accent-ink: #101d2b;
  --contact-tint: #192533;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 1rem/1.55 -apple-system, BlinkMacSystemFont, "Instrument Sans", system-ui, sans-serif;
}

.page-width {
  width: min(calc(100% - max(2rem, 8vw)), 73rem);
  margin-inline: auto;
}

a { color: inherit; text-decoration: none; }

button { font: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 6;
  inset: 0.6rem auto auto 0.6rem;
  transform: translateY(-180%);
  padding: 0.5rem 0.8rem;
  background: var(--panel);
}

.skip-link:focus { transform: none; }

.scroll-progress { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .scroll-progress {
    position: fixed;
    z-index: 5;
    inset: 0 0 auto;
    display: block;
    height: 2px;
    background: var(--accent);
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left;
  }

  [data-reveal] {
    transition: opacity 450ms ease-out, transform 500ms cubic-bezier(0.2, 0.65, 0.2, 1);
  }

  [data-reveal].reveal-pending:not(:focus-within) {
    opacity: 0;
    transform: translateY(16px);
  }

  .expertise > [data-reveal]:nth-child(even) { transition-delay: 75ms; }

  [data-reveal]:focus-within { transition: none; }
}

.masthead {
  position: sticky;
  z-index: 3;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--nav);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header,
.header-actions,
.site-header nav,
.site-footer {
  display: flex;
  align-items: center;
}

.site-header {
  min-height: 3.55rem;
  justify-content: space-between;
  gap: 0.75rem;
}

.wordmark {
  font-size: 1.18rem;
  font-weight: 730;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.wordmark span { color: var(--accent); }

.header-actions { gap: clamp(0.55rem, 2.2vw, 1.65rem); }

.site-header nav {
  flex-wrap: wrap;
  gap: 0 clamp(0.85rem, 2.4vw, 2rem);
}

.site-header nav a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  color: var(--secondary);
  font-size: 0.85rem;
}

.site-header nav a:hover,
.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.26em;
}

.theme-toggle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--secondary);
  cursor: pointer;
}

.theme-toggle:hover { background: var(--panel); color: var(--accent); }

.theme-icon {
  position: relative;
  width: 0.66rem;
  height: 0.66rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.theme-icon::before {
  position: absolute;
  inset: -0.31rem;
  background:
    linear-gradient(currentColor, currentColor) center top / 1px 0.19rem no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 1px 0.19rem no-repeat,
    linear-gradient(currentColor, currentColor) left center / 0.19rem 1px no-repeat,
    linear-gradient(currentColor, currentColor) right center / 0.19rem 1px no-repeat;
  content: "";
}

.theme-toggle[aria-checked="true"] .theme-icon {
  width: 0.94rem;
  height: 0.94rem;
  border: 0;
  box-shadow: inset -0.25rem -0.13rem currentColor;
}

.theme-toggle[aria-checked="true"] .theme-icon::before { display: none; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  min-height: clamp(28rem, 46vw, 34rem);
  margin-top: clamp(1.25rem, 4vw, 3rem);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
}

.hero-copy {
  align-self: center;
  padding: clamp(1.8rem, 4.4vw, 4rem);
}

.hero-heading {
  display: grid;
  justify-items: start;
  gap: 0.65rem;
}

.hero-location {
  margin: 0;
  color: var(--accent);
  font-size: 0.91rem;
  font-weight: 650;
}

h1,
h2 {
  margin: 0;
  font-weight: 680;
  letter-spacing: -0.062em;
  line-height: 1.04;
}

h1 {
  margin-inline-start: -0.08em;
  font-size: clamp(3.35rem, 7.65vw, 6.55rem);
}

h1 span { color: var(--accent); }

h2 { font-size: clamp(2.65rem, 5.7vw, 4.65rem); }

.hero-role {
  margin: 0;
  color: var(--secondary);
  font-size: clamp(1.12rem, 2vw, 1.65rem);
  font-weight: 520;
  letter-spacing: -0.025em;
}

.hero-link,
.contact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  min-height: 2.8rem;
  max-width: 100%;
  padding: 0.45rem 1.08rem;
  border: 1px solid var(--accent);
  border-radius: 2rem;
  color: var(--accent);
  font-size: 0.91rem;
  font-weight: 600;
}

.hero-link {
  margin-top: 1.65rem;
  border-color: var(--accent-button);
  background: var(--accent-button);
  color: var(--accent-ink);
}

.hero-link:hover,
.contact-action:hover { filter: brightness(0.9); }

.hero-photo,
.interest-photo {
  position: relative;
  margin: 0;
  background: #263d48;
}

.hero-photo img,
.interest-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo img { object-position: 50% 59%; }

.content-section,
main {
  scroll-margin-top: 5.2rem;
}

.profile {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3.3rem, 7vw, 6.6rem);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.15rem, 5vw, 5rem);
  margin-bottom: clamp(1.6rem, 4vw, 2.65rem);
}

.intro-copy { max-width: 53ch; }

.intro-copy p {
  margin: 0;
  color: var(--secondary);
  font-size: clamp(1rem, 1.65vw, 1.16rem);
}

.intro-copy p + p { margin-top: 0.8rem; }

.expertise,
.interests-list { margin: 0; }

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

.expertise > div {
  padding: clamp(1.25rem, 2.8vw, 2.3rem);
  border-radius: 1.35rem;
  background: var(--panel);
}

dt {
  font-weight: 670;
  letter-spacing: -0.027em;
  line-height: 1.25;
}

.expertise dt { font-size: clamp(1.08rem, 1.7vw, 1.32rem); }

dd {
  margin: 0.5rem 0 0;
  color: var(--secondary);
  font-size: 0.92rem;
}

.interests {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
}

.interests-copy {
  grid-area: 1 / 2;
  padding: clamp(1.75rem, 4.3vw, 3.75rem);
}

.interest-photo { grid-area: 1 / 1; }

.interest-photo img { object-position: 48% 67%; }

.interests-list { margin-top: 1.45rem; }

.interests-list > div {
  padding-block: 0.65rem;
  border-top: 1px solid var(--line);
}

.interests-list dd { margin-top: 0.25rem; }

.contact {
  margin-block: clamp(2.2rem, 5.5vw, 4.8rem) 2.5rem;
  padding: clamp(2.55rem, 6vw, 4.7rem) 1.1rem;
  border-radius: var(--radius);
  background: var(--contact-tint);
  text-align: center;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.45rem;
}

.contact-action {
  background: transparent;
  cursor: pointer;
}

.contact-action:first-child {
  background: var(--accent-button);
  color: var(--accent-ink);
}

.site-footer {
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 1.15rem;
  min-height: 3.8rem;
  padding-block: 0.4rem;
  border-top: 1px solid var(--line);
  color: var(--secondary);
}

.site-footer small { font-size: 0.8rem; }

@media (max-width: 58rem) {
  .expertise { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  h1 { font-size: clamp(3.05rem, 7.55vw, 5rem); }
}

@media (max-width: 43rem) {
  .hero,
  .intro,
  .interests {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy { padding: 2.45rem clamp(1.35rem, 6vw, 2.5rem); }

  h1 { font-size: clamp(3.2rem, 13vw, 5.45rem); }

  .hero-photo { aspect-ratio: 4 / 3; }

  .interests-copy,
  .interest-photo { grid-area: auto; }

  .interest-photo { aspect-ratio: 4 / 3; }
}

@media (max-width: 31rem) {
  .site-header nav a { font-size: 0.8rem; }
  .site-header nav { column-gap: 0.72rem; }
  .expertise { grid-template-columns: minmax(0, 1fr); }
  :root { --radius: 1.35rem; }
}

@media (max-width: 23.5rem) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0.55rem;
  }

  .wordmark { align-self: flex-start; }

  .header-actions { justify-content: space-between; }

  .content-section,
  main { scroll-margin-top: 6.35rem; }
}
