@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap'); 

/* -------------------- Theme -------------------- */
:root {
    --ubc-blue: #002145;
    --accent-color: #7ba3cc;   /* soft blue accent, no yellow */
    --bg-light: #fefefe;       /* cream/white background */
    --text-color: #002145;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* -------------------- Theme -------------------- */
:root {
    --ubc-blue: #002145;
    --accent-color: #7ba3cc;   /* soft blue accent, no yellow */
    --bg-light: #fefefe;       /* cream/white background */
    --text-color: #002145;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* -------------------- Profile Container -------------------- */
.profile-container {
    display: flex;                /* Use flexbox to position items horizontally */
    align-items: flex-start;      /* Vertically align content to the top */
    gap: 5px;                    /* Reduced gap between profile picture and description */
    padding: 25px;
    margin: 20px auto;            /* Center content and add margin */
    max-width: 1200px;            /* Set a maximum width for the entire content */
    width: 90%;                   /* Set a width of 90% to avoid taking up the entire screen */
}

/* Left part of profile (name, university, contact) */
.profile-left {
    flex: 1;                       /* Left section takes available space */
}

.profile-left h1 {
    font-size: 1.6em;
    margin-bottom: 8px;
    text-align: left;
}

.profile-left p {
    margin: 4px 0;
    font-size: 0.95em;
}

/* Profile Picture Settings */
.profile-left img {
    width: 220px;  /* Profile picture size */
    height: 220px;
    object-fit: cover;
    border-radius: 50%;  /* Circular image */
    display: block;
    margin: 20px 0;
}

/* Right part of profile (description) */
.profile-right {
    flex: 2;                       /* Right section takes more space */
    max-width: 600px;               /* Limit the width of the description */
}

/* Profile Description (Right side) */
.profile-right .description p {
    font-size: 0.95em;
    line-height: 1.6em;
    color: var(--text-color);  /* Ensure the text color is consistent */
}



.contact-info {
    margin-top: 15px; /* space above contact info */
}

.contact-info p {
    margin: 6px 0;
}

.contact-info a {
    text-decoration: none;
    color: var(--ubc-blue);
}

.contact-info a:hover {
    color: var(--accent-color);
}

/* -------------------- Header (legacy block, still supported) -------------------- */
.header-container {
    display: flex;
    align-items: center;
    justify-content: left;
    margin: 50px auto 0 auto;
    width: 80%;
    max-width: 1200px;
    flex-wrap: wrap;
}

/* Description block */
.description {
    max-width: 600px;
    flex-grow: 1;
}

.description p {
    font-size: 1.2em;
    line-height: 1.6em;
}

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

.description a:hover {
    text-decoration: underline;
}

/* -------------------- Navigation -------------------- */
nav ul {
    list-style-type: none;
    padding: 0;
    text-align: center;
    background-color: var(--ubc-blue);
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 1em;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* -------------------- Research / Papers -------------------- */
.paper details { 
    padding: 0; /* no inner box padding */
}

.paper summary { 
    cursor: pointer; 
    display: flex; 
    flex-wrap: wrap; 
    gap: .5rem; 
    align-items: baseline; 
    padding: 4px 0; /* light breathing space */
    margin-bottom: 20px;
    border-bottom: none; /* subtle separator instead of box */
}

.paper summary::-webkit-details-marker { 
    display: none; 
}

.paper .title { 
    font-weight: 600; 
    flex-basis: 100%; /* each one spans the whole row */
    display: block; /* forces it onto its own line */
}

.paper .meta { 
    color: #555; 
    flex-basis: 100%;
    display: block; /* forces it onto its own line */
}

.paper .right { 
    margin-left: auto; 
    display: inline-flex; 
    gap: .35rem; 
    align-items: center; 
}

.badge { 
    font-size: .85rem; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    padding: 0 .4rem; 
    text-decoration: none; 
    color: inherit; 
}

.toggle .hide { 
    display: none; 
}

details[open] .toggle .show { 
    display: none; 
}

details[open] .toggle .hide { 
    display: inline; 
}

.abstract { 
    margin-top: .6rem; 
    color: #333; 
}

/* -------------------- Sections -------------------- */
section {
    margin: 50px 20px;
}

section h2 {
    font-size: 1.5em;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--text-color);
}

#research h3 {
    margin-top: 40px;
}

/* Abstracts and details */
.paper-details {
    display: none;
    max-width: 800px;
    margin-left: 30px;
    text-align: justify;
}

/* Expandable sections */
h3.active,
h4.active,
.section-title:hover,
.subsection-title:hover {
    color: var(--accent-color);
}

.section-title,
.subsection-title {
    cursor: pointer;
    font-size: 1em;
    color: var(--text-color);
}

.section-details p {
    font-size: 1em;
}

/* -------------------- Footer -------------------- */
#contact {
    margin-bottom: 200px; /* breathing room above fixed footer */
}

