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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1a1a2e;
    background: #fff;
    line-height: 1.7;
}

img { max-width: 100%; display: block; }

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================================
   Layout
   ========================================= */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   Header
   ========================================= */
.site-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}
.logo:hover { text-decoration: none; color: #2563eb; }

.site-header nav { display: flex; gap: 1.5rem; }

.site-header nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
}
.site-header nav a:hover { color: #2563eb; text-decoration: none; }

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s;
}
.btn:hover { background: #1d4ed8; text-decoration: none; color: #fff; }

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}
.btn-outline:hover { background: #2563eb; color: #fff; }

/* =========================================
   Hero
   ========================================= */
.hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f8faff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.15rem;
    color: #4b5563;
    max-width: 520px;
    margin-bottom: 2rem;
}

/* =========================================
   Features
   ========================================= */
.features {
    padding: 4rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.feature-card p { font-size: 0.95rem; color: #6b7280; }

/* =========================================
   Recent posts / Blog list
   ========================================= */
.recent-posts, .blog-list { padding: 4rem 0; }

.recent-posts h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.post-list { list-style: none; margin-bottom: 2rem; }

.post-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.post-item:first-child { border-top: 1px solid #e5e7eb; }

.post-date {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.post-item a {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a2e;
}
.post-item a:hover { color: #2563eb; text-decoration: none; }

.post-item p {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: #6b7280;
}

/* =========================================
   Page header (blog index)
   ========================================= */
.page-header {
    padding: 3.5rem 0 2.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f8faff 100%);
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.page-header p { color: #4b5563; font-size: 1rem; }

/* =========================================
   Blog post
   ========================================= */
.post-header {
    padding: 3.5rem 0 2rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f8faff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.post-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 0.4rem 0 0.75rem;
}

.post-description {
    font-size: 1.1rem;
    color: #4b5563;
}

.post-body {
    padding: 2.5rem 1.5rem 4rem;
}

.post-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 2rem 0 0.75rem;
}

.post-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin: 1.5rem 0 0.5rem;
}

.post-body p { margin-bottom: 1.2rem; }

.post-body ul, .post-body ol {
    margin: 0 0 1.2rem 1.5rem;
}

.post-body li { margin-bottom: 0.4rem; }

.post-body code {
    background: #f1f5f9;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
}

.post-body blockquote {
    border-left: 4px solid #2563eb;
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    background: #eff6ff;
    border-radius: 0 6px 6px 0;
    color: #374151;
}

/* =========================================
   Overview section (index page columns)
   ========================================= */
.overview-section {
    padding: 4rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.overview-col h2 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.overview-col h2 a {
    color: #9ca3af;
}
.overview-col h2 a:hover { color: #2563eb; text-decoration: none; }

.overview-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.75rem;
}

.overview-logo-link {
    display: inline-flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.overview-logo-link:hover { opacity: 0.9; }

.overview-logo {
    max-height: 28px;
    width: auto;
    filter: grayscale(100%);
}

.overview-logo--dark {
    filter: grayscale(100%) invert(1);
}

.overview-logo-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

/* =========================================
   Entity list/detail pages
   ========================================= */
.entity-list {
    padding: 4rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.entity-list h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.entity-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #1a1a2e;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.entity-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
    text-decoration: none;
    color: #1a1a2e;
}

.entity-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.entity-card h2, .entity-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0;
}

.entity-year {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
}

.entity-role {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.entity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.entity-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
    background: #f3f4f6;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
}

.entity-card p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.entity-logo {
    max-height: 24px;
    width: auto;
    margin-bottom: 0.75rem;
}

.entity-logo--dark {
    padding: 0.25rem 0.5rem;
    background: #1a1a2e;
    border-radius: 4px;
}

.entity-detail {
    padding: 2.5rem 0 4rem;
}

.entity-back {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background: #f8faff;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .post-header h1 { font-size: 1.75rem; }

    .site-header .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .site-header nav {
        width: 100%;
        overflow-x: auto;
        gap: 1rem;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .site-header nav a {
        white-space: nowrap;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .entity-grid {
        grid-template-columns: 1fr;
    }
}
