/* -------------------------------------------------------------------------- */
/* Fonts                                                                      */
/* -------------------------------------------------------------------------- */

@font-face {
  font-family: "DaVinci";
  src: url("./_fonts/TRJNDaVinci-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DaVinci";
  src: url("./_fonts/TRJNDaVinci-Italic.woff") format("woff");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("./_fonts/Newsreader/Newsreader-VariableFont_opsz,wght.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("./_fonts/Newsreader/Newsreader-Italic-VariableFont_opsz,wght.ttf")
    format("truetype");
  font-style: italic;
  font-weight: 200 700;
  font-display: swap;
}

/* -------------------------------------------------------------------------- */
/* Base                                                                       */
/* -------------------------------------------------------------------------- */

:root {
  --color-bg: #f6f1e8;
  --color-text: #1c1a17;
  --color-muted: rgba(28, 26, 23, 0.74);
  --shell-width: 72rem;
  --content-width: 34rem;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --hero-gap: clamp(2rem, 6vw, 4rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Newsreader", serif;
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                     */
/* -------------------------------------------------------------------------- */

.site-shell {
  width: min(100%, var(--shell-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-layout {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: clamp(1.75rem, 5vw, 3.25rem);
  padding-block: 0 clamp(3rem, 8vh, 6rem);
}

.hero {
  display: grid;
  place-items: center;
}

.hero__inner {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: var(--hero-gap);
}

.hero__title {
  grid-column: 1;
}

.intro {
  display: grid;
  justify-content: center;
}

.intro__inner {
  width: min(100%, calc(var(--content-width) + 16rem));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  column-gap: clamp(1.5rem, 4vw, 3rem);
}

.intro__meta {
  display: grid;
  justify-items: center;
  row-gap: 0.9rem;
}

.intro__avatar-wrap {
  margin: 0;
  width: clamp(9rem, 20vw, 12rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(28, 26, 23, 0.03);
}

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

/* -------------------------------------------------------------------------- */
/* Typography                                                                 */
/* -------------------------------------------------------------------------- */

.hero__title {
  margin: 0;
  font-family: "DaVinci", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 8rem);
  line-height: 1.2;
  letter-spacing: -0.05em;
  text-wrap: balance;
  font-synthesis: none;
}

.hero__title-emphasis {
  font-style: italic;
}

.prose {
  color: var(--color-muted);
  font-size: clamp(1.05rem, 0.9rem + 0.45vw, 1.3rem);
  line-height: 1.75;
  padding-top: 0.25rem;
  width: min(100%, var(--content-width));
}

.prose p {
  margin: 0;
  text-wrap: balance;
}

.prose p + p {
  margin-top: 1.5rem;
}

/* -------------------------------------------------------------------------- */
/* Utilities                                                                  */
/* -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 40rem) {
  .site-layout {
    gap: clamp(2rem, 7vw, 3rem);
  }

  .hero__inner {
    gap: clamp(1.25rem, 5vw, 2rem);
  }

  .intro__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 1rem;
  }

  .intro__avatar-wrap {
    width: 9rem;
  }

  .intro__body {
    width: min(100%, var(--content-width));
  }
}
