body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #121212; /* Dark background for a modern feel */
    color: #e0e0e0; /* Light grey text for contrast */
    overflow-x: hidden; /* To prevent horizontal scrollbars from canvas */
}

header {
    /* Adjusted to be more like plane.so - full viewport height */
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative; /* For canvas positioning */
    overflow: hidden; /* To contain the canvas */
    background: transparent; /* Remove background to show particles */
}

.cvg-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #b0b0b0;
    text-decoration: none;
}

.cvg-logo a {
    display: flex;
    align-items: center;
}

#cvg-logo {
    width: 60px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#cvg-logo:hover {
    opacity: 1;
}

.logo-container {
    margin-bottom: 20px;
}

#logo {
    width: 300px; /* Increased size for better visibility */
    height: auto;
    /* Subtle animation and shadow for visual enhancement */
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

#logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.hero {
    /* padding: 50px 20px; plane.so hero is more integrated */
    position: relative; /* Ensure content is above canvas */
    z-index: 1;
    max-width: 800px; /* Limit width for better readability */
    padding: 20px;
}

.hero h1 {
    font-size: 4rem; /* Larger font size */
    margin-bottom: 1rem;
    color: #ffffff; /* Brighter color for heading */
    font-weight: 600;
}

.hero p {
    font-size: 1.5rem; /* Larger paragraph font */
    margin-bottom: 2.5rem;
    color: #b0b0b0; /* Softer color for subheading */
}

.download-links a {
    background-color: #007bff; /* A vibrant blue, common in tech */
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 8px;
    margin: 8px;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
}

.download-links a:hover {
    background-color: #0056b3;
    transform: translateY(-2px); /* Slight lift on hover */
}

.download-links a i {
    margin-right: 8px; /* Space between icon and text */
}

/* Publication button styling - green theme */
.publication-btn {
    background-color: #28a745 !important; /* Green background */
}

.publication-btn:hover {
    background-color: #218838 !important; /* Darker green on hover */
}

.previous-versions {
    margin-top: 1.5rem;
    text-align: center;
}

.previous-link {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.previous-link:hover {
    opacity: 1;
    color: #007bff;
    text-decoration: underline;
}

#publications-research, #previous-versions {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #1a1a1a; /* Slightly different dark shade for sections */
}

#publications-research h2, #previous-versions h2 {
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    color: #ffffff;
}

.publications-research-container {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.publication-block,
.research-block {
    flex: 1;
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-block:hover,
.research-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.publication-block h2,
.research-block h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #007bff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.publication-block h2 i {
    color: #28a745; /* Green for PDF icon */
}

.research-block h2 i {
    color: #007bff; /* Blue for microscope icon */
}

/* Paper card styling */
.paper-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #007bff;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.paper-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border-left-color: #28a745;
}

.paper-year {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #007bff;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.paper-content {
    padding-right: 4rem; /* Space for year badge */
}

.paper-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.8rem 0;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.3s ease;
}

.paper-title:hover {
    color: #28a745;
}

.paper-authors {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
    font-style: italic;
}

.paper-venue {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.journal-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journal-badge.joss {
    background-color: #28a745;
    color: white;
}

.journal-badge.conference {
    background-color: #17a2b8;
    color: white;
}

.journal-badge.high-impact {
    background-color: #dc3545;
    color: white;
}

.paper-details {
    color: #c0c0c0;
    font-size: 0.9rem;
    font-weight: 500;
}

.paper-links {
    display: flex;
    gap: 1rem;
}

.paper-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.paper-link:hover {
    color: #28a745;
}

.paper-link i {
    font-size: 0.8rem;
}

.publication-list p,
.research-list p {
    color: #c0c0c0;
    font-size: 1rem;
    line-height: 1.6;
}

.previous-versions-content {
    max-width: 800px;
    margin: 0 auto;
}

.previous-versions-content p {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.version-btn {
    background-color: #6c757d; /* Gray color for secondary action */
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 8px;
    margin: 8px;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
}

.version-btn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.version-btn i {
    margin-right: 8px;
}

.version-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #2c2c2c;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.version-note p {
    margin: 0;
    font-size: 0.95rem;
    color: #b0b0b0;
}

#features {
    background-color: #121212; /* Keep features on the main dark background or alternate */
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #ffffff;
}

.features-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.feature-row:nth-child(even) {
    flex-direction: row-reverse; /* Alternate direction for even rows */
}

.feature-content {
    flex: 1;
    padding: 2rem;
}

.feature-visual {
    flex: 1;
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-visual:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.feature h3 {
    margin-top: 0;
    color: #007bff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.feature p {
    color: #c0c0c0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.feature-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

footer {
    background-color: #2c2c2c;
    color: #a0a0a0;
    text-align: center;
    padding: 2rem 0;
    margin-top: 0; /* Remove margin if sections have background */
}

.footer-links {
    margin-top: 1rem;
}

.footer-link {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.9rem;
    margin: 0 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
    color: #007bff;
    text-decoration: underline;
}

/* Canvas for background animation */
#background-canvas {
    position: fixed; /* Fixed position to cover entire viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Behind all content */
    pointer-events: none; /* Allow clicks to pass through */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
    .download-links a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    #features h2, #publications-research h2, #previous-versions h2 {
        font-size: 2rem;
    }
    
    /* Stack publications and research vertically on mobile */
    .publications-research-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .publication-block,
    .research-block {
        padding: 2rem;
    }
    
    /* Stack features vertically on mobile */
    .feature-row,
    .feature-row:nth-child(even) {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .feature-content,
    .feature-visual {
        padding: 1.5rem;
    }
    
    .feature h3 {
        font-size: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .cvg-logo {
        top: 15px;
        right: 15px;
    }
    
    #cvg-logo {
        width: 50px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .download-links a {
        display: block;
        margin: 10px auto;
        width: 80%;
    }
    #features, #publications-research, #previous-versions {
        padding: 3rem 1rem;
    }
    
    .feature-content,
    .feature-visual {
        padding: 1rem;
    }
    
    .cvg-logo {
        top: 10px;
        right: 10px;
    }
    
    #cvg-logo {
        width: 40px;
    }
}

/* Imprint Page Styles */
.imprint-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

.imprint-content .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-title {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    margin: 2rem 0 3rem 0;
    color: #4caf50;
    text-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.imprint-section {
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.imprint-section h2 {
    color: #4caf50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4caf50;
}

.imprint-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: justify;
}

.contact-info {
    background: rgba(76, 175, 80, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.contact-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.contact-info p:first-child {
    font-weight: bold;
    font-size: 1.2rem;
    color: #4caf50;
}

.back-link {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.back-link .btn-primary:hover {
    background: linear-gradient(45deg, #66bb6a, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Header adjustments for imprint page */
.imprint-content #header {
    height: auto;
    min-height: auto;
    padding: 2rem 0;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
}

.imprint-content .header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.imprint-content .logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.imprint-content .logo {
    width: 60px;
    height: auto;
}

.imprint-content .logo-container h1 {
    font-size: 2rem;
    margin: 0;
    color: #4caf50;
}

.imprint-content .tagline {
    font-size: 1rem;
    color: #b0b0b0;
    margin: 0;
}

/* Mobile responsiveness for imprint */
@media (max-width: 768px) {
    .imprint-content .container {
        padding: 0 1rem;
    }
    
    .page-title {
        font-size: 2rem;
        margin: 1rem 0 2rem 0;
    }
    
    .imprint-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .imprint-content .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cvg-logo {
        position: static;
        margin-top: 1rem;
    }
}
