:root {
    --bg-main: #0a0a0a;
    --bg-surface: #141414;

    --primary: #3b82f6;
    --accent: #8b5cf6;

    --text-main: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --text-dim: #71717a;

    --border: #262626;
    --border-hover: #404040;

    --font-display: 'Times New Roman', Times, serif;
    --font-body: 'Times New Roman', Times, serif;
}

/* Light mode */
body.light-mode {
    --bg-main: #ffffff;
    --bg-surface: #ffffff;
    --text-main: #1d1d1f;
    --text-secondary: #424245;
    --text-muted: #6e6e73;
    --text-dim: #86868b;
    --primary: #0066cc;
    --accent: #5e5ce6;
    --border: #e5e5e7;
    --border-hover: #d2d2d7;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Hide animated background elements from original theme */
.background-fx {
    display: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 5rem;
    padding-top: 3rem;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.authors {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.author-name {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-name:hover {
    color: var(--primary);
}

.affiliations {
    font-family: var(--font-display);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Logo Section */
.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.logos img {
    height: 120px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logos img:hover {
    transform: scale(1.05);
}

/* Light mode logo adjustments */
body.light-mode .logos img {
    filter: brightness(0.9);
}

/* Buttons */
.links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--bg-main);
    border-color: var(--primary);
    color: var(--primary);
}

/* Sections */
section {
    margin-bottom: 4rem;
    padding: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

section:hover {
    border-color: var(--border-hover);
}

h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.25rem;
    text-align: justify;
}

/* Abstract */
.abstract-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    border-left: 2px solid var(--primary);
    padding-left: 1.5rem;
}

/* Visuals */
.method-overview img,
.result-item img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}

.method-overview img:hover,
.result-item img:hover {
    border-color: var(--border-hover);
}

/* Figure grids - ensure consistent image sizing */
.characteristics-content img {
    width: 100%;
    height: auto;
    object-fit: contain;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    font-family: var(--font-display);
    color: var(--text-main);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-main);
}

/* Citation */
.citation-block {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
}

.citation-block pre {
    color: var(--text-secondary);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    section {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Adjust grid layouts for mobile */
    .characteristics-content>div[style*="grid-template-columns: repeat(5, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Stack logos vertically on mobile */
    .logos {
        flex-direction: column;
        gap: 20px;
    }

    .logos img {
        height: 80px;
    }
}