/* ============================= */
/*          CSS VARIABLES       */
/* ============================= */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --card-bg: #3a3a3a;
    --accent: Orange;
    --text-primary: #f0f0f0;
    --text-secondary: #cccccc;
    --alert-color: #ffab70;
    --border-radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.5);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================= */
/*         GLOBAL RESET          */
/* ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================= */
/*         BODY & LAYOUT         */
/* ============================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================= */
/*         TYPOGRAPHY            */
/* ============================= */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* ============================= */
/*           CARDS               */
/* ============================= */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* ============================= */
/*          HEADERS              */
/* ============================= */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero-title {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero-title h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-header {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ============================= */
/*         AUTHORS CARD          */
/* ============================= */
.authors-card {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 171, 112, 0.1));
    border: 1px solid rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
    text-align: center;
}

.authors-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.authors-email {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.authors-affiliation {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================= */
/*          ABSTRACT             */
/* ============================= */
.abstract {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.abstract h3 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.abstract h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.abstract p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.abstract p:last-child {
    margin-bottom: 0;
}

/* ============================= */
/*        INFO PANEL             */
/* ============================= */
.info-panel {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 171, 112, 0.1));
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

.info-panel h3 {
    color: var(--alert-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-panel h3:last-child {
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    margin-bottom: 0;
}

/* ============================= */
/*           LINKS               */
/* ============================= */
.section-link {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.section-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: orange;
}

.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: orange;
}

/* ============================= */
/*        GALLERY GRIDS          */
/* ============================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

/* ============================= */
/*        SAMPLE CARDS           */
/* ============================= */
.sample-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.sample-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.sample-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.sample-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 3rem;
}

.sample-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    aspect-ratio: 16/9;
    transition: var(--transition);
}

.sample-link:hover {
    transform: scale(1.05);
}

.sample-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.sample-link:hover .sample-image {
    filter: brightness(1.1);
}

/* ============================= */
/*         VIDEO ITEMS           */
/* ============================= */
.video-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.video-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.video-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.video-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
    line-height: 1.4;
    min-height: 3.5rem;
}

.video-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    aspect-ratio: 16/9;
    max-width: 100%;
    margin: 0 auto;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

/* ============================= */
/*        LOADING STATES         */
/* ============================= */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.sample-link:hover .loading-overlay {
    opacity: 1;
}

.loading-text {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 20px;
    border: 1px solid var(--accent);
}

.loading-skeleton {
    background: linear-gradient(90deg, #404040 25%, #505050 50%, #404040 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-loader {
    background: linear-gradient(90deg, #404040 25%, #505050 50%, #404040 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* ============================= */
/*         PIPELINE IMAGES       */
/* ============================= */
.pipeline-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pipeline-image:hover {
    transform: scale(1.02);
}

/* ============================= */
/*           FUNDING             */
/* ============================= */
.funding {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: center;
}

.funding h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.funding-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
}

.funding-content img {
    max-height: 80px;
    height: auto;
    filter: brightness(1.2);
    transition: var(--transition);
}

.funding-content img:hover {
    transform: scale(1.1);
}

.funding-text {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.6;
}

/* ============================= */
/*         ANIMATIONS            */
/* ============================= */
@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

/* Animation delays for staggered effects */
.video-item:nth-child(1), .sample-card:nth-child(1) { animation-delay: 0.1s; }
.video-item:nth-child(2), .sample-card:nth-child(2) { animation-delay: 0.2s; }
.video-item:nth-child(3), .sample-card:nth-child(3) { animation-delay: 0.3s; }
.video-item:nth-child(4), .sample-card:nth-child(4) { animation-delay: 0.4s; }
.video-item:nth-child(5), .sample-card:nth-child(5) { animation-delay: 0.5s; }
.video-item:nth-child(6), .sample-card:nth-child(6) { animation-delay: 0.6s; }
.video-item:nth-child(7), .sample-card:nth-child(7) { animation-delay: 0.7s; }
.video-item:nth-child(8), .sample-card:nth-child(8) { animation-delay: 0.8s; }

/* ============================= */
/*      RESPONSIVE DESIGN        */
/* ============================= */
@media (max-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0;
    }

    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .hero-title h1 {
        font-size: 1.5rem;
    }

    .authors-name {
        font-size: 1.25rem;
    }

    .info-panel {
        padding: 1.5rem;
    }

    .video-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .video-item, .sample-card {
        padding: 1.5rem;
    }

    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .funding-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .funding-content img {
        max-height: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .video-item, .sample-card {
        padding: 1rem;
    }

    .video-title, .sample-title {
        font-size: 1.1rem;
    }

    .section-link {
        display: block;
        margin: 0.5rem 0;
    }
}
