:root {
  --navy: #0f2a43;
  --teal: #0e7c7b;
  --ink: #1c2733;
  --muted: #5a6b7a;
  --line: #dce4ea;
  --bg: #ffffff;
  --soft: #f2f6f8;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
}

[dir="rtl"] body {
  font-family: system-ui, -apple-system, Tahoma, "Segoe UI", Roboto, Arial, sans-serif;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.lang-switch {
  list-style: none;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  max-width: 44rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  justify-content: flex-end;
  font-size: 0.9375rem;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
}

.lang-switch span[aria-current="page"] {
  color: var(--navy);
  font-weight: 650;
}

main {
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  max-width: 44rem;
}

.avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 0 0 1.5rem;
}

h1 {
  color: var(--navy);
  font-size: 2.125rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--teal);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 2rem;
}

.bio p {
  margin: 0 0 1.25rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

.contact {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.contact h2 {
  color: var(--navy);
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
}

.contact ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.contact a {
  color: var(--teal);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact a:hover,
.contact a:focus-visible {
  text-decoration: underline;
}

footer {
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  max-width: 44rem;
  color: var(--muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}

@media (max-width: 36rem) {
  main {
    padding-top: 2rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .tagline {
    font-size: 1.125rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #b8d2e8;
    --teal: #5ec4c2;
    --ink: #e6edf2;
    --muted: #9db0bf;
    --line: #2a3a49;
    --bg: #101c27;
    --soft: #182633;
  }

  .avatar {
    background: #1d3a55;
  }
}
