:root {
  --background: rgb(247 245 243);
  --ink: #18323d;
  --text: #263d46;
  --muted: #67757b;
  --gold: #ad874d;
  --frame: rgb(24 50 61 / 16%);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Baskerville,
    Georgia, serif;
  --sans: 'Avenir Next', Avenir, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: clamp(3rem, 8vw, 7.5rem);
}

.page-shell::before {
  position: absolute;
  inset: clamp(0.8rem, 2.1vw, 1.8rem);
  border: 1px solid var(--frame);
  content: '';
  pointer-events: none;
}

.profile {
  display: grid;
  grid-template-columns: minmax(17rem, 22rem) minmax(27rem, 38rem);
  align-items: center;
  gap: clamp(4.25rem, 8vw, 8rem);
  width: min(100%, 68rem);
}

.portrait-column {
  position: relative;
  width: min(100%, 21.5rem);
  justify-self: end;
}

.portrait-frame {
  overflow: hidden;
  aspect-ratio: 1;
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity {
  position: relative;
  padding-left: clamp(1.5rem, 3.2vw, 2.75rem);
}

.identity::before {
  position: absolute;
  top: 0.35rem;
  bottom: 0.15rem;
  left: 0;
  width: 1px;
  background: var(--gold);
  content: '';
  opacity: 0.7;
}

.discipline {
  margin: 0 0 1rem;
  color: #876b3f;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: 'Fira Sans', var(--sans);
  font-size: clamp(4rem, 7vw, 6.15rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  white-space: nowrap;
}

.identity-rule {
  width: clamp(4rem, 7vw, 5.5rem);
  height: 1px;
  margin: clamp(1.8rem, 4vw, 2.6rem) 0 1.55rem;
  background: var(--gold);
}

.credentials {
  display: grid;
  gap: 1.25rem;
  max-width: 38rem;
}

.credential {
  margin: 0;
}

.credential-title,
.credential-school {
  display: block;
}

.credential-title {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.48rem);
  line-height: 1.48;
}

.credential-school {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: clamp(0.91rem, 1.3vw, 1rem);
  line-height: 1.55;
}

@media (prefers-reduced-motion: no-preference) {
  .portrait-column {
    animation: portrait-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .identity {
    animation: identity-in 700ms 90ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
}

@keyframes portrait-in {
  from {
    opacity: 0;
    transform: translateX(-1rem);
  }
}

@keyframes identity-in {
  from {
    opacity: 0;
    transform: translateX(1rem);
  }
}

@media (max-width: 850px) {
  .page-shell {
    padding: 4.5rem 2rem;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 3.25rem;
    width: min(100%, 35rem);
  }

  .portrait-column {
    width: min(66vw, 18rem);
    justify-self: center;
  }

  .identity {
    padding-left: 1.5rem;
  }

  h1 {
    font-size: clamp(3rem, 12.5vw, 4.5rem);
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding-inline: 1.4rem;
  }

  .page-shell::before {
    inset: 0.7rem;
  }

  .identity {
    padding-left: 1.1rem;
  }

  h1 {
    font-size: clamp(2.65rem, 12.5vw, 3.25rem);
  }
}
