@font-face {
  font-family: Atkinson;
  src: url("./assets/fonts/atkinson-hyperlegible-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Atkinson;
  src: url("./assets/fonts/atkinson-hyperlegible-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  font-size: 1.25rem;
  --background: light-dark(#f5f5f5, #1e1e1e);
  --heading: light-dark(#0f1219, #fff);
  --text: light-dark(#222939, #e6edf3);
  --muted: light-dark(#525252, #c4cbd2);
  --line: light-dark(#d9dfe7, #525252);
  --accent: #00aeae;
  --accent-text: light-dark(#005757, var(--accent));

  background: var(--background);
  color: var(--text);
  font-family: Atkinson, sans-serif;
  line-height: 1.7;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body,
h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  color: var(--heading);
  line-height: 1.2;
  text-wrap: balance;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}

.wrap {
  width: min(56rem, calc(100% - 2 * clamp(1rem, 5vw, 3.2rem)));
  margin-inline: auto;
}

.site-navigation,
.site-actions,
.social-links {
  display: flex;
  align-items: center;
}

.site-navigation {
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

.site-actions,
.social-links {
  gap: 1rem;
}

.social-links a {
  color: var(--heading);
}

.site-actions svg {
  display: block;
  width: 1.6rem;
  height: 1.6rem;
}

#theme-toggle {
  display: grid;
  min-width: 2.2rem;
  min-height: 2.2rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--heading);
  cursor: pointer;
}

#theme-toggle[hidden],
#theme-toggle .sun,
:root[data-theme="dark"] #theme-toggle .moon {
  display: none;
}

:root[data-theme="dark"] #theme-toggle .sun {
  display: block;
}

.wordmark {
  color: var(--heading);
  font-size: 1.25rem;
  text-decoration: none;
}

.wordmark-brace {
  color: var(--accent);
  font-weight: 700;
}

.hero {
  padding-block: clamp(3.2rem, 9vw, 6.4rem) clamp(3.2rem, 7vw, 5.6rem);
}

.hero h1 {
  font-size: 2rem;
}

.hero p {
  margin-top: 0.6rem;
}

.blog-link,
.not-found-home {
  display: inline-flex;
  min-height: 2.4rem;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 0.25rem;
  background: #006767;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.blog-link {
  margin-top: 1.25rem;
}

.blog-link:hover,
.blog-link:focus-visible,
.not-found-home:hover,
.not-found-home:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.not-found-page {
  display: flex;
  flex-direction: column;
  min-block-size: 100dvh;
}

.not-found {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1rem;
  text-align: center;
}

.not-found h1 {
  margin: 0;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem);
  line-height: 1.1;
  text-wrap: balance;
}

.not-found-home {
  min-inline-size: 6rem;
  justify-content: center;
  border-radius: 0.5rem;
}

.other-apps {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 4vw, 3.2rem);
  padding-block: 1.6rem 2.4rem;
  border-top: 1px solid var(--line);
}

.other-apps h2 {
  font-size: 1.6rem;
}

.app-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-list li + li {
  border-top: 1px solid var(--line);
}

.app-list a {
  display: flex;
  min-height: 2.4rem;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 0.8rem;
  padding-block: 0.4rem;
  text-decoration: none;
}

.app-name {
  color: var(--heading);
  font-weight: 700;
}

.app-description {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: end;
}

.app-list a:hover .app-name,
.app-list a:focus-visible .app-name {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 47rem) {
  .hero {
    padding-block: 2.8rem;
  }

  .other-apps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 45rem) {
  .site-navigation {
    padding-inline: 1rem;
  }

  .social-links {
    display: none;
  }
}

@media (max-width: 19rem) {
  .app-list a {
    align-items: flex-start;
    flex-direction: column;
  }
}
