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

:root {
    --primary-color: #1a2332;
    --secondary-color: #4a90e2;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --bg-color: #ffffff;
    --bg-light: #f5f7fa;
    --border-color: #e1e8ed;
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    background-attachment: fixed;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Smooth fade-in animation for body */
body {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
header {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 10001;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

header .container {
    position: relative;
    z-index: 1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1.5rem;
}

.header-brand {
    flex: 0 0 auto;
    min-width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    position: relative;
    z-index: 10;
}

header h1 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
    white-space: nowrap;
}

header .subtitle {
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    opacity: 0.9;
    line-height: 1.3;
    margin: 0.25rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Language Switcher Toggle in Header */
.header-actions .language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.4rem 0.7rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 10;
}

.header-actions .language-switcher .lang-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    user-select: none;
    pointer-events: none;
    line-height: 1;
    min-width: 20px;
    text-align: center;
}

.header-actions .language-switcher .lang-label.active {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-actions .language-switcher .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    margin: 0;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

.header-actions .language-switcher .toggle-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    pointer-events: auto;
}

.header-actions .language-switcher .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 26px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    z-index: 1;
    pointer-events: none;
}

.header-actions .language-switcher .toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.header-actions .language-switcher .toggle-input:checked + .toggle-slider {
    background-color: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

.header-actions .language-switcher .toggle-input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.header-actions .language-switcher .toggle-input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    outline: none;
}

.header-actions .language-switcher .toggle-switch:hover .toggle-slider {
    background-color: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Mobile Menu Toggle */
header nav .menu-toggle {
    display: none; /* Hidden on desktop by default */
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    margin: 0;
    transition: var(--transition-fast);
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1001;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

header nav .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

header nav .menu-toggle:active {
    transform: scale(0.95);
}

header nav .menu-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

header nav .menu-toggle[aria-expanded="true"] {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.5);
}

/* Navigation */
header nav {
    display: flex;
    align-items: center;
    position: relative;
}

header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

header nav li {
    margin: 0;
}

header nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

header nav a::before {
    display: none;
}

header nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header nav a.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

header nav a.active:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Main Content */
main {
    background: white;
    padding: clamp(1.5rem, 4vw, 3rem);
    margin: 1.5rem auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 16px;
    max-width: 900px;
    width: calc(100% - 2rem);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    z-index: 1;
}


/* Article Header */
.article-header {
    border-bottom: 3px solid transparent;
    border-image: var(--gradient-secondary) 1;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.article-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 150px;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 0 3px 3px 0;
    animation: expandWidth 1s ease-out 0.5s both;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 150px;
    }
}

.article-header h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.article-meta {
    color: #666;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-meta .author {
    font-weight: bold;
    color: var(--primary-color);
}

