/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.authors {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

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

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 300;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-link:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-2px);
}

/* Main content */
main {
    padding: 3rem 0;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

/* Intro section */
.intro {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

/* Video sections */
.videos {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
    justify-content: center;
    gap: 24px;
    margin-top: 2rem;
}

.video-grid > video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Space a follow-on paragraph off the grid above it */
.video-grid + p {
    margin-top: 2rem;
}

/* Responsive 16:9 wrapper for embedded (YouTube) players */
.video-embed {
    width: 100%;
    max-width: 1000px;
    margin: 24px auto 0;
    aspect-ratio: 16 / 9;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 0 15px;
    }

    main {
        padding: 2rem 0;
    }

    section {
        margin-bottom: 2rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .intro,
    .videos {
        padding: 1.5rem;
    }
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Figure and caption styles */
figure {
    margin: 3rem 0;
    text-align: center;
}

.block-scheme-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
}
