:root {
    --primary-color: #f43f5e; /* Vibrant Pink/Magenta */
    --primary-hover-color: #e11d48;
    --background-color: #1a102b; /* Deep Purple */
    --card-bg-color: rgba(30, 20, 50, 0.5);
    --text-color: #f0f0f0; /* Off-white */
    --text-light-color: #c0b8d8; /* Light Purple/Gray */
    --border-color: rgba(244, 63, 94, 0.2);
    --shadow-color: rgba(244, 63, 94, 0.2);
    --header-bg-color: rgba(26, 16, 43, 0.7);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 70px;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body.modal-open > .main-content {
    filter: blur(8px);
    transform: scale(0.98);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.main-content {
    transition: filter 0.4s ease, transform 0.4s ease;
    position: relative;
    z-index: 1;
}

body.modal-open {
    overflow: hidden;
}

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hero-image-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* --- Header Styling --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background: var(--header-bg-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
    animation: fadeIn 0.8s ease-in-out;
}

.site-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.site-nav {
    display: flex;
    gap: 2rem;
}

.site-nav a {
    color: var(--text-light-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-nav a:hover {
    color: var(--primary-color);
}


/* --- Hero Section Styling --- */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 0; /* Corrected padding */
    overflow: hidden;
}

/* --- Scroll Margin Fix for Anchor Links --- */
#publications,
#about,
#contact {
    scroll-margin-top: 100px; /* Adjusted for better spacing */
}

.hero-background-orbs {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}

.orb {
    position: absolute; border-radius: 50%; background: var(--primary-color);
    opacity: 0.15; filter: blur(100px); animation: float 15s infinite ease-in-out;
}
.orb:nth-child(1) { width: 400px; height: 400px; top: 10%; left: 15%; background: #9333ea; animation-duration: 18s; }
.orb:nth-child(2) { width: 300px; height: 300px; top: 60%; left: 30%; background: var(--primary-color); animation-duration: 22s; animation-delay: 2s; }
.orb:nth-child(3) { width: 250px; height: 250px; top: 40%; right: 10%; background: #be185d; animation-duration: 20s; animation-delay: 4s; }

.hero-container {
    position: relative; z-index: 2; display: flex; align-items: center;
    justify-content: space-between; gap: 2rem; 
    max-width: 1400px; /* Increased max-width */
    width: 100%;
    padding: 0 5%; /* Centering content */
}

.hero-content { flex: 1; max-width: 600px; }

.hero-content h2 {
    font-size: 3.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem;
    animation: slideUp 0.8s 0.2s backwards;
}

.hero-content h2 span { color: var(--primary-color); }
.hero-content p {
    font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--text-light-color);
    animation: slideUp 0.8s 0.4s backwards;
}

.hero-search-container input {
    width: 100%; padding: 0.8rem 1.2rem; border-radius: 50px; border: 1px solid var(--border-color);
    background-color: var(--card-bg-color); color: var(--text-color); font-size: 0.9rem;
    font-family: 'Poppins', sans-serif; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: slideUp 0.8s 0.6s backwards;
}

.hero-search-container input:focus {
    outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.3);
}

.hero-visual {
    flex: 1; display: flex; justify-content: center; align-items: center; perspective: 1000px;
}

.hero-visual img {
    max-width: 500px; /* Increased size */
    width: 100%;
    transform-style: preserve-3d;
    animation: float 8s infinite ease-in-out, hero-image-in 0.8s 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
}

/* --- Main Content Title --- */
.section-title {
    text-align: center; font-size: 2.2rem; font-weight: 700;
    margin: 3rem 0 2rem 0; color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light-color);
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* --- Newsletter Grid & Card Styling --- */
.newsletter-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem; padding: 0 5%; max-width: 1400px; margin: 0 auto 2.5rem auto;
}

.newsletter-card {
    background: var(--card-bg-color); border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

.hidden-newsletter { display: none; }

.newsletter-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.card-image-container { width: 100%; height: 180px; overflow: hidden; }
.card-image-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.newsletter-card:hover .card-image-container img { transform: scale(1.05); }

.card-content { padding: 1.2rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-color); margin-bottom: 0.4rem; }
.card-date { font-size: 0.8rem; color: var(--primary-color); margin-bottom: 0.8rem; font-weight: 500; }
.card-summary { flex-grow: 1; margin-bottom: 1rem; color: var(--text-light-color); font-size: 0.9rem; }

.card-button {
    display: inline-block; background-color: var(--primary-color); color: #fff;
    padding: 0.6rem 1.2rem; border-radius: 50px; text-decoration: none;
    font-weight: 500; text-align: center; transition: background-color 0.3s ease, transform 0.2s ease;
    border: none; cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 0.9rem;
}
.card-button:hover { background-color: var(--primary-hover-color); transform: translateY(-2px); }
.explore-more-container { text-align: center; margin-bottom: 3rem; }

/* --- Shared Section Container Styling --- */
.content-section {
    max-width: 1200px; margin: 4rem auto 3rem auto; padding: 2.5rem;
    background: var(--card-bg-color); border-radius: 16px; border: 1px solid var(--border-color);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.content-section h2 {
    text-align: center; font-size: 2.2rem; font-weight: 700;
    color: var(--text-color); margin-bottom: 2rem;
}

/* --- Editors Container Styling --- */
.editors-container h2 {
    margin-bottom: 0.5rem;
}
.editor-profiles { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; margin-top: 2rem;}
.editor-profile { text-align: center; }
.editor-profile img {
    width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--primary-color);
    object-fit: cover; margin-bottom: 0.8rem;
}
.editor-profile h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.editor-profile p { color: var(--text-light-color); font-size: 0.9rem; }

/* --- Info Container (About Specancians) Styling --- */
.info-container p {
    text-align: center;
    color: var(--text-light-color);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
.info-button-container {
    text-align: center;
}

/* --- Contact Section --- */
.contact-section h2 {
    margin-bottom: 0.5rem;
}

.contact-container { display: flex; gap: 2.5rem; align-items: flex-start; margin-top: 2rem;}
.contact-form { flex: 2; }
.contact-socials { flex: 1; padding-left: 2rem; border-left: 1px solid var(--border-color); }
.contact-socials h3 { font-size: 1.3rem; margin-bottom: 1.2rem; color: var(--text-color); }
.form-group { margin-bottom: 1.2rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 0.8rem; border-radius: 8px; border: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.2); color: var(--text-color); font-family: 'Poppins', sans-serif;
    font-size: 0.9rem; transition: all 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.3); }
