:root {
  color-scheme: light;
  --text: #121412;
  --muted: #626761;
  --line: #d9ddd8;
  --link: #356b53;
  --paper: #ffffff;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.008em;
  line-height: 1.66;
  text-rendering: optimizeLegibility;
}

.page {
  width: min(100% - 3rem, 820px);
  margin: 0 auto;
  padding: 2.25rem 0 2.5rem;
}

.language-switcher {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.2rem;
  min-height: 2.5rem;
  margin-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.language-switcher a,
.language-switcher a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  color: var(--muted);
  font: inherit;
  text-decoration: none;
}

.language-switcher a[aria-current="page"],
.language-switcher a[aria-current="page"]:visited {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}

.language-switcher a:hover {
  color: var(--text);
}

.language-switcher a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.4rem 0.65rem;
  background: var(--paper);
  border: 1px solid var(--text);
}

header {
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--text);
}

.hero {
  display: grid;
  grid-template-columns: clamp(11.5rem, 26vw, 15rem) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.portrait {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin: 0;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}

.meta {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.55rem, 5vw, 3.45rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.identity {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.3;
}

.intro {
  grid-column: 2;
  grid-row: 2;
  max-width: 610px;
  margin: 1.2rem 0 0;
  color: #333733;
  font-size: 1.05rem;
  line-height: 1.55;
}

.profile-links {
  grid-column: 2;
  grid-row: 3;
  margin: 0.55rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.profile-links span,
.project-links span {
  margin: 0 0.35rem;
  color: var(--muted);
}

header > nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  margin-top: 1.75rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.13em;
}

a:visited {
  color: var(--link);
}

a:hover {
  color: #000000;
}

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

section {
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

h2 {
  margin: 0 0 1.25rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.4;
}

h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

article + article {
  margin-top: 1.75rem;
}

.organization,
.education-item {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.organization + .organization {
  margin-top: 2.4rem;
}

.organization-logo,
.education-logo {
  margin: 0.1rem 0 0;
}

.organization-logo img,
.education-logo img {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.35rem;
  object-fit: contain;
}

.organization-details,
.education-item > div {
  min-width: 0;
}

.role-list {
  margin: 1.15rem 0 0 0.2rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
}

.role {
  position: relative;
}

.role::before {
  position: absolute;
  top: 0.48rem;
  left: calc(-1.25rem - 5px);
  width: 0.5rem;
  height: 0.5rem;
  background: #aeb4ae;
  border: 2px solid var(--paper);
  border-radius: 50%;
  content: "";
}

.role + .role {
  margin-top: 1.4rem;
}

.role p:last-child {
  line-height: 1.58;
}

.education-item + .education-item {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.education-item p {
  margin: 0.1rem 0 0;
}

.education-item .meta {
  margin-top: 0.15rem;
}

.meta {
  margin: 0.15rem 0 0.6rem;
  line-height: 1.5;
}

.project-links {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

ul {
  margin: 0;
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.3rem;
}

.credential-list {
  padding-left: 0;
  list-style: none;
}

.credential-list li + li {
  margin-top: 1rem;
}

.credential-meta {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}

@media (max-width: 540px) {
  .page {
    width: min(100% - 2rem, 760px);
    padding-top: 1.25rem;
  }

  .language-switcher {
    margin-bottom: 1rem;
  }

  body {
    font-size: 16px;
  }

  .hero {
    display: block;
  }

  .portrait {
    float: right;
    width: 7.75rem;
    margin: 1.25rem 0 0.75rem 1rem;
  }

  .hero::after {
    display: table;
    clear: both;
    content: "";
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 2.7rem);
  }

  .intro {
    margin-top: 1.25rem;
  }

  section {
    padding: 1.65rem 0;
  }

  .organization,
  .education-item {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.8rem;
  }

  .organization-logo img,
  .education-logo img {
    width: 3rem;
    height: 3rem;
  }

  footer {
    display: block;
  }

  footer p + p {
    margin-top: 0.5rem;
  }
}

@media print {
  body {
    font-size: 11pt;
  }

  .page {
    width: auto;
    padding: 0;
  }

  nav,
  .language-switcher,
  footer a {
    display: none;
  }

  section {
    break-inside: avoid;
  }
}

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