/* --- Self-hosted Google Fonts fallback --- */
/* Font will fall back to system fonts if Google Fonts CDN is unreachable */

/* ==========================================
   APICK — Design System
   White editorial premium,对标 Stratechery / Foreign Affairs
   ========================================== */

/* --- Google Fonts --- */

/* --- CSS Variables --- */
:root {
  --bg-page:        #FAFAF7;
  --bg-surface:     #F4F4F0;
  --bg-tag:         #F0EFEA;
  --border-divider: #E5E5E0;
  --border-stroke:  #D5D5D0;

  --text-primary:   #1A1A1A;
  --text-secondary: #666660;
  --text-tertiary:  #999990;
  --text-placeholder: #BBBBB5;
  --text-lead:      #2A2A2A;
  --text-body:      #555555;

  --accent:         #8B6914;
  --accent-hover:   #A67C18;
  --white:          #FFFFFF;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
}

/* --- Typography --- */
.playfair    { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; }
.playfair-i  { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-style: italic; }
.source      { font-family: 'Source Serif 4', Georgia, serif; }
.source-i    { font-family: 'Source Serif 4', Georgia, serif; font-style: italic; }
.inter       { font-family: 'Inter', 'Helvetica Neue', sans-serif; font-weight: 700; }
.mono        { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* --- Layout Shell --- */
.shell {
  width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* --- Navbar --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 80px;
  background: var(--bg-page);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand .diamond {
  font-size: 10px;
  color: var(--accent);
  line-height: 1;
}
.nav-brand .brand-name {
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--text-primary);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active { color: var(--text-primary); }

.nav-divider {
  height: 1px;
  background: var(--border-divider);
  margin: 0 80px;
}

/* --- Dividers --- */
.section-divider {
  height: 1px;
  background: var(--border-divider);
  margin: 0 80px;
}
.divider-gold {
  height: 2px;
  background: var(--accent);
  margin: 0 80px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 14px 32px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-stroke);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-block {
  width: 100%;
  height: 52px;
  font-size: 12px;
  letter-spacing: 2px;
}

/* --- Tags --- */
.tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--accent);
  background: var(--bg-tag);
  padding: 4px 10px;
}

/* --- Eyebrow --- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
}

/* --- Hero Section --- */
.hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 100px 80px 80px;
}
.hero-headline {
  font-size: 92px;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text-primary);
}
.hero-desc {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 680px;
}
.hero-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  padding-top: 16px;
}

/* --- Featured Article --- */
.featured {
  display: flex;
  gap: 0;
  padding: 64px 80px;
}
.featured-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 64px;
}
.featured-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--accent);
}
.featured-title {
  font-size: 44px;
  line-height: 1.18;
  letter-spacing: -1px;
  color: var(--text-primary);
}
.featured-excerpt {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.featured-meta {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}
.featured-img {
  width: 520px;
  height: 340px;
  background: var(--bg-tag);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.featured-img span {
  font-size: 12px;
  color: var(--text-placeholder);
}

/* --- Article Grid (3-col) --- */
.article-grid-section {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 56px 80px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-header .section-title {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-tertiary);
}
.section-header .section-more {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  text-decoration: none;
}
.article-grid {
  display: flex;
  gap: 1px;
}
.article-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
}
.article-card:first-child { padding-left: 0; }
.article-card:last-child  { padding-right: 0; }
.article-card .card-title {
  font-size: 22px;
  line-height: 1.36;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.article-card .card-excerpt {
  font-size: 14px;
  line-height: 1.57;
  color: var(--text-secondary);
}
.article-card .card-meta {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-placeholder);
}
.card-divider {
  width: 1px;
  background: var(--border-divider);
  align-self: stretch;
}

/* --- Article List (numbered) --- */
.article-list-section {
  display: flex;
  gap: 80px;
  padding: 48px 80px;
}
.list-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.list-header {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.list-header-div {
  height: 1px;
  background: var(--border-divider);
  margin-bottom: 0;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-divider);
}
.list-item:last-child { border-bottom: none; }
.list-num {
  font-size: 11px;
  color: var(--accent);
  width: 32px;
  flex-shrink: 0;
}
.list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.list-content .list-title {
  font-size: 18px;
  line-height: 1.33;
  color: var(--text-primary);
}
.list-content .list-meta {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}

/* --- Sidebar --- */
.sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex-shrink: 0;
}
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-tertiary);
}
.sidebar-divider {
  height: 1px;
  background: var(--border-divider);
}
.sidebar-text {
  font-size: 14px;
  line-height: 1.57;
  color: var(--text-secondary);
}
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cat-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.cat-link:hover,
.cat-link.active { color: var(--accent); }