.form-group textarea { resize: vertical; }
.social-links { display: flex; gap: 1.2rem; }
.social-links a { color: var(--text-light-color); transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--primary-color); transform: scale(1.1); }
.social-links svg { width: 28px; height: 28px; }

#form-status {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none; /* Hidden by default */
}
#form-status.success {
    background-color: rgba(22, 163, 74, 0.2);
    color: #4ade80;
    display: block;
}
#form-status.error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    display: block;
}


/* --- Footer Styling --- */
.site-footer {
    position: fixed; bottom: 0; left: 0; width: 100%; background: var(--background-color);
    text-align: center; padding: 1.2rem 0; border-top: 1px solid var(--border-color);
    font-size: 0.8rem; color: var(--text-light-color); z-index: 1000;
}

/* --- Scroll Animation Classes --- */
.hidden-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; transition-delay: calc(var(--i, 0) * 100ms); }
.show-scroll { opacity: 1; transform: translateY(0); }

/* --- Modal Reader Styling --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    padding: 1rem; background-color: rgba(10, 5, 20, 0.6);
    backdrop-filter: blur(5px); opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-container {
    position: relative; background: var(--background-color); border: 1px solid var(--border-color);
    border-radius: 16px; max-width: 900px; width: 100%; max-height: 90vh;
    display: flex; flex-direction: column; box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    transform: translateY(20px) scale(0.95); transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}
.modal-overlay.active .modal-container { transform: translateY(0) scale(1); }

.modal-action-bar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.modal-action-btn {
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
    color: var(--text-light-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
}
.modal-action-btn:hover { color: var(--primary-color); transform: scale(1.1); }
.modal-action-btn.close-btn { font-size: 2rem; line-height: 1; }
.modal-action-btn svg { width: 18px; height: 18px; }

.modal-header { padding: 1.5rem 2rem; }
.modal-header h2 { font-size: 1.6rem; color: var(--primary-color); margin-bottom: 0.25rem; }
.modal-header p { color: var(--text-light-color); font-size: 0.9rem; }

.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 2rem 1.5rem 2rem;
    transition: opacity 0.2s ease-in-out;
}
.modal-body .page-layout {
    display: block;
}

.modal-body .page-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-light-color);
}

.modal-body .page-image {
    float: right;
    width: 45%;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.modal-body .page-image img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}


.modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-nav-btn {
    background: none; border: 1px solid var(--border-color);
    color: var(--text-light-color); padding: 0.5rem 1rem;
    border-radius: 30px; cursor: pointer; transition: all 0.3s ease;
    font-size: 0.9rem;
}
.page-nav-btn:hover:not(:disabled) {
    background-color: var(--primary-color); border-color: var(--primary-color); color: #fff;
}
.page-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }


/* --- Background GIF Animation --- */
.planes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.planes-container img {
    position: absolute;
    width: 80px; /* adjust size */
    animation: fly 25s linear infinite;
    opacity: 0.8; /* default opacity for main plane */
}

/* Make the first plane light gray */
.planes-container img:nth-child(1) {
    filter: brightness(0.8) saturate(0%); /* light gray */
}

/* Make other planes pinkish with low opacity */
.planes-container img:nth-child(2),
.planes-container img:nth-child(3),
.planes-container img:nth-child(4),
.planes-container img:nth-child(5) {
    filter: hue-rotate(-20deg) saturate(200%) brightness(1.2); 
    /* hue-rotate & saturate adjusted for #f43f5e */
    opacity: 0.3; /* low opacity */
}

/* Random positions & delays */
.planes-container img:nth-child(1) { top: 10%; left: -100px; animation-delay: 0s; }
.planes-container img:nth-child(2) { top: 30%; left: -150px; animation-delay: 5s; }
.planes-container img:nth-child(3) { top: 50%; left: -200px; animation-delay: 10s; }
.planes-container img:nth-child(4) { top: 70%; left: -120px; animation-delay: 15s; }
.planes-container img:nth-child(5) { top: 85%; left: -180px; animation-delay: 20s; }

@keyframes fly {
    from {
        transform: translateX(0) rotate(0deg);
    }
    to {
        transform: translateX(120vw) rotate(360deg);
    }
}


/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-content h2 { font-size: 2.8rem; }
    .content-section { padding: 2rem; }
}
@media (max-width: 768px) {
    .site-nav { display: none; } /* Hide nav on mobile for now */
    .hero-container { flex-direction: column; text-align: center; }
    .hero-visual { margin-top: 2rem; max-width: 300px; }
    .hero-content h2 { font-size: 2.5rem; }
    .contact-container { flex-direction: column; gap: 2rem; }
    .contact-socials { padding-left: 0; border-left: none; text-align: center; }
    .social-links { justify-content: center; }
    .modal-header, .modal-body, .modal-footer { padding: 1.5rem; }
    .modal-body .page-image { float: none; width: 100%; margin: 0 0 1rem 0; }
}


