:root {
  color-scheme: dark;
  font-family:
    "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #f4f8f7;
  background: #07111f;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #07111f;
  --foreground: #f4f8f7;
  --muted: #aab8c2;
  --accent: #5ee3d2;
  --line: rgba(94, 227, 210, 0.22);
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body,
h1,
p {
  margin: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--background);
}

a {
  color: inherit;
}

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

::selection {
  color: var(--background);
  background: var(--accent);
}

:focus-visible {
  outline: 3px solid #fff27a;
  outline-offset: 5px;
}

.page {
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(28, 58, 77, 0.34), transparent 36rem),
    var(--background);
}

.page::before,
.page::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.page::before {
  inset: 0;
  opacity: 0.8;
  background:
    linear-gradient(var(--line) 0 0) 8% 21% / 1px 22% no-repeat,
    linear-gradient(90deg, var(--line) 0 0) 8% 21% / 18% 1px no-repeat,
    linear-gradient(rgba(94, 227, 210, 0.13) 0 0) 92% 62% / 1px 24% no-repeat,
    linear-gradient(90deg, rgba(94, 227, 210, 0.13) 0 0) 74% 86% / 18% 1px no-repeat,
    radial-gradient(circle at 8% 21%, var(--accent) 0 2px, transparent 2.5px),
    radial-gradient(circle at 92% 86%, var(--accent) 0 2px, transparent 2.5px);
}

.page::after {
  right: -11rem;
  bottom: -16rem;
  width: 34rem;
  aspect-ratio: 1;
  border: 1px solid rgba(94, 227, 210, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 4rem rgba(94, 227, 210, 0.018),
    0 0 0 9rem rgba(94, 227, 210, 0.018);
}

.site-header,
.site-footer {
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
}

.site-header {
  padding-top: clamp(1.35rem, 3vw, 2.5rem);
}

.wordmark {
  color: var(--foreground);
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.hero {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  padding: clamp(2rem, 5vh, 4rem) 1.25rem;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.4rem, 5vh, 3.5rem);
  width: min(100%, 48rem);
  text-align: center;
}

.portrait {
  position: relative;
  flex: none;
  width: clamp(8.75rem, 24vw, 17.5rem);
  aspect-ratio: 1;
}

.portrait::before {
  position: absolute;
  inset: -1rem;
  border: 1px solid rgba(94, 227, 210, 0.52);
  border-radius: 50%;
  content: "";
}

.portrait::after {
  position: absolute;
  top: 3%;
  right: 5%;
  width: 0.45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--background);
  content: "";
}

.portrait__image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(244, 248, 247, 0.58);
  border-radius: 50%;
  background: #0b1929;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}

.profile__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile h1 {
  max-width: 12ch;
  color: var(--foreground);
  letter-spacing: -0.065em;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 560;
  line-height: 0.94;
  text-wrap: balance;
}

.profile__field {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 38rem;
  margin-top: 1.25rem;
  color: var(--muted);
  letter-spacing: 0.13em;
  font-size: clamp(0.68rem, 1.2vw, 0.78rem);
  font-weight: 680;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile__field::before {
  flex: none;
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
  content: "";
}

.profile__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: clamp(1.5rem, 3vh, 2rem);
}

.profile__links a,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  border-bottom: 1px solid rgba(94, 227, 210, 0.44);
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.profile__links a:hover,
.profile__links a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.profile__links svg,
.back-link svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: square;
  stroke-width: 1.5px;
}

.site-footer {
  justify-content: flex-end;
  padding-bottom: clamp(1.15rem, 2.5vw, 2rem);
  color: #83939e;
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: 0.025em;
  font-size: 0.7rem;
}

.site-footer span {
  width: 0.35rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 227, 210, 0.12);
}

.page--not-found {
  grid-template-rows: auto 1fr;
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(100% - 2.5rem, 48rem);
  margin-inline: auto;
  padding-block: 4rem 8rem;
}

.not-found__code {
  margin-bottom: 1rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 760;
}

.not-found h1 {
  letter-spacing: -0.065em;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 560;
  line-height: 0.94;
}

.back-link {
  margin-top: 2rem;
}

@media (max-width: 520px) {
  .page::after {
    right: -16rem;
    bottom: -19rem;
  }

  .hero {
    padding-block: 2rem;
  }

  .profile {
    gap: 2rem;
  }

  .portrait::before {
    inset: -0.7rem;
  }

  .profile__field {
    max-width: 26rem;
    margin-top: 0.9rem;
    letter-spacing: 0.09em;
  }

  .profile__field::before {
    display: none;
  }

  .profile__links {
    gap-inline: 1rem;
    margin-top: 1.15rem;
  }
}

@media (max-height: 560px) and (min-width: 620px) {
  .hero {
    padding-block: 1rem;
  }

  .profile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(2.5rem, 7vw, 5rem);
    width: min(100%, 58rem);
    text-align: left;
  }

  .portrait {
    width: clamp(7rem, 22vh, 10rem);
  }

  .profile__content {
    align-items: flex-start;
  }

  .profile h1 {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
  }

  .profile__links {
    justify-content: flex-start;
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
