@font-face {
  font-family: 'Playfair Display';
  src: url('/static/fonts/playfair-display.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/inter.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}

html {
  font-size: 17px;
}

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Landing page ── */

.landing {
  justify-content: center;
  text-align: center;
}

h1 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.landing h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.profile-link {
  font-size: 1.25rem;
  color: #555;
  text-decoration: none;
  padding: 0.5rem;
  -webkit-tap-highlight-color: rgba(10, 102, 194, 0.15);
}

.profile-link:hover {
  color: #0a66c2;
}

.profile-link svg {
  width: 2rem;
  height: 2rem;
  vertical-align: middle;
  fill: #555;
}

.profile-link:hover svg {
  fill: #0a66c2;
}

.blog-posts {
  list-style: none;
  margin: 0 auto 1.5rem auto;
  padding: 0;
}

.blog-heading {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.blog-posts li {
  margin-bottom: 0.75rem;
}

.blog-posts a {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1rem;
  color: #555;
  text-decoration: none;
}

.blog-posts a:hover {
  color: #0a66c2;
}

/* ── Article ── */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: calc(var(--scroll, 0) * 100%);
  background: #1a1a1a;
  z-index: 100;
}

article {
  max-width: 70ch;
  width: 100%;
  padding: 4rem 1.5rem 1rem;
  box-sizing: border-box;
}

article::after {
  content: '\2766';
  display: block;
  text-align: center;
  font-size: 2rem;
  margin-top: 2rem;
  color: #bbb;
}

article h1 {
  font-size: 2.5rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.back {
  margin-bottom: 2rem;
}

.back a {
  font-size: 0.9rem;
  color: #aaa;
  text-decoration: none;
}

.back a:hover {
  color: #1a1a1a;
}

.article-footer {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  margin-bottom: 4rem;
}

.article-footer a {
  font-size: 0.9rem;
  color: #aaa;
  text-decoration: none;
}

.article-footer a:hover {
  color: #1a1a1a;
}

.byline {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

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

.byline a:hover {
  text-decoration: underline;
}

h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

h2 a {
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

h2 a::before {
  content: "#";
  position: absolute;
  margin-left: -2rem;
  font-size: 1.25em;
  line-height: 1;
  top: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

h2 a:hover::before,
h2 a:focus::before {
  opacity: 0.45;
}

p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* ── Mobile ── */

@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a1a;
    color: #fafafa;
  }

  body::before {
    background: #fafafa;
  }

  article::after {
    color: #888;
  }

  .back a:hover {
    color: #fafafa;
  }

  .article-footer a:hover {
    color: #fafafa;
  }

  .blog-posts a {
    color: #aaa;
  }

  .blog-posts a:hover {
    color: #fafafa;
  }
}

@media (max-width: 600px) {
  .landing h1 {
    font-size: 2.5rem;
  }

  .profile-link {
    font-size: 1rem;
  }

  article {
    padding: 2rem 1.25rem 1rem;
  }

  article h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h2 a::before {
    display: none;
  }
}
