/* style.css */
:root {
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);
    --accent-blue: #0071e3;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #eaeaec; /* Apple's light gray */
    overflow-x: hidden;
    overflow-y: auto;
}

html {
    scroll-behavior: smooth;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Background layer */
    display: block;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 90px; /* Space for the fixed header */
    padding-bottom: 50px;
    gap: 20px; /* Space between the glass sections */
    width: 100%;
}

.glass-container {
    position: relative;
    z-index: 10; /* Above the canvas */
    background: var(--glass-bg);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(5px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 30px;

    margin: 0 auto; 
    padding: 50px; /* Generous internal breathing room */

    width: 90%;
    max-width: 1500px;
    text-align: center;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.05),
        inset 0 0 20px rgba(255, 255, 255, 0.2); /* Inner glass glow */
    box-sizing: border-box; /* Crucial for padding to work correctly */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

main.glass-container {
    margin-top: 90px; /* Matches the content-wrapper padding-top */
    margin-bottom: 40px;
}

h1 { color: #1d1d1f; margin-bottom: 10px; }
p { color: #86868b; line-height: 1.5; }

/* Glass Header Styles */
.glass-header {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    z-index: 1000; /* Ensure it's above everything */
    box-sizing: border-box;
}

.header-left {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.logo {
    height: 30px; /* Adjust based on your logo design */
    width: auto;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    gap: 10px;
}

.header-right a {
    text-decoration: none;
    color: #1d1d1f;
    padding: 10px 20px; 
    border-radius: 50px; /* Apple-style Pill shape */
    
    /* Individual Glass Effect */
    background: rgba(255, 255, 255, 0.3); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.header-right a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 113, 227, 0.4);
    color: #0071e3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 5. Active State for current page */
.header-right a.active {
    background: #0071e3;
    color: #ffffff;
    border-color: #0071e3;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.1);
}

/* Mobile Responsive adjustment */
@media (max-width: 900px) {
    .glass-header {
        padding: 0 15px; /* Reduce side padding for more room */
        top: 5px;
    }

    .header-left {
        padding: 8px 12px; /* Slimmer logo box */
        gap: 8px;
    }

    .brand-name {
        display: none; /* Keep hidden to save critical space */
    }

    .header-right {
        /* CRITICAL FIXES */
        display: flex;
        overflow-x: auto; /* Allow swiping left/right */
        overflow-y: hidden;
        white-space: nowrap;
        gap: 8px;
        padding: 5px 0 10px 0; /* Extra bottom padding for scroll "breathing room" */
        
        /* Smooth scrolling for touch devices */
        -webkit-overflow-scrolling: touch; 
        
        /* Hide scrollbars but keep functionality */
        scrollbar-width: none; /* Firefox */
        flex: 1; /* Take up remaining space */
        justify-content: flex-start;
        margin-left: 10px;
    }

    .header-right::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .header-right a {
        font-size: 0.75rem; /* Slightly smaller text */
        padding: 8px 15px;  /* More compact pills */
        flex-shrink: 0;     /* Prevent pills from squishing */
    }
}

/* Hero Section Layout */
.hero-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    text-align: left; /* Change from center to left */
    width: 100%;
}

.hero-left {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-right {
    flex: 1.5;
}

/* Profile Photo Styling */
.profile-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%; /* Circular */
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Text Styles */
.hero-name {
    font-size: 2.8rem;
    margin: 0;
    background: linear-gradient(180deg, #1d1d1f 0%, #434344 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.designation {
    font-size: 1.4rem;
    color: #0071e3; /* Apple Blue */
    font-weight: 500;
    margin: 10px 0 5px 0;
}

.institute {
    font-size: 1.1rem;
    color: #86868b;
    margin-bottom: 30px;
}

/* Download Button Specifics */
.download-btn {
    display: inline-block;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive for Mobile */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    .hero-left {
        justify-content: center;
    }
    .hero-name {
        font-size: 2rem;
    }
}

/* Premium Apple-Style Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0077ed 0%, #006edb 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 980px; /* Apple's signature pill shape */
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Lift and Glow */
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 255, 0.4);
    background: linear-gradient(180deg, #0082ff 0%, #0071e3 100%);
}

/* Active Effect: Push Down */
.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 118, 255, 0.3);
}

/* Subtle Shimmer Overlay */
.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.cta-button:hover::after {
    left: 100%;
}

/* Icon spacing inside the button */
.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateY(2px); /* Makes the download arrow bounce slightly */
}

/* Button Grouping */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Secondary Button Style (Slightly different to distinguish) */
.secondary-btn {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    border: 1px solid rgba(0, 113, 227, 0.3);
    box-shadow: none;
}

.secondary-btn:hover {
    background: rgba(0, 113, 227, 0.15);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.1);
}

