:root {
    color-scheme: light;
    --site-background: #f8f9fa;
    --site-surface: #ffffff;
    --site-foreground: #1f2937;
    --site-muted: #4b5563;
    --site-border: #e5e7eb;
}

body {
    background-color: var(--site-background);
    color: var(--site-foreground);
    font-family: Inter, sans-serif;
}

.font-display {
    font-family: "Space Grotesk", sans-serif;
}

.bg-sfsdc-dark {
    background-color: #0a2a5c;
}

.bg-sfsdc-blue {
    background-color: #1e88e5;
}

.bg-sfsdc-light {
    background-color: #f8f9fa;
}

.text-sfsdc-dark {
    color: #0a2a5c;
}

.text-sfsdc-blue {
    color: #1e88e5;
}

.hover\:text-sfsdc-blue:hover {
    color: #1e88e5;
}

.border-sfsdc-blue {
    border-color: #1e88e5;
}

.site-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.8rem;
}

.site-control {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.site-controls select {
    max-width: 13rem;
    border: 1px solid #64748b;
    border-radius: 0.375rem;
    background: #fff;
    color: #111827;
    padding: 0.3rem 1.6rem 0.3rem 0.5rem;
}

.site-controls button,
.share-page-button {
    cursor: pointer;
}

.site-share-link {
    color: inherit;
    padding: 0.35rem;
}

.site-share-link:hover,
.site-controls button:hover {
    color: #60a5fa;
}

.legal-content {
    background: var(--site-surface);
    color: var(--site-foreground);
}

.legal-content p,
.legal-content li {
    color: var(--site-muted);
}

.sitemap-link {
    color: #1e88e5;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

[data-theme="dark"] {
    color-scheme: dark;
    --site-background: #0b1220;
    --site-surface: #111c2e;
    --site-foreground: #e5e7eb;
    --site-muted: #cbd5e1;
    --site-border: #334155;
}

[data-theme="dark"] body,
[data-theme="dark"] .bg-sfsdc-light,
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100 {
    background-color: var(--site-surface) !important;
    color: var(--site-foreground);
}

[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-sfsdc-dark {
    color: var(--site-foreground) !important;
}

[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-300 {
    border-color: var(--site-border) !important;
}

[data-theme="dark"] .legal-content {
    background: var(--site-surface);
    color: var(--site-foreground);
}

[data-theme="dark"] .legal-content p,
[data-theme="dark"] .legal-content li {
    color: var(--site-muted);
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        color-scheme: dark;
        --site-background: #0b1220;
        --site-surface: #111c2e;
        --site-foreground: #e5e7eb;
        --site-muted: #cbd5e1;
        --site-border: #334155;
    }

    [data-theme="system"] body,
    [data-theme="system"] .bg-sfsdc-light,
    [data-theme="system"] .bg-white,
    [data-theme="system"] .bg-gray-50,
    [data-theme="system"] .bg-gray-100 {
        background-color: var(--site-surface) !important;
        color: var(--site-foreground);
    }

    [data-theme="system"] .text-gray-800,
    [data-theme="system"] .text-gray-700,
    [data-theme="system"] .text-gray-600,
    [data-theme="system"] .text-sfsdc-dark {
        color: var(--site-foreground) !important;
    }

    [data-theme="system"] .border-gray-100,
    [data-theme="system"] .border-gray-200,
    [data-theme="system"] .border-gray-300 {
        border-color: var(--site-border) !important;
    }

    [data-theme="system"] .legal-content {
        background: var(--site-surface);
        color: var(--site-foreground);
    }

    [data-theme="system"] .legal-content p,
    [data-theme="system"] .legal-content li {
        color: var(--site-muted);
    }
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.content-card {
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 1.1rem;
    background: var(--site-surface);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.content-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.content-card-body {
    padding: 1.25rem;
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(30, 136, 229, 0.12);
    color: #0a2a5c;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.date-label {
    font-size: 0.72rem;
    color: var(--site-muted);
}

.content-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
    color: var(--site-foreground);
    margin: 0 0 0.75rem;
    line-height: 1.35;
}

.content-card p {
    color: var(--site-muted);
    line-height: 1.7;
    margin: 0 0 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #1e88e5;
    font-weight: 700;
}

.read-more:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-action,
.page-number {
    border: 1px solid var(--site-border);
    border-radius: 999px;
    background: var(--site-surface);
    color: var(--site-foreground);
    min-width: 2.6rem;
    min-height: 2.6rem;
    padding: 0.5rem 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-action:hover,
.page-number:hover {
    border-color: #1e88e5;
    color: #1e88e5;
}

.page-number.is-active {
    background: #1e88e5;
    color: #fff;
    border-color: #1e88e5;
}

.page-action:disabled,
.page-number:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.member-card {
    display: grid;
    grid-template-columns: minmax(7rem, 0.8fr) 2fr;
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 1rem;
    background: var(--site-surface);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.member-photo,
.member-initials {
    width: 100%;
    height: 100%;
    min-height: 17rem;
    object-fit: cover;
}

.member-initials {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #0a2a5c, #1e88e5);
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
}

.member-card-content {
    padding: 1.5rem;
}

.member-card-content h3 {
    margin: 0.6rem 0 0.15rem;
    color: var(--site-foreground);
    font: 700 1.5rem/1.3 "Space Grotesk", sans-serif;
}

.member-card-content p,
.role-card p,
.hierarchy-heading p {
    color: var(--site-muted);
    line-height: 1.7;
}

.member-role {
    color: #1e88e5 !important;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.member-skill {
    margin-top: 0.8rem;
}

.member-document-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin-top: 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.member-document-links a {
    color: #1e88e5;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.member-status,
.hiring-status {
    display: inline-flex;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hiring-status {
    background: #fff7ed;
    color: #9a3412;
    white-space: nowrap;
}

.hierarchy-section {
    margin-top: 3.5rem;
}

.hierarchy-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hierarchy-step {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    border-radius: 50%;
    background: #0a2a5c;
    color: #fff;
    font-weight: 700;
}

.hierarchy-heading h2 {
    color: var(--site-foreground);
    font: 700 1.8rem/1.3 "Space Grotesk", sans-serif;
}

.hierarchy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding-left: 3.75rem;
}

.hierarchy-grid-three {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.role-card {
    padding: 1.25rem;
    border: 1px solid var(--site-border);
    border-top: 3px solid #cbd5e1;
    border-radius: 0.75rem;
    background: var(--site-surface);
}

.role-card-active {
    border-top-color: #1e88e5;
}

.role-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.role-card h3 {
    color: var(--site-foreground);
    font-weight: 700;
    line-height: 1.4;
}

.role-holder {
    color: #1e88e5 !important;
    font-weight: 700;
    margin-top: 0.8rem;
}

.team-cta {
    margin-top: 3.5rem;
    padding: 2rem;
    border-radius: 1rem;
    background: #0a2a5c;
    color: white;
    text-align: center;
}

.team-cta h2 {
    font: 700 1.75rem/1.3 "Space Grotesk", sans-serif;
}

.team-cta p {
    margin: 0.6rem auto 1.25rem;
    color: #dbeafe;
}

.profile-page {
    overflow: hidden;
    border: 1px solid var(--site-border);
    border-radius: 1.25rem;
    background: var(--site-surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.profile-hero {
    display: grid;
    grid-template-columns: minmax(12rem, 0.7fr) 2fr;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    background: var(--site-surface);
}

.profile-portrait {
    width: 100%;
    max-width: 18rem;
    aspect-ratio: 1;
    justify-self: center;
    border-radius: 1rem;
    object-fit: cover;
}

.profile-initials {
    width: 100%;
    min-height: 17rem;
    aspect-ratio: 1;
    border-radius: 1rem;
    font-size: 5rem;
}

.profile-social {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #1e88e5;
    font-weight: 600;
}

.profile-section {
    padding: 1.75rem 2.5rem;
    border-top: 1px solid var(--site-border);
}

.profile-section h2 {
    margin-bottom: 0.75rem;
    color: var(--site-foreground);
    font: 700 1.5rem/1.35 "Space Grotesk", sans-serif;
}

.profile-section p {
    margin-bottom: 0.75rem;
    color: var(--site-muted);
    line-height: 1.8;
}

.profile-skills {
    padding-left: 1.2rem;
    list-style: disc;
}

.profile-skills li {
    margin-bottom: 0.55rem;
    color: var(--site-muted);
    line-height: 1.75;
}

.article-expansion {
    margin-top: 1rem;
    border-top: 1px solid var(--site-border);
    padding-top: 0.9rem;
}

.article-expansion summary {
    cursor: pointer;
    color: #1e88e5;
    font-weight: 700;
}

.article-expansion-content {
    padding-top: 0.85rem;
    color: var(--site-muted);
    line-height: 1.75;
}

.article-expansion-content p + p {
    margin-top: 0.75rem;
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .page-action,
[data-theme="dark"] .page-number,
[data-theme="dark"] .member-card,
[data-theme="dark"] .role-card,
[data-theme="dark"] .profile-page {
    background: var(--site-surface);
    color: var(--site-foreground);
    border-color: var(--site-border);
}

[data-theme="dark"] .badge {
    background: rgba(96, 165, 250, 0.18);
    color: #dbeafe;
}

[data-theme="dark"] .hiring-status {
    background: #431407;
    color: #fed7aa;
}

@media (max-width: 767px) {
    .site-controls {
        justify-content: flex-start;
        gap: 0.65rem;
    }

    .site-controls select {
        max-width: 10.5rem;
    }

    .member-card,
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .member-photo,
    .member-initials {
        min-height: 14rem;
        max-height: 18rem;
    }

    .profile-initials {
        min-height: 13rem;
        max-height: 17rem;
        width: min(100%, 17rem);
        justify-self: center;
    }

    .hierarchy-grid {
        padding-left: 0;
    }

    .hierarchy-heading {
        gap: 0.75rem;
    }

    .hierarchy-heading h2 {
        font-size: 1.5rem;
    }

    .profile-hero,
    .profile-section {
        padding: 1.5rem;
    }
}
