:root {
  color-scheme: light;
  --bg-page: #f9fafb;
  --bg-card: #ffffff;
  --bg-hero: linear-gradient(120deg, #1b73e8, #7828c8);
  --text-primary: #1f2933;
  --text-secondary: #52606d;
  --text-inverse: #fdfdfd;
  --border-subtle: #e5e7eb;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-sm: 10px;
  --accent: #1b73e8;
  --accent-dark: #1254a7;
  --muted: #d2dae2;
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
}

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

.site-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(27, 115, 232, 0.06);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: saturate(140%) blur(10px);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.9rem clamp(1.5rem, 6vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(31, 41, 51, 0.55);
}

.primary-nav {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.primary-nav a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.inline-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
  padding: clamp(3.4rem, 6vw, 4.4rem) clamp(1.5rem, 6vw, 3rem);
  background: #f4f7fb;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -120px 40% 30% -120px;
  background: radial-gradient(circle at center, rgba(27, 115, 232, 0.18), transparent 70%);
  filter: blur(0px);
  opacity: 0.9;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 10% -120px -80px 55%;
  background: radial-gradient(circle at center, rgba(120, 40, 200, 0.18), transparent 70%);
  opacity: 0.65;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(2rem, 6vw, 3rem);
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-copy p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
  color: rgba(31, 41, 51, 0.75);
}

.hero-search {
  background: #fff;
  border-radius: 20px;
  padding: clamp(1.6rem, 4vw, 2.1rem);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(27, 115, 232, 0.12);
}

.search-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(31, 41, 51, 0.55);
  margin-bottom: 0.8rem;
}

.search-bar {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.search-bar input {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(27, 115, 232, 0.25);
  font-size: 1rem;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
}

.search-bar button {
  padding: 0.9rem 1.5rem;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-bar button:hover {
  background: var(--accent-dark);
}

.hero-pills {
  list-style: none;
  margin: clamp(1rem, 2vw, 1.4rem) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-pills a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(27, 115, 232, 0.1);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
}

.hero.detail {
  padding: clamp(3.2rem, 6vw, 4rem) clamp(1.5rem, 6vw, 3rem);
  background: linear-gradient(135deg, rgba(27, 115, 232, 0.16), rgba(120, 40, 200, 0.14));
  color: #fff;
}

.hero.detail .hero-inner {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
}

.hero.detail .hero-copy h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.hero.detail .hero-copy p,
.hero.detail .meta span {
  color: rgba(255, 255, 255, 0.85);
}

.hero.detail .meta {
  margin-top: 1.25rem;
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.hero.detail .hero-cta {
  display: flex;
  align-items: center;
}

.search {
  margin-top: clamp(2rem, 5vw, 2.75rem);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.search input {
  flex: 1;
  min-width: min(320px, 100%);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.search button {
  background: var(--text-inverse);
  color: #1a46a5;
  border: none;
  padding: 0.9rem 1.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(10, 20, 50, 0.2);
}

.search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(10, 20, 50, 0.24);
}

.content {
  width: min(1100px, 88vw);
  margin: clamp(-2.5rem, -5vw, -3.5rem) auto 4rem;
  flex: 1;
}

.content.detail {
  margin-top: clamp(-3rem, -5vw, -3.5rem);
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  color: var(--text-secondary);
}

.posts-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}

.post-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #e1e6ef;
  border-top: 4px solid rgba(27, 115, 232, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 100%;
}

.post-card:hover {
  border-color: rgba(27, 115, 232, 0.7);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.post-card h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.post-card h2 a {
  color: var(--text-primary);
}

.post-card h2 a:hover {
  color: var(--accent);
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.tag {
  background: #eef3ff;
  color: var(--accent);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid rgba(27, 115, 232, 0.15);
}

.post-card .tag-list {
  margin-top: 0.75rem;
}

.post-card__meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.post-summary {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.hero-topic {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-topic .topic-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  opacity: 0.8;
}

.hero-topic .topic-value {
  font-size: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(27, 115, 232, 0.3);
}

.button.secondary:hover {
  background: rgba(27, 115, 232, 0.06);
  border-color: rgba(27, 115, 232, 0.4);
}

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

.pagination a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  border: 1px solid var(--muted);
  transition: all 0.2s ease;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.pagination a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(27, 115, 232, 0.24);
}

.empty-state {
  margin: 4rem auto;
  text-align: center;
  background: #fff;
  padding: 3rem;
  border-radius: var(--radius-lg);
  max-width: 520px;
  box-shadow: var(--shadow-soft);
}

.empty-state h2 {
  margin-bottom: 0.75rem;
}

.post-body {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 3.5rem);
  box-shadow: var(--shadow-soft);
  line-height: 1.75;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-body h2:first-child,
.post-body h3:first-child,
.post-body h4:first-child {
  margin-top: 0;
}

.post-body p {
  margin: 1.1rem 0;
}

.post-body ul {
  padding-left: 1.5rem;
  margin: 1.25rem 0;
}

.post-body ul li {
  margin-bottom: 0.65rem;
}

.site-footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.status-page {
  margin: auto;
  background: #fff;
  padding: 3rem 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: center;
  width: min(500px, 85vw);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.back-link:hover {
  color: #fff;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .primary-nav {
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
  }

  .hero {
    padding: 2.8rem 1.5rem 3.2rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero-pills {
    gap: 0.45rem;
  }

  .hero.detail .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero.detail .hero-cta {
    justify-content: flex-start;
  }

  .content {
    margin-inline: min(1.5rem, 8vw);
  }

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

}

.related-bottom {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.related-bottom-inner {
  background: linear-gradient(135deg, rgba(27, 115, 232, 0.11), rgba(120, 40, 200, 0.12));
  border-radius: 22px;
  padding: clamp(2.2rem, 5vw, 3.4rem);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
}

.related-bottom h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.65rem);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.related-intro {
  margin: 0.85rem 0 clamp(1.75rem, 3.2vw, 2.25rem);
  color: rgba(31, 41, 51, 0.72);
  font-size: 1rem;
  max-width: 680px;
  line-height: 1.7;
}

.related-bottom-grid {
  display: grid;
  gap: clamp(1.35rem, 3vw, 1.85rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.related-bottom-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(27, 115, 232, 0.12);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-bottom-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 55px rgba(15, 23, 42, 0.12);
}

.related-bottom-link {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.9rem;
  height: 100%;
  color: var(--text-primary);
}

.related-bottom-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.related-bottom-card h3 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.related-bottom-card p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.related-bottom-cta {
  margin-top: auto;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.related-bottom-cta::after {
  content: '→';
  font-size: 1rem;
}

@media (max-width: 768px) {
  .related-bottom-inner {
    padding: 2rem 1.5rem;
  }
}