/* Modal Overlay */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

/* Modal Content Box */
.modal-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    max-width: 500px !important;
    padding: 40px !important;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1) !important; /* Soft, deep shadow */
    transform: scale(0.9);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Modal Content Box */
.modal-content {
    max-width: 400px;
    margin: 0; /* Override hero margin */
    animation: modalAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #86868b;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
    text-align: left;
}

.contact-item i {
    font-size: 20px;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.1);
    padding: 15px;
    border-radius: 12px;
}

.modal-subtitle {
    color: #434344 !important; /* Darker gray for better readability */
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.contact-item strong {
    color: #1d1d1f;
}

.contact-item p a {
    color: #0071e3 !important; /* Use Apple Blue for the email link */
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { to { transform: scale(1); } }

.close-btn:hover { color: #1d1d1f; }

/* About Page Specifics */
.about-section {
    text-align: left;
    max-width: 1000px;
}

@media (max-width: 768px) {
    .glass-container {
        padding: 40px 20px;
        width: 95%;
    }
    
    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

.about-merge-section {
    flex-direction: column; /* Stacks the About title above the grid */
    align-items: flex-start;
}

.section-title {
    font-size: 2.2rem;
    color: #1d1d1f;
    margin-bottom: 20px;
}

.bio-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #434344;
    margin-bottom: 20px;
}

.glass-divider {
    border: none;
    height: 1px;
    width: 100%;
    background: linear-gradient(
        to right, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.15) 15%, 
        rgba(0, 0, 0, 0.15) 85%, 
        rgba(0, 0, 0, 0) 100%
    );
}

/* Skills and Profiles Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.sub-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #1d1d1f;
}

/* Skills List Styling */
.skills-list {
    list-style: none;
    padding: 0;
}

.skills-list li {
    padding: 8px 0;
    color: #86868b;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Profile Links Styling */
.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-item {
    padding: 10px 18px;
    background: rgba(0, 113, 227, 0.05);
    border: 1px solid rgba(0, 113, 227, 0.2);
    border-radius: 12px;
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile-item:hover {
    background: #0071e3;
    color: white;
    transform: translateY(-3px);
}

/* Responsive Grid */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Timeline Layout */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px 0;
    padding-left: 30px;
}

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 2px;
    height: 100%;
    background: rgba(0, 113, 227, 0.2); /* Soft blue line */
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

/* The blue dot on the line */
.timeline-dot {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #0071e3;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0, 113, 227, 0.4);
    z-index: 2;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0071e3;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: #1d1d1f;
    margin: 0;
}

.institute-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #86868b;
    margin-bottom: 12px;
}

.timeline-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #434344;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }
}

/* Publications Filter */
/* Filter Wrapper - Centering the entire component */
.filter-wrapper {
    display: flex;
    justify-content: center; /* Horizontal center */
    align-items: center;     /* Vertical center */
    width: 100%;
    margin-bottom: 40px;
    position: sticky;
    top: 80px;               /* Adjust based on your navbar height */
    z-index: 100;
    padding: 10px 0;         /* Space for the glow effect */
}

/* Pill Container - Left Column */
.filter-glass-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
}

