/* Reset and Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    color: #333;
    overflow-x: hidden;
    background: linear-gradient(135deg, #ffffff, #ffffff);
}

/* Header Navigation */
header {
    background-color: #333;
    padding: 0.5rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header li a {
    color: white;
    font-size: 1.3rem;
}

header ul li a:hover {
    background-color: #444;
    transition: background-color 0.3s ease;
}


@media (max-width: 768px) {
    .header-nav > ul > li:nth-child(2),
    .header-nav > ul > li:nth-child(3),
    .header-nav > ul > li:nth-child(4) {
        display: none; /* Hide "Research" and "Publications" in the header navigation */
    }
}

.hamburger-menu {
    display: block;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.hamburger-menu i {
    color: white;
    font-size: 1.3rem;
}

.hamburger-menu:hover i {
    color:  #666;
    transition: background-color 0.3s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100vh;
    background-color: #333;
    padding: 2rem 0;
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: 1rem;
    cursor: pointer;
}

.close-btn i {
    color: white;
    font-size: 1.5rem;
}

.close-btn:hover i {
    color:  #666;
    transition: background-color 0.3s ease;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sidebar ul li {
    margin: 0;
    padding: 0;
    width: 100%;
}

.sidebar ul li a {
    display: block;
    padding: 1rem 2rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
    width: 100%;
}

.sidebar ul li a:hover {
    background-color: #444;
}

.sidebar ul li.cv-download {
    margin-top: 1rem;
}

.sidebar ul li.cv-download a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar ul li.cv-download a i {
    font-size: 1.2rem;
}

/* Hide navigation items when sidebar is closed */
.sidebar:not(.active) {
    visibility: hidden;
}

/* Ensure main content is not hidden behind sidebar */
main {
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

nav ul li {
    margin: 0 1.5rem;
}

nav ul li.cv-download {
    margin-left: auto; /* Push to the right */
    margin-right: 2rem; /* Add some space from the right edge */
}

/* Center the main navigation items */
nav ul li:not(.cv-download) {
    margin: 0 1.5rem;
}

nav ul li:not(.cv-download) a {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li:not(.cv-download) a:hover {
    color: #fff;
    opacity: 0.8;
}

nav ul li:not(.cv-download) a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #fff;
    transition: width 0.3s ease;
}

nav ul li:not(.cv-download) a:hover::after {
    width: 100%;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.5px;
}

nav ul li.cv-download a {
    background-color: #2c3e50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.5px;
}

nav ul li.cv-download a i {
    font-size: 1.4rem;
    color: #ff4444;
    transition: transform 0.3s ease;
}

nav ul li.cv-download a:hover {
    background-color: #34495e;
    transform: scale(1.05);
}

nav ul li.cv-download a:hover i {
    transform: scale(1.2);
}

/* Main Content */
main {
    margin-top: 4rem; /* Space for fixed header */
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

/* Video Container (Research Page Only) */
.research-page .video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 10vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.research-page .video-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10%;
    height: 100%;
    background: linear-gradient(to right, transparent, #ffffff);
    pointer-events: none;
    z-index: 1;
}

.research-page .video-container video {
    position: absolute;
    width: 20vw;
    height: 100vh;
    right: 0;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.research-page .video-container video.visible {
    opacity: 1;
}

/* Research Page Specific Styles */
.research-page main {
    margin-left: 5vw;
}

/* Research Sections */
.research-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 5vh 2vw 5vh 3vw;
}

.research-description {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 1000px;
    margin: 0 auto;
}

.research-description h2 {
    margin-bottom: 1rem;
}

.research-description p {
    font-size: 1.2rem;
    line-height: 1.5;
}

/* Links */
a {
    color: #333;
    text-decoration: underline;
}

a:hover {
    color: #666;
}

/* Media Query for Smaller Screens */
@media (max-width: 768px) {
    .research-description {
        background-color: transparent;
        box-shadow: none;
    }
}


/* Publications Page Styles */
.publications-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 120px; /* Increased from 80px to 120px */
}

.publications-container h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2.5rem;
    position: relative; /* Added position relative */
    z-index: 1; /* Added z-index */
}

.year-section {
    margin-bottom: 40px;
}

.year-section h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.publication-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.publication-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.citation {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.journal-abbr {
    font-weight: bold;
    color: #666;
    margin-right: 5px;
}

.doi-link {
    display: inline-block;
    margin-top: 10px;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

.doi-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .publications-container {
        padding: 15px;
    }
    
    .publication-item {
        padding: 10px;
    }
    
    .citation {
        font-size: 14px;
    }
}

/* About Page Styles */
.about-section {
    padding: 2rem 0;
    width: 100%;
}

.profile-container {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.profile-image {
    flex: 0 0 300px;
}

.profile-pic {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #333;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: normal;
}

.profile-info h1 strong {
    font-weight: bold;
}

.profile-info h2 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: normal;
}

.profile-info .title-separator {
    margin: 0 0.5rem;
    color: #666;
}

.bio {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #333;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #666;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background:  #f9f9f9;;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.about-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.about-card h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-card h3 i {
    color: #666;
}

.about-card h4 {
    color: #444;
    margin-bottom: 0.5rem;
}

.about-card ul {
    list-style: none;
    padding: 0;
}

.about-card li {
    margin-bottom: 1rem;
}

.about-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

.about-card h3,
.about-card p {
    transition: color 0.3s ease;
}


.horizontal-panels {
    display: flex;
    justify-content: center;
    height: 350px;
    
  }
  
.panel {
    position: relative;
    height: 60%;
    width: 80px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: width 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease; /* Added width transition */    
  }
  
  /* Blurred background on hover */
  .panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    filter: blur(3px) ;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
  }

  .panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    filter: blur(3px) ;
    opacity: 0.2;
    transition: opacity 0.5s ease;
    z-index: 1;
  }

  .panel-wrapper:hover .panel::before,
  .panel-wrapper:hover .panel::after {
    opacity: 1;
  }
  
  /* Rotated text (default state) */
  .rotated-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(180deg);  /* <-- Center properly */
    z-index: 1;
    transition: opacity 0.3s ease;
    line-height: 1.2;
  }
  
  /* Hidden content initially */
  .panel-content {
    opacity: 0;
    padding: 2rem;
    position: relative;
    z-index: 2;
    transform: translateX(20px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    transition-delay: 0.0s;
    color: #333;
    width: 100%;
    padding-top: 3rem;
  padding-left: 1.5rem;
  }

  .panel-content h3 {
    margin: 0;
    position: absolute;
    top: 1rem;
    left: 1.5rem;
  }

  .panel-wrapper a {
    text-decoration: none;
    color: inherit;
  }
  
  .panel-wrapper a h3,
  .panel-wrapper a p {
    text-decoration: none;
    color: inherit;
    background-color: rgba(255, 255, 255,0.4); /* Add a white background */
  }
  
  /* Hover state: expand panel, show background and content */
  .panel:hover {
    width: 400px;
  }
  
  .panel:hover::before {
    opacity: 1;
  }
  
  .panel:hover .rotated-label {
    opacity: 0;
  }
  
  .panel:hover .panel-content {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.4s; 
  }

  .panel-wrapper {
    position: relative;
  }
  
  .panel-wrapper:hover .panel {
    width: 400px;
  }
  
  .panel-wrapper:hover .panel::before {
    opacity: 1;
  }
  
  .panel-wrapper:hover .rotated-label {
    opacity: 0;
    transition-delay: 0s;
  }
  
  .panel-wrapper:hover .panel-content {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.4s;
  }

.about-card:hover .panel-link::after {
    transform: scaleX(1);
    
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.skill-category h4 {
    color: #444;
    margin-bottom: 0.5rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    color: #666;
    margin-bottom: 0.3rem;
}

/* Responsive Design */
@media (max-width: 800px) {
    .profile-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image {
        flex: 0 0 auto;
    }

    .social-links {
        justify-content: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Research Tabs */
.research-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 0 20px;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
    z-index: 1001;
}

.tab-button.active {
    color: #333;
    font-weight: bold;
    border-bottom: 2px solid #333;
}

.tab-content {
    display: none;
    margin-top: 0; /* Remove unnecessary space above the tab content */
}

.tab-content.active {
    display: block;
}

/* Geodynamics Tab Styles */
#geodynamics {
    margin-left: 25vw;
}

#geodynamics .video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 25vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

#geodynamics .video-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10%;
    height: 100%;
    background: linear-gradient(to right, transparent, #ffffff);
    pointer-events: none;
    z-index: 1;
}

#geodynamics .video-container video {
    position: absolute;
    width: 50vw;
    height: 100vh;
    right: 0;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#geodynamics .video-container video.visible {
    opacity: 1;
}


/* Rupture Modelling Tab Styles */
#rupture {
    margin-left: 0;
    width: 100%;
}

#rupture .research-section {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 2vh 2vw 2vh 2vw;
    gap: 1rem;
    margin-right: 0;
    width: 100%;
}

