:root,
[data-theme="light"] {
    --bg: #f7f6f2;
    --surface: #fbfaf7;
    --surface-2: #f1eee9;
    --surface-3: #ebe7e1;
    --text: #201d18;
    --muted: #6c6861;
    --line: #d7d1c7;
    --accent: #0d666c;
    --accent-2: #d7e8e5;
    --accent-3: #edf4f2;
    --max: 1140px;
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 30px;
    --shadow-sm: 0 6px 16px rgba(30, 25, 18, .05);
    --shadow-md: 0 18px 50px rgba(30, 25, 18, .08);
    --font-body: 'Inter', system-ui, sans-serif;
    --font-display: 'Instrument Serif', Georgia, serif;
}

[data-theme="dark"] {
    --bg: #171614;
    --surface: #1d1c19;
    --surface-2: #22211f;
    --surface-3: #2b2925;
    --text: #ece8e1;
    --muted: #b2aca3;
    --line: #3b3731;
    --accent: #78afb2;
    --accent-2: #223230;
    --accent-3: #1e2625;
    --shadow-sm: none;
    --shadow-md: none;
}

* { box-sizing: border-box }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 96px
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    text-rendering: optimizeLegibility
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px
}

button,
input,
textarea { font: inherit }

.skip {
    position: absolute;
    left: -9999px
}

.skip:focus {
    left: 16px;
    top: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 10px 14px;
    border-radius: 999px;
    z-index: 99
}

.wrap {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto
}

/* ── Header ── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    backdrop-filter: blur(14px);
    background: color-mix(in srgb, var(--bg) 84%, transparent)
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none
}

.mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    background: var(--surface);
    box-shadow: var(--shadow-sm)
}

.mark svg {
    width: 22px;
    height: 22px
}

.brand-text strong {
    display: block;
    font-size: 15px;
    letter-spacing: -.02em
}

.brand-text span {
    display: block;
    font-size: 12px;
    color: var(--muted)
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    font-size: 14px;
    color: var(--muted);
    max-height: none;
    opacity: 1;
}

.nav-links a { 
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text) }

.theme-toggle {
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 0;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.06);
    border-color: var(--accent);
}

.theme-toggle svg {
    position: absolute;
    width: 19px;
    height: 19px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.nav-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto
}

/* ── Footer ── */

footer {
    padding: 30px 0 46px;
    border-top: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    font-size: 14px;
    color: var(--muted)
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .nav {
        flex-wrap: wrap;
        align-items: center;
        padding: 14px 0
    }

    .nav-toggle {
        display: inline-flex
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        order: 3;
        gap: 0;
        padding-bottom: 6px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    }

    .nav-links.is-open {
        max-height: 400px;
        opacity: 1;
    }

    .nav-links a {
        padding: 12px 2px;
        border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
        width: 100%
    }

    .nav-links .theme-toggle {
        margin-top: 12px
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important
    }
}

/* Insights list & card styles */
.insights-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
}

.insight-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.insight-card h4 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.2;
}

.insight-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .insights-list {
        grid-template-columns: 1fr;
    }
}

/* Credentials section */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 36px;
}

.credential-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.credential-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.credential-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.credential-icon svg {
    width: 100%;
    height: 100%;
}

.credential-info {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.credential-info strong {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 2px;
}

.credential-info span.credential-title {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.credential-info span.credential-org {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-top: 6px;
}

.credential-info span.credential-id {
    font-size: 0.75rem;
    color: color-mix(in srgb, var(--muted) 70%, transparent);
    margin-top: 2px;
}

@media (max-width: 800px) {
    .credentials-grid {
        grid-template-columns: 1fr;
    }
}