/* 3. The Individual Pills */
.filter-pill {
    height: 34px; /* Matches search bar height */
    padding: 0 18px;
    font-size: 0.85rem;
    display: inline-flex;    /* Allows for tight vertical centering */
    align-items: center;     /* Centers text and icon vertically */
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 50px;
    font-weight: 500;
    color: #434344;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* Active State */
.filter-pill.active {
    background: #ffffff;
    color: #0071e3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ensure font-awesome icons are also centered */
.filter-pill i {
    margin-right: 8px;
    line-height: 0; /* Prevents icon from pushing text down */
    display: inline-block;
    vertical-align: middle;
}

/* Hover Effect */
.filter-pill:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #1d1d1f;
}

.filter-pill.active i {
    opacity: 1;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .filter-glass-container {
        overflow-x: auto;
        max-width: 90vw;
        padding: 6px;
    }
    .filter-pill {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

.filter-group {
    display: flex;
    width: 100%;
    gap: 4px;
}

.filter-btn {
    flex: 1; /* This makes all buttons equal width and fill the bar */
    padding: 12px 10px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #434344;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* The Active "Sliding" Tab Look */
.filter-btn.active {
    background: #fff;
    color: #0071e3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
}

.filter-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
    color: #1d1d1f;
}

@media (max-width: 600px) {
    .filter-group {
        flex-wrap: wrap; /* Wraps buttons on very small screens */
    }
    .filter-btn {
        flex: 1 1 40%; /* Two buttons per row on mobile */
        font-size: 0.85rem;
    }
}

/* Publication Card */

/* Compact Publication Container */
.pub-container {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    text-align: left;
}

/* Rank Badge Styling */
.pub-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 10px 5px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(0, 113, 227, 0.2);
}

.rank-badge {
    font-size: 1rem;
    font-weight: 800;
    color: #0071e3;
}

/* Specific Rank Colors */
.rank-badge.q1, .rank-badge.rank-a { color: #15803d; } /* Green for Q1/Rank A */
.rank-badge.q2, .rank-badge.rank-b { color: #b45309; } /* Orange for Q2/Rank B */

.rank-year {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #86868b;
    margin-top: 4px;
}

/* Info Section Alignment */
.pub-info {
    flex: 1;
}

.pub-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 22px; /* Matching certification border radius */
    padding: 24px;
    backdrop-filter: blur(10px);
    margin-bottom: 25px;
    display: block;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth Apple-style transition */
    box-sizing: border-box;
}

/* Remove default browser margins that cause "extra space" */
.pub-card h3 {
    margin: 0 !important;
    font-size: 1.2rem;
    line-height: 1.4;
    /* color: #f5f5f7; Your Pristine shade */
    text-align: left;
}

/* Hover Effect: Lift, Glow, and Border Color Change */
.pub-card:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px); /* Same lift as certifications */
    border-color: rgba(0, 113, 227, 0.4); /* Subtle blue border on hover */
    box-shadow: 0 15px 35px rgba(0, 113, 227, 0.12); /* Soft blue-tinted shadow */
}

.pub-type {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #0071e3;
    margin-bottom: 10px;
}

.pub-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Container for Author Pills */
.pub-authors-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* Individual Author Pill */
.author-pill {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    color: #434344;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.author-pill strong {
    color: #0071e3;
}

.rank-pill.rank-a {
    background: rgba(0, 113, 227, 0.1); /* Blue tint for conferences */
    color: #0071e3;
    border-color: rgba(0, 113, 227, 0.2);
}

/* Highlight your own name */
.author-pill.highlight {
    background: rgba(0, 113, 227, 0.05);
    color: #0071e3;
    border-color: rgba(0, 113, 227, 0.2);
    font-weight: 600;
}

/* Hover effect for pills */
.author-pill:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    border-color: rgba(0, 113, 227, 0.3);
}

.pub-authors {
    font-size: 0.9rem;
    color: #434344;
}

/* Action Buttons (Small & Discrete) */
.pub-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

/* Unified Liquid Buttons */
.pub-actions-row {
    margin-top: auto; /* Ensures it stays at the bottom */
    /* min-height: 40px; */
    display: flex;
    gap: 10px;
    align-items: center;
}

.pub-btn {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    color: #86868b;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.pub-btn:hover {
    color: #0071e3;
}

.pub-btn.active {
    color: #1d1d1f;
    font-weight: 600;
}

.pub-venue {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0071e3; /* Apple Blue for the venue */
    margin-bottom: 4px;
}

.venue-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0071e3;
    text-align: right; /* Aligns text to the right inside its container */
    margin-left: 10px; /* Prevents overlap on small desktops */
}

