:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #666666;
  --line: #e8e8e8;
  --soft: #f7f7f7;
  --max: 720px;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #9a9a9a;
  --line: #262626;
  --soft: #171717;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 72px 0 44px;
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
}

.site-title {
  padding-bottom: 28px;
  text-align: center;
}

.site-title h1 {
  font-size: clamp(36px, 7vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
}

.site-title a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
}

.nav a,
.theme-toggle {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  font-size: 18px;
  line-height: 1;
}

.nav a:hover,
.theme-toggle:hover {
  background: var(--soft);
  color: var(--fg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.section {
  padding: 34px 0;
}

.section h2 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
}

.section-title-link:hover {
  background: var(--soft);
  color: var(--fg);
}

.stack {
  display: grid;
  gap: 0;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: 64px;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
}

.social-row {
  min-height: 64px;
}

.row:last-child {
  border-bottom: 1px solid var(--line);
}

.row:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.row > span {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
}

.link-content {
  gap: 10px !important;
}

.thumbnail {
  width: min(100%, 260px);
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: var(--soft);
  filter: grayscale(1);
}

[data-theme="dark"] .thumbnail,
[data-theme="dark"] .social-row > span img {
  filter: grayscale(1) invert(0);
}

strong {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
}

small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.social-row > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.social-row > span img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.2);
}

.footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.footer a:hover {
  color: var(--fg);
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 28px, var(--max));
    padding-top: 44px;
  }

  .thumbnail {
    width: min(100%, 220px);
  }

  .footer {
    flex-direction: column;
  }
}
