:root {
  color-scheme: dark;
  --background: #111110;
  --foreground: #e4e3df;
  --muted: #aaa9a5;
  --line: #373735;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 280px;
  min-height: 100%;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: clip;
  isolation: isolate;
  padding: clamp(1.75rem, 6vw, 5.5rem);
}

.profile {
  position: relative;
  z-index: 1;
  width: min(100%, 30rem);
  margin-top: clamp(1rem, 8vh, 5rem);
}

h1,
.bio {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.bio {
  max-width: 29rem;
  margin-top: 1rem;
  color: #cfceca;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.bio a {
  color: inherit;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.contact {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  border-top: 1px dashed var(--line);
  padding-top: 1.25rem;
}

.contact a {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.contact a:hover,
.contact a:focus-visible {
  color: var(--foreground);
}

.bio a:focus-visible,
.contact a:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 4px;
}

.contact a:active {
  transform: translateY(1px);
}

.portrait {
  position: absolute;
  z-index: 0;
  bottom: -1px;
  left: 50%;
  width: min(46vw, 55vh, 600px);
  width: min(46vw, 55dvh, 600px);
  transform: translateX(-50%);
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.78;
  filter: contrast(1.08);
}

@media (max-width: 720px) {
  .page {
    padding: clamp(1.5rem, 7vw, 2rem);
  }

  .profile {
    margin-top: 0.5rem;
  }

  .portrait {
    width: min(92vw, 45vh, 600px);
    width: min(92vw, 45dvh, 600px);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .page {
    padding: 1.75rem;
  }

  .profile {
    width: min(48vw, 25rem);
    margin-top: 0;
  }

  .portrait {
    right: 2rem;
    left: auto;
    width: min(38vw, 80vh, 400px);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact a {
    transition: none;
  }
}
