@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 400;
  src: local("Noto Serif SC");
}

:root {
  --bg: #0b0f14;
  --panel: #141b22;
  --text: #e6e1db;
  --muted: #9aa5b1;
  --accent: #7db28a;
  --border: #26303a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  background: radial-gradient(circle at top, #1a2330 0%, #0b0f14 55%, #070a0f 100%);
  color: var(--text);
  line-height: 1.7;
}

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

.click-pop-target {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.click-pop {
  animation: click-pop 0.18s ease-out;
}

@keyframes click-pop {
  0% {
    transform: scale(1);
    box-shadow: none;
  }
  50% {
    transform: scale(0.985);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  }
  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

.site {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}

.brand {
  display: flex;
  gap: 20px;
  align-items: center;
}

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text .title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
}

.brand-text .subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.95rem;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 32px;
}

.intro {
  display: flex;
  justify-content: flex-start;
}

.intro-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 24px 28px;
  border-radius: 18px;
  max-width: 640px;
  box-shadow: 0 20px 40px rgba(7, 10, 15, 0.45);
}

.intro-card h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.section-link {
  font-size: 0.9rem;
  color: var(--muted);
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: var(--text);
  border-color: var(--accent);
  background: #1e2630;
}

.pagination {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.page-btn {
  border: 1px solid var(--border);
  background: #10161d;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-width: 40px;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.page-btn:hover {
  border-color: rgba(125, 178, 138, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  background: #1a222b;
}

.page-btn:active {
  transform: translateY(1px) scale(0.98);
}

.page-btn.active {
  background: var(--accent);
  color: #0b0f14;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(125, 178, 138, 0.35);
  pointer-events: none;
}

.page-btn.disabled {
  color: var(--muted);
  background: #0f141a;
  border-color: #1f2a34;
  cursor: not-allowed;
  box-shadow: none;
}

.list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.posts-list {
  grid-template-columns: 1fr;
  max-width: 860px;
  width: 100%;
  gap: 18px;
  justify-self: center;
  justify-items: stretch;
}

.posts-list .card {
  min-height: auto;
  padding: 22px 24px;
}

.horizontal-list {
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  grid-template-columns: unset;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.horizontal-list::-webkit-scrollbar {
  height: 6px;
}

.horizontal-list::-webkit-scrollbar-track {
  background: #10161d;
  border-radius: 999px;
}

.horizontal-list::-webkit-scrollbar-thumb {
  background: #283240;
  border-radius: 999px;
}

.horizontal-list .card {
  min-height: 200px;
}

.card {
  padding: 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.card:hover {
  border-color: rgba(125, 178, 138, 0.45);
  background: #1a222b;
  box-shadow: 0 18px 34px rgba(6, 10, 14, 0.45);
}

.card:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: 0 10px 24px rgba(6, 10, 14, 0.4);
}

.card .meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card .summary {
  margin: 0;
  color: var(--muted);
}

.card .link {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.9rem;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
}

.content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.markdown {
  display: grid;
  gap: 16px;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  margin: 0;
  line-height: 1.35;
}

.markdown p {
  margin: 0;
  color: var(--text);
}

.markdown ul,
.markdown ol {
  margin: 0 0 0 18px;
  padding: 0;
  color: var(--text);
}

.markdown li {
  margin-bottom: 8px;
}

.markdown a {
  color: var(--accent);
}

.markdown code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #1c232c;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.post-nav {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.nav-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.nav-card strong {
  font-size: 1rem;
}

.nav-tag {
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-meta {
  font-size: 0.85rem;
  color: var(--muted);
}


.site-footer {
  margin-top: 56px;
  color: var(--muted);
  font-size: 0.85rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
}

.content-area {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 24px;
  align-self: start;
}

.side-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-card h3 {
  margin: 0;
  font-size: 1rem;
}

.search-input {
  border: 1px solid var(--border);
  background: #0f141a;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.search-input::placeholder {
  color: var(--muted);
}

.side-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: rgba(8, 12, 18, 0.6);
  text-align: center;
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .site {
    padding: 36px 18px 56px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 12px;
    justify-content: flex-start;
  }

  .list {
    grid-template-columns: 1fr;
  }

  .posts-list {
    max-width: 100%;
  }

  .horizontal-list {
    grid-auto-columns: minmax(220px, 1fr);
  }
}
