:root {
  color-scheme: dark;
  --background: #141615;
  --text: #f0efea;
  --muted: #a4aaa5;
  --accent: #b8c5a5;
  --border: #343a35;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 240px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
}

.profile {
  width: 100%;
  max-width: 34rem;
  text-align: center;
}

.profile-photo {
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1.75rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 42%;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.name-dot {
  color: var(--accent);
}

.study {
  margin: 0.75rem 0 0;
  color: var(--accent);
  font-size: 0.875rem;
}

.study span {
  margin: 0 0.35em;
  color: var(--muted);
}

.description {
  max-width: 25rem;
  margin: 1.75rem auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.location {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.location svg {
  flex-shrink: 0;
}

.contact-links {
  margin-top: 1.75rem;
}

.contact-links ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 4.75rem;
  min-height: 4.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.contact-links svg {
  color: var(--text);
}

.contact-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  color: var(--text);
}

@media (hover: hover) {
  .contact-links a:hover {
    background: #202420;
    color: var(--text);
    transform: translateY(-2px);
  }
}

.site-footer {
  padding: 0 1.5rem 1.5rem;
  text-align: center;
}

.domain {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.025em;
  color: var(--muted);
}

.domain-suffix {
  color: var(--accent);
}

@media (max-height: 700px) {
  main {
    padding-block: 1.75rem;
  }

  .profile-photo {
    width: 6.5rem;
    height: 6.5rem;
    margin-bottom: 1.25rem;
  }

  .description,
  .contact-links {
    margin-top: 1.25rem;
  }
}

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

  .profile {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    column-gap: 2rem;
    max-width: 40rem;
    text-align: left;
  }

  .profile > :not(.profile-photo) {
    grid-column: 2;
  }

  .profile-photo {
    grid-column: 1;
    grid-row: 1 / span 4;
    align-self: center;
    width: 6rem;
    height: 6rem;
    margin: 0;
  }

  h1 {
    font-size: 2.25rem;
  }

  .description,
  .location,
  .contact-links {
    margin: 0.75rem 0 0;
  }

  .description {
    max-width: none;
  }

  .location,
  .contact-links ul {
    justify-content: flex-start;
  }

  .contact-links a {
    flex-direction: row;
    min-height: 2.75rem;
  }

  .site-footer {
    padding-bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .profile {
    animation: arrive 650ms ease-out both;
  }

  .site-footer {
    animation: arrive 650ms 120ms ease-out both;
  }

  .contact-links a {
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
  }

  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