#rupture .section-image {
    flex: 0 0 35vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0rem;
}

#rupture .section-image img {
    width: 100%;
    height: 50%;
    object-fit: contain;
    object-position: center;
    padding: 0rem;
}

#rupture .research-description {
    flex: 6;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 2rem;
    margin-right: 1rem;
}

/* Remove old rupture styles */
#rupture .figure-container,
#rupture .rupture-container,
#rupture .rupture-media,
#rupture .rupture-content,
#rupture .rupture-description {
    display: none;
}

.sketchfab-embed-wrapper {
    width: 100%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sketchfab-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Design */
@media (max-width: 800px) {
    .research-tabs {
        position: fixed;
        top: 0;
        margin-top: 4rem;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px;
    }

    .tab-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    #geodynamics {
        margin-left: 0;
        padding-top: 6rem;
    }

    #geodynamics .video-container {
        width: 100%;
        height: 50vh;
    }

    #geodynamics .video-container video {
        width: 100%;
        height: 50vh;
    }

    #rupture .research-section {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    #rupture .section-image {
        width: 100%;
        height: 80vh;
        gap: 1rem;
        min-height: 600px;
    }

    #rupture .section-image img {
        height: 60%;
        padding: 0.5rem;
        min-height: 300px;
    }

    .sketchfab-embed-wrapper {
        height: 40%;
        padding: 0.5rem;
        min-height: 200px;
    }

    #rupture .research-description {
        width: 100%;
        max-width: 1200px;
        margin-top: 1rem;
    }
}

