/* ============================================================
   DeepLang.org — Main Stylesheet
   Modern, responsive, bilingual-ready design
   ============================================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
    /* Light theme (default) */
    --color-bg: #ffffff;
    --color-bg-secondary: #f6f8fa;
    --color-bg-tertiary: #f0f2f5;
    --color-surface: #ffffff;
    --color-border: #d0d7de;
    --color-border-light: #e8ecf0;
    --color-text: #1f2328;
    --color-text-secondary: #656d76;
    --color-text-tertiary: #8b949e;
    --color-primary: #1a6fe8;
    --color-primary-hover: #155cc0;
    --color-primary-light: #ddf4ff;
    --color-accent: #1a7f37;
    --color-accent-light: #dafbe1;
    --color-code-bg: #f6f8fa;
    --color-code-text: #1f2328;
    --color-card-bg: #ffffff;
    --color-card-shadow: rgba(31, 35, 40, 0.08);
    --color-nav-bg: rgba(255, 255, 255, 0.85);
    --color-footer-bg: #f6f8fa;
    --color-footer-text: #656d76;
    --color-hero-bg: linear-gradient(135deg, #f6f8fa 0%, #ddf4ff 100%);
    --color-section-alt: #f6f8fa;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #0d1117;
        --color-bg-secondary: #161b22;
        --color-bg-tertiary: #21262d;
        --color-surface: #161b22;
        --color-border: #30363d;
        --color-border-light: #21262d;
        --color-text: #e6edf3;
        --color-text-secondary: #8b949e;
        --color-text-tertiary: #6e7681;
        --color-primary: #58a6ff;
        --color-primary-hover: #79c0ff;
        --color-primary-light: #0c2d6b;
        --color-accent: #3fb950;
        --color-accent-light: #04260f;
        --color-code-bg: #161b22;
        --color-code-text: #e6edf3;
        --color-card-bg: #161b22;
        --color-card-shadow: rgba(0, 0, 0, 0.3);
        --color-nav-bg: rgba(13, 17, 23, 0.85);
        --color-footer-bg: #161b22;
        --color-footer-text: #8b949e;
        --color-hero-bg: linear-gradient(135deg, #0d1117 0%, #0c2d6b 100%);
        --color-section-alt: #161b22;
    }
}

:root[data-theme="dark"] {
    --color-bg: #0d1117;
    --color-bg-secondary: #161b22;
    --color-bg-tertiary: #21262d;
    --color-surface: #161b22;
    --color-border: #30363d;
    --color-border-light: #21262d;
    --color-text: #e6edf3;
    --color-text-secondary: #8b949e;
    --color-text-tertiary: #6e7681;
    --color-primary: #58a6ff;
    --color-primary-hover: #79c0ff;
    --color-primary-light: #0c2d6b;
    --color-accent: #3fb950;
    --color-accent-light: #04260f;
    --color-code-bg: #161b22;
    --color-code-text: #e6edf3;
    --color-card-bg: #161b22;
    --color-card-shadow: rgba(0, 0, 0, 0.3);
    --color-nav-bg: rgba(13, 17, 23, 0.85);
    --color-footer-bg: #161b22;
    --color-footer-text: #8b949e;
    --color-hero-bg: linear-gradient(135deg, #0d1117 0%, #0c2d6b 100%);
    --color-section-alt: #161b22;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Navigation --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav.scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 4px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo:hover {
    text-decoration: none;
    opacity: 0.85;
}

.nav-logo img {
    border-radius: 6px;
}

.nav-brand {
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.925rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--color-text);
    background: var(--color-bg-tertiary);
    text-decoration: none;
}

.nav-links a.nav-gh-link svg {
    opacity: 0.7;
}

.nav-lang-switch {
    margin-left: 6px;
    padding-left: 16px !important;
    border-left: 1px solid var(--color-border);
    font-size: 0.85rem !important;
    color: var(--color-primary) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero Section --- */
.hero {
    background: var(--color-hero-bg);
    padding: 80px 24px 72px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px var(--color-card-shadow);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 8px;
}

.hero h2 {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 111, 232, 0.35);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text);
    text-decoration: none;
    border-color: var(--color-text-tertiary);
}

/* --- Sections --- */
.section {
    padding: 80px 24px;
}

.section-alt {
    background: var(--color-section-alt);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--color-card-shadow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--color-text-secondary);
    font-size: 0.925rem;
    line-height: 1.65;
}

/* --- Compiler Pipeline --- */
.compiler-intro {
    text-align: center;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 48px;
}

