/* General Body Styling */
:root {
    --bg-color: #121212;
    --primary-color: #1a1a1a;
    --secondary-color: #2a2a2a;
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --accent-hover: #a062f8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'jura', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

#about, #skills, #research, #publications, #projects, #certifications, #scholarships {
    scroll-margin-top: 80px; /* Adjust this value if your header height changes */
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Layout for the Info Cards (Education & Interests) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    /* This ensures cards in the same row are equal height */
}

.info-card {
    background: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.info-card-content {
    padding: 1.5rem;
    /* By not adding flex properties here, the content stays at its natural height at the top */
}

/* --- Tooltip ---*/
.tooltip-host {
    position: relative; /* This is required for the tooltip positioning */
  }
  
  .tooltip-host::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s ease, visibility 0s ease; /* Delay is now set to 0 */
  }
  
  /* Show the tooltip on hover */
  .tooltip-host:hover::after {
    opacity: 1;
    visibility: visible;
  }

/* --- Header & Navigation --- */
#header {
    background-color: #696969;
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

#header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

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

.logo {
    font-size: 1.2rem;
    font-weight: 700;
}

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.home-link {
    color: #FFC72C !important;
    font-weight: bold;
}

/* Hamburger Menu Icon */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-color);
}


/* --- Buttons --- */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #121212;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

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

.btn-secondary {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #3a3a3a;
}

.btn-outline {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    color: var(--accent-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: #121212;
}


/* --- About Section --- */
#about {
    background-color: var(--primary-color);
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.about-me {
    display: inline;
    font-family: 'jura', sans-serif;
    font-weight: 300;
    color: #eaf38b;
}

.about-text {
    flex: 2;
}

.about-image-container {
    flex: 1;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 30px;
    border: 3px solid #555;
}

.image-caption {
    text-align: center;
    margin-top: 1rem;
}

.image-caption h3 {
    margin-bottom: 0.25rem;
    font-size: 1.3rem;
    color: var(--text-color);
}

.image-caption p {
    font-size: 1rem;
    color: #a0a0a0;
    margin: 0;
}

.download-link1 {
    margin-bottom: 3rem;
}

.education-list {
    list-style-type: none;
    padding-left: 0;
}

.education-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    color: #f0f0f0;
}

.education-list li:last-child {
    margin-bottom: 0;
}

.education-list .fa-graduation-cap {
    color: floralwhite;
    font-size: 1.2em;
    margin-right: 15px;
    margin-top: 5px;
}

.degree, .dates {
    font-weight: bold;
}

.university {
    font-weight: normal;
    color: #a0a0a0;
}


/* --- Skills Section --- */
.my-skills {
    font-family: 'jura', sans-serif;
    font-weight: 300;
    color: #e8e68f;
    text-align: center;
}

.category-heading {
    font-size: 1.5em;
    font-weight: bold;
    color: #d8b0b0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.skill-list {
    list-style-type: disc; /* This brings back the bullets */
    padding-left: 20px;  /* This adds the proper indentation */
    margin: 0;
}

.skill-list li {
    margin-bottom: 0.5rem;
    color: #a0a0a0;
}

.skill-name {
    font-weight: bold;
    color: #f0f0f0;
}


/* --- Research Experience Section --- */
#research {
    padding: 2rem;
}

.research-exp {
    color: #e8e68f;
    font-family: 'jura', sans-serif;
    font-weight: 300;
    font-size: 2.5em;
    text-align: center;
}

.subtitle {
    margin-bottom: 3rem;
    color: #a0a0a0;
    text-align: center;
}

#research .project-info .title {
    font-size: 1.2em;
    font-weight: bold;
    color: #f0f0f0;
}

#research .project-info .institution,
#research .project-info .duration,
#research .project-info .location {
    color: #a0a0a0;
    font-size: 0.9em;
    margin-top: 5px;
}

#research .project-info ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 15px;
    color: #ccc;
}

#research .project-info .bold {
    font-weight: bold;
    color: #f0f0f0;
}

