﻿/* Base */
:root {
  --bg: #faf7f2;
  --card: rgba(255, 255, 255, 0.72);
  --text: #2c2c2c;
  --muted: #6b6b6b;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #c17a4f;
  --accent-2: #6a8f7c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --max: 1080px;
  --header-h: 70px;
  --mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
  --serif:
    ui-serif, 'Songti SC', 'STSong', 'Noto Serif SC', 'Source Han Serif SC',
    'SimSun', serif;
  --sans:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans SC',
    'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background: var(--bg);
  position: relative;
  isolation: isolate;
  line-height: 1.65;
  overflow: hidden;
  height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      1200px 600px at 20% 0%,
      rgba(193, 122, 79, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 90% 10%,
      rgba(106, 143, 124, 0.18),
      transparent 55%
    ),
    radial-gradient(
      1200px 900px at 40% 110%,
      rgba(0, 0, 0, 0.05),
      transparent 55%
    ),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: 0.92;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(193, 122, 79, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 10px;
  z-index: 20;
}

.skip-link:focus {
  left: 18px;
  top: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 0;
}

.page-scroll {
  position: absolute;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: linear-gradient(
    to bottom,
    rgba(250, 247, 242, 0.88),
    rgba(250, 247, 242, 0.55)
  );
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 14px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  letter-spacing: 0.5px;
}

.brand .name {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 20px;
  color: inherit;
}

.brand .name:hover {
  color: var(--accent);
}

.brand .tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.navlinks {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: flex-end;
}

.navlinks a {
  padding: 8px 10px;
  border-radius: 10px;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
  text-decoration: none;
}

.navlinks a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(193, 122, 79, 0.6);
}

/* Hero */
.hero {
  /* padding: 42px 0 26px; */
}

.hero-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-top {
  padding: 34px 28px 18px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
}

.title {
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: 1px;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  max-width: 54ch;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: rgba(193, 122, 79, 0.45);
  background: linear-gradient(
    180deg,
    rgba(193, 122, 79, 0.2),
    rgba(255, 255, 255, 0.65)
  );
}

.btn .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 10px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(193, 122, 79, 0.18);
}

