@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Press+Start+2P&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --bg: #141516;
  --bg-soft: #1c1f22;
  --ink: #f5f0ea;
  --muted: #b9b1a8;
  --accent: #3cf0ff;
  --accent-2: #ff5eda;
  --accent-3: #f9cf7a;
  --line: #2b2f35;
  --shadow: rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  background: radial-gradient(circle at top, #25262a, #0f1012 70%);
  color: var(--ink);
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
      120deg,
      rgba(60, 240, 255, 0.08),
      rgba(255, 94, 218, 0.06)
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: screen;
  opacity: 0.35;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
      circle at 20% 20%,
      rgba(60, 240, 255, 0.12),
      transparent 35%
    ),
    radial-gradient(circle at 80% 30%, rgba(255, 94, 218, 0.1), transparent 38%),
    radial-gradient(
      circle at 40% 80%,
      rgba(249, 207, 122, 0.08),
      transparent 40%
    );
  opacity: 0.25;
  z-index: 0;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.wrap {
  width: min(980px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(16, 17, 19, 0.86);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.85rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: 0 0 18px rgba(60, 240, 255, 0.35);
  animation: pulse 2.8s ease-in-out infinite;
}

.brand-text {
  font-family: "Press Start 2P", "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  gap: 1.1rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.site-main {
  flex: 1;
  padding: 3.2rem 0 4.5rem;
}

.hero {
  padding: 2.6rem 0 2rem;
}

.hero-content {
  display: grid;
  gap: 1.2rem;
  padding: 2.4rem;
  background: linear-gradient(
      135deg,
      rgba(28, 31, 34, 0.92),
      rgba(20, 21, 22, 0.96)
    ),
    repeating-linear-gradient(
      90deg,
      rgba(60, 240, 255, 0.08),
      rgba(60, 240, 255, 0.08) 1px,
      transparent 1px,
      transparent 6px
    );
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px var(--shadow);
  position: relative;
  overflow: hidden;
  animation: float-in 0.9s ease;
}

.hero-content::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(60, 240, 255, 0.2);
  box-shadow: inset 0 0 40px rgba(255, 94, 218, 0.18);
  pointer-events: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--accent-3);
}

.hero h1 {
  font-family: "Press Start 2P", "IBM Plex Mono", monospace;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.2;
  text-shadow: 0 0 12px rgba(60, 240, 255, 0.3),
    0 0 24px rgba(255, 94, 218, 0.2);
}

.lead {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 60ch;
}

.post-list {
  display: grid;
  gap: 1.1rem;
}

.post-list h2 {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-card {
  padding: 1.5rem 1.8rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transition: all 0.6s;
}

.post-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 45px rgba(60, 240, 255, 0.15);
}

.post-card:hover::before {
  left: 100%;
}

.post-card h2,
.post-card h3 {
  margin-bottom: 0.5rem;
}

.post-card-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.post-card-link:focus-visible {
  outline: 2px solid rgba(60, 240, 255, 0.7);
  outline-offset: 4px;
}

.post-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  background: linear-gradient(90deg, var(--ink), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.card-category {
  font-size: 0.7rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(255, 94, 218, 0.3);
  border-radius: 4px;
  background: rgba(255, 94, 218, 0.05);
}

.card-summary {
  font-size: 0.95rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.card-tags {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.card-tag {
  font-size: 0.75rem;
  color: var(--accent-3);
  opacity: 0.8;
}

.post-card:hover h3 {
  filter: drop-shadow(0 0 8px rgba(60, 240, 255, 0.5));
}

.meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-family: "IBM Plex Mono", monospace;
  margin-bottom: 0.8rem;
  display: block;
}

.empty {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--line);
  padding: 1rem 1.2rem;
  border-radius: 12px;
}

.post {
  display: grid;
  gap: 2.2rem;
}

.post-back {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(60, 240, 255, 0.35);
  background: rgba(16, 17, 19, 0.92);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 12px 26px var(--shadow);
}

.back-link:hover {
  color: var(--accent-2);
}

.post-header h1 {
  font-family: "Press Start 2P", "IBM Plex Mono", monospace;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}

.post-header .eyebrow {
  color: #a59f96;
  letter-spacing: 0.18em;
  font-size: 0.6rem;
}

.post-header .meta {
  font-size: 0.65rem;
  color: #9b948b;
}

.post-meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.4rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin-top: 1rem;
}

.tags a {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.75rem;
  border: 1px solid rgba(60, 240, 255, 0.3);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(60, 240, 255, 0.08);
}

.post-body {
  display: grid;
  gap: 1.4rem;
  max-width: 70ch;
  margin: 0 auto;
  font-family: "Space Grotesk", "IBM Plex Mono", sans-serif;
  font-size: 1.05rem;
}

.post-body p,
.post-body li {
  color: #dfd8cf;
}

.post-body h2,
.post-body h3 {
  margin-top: 2rem;
  font-family: "Press Start 2P", "IBM Plex Mono", monospace;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
}

.post-body a {
  color: var(--accent-2);
}

.post-body blockquote {
  border-left: 3px solid var(--accent-2);
  padding-left: 1rem;
  color: var(--muted);
}

.post-body pre {
  padding: 1rem 1.2rem;
  background: #0c0d0f;
  border-radius: 10px;
  border: 1px solid rgba(255, 94, 218, 0.3);
  overflow-x: auto;
}

.toc {
  max-width: 70ch;
  margin: 0 auto;
  padding: 0.6rem 0 0.6rem 1.2rem;
  border-left: 2px solid rgba(60, 240, 255, 0.35);
  background: none;
}

.toc-title {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6rem;
  color: #9b948b;
  margin-bottom: 0.6rem;
}

.toc ul {
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.toc a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-footer {
  max-width: 70ch;
  margin: 0 auto;
  padding-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.pagination {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(60, 240, 255, 0.25);
  text-decoration: none;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-link.current {
  color: var(--accent);
  border-color: rgba(60, 240, 255, 0.6);
  background: rgba(60, 240, 255, 0.08);
}

.page-link:hover {
  color: var(--accent-2);
  border-color: rgba(255, 94, 218, 0.5);
}

.page-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 14px rgba(60, 240, 255, 0.25);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 94, 218, 0.4);
  }
}

@media (max-width: 720px) {
  .site-header .wrap {
    flex-direction: column;
    gap: 0.8rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-content {
    padding: 2rem 1.6rem;
  }

  .brand-text {
    font-size: 0.7rem;
  }

  .post-card {
    padding: 1.3rem;
  }

  .post-back {
    right: 16px;
    bottom: 16px;
  }

  .post-body {
    font-size: 1rem;
  }

  .toc {
    padding: 1rem 1.1rem;
  }
}
