/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */

:root {
    --bg-color: #fcfbfa;       
    --sidebar-bg: #f4f3ee;     
    --text-main: #2b2927;      
    --text-muted: #6b6965;     
    --accent-color: #214e34;   
    --accent-light: #e8f0eb;   
    --border-color: #e6e3dc;   
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: var(--font-sans); 
    color: var(--text-main); 
    background-color: var(--bg-color); 
    line-height: 1.7; 
    -webkit-font-smoothing: antialiased;
}


/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */

header { 
    background: #ffffff; 
    border-bottom: 2px solid var(--accent-light); 
    padding: 1.2rem 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { 
    font-family: var(--font-serif);
    font-weight: 700; 
    font-size: 1.3rem; 
    color: var(--accent-color); 
    text-decoration: none; 
    letter-spacing: -0.01em;
}

nav a { 
    margin-left: 2rem; 
    text-decoration: none; 
    color: var(--text-muted); 
    font-weight: 600; 
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

nav a:hover, nav a.active { 
    color: var(--accent-color); 
}


/* ==========================================================================
   3. MAIN LAYOUT CONTAINER
   ========================================================================== */

.container { 
    display: flex; 
    min-height: calc(100vh - 75px); 
    max-width: 100%;
    margin: 0;
    padding: 0;
}


/* ==========================================================================
   4. LEFT SIDEBAR & COMMON SIDEBAR ELEMENTS
   ========================================================================== */

.left-col { 
    flex: 0 0 28%; 
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color); 
    padding: 4% 3% 4% 5%;
    display: flex;
    flex-direction: column;
}

.left-col h1 { 
    font-family: var(--font-serif);
    font-size: 1.8rem; 
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem; 
    color: var(--text-main); 
}

.profile-img { 
    width: 130px; 
    height: 130px;
    object-fit: cover;
    border-radius: 50%; 
    margin-bottom: 1.5rem; 
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.subtitle { 
    color: var(--accent-color); 
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem; 
}

.affiliation {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.sidebar-quote {
    background-color: #ffffff;
    border-left: 3px solid var(--accent-color);
    padding: 1.1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

/* Sidebar Links & Badges */
.links {
    margin-top: auto; 
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.badge-link { 
    display: inline-block;
    width: fit-content;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.badge-link img {
    display: block;
    height: 24px;
    width: auto;
}

.badge-link:hover { 
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* Sidebar Menu & Pinning Helpers */
.sidebar-sticky-box {
    position: sticky;
    top: 5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--accent-color);
    background-color: var(--accent-light);
}

/* Interactive Sidebar Filter / Switcher */
.pub-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #ffffff;
    border-left: 3px solid var(--accent-color);
    padding: 1.2rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.switcher-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.switch-btn {
    background: none;
    border: 1px solid transparent;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.switch-btn:hover {
    background-color: var(--accent-light);
    color: var(--accent-color);
}

.switch-btn.active {
    background-color: var(--accent-color);
    color: #ffffff;
}


/* ==========================================================================
   5. RIGHT CONTENT AREA (GENERAL)
   ========================================================================== */

.right-col { 
    flex: 1; 
    padding: 4% 8% 4% 5%; 
    background-color: var(--bg-color);
}

.right-col h2 { 
    font-family: var(--font-serif);
    font-size: 2.3rem; 
    margin-bottom: 2rem; 
    color: var(--text-main); 
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--text-main);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 3.5rem 0;
}

/* Interactive Panes */
.pub-pane {
    display: none;
    animation: paneFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pub-pane.active {
    display: block;
}

@keyframes paneFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ==========================================================================
   6. HOME PAGE COMPONENTS
   ========================================================================== */

/* Research Interests List */
.interests-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
}

.interests-list li {
    display: flex;          
    gap: 1.2rem;            
    align-items: flex-start;
    padding-left: 0;
    border-left: none;      
}

.interest-icon {
    font-size: 1.4rem;      
    line-height: 1.2;
    padding-top: 0.2rem;    
}

.interests-list strong {
    font-size: 1.1rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.2rem;
}

.interests-list p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0 !important;
}

/* Group Photo Element */
.group-photo-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.group-img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    object-fit: cover; 
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.group-caption {
    font-size: 0.9rem !important;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.2rem;
    margin-bottom: 0 !important;
    max-width: 500px;
}


/* ==========================================================================
   7. PUBLICATIONS PAGE COMPONENTS
   ========================================================================== */

/* Featured High-Impact Cards */
.featured-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 0.5rem;
}

.floating-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), 
                0 1px 3px rgba(0, 0, 0, 0.01);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 0.25s ease;
}

.floating-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 38px rgba(33, 78, 52, 0.07), 
                0 2px 8px rgba(0, 0, 0, 0.02);
    border-color: var(--accent-color);
}

.floating-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    width: 40px;
    height: 4px;
    border-radius: 0 0 4px 4px;
}
.highlight-nature::before { background-color: #008a00; }
.highlight-biology::before { background-color: #ff007f; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.journal-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}
.tag-nature { background: rgba(0, 138, 0, 0.07); color: #008a00; }
.tag-biology { background: rgba(255, 0, 127, 0.07); color: #ff007f; }

.year-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.card-authors {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-action-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color) !important;
    text-decoration: none !important;
    margin-top: auto;
}

.card-action-btn .arrow {
    margin-left: 0.3rem;
    transition: transform 0.2s ease;
}

.floating-card:hover .card-action-btn .arrow {
    transform: translateX(5px);
}

/* Timeline System */
.timeline-axis-wrapper {
    position: relative;
    padding-left: 2rem;
    margin-top: 2rem;
}

.timeline-axis-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 7px;
    width: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.timeline-year-group {
    position: relative;
    margin-bottom: 3rem; 
}

.timeline-year-node {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    margin-left: -2rem; 
    z-index: 2;
}

.timeline-year-node::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-color: var(--accent-color);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--accent-color);
    flex-shrink: 0;
}

.timeline-axis-year-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.timeline-records-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-left: 0.5rem;
}

