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

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    color: #ccd6f6;
    background-color: #0a192f; 
}

/* Sidebar */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    padding: 4vh 2vw;
    width: 25%; /* Sidebar takes 25% of the viewport width */
    background-color: #0a192f;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 15%;
    height: 20%; 
    transition: all 0.3s ease;
}

.profile img {
    width: 60%; 
    max-width: 30vw; /* Prevent image from getting too large */  
    aspect-ratio: 1 / 1;  
    border-radius: 50%; /* Circular image */
    object-fit: cover;
    margin-top: 3vh; 
    margin-bottom: 2vh;
    transition: opacity 0.3s ease;
}

.profile h1 {
    font-size: 1.7vw; 
    line-height: 2vw; 
    color: #ccd6f6;
    margin-bottom: 0.5vw;
    transform: scale(1);
    transform-origin: top center;
    transition: transform 0.3s ease, line-height 0.3s ease; 
}

.profile h2 {
    font-size: 0.9vw;
    color: #8892b0;
    transition: transform 0.3s ease, font-size 0.3s ease;
}

/* Scrolled State */
#sidebar.scrolled .profile img {
    opacity: 0; /* Hide headshot */
    pointer-events: none; 
}

#sidebar.scrolled .profile h1 {
    font-size: 3vw; /* Increase name size */
    line-height: 3vw;
    transform: translateY(-25vh); /* Smooth relative upward movement */
    margin-bottom: 1vw;
}

#sidebar.scrolled .profile h2 { 
    transform: translateY(-25vh); /* Aligns with h1 */
    font-size: 1vw; 
    line-height: 1vw;
}

/* Navigation Links */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 10vh 2vw 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-nav a {
    color: #ccd6f6;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    transition: background 0.3s ease, color 0.3s ease;
}

.sidebar-nav a:hover {
    background-color: #233554; 
    color: #64ffda;
}

/* Social Icons */
.social-icons {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 2vw; 
    align-items: center;
    margin: 0 2vw 2vw;
}

.social-icons a {
    display: inline-flex; 
    justify-content: center; 
    align-items: center;
    width: 3vw; 
    height: 3vw; 
    color: #8892b0; /* Default icon color */
    font-size: 2vw; 
    text-decoration: none;
    border-radius: 50%; 
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: #64ffda; 
    transform: scale(1.2); 
}

.social-icons img, 
.social-icons svg { /* If icons are images or SVGs */
    width: 100%; /* Make them fill their container */
    height: 100%; 
    object-fit: contain;
}

/* Main Content */
main {
    flex: 1;
    margin-left: 20%; /* Matches the sidebar width */
    padding: 4vh 2vw; 
    background-color: #0a192f;
    color: #ccd6f6;
}

section {
    padding: 4vh 0; 
    max-width: 80%; 
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    color: #ccd6f6;
    margin-bottom: 2vh; 
    display: inline-block;
}

p {
    font-size: 1rem;
    color: #8892b0;
    margin-bottom: 1rem;
}

a {
    color: #64ffda; 
    text-decoration: none; 
}

a:hover {
    color: #ff6f61; /* Change color when hovered */
    text-decoration: underline; /* Add underline on hover */
}

/* Section Title */
h2 {
    font-size: 2rem;
    color: #ccd6f6;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Containers for Research and Projects */
.research-container,
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem; 
    padding: 2rem;
}

