: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;
}

body::before {
  position: fixed;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.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,
.copy p,
.copy blockquote {
  margin: 0;
}

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

.copy {
  max-width: 33rem;
  margin-top: 1rem;
}

.copy p,
.copy blockquote {
  color: #cfceca;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.copy p + p,
.copy blockquote {
  margin-top: 1rem;
}

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

.copy blockquote {
  color: var(--foreground);
}

.copy blockquote footer {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9em;
}

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

.site-note {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.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);
}

.copy 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(24vw, 32vh, 300px);
  width: min(24vw, 32dvh, 300px);
  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(56vw, 28vh, 300px);
    width: min(56vw, 28dvh, 300px);
  }
}

@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(25vw, 52vh, 260px);
    transform: none;
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  body::before {
    opacity: 0;
  }
}