/* --- Newsletter --- */
.newsletter {
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 80px;
  background: var(--bg-surface);
}
.nl-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nl-headline {
  font-size: 42px;
  color: var(--text-primary);
}
.nl-desc {
  font-size: 16px;
  color: var(--text-secondary);
}
.nl-right {
  width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nl-input {
  height: 52px;
  padding: 0 20px;
  border: 1px solid var(--border-stroke);
  background: var(--white);
  font-size: 14px;
  color: var(--text-placeholder);
  outline: none;
}
.nl-input:focus { border-color: var(--accent); }
.nl-note {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-placeholder);
}

/* --- Footer --- */
.footer {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 56px 80px 40px;
  background: var(--bg-surface);
}
.footer-top {
  display: flex;
  gap: 80px;
}
.footer-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-brand-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand-name .diamond {
  font-size: 10px;
  color: var(--accent);
}
.footer-brand-name .brand-text {
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--text-primary);
}
.footer-tagline {
  font-size: 14px;
  color: var(--text-tertiary);
}
.footer-social {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  text-decoration: none;
}
.footer-nav {
  flex: 1;
  display: flex;
  gap: 80px;
}
.footer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col-title {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-tertiary);
}
.footer-link {
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copyright {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-placeholder);
}
.footer-motto {
  font-size: 11px;
  color: var(--text-placeholder);
}

/* ==========================================
   Page 2: Articles List
   ========================================== */

.page-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 64px 80px 48px;
}
.page-title {
  font-size: 72px;
  letter-spacing: -2px;
  color: var(--text-primary);
}
.page-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 80px;
}
.filter-btn {
  font-size: 10px;
  letter-spacing: 2px;
  padding: 8px 16px;
  cursor: pointer;
  border: 1px solid var(--border-stroke);
  background: transparent;
  color: var(--text-tertiary);
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* Articles content area */
.articles-content {
  display: flex;
  gap: 80px;
  padding: 48px 80px;
}
.articles-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-row {
  display: flex;
  gap: 28px;
  padding: 28px 0;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-divider);
}
.article-row:last-child { border-bottom: none; }
.article-thumb {
  width: 120px;
  height: 80px;
  background: var(--bg-tag);
  flex-shrink: 0;
}
.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-toprow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-date {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-placeholder);
}
.article-row-title {
  font-size: 22px;
  line-height: 1.36;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
}
.article-row-title:hover { color: var(--accent); }
.article-row-excerpt {
  font-size: 14px;
  line-height: 1.57;
  color: var(--text-secondary);
}
.article-readmore {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  text-decoration: none;
}

/* Articles sidebar */
.articles-sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

/* ==========================================
   Page 3: Article Inner
   ========================================== */

.article-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 72px 80px 56px;
}
.breadcrumb {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-tertiary);
  text-decoration: none;
}
.tag-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.read-time {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-placeholder);
}
.article-title {
  font-size: 64px;
  line-height: 1.125;
  letter-spacing: -2px;
  color: var(--text-primary);
}
.article-subtitle {
  font-size: 22px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
}
.article-meta span {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}
.article-meta .sep { color: var(--text-placeholder); }