/* Card Style */
.research-card,
.project-card {
    background-color: #112240; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-card:hover,
.project-card:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

/* Image in Card */
.research-card img,
.project-card img {
    width: 100%; 
    height: 12rem; 
    object-fit: cover; 
    border-bottom: 2px solid #233554; /* Separation line */
}

/* Card Content */
.research-card h3,
.project-card h3 {
    font-size: 1.2rem;
    color: #64ffda;
    margin: 1rem;
}

.research-card p,
.project-card p {
    font-size: 1rem;
    color: #8892b0;
    margin: 0 1rem 1rem;
}

.research-card a,
.project-card a {
    display: inline-block;
    margin: 0rem 1rem 1rem;
    color: #64ffda;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.research-card a:hover,
.project-card a:hover {
    color: #7bf3e1; 
}

.research-card img,
.project-card img {
    width: 100%; 
    aspect-ratio: 16 / 9; 
    object-fit: contain; 
    border-bottom: 2px solid #233554;
}

/* Tags Container */
.tags {
    margin: 1rem 1rem 1rem;
    display: flex; /* Align tags in a row */
    flex-wrap: wrap; /* Allow wrapping if there are too many tags */
    gap: 0.5rem; /* Space between tags */
}

/* Individual Tag Style */
.tag {
    display: inline-block;
    background-color: #64ffda;
    color: #0a192f; 
    font-size: 0.75rem; 
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 15px; /* Rounded corners */
    text-transform: uppercase; /* Capitalize the text */
    white-space: nowrap; /* Prevent text from wrapping */
}

/* Hover Effect for Tags */
.tag:hover {
    background-color: #7bf3e1; /* Slightly lighter background on hover */
    color: #112240; /* Slightly darker text on hover */
}

/* Responsive Padding for Sections */
section {
    scroll-margin-top: 2rem;
    padding: 2rem 0;
}

/* Footer */
#footer {
    width: calc(100% - 25%); /* Align with the sidebar */
    margin-left: 25%; 
    text-align: center;
    padding: 2vh; 
    background-color: #0a192f; 
    color: #8892b0;
    border-top: 0.2vh solid #233554; 
}


/*----------------------- For mobile -------------------------*/
/*
/*
/* For very small screens (like phones) */
@media (max-width: 620px) {
    /* Mobile Header */
    #mobile-header {
        display: none; /* Hidden by default, visible only on small screens */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: #0a192f;
        color: #ccd6f6;
        padding: 1rem;
        box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.2);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #mobile-header h1 {
        font-size: 1.2rem;
        margin: 0;
    }

    /* Hamburger Icon */
    .hamburger-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 20px;
        cursor: pointer;
    }

    .hamburger-icon span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #ccd6f6;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    #sidebar {
        left: 0;
        top: 0;
        padding: 4vh 2vw;
        width: 70%; /* Sidebar takes 70% of the viewport width */
        background-color: #0a192f;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: all 0.3s ease;
        transform: translateX(-100%); /* Off-screen */
        transition: transform 0.3s ease;
        z-index: 999; /* Above the overlay */
    }

    /* Overlay */
    #overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
        z-index: 998; /* Below the sidebar but above other elements */
        opacity: 0;
        visibility: hidden; /* Prevent interactions when hidden */
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    /* Show overlay when sidebar is open */
    #overlay.visible {
        opacity: 1;
        visibility: visible;
    }

    /* Profile Section */
    .profile img {
        width: 50%; 
        max-width: 30vw; /* Prevent image from getting too large */  
        aspect-ratio: 1 / 1;  
        border-radius: 50%; /* Circular image */
        object-fit: cover;
        margin-top: 3vh; 
        margin-bottom: 2vh;
        transition: opacity 0.3s ease;
    }

    .profile h1 {
        font-size: 5vw; 
        line-height: 5vw; 
        color: #ccd6f6;
        margin-bottom: 0.5vw;
        transform: scale(1);
        transform-origin: top center;
        transition: transform 0.3s ease, line-height 0.3s ease; 
    }

    .profile h2 {
        font-size: 2.5vw;
        color: #8892b0;
        transition: transform 0.3s ease, font-size 0.3s ease;
    }

    /* Navigation Links */
    .sidebar-nav ul {
        padding: 0;
        margin: 10vh 2vw 0;
        gap: 1rem;
    }

    .sidebar-nav a {
        color: #ccd6f6;
        text-decoration: none;
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
        border-radius: 12px;
        transition: background 0.3s ease, color 0.3s ease;
    }

    /* Social Icons */
    .social-icons {
        gap: 5vw; 
        margin: 6vw 6vw 6vw;
    }

    .social-icons a {
        width: 8vw; 
        height: 8vw; 
        font-size: 5vw; 
    }

    #sidebar.open {
        transform: translateX(0); /* Visible on-screen */
    }

    main {
        margin: 2rem 0; /* Remove left margin add top margin for full-width content */
        padding: 0vw 0vw; 
    }

    .research-container,
    .projects-container {
        padding: 0rem;
    }

    .project-card img {
        border-bottom: 0 solid #233554; /* Separation line */
    }

    #footer {
        width: 90%; 
        margin-left: 5%; 
    }    
}