:root {
  color-scheme: light;
  --ink: #252321;
  --muted: #736f68;
  --line: rgba(37, 35, 33, 0.14);
  --paper: #e9e5dc;
  --paper-soft: #fbfaf7;
  --warm: #a58c78;
  --accent: #8f746a;
  --accent-rgb: 143, 116, 106;
  --deep: #34312e;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), transparent 38%),
    linear-gradient(180deg, var(--paper-soft), var(--paper));
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

.page-shell {
  width: min(100% - clamp(2rem, 5vw, 5rem), 1280px);
  min-height: calc(100svh - 4.6rem);
  display: grid;
  grid-template-rows: 1fr;
  margin-inline: auto;
  padding: clamp(1.15rem, 3vw, 2.2rem) 0 clamp(1rem, 2.5vw, 1.7rem);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(13rem, 21rem) minmax(24rem, 46rem);
  justify-content: center;
  align-content: center;
  align-items: center;
  column-gap: clamp(1.8rem, 4vw, 4rem);
  row-gap: clamp(0.9rem, 2.3vw, 1.85rem);
}

.identity {
  align-self: center;
  margin-left: 0;
}

.eyebrow {
  margin: 0 0 clamp(0.7rem, 2vw, 1rem);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: min(100%, 47rem);
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

h1 span {
  display: block;
}

.hero-name {
  margin-bottom: 1rem;
  color: rgba(37, 35, 33, 0.86);
  font-size: 1.95rem;
  line-height: 1;
}

.hero-field {
  max-width: 14em;
  font-size: 3.15rem;
  line-height: 0.97;
  hyphens: manual;
}

.hero-focus {
  width: max-content;
  max-width: 100%;
  margin-top: 1rem;
  padding: 0.55rem 0 0 1rem;
  border-left: 2px solid rgba(var(--accent-rgb), 0.44);
  color: rgba(37, 35, 33, 0.58);
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.25;
}

.portrait {
  align-self: center;
  justify-self: end;
  width: min(100%, 21rem);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(37, 35, 33, 0.12);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 1rem 2.8rem rgba(37, 35, 33, 0.09);
  filter: grayscale(0.02) saturate(1.02);
}

.portrait img {
  aspect-ratio: auto;
  object-fit: contain;
}

.profile-terms {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem clamp(0.85rem, 2vw, 1.35rem);
  max-width: min(100%, 48rem);
  margin: clamp(0.7rem, 2vw, 1.4rem) auto 0;
  padding: clamp(0.8rem, 1.7vw, 1rem) 0 0;
  border-top: 1px solid rgba(37, 35, 33, 0.18);
  color: rgba(37, 35, 33, 0.74);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  list-style: none;
}

.partner-institutes {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem clamp(0.7rem, 1.6vw, 1.05rem);
  max-width: min(100%, 44rem);
  margin: -0.45rem auto 0;
  padding: 0;
  color: rgba(37, 35, 33, 0.56);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  list-style: none;
}

.availability-note {
  grid-column: 1 / -1;
  width: min(100%, 42rem);
  margin: clamp(0.45rem, 1.4vw, 0.85rem) auto 0;
  padding-top: clamp(0.65rem, 1.5vw, 0.9rem);
  border-top: 1px solid rgba(37, 35, 33, 0.07);
  color: rgba(37, 35, 33, 0.56);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.availability-note p {
  margin: 0;
}

.availability-note p + p {
  margin-top: 0.32rem;
}

.availability-note a {
  color: rgba(37, 35, 33, 0.76);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.legal {
  width: min(100% - clamp(2rem, 5vw, 5rem), 1280px);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin: 0 auto;
  padding: 0 0 1.25rem;
  color: rgba(37, 35, 33, 0.58);
  font-size: 0.74rem;
}

.legal details {
  max-width: 20rem;
  min-width: 0;
  position: relative;
}

.legal summary {
  cursor: pointer;
  list-style: none;
}

.legal summary::-webkit-details-marker {
  display: none;
}

.legal summary:hover,
.legal summary:focus-visible {
  color: var(--deep);
}

.urgent-help summary {
  color: rgba(37, 35, 33, 0.68);
}

.legal div {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  z-index: 5;
  width: max-content;
  max-width: min(20rem, calc(100vw - 2rem));
  margin-top: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(236, 233, 227, 0.78);
  box-shadow: 0 18px 50px rgba(37, 35, 33, 0.08);
  overflow-wrap: anywhere;
}

.urgent-help div {
  width: min(25rem, calc(100vw - 2rem));
  max-width: min(25rem, calc(100vw - 2rem));
  max-height: min(70vh, 28rem);
  overflow-y: auto;
}

.legal p {
  margin: 0 0 0.45rem;
}

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

.urgent-help p {
  line-height: 1.35;
}

.urgent-help strong {
  color: rgba(37, 35, 33, 0.72);
  font-weight: 600;
}

.urgent-help a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: minmax(12rem, 18rem) minmax(22rem, 39rem);
  }

  .hero-name {
    font-size: 1.7rem;
  }

  .hero-field {
    font-size: 2.95rem;
  }
}

@media (max-width: 760px) {
  .page-shell {
    min-height: calc(100svh - 7rem);
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .identity {
    margin-left: 0;
  }

  .portrait {
    justify-self: start;
    width: min(18.5rem, 68vw);
  }

  .hero-name {
    font-size: 1.55rem;
  }

  .hero-field {
    font-size: 3rem;
  }

  .hero-focus {
    font-size: 1rem;
  }

  .profile-terms {
    justify-content: flex-start;
    margin-inline: 0;
  }

  .partner-institutes {
    justify-content: flex-start;
    margin-inline: 0;
  }

  .availability-note {
    margin-inline: 0;
    text-align: left;
  }

  .legal {
    justify-content: flex-start;
  }

  .legal div {
    right: auto;
    left: 0;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100% - 1.4rem, 1280px);
    gap: 1.1rem;
  }

  .hero-name {
    font-size: 1.35rem;
  }

  .hero-field {
    font-size: 2.25rem;
  }

  .hero-focus {
    margin-top: 0.85rem;
    padding-left: 0.75rem;
    font-size: 0.92rem;
  }

  .profile-terms {
    font-size: 0.86rem;
  }

  .partner-institutes,
  .availability-note {
    font-size: 0.78rem;
  }

  .legal {
    width: min(100% - 1.4rem, 1280px);
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .urgent-help {
    flex: 1 0 100%;
  }

  .urgent-help div {
    width: 100%;
    max-width: 100%;
  }
}
