@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=Newsreader:opsz,wght@6..72,500&display=swap");

:root {
  color-scheme: light;
  --paper: #f2efe8;
  --ink: #18201b;
  --muted: #6f756f;
  --accent: #d55d3f;
  --line: rgba(24, 32, 27, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.72), transparent 28rem),
    var(--paper);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  padding: 5rem clamp(1.5rem, 6vw, 7rem) 8rem;
}

.profile,
.story {
  width: min(100%, 1080px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(280px, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.profile {
  min-height: calc(100vh - 10rem);
  align-items: center;
}

.portrait-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  background: #d9d5ca;
  box-shadow: 0 30px 70px rgba(43, 42, 37, 0.12);
}

.portrait-wrap::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(24, 32, 27, 0.8);
  background:
    linear-gradient(145deg, transparent 40%, rgba(213, 93, 63, 0.2)),
    #d8d1c3;
  font-family: "Newsreader", serif;
  font-size: clamp(5rem, 12vw, 8.5rem);
}

.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms ease;
}

.portrait.is-loaded {
  opacity: 1;
}

.eyebrow,
.section-label {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(4.5rem, 9vw, 8.6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.82;
}

.dot {
  color: var(--accent);
}

.bio {
  max-width: 34rem;
  margin: clamp(2.2rem, 5vw, 3.5rem) 0 0;
  color: #454c47;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.65;
}

.story {
  margin-top: clamp(5rem, 10vw, 9rem);
  padding-top: 2.5rem;
  align-items: start;
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0;
}

.story-body {
  max-width: 40rem;
}

.story-body p {
  margin: 0 0 1.8rem;
  color: #3f4741;
  font-size: clamp(1.02rem, 1.35vw, 1.16rem);
  line-height: 1.8;
}

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

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

code {
  padding: 0.06em 0.28em;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
}

footer {
  height: 86px;
  margin: 0 clamp(1.5rem, 6vw, 7rem);
  padding-top: 1.3rem;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  main {
    padding-top: 3rem;
    padding-bottom: 5rem;
  }

  .profile,
  .story {
    grid-template-columns: 1fr;
  }

  .profile {
    min-height: auto;
    gap: 3rem;
  }

  .portrait-wrap {
    width: min(100%, 360px);
  }

  h1 {
    font-size: clamp(4rem, 22vw, 7rem);
  }

  .bio {
    margin-top: 2rem;
  }

  .story {
    gap: 1.5rem;
  }
}

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

  .portrait {
    transition: none;
  }
}
