@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --main-bg: #000211;
    --card-bg-light: #10121e;
    --highlight-purple: #5740ce;
    --highlight-blue: #5640ce;
    --text-primary: #ffffff;
    --text-secondary: #a8a8b3;
    --nav-border: rgba(87, 64, 206, 0.25);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--main-bg);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(87, 64, 206, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(86, 64, 206, 0.15) 0%, transparent 25%);
    overflow-x: hidden;
    min-height: 100vh;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* —— Nav —— */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 2, 17, 0.92);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(12px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    background: linear-gradient(90deg, var(--highlight-purple), var(--highlight-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}

.menu::-webkit-scrollbar {
    display: none;
}

.menu a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.menu a:hover {
    color: var(--text-primary);
    background: rgba(87, 64, 206, 0.15);
}

.menu a.is-active {
    color: var(--text-primary);
    background: rgba(87, 64, 206, 0.35);
}

/* —— Typography & sections —— */
.page-header {
    text-align: center;
    padding: 72px 0 48px;
    border-bottom: 1px solid var(--nav-border);
    margin-bottom: 48px;
}

.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(90deg, var(--highlight-purple), var(--highlight-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.content-block {
    margin-bottom: 56px;
}

.content-block h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 16px;
}

.content-block h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight-purple), var(--highlight-blue));
    border-radius: 2px;
}

.content-block h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    margin: 32px 0 16px;
    color: var(--highlight-purple);
}

.content-block p {
    font-size: 1.05rem;
    margin-bottom: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-block strong {
    color: var(--text-primary);
    font-weight: 600;
}

.card {
    background: rgba(16, 18, 30, 0.9);
    border-radius: 16px;
    padding: 36px;
    margin: 32px 0;
    border: 1px solid rgba(87, 64, 206, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight-purple), var(--highlight-blue));
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.feature {
    background: var(--card-bg-light);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(87, 64, 206, 0.2);
    transition: transform 0.25s ease, border-color 0.25s;
}

.feature:hover {
    transform: translateY(-3px);
    border-color: var(--highlight-purple);
}

.feature h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--highlight-purple);
}

.feature p {
    margin: 0;
    font-size: 0.98rem;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.topic-card {
    display: block;
    padding: 28px;
    border-radius: 14px;
    background: var(--card-bg-light);
    border: 1px solid rgba(87, 64, 206, 0.25);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topic-card:hover {
    border-color: var(--highlight-purple);
    box-shadow: 0 12px 40px rgba(87, 64, 206, 0.12);
}

.topic-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.topic-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--card-bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--highlight-purple);
}

.stat-row div strong {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.stat-row div span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.image-container {
    margin: 40px 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(87, 64, 206, 0.2);
}

.hero-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
}

ul.plain-list {
    margin: 20px 0;
    padding-left: 22px;
    color: var(--text-secondary);
}

ul.plain-list li {
    margin-bottom: 10px;
}

.back-note {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--nav-border);
    font-size: 0.95rem;
}

.back-note a {
    color: var(--highlight-purple);
    text-decoration: none;
    font-weight: 500;
}

.back-note a:hover {
    text-decoration: underline;
}

.text-link {
    color: var(--highlight-purple);
    text-decoration: none;
    font-weight: 500;
}

.text-link:hover {
    text-decoration: underline;
}

/* Long-form article (home + shared markup) */
.article-body {
    padding-bottom: 24px;
}

.article-body > p,
.article-body > ul {
    margin-top: 0;
}

.article-body h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    margin: 48px 0 24px;
    position: relative;
    padding-bottom: 16px;
    color: var(--text-primary);
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight-purple), var(--highlight-blue));
    border-radius: 2px;
}

.article-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin: 28px 0 12px;
    color: var(--text-primary);
}

.article-body p {
    font-size: 1.05rem;
    margin-bottom: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-body ul {
    margin: 20px 0 28px;
    padding-left: 0;
    list-style: none;
}

.article-body ul li {
    margin-bottom: 14px;
    padding-left: 26px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.65;
}

.article-body ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--highlight-purple);
    font-weight: bold;
}

.article-body a {
    color: var(--highlight-purple);
    text-decoration: none;
    font-weight: 600;
}

.article-body a:hover {
    text-decoration: underline;
}

.resource-links-block {
    margin: 8px 0 32px;
    padding: 20px 24px;
    border-radius: 12px;
    background: var(--card-bg-light);
    border: 1px solid rgba(87, 64, 206, 0.25);
}

.resource-links-block p {
    margin: 0 0 14px;
}

.resource-links-block p:last-child {
    margin-bottom: 0;
}

.resource-links-block a {
    display: inline-block;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .nav-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .menu {
        justify-content: flex-start;
    }
}