/* Action Pill Design */
.action-pill {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: #434344;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* Active/GitHub Blue State */
.action-pill.active {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    border-color: rgba(0, 113, 227, 0.3);
}

.action-pill:hover {
    background: #0071e3;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 113, 227, 0.2);
}

.action-pill i {
    font-size: 1rem;
}

/* Action Links */
.pub-links {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.pub-link {
    font-size: 0.9rem;
    color: #0071e3;
    text-decoration: none;
    font-weight: 600;
    padding: 5px 10px;
    background: rgba(0, 113, 227, 0.05);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pub-link:hover {
    background: rgba(0, 113, 227, 0.1);
    transform: scale(1.05);
}

/* Search and Filters Layout */
.pub-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 50px;
    width: 100%;
}

/* Outer Wrapper - Sticky and Centered */
.controls-wrapper {
    position: sticky;
    top: 90px;
    z-index: 100;
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

/* The Dual Column Row */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px; /* Aligns with your card content width */
    gap: 20px;
}

/* Responsive: Stack them on mobile */
@media (max-width: 900px) {
    .controls-row {
        flex-direction: column;
        align-items: center;
    }
    .search-glass-container {
        max-width: 100%;
    }
}

/* Search Wrapper */
.search-wrapper {
    display: flex;
    justify-content: center;
    margin: 0 auto 30px auto;
    width: 100%;
    max-width: 700px; /* Limits width for better focus */
}

/* Search Bar - Right Column (Compact) */
.search-glass-container {
    display: flex;
    align-items: center;
    flex: 1; /* Allows search to take remaining space */
    max-width: 400px; /* Keeps search from becoming too long */
    height: 34px; /* Reduced height */
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* Icons */
.search-icon {
    color: #86868b;
    font-size: 0.85rem;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.clear-icon {
    color: #86868b;
    font-size: 0.9rem;
    cursor: pointer;
    margin-left: 10px;
    display: none; /* Hidden until user types */
    transition: color 0.3s ease;
}

.clear-icon:hover { color: #ff3b30; }

.search-wrapper input {
    width: 100%;
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(0, 113, 227, 0.2);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    font-size: 1rem;
    color: #1d1d1f;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-wrapper input:focus {
    border-color: #0071e3;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* The Input Field itself */
#pubSearch {
    font-size: 0.85rem;
    height: 100%;
    width: 100%;
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #1d1d1f;
    font-weight: 400;
}

#pubSearch::placeholder {
    color: #86868b;
    opacity: 0.8;
}

/* Interactive States */
.search-glass-container:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(0, 113, 227, 0.4);
    transform: translateY(-1px);
}

.search-glass-container:focus-within .search-icon {
    color: #0071e3;
}

.pub-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #86868b;
}

/* Title and Authors block */
.pub-main-content {
    margin-top: 4px;
}

.tag {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.pub-card {
    display: block; /* Ensure visibility */
    animation: fadeIn 0.4s ease forwards;
}

/* Container for the overall layout */
.pub-compact-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

/* Horizontal Header for Rank & Year */
.pub-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Apple-style Glass Pills */
.rank-pill {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Specific styling for the date pill to keep it subtle */
.year-pill {
    white-space: nowrap; /* Prevents the date from wrapping into two lines */
}

/* Rank Specific Colors - Soft Apple Tones */
.rank-pill.q1, .rank-pill.rank-a {
    background: rgba(52, 199, 89, 0.1);
    color: #248a3d;
    border-color: rgba(52, 199, 89, 0.2);
}

.rank-pill.year-pill {
    background: rgba(255, 255, 255, 0.4);
    color: #86868b;
}

/* Pre-print Rank Pill (arXiv / BioRxiv) */
.pub-card[data-type="preprint"] .rank-pill {
    background: rgba(175, 82, 222, 0.1); /* Apple Purple */
    color: #af52de;
    border-color: rgba(175, 82, 222, 0.2);
}

/* Thesis Rank Pill */
.pub-card[data-type="thesis"] .rank-pill {
    background: rgba(142, 142, 147, 0.1); /* Apple Gray/Slate */
    color: #1d1d1f;
    border-color: rgba(142, 142, 147, 0.3);
    font-weight: 700;
}

/* Conference Rank Pill (Standardizing with Journal) */
.pub-card[data-type="conference"] .rank-pill {
    background: rgba(255, 149, 0, 0.1); /* Apple Orange */
    color: #d2691e;
    border-color: rgba(255, 149, 0, 0.2);
}

/* Hover Adjustments for different types */
.pub-card[data-type="preprint"]:hover {
    border-color: rgba(175, 82, 222, 0.4);
}

.pub-card[data-type="thesis"]:hover {
    border-color: rgba(29, 29, 31, 0.3);
}

/* Specific button styling for Thesis (usually a link to a repository) */
.pub-card[data-type="thesis"] .action-pill.active {
    background: rgba(29, 29, 31, 0.05);
    color: #1d1d1f;
    border-color: rgba(29, 29, 31, 0.2);
}

/* Responsive adjustment */
@media (max-width: 600px) {
    .pub-container {
        flex-direction: column;
        gap: 15px;
    }
    .pub-rank {
        flex-direction: row;
        gap: 10px;
        min-width: auto;
        padding: 5px 15px;
    }
}

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

/* Category Headers */
.category-subtitle {
    font-size: 1.4rem;
    color: #1d1d1f;
    margin: 30px 0 20px 0;
    padding-left: 10px;
    border-left: 4px solid #0071e3;
}

/* Grid for Certifications */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
}

/* Base Card Style */
.cert-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 22px;
    padding: 24px;
    text-align: left;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.cert-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 113, 227, 0.3);
}

.cert-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #86868b;
}

.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    text-transform: uppercase;
}

