:root {
  color-scheme: light dark;
  --page: #f7f5ef;
  --paper: #ffffff;
  --ink: #161615;
  --muted: #5f625e;
  --line: #d8d7cf;
  --accent: #2d6b64;
  --accent-dark: #214f4b;
  --shadow: 0 24px 70px rgb(32 35 31 / 14%);
  --texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.105'/%3E%3C/svg%3E");
}

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

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--page);
  background-image: var(--texture);
  background-size: 160px 160px;
  color: var(--ink);
  font-family:
    ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

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

a:focus-visible {
  outline: 3px solid rgb(45 107 100 / 42%);
  outline-offset: 6px;
  border-radius: 4px;
}

.profile {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 8vw, 104px);
  padding: clamp(42px, 8vh, 96px) 0;
}

.portrait-wrap {
  position: relative;
  width: min(100%, 380px);
  justify-self: end;
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.portrait {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(460px, 68vh, 560px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 53% 46%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.intro {
  max-width: 640px;
}

h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(3rem, 5.4vw, 4.75rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
  white-space: nowrap;
}

.lead {
  max-width: 29ch;
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  font-size: clamp(1.22rem, 2vw, 1.72rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.bio {
  max-width: 34rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.5;
}

.link-options {
  margin-top: 34px;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.icon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 30px;
  align-items: center;
}

.profile-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.25vw, 1.18rem);
  font-weight: 760;
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.26em;
}

.profile-link:hover {
  color: var(--accent-dark);
}

.profile-link::after {
  content: "";
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.12em;
  border-block-start: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  transform: translateY(-0.05em) rotate(45deg);
}

.link-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: currentColor;
}

@media (max-width: 760px) {
  .profile {
    min-height: auto;
    width: min(100% - 32px, 520px);
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0 34px;
  }

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

  .portrait {
    height: min(54vw, 212px);
    aspect-ratio: 16 / 9;
    object-position: 50% 42%;
  }

  .portrait-wrap::before {
    inset: 10px -10px -10px 10px;
  }

  h1 {
    max-width: none;
    font-size: clamp(3rem, 15vw, 4.15rem);
    line-height: 0.95;
    white-space: nowrap;
  }

  .lead {
    max-width: 100%;
    margin-top: 20px;
    font-size: clamp(1.32rem, 5.6vw, 1.58rem);
    line-height: 1.08;
  }

  .bio {
    margin-top: 18px;
    line-height: 1.5;
  }

  .link-options {
    margin-top: 22px;
  }

  .icon-links {
    gap: 12px 24px;
  }

  .profile-link {
    min-height: 38px;
    font-size: 1rem;
  }

  .link-icon {
    width: 21px;
    height: 21px;
  }

}

@media (max-width: 390px) {
  .profile {
    width: min(100% - 24px, 520px);
  }

  h1 {
    font-size: 3rem;
  }

  .lead {
    font-size: 1.32rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #151615;
    --paper: #20211f;
    --ink: #f1ede4;
    --muted: #b8b2a8;
    --line: #3b3c37;
    --accent: #9ccbc1;
    --accent-dark: #d2eee8;
    --shadow: 0 24px 70px rgb(0 0 0 / 46%);
    --texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.075'/%3E%3C/svg%3E");
  }

  a:focus-visible {
    outline-color: rgb(156 203 193 / 55%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition:
      color 160ms ease,
      outline-color 160ms ease;
  }
}