.pipeline-stage {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px 18px;
    text-align: center;
    min-width: 130px;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-card-shadow);
}

.pipeline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.pipeline-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--color-text);
}

.pipeline-desc {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    line-height: 1.4;
}

.pipeline-arrow {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin: 0 8px;
    flex-shrink: 0;
    font-weight: 700;
}

.type-highlights {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.type-highlights h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.type-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.type-highlights li {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.type-highlights li::before {
    content: "▸";
    color: var(--color-primary);
    font-weight: bold;
    flex-shrink: 0;
}

.compiler-cta {
    text-align: center;
}

/* --- Code Block --- */
.code-section .section-inner {
    max-width: 800px;
}

.code-block {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.code-block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green  { background: #28c840; }

.code-filename {
    margin-left: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --- Run Button --- */
.code-run-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #c3e88d;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.code-run-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: #a5d6ff;
}

.code-run-btn:active {
    transform: scale(0.97);
}

.code-run-btn.running {
    color: #ffcb6b;
    border-color: rgba(255,203,107,0.3);
    pointer-events: none;
}

.code-run-btn.done {
    color: #8b949e;
    border-color: rgba(255,255,255,0.08);
    pointer-events: none;
}

/* --- Syntax Highlighting (dark theme #1e1e2e) --- */
.code-block pre {
    margin: 0;
    padding: 24px 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e6edf3;
}

/* Keywords */
.code-block .kw { color: #c792ea; font-style: italic; }
/* Types */
.code-block .ty { color: #82aaff; }
/* ADT variants */
.code-block .adt { color: #ffcb6b; }
/* Functions / methods */
.code-block .fn { color: #82aaff; }
/* Numbers */
.code-block .num { color: #f78c6c; }
/* Comments */
.code-block .co { color: #546e7a; font-style: italic; }

/* --- Compilation Animation --- */
.code-compile {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 20px 24px;
    background: rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease;
}

.compile-label {
    font-size: 0.8rem;
    color: #ffcb6b;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.compile-stages {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.compile-stage {
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    color: rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.compile-stage.done {
    background: rgba(130,170,255,0.12);
    border-color: rgba(130,170,255,0.25);
    color: #82aaff;
}

.compile-stage.active {
    background: rgba(255,203,107,0.12);
    border-color: rgba(255,203,107,0.3);
    color: #ffcb6b;
}

.compile-arr {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.15);
    transition: color 0.2s ease;
}

.compile-arr.done {
    color: rgba(130,170,255,0.4);
}

.compile-progress {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.compile-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #82aaff, #c792ea, #ffcb6b);
    border-radius: 2px;
    transition: width 0.35s ease;
}

/* --- Terminal Output --- */
.code-output {
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.25);
    animation: fadeIn 0.4s ease;
}

.output-label {
    padding: 14px 24px 0;
    font-size: 0.78rem;
    color: #c3e88d;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.code-output pre {
    margin: 0;
    padding: 12px 24px 20px;
}

.code-output code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #c3e88d;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- DeepVM Section --- */
.vm-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.vm-description {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
}

.vm-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px;
}

.vm-spec {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.vm-spec-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
}

.vm-spec-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
    display: block;
}

.vm-targets {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px;
}

.vm-targets h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.vm-targets ul {
    list-style: none;
    padding: 0;
}

.vm-targets li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.vm-targets li:last-child {
    border-bottom: none;
}

.vm-targets li::before {
    content: "▸";
    color: var(--color-primary);
    font-weight: bold;
}

/* --- Team Section --- */
.team-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.team-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.team-card .uni-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.team-card .uni-role {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.team-cta {
    text-align: center;
}

.team-cta p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.team-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Page Layout (for /about, /news, /talks, /404) --- */
.page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.page-header .page-subtitle {
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.page-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text);
}

.page-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 36px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border-light);
}

.page-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px 0 8px;
}

.page-content p {
    margin-bottom: 16px;
}

.page-content ul, .page-content ol {
    margin: 0 0 16px 24px;
}

.page-content li {
    margin-bottom: 6px;
}

.page-content code {
    background: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.875em;
}

.page-content pre {
    background: var(--color-code-bg);
    border-radius: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.page-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
}

.page-content a {
    font-weight: 500;
}

/* --- Download Cards --- */
.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.download-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.download-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--color-card-shadow);
}

.download-card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.download-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text);
}

.download-card p {
    font-size: 0.925rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
    flex: 1;
}