.thesis-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}


/* --- Publications Section --- */
#publications {
    padding: 3rem;
    color: #f0f0f0;
}

.my-publication {
    color: #e8e68f;
    font-family: 'jura', sans-serif;
    font-weight: 300;
    font-size: 2.5em;
    text-align: center;
}

#publications .project-grid {
    grid-template-columns: 1fr;
}

.publication-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.publication-text {
    flex: 1;
}

.card-icon {
    font-size: 1.5rem;
    margin-top: 2px;
    color: var(--accent-color);
}

#publications .project-info .title {
    font-weight: bold;
    font-size: 1.1em;
    margin: 0;
}

#publications .project-info .authors {
    color: #a0a0a0;
    font-size: 0.9em;
    margin-top: 5px;
}

#publications .project-links {
    justify-content: center;
}

.pub-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    font-size: 0.8em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pub-link:hover {
    background-color: var(--accent-color);
    color: #121212;
}


/* --- Projects, Certifications, and Generic Card Layouts --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

#projects .project-info h3 {
    color: #d8b0b0;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

#certifications .project-info h3 {
    color: #d8b0b0;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.tasks, .course {
    color: #e8e68f;
    font-family: 'jura', sans-serif;
    font-weight: 300;
    font-size: 2.5em;
    text-align: center;
}

.project-card {
    background: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.project-card > img {
    width: 100%;
    height: 200px; /* Sets a fixed height for all project images */
    object-fit: cover; /* Ensures the image covers the area without stretching */
    display: block;
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-links {
    margin-top: auto;
    justify-content: center;
    padding-top: 1.5rem;
    display: flex;
    gap: 1rem;
}


/* --- Scholarships Section --- */
#scholarships {
    padding: 3rem 2rem;
    color: #f0f0f0;
}

#scholarships .project-grid {
    grid-template-columns: 1fr;
}

#scholarships .project-info h3 {
    color: #d8b0b0;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

#scholarships .project-info .course-info {
    font-size: 0.9em;
    color: #a0a0a0;
    margin-bottom: 1rem;
}

#scholarships .project-info .course-description {
    font-size: 1em;
    color: #ccc;
    line-height: 1.4;
}

#scholarships .project-info .bold {
    font-weight: bold;
    color: #f0f0f0;
}


/* --- Social Links & Footer --- */
.social-links {
    margin-top: 1.5rem;
}

#contact .social-links {
    margin-top: 3rem;
}

.social-links a {
    font-size: 1.8rem;
    margin: 0 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

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

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #888;
}


/* --- Animations & Modals --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.modal.modal-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--primary-color);
    margin: 5% auto;
    padding: 20px;
    padding-top: 70px;
    width: 90%;
    max-width: 900px;
    height: 85%;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.modal-active .modal-content {
    transform: scale(1);
}

.modal-content embed {
    border-radius: 5px;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

.download-btn {
    position: absolute;
    top: 20px;
    right: 75px;
    padding: 0.5rem 1.5rem;
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem; /* Reduces side padding on mobile */
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
        align-items: center; /* Centers items in column view */
    }

    nav {
        justify-content: center; /* Center the logo */
        position: relative; /* Create a positioning context for hamburger */
    }

    .hamburger {
        display: block; /* Show the hamburger icon */
        position: absolute;
        right: 2rem; /* Align with nav padding */
        top: 50%;
        transform: translateY(-50%);
    }

    /* Animate hamburger to an 'X' when active */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Style the navigation menu for mobile overlay */
    .nav-links {
        position: fixed;
        left: -100%; /* Start off-screen */
        top: 65px; /* Position below the header */
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

    .nav-links li {
        margin: 1rem 0;
        padding: 0.5rem 0;
    }

    /* Class toggled by JavaScript to show the mobile menu */
    .nav-links.active {
        left: 0;
    } 

    #research,
    #scholarships,
    #publications {
        padding-left: 0.2rem;
        padding-right: 0.2rem;
    }

    #research .project-grid {
        justify-content: center;
    }
}
