html {
    height: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
}

html[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --text-primary: #2c3e50;
    --text-secondary: #4a5568;
    --strong-color: #363636;
    --math-color: #f7f9fc;
    --caption-color: #4a5568;
    --caption-strong-color: #2d3748;
    --is-2-color: #1a365d;
    --is-5-color: #2d3748;
    --is-6-color: #4e5e69;
}

html[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #000000;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --strong-color: #f5f5f5;
    --math-color: #404751;
    --caption-color: #dbdbdb;
    --caption-strong-color: #d8dce4;
    --is-2-color: #629df0;
    --is-5-color: #4e5e69;
    --is-6-color: #4e5e69;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    line-height: 1.7;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top-controls {
    position: fixed;
    width: 1300px;
    left: 50%;
    transform: translateX(-50%);
    top: 1rem;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}


.header-container {
    padding: 1rem;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

.header {
    background: white;
    border-radius: 12px;
    box-shadow:
        0 2.8px 2.2px rgba(0, 0, 0, 0.02),
        0 6.7px 5.3px rgba(0, 0, 0, 0.028),
        0 12.5px 10px rgba(0, 0, 0, 0.035);
    padding: 1.5rem 2rem;
    margin: 3rem 2rem 2rem 2rem;
    transition: all 0.3s ease;
}

.header h1 {
    font-family: 'Merriweather', serif;
    color: #2c3e50;
    margin: 0;
    padding: 0 1rem;
    border-left: 4px solid #3273dc;
    line-height: 1.4;
    transition: all 0.3s ease;
    font-size: 2.5rem;
}

.publication-date {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.container {
    max-width: 900px !important;
    padding: 0 1.5rem;
}

section {
    padding: 3rem 0;
}

.figure-container {
    margin: 2rem 0;
    text-align: center;
}

.figure-container img {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.caption {
    margin-top: 1rem;
    color: var(--caption-color);
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.5;
    padding: 0 1rem;
}

.caption strong {
    color: var(--caption-strong-color);
    font-style: normal;
}

strong {
    color: var(--strong-color);
}

a {
    color: #3273dc;
    transition: color 0.2s ease;
}

a:hover {
    color: #2366d1;
    text-decoration: underline;
}

ul {
    margin-left: 1.5em;
    margin-top: 0.5em;
}

ul li {
    margin-bottom: 0.5em;
}

.math {
    padding: 1rem;
    background: var(--math-color);
    border-radius: 6px;
    margin: 1.5rem 0;
}

.title.is-2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--is-2-color);
    border-bottom: 2px solid #b9c2cd;
    padding-bottom: 0.5rem;
}

.title.is-4 {
    font-size: 2rem;
    margin-top: 2rem;
    color: #2c5282;
}

.title.is-5 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    color: var(--is-5-color);
}

.title.is-6 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
    color: var(--is-6-color);
}

p {
    margin-bottom: 1.2rem;
}

@media screen and (max-width: 768px) {

    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        min-height: 100vh;
    }

    .top-controls {
        gap: 0.5rem;
        position: absolute;
        top:0.5rem;
        width: 100%;
        transform: none;
        left: 0;
    }

    .header {
        padding: 1.5rem 1.5rem;
        margin: 3rem 1rem 1rem 1rem;
        border-radius: 8px;
        box-shadow:
            0 2px 4px rgba(0, 0, 0, 0.02),
            0 4px 8px rgba(0, 0, 0, 0.028);
    }

    .header h1 {
        font-size: 1.8rem;
        padding: 0 0.75rem;
        border-left: 3px solid #3273dc;
    }

    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;

    }

    .math {
        font-size: 0.9rem;
    }

    section {
        padding: 2rem 0;
    }

    .title.is-2 {
        font-size: 1.75rem;
    }

    .title.is-4 {
        font-size: 1.35rem;
    }
}