:root {
  --bg: #f8f7f3;
  --ink: #171717;
  --muted: #4f4d49;
  --line: #d9d7d1;
  --accent: #1f5fd6;
  --accent-soft: #d9e6ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, #fcfbf8 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  line-height: 1.72;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 14%, #ffffff 0, transparent 36%),
    radial-gradient(circle at 92% 10%, #f2f2f0 0, transparent 26%),
    radial-gradient(circle at 4% 88%, #f5f5f1 0, transparent 30%);
  opacity: 0.9;
}

main,
footer {
  width: min(46rem, 88vw);
  margin: 0 auto;
}

footer {
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

main {
  padding: 2.8rem 0 2.2rem;
}

.intro {
  animation: rise 0.65s ease both;
}

h1,
h2 {
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.1vw + 0.8rem, 3.4rem);
  max-width: 14ch;
}

p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.block {
  margin-top: 2.1rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  transform: translateY(12px);
  opacity: 0;
  animation: rise 0.62s ease forwards;
}

.block:nth-of-type(2) {
  animation-delay: 0.08s;
}

.block:nth-of-type(3) {
  animation-delay: 0.16s;
}

.block:nth-of-type(4) {
  animation-delay: 0.24s;
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

h2 {
  font-size: clamp(1.25rem, 1.1vw + 1rem, 1.9rem);
}

ul {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.65rem;
  color: var(--muted);
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-decoration-thickness: 0.16em;
  text-underline-offset: 0.14em;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.2rem;
}

.social-links {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  background: #fbfaf7;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.82rem;
  line-height: 1;
}

.social-links a:hover,
.social-links a:focus-visible {
  border-color: color-mix(in srgb, var(--accent), white 35%);
  background: var(--accent-soft);
  color: var(--ink);
}

.social-links svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
  flex: 0 0 auto;
}

::selection {
  background: var(--accent-soft);
}

strong {
  color: var(--ink);
}

footer {
  margin-bottom: 2rem;
  padding-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

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

  .social-links a {
    padding: 0.35rem 0.62rem;
  }
}
