/* === apick.net Design System v4 — Card Grid === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');

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

/* Base */
body {
  background: #fff;
  color: #1a1a1a;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  line-height: 1.8;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Layout */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Homepage grid: featured left, sidebar right */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}
.home-main { min-width: 0; }
.home-sidebar { }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 40px; }
  .container { padding: 0 24px; }
}

/* === Top Bar === */
.top-bar {
  background: #1a1a1a;
  padding: 14px 0;
  margin-bottom: 0;
}
.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar .site-title {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.top-bar .site-title a { color: #fff; text-decoration: none; }
.top-bar .site-title a:hover { color: #ccc; }
.top-bar nav { display: flex; gap: 24px; }
.top-bar nav a {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.15s;
}
.top-bar nav a:hover { color: #fff; }

/* === Header === */
header {
  padding: 48px 0 36px;
  border-bottom: 1px solid #e8e4dc;
  margin-bottom: 56px;
}
header .tagline {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  color: #c0392b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}
header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
header .desc {
  font-size: 17px;
  color: #888;
  margin-top: 10px;
  line-height: 1.6;
  max-width: 600px;
}

/* === Homepage feature === */
.featured-article {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e8e4dc;
}
.featured-article .featured-label {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c0392b;
  font-weight: 700;
  margin-bottom: 18px;
}
.featured-article h2 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  max-width: 700px;
}
.featured-article h2 a {
  color: #1a1a1a;
  text-decoration: none;
}
.featured-article h2 a:hover { color: #c0392b; }
.featured-article .meta {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  color: #bbb;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.featured-article .excerpt {
  font-size: 18px;
  color: #555;
  line-height: 1.8;
  max-width: 640px;
}
.featured-article .excerpt p { margin-bottom: 12px; }
.featured-article .read-more {
  display: inline-block;
  margin-top: 18px;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 2px solid #c0392b;
  padding-bottom: 2px;
}
.featured-article .read-more:hover { color: #c0392b; }

/* Section title */
.section-title {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  font-weight: 600;
  margin-bottom: 28px;
}

/* === Article Card Grid === */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.article-card {
  background: #faf8f5;
  border: 1px solid #e8e4dc;
  border-radius: 8px;
  padding: 28px 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-color: #d0c8b8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.card-tag {
  display: inline-block;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
  background: #e8e4dc;
  color: #666;
}

.card-tag[data-tag="analysis"] { background: #f0e8dc; color: #8a6d3b; }
.card-tag[data-tag="benchmark"] { background: #dce8f0; color: #3b6d8a; }
.card-tag[data-tag="strategy"] { background: #e8dcf0; color: #6b3b8a; }
.card-tag[data-tag="agents"] { background: #dcf0e8; color: #3b7a5a; }
.card-tag[data-tag="engineering"] { background: #f0dcdc; color: #8a3b3b; }
.card-tag[data-tag="interpretability"] { background: #f0ecd8; color: #7a6b2a; }

.card-title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.card-title a:hover { color: #c0392b; }

.card-excerpt {
  font-size: 14px;
  color: #777;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-meta {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-sep { margin: 0 4px; color: #ddd; }

.all-articles-link {
  text-align: center;
  margin-bottom: 48px;
}

.all-articles-link a {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  text-decoration: none;
  padding: 10px 24px;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-block;
}

.all-articles-link a:hover {
  color: #1a1a1a;
  border-color: #1a1a1a;
}

/* Responsive card grid */
@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; }
}

/* Legacy article list (used on archive pages) */
.article-item {
  padding: 18px 0;
  border-bottom: 1px solid #f0ece4;
}
.article-item:first-child { padding-top: 0; }
.article-item:last-child { border-bottom: none; }
.article-item .date {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.article-item .title {
  font-size: 18px;
  color: #1a1a1a;
  text-decoration: none;
  line-height: 1.4;
  font-weight: 600;
}
.article-item .title:hover { color: #c0392b; }

/* Newsletter signup */
.sidebar-box {
  background: #f5f3ef;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-box h3 {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.sidebar-box p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 12px;
}
.sidebar-link {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-link:hover { color: #1a1a1a; }
.newsletter-box {
  background: #f5f3ef;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  padding: 28px 32px;
  margin: 48px 0;
  text-align: center;
}
.newsletter-box h3 {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1a1a1a;
}
.newsletter-box p {
  font-size: 15px;
  color: #888;
  margin-bottom: 18px;
}
.newsletter-box .email-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}
.newsletter-box .email-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: Inter, -apple-system, sans-serif;
  background: #fff;
}
.newsletter-box .email-form button {
  padding: 10px 20px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.newsletter-box .email-form button:hover { background: #c0392b; }
.newsletter-note {
  font-size: 11px;
  color: #ccc;
  margin-top: 10px;
}

/* === Article Page === */
.article-page .article-header {
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e8e4dc;
}
.article-page .article-header .tags {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c0392b;
  font-weight: 600;
  margin-bottom: 10px;
}
.article-page .article-header h1 {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a1a;
  max-width: 720px;
}
.article-page .article-header .meta {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  color: #bbb;
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-page .article-body { max-width: 660px; }
.article-page .article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  color: #1a1a1a;
  line-height: 1.3;
}
.article-page .article-body p {
  margin-bottom: 22px;
  color: #3a3a3a;
}
.article-page .article-body .pullquote {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: #1a1a1a;
  padding: 24px 28px;
  margin: 36px 0;
  border-left: 4px solid #c0392b;
  background: #f5f3ef;
  border-radius: 4px;
  font-family: Inter, -apple-system, sans-serif;
}
.article-page .article-body .verify-box {
  background: #f5f3ef;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  padding: 22px 26px;
  margin: 32px 0;
  font-size: 16px;
  line-height: 1.7;
}
.article-page .article-body .verify-box strong { display: block; margin-bottom: 10px; font-size: 18px; font-family: Inter, -apple-system, sans-serif; }
.article-page .article-body .verify-box code {
  background: #e8e4dc;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}
.article-page .article-body .verify-box p { margin-bottom: 10px; }
.article-page .article-body .limitation-box {
  background: #faf8f5;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  padding: 22px 26px;
  margin: 32px 0;
}
.article-page .article-body .limitation-box strong {
  display: block;
  margin-bottom: 6px;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 15px;
  color: #1a1a1a;
}
.article-page .article-body .limitation-box p { margin-bottom: 14px; font-size: 16px; }
.article-page .article-body .cta-box {
  background: #1a1a1a;
  border-radius: 6px;
  padding: 28px 32px;
  margin: 44px 0;
  text-align: center;
}
.article-page .article-body .cta-box h3 { margin: 0 0 8px; font-size: 20px; color: #fff; font-family: Inter, -apple-system, sans-serif; font-weight: 700; }
.article-page .article-body .cta-box p { font-size: 16px; margin-bottom: 0; line-height: 1.5; color: #ccc; }
.article-page .article-body .cta-box a { color: #fff; text-decoration: underline; font-weight: 600; }
.article-page .article-body .affiliate-note {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  color: #ccc;
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-page .article-body .footnote {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13px;
  color: #999;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  line-height: 1.7;
}

/* === About Page === */
.about-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}
.about-page p { margin-bottom: 20px; color: #555; font-size: 17px; }
.about-page p strong { color: #1a1a1a; }
.about-page a { color: #c0392b; }
.about-page h2 {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  margin-top: 44px;
  margin-bottom: 14px;
}
.about-page ul {
  margin: 0 0 24px 0;
  padding: 0;
  list-style: none;
}
.about-page ul li {
  font-size: 17px;
  color: #555;
  padding: 4px 0 4px 20px;
  position: relative;
  line-height: 1.7;
}
.about-page ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #c0392b;
}
.about-cta {
  margin-top: 44px;
}
.about-cta a.button {
  display: inline-block;
  font-family: Inter, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #1a1a1a;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}
.about-cta a.button:hover {
  background: #c0392b;
}

/* === Resources Page === */
.resources-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.resources-page .subtitle { color: #999; font-size: 15px; margin-bottom: 36px; }
.resources-page .resource-item {
  padding: 24px 0;
  border-bottom: 1px solid #eee;
}
.resources-page .resource-item:last-child { border-bottom: none; }
.resources-page .resource-item h2 { font-size: 19px; font-weight: 700; margin-bottom: 4px; font-family: Inter, -apple-system, sans-serif; }
.resources-page .resource-item p { color: #888; font-size: 15px; line-height: 1.6; }


/* Related articles */
.related-articles {
  margin: 44px 0 32px;
  padding: 24px 28px;
  background: #faf8f5;
  border: 1px solid #e8e4dc;
  border-radius: 6px;
}
.related-articles h3 {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}
.related-links a {
  display: inline-block;
  font-size: 16px;
  color: #1a1a1a;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid #e0d8cc;
  margin-bottom: 6px;
  line-height: 1.4;
}
.related-links a:hover {
  color: #c0392b;
  border-bottom-color: #c0392b;
}

/* === Footer === */
footer {
  margin-top: 80px;
  padding: 48px 0;
  border-top: 2px solid #1a1a1a;
}
footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}
footer .footer-col h4 {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  font-weight: 600;
  margin-bottom: 12px;
}
footer .footer-col a {
  display: block;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  margin-bottom: 6px;
}
footer .footer-col a:hover { color: #c0392b; }
footer .copyright {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 12px;
  color: #ccc;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #f0ece4;
}

/* === Archive/Articles page === */
.archive-page { }
.archive-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.archive-page .subtitle { color: #999; font-size: 14px; margin-bottom: 36px; }

/* Responsive */
@media (max-width: 700px) {
  body { font-size: 17px; }
  .container { padding: 0 18px; max-width: 100%; }
  .top-bar .container { flex-direction: column; gap: 8px; }
  header { padding: 32px 0 24px; margin-bottom: 36px; }
  header h1 { font-size: 26px; }
  header .desc { font-size: 15px; max-width: 100%; }
  .featured-article h2 { font-size: 26px; max-width: 100%; }
  .featured-article .excerpt { font-size: 16px; max-width: 100%; }
  .article-page .article-header h1 { font-size: 26px; max-width: 100%; }
  .article-page .article-body { max-width: 100%; }
  .article-page .article-body .pullquote { font-size: 20px; padding: 18px 20px; }
  .newsletter-box .email-form { flex-direction: column; }
  footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