/* Abstract */
.abstract {
    background: linear-gradient(to right, var(--bg-light) 0%, #f0f4f8 100%);
    padding: clamp(1.2rem, 3vw, 1.5rem);
    border-left: 4px solid var(--secondary-color);
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.abstract h2 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.abstract .keywords {
    margin-top: 1rem;
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Sections */
section {
    margin: clamp(2rem, 5vw, 3rem) 0;
}

section h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    padding-left: 0;
    transition: var(--transition);
}

section h2:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100px;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 0 3px 3px 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

section h2:hover::after {
    transform: scaleX(1);
}

section h3 {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    color: var(--secondary-color);
    margin: clamp(1.5rem, 4vw, 2rem) 0 1rem 0;
    font-weight: 600;
    line-height: 1.4;
}

section h4 {
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    color: #555;
    margin: clamp(1.2rem, 3vw, 1.5rem) 0 1rem 0;
    font-weight: 600;
    line-height: 1.4;
}

section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    text-align: justify;
    hyphens: auto;
    transition: var(--transition-fast);
}

section p:hover {
    color: var(--text-color);
}

/* Lists */
ul, ol {
    margin: 1rem 0 1rem clamp(1.5rem, 4vw, 2rem);
    line-height: 1.8;
}

li {
    margin: 0.75rem 0;
    line-height: 1.7;
    transition: var(--transition-fast);
    padding-left: 0.5rem;
    position: relative;
}

li::marker {
    color: var(--secondary-color);
}

li:hover {
    transform: translateX(5px);
    color: var(--secondary-color);
}

li p {
    margin-bottom: 0.5rem;
}

/* Equations */
.equation {
    margin: clamp(1.5rem, 4vw, 2rem) 0;
    padding: clamp(1rem, 3vw, 1.5rem);
    background: linear-gradient(to bottom, var(--bg-light) 0%, #f0f4f8 100%);
    border-radius: 8px;
    overflow-x: auto;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    -webkit-overflow-scrolling: touch;
}

.equation-label {
    font-weight: bold;
    color: var(--secondary-color);
    margin-right: 1rem;
}

/* MathJax styling */
.MathJax {
    font-size: 1.05em !important;
    overflow-x: auto;
    max-width: 100%;
}

.MathJax_Display {
    overflow-x: auto;
    overflow-y: hidden;
}

/* References */
.references {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.references h2 {
    margin-bottom: 2rem;
}

.references ol {
    list-style: decimal;
    margin-left: clamp(1.5rem, 4vw, 2rem);
}

.references li {
    margin: 1rem 0;
    padding-left: 0.5rem;
    line-height: 1.7;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

footer .container {
    position: relative;
    z-index: 1;
}

footer p {
    margin: 0;
    opacity: 0.9;
    transition: var(--transition);
}

footer p:hover {
    opacity: 1;
    transform: scale(1.02);
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: clamp(0.7rem, 2vw, 0.75rem) clamp(1.2rem, 3vw, 1.5rem);
    background: var(--gradient-secondary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
    font-size: clamp(0.9rem, 2vw, 1rem);
    flex: 1;
    min-width: 150px;
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-download:hover::before {
    width: 300px;
    height: 300px;
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.5);
    background: linear-gradient(135deg, #357abd 0%, #4a90e2 100%);
}

.btn-download:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-download:active {
    transform: translateY(0);
}

.btn-download .btn-icon {
    font-size: 1.2rem;
}

/* Download Section */
.download-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.download-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: clamp(1.2rem, 3vw, 1.5rem);
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px) scale(1.02);
}

.download-card:hover::before {
    transform: scaleX(1);
}

.download-card h3 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    font-weight: 700;
}

.download-card .btn-link {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.6rem 1.2rem;
    background: white;
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.download-card .btn-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    transition: left 0.3s ease;
    z-index: 0;
}

.download-card .btn-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.download-card .btn-link:hover::before {
    left: 0;
}

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

/* Smooth scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-secondary);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: rgba(74, 144, 226, 0.3);
    color: var(--primary-color);
}

::-moz-selection {
    background: rgba(74, 144, 226, 0.3);
    color: var(--primary-color);
}

/* Better focus states */
a:focus,
button:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive Design */
/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    main {
        padding: 2rem;
        margin: 1.5rem auto;
    }
    
    .download-section {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .header-brand {
        flex: 1 1 auto;
        min-width: 0;
        order: 1;
    }
    
    header h1 {
        font-size: 1.15rem;
        margin: 0;
    }
    
    header .subtitle {
        font-size: 0.7rem;
        margin: 0.1rem 0 0 0;
        display: none;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        order: 2;
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    
    .header-actions .language-switcher {
        order: 1;
        padding: 0.35rem 0.6rem;
        gap: 0.5rem;
        flex: 0 0 auto;
    }
    
    .header-actions .language-switcher .lang-label {
        font-size: 0.75rem;
        min-width: 22px;
    }
    
    .header-actions .language-switcher .toggle-switch {
        width: 46px;
        height: 24px;
        margin: 0 0.15rem;
    }
    
    .header-actions .language-switcher .toggle-slider {
        border-width: 2px;
    }
    
    .header-actions .language-switcher .toggle-slider::before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }
    
    .header-actions .language-switcher .toggle-input:checked + .toggle-slider::before {
        transform: translateX(22px);
    }
    
    header {
        overflow: visible !important;
    }
    
    header .container {
        overflow: visible;
    }
    
    .header-actions {
        overflow: visible !important;
        z-index: 10003;
    }
    
    header nav {
        order: 2;
        position: relative;
        z-index: 10004;
    }
    
    header nav .menu-toggle {
        display: flex !important;
        order: 2;
        margin-left: auto;
        z-index: 10005;
        position: relative;
    }
    
    header nav ul {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0;
        left: auto;
        min-width: 180px;
        max-width: calc(100vw - 2rem);
        background: linear-gradient(135deg, rgba(26, 35, 50, 0.98) 0%, rgba(44, 62, 80, 0.98) 100%);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
        padding: 0.6rem;
        margin: 0;
        display: none;
        z-index: 10006;
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        overflow: hidden;
    }
    
    header nav ul.active {
        display: flex;
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    
    header nav li {
        width: 100%;
        margin: 0;
    }
    
    header nav a {
        width: 100%;
        text-align: left;
        padding: 0.7rem 1rem;
        border-radius: 8px;
        font-size: 0.95rem;
        transition: all 0.2s ease;
        background: rgba(255, 255, 255, 0.06);
        display: flex;
        align-items: center;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        white-space: nowrap;
    }
    
    header nav a::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 3px;
        height: 100%;
        background: var(--gradient-secondary);
        transform: scaleY(0);
        transition: transform 0.2s ease;
        transform-origin: bottom;
        border-radius: 0 2px 2px 0;
    }
    
    header nav a.active {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.25);
        font-weight: 600;
        color: white;
    }
    
    header nav a.active::before {
        transform: scaleY(1);
    }
    
    header nav a:hover,
    header nav a:active {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.2);
        color: white;
        transform: translateX(3px);
    }
    
    .menu-icon {
        display: block;
        transition: transform 0.3s ease;
    }
    
    header nav .menu-toggle[aria-expanded="true"] .menu-icon {
        transform: rotate(90deg);
    }
    
    /* Main content mobile */
    main {
        padding: 1.25rem;
        margin: 1rem;
        border-radius: 12px;
        width: calc(100% - 2rem);
        box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    }
    
    .article-header {
        padding-bottom: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .article-header h1 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .article-meta {
        font-size: 0.85rem;
    }
    
    /* Download buttons mobile */
    .download-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-download {
        width: 100%;
        padding: 0.85rem 1.25rem;
    }
    
    /* Download section mobile */
    .download-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
    }
    
    /* Sections mobile */
    section {
        margin: 2rem 0;
    }
    
    section h2 {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }
    
    section h3 {
        font-size: 1.15rem;
        margin: 1.5rem 0 0.75rem 0;
    }
    
    section h4 {
        font-size: 1.05rem;
        margin: 1.25rem 0 0.75rem 0;
    }
    
    section p {
        text-align: left;
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    /* Lists mobile */
    ul, ol {
        margin-left: 1.25rem;
        font-size: 0.95rem;
    }
    
    li {
        margin: 0.6rem 0;
    }
    
    /* Abstract mobile */
    .abstract {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }
    
    .abstract h2 {
        font-size: 1.15rem;
    }
    
    .abstract .keywords {
        font-size: 0.9rem;
    }
    
    /* Equations mobile */
    .equation {
        margin: 1.5rem 0;
        padding: 1rem;
        border-radius: 6px;
    }
    
    /* References mobile */
    .references {
        margin-top: 3rem;
        padding-top: 1.5rem;
    }
    
    .references ol {
        margin-left: 1.25rem;
    }
    
    .references li {
        font-size: 0.9rem;
        margin: 0.75rem 0;
    }
    
    /* Footer mobile */
    footer {
        padding: 1.5rem 0;
        margin-top: 3rem;
        font-size: 0.9rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    header {
        padding: 0.75rem 0;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    header .subtitle {
        font-size: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .language-switcher {
        margin-top: 0.5rem;
    }
    
    .language-switcher a {
        padding: 0.35rem 0.85rem;
        font-size: 0.8rem;
    }
    
    nav .container {
        padding: 0.5rem 0.75rem;
    }
    
    .menu-toggle {
        font-size: 1.6rem;
        min-width: 44px;
        min-height: 44px;
        padding: 0.65rem 0.85rem;
    }
    
    nav ul.active {
        padding: 0.75rem;
    }
    
    nav a {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    main {
        padding: 1rem;
        margin: 0.75rem;
        width: calc(100% - 1.5rem);
    }
    
    .article-header h1 {
        font-size: 1.25rem;
    }
    
    .article-meta {
        font-size: 0.8rem;
    }
    
    .download-buttons {
        gap: 0.5rem;
    }
    
    .btn-download {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    section h2 {
        font-size: 1.25rem;
    }
    
    section h3 {
        font-size: 1.1rem;
    }
    
    section h4 {
        font-size: 1rem;
    }
    
    section p {
        font-size: 0.9rem;
    }
    
    ul, ol {
        margin-left: 1rem;
        font-size: 0.9rem;
    }
    
    .abstract {
        padding: 1rem;
    }
    
    .abstract h2 {
        font-size: 1.1rem;
    }
    
    .equation {
        padding: 0.85rem;
    }
}

/* Print styles */
@media print {
    header, nav, footer, .language-switcher, .download-buttons, .menu-toggle {
        display: none;
    }
    
    main {
        box-shadow: none;
        padding: 0;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .abstract {
        page-break-inside: avoid;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    .equation {
        page-break-inside: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .btn-download {
        border: 2px solid currentColor;
    }
}
