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

:root {
    --primary: #0f3a7d;
    --primary-dark: #0a2351;
    --primary-light: #4a90e2;
    --secondary: #e74c3c;
    --text-dark: #1a2d3e;
    --text-light: #5a6c7d;
    --bg-light: #f5f7fb;
    --bg-white: #ffffff;
    --border: #d9e2ec;
    --success: #16a085;
}

html.dark-mode {
    --primary: #6ba3e5;
    --primary-dark: #4a90e2;
    --primary-light: #8fc3f0;
    --secondary: #e8847d;
    --text-dark: #ecf0f7;
    --text-light: #a8b8c8;
    --bg-light: #1a2d3e;
    --bg-white: #0f1820;
    --border: #2a3d52;
    --success: #2ecc71;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

html.dark-mode nav {
    background: rgba(17, 24, 39, 0.95);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-cta {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.nav-links .nav-cta {
    color: white;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.4rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.theme-toggle {
    background: transparent;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
    width: min(1100px, 100%);
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    max-width: 700px;
    text-align: left;
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    /* font-size: clamp(2rem, 5vw, 4rem); */
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.9s ease;
}

.hero-image-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.hero-image-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.9rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* Sections */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-dark);
}

/* About Section */
.about {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 3rem;
    align-items: center;
}

.about-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.about-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.feature-item span {
    flex: 1;
}

.about-image {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 1rem;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.about-panel {
    display: flex;
    justify-content: center;
}

.about-panel-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    margin-top: 2.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.about-panel-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.about-panel-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-panel-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.about-panel-list li {
    color: var(--text-dark);
    padding-left: 0.5rem;
    border-left: 3px solid var(--primary-light);
}

.about-panel-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

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

/* Chapters Grid */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chapter-card {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.chapter-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.chapter-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.chapter-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.chapter-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.chapters-section {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.chapter-part {
    margin-top: 2rem;
}

.chapter-part h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.chapter-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chapter-card li {
    color: var(--text-light);
    padding-left: 0.75rem;
    border-left: 3px solid var(--primary-light);
    line-height: 1.6;
}

/* Key Features */
.features {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.feature-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
}

/* Authors Section */
.authors-section {
    text-align: center;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.author-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--primary);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.author-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: justify;
}

.author-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.author-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.author-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.author-link.lattes {
    background: white;
    border: 2px solid #000000;
}

.author-link.lattes:hover {
    background: #f0f0f0;
    border: 4px solid #000000;
}

.author-link.lattes img {
    filter: brightness(0) saturate(100%) contrast(100%);
}

.author-link.orcid {
    background: #a6ce39;
}

.author-link.orcid:hover {
    background: #8ab71b;
}

/* Citation Section */
.citation-section {
    background: var(--bg-light);
}

.citation-box {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border-left: 4px solid var(--primary);
    margin-top: 2rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    position: relative;
}

html.dark-mode .citation-box {
    background: #1f2937;
    color: #f3f4f6;
}

.citation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.citation-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.citation-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.citation-btn.success {
    border-color: var(--success);
    color: var(--success);
}

.citation-btn.success:hover {
    background: var(--success);
    color: white;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 5rem;
}

footer p {
    color: white;
}

html.dark-mode footer p {
    color: #111827;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.badge {
    display: inline-block;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }

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

    html.dark-mode .nav-links {
        background: rgba(17, 24, 39, 0.98);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero {
        margin-top: 60px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    section {
        padding: 3rem 1.5rem;
    }

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

    .about-image {
        order: -1;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.mt-3 {
    margin-top: 1.5rem;
}
