:root {
  color-scheme: light;
  --brand-blue: #244a9b;
  --brand-blue-dark: #0b1f4d;
  --brand-blue-soft: rgba(36, 74, 155, 0.1);
  --brand-orange: #e97835;
  --brand-orange-dark: #b84f21;
  --brand-orange-soft: rgba(233, 120, 53, 0.12);
  --ink: #111827;
  --ink-soft: #596476;
  --paper: #f7f6ef;
  --paper-strong: #fffdf8;
  --line: rgba(36, 74, 155, 0.16);
  --dark: #081735;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  background: var(--dark) url("../../images/banner.jpg") center / cover fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(8, 23, 53, 0.46), rgba(8, 23, 53, 0.88) 64%, rgba(233, 120, 53, 0.18)),
    radial-gradient(circle at 16% 16%, rgba(233, 120, 53, 0.22), transparent 34%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.blog-shell {
  width: min(1480px, calc(100% - clamp(16px, 4vw, 56px)));
  min-height: calc(100svh - clamp(16px, 4vw, 56px));
  margin: clamp(8px, 2vw, 28px) auto;
  overflow: clip;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(244, 247, 255, 0.92) 52%, rgba(247, 246, 239, 0.98)),
    var(--paper);
  border: 1px solid rgba(255, 253, 248, 0.66);
  border-radius: 24px;
  box-shadow: 0 28px 84px rgba(8, 23, 53, 0.32);
}

.blog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 clamp(18px, 4vw, 58px);
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(142px, 12vw, 188px);
  max-height: 50px;
  object-fit: contain;
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  color: rgba(17, 24, 39, 0.74);
  font-size: 14px;
}

.blog-nav-toggle {
  display: none;
  width: 52px;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.76);
  cursor: pointer;
}

.blog-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--brand-blue-dark);
  border-radius: 999px;
}

.blog-nav a {
  text-decoration: none;
}

.blog-nav a:hover,
.blog-nav a:focus-visible {
  color: var(--brand-blue);
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  padding: clamp(64px, 9vw, 118px) clamp(20px, 5vw, 78px) clamp(44px, 7vw, 72px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 92% 12%, rgba(233, 120, 53, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(244, 247, 255, 0.78), rgba(255, 247, 240, 0.58));
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.blog-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 5.4vw, 72px);
  font-weight: 780;
  line-height: 1.05;
  word-break: keep-all;
}

.lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.75;
}

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin-top: 22px;
}

.topic-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  color: var(--brand-blue);
  border: 1px solid rgba(36, 74, 155, 0.2);
  border-radius: 999px;
  background: var(--brand-blue-soft);
  font-size: 12px;
  font-weight: 700;
}

.search-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.76);
}

.search-panel label {
  display: block;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-row input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  outline: none;
}

.search-row input:focus {
  border-color: rgba(36, 74, 155, 0.48);
  box-shadow: 0 0 0 4px rgba(36, 74, 155, 0.12);
}

.search-row button {
  min-width: 78px;
  height: 46px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  cursor: pointer;
}

.blog-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px clamp(20px, 5vw, 78px);
  border-bottom: 1px solid var(--line);
}

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-btn {
  min-height: 34px;
  padding: 0 14px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  cursor: pointer;
}

.tag-btn:hover,
.tag-btn:focus-visible {
  color: var(--brand-blue);
  border-color: rgba(36, 74, 155, 0.38);
}

.tag-btn.is-active {
  color: #fff;
  border-color: var(--brand-orange);
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
}

.stats {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-height: 360px;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 78px) clamp(70px, 9vw, 112px);
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.article-card:hover,
.article-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(36, 74, 155, 0.34);
  box-shadow: 0 18px 38px rgba(36, 74, 155, 0.13);
}

.card-cover,
.card-fallback {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.card-cover {
  object-fit: cover;
  background: rgba(36, 74, 155, 0.1);
}

.card-fallback {
  display: grid;
  align-items: end;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(36, 74, 155, 0.94), rgba(8, 23, 53, 0.98) 70%, rgba(233, 120, 53, 0.78)),
    url("../../images/three.jpg") center / cover;
}

.card-fallback span {
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.card-tag {
  padding: 3px 9px;
  color: var(--brand-blue);
  border: 1px solid rgba(36, 74, 155, 0.2);
  border-radius: 999px;
  background: var(--brand-blue-soft);
  font-size: 12px;
}

.card-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
}

.card-summary {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.card-read {
  color: var(--brand-orange);
  font-weight: 700;
  white-space: nowrap;
}

.loading {
  grid-column: 1 / -1;
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  padding: 80px 0;
}

.loading span {
  width: 8px;
  height: 8px;
  background: var(--brand-orange);
  border-radius: 999px;
  animation: bounce 1.1s infinite;
}

.loading span:nth-child(2) {
  animation-delay: 0.16s;
}

.loading span:nth-child(3) {
  animation-delay: 0.32s;
}

.empty {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.68);
}

.empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 1080px) {
  .blog-hero,
  .blog-toolbar {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  body {
    background-attachment: scroll;
  }

  .blog-shell {
    width: min(100%, calc(100% - 14px));
    margin: 7px auto;
    border-radius: 18px;
  }

  .blog-header {
    min-height: 66px;
  }

  .brand-logo {
    width: clamp(110px, 32vw, 136px);
    max-height: 40px;
  }

  .blog-nav-toggle {
    display: block;
  }

  .blog-nav {
    position: absolute;
    top: calc(100% - 1px);
    left: 14px;
    right: 14px;
    display: grid;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.98);
    box-shadow: 0 20px 48px rgba(8, 23, 53, 0.18);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
  }

  .blog-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .blog-nav a {
    padding: 13px 10px;
  }

  .blog-hero h1 {
    font-size: clamp(38px, 11vw, 48px);
    word-break: normal;
  }

  .search-row,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .search-row button {
    width: 100%;
  }
}