.download-card-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.download-card-repo {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --- Post Category Tags --- */
.post-cats {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
}

.post-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-tertiary);
    background: var(--color-bg-secondary);
}

/* --- About Page --- */
.about-hero {
    background: var(--color-hero-bg);
    padding: 64px 24px 56px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.about-hero-inner {
    max-width: 700px;
    margin: 0 auto;
}

.about-hero h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.about-hero-sub {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
}

.about-mission {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-mission h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.about-mission p {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.about-section-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
}

/* --- Timeline --- */
.timeline {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 36px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-year {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

.timeline-body {
    padding-top: 2px;
}

.timeline-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-body p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* --- Repo Cards --- */
.about-repos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 750px;
    margin: 0 auto;
}

.about-repo-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px 28px;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.about-repo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--color-card-shadow);
    border-color: var(--color-primary);
    text-decoration: none;
    color: var(--color-text);
}

.about-repo-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.about-repo-card div {
    flex: 1;
    min-width: 0;
}

.about-repo-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.about-repo-card p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.about-repo-arrow {
    font-size: 1.1rem;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

.about-repo-card:hover .about-repo-arrow {
    transform: translateX(3px);
    color: var(--color-primary);
}

/* --- Contact Cards --- */
.about-contact-intro {
    text-align: center;
    color: var(--color-text-secondary);
    max-width: 550px;
    margin: 0 auto 28px;
    font-size: 1rem;
    line-height: 1.65;
}

.about-contacts {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 650px;
    margin: 0 auto;
}

.about-contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 18px 24px;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    min-width: 190px;
    flex: 1;
}

.about-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-card-shadow);
    border-color: var(--color-primary);
    text-decoration: none;
    color: var(--color-text);
}

.contact-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.contact-name {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}

.contact-mail {
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
    display: block;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --- Post Layout --- */
.post {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.post-header {
    margin-bottom: 32px;
}

.post-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.post-header time {
    color: var(--color-text-tertiary);
    font-size: 0.9rem;
}

.post-content {
    font-size: 1rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 36px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border-light);
}

.post-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px 0 8px;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content ul, .post-content ol {
    margin: 0 0 16px 24px;
}

.post-content li {
    margin-bottom: 6px;
}

.post-content code {
    background: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.875em;
}

.post-content pre {
    background: var(--color-code-bg);
    border-radius: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
}

.post-content img {
    border-radius: 8px;
    margin: 16px 0;
}

.post-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 8px 16px;
    margin: 16px 0;
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-radius: 0 8px 8px 0;
}

.post-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.post-footer a {
    font-weight: 500;
}

/* --- Posts List (news/talks pages) --- */
.posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.posts-list li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.posts-list li:last-child {
    border-bottom: none;
}

.posts-list a {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.posts-list .post-date {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
}

.posts-list p {
    color: var(--color-text-secondary);
    font-size: 0.925rem;
    margin-top: 6px;
}

/* --- Footer --- */
.footer {
    background: var(--color-footer-bg);
    border-top: 1px solid var(--color-border);
    padding: 40px 24px;
}

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

.footer-info p {
    font-size: 0.9rem;
    color: var(--color-footer-text);
    margin: 0;
}

.footer-sm {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

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

.footer-links a {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* --- 404 --- */
.page-404 {
    text-align: center;
    padding: 100px 24px;
}

.page-404 h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.page-404 p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-nav-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 8px 16px 16px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 10px 14px;
    }

    .nav-lang-switch {
        margin-left: 0;
        padding-left: 14px !important;
        border-left: none;
        border-top: 1px solid var(--color-border);
        margin-top: 4px;
        padding-top: 12px !important;
    }

    .hero {
        padding: 56px 20px 48px;
    }

    .section {
        padding: 56px 20px;
    }

    .vm-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .pipeline {
        flex-direction: column;
        gap: 0;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
        margin: 0;
    }

    .pipeline-stage {
        min-width: 200px;
    }

    .type-highlights ul {
        grid-template-columns: 1fr;
    }

    .download-cards {
        grid-template-columns: 1fr;
    }

    .about-repos {
        grid-template-columns: 1fr;
    }

    .about-contacts {
        flex-direction: column;
        align-items: stretch;
    }

    .about-contact-card {
        min-width: auto;
    }

    .timeline {
        padding-left: 32px;
    }

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

    .team-list {
        grid-template-columns: 1fr 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .team-list {
        grid-template-columns: 1fr;
    }

    .vm-specs {
        grid-template-columns: 1fr;
    }
}
