:root {
  --bg: #f8f5ee;
  --bg-soft: #f2ece2;
  --paper: #fffdf8;
  --stroke: #6f3b34;
  --text: #372821;
  --text-soft: #6a5a50;
  --line: rgba(111, 59, 52, 0.24);
  --shadow: 0 12px 28px rgba(111, 59, 52, 0.12);
  --radius-lg: 30px;
  --radius-md: 20px;
  --chip-ai: #e9e4ff;
  --chip-pbl: #ffe8d4;
  --chip-family: #e6f7ea;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 221, 186, 0.5) 0, rgba(255, 221, 186, 0) 26%),
    radial-gradient(circle at 92% 10%, rgba(255, 206, 224, 0.42) 0, rgba(255, 206, 224, 0) 24%),
    var(--bg);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 238, 0.94);
  backdrop-filter: blur(8px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
}

.brand span {
  font-family: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.95rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
}

.section {
  padding: clamp(3.8rem, 6vw, 6rem) 0;
}

.section-soft {
  background: var(--bg-soft);
  border-top: 1px solid rgba(111, 59, 52, 0.14);
  border-bottom: 1px solid rgba(111, 59, 52, 0.14);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--text-soft);
  font-size: 0.85rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
}

h1,
h2 {
  font-family: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.9rem);
}

h2 {
  font-size: clamp(1.7rem, 3.1vw, 2.6rem);
}

h3 {
  font-size: clamp(1.08rem, 2.1vw, 1.35rem);
}

p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.9;
}

.hero {
  padding-top: clamp(3.8rem, 7vw, 5.5rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1rem, 4vw, 2rem);
  align-items: center;
}

.hero-copy .lead {
  margin-top: 1rem;
  max-width: 640px;
}

.hero-meta {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.42rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  min-height: clamp(300px, 48vw, 460px);
}

.hero-ip {
  width: clamp(230px, 32vw, 440px);
  margin: 0 auto;
}

.hero-ip-sub {
  position: absolute;
  right: 0;
  bottom: 8%;
  width: clamp(90px, 12vw, 160px);
}

.section-head {
  margin-bottom: 1.5rem;
}

.paper-card {
  background: var(--paper);
  border: 2px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.featured-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1rem;
  align-items: stretch;
}

.article-card {
  padding: 1.4rem 1.3rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.card-meta span {
  font-size: 0.83rem;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  background: rgba(255, 255, 255, 0.72);
}

.featured-aside {
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
}

.featured-aside hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 0.9rem 0;
}

.aside-ip {
  width: 140px;
  margin: 0 auto 0.7rem;
}

.dot-list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

.dot-list li {
  color: var(--text-soft);
  line-height: 1.8;
}

.dot-list.compact li {
  line-height: 1.7;
  font-size: 0.95rem;
}

.text-link {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  font-weight: 700;
}

.text-link::after {
  content: "→";
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.post-card {
  background: #fff;
  border: 2px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.post-card h3 {
  margin: 0.5rem 0 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text);
}

.chip-ai {
  background: var(--chip-ai);
}

.chip-pbl {
  background: var(--chip-pbl);
}

.chip-family {
  background: var(--chip-family);
}

.card-meta.small {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.series-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.series-list {
  display: grid;
  gap: 0.85rem;
}

.series-item {
  padding: 1rem 1rem 1.05rem;
}

.series-item h3 {
  margin-bottom: 0.45rem;
}

.series-item ol {
  margin: 0;
  padding-left: 1.2rem;
}

.series-item li {
  color: var(--text-soft);
  line-height: 1.8;
}

.series-aside {
  position: relative;
  padding: 1rem;
  overflow: hidden;
}

.series-aside > img:first-child {
  border: 1px solid var(--line);
  border-radius: 18px;
}

.series-aside h3 {
  margin: 0.8rem 0 0.4rem;
}

.series-aside .corner {
  position: absolute;
  width: 140px;
  right: -14px;
  bottom: -20px;
}

.longread-layout {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 1rem;
  align-items: start;
}

.longread {
  padding: 1.35rem 1.25rem;
}

.longread-head {
  margin-bottom: 1rem;
}

.longread h3 {
  margin: 1rem 0 0.45rem;
}

.longread blockquote {
  margin: 1rem 0;
  border-left: 4px solid #c28f83;
  background: #fff6ee;
  border-radius: 0 14px 14px 0;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-weight: 700;
}

.source-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: #7d6a5f;
}

.sidebar {
  display: grid;
  gap: 0.9rem;
}

.side-card {
  padding: 1rem;
}

.side-ip {
  width: 125px;
  margin: 0 auto 0.6rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

.about-grid .paper-card {
  padding: 1.2rem;
}

.about-grid p + p {
  margin-top: 0.7rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0 1.8rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem;
}

.footer-inner p {
  font-size: 0.9rem;
}

.hover-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 24px rgba(111, 59, 52, 0.16);
}

.floating {
  animation: float 3.8s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-layout,
  .series-layout,
  .longread-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    padding: 0.8rem 0;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
    width: 100%;
  }

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

  .hero-visual {
    min-height: 240px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(1120px, calc(100% - 1.2rem));
  }

  .section {
    padding: 3.2rem 0;
  }

  .brand span {
    font-size: 1.02rem;
  }

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

  .card-meta {
    gap: 0.35rem;
  }

  .card-meta span {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