footer {
    text-align: center;
    padding: 0.6em;                /* less tall */
    background-color: var(--ubc-blue);
    color: white;
    font-size: 0.8em;
    width: 100%;                   /* span entire page */
    margin-top: 40px;               /* space before footer */
    box-sizing: border-box;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
    .content {
        padding: 28px;
    }
}

@media (max-width: 768px) {
    /* Stack sidebar and content vertically on mobile */
    .main-container {
        display: block; /* Stack the columns vertically */
        padding: 20px;
    }

    

    /* Mobile Menu (Positioned at the Top-Right) */
    .mobile-menu {
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 1000;
    }

    .mobile-menu select {
        width: 150px;
        padding: 10px;
        font-size: 1em;
        background-color: var(--ubc-blue);
        color: white;
        border: none;
        border-radius: 5px;
    }

    /* Stack Profile Section (Name, Degree, Picture, Description) */
    .profile {
        padding: 20px;
        text-align: center;
    }

    .profile h1 {
        font-size: 1.6em;
        margin: 10px 0;
    }

    .profile p {
        font-size: 1.2em;
        color: var(--ubc-blue);
        margin: 10px 0;
    }

    @media (max-width: 768px) {
    .profile-container {
        flex-direction: column;  /* Stack elements vertically */
        align-items: center;     /* Center-align the elements */
        gap: 0;                  /* Remove the gap between image and description */
    }

    .profile-left img {
        margin: 0 0 20px 0;  /* Removed margin-right and added margin-bottom for spacing */
        width: 150px;         /* Smaller image size for mobile */
        height: 150px;        /* Maintain aspect ratio */
    }

    .profile-left h1 {
        font-size: 1.6em;
        margin-top: 10px;  /* Ensure spacing above the name */
    }

    .profile-left p {
        font-size: 1.2em;
        color: var(--ubc-blue);
        margin: 10px 0;
    }

    .profile-right .description p {
        font-size: 1.1em; /* Adjust font size for readability on mobile */
        text-align: left; /* Left-justify the text */
        text-align: center; /* Center text on mobile */
    }
}

    /* Profile Picture (Mobile) */
    .profile-picture img {
        width: 150px;  /* Make sure the image is visible on mobile */
        height: 150px; /* Maintain aspect ratio */
        border-radius: 50%;
        object-fit: cover; /* Ensures image covers the area */
        margin: 20px 0; /* Add spacing around the image */
        display: block;  /* Ensure the image is displayed as a block element */
        margin-left: auto;
        margin-right: auto;  /* Center the image horizontally */
    }

    .description p {
        font-size: 1em;
        line-height: 1.6em;
    }

   /* Display only icons */
    .contact-info a {
        text-decoration: none;
        font-size: 0em;  /* Larger icons */
        color: var(--ubc-blue);
    }

    /* Ensure icons are displayed in a row */
    .contact-info {
        display: flex;
        justify-content: center; /* Center-align the icons horizontally */
        margin-top: 15px;
    }

    /* Footer Social Links */
    .footer-icons {
        display: flex;
        justify-content: space-evenly;
        margin-top: 20px;
    }

    .footer-icons a {
        font-size: 1.5em;  /* Larger icons */
        color: var(--ubc-blue);
        text-decoration: none;
    }

    .footer-icons a:hover {
        color: var(--accent-color);
    }

    /* Hide Sections on Mobile (But Keep Visible on Desktop) */
    #research, #teaching, #contact {
        display: none; /* Hide by default on mobile */
    }

}