/* Tag Color Variations */
.tag.gold { background: rgba(255, 191, 0, 0.15); color: #b8860b; }
.tag.blue { background: rgba(0, 113, 227, 0.1); color: #0071e3; }
.tag.green { background: rgba(46, 204, 113, 0.1); color: #27ae60; }

.cert-card h3 {
    font-size: 1.1rem;
    color: #1d1d1f;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.issuer {
    font-weight: 600;
    color: #0071e3;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cert-body h3 {
    font-size: 1.1rem;
    color: #1d1d1f;
    margin-bottom: 5px;
}

/* Layout for info + thumbnail */
.cert-body-layout {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.cert-info { flex: 1; }

/* Thumbnail Container */
.cert-thumb-container {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 113, 227, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.cert-thumb-container:hover {
    transform: scale(1.15);
    border-color: rgba(0, 113, 227, 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cert-thumb-container:hover .thumb-overlay {
    opacity: 1;
}

/* Mobile fix */
@media (max-width: 600px) {
    .cert-body-layout { flex-direction: column; align-items: flex-start; }
    .cert-thumb-container { width: 100%; height: 150px; }
}

.cert-desc {
    font-size: 0.9rem;
    color: #434344;
    line-height: 1.4;
}

.cert-icon {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(0, 113, 227, 0.05);
    border-radius: 12px;
}

.cert-info h3 {
    font-size: 1.2rem;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1.3;
}

.issuer {
    font-size: 0.95rem;
    color: #0071e3;
    font-weight: 600;
    margin-bottom: 4px;
}

.cert-date {
    font-size: 0.85rem;
    color: #86868b;
    margin-bottom: 15px;
}

.view-cert {
    font-size: 0.9rem;
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.view-cert:hover {
    border-color: #0071e3;
}

/* Color Coding by Data-Type */
.cert-card[data-type="award"] { border-left: 5px solid #ff9f0a; } /* Gold */
.cert-card[data-type="fdp"] { border-left: 5px solid #34c759; }   /* Green */
.cert-card[data-type="webinar"] { border-left: 5px solid #5856d6; } /* Purple */
.cert-card[data-type="workshop"] { border-left: 5px solid #1071a3; } /* Blue */
.cert-card[data-type="outreach"] { border-left: 0px solid none; }
.cert-card[data-type="exam"] { border-left: 5px solid #ffcc00; } /* Yellow */
.cert-card[data-type="cocurricular"] { border-left: 5px solid #ff375f; } /* Red */

@media (max-width: 900px) {
    .cert-grid { grid-template-columns: 1fr; }
    .cert-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Visits Gallery Styles */
.visit-header {
    margin-bottom: 40px;
    border-left: 4px solid #0071e3;
    padding-left: 20px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #86868b;
    margin-top: -10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 250px;
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Glass Overlay on Hover */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-overlay span {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 1.1rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Special Layout: Make the first image span 2 columns if screen is wide */
@media (min-width: 900px) {
    .gallery-item:first-child {
        grid-column: span 2;
    }
}

/* Blog Page Styles */
.blog-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: left;
}

.blog-meta {
    font-size: 0.9rem;
    color: #0071e3;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Featured Post Styling */
.featured-blog {
    padding: 20px 0;
}

.blog-title {
    font-size: 2.5rem;
    color: #1d1d1f;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}

.blog-excerpt {
    font-size: 1.2rem;
    color: #434344;
    line-height: 1.6;
    margin-bottom: 25px;
}

.read-more {
    font-size: 1.1rem;
    color: #0071e3;
    text-decoration: none;
    font-weight: 600;
}

/* Feed List Styling */
.blog-feed {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 30px;
}

.blog-item:last-child {
    border: none;
}

.blog-item-title {
    font-size: 1.6rem;
    color: #1d1d1f;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.blog-item:hover .blog-item-title {
    color: #0071e3;
}

.blog-item-excerpt {
    color: #86868b;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.read-link {
    text-decoration: none;
    color: #0071e3;
    font-weight: 500;
}

body {
    animation: fadeInPage 0.6s ease-in-out;
}
@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Skills Pill Styling */
.skills-pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.skill-pill {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 18px;
    border-radius: 50px; /* Perfect Pill Shape */
    font-size: 0.95rem;
    color: #434344;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.skill-pill:hover {
    background: #0071e3;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 113, 227, 0.2);
}

/* Profile Pill Styling */
.profile-links-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.profile-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 113, 227, 0.05);
    border: 1px solid rgba(0, 113, 227, 0.2);
    padding: 12px;
    border-radius: 15px;
    color: #0071e3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-pill i {
    font-size: 1.2rem;
}

.profile-pill:hover {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 113, 227, 0.15);
    border-color: #0071e3;
}

/* Specific logo colors on hover (Optional) */
.profile-pill:hover i.fa-linkedin { color: #0077b5; }
.profile-pill:hover i.fa-github { color: #333; }
.profile-pill:hover i.fa-orcid { color: #A6CE39; }

/* Dual Layout Styling */



/* Experience Card - Matching Certification Style */
.exp-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 22px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: default;
}

/* Hover Effect: Lift and Glow */
.exp-card:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-5px);
    border-color: rgba(0, 113, 227, 0.4);
    box-shadow: 0 15px 30px rgba(0, 113, 227, 0.1);
}

/* Meta Bar inside Experience Card */
.exp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #86868b;
}

.exp-desc {
    font-size: 0.9rem;
    color: #434344;
    line-height: 1.5;
}

.exp-card h3 {
    font-size: 1.2rem;
    color: #1d1d1f;
    margin: 0 0 5px 0;
}

.experience-page {
    max-width: 1200px; /* Wider to accommodate two columns */
}

.dual-layout {
    display: flex;
    gap: 80px;
    justify-content: space-between;
    width: 100%;
}

.experience-column, .education-column {
    flex: 1;
}

/* Timeline tweaks for dense info */
.edu-details {
    font-weight: 600;
    color: #1d1d1f;
    margin: 4px 0;
}

.edu-highlight {
    font-size: 0.9rem;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin: 5px 0;
}

.edu-highlight.silver {
    color: #7d7d7d;
    background: rgba(125, 125, 125, 0.1);
}

.edu-thesis {
    font-size: 0.85rem;
    color: #86868b;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 8px;
    margin-top: 8px;
}

/* Responsive: Stack columns on mobile */
@media (max-width: 1000px) {
    .dual-layout {
        flex-direction: column;
        gap: 40px;
    }
}

/* Awards Ribbon Layout */
.awards-ribbon-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.award-ribbon {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 20px 30px;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.award-ribbon:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(10px); /* Slides right slightly on hover */
    border-color: rgba(0, 113, 227, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.award-icon {
    font-size: 24px;
    margin-right: 25px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Award Colors */
.award-icon.silver { color: #95a5a6; background: rgba(149, 165, 166, 0.1); }
.award-icon.gold { color: #f1c40f; background: rgba(241, 196, 15, 0.1); }
.award-icon.blue { color: #0071e3; background: rgba(0, 113, 227, 0.1); }

.award-text h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #1d1d1f;
}

.award-text p {
    margin: 5px 0 0 0;
    font-size: 0.95rem;
    color: #86868b;
}

/* Mobile Tweak */
@media (max-width: 768px) {
    .award-ribbon {
        padding: 15px;
    }
    .award-icon {
        margin-right: 15px;
        min-width: 40px;
    }
}

/* Card Layout Adjustment */
.exp-card-body {
    display: flex;
    align-items: flex-start; /* Aligns items to the top */
    gap: 20px; /* Space between logo and text */
    text-align: left; /* Forces left alignment */
}

/* Logo Container */
.exp-logo {
    flex: 0 0 60px; /* Fixed width: won't grow or shrink */
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 5px;
    overflow: hidden;
}

.exp-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.exp-logo i {
    font-size: 28px;
    color: #0071e3;
}

/* Text Container */
.exp-info {
    flex: 1; /* Takes up remaining space */
}

/* Ensure typography is left-aligned */
.exp-card h3, 
.institute-name, 
.exp-desc, 
.exp-meta {
    text-align: left;
    margin-left: 0;
}

/* Responsive: Stack logo on mobile if space is tight */
@media (max-width: 480px) {
    .exp-card-body {
        flex-direction: column;
        align-items: flex-start;
    }
    .exp-logo {
        margin-bottom: 10px;
    }
}

/* Container for the profile buttons */
.profile-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

/* Base Profile Pill Style */
.profile-pill {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px; /* Pill shape */
    color: #1d1d1f;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
}

.profile-pill i {
    width: 18px; /* Fixed width for icons ensures text aligns perfectly vertically */
    text-align: center;
    flex-shrink: 0; /* Prevents icon from squishing */
}

/* Hover Effect: Lift and Glow Blue */
.profile-pill:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 113, 227, 0.4);
    color: #0071e3;
    box-shadow: 0 8px 15px rgba(0, 113, 227, 0.1);
}

/* Icon specific colors on hover */
.profile-pill:hover i.fa-orcid { color: #A6CE39; }
.profile-pill:hover i.fa-youtube { color: #FF0000; }
.profile-pill:hover i.fa-instagram { color: #E1306C; }
.profile-pill:hover i.fa-researchgate { color: #00CCBB; }

/* Responsive tweaks */
@media (max-width: 600px) {
    .profile-links-container {
        grid-template-columns: 1fr 1fr; /* 2 columns on mobile */
    }
}

/* Tighten the gap for the Membership section specifically */
.membership-section {
    width: 100%;
    margin-top: 10px; /* Reduced gap since the divider handles the breathing room */
}

/* Membership Grid Layout */
.membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Adjusting the card body for left alignment within memberships */
.membership-grid .exp-card-body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
}

/* Responsive fix for smaller screens */
@media (max-width: 900px) {
    .membership-grid {
        grid-template-columns: 1fr;
    }
}

/* Visit Section Spacing */
.visit-section {
    margin-bottom: 50px;
    text-align: left;
}

.visit-info {
    margin-bottom: 25px;
}

.visit-info h3 {
    font-size: 1.5rem;
    color: #1d1d1f;
    margin-bottom: 8px;
}

/* Uniform Gallery Grid */
.masonry-gallery {
    display: grid;
    /* Adjust '250px' to make images larger or smaller */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 20px;
    width: 100%;
    padding-bottom: 40px;
}

/* Individual Item with Fixed Height */
.masonry-item {
    height: 200px; /* Fixed height for all images */
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This is the magic: it crops without stretching */
    display: block;
    transition: transform 0.5s ease;
}

/* Caption as a glass overlay appearing on hover */
.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1d1d1f;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    transform: translateY(100%); /* Hidden by default */
    transition: transform 0.3s ease;
    text-align: center;
}

/* Hover Effects */
.masonry-item:hover {
    transform: scale(1.05);
    z-index: 10;
    border-color: rgba(0, 113, 227, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.masonry-item:hover img {
    transform: scale(1.1);
}

.masonry-item:hover .img-caption {
    transform: translateY(0); /* Slides up on hover */
}

/* Responsive Masonry */
@media (max-width: 1024px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-gallery {
        column-count: 1;
    }
    .visit-info h3 {
        font-size: 1.25rem;
    }
}

/* Lightbox Style */
.lightbox-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Light Apple-style backdrop */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transform: scale(0.9);
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.lightbox-caption {
    position: absolute;
    bottom: 5%;
    color: #1d1d1f;
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #1d1d1f;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
}

@keyframes zoomIn {
    to { transform: scale(1); }
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1d1d1f;
    font-size: 24px;
    padding: 15px 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3100;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev { left: 30px; }
.next { right: 30px; }

/* Responsive Arrows */
@media (max-width: 768px) {
    .lightbox-nav {
        padding: 10px 15px;
        font-size: 18px;
    }
    .prev { left: 10px; }
    .next { right: 10px; }
}

/* Ensure the grid doesn't collapse and handles rows properly */
.projects-grid {
    display: grid;
    /* This creates a stable 2-column layout on desktop */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    /* This ensures all items in a row have the same height */
    grid-auto-rows: 1fr; 
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    display: flex;
    flex-direction: column;
    /* REMOVE height: 100% - let the grid handle it */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* This prevents overlap during scaling animations */
    position: relative;
    z-index: 1;
}

/* Ensure content fills the card and pushes the buttons to the bottom */
.project-main-content {
    flex: 1; /* This is the magic line that pushes buttons down */
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    z-index: 10; /* Brings the hovered card to the front */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between; /* This pushes date left and institute right */
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.project-body h3 {
    font-size: 1.25rem;
    color: #1d1d1f;
    margin-bottom: 10px;
}

.project-desc {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #434344;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Author pills used here as "Skill" pills */
.project-card .pub-authors-container {
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .project-header {
        flex-direction: column;
        align-items: flex-start; /* Stacks them on the left for mobile */
        gap: 8px;
    }
    .venue-label {
        text-align: left;
        margin-left: 0;
    }
}

/* Teaching Grid Layout */
.teaching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 40px; /* Space between IITR and IIITDM blocks */
    align-items: start;
    margin-top: 20px;
}

.teaching-block {
    width: 100%;
}

.teaching-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Aligns date with the bottom of title */
    margin-bottom: 15px;
    padding: 0 5px;
}

.teaching-title-grp h3 {
    font-size: 1.2rem;
    color: #1d1d1f;
}

/* Table Style Adjustments for Two Columns */
.glass-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem; /* Slightly smaller for 2-column fit */
}

.glass-table th {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    text-transform: uppercase;
    font-weight: 700;
    color: #86868b;
}

.glass-table td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #1d1d1f;
}

/* Responsive: Stack on Mobile */
@media (max-width: 1024px) {
    .teaching-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Outreach Grid Two-Column Layout */
.outreach-grid-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 25px;
}

.volunteer-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 22px;
    padding: 24px;
    text-align: left;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.volunteer-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 113, 227, 0.4);
}

.vol-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.vol-icon {
    font-size: 1.4rem;
    color: #0071e3; /* Apple Blue */
    opacity: 0.8;
}

.vol-content h3 {
    font-size: 1.15rem;
    color: #1d1d1f;
    margin-bottom: 6px;
}

.vol-content .institute-name {
    font-size: 0.9rem;
    color: #0071e3;
    font-weight: 500;
    margin-bottom: 10px;
}

.vol-desc {
    font-size: 0.9rem;
    color: #434344;
    line-height: 1.5;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .outreach-grid-two-col {
        grid-template-columns: 1fr;
    }
}

.profiles-section-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.profile-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.profile-pill {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #1d1d1f;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-pill i {
    font-size: 1.1rem;
}

/* Hover States */
.profile-pill:hover {
    transform: translateY(-3px) scale(1.03);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Specific Platform Accents on Hover */
.profile-pill.academic:hover { color: #0071e3; border-color: #0071e3; }
.profile-pill.github:hover { color: #333; }
.profile-pill.linkedin:hover { color: #0077b5; }
.profile-pill.instagram:hover { color: #e1306c; }
.profile-pill.youtube:hover { color: #ff0000; }
.profile-pill.facebook:hover { color: #1877f2; }
.profile-pill.goodreads:hover { color: #754212; }

@media (max-width: 900px) {
    .profiles-section-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Instagram Creative Card */
.instagram-glass-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
    transition: all 0.4s ease;
    /* Subtle gradient border effect */
    border-image: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) 1;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.instagram-glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(220, 39, 67, 0.1);
}

.insta-profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.insta-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: white;
}

.insta-text h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #f5f5f7; /* Your Pristine shade */
}

.insta-text p {
    margin: 4px 0 0 0;
    color: #a1a1a6; /* Your Platinum shade */
    font-size: 0.9rem;
}

/* The Follow Button */
.insta-follow-btn {
    text-decoration: none;
    background: #ffffff;
    color: #1d1d1f;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.insta-follow-btn:hover {
    background: #f5f5f7;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .instagram-glass-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .insta-profile-info {
        flex-direction: column;
    }
}

/* Instagram Posts Grid */
.insta-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: -20px; /* Pulls closer to the profile card */
    margin-bottom: 50px;
}

.insta-post-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Keeps posts perfectly square like Instagram */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-image-wrapper {
    width: 100%;
    height: 100%;
}

.post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Hover Effects */
.post-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-overlay span {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.insta-post-card:hover {
    transform: scale(0.98); /* Slight inward "press" effect */
    border-color: rgba(220, 39, 67, 0.5);
}

.insta-post-card:hover img {
    transform: scale(1.1);
}

.insta-post-card:hover .post-overlay {
    opacity: 1;
}

.insta-post-card:hover .post-overlay span {
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 800px) {
    .insta-posts-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 40px auto;
    }
}

/* 404 Page Wrapper */
.error-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* Plexus canvas shows through */
}

/* Mimicking the Contact Popup Design */
.404-card {
    background: rgba(255, 255, 255, 0.9); /* High opacity white */
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 28px;
    padding: 60px 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    animation: popupFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* High Contrast Text */
.error-code {
    font-size: 7rem;
    font-weight: 800;
    color: #1d1d1f; /* Obsidian - Darkest Gray */
    margin-bottom: 0;
    letter-spacing: -4px;
}

.liquid-divider {
    height: 4px;
    width: 50px;
    background: #0071e3; /* Apple Blue */
    margin: 10px auto 30px auto;
    border-radius: 10px;
}

.error-title {
    color: #1d1d1f;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.error-text {
    color: #424245; /* Iron Gray */
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 35px;
}

/* Actions */
.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.error-actions .action-pill {
    padding: 12px 24px;
    font-weight: 600;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Bio Section Layout */
/* Dark Text Styles for Readability */
.bio-intro {
    font-size: 1.35rem;
    color: #1d1d1f; /* Obsidian - Darkest Gray */
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 500;
}

.bio-main-text {
    font-size: 1.05rem;
    color: #424245; /* Iron - Muted Dark Gray */
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Highlights for Light Mode */
.bio-glass-container.light-mode strong {
    color: #000000; /* Pure Black for bold emphasis */
    font-weight: 700;
}

.bio-glass-container.light-mode em {
    color: #0071e3; /* Classic Apple Blue for Research Titles */
    font-style: normal;
    font-weight: 600;
}

/* Vertical Spacing */
.bio-section {
    max-width: 850px;
    margin: 80px auto;
    padding: 0 20px;
}