@font-face {
  font-family: "Comic Code";
  src: url("/fonts/comic-code.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Comic Code";
  src: url("/fonts/comic-code-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Comic Code";
  src: url("/fonts/comic-code-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Comic Code", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.7;
  color: #1f2328;
  padding: 2rem 1rem;
  text-align: center;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Site header ── */

.site-header {
  max-width: 760px;
  width: 100%;
  margin: 0 auto 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #1f2328;
}

.site-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.3rem;
}

.site-title a { color: inherit; text-decoration: none; }
.site-title a:hover { text-decoration: underline; }

.site-tagline {
  font-size: 0.9rem;
  color: #57606a;
  font-style: italic;
}

nav {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.85rem;
}
nav a { color: #3b82d4; text-decoration: none; letter-spacing: 0.04em; }
nav a:hover { text-decoration: underline; }

/* ── Main ── */

main {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ── Tag filter bar ── */

#tag-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.tag-btn {
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  color: #57606a;
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  cursor: pointer;
}
.tag-btn:hover { border-color: #1f2328; color: #1f2328; }

.tag-btn--active { background: #1f2328; border-color: #1f2328; color: #ffffff; }
.tag-btn--active:hover { color: #ffffff; }

.no-posts {
  font-size: 0.9rem;
  color: #57606a;
  font-style: italic;
  padding: 2rem 0;
}

/* ── Index: post list ── */

.post {
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #e5e7eb;
}
.post:last-child { border-bottom: none; }

.post-meta {
  font-size: 0.78rem;
  color: #57606a;
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.post-title a { color: #1f2328; text-decoration: none; }
.post-title a:hover { text-decoration: underline; }

.post-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.72rem;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  color: #57606a;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ── Post page ── */

.post-header { margin-bottom: 2.5rem; }

.post-page-title {
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
}

.post-frame {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 2.75rem;
  border-top: 1px solid #e5e7eb;
}

.post-body {
  font-size: 1.4rem;
  line-height: 2;
  color: #1f2328;
  text-align: justify;
  text-align-last: justify;
}
.post-body p { margin-bottom: 1.4rem; }
.post-body p:last-child { margin-bottom: 0; }

/* ── Intent disclosure ── */

.post-intent {
  max-width: 520px;
  margin: 2rem auto 0;
  text-align: left;
}

.post-intent summary {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #57606a;
  cursor: pointer;
  list-style: none;
  text-align: center;
}
.post-intent summary::-webkit-details-marker { display: none; }
.post-intent summary::after {
  content: " +";
  color: #c1c7d0;
}
.post-intent[open] summary::after { content: " −"; }

.post-intent-body {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #3b4049;
  text-align: justify;
}
.post-intent-body p { margin-bottom: 0.9rem; }
.post-intent-body p:last-child { margin-bottom: 0; }

.back-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.back-link {
  display: inline-block;
  font-size: 0.82rem;
  color: #3b82d4;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.back-link:hover { text-decoration: underline; }

/* ── About page ── */

.about-body {
  max-width: 520px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.9;
  text-align: justify;
  text-align-last: justify;
}
.about-body p { margin-bottom: 1.4rem; }
.about-body p:last-child { margin-bottom: 0; }

/* ── Pagination ── */

.pagination {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: #57606a;
}

.pag-btn { color: #3b82d4; text-decoration: none; letter-spacing: 0.04em; }
.pag-btn:hover { text-decoration: underline; }
.pag-disabled { color: #c1c7d0; cursor: default; }

/* ── Mobile ── */

@media (max-width: 480px) {
  body { padding: 1.5rem 0.75rem; }

  .site-title { font-size: 1.6rem; }

  .post-title { font-size: 1.2rem; }

  .post-page-title {
    font-size: 2.4rem;
    letter-spacing: -0.5px;
  }

  .post-frame { padding: 1.5rem 1.25rem; }

  .post-body {
    font-size: .8rem;
    text-align: justify;
    text-align-last: justify;
  }

  .post-intent { max-width: 85%; }

  .post-intent-body {
    font-size: 0.78rem;
    text-align: justify;
    text-align-last: justify;
  }

  .about-body { font-size: 0.8rem; }
}
