/* --- TEMPLATE CONFIGURATION: BRAND COLORS --- */
/* Adjust these variables to customize the light and dark themes for your site. */
:root {
    --bg-primary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --sidebar-bg: #f8f9fa;
    --sidebar-border: #e9ecef;
    --hover-bg: #e2e6ea;
    --accent-color: #0e57df;
    --accent-hover: #032b80;
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --sidebar-bg: #1e1e1e;
    --sidebar-border: #333333;
    --hover-bg: #2d2d2d;
    --accent-color: #789cdf;
    --accent-hover: #dbe7ff;
}

/* --- TEMPLATE CONFIGURATION: BASE LAYOUT & TYPOGRAPHY --- */
/* Replace "Comic Relief" with your preferred font stack (e.g., Inter, Roboto, sans-serif). */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Comic Relief", system-ui;
    font-style: normal;
    font-weight: 400;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    transition: background-color 0.3s, color 0.3s;
}

::selection {
    background-color: var(--accent-color);
    color: var(--bg-primary);
}

::-moz-selection {
    background-color: var(--accent-color);
    color: var(--bg-primary);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-border) var(--bg-primary);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--sidebar-border);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* --- TEMPLATE CONFIGURATION: SIDEBAR NAVIGATION --- */
/* Defines the static left panel. Adjust width or padding if adding more navigation items. */
.sidebar {
    width: 280px;
    min-width: 280px;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background-color: var(--sidebar-bg);
    border-right: 2px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    transition: background-color 0.3s, border-color 0.3s;
}

.profile-section {
    text-align: center;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 0;
}

.profile-name {
    font-family: "Comic Relief", system-ui;
    font-style: normal;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-title {
    font-family: "Comic Relief", system-ui;
    font-style: normal;
    font-size: 1.0rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    width: 100%;
}

.nav-button {
    font-family: "Comic Relief", system-ui;
    font-style: normal;
    font-size: 1rem;
    font-weight: 400;
    width: 100%;
    text-align: left;
    padding: 0.8rem 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.nav-button:hover {
    background-color: var(--hover-bg);
}

.nav-button.active {
    font-family: "Comic Relief", system-ui;
    font-style: normal;
    font-weight: 600;
    color: var(--accent-color);
    border-right: 4px solid var(--accent-color);
    background-color: var(--hover-bg);
}

.theme-toggle-container {
    padding: 1rem 2rem;
    margin-top: auto;
}

.theme-toggle-btn {
    font-family: "Comic Relief", system-ui;
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 600;
    width: 100%;
    padding: 0.75rem;
    background-color: transparent;
    border: 1px solid var(--sidebar-border);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background-color: var(--hover-bg);
}

/* --- TEMPLATE CONFIGURATION: MAIN CONTENT --- */
/* Controls the display of your primary content areas, like your bio or CV. */
.main-content {
    flex-grow: 1;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: 4rem 10%;
}

.tab-content {
    display: none;
    max-width: 870px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

ul.custom-list {
    padding-left: 25px;
    margin-bottom: 20px;
}

ul.custom-list li {
    padding-left: 5px;
    margin-bottom: 8px;
}

/* Update dimensions here if your headshot requires different proportions. */
.profile-photo {
    width: 200px;
    max-width: 100%;
    display: block;
    margin: 0 auto 20px;
    border-radius: 55px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* --- TEMPLATE CONFIGURATION: RESEARCH & PUBLICATION CARDS --- */
/* Styling for your publication list and associated award badges. */
.paper-list {
    list-style-type: none;
}

.paper-list li {
    position: relative;
    cursor: pointer;
    margin-bottom: 1rem;
    line-height: 1.5;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.paper-list li:hover {
    background-color: var(--hover-bg);
    border-left: 3px solid var(--accent-color);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.paper-list li:hover a {
    color: var(--accent-hover);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}

.award-badge {
    background-color: rgba(212, 175, 55, 0.15);
    color: #8b6d19;
    border: 1px solid rgba(212, 175, 55, 0.4);
    font-weight: 700;
}

[data-theme="dark"] .award-badge {
    color: #fce181;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* --- TEMPLATE CONFIGURATION: UI COMPONENTS --- */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    width: 48px;
    height: 48px;
    padding: 0;
    background-color: color-mix(in srgb, var(--bg-primary) 80%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--sidebar-border);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#backToTop .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#backToTop svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

#backToTop:hover {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(14, 87, 223, 0.25);
    transform: translateY(-6px) scale(1.05);
}

#backToTop:hover svg {
    transform: translateY(-2px);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 45px;
}

.segmented-control {
    display: inline-flex;
    background-color: var(--sidebar-bg);
    border: 1px solid var(--sidebar-border);
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.segment-btn {
    font-family: inherit;
    background: transparent;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.segment-btn:hover {
    color: var(--accent-color);
}

.segment-btn.active {
    background-color: var(--bg-primary);
    color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .segment-btn.active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.template-credit {
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.template-credit:hover {
    opacity: 1;
}

/* --- TEMPLATE CONFIGURATION: RESPONSIVE DESIGN --- */
/* Adjust breakpoints here if you need different mobile/tablet behaviors. */
@media screen and (max-width: 768px) {
    body {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid var(--sidebar-border);
        padding: 1.5rem 1rem;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .nav-item {
        width: auto;
    }

    .nav-button {
        padding: 0.5rem 1rem;
        text-align: center;
        border-right: none;
        border-bottom: 3px solid transparent;
        border-radius: 6px;
    }

    .nav-button.active {
        border-right: none;
        border-bottom: 3px solid var(--accent-color);
        background-color: var(--hover-bg);
    }

    .theme-toggle-container {
        padding: 1rem 0 0 0;
        display: flex;
        justify-content: center;
    }

    .theme-toggle-btn {
        width: auto;
        padding: 0.5rem 1.5rem;
    }

    .main-content {
        height: auto;
        overflow-y: visible;
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }
}