:root {
  --bg: #fcfcfd;
  --ink: #0e0f12;
  --text: #2e3138;
  --secondary: #4b4f58;
  --muted: #6b6f78;
  --rule: #ecedf0;
  --underline: #c9ccd3;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Layout */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 128px 24px 72px;
}

.page.sub {
  padding: 40px 24px 96px;
  gap: 48px;
}

.column {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.home {
  gap: 56px;
}

/* Home */

.intro {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.me {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  flex: none;
}

.name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.bio {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.bio span {
  display: block;
  text-wrap: pretty;
}

.bio a,
.link {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

.bio a:hover,
.link:hover {
  text-decoration-color: var(--ink);
}

/* Lists */

.section {
  display: flex;
  flex-direction: column;
}

.label {
  margin: 0;
  padding-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}

.row-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.row-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: underline transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

a.row:hover .row-title {
  text-decoration-color: var(--underline);
}

.row-detail {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
}

.row-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex: none;
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.grade {
  width: 28px;
  text-align: right;
  font-weight: 500;
  color: var(--ink);
}

/* Inner pages */

.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.back svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.back:hover svg {
  transform: translateX(-2px);
}

.title {
  margin: 0;
  padding-top: 72px;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.map {
  width: 100%;
  max-width: 960px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map img {
  width: 100%;
  height: auto;
}

.map figcaption {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

.country {
  display: grid;
  grid-template-columns: 150px 1fr;
  column-gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.country-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.country-places {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.more {
  align-self: flex-start;
  font-size: 14px;
  color: var(--secondary);
}

.more:hover {
  color: var(--ink);
}

/* Phones */

@media (max-width: 640px) {
  .page {
    padding: 64px 22px 56px;
  }

  .page.sub {
    padding: 28px 22px 64px;
    gap: 28px;
  }

  .column {
    gap: 28px;
  }

  .home {
    gap: 48px;
  }

  .intro {
    gap: 24px;
  }

  .bio {
    font-size: 16px;
  }

  .back {
    padding: 14px 0;
    margin: -14px 0;
  }

  .title {
    padding-top: 16px;
    font-size: 34px;
    line-height: 1.1;
  }

  .row {
    gap: 12px;
  }

  .row-main {
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 2px;
  }

  .row-detail {
    font-size: 13px;
  }

  .mono {
    font-size: 12px;
  }

  .row-meta {
    gap: 12px;
  }

  .map {
    gap: 10px;
  }

  .map figcaption {
    font-size: 11.5px;
    text-align: left;
  }

  .label {
    padding-bottom: 12px;
  }

  .country {
    grid-template-columns: 116px 1fr;
    column-gap: 12px;
    padding: 11px 0;
  }

  .country-places {
    font-size: 13px;
  }
}
