:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #18212b;
  --muted: #667381;
  --line: #dfe5ea;
  --accent: #2271b1;
  --accent-dark: #135e96;
  --warm: #b45309;
  --danger: #c2410c;
  --shadow: 0 12px 30px rgba(20, 31, 43, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

a:hover {
  color: var(--accent);
}

button,
input,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(2.2rem, 4.2vw, 3.55rem);
}

h2 {
  font-size: clamp(1.45rem, 2.3vw, 2rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.wrap {
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 132px;
  text-align: center;
}

.brand {
  display: block;
}

.brand-mark {
  display: none;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: clamp(2.25rem, 4vw, 3.65rem);
  line-height: 1.05;
}

.brand small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

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

.site-nav {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.nav-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 48px;
  gap: 4px;
}

.nav-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  color: #354150;
  font-weight: 700;
}

.nav-inner a:hover {
  background: var(--surface-soft);
  color: var(--accent);
}

.section-card,
.widget {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  padding: 0 16px;
}

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

.button.secondary:hover {
  border-color: var(--accent);
  background: #f0f7fc;
}

.button.full {
  width: 100%;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  padding: 34px 0 72px;
}

.feed,
.sidebar,
.post-list,
#dynamicPosts {
  display: grid;
  gap: 18px;
}

#dynamicPosts:empty {
  display: none;
}

.empty-posts {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 26px;
  text-align: center;
}

.empty-posts[hidden] {
  display: none;
}

.sidebar {
  position: sticky;
  top: 20px;
}

.section-card {
  padding: clamp(22px, 3vw, 30px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.post-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.post-card[hidden] {
  display: none;
}

.featured-post {
  border-color: rgba(34, 113, 177, 0.34);
}

.post-thumb {
  display: block;
  min-height: 168px;
  background:
    linear-gradient(135deg, rgba(34, 113, 177, 0.75), rgba(180, 83, 9, 0.42)),
    url("taric-hero.jpg") center / cover no-repeat;
}

.post-body {
  padding: 20px 20px 20px 0;
}

.post-meta {
  margin: 0 0 9px;
  color: var(--warm);
  font-size: 0.86rem;
  font-weight: 800;
}

.post-body p {
  margin: 0 0 14px;
  color: var(--muted);
}

.post-body h3 {
  margin-bottom: 10px;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: #425160;
  font-size: 0.84rem;
  padding: 5px 10px;
}

.tag-row span:hover {
  border-color: rgba(34, 113, 177, 0.42);
  color: var(--accent);
}

.widget {
  padding: 22px;
}

.widget h2 {
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.widget p {
  color: var(--muted);
}

.category-list,
.link-list {
  display: grid;
  gap: 10px;
}

.category-list a,
.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: #425160;
}

.category-list span {
  color: var(--warm);
  font-weight: 850;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #111827;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  min-height: 74px;
}

.footer-inner a {
  color: #fff;
  font-weight: 750;
}

.article-shell {
  width: min(900px, calc(100% - 32px));
  padding: 48px 0 88px;
}

.article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(28px, 5vw, 58px);
  box-shadow: var(--shadow);
}

.article h1 {
  max-width: 760px;
  font-size: clamp(2.3rem, 5vw, 4rem);
}

@media (max-width: 960px) {
  .masthead,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .masthead {
    align-items: center;
    padding: 24px 0;
  }

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

@media (max-width: 680px) {
  .wrap {
    width: min(100% - 24px, 1360px);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 10px 0;
  }

  .nav-inner {
    gap: 0;
  }

  .nav-inner a {
    padding: 0 10px;
  }

  .post-card,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .post-thumb {
    min-height: 156px;
  }

  .post-body {
    padding: 0 18px 18px;
  }

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