/* ==========================================================================
   CSS Variables & Theme Setup (Black / Dark Blue Tone)
   ========================================================================== */
:root {
    /* Color Palette: Dark Tech / Blue Tones */
    --bg-main: #0a0e17;       /* Very dark blue, almost black */
    --bg-secondary: #0f1624;  /* Slightly lighter for cards/sections */
    --bg-nav: rgba(10, 14, 23, 0.85); /* Transparent for glassmorphism */
    
    --accent-blue: #3b82f6;   /* Bright blue for hover/accents */
    --accent-glow: rgba(59, 130, 246, 0.4); 
    --text-main: #e2e8f0;     /* Soft white/gray for readability */
    --text-muted: #94a3b8;    /* Muted gray for descriptions */
    
    --border-color: rgba(255, 255, 255, 0.05);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.section-dark {
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.section-title span {
    color: var(--accent-blue);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    height: 48px;
    width: auto;
    border-radius: 8px; /* Softens the square white background */
    background-color: #ffffff;
    padding: 4px; /* Creates some spacing between border and logo */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-blue);
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #ffffff;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: #fff;
    margin: 5px 0;
    transition: 0.3s;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #111a2c 0%, var(--bg-main) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent-blue);
    color: #ffffff;
    font-weight: 600;
    border-radius: 999px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px 0 var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    background-color: #2563eb;
}

/* ==========================================================================
   Ecoinfo (About) Section & Binary Animation Wrapper
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.about-image {
    position: relative;
}

.image-display-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-hero-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-smooth);
}

.image-display-wrapper:hover .about-hero-img {
    transform: scale(1.02);
}

.about-text h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-main);
}

.features-list span {
    color: var(--accent-blue);
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* ==========================================================================
   Projects Section (Carousel / Cards)
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.carousel-wrapper {
    position: relative;
    padding: 0 40px;
    margin: 0 -20px;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0; /* padding for hover effects */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(40, 50, 70, 0.95);
    color: #fff;
    border: 2px solid var(--border-color);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.carousel-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.prev-btn { left: 0px; }
.next-btn { right: 0px; }

.carousel-track {
    display: flex;
    gap: 2.5rem;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-track .card {
    flex: 0 0 calc(33.333% - 1.666rem);
    min-width: 320px;
}

@media (max-width: 992px) {
    .carousel-track .card {
        flex: 0 0 calc(50% - 1.25rem);
    }
}

@media (max-width: 768px) {
    .carousel-track .card {
        flex: 0 0 100%;
    }
}

.card {
    background: var(--bg-main);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    transition: transform var(--transition-smooth);
}

.bg-gradient-1 { background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%); }
.bg-gradient-2 { background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%); }
.bg-gradient-3 { background: linear-gradient(135deg, #4c1d95 0%, #1e1b4b 100%); }

.project-card:hover .placeholder-img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-link {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
}

.card-link:hover {
    color: #60a5fa;
}

/* ==========================================================================
   Research Section (Row Cards)
   ========================================================================== */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.research-card {
    padding: 2rem;
    background: var(--bg-secondary);
    display: block;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-blue);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.research-card:hover {
    transform: translateX(8px);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.research-card:hover::before {
    opacity: 1;
}

.research-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.journal-name {
    color: var(--accent-blue);
}

.research-card .card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.research-card .card-desc {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.authors {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #05070a;
    padding: 6rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Reveal Effects
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 3.5rem;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        background-color: var(--bg-main);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .section {
        padding: 5rem 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}