.publication-actions {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    margin-top: 0.5rem;
}

.copy-bibtex, .doi-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.copy-bibtex:hover, .doi-link:hover {
    color: #004499;
    text-decoration: underline;
}

.copy-bibtex:active {
    color: #003366;
}

.copy-bibtex.copied {
    color: #4CAF50;
    font-weight: bold;
}

.bibtex-content {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.bibtex-content pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.bibtex-content code {
    display: block;
    padding: 0.5rem;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

.show-bibtex {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-bibtex:hover {
    color: #004499;
    text-decoration: underline;
}

.show-bibtex:active {
    color: #003366;
}

#geodynamics .research-description {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

#geodynamics .research-description h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

#geodynamics .research-description p {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #333;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(128, 128, 128, 0.3);
    border-radius: 50%;
    border-top-color: #808080;
    animation: spin 1s ease-in-out infinite;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Hide spinner when video is loaded */
.video-container video.loaded ~ .loading-spinner {
    opacity: 0;
    pointer-events: none;
}

.research-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background-color: #2c3e50;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.research-link:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    text-decoration: none;
}

.research-link i {
    margin-right: 0.5rem;
}


/* Carousel Styles */
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: 100%;
    align-items: center;
}

.carousel-images img {
    width: auto;
    height: 80%; /* Adjust the height as needed */
    flex-shrink: 0;
    object-fit: contain; /* Ensure the images maintain their aspect ratio */
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    border-radius: 50%;
}

.carousel-btn.prev-btn {
    left: 10px;
}

.carousel-btn.next-btn {
    right: 10px;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(50, 50, 50, 0.5);
    border-radius: 50%;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.carousel-indicators .indicator.active {
    background-color: rgba(50, 50, 50, 1);
}

/* Progress Bar */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(50, 50, 50, 0.3);
    overflow: hidden;
}

.progress-bar .progress {
    width: 0;
    height: 100%;
    background-color: rgba(50, 50, 50, 0.8);
    transition: width 0.3s linear;
}