.archive-row-item {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.2rem;
    transition: padding-left 0.2s ease;
}

.archive-row-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.archive-row-item:hover {
    padding-left: 0.4rem;
}

.item-meta-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
}

.item-type-label {
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.item-journal-title {
    font-style: italic;
    color: var(--accent-color);
    font-weight: 600;
}

.item-publication-title {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.item-authors-list {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.item-doi-link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none !important;
    color: var(--text-muted) !important;
    background: var(--sidebar-bg);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.item-doi-link:hover {
    background-color: var(--accent-color);
    color: #ffffff !important;
    border-color: var(--accent-color);
}


/* ==========================================================================
   8. PROJECTS PAGE COMPONENTS
   ========================================================================== */

/* Manifesto Card */
.manifesto-quote-card {
    background-color: #f4f6f4;
    border-left: 4px solid var(--accent-color);
    padding: 2rem;
    margin: 1.5rem 0 2.5rem 0;
    border-radius: 0 8px 8px 0;
}

.manifesto-quote-card .quote-body {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
    font-style: italic;
    margin: 0 0 1.25rem 0;
}

.manifesto-quote-card .quote-attribution {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    font-style: normal;
}

/* Project Cards & Header Text */
.project-card {
    margin-bottom: 3rem;
}

.project-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.25rem;
    margin-bottom: 1.5rem;
}

/* Image Galleries Grid Layouts */
.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 2rem 0;
}

.project-gallery-grid.dual-aspect {
    grid-template-columns: repeat(2, 1fr);
}

.project-gallery-grid.single-wide {
    grid-template-columns: 1fr;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item img {
    width: 100%;
    height: 260px; /* Increased height for larger display */
    object-fit: contain; /* Prevents cropping/clipping */
    background-color: var(--bg-card, #f9f9f9); /* Neutral background padding if aspect ratio differs */
    border-radius: 6px;
    display: block;
}

.gallery-item figcaption {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #ffffff;
    border-top: 1px solid var(--border-color);
}

/* Intercalated / Zig-Zag Text & Media Blocks */
.project-text-content {
    display: flex;
    flex-direction: column;
    gap: 3rem; /* Space between rows */
    margin-top: 2rem;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50/50 split */
    gap: 2.5rem;
    align-items: center; /* Vertically aligns image with text */
}

.feature-row .feature-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-row .feature-text h3 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-row .feature-text p {
    margin-bottom: 1rem;
    line-height: 1.65;
}

.feature-media {
    margin: 0;
}

.feature-media img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.feature-media figcaption {
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Web Preview Cards & Info Callouts */
.info-callout-box {
    background: #f8faf9;
    border: 1px solid #d1e2d9;
    padding: 1.75rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.stats-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1.5rem;
    padding-left: 1.2rem;
    margin-top: 1rem;
}

.stats-grid-list li {
    font-size: 0.92rem;
    line-height: 1.4;
}

.web-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.web-preview-card img {
    width: 100%;
    height: auto;
    max-height: 400px; /* Generous height so screenshot is clear and uncropped */
    object-fit: contain;
    display: block;
}

.web-preview-caption {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--accent-color, #1b4332);
    font-weight: 500;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}


/* ==========================================================================
   9. MEDIA QUERIES & RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 992px) {
    .container { 
        flex-direction: column; 
    }
    .left-col { 
        flex: 0 0 100%;
        border-right: none; 
        border-bottom: 1px solid var(--border-color); 
        padding: 8% 5%; 
        align-items: center;
        text-align: center;
    }
    .pub-switcher {
        width: 100%;
        max-width: 380px;
        margin: 1.5rem auto;
        text-align: left;
    }
    .links {
        align-items: center;
        margin-top: 1.5rem;
    }
    .right-col {
        padding: 8% 5%;
    }
}

@media (max-width: 900px) {
    .feature-row {
        grid-template-columns: 1fr; /* Stacks vertically on smaller screens */
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .project-gallery-grid,
    .project-gallery-grid.dual-aspect {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   10. SITE FOOTER
   ========================================================================== */

.site-footer {
    width: 100%;
    background-color: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 1rem;
    margin-top: auto; /* Keeps footer pinned to bottom on short pages */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.footer-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.footer-social-links a {
    color: var(--accent-color);
    font-size: 1.2rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.footer-social-links a:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}