.hero-side {
  border-left: 1px dashed var(--line);
  padding-left: 18px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.chip.cat-growth {
  color: #c17a4f;
  border-color: rgba(193, 122, 79, 0.35);
}

.chip.cat-life {
  color: #6a8f7c;
  border-color: rgba(106, 143, 124, 0.35);
}

.chip.cat-bonds {
  color: #7c6f93;
  border-color: rgba(124, 111, 147, 0.35);
}

.chip.cat-travel {
  color: #8a6f4f;
  border-color: rgba(138, 111, 79, 0.35);
}

.chip.cat-daily {
  color: #5f7b8c;
  border-color: rgba(95, 123, 140, 0.35);
}

.chip.cat-stories {
  color: #9a6a7a;
  border-color: rgba(154, 106, 122, 0.35);
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.chip:focus-visible {
  outline: 2px solid rgba(193, 122, 79, 0.35);
  outline-offset: 2px;
}

.hero-bottom {
  padding: 0 28px 22px;
}

/* Layout */
main {
  padding-top: 22px;
}

.grid {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.card h2 {
  margin: 0;
  padding: 18px 18px 8px;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.card p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 14px;
}

.list .post .meta .t,
.list .post .meta .d,
.list .post .meta .info {
  padding-left: 18px;
}

.list {
  padding: 0 12px 12px;
}

.empty-state {
  padding: 16px 12px 18px;
  color: var(--muted);
  font-size: 13px;
}

.post {
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  display: block;
}

.post:first-child {
  border-top: none;
}

.cover {
  width: 92px;
  height: 92px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(
    140deg,
    rgba(193, 122, 79, 0.25),
    rgba(106, 143, 124, 0.2)
  );
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  background-size: cover;
  background-position: center;
}

.cover.has-image {
  color: transparent;
  border: none;
}
.badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(193, 122, 79, 0.2),
    rgba(255, 255, 255, 0.7)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 800;
  color: var(--accent);
  flex: 0 0 auto;
}

.post .meta {
  flex: 1;
  min-width: 0;
  text-align: left;
  justify-self: start;
  width: 100%;
}

.post-link {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: start;
  color: inherit;
  text-align: left;
  justify-items: stretch;
}

.post-link:hover .cover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.post-link:hover .t {
  color: var(--accent);
}

.post-link:hover .t,
.post-link:focus-visible .t {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(193, 122, 79, 0.6);
}

.post .meta .t {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post .meta .d {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post .meta .info {
  /* margin-top: 8px; */
  font-size: 0;
  color: rgba(0, 0, 0, 0.45);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  align-self: flex-start;
  margin-left: 0;
  padding-left: 0;
}

.post .meta .info > * {
  font-size: 12px;
}

.post a:focus-visible {
  outline: 2px solid rgba(193, 122, 79, 0.35);
  outline-offset: 4px;
  border-radius: 10px;
}

.filters {
  padding: 0 18px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #fff;
  color: var(--accent);
  border-color: rgba(193, 122, 79, 0.25);
}

.filter-btn:active {
  transform: translateY(0);
}

.filter-btn[aria-pressed='true'] {
  color: var(--accent);
  border-color: rgba(193, 122, 79, 0.35);
  background: rgba(193, 122, 79, 0.08);
}

.filter-btn.cat-growth[aria-pressed='true'] {
  color: #c17a4f;
  border-color: rgba(193, 122, 79, 0.35);
  background: rgba(193, 122, 79, 0.08);
}

.filter-btn.cat-life[aria-pressed='true'] {
  color: #6a8f7c;
  border-color: rgba(106, 143, 124, 0.35);
  background: rgba(106, 143, 124, 0.08);
}

.filter-btn.cat-bonds[aria-pressed='true'] {
  color: #7c6f93;
  border-color: rgba(124, 111, 147, 0.35);
  background: rgba(124, 111, 147, 0.08);
}

.filter-btn.cat-travel[aria-pressed='true'] {
  color: #8a6f4f;
  border-color: rgba(138, 111, 79, 0.35);
  background: rgba(138, 111, 79, 0.08);
}

.filter-btn.cat-daily[aria-pressed='true'] {
  color: #5f7b8c;
  border-color: rgba(95, 123, 140, 0.35);
  background: rgba(95, 123, 140, 0.08);
}

.filter-btn.cat-stories[aria-pressed='true'] {
  color: #9a6a7a;
  border-color: rgba(154, 106, 122, 0.35);
  background: rgba(154, 106, 122, 0.08);
}

.aside .block {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.aside .block:first-child {
  border-top: none;
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}

.kv:last-child {
  border-bottom: none;
}

.kv b {
  color: var(--text);
}

.quote {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
  color: #3b3b3b;
  margin: 0;
}

.quote small {
  display: block;
  margin-top: 10px;
  color: rgba(0, 0, 0, 0.45);
  font-family: var(--sans);
  font-size: 12px;
}

footer {
  margin-top: 26px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  text-align: center;
  padding: 18px 6px;
}

footer .icp {
  margin-top: 6px;
}

/* Article page */
.article-wrap {
  max-width: 760px;
}

.article-hero {
  margin: 12px 0 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--card);
  box-shadow: var(--shadow);
}

.article-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}

.article-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  padding: 28px;
}

.article-body p {
  margin: 0 0 16px;
  color: #3a3a3a;
}

.article-body h3 {
  margin: 22px 0 10px;
  font-size: 18px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid rgba(193, 122, 79, 0.45);
  background: rgba(193, 122, 79, 0.06);
  color: #4a3b32;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.article-nav a {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  display: block;
  font-size: 14px;
}

.article-nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-card {
    animation: float-in 0.6s ease both;
  }

  .post {
    animation: fade-up 0.5s ease both;
  }

  .post:nth-child(2) {
    animation-delay: 0.05s;
  }

  .post:nth-child(3) {
    animation-delay: 0.1s;
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 920px) {
  .hero-top {
    grid-template-columns: 1fr;
  }

  .hero-side {
    border-left: none;
    border-top: 1px dashed var(--line);
    padding-left: 0;
    padding-top: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .title {
    font-size: 40px;
  }
}

@media (max-width: 520px) {
  .title {
    font-size: 34px;
  }

  .brand .tag {
    display: none;
  }

  .hint {
    display: none;
  }

  .badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .post-link {
    grid-template-columns: 72px 1fr;
  }

  .cover {
    width: 72px;
    height: 72px;
  }

  .article-title {
    font-size: 30px;
  }
}

@media print {
  header,
  .hero,
  .filters,
  .aside,
  footer,
  .article-nav {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card,
  .article-hero,
  .article-body {
    box-shadow: none;
    border: none;
  }
}
