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

:root {
    --text: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --radius: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
header {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    z-index: 100;
}
header .container { display: flex; justify-content: space-between; align-items: center; }
.site-name { font-size: 1.2rem; font-weight: 800; text-decoration: none; color: var(--text); letter-spacing: -0.02em; }
header nav { display: flex; gap: 1.5rem; }
header nav a { text-decoration: none; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; transition: color 0.15s; }
header nav a:hover { color: var(--text); }

/* Main */
main { padding: 3rem 0 4rem; min-height: 70vh; }

/* Typography */
h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; letter-spacing: -0.03em; color: var(--text); }
h2 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 0.75rem; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
p { margin-bottom: 1.1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
ul, ol { margin: 0 0 1.1rem 1.5rem; }
li { margin-bottom: 0.4rem; }
blockquote { border-left: 3px solid var(--accent); padding: 0.75rem 1.25rem; margin: 1.5rem 0; background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-secondary); font-style: italic; }

/* Hero image */
.hero-image { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 2rem; aspect-ratio: 16/9; object-fit: cover; }

/* Article meta */
.article-header { margin-bottom: 2rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.article-meta .category { background: var(--accent); color: white; padding: 0.15rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.article-meta .reading-time { display: flex; align-items: center; gap: 0.3rem; }
.article-meta .date { }

/* Breadcrumb */
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 0.4rem; }

/* TOC */
.toc { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
.toc-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 0.75rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.toc a { color: var(--text-secondary); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* Article body */
article img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.5rem 0; }

/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.75rem; }
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card a { text-decoration: none; color: inherit; display: block; }
.card-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-body { padding: 1.25rem; }
.card-category { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 0.5rem; }
.card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; color: var(--text); }
.card-excerpt { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 0.75rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--text-muted); }

/* Homepage intro */
.page-intro { text-align: center; margin-bottom: 3rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.page-intro h1 { font-size: 2.5rem; margin-bottom: 0.75rem; }
.page-intro p { font-size: 1.1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }

/* Footer */
footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 3rem 0; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; max-width: 780px; }
.footer-brand { font-weight: 800; font-size: 1.1rem; margin-bottom: 0.5rem; }
.footer-about p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.footer-heading { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 0.75rem; }
.footer-links a { display: block; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; margin-bottom: 0.4rem; }
.footer-links a:hover { color: var(--accent); }
.footer-legal p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.card { animation: fadeInUp 0.4s ease both; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }

/* Responsive */
@media (max-width: 700px) {
    h1 { font-size: 1.75rem; }
    .page-intro h1 { font-size: 2rem; }
    .card-grid { grid-template-columns: 1fr; }
    header .container { flex-direction: column; gap: 0.75rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
