/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #74b9ff;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.7rem;
    font-weight: 500;
    color: #101552;
    margin-bottom: 15px;
    letter-spacing: 0.01em;
    background:#fff;
    line-height: 2.5rem;
    border: 2px solid #1a1a1a;  /* dark border */
  border-radius: 8px;         /* slightly rounded corners */
  padding: 20px 40px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* soft shadow */
  display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Publications Section */
.publications {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 200;
    color: var(--primary-color);
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: start;
}

/* Publication Cards */
.publication-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.publication-header {
    padding: 25px 25px 15px;
    text-align: center;
    background-color: var(--background-light);
}

.publication-logo {
    max-width: 100%;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Cover Images */
.publication-covers {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--background-light);
}

.slideshow {
    position: relative;
    width: 100%;
    height: 300px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.slide.active {
    opacity: 1;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.static-cover {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.static-cover img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Action Buttons */
.publication-actions {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    font-size: 0.95rem;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0984e3;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.footer p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .publications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .publications {
        padding: 60px 0;
    }
    
    .publications-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 40px;
    }
    
    .slideshow,
    .static-cover {
        height: 250px;
    }
    
    .publication-actions {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        max-width: 150px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .slideshow,
    .static-cover {
        height: 200px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animation for slideshow transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide.active {
    animation: fadeIn 0.5s ease-in-out;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hero {
        background: none;
        color: black;
    }
    
    .btn {
        border: 1px solid black;
        color: black;
        background: none;
    }
}