:root {
  color-scheme: light dark;
  --bg: #cfe3f7;
  --card: #fff;
  --text: #172233;
  --muted: #4b5a6e;
  --accent: #1d4479;
  --tint: #eaf2fb;
  --line: #d6e3f1;
  --shadow: 0 1px 2px rgb(23 34 51 / 8%), 0 8px 32px rgb(29 68 121 / 12%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1826;
    --card: #16243a;
    --text: #e4ecf5;
    --muted: #a7b6c8;
    --accent: #9ec8f5;
    --tint: #1d3050;
    --line: #283b56;
    --shadow: 0 8px 32px rgb(0 0 0 / 35%);
  }
}

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

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

body {
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.card {
  width: 100%;
  max-width: 40rem;
  padding: 2rem 1.25rem 1.5rem;
  background: var(--card);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.intro {
  text-align: center;
}

.avatar {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #cfe3f7;
  box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--line);
}

h1 {
  margin: 0;
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.role {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

section {
  margin-top: 2rem;
}

h2 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

p {
  margin: 0;
}

.stack {
  margin: 0;
}

.stack div {
  padding: 0.5rem 0;
}

.stack div + div {
  border-top: 1px solid var(--line);
}

.stack dt {
  font-weight: 600;
}

.stack dd {
  margin: 0;
  color: var(--muted);
}

address {
  font-style: normal;
}

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

.contacts a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.contacts a:hover {
  background: var(--tint);
  text-decoration: underline;
}

.contacts svg {
  flex: none;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

@media (min-width: 36em) {
  .card {
    padding: 2.5rem 2.5rem 1.75rem;
  }

  .stack div {
    display: grid;
    grid-template-columns: 9.5rem 1fr;
    gap: 1rem;
  }
}
