:root {
  color-scheme: light;
  --bg: #fafafa;
  --ink: #111111;
  --muted: #737373;
  --line: #e7e7e7;
  --line-strong: #111111;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101010;
  --ink: #f5f5f5;
  --muted: #a3a3a3;
  --line: #292929;
  --line-strong: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
}

.page {
  width: min(100% - 40px, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0 32px;
  display: grid;
  align-content: center;
  gap: 34px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  outline: none;
}

.theme-icon {
  font-size: 20px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

.profile {
  text-align: center;
}

.brand-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 24px;
  display: block;
  object-fit: contain;
}

:root[data-theme="dark"] .brand-logo {
  filter: invert(1);
}

.links {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.link-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px 1fr 24px;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 160ms ease, padding-inline 160ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  padding-inline: 8px;
  color: var(--ink);
  outline: none;
}

.icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.icon img {
  width: 17px;
  height: 17px;
  display: block;
}

:root[data-theme="dark"] .icon img {
  filter: invert(1);
}

strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 650;
}

small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.arrow {
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  text-align: right;
}

@media (max-width: 420px) {
  .page {
    width: min(100% - 32px, 480px);
    padding-block: 40px 24px;
  }

  .link-card {
    min-height: 74px;
    grid-template-columns: 38px 1fr 22px;
    gap: 14px;
  }

  .icon {
    width: 32px;
    height: 32px;
  }
}