.article-hero-img {
  height: 480px;
  background: var(--bg-tag);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 80px;
}
.article-hero-img span {
  font-size: 11px;
  color: var(--text-placeholder);
}

/* Article body */
.article-content {
  display: flex;
  gap: 80px;
  padding: 64px 80px;
}
.article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.article-body .lead {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-lead);
}
.article-body p {
  font-size: 18px;
  line-height: 1.78;
  color: var(--text-body);
}
.article-body h2 {
  font-size: 36px;
  color: var(--text-primary);
}

/* Pull quote */
.pull-quote {
  display: flex;
  gap: 0;
  padding: 0;
}
.pull-quote-accent {
  width: 3px;
  background: var(--accent);
  flex-shrink: 0;
}
.pull-quote-content {
  padding-left: 24px;
}
.pull-quote-text {
  font-size: 26px;
  line-height: 1.46;
  color: var(--text-primary);
}

/* Data box */
.data-box {
  display: flex;
  gap: 48px;
  padding: 32px;
  background: var(--bg-surface);
}
.data-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.data-num {
  font-size: 52px;
  letter-spacing: -2px;
  color: var(--accent);
}
.data-label {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}

/* Article sidebar */
.article-sidebar {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  flex-shrink: 0;
}
.toc {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toc-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-tertiary);
}
.toc-item {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.toc-item:hover,
.toc-item.active { color: var(--accent); }
.related-reading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.related-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-tertiary);
}
.related-item {
  font-size: 13px;
  line-height: 1.54;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.related-item:hover { color: var(--accent); }

/* Article NL */
.article-nl {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 64px 80px;
  background: var(--bg-surface);
}
.article-nl-title {
  font-size: 40px;
  color: var(--text-primary);
}
.nl-form-row {
  display: flex;
  gap: 0;
}
.nl-form-input {
  flex: 1;
  height: 52px;
  padding: 0 20px;
  border: 1px solid var(--border-stroke);
  background: var(--white);
  font-size: 14px;
  color: var(--text-placeholder);
  outline: none;
}
.nl-form-input:focus { border-color: var(--accent); }
.nl-form-btn {
  width: 220px;
  height: 52px;
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.nl-form-btn:hover { background: var(--accent-hover); }

/* Article footer (compact) */
.footer-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 80px;
  background: var(--bg-surface);
}
.footer-compact-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-compact .diamond {
  font-size: 10px;
  color: var(--accent);
}
.footer-compact .brand {
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--text-primary);
}
.footer-compact-right {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-placeholder);
}

/* --- Responsive --- */
@media (max-width: 1480px) {
  .shell { width: 100%; }
  .hero-headline { font-size: clamp(48px, 6.4vw, 92px); }
  .featured { flex-direction: column; }
  .featured-img { width: 100%; height: 300px; }
  .article-grid { flex-direction: column; }
  .card-divider { display: none; }
  .article-card { padding: 24px 0; }
  .article-list-section { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .article-content { flex-direction: column; }
  .article-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .newsletter { flex-direction: column; padding: 48px 32px; }
  .nl-right { width: 100%; }
  .footer-top { flex-direction: column; }
  .articles-content { flex-direction: column; }
  .articles-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .data-box { flex-direction: column; }
}

/* ==========================================
   Content Pages (About, Resources, etc.)
   ========================================== */

.about-page,
.resources-page {
  padding: 64px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.about-page h2,
.resources-page h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.25;
  color: var(--text-primary);
  margin-top: 16px;
}
.about-page h2:first-child,
.resources-page h2:first-child {
  margin-top: 0;
}
.about-page p,
.resources-page p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.78;
  color: var(--text-body);
}
.about-page ul,
.resources-page ul {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.78;
  color: var(--text-body);
  padding-left: 24px;
}
.about-page li,
.resources-page li {
  margin-bottom: 8px;
}
.about-cta {
  margin-top: 16px;
}
