/* ============================================================
   LIST PAGE — list.css
   ============================================================ */

/* --- Page tokens --- */
:root {
  --radius-card:  1.8rem;
  --radius-thumb: 1.2rem;
  --radius-pg:    0.75rem;
  --container:    min(1500px, 100% - 64px);
  --transition-card: 500ms cubic-bezier(.22,.68,0,1.2);
  --transition-img:  700ms cubic-bezier(.22,.68,0,1.2);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }

/* --- Container utility --- */
.wrap { width: var(--container); margin-inline: auto; }

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--line);
}
header > div {
  width: var(--container);
  margin-inline: auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
header > div > a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  flex-shrink: 0;
}
header > div > a svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-deep);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Desktop nav */
#site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
#site-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  color: var(--subtle);
  transition: background 200ms, color 200ms;
}
#site-nav a:hover {
  background: var(--bg);
  color: var(--text);
}

/* Action buttons */
header > div > .actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-btn,
.search-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  transition: background 200ms;
}
.menu-btn:hover,
.search-btn:hover { background: var(--bg); }
.menu-btn svg,
.search-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--subtle);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-btn { display: none; }

/* Mobile nav */
@media (max-width: 768px) {
  .menu-btn { display: flex; }
  #site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 16px;
    gap: 2px;
    box-shadow: var(--shadow-soft);
  }
  #site-nav.is-open { display: flex; }
  #site-nav a {
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 1rem;
  }
}

/* ============================================================
   MAIN
   ============================================================ */
main {
  flex: 1;
  width: var(--container);
  margin-inline: auto;
  padding-block: 40px 64px;
}

/* --- Page header --- */
.page-header {
  margin-bottom: 32px;
}
.page-header nav[aria-label="面包屑"] {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.page-header nav[aria-label="面包屑"] a {
  color: var(--muted);
  transition: color 200ms;
}
.page-header nav[aria-label="面包屑"] a:hover { color: var(--text); }
.page-header nav[aria-label="面包屑"] span { opacity: 0.5; font-size: 0.7rem; }
.page-header nav[aria-label="面包屑"] strong { color: var(--text); font-weight: 500; }

.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.page-header h1 em {
  font-style: normal;
  color: var(--accent);
  margin-inline: 8px;
}
.page-header h1 span { color: var(--accent-deep); }

/* --- Category filter bar --- */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  margin-bottom: 32px;
}
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--subtle);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 200ms, color 200ms, border-color 200ms, box-shadow 200ms;
  white-space: nowrap;
}
.filters button:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}
.filters button.active,
.filters button[aria-pressed="true"] {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  box-shadow: 0 4px 12px -2px rgba(0,0,0,0.18);
}

/* --- Article grid --- */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (min-width: 640px)  { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .article-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .article-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1340px) { .article-grid { grid-template-columns: repeat(5, 1fr); } }

/* --- Card --- */
.article-grid li { position: relative; }

.article-grid article {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-card), box-shadow var(--transition-card), border-color var(--transition-card);
  box-shadow: var(--shadow-card);
  position: relative;
}
.article-grid article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

/* Thumb */
.thumb {
  position: relative;
  flex-shrink: 0;
  padding: 12px 12px 0;
}
.thumb-inner {
  overflow: hidden;
  border-radius: var(--radius-thumb);
  aspect-ratio: 3 / 4;
  background: var(--bg);
}
.thumb-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-img);
}
.article-grid article:hover .thumb-inner img {
  transform: scale(1.08);
}

/* Badge */
.badge {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  font-size: 0.625rem;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}
.badge span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warn);
  flex-shrink: 0;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* Card body */
.info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Meta */
.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.meta time { font-variant-numeric: tabular-nums; }
.meta .highlight {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: rgba(121,189,154,0.15);
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 0.72rem;
}

/* Title — full-card click via ::after */
.info h2 {
  font-size: 1.0625rem;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text);
  flex: 1;
}
.info h2 a {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 200ms;
}
.info h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-card);
}
.info h2 a:hover { color: var(--warn); }

/* Card footer */
.info footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  position: relative;
  z-index: 2;
}
.tag {
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}
.views {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}
.views svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Keep the semantic footer inside a card visually separate from the page footer. */
.info footer {
  background: transparent;
  padding: 0;
  margin-top: 0;
  border-radius: 0;
  color: var(--muted);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: var(--radius-pg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--subtle);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 200ms, border-color 200ms, color 200ms;
}
.pagination a:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--text);
}
.pagination a[aria-current="page"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}
.pagination span {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1rem;
}
.pagination a[aria-label] svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   PAGE FOOTER (green card)
   ============================================================ */
.footer-wrap {
  width: var(--container);
  margin-inline: auto;
  padding-bottom: 40px;
  margin-top: 40px;
}
footer {
  background: var(--footer-bg);
  border-radius: 2.5rem;
  padding: 40px 56px;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow-soft);
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-top > a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-top > a svg {
  width: 28px;
  height: 28px;
  stroke: var(--text);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-top > nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
}
.footer-top > nav a {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  transition: color 200ms;
}
.footer-top > nav a:hover { color: var(--warn); }
footer hr {
  border: none;
  border-top: 1px solid #c2d0cc;
  margin: 32px 0;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}
.footer-bottom > div {
  display: flex;
  gap: 40px;
}
.footer-bottom a {
  color: var(--muted);
  transition: color 200ms;
}
.footer-bottom a:hover { color: var(--warn); }

@media (max-width: 640px) {
  :root { --container: min(1500px, 100% - 32px); }
  footer { padding: 28px 24px; border-radius: 1.5rem; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
