:root {
  --paper: #f3efe4;
  --paper-deep: #e8dfcf;
  --ink: #1a1b18;
  --muted: #69695f;
  --red: #b74634;
  --amber: #e1a536;
  --green: #3f6b55;
  --line: rgba(26, 27, 24, 0.22);
  --white: #fffdf8;
  --shadow: 8px 8px 0 var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
}

button,
input,
select {
  font: inherit;
}

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(1320px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--ink);
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--paper);
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  background: var(--red);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.12em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.home-link {
  font-size: 13px;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.6fr);
  min-height: 650px;
  border-bottom: 1px solid var(--ink);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 88px 7vw 88px 0;
  border-right: 1px solid var(--ink);
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(72px, 10vw, 152px);
  font-weight: 600;
  line-height: 0.84;
  letter-spacing: -0.08em;
}

.hero-intro {
  max-width: 620px;
  margin: 48px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  align-content: center;
}

.hero-stats div {
  min-height: 170px;
  padding: 32px;
  border-bottom: 1px solid var(--ink);
}

.hero-stats div:nth-child(odd) {
  border-right: 1px solid var(--ink);
}

.hero-stats div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.hero-stats dt {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hero-stats dd {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(48px, 5vw, 78px);
  line-height: 1;
}

.hero-stats .stat-date {
  font-size: clamp(38px, 4vw, 62px);
}

.library {
  padding: 104px 0 120px;
}

.library-heading {
  display: flex;
  gap: 48px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 48px;
}

.library-heading h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}

.library-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.filter-panel {
  padding: 28px;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.search-field,
.filter-row label {
  display: grid;
  gap: 10px;
}

.search-field > span,
.filter-row label > span,
.filter-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.search-field input,
.filter-row select {
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: none;
}

.search-field input {
  padding: 6px 0 16px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(26px, 4vw, 48px);
}

.search-field input::placeholder {
  color: #aaa394;
}

.search-field input:focus,
.filter-row select:focus {
  border-bottom-width: 3px;
}

.module-filter {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.module-button,
.results-bar button,
.empty-state button,
.load-more {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  cursor: pointer;
}

.module-button {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
}

.module-button span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
}

.module-button:hover,
.module-button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
}

.module-button[aria-pressed="true"] span,
.module-button:hover span {
  color: var(--paper-deep);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.filter-row select {
  padding: 8px 0 12px;
  cursor: pointer;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 50px 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.results-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.results-bar strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 24px;
}

.results-bar button {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 999px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 24px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 18px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.article-card:hover,
.article-card:focus-visible {
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-3px, -3px);
}

.article-card:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.card-topline,
.card-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.card-topline {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.track-tag {
  max-width: 70%;
  overflow: hidden;
  color: var(--red);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-card h3 {
  margin: 44px 0 14px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.article-card .card-description {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  font-weight: 900;
  border-top: 1px solid var(--line);
}

.card-footer span:last-child {
  color: var(--red);
}

.empty-state {
  padding: 80px 24px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 18px;
}

.empty-state p {
  margin: 0 0 18px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 30px;
}

.empty-state button {
  padding: 10px 16px;
  border-radius: 999px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 38px;
}

.load-more {
  min-width: 180px;
  padding: 14px 22px;
  font-weight: 900;
  background: var(--amber);
  border-radius: 999px;
}

.load-more:hover {
  color: var(--paper);
  background: var(--ink);
}

footer {
  display: flex;
  gap: 36px;
  align-items: end;
  justify-content: space-between;
  padding: 36px 0 54px;
  border-top: 1px solid var(--ink);
}

footer strong {
  font-size: 13px;
  letter-spacing: 0.12em;
}

footer p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

  .hero-copy {
    min-height: 580px;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .hero-stats {
    min-height: 340px;
  }

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

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1320px);
  }

  .site-header {
    min-height: 78px;
  }

  .home-link {
    font-size: 0;
  }

  .home-link::after {
    content: "个人站 ↗";
    font-size: 12px;
  }

  .hero-copy {
    min-height: 500px;
    padding: 68px 0;
  }

  h1 {
    font-size: clamp(66px, 24vw, 110px);
  }

  .hero-intro {
    margin-top: 34px;
    font-size: 17px;
  }

  .hero-stats div {
    min-height: 130px;
    padding: 22px 16px;
  }

  .hero-stats dt {
    margin-bottom: 16px;
  }

  .library {
    padding: 76px 0 90px;
  }

  .library-heading {
    display: grid;
    gap: 22px;
  }

  .filter-panel {
    padding: 20px;
    box-shadow: 5px 5px 0 var(--ink);
  }

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

  .article-card {
    min-height: 230px;
  }

  .article-card h3 {
    margin-top: 36px;
  }

  footer {
    display: grid;
    align-items: start;
  }
}

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