@font-face {
  font-family: "Fragment Mono";
  src: url("/assets/fonts/FragmentMono-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libron";
  src: url("/assets/fonts/Libron-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --background: #1f1f28;

  --text: #dcd7ba;
  --text-secondary: #c8c093;
  --text-muted: #727169;

  --border-subtle: #363646;

  --focus: #7fb4ca;

  --link: #7e9cd8;
  --link-hover: #956fb8;

  --fonts: "Fragment Mono", monospace;
  --heading-fonts: "Libron", sans-serif;
}

::selection {
  background: #957fb8;
  color: #1f1f28;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  max-width: 98%;
  margin: 20px auto;

  background-color: var(--background);
  color: var(--text);

  font-family: var(--fonts);

  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  align-items: start;
  gap: 40px;
  row-gap: 24px;
}

.site_header {
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.header_nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.header_nav a {
  white-space: nowrap;
}

.header_nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site_header a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.site_header a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  gap: 30px;
}

.profile_name {
  font-size: larger;
  font-weight: bold;
}

.page_title {
  font-size: 1.5em;
}

h1,
h2,
h3,
.profile_name {
  font-family: var(--heading-fonts);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

#left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

#avatar {
  width: 16em;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.contacts {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  gap: 1em;
  margin-top: 1em;
  width: 100%;
  padding: 0 20px;
}

.inline_link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75em;
}

.inline {
  height: 1em;
  width: 1em;
}

.page_section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.item_title {
  font-size: 1rem;
  font-weight: normal;
}

.detail_list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  color: var(--text-secondary);
  line-height: 1.6;
}

.desc {
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  main {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    align-items: stretch;
    max-width: calc(100% - 32px);
    margin: 16px auto;
    gap: 24px;
  }

  .site_header {
    flex-basis: auto;
    flex-direction: column;
    gap: 0;
  }

  .header_nav {
    justify-content: center;
    gap: 8px 16px;
  }

  #left {
    width: 100%;
  }

  #left .profile_name {
    max-width: 100%;
    text-align: center;
  }

  #avatar {
    width: 10em;
    max-width: 100%;
  }

  .contacts {
    max-width: 320px;
    padding: 0;
  }

  .inline_link {
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }

  .inline {
    flex-shrink: 0;
  }
}
