:root {
    --primary-accent: #3081f7;
    --secondary-accent: #29c5f6;
    --accent-gradient-dark: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    --accent-gradient-light: linear-gradient(90deg, #005ae0, #0095b9);
    --text-muted-color: #8b949e;
    --border-color-dark: rgba(255, 255, 255, 0.1);
    --border-color-light: rgba(0, 0, 0, 0.1);
    --highlight-bg-dark: rgba(255, 218, 97, 0.8);
    --highlight-text-dark: #0d1117;
    --highlight-bg-light: #fde484;
    --highlight-text-light: #1c1c1c;
}
[data-theme="dark"] {
    --bg-color: #0d1117;
    --surface-color: #161b22;
    --text-color: #e6edf3;
    --border-color: var(--border-color-dark);
    --accent-gradient: var(--accent-gradient-dark);
    --highlight-bg: var(--highlight-bg-dark);
    --highlight-text: var(--highlight-text-dark);
}
[data-theme="light"] {
    --bg-color: #f4f7f6;
    --surface-color: #ffffff;
    --text-color: #1c1c1c;
    --border-color: var(--border-color-light);
    --accent-gradient: var(--accent-gradient-light);
    --highlight-bg: var(--highlight-bg-light);
    --highlight-text: var(--highlight-text-light);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; scroll-behavior: smooth; } 
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color); color: var(--text-color);
    line-height: 1.6; position: relative;
    transition: background-color 0.3s, color 0.3s; padding-bottom: 60px;
}

body::before, body::after { content: ''; position: absolute; z-index: -1; filter: blur(100px); border-radius: 50%; }
body::before { width: 400px; height: 400px; background: var(--primary-accent); top: -100px; left: -150px; animation: moveBlob1 15s infinite alternate; }
body::after { width: 500px; height: 500px; background: var(--secondary-accent); bottom: -150px; right: -200px; animation: moveBlob2 20s infinite alternate; }
@keyframes moveBlob1 { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(200px, 100px) rotate(180deg); } }
@keyframes moveBlob2 { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-150px, -100px) rotate(360deg); } }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; position: relative; z-index: 1; min-height: 100%; }

#sidebar {
    position: fixed; top: 0; left: 0;
    width: 280px; height: 100%;
    background-color: var(--surface-color); border-right: 1px solid var(--border-color);
    transform: translateX(-100%); transition: transform 0.3s ease-in-out;
    z-index: 4000; display: flex; flex-direction: column;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border-color); }
.sidebar-header h3 { font-size: 1.4rem; text-align: center; }
.sidebar-links { list-style: none; padding: 15px 0; flex-grow: 1; }
.sidebar-links li a {
    display: flex; align-items: center; gap: 15px;
    padding: 12px 20px; text-decoration: none; color: var(--text-color);
    font-weight: 500; border-left: 4px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}
.sidebar-links li a:hover { background-color: var(--bg-color); }
.sidebar-links li.active-link a {
    color: var(--primary-accent);
    font-weight: 600;
    border-left-color: var(--primary-accent);
}
.sidebar-links hr { border: none; border-top: 1px solid var(--border-color); margin: 15px 20px; }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border-color); }
.sidebar-footer #themeToggleBtn {
    background: var(--bg-color); width: 100%;
    font-size: 1.2rem; height: 40px; border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-color); cursor: pointer;
}
#overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: 3999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
body.sidebar-open #sidebar { transform: translateX(0); }
body.sidebar-open #overlay { opacity: 1; pointer-events: auto; }


header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 15px; margin-bottom: 40px;
}
#sidebar-toggle {
    background: none; border: none; color: var(--text-color);
    cursor: pointer; padding: 5px;
}
#sidebar-toggle svg { width: 30px; height: 30px; }
.header-title-wrapper { text-align: center; flex-grow: 1; }

header p { display: none; } 
.header-toggles { display: flex; gap: 10px; min-width: 40px; }

.sidebar-footer hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.sidebar-dev-info {
    text-align: center;
    padding: 0 15px;
    margin-bottom: 20px;
}

.sidebar-dev-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.sidebar-dev-info p {
    font-size: 0.8rem;
    color: var(--text-muted-color);
    margin-bottom: 15px;
}


.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: var(--text-muted-color);
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--primary-accent);
    transform: translateY(-2px);
}

.social-links svg {
    width: 22px;
    height: 22px;
}
.header-title-wrapper { text-align: center; flex-grow: 1; }
header h1 { font-weight: 600; font-size: 1.8rem; letter-spacing: 1px; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0; }
header p { display: none; }
.header-toggles { min-width: 40px; }
.controls { display: flex; flex-direction: column; gap: 20px; }
.search-container input { width: 100%; background-color: var(--surface-color); border: 1px solid var(--border-color); color: var(--text-color); border-radius: 8px; padding: 12px 15px; font-size: 1rem; transition: all 0.3s ease; backdrop-filter: blur(10px); }
.search-container input:focus { outline: none; border-color: var(--primary-accent); box-shadow: 0 0 15px rgba(48, 129, 247, 0.4); }
.filter-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 30px; }
.filter-select, .filter-button { background-color: var(--surface-color); border: 1px solid var(--border-color); color: var(--text-color); border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; font-family: 'Poppins', sans-serif; flex-grow: 1; }
.filter-select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b949e'%3E%3Cpath fill-rule='evenodd' d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 30px; }
.filter-button { cursor: pointer; transition: background-color 0.2s, border-color 0.2s; text-align: center;}
.filter-button.active { border-color: var(--secondary-accent); background: var(--accent-gradient); color: #fff; box-shadow: 0 0 10px rgba(41, 197, 246, 0.5); }
#results-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }


.faculty-card {
    border-radius: 12px;
    padding: 2px;
    background: var(--accent-gradient);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
}


.faculty-card.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}


.faculty-card.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.faculty-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }

.faculty-card-inner {
    background-color: var(--surface-color); padding: 20px; border-radius: 11px;
    width: 100%; display: flex; flex-direction: column;
    justify-content: space-between; position: relative;
}

.card-top {
    display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px;
    position: relative;
}


.card-actions-top {
    position: absolute;
    top: -8px; 
    right: -8px; 
    display: flex;
    flex-direction: column; 
    gap: 0;
}
.faculty-info {
    display: flex; flex-direction: column; min-width: 0;
    padding-right: 40px; 
}



.favorite-btn, .share-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted-color); padding: 5px;
    transition: color 0.2s ease, transform 0.2s ease;
}
.favorite-btn svg, .share-btn svg { width: 20px; height: 20px; }
.favorite-btn:hover, .share-btn:hover { transform: scale(1.15); color: var(--text-color); }
.favorite-btn.favorited { color: #FFC700; }


.faculty-card.highlight {
    transition: box-shadow 0.5s ease-in-out;
    box-shadow: 0 0 25px 5px var(--primary-accent);
}


.faculty-image {
    width: 65px; height: 65px; border-radius: 50%; flex-shrink: 0;
    overflow: hidden; border: 2px solid var(--border-color); margin-top: 5px;
}
.faculty-image img { width: 100%; height: 100%; object-fit: cover; }
.faculty-info .name {
    font-size: 1.25rem; font-weight: 600; line-height: 1.4;
    white-space: normal; word-break: break-word; 
}
.faculty-info .designation { font-size: 0.8rem; font-weight: 500; color: var(--primary-accent); }
.card-bottom { display: flex; flex-direction: column; gap: 10px; padding-top: 15px; border-top: 1px solid var(--border-color); }
.card-actions { display: flex; justify-content: space-between; align-items: center; }
.detail-item { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-muted-color); min-width: 0; }
.detail-item svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.detail-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-copy { cursor: pointer; transition: color 0.2s ease; }
.email-copy:hover span { color: var(--secondary-accent); }
.office-location.expandable { cursor: pointer; }
.office-location.expandable:hover span { color: var(--secondary-accent); }
.office-location.expanded span { white-space: normal; word-break: break-word; }
.profile-link a { display: inline-block; padding: 4px 14px; border-radius: 20px; background: var(--accent-gradient); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.8rem; transition: transform 0.2s ease; }
.profile-link a:hover { transform: scale(1.05); }
mark { background-color: var(--highlight-bg); color: var(--highlight-text); padding: 0 2px; border-radius: 3px; }
.loader { display: none; width: 50px; height: 50px; border: 5px solid var(--surface-color); border-top: 5px solid var(--primary-accent); border-radius: 50%; margin: 40px auto; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.no-results, .error-message { text-align: center; padding: 40px; color: var(--text-muted-color); grid-column: 1 / -1; }
.footer { position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); width: auto; padding: 0 20px; height: 45px; border-radius: 999px; background: rgba(22, 27, 34, 0.7); backdrop-filter: blur(10px); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-muted-color); font-size: 0.9rem; z-index: 999; animation: bounce 2.5s infinite ease-in-out; animation-delay: 3s; }
.footer p { white-space: nowrap; }
.footer a { color: var(--secondary-accent); text-decoration: none; font-weight: 600; transition: color 0.3s ease; }
.footer a:hover { color: var(--primary-accent); text-decoration: underline; }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.announcement-bar { position: fixed; top: 0; left: 0; width: 100%; z-index: 2000; background: rgba(41, 197, 246, 0.15); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); color: var(--text-color); display: flex; align-items: center; justify-content: center; padding: 12px 50px; overflow: hidden; transform: translateY(-100%); transition: transform 0.5s ease-in-out; }
.announcement-bar.visible { transform: translateY(0); }
.announcement-bar p { margin: 0; font-weight: 500; text-align: center; z-index: 3000; }
.announcement-bar a { color: var(--secondary-accent); font-weight: 700; text-decoration: underline; }
.announcement-close { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); background: none; border: none; color: var(--text-color); font-size: 2rem; line-height: 1; cursor: pointer; opacity: 0.7; transition: opacity 0.2s ease; }
.announcement-close:hover { opacity: 1; }
.copy-tooltip { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--surface-color); color: var(--text-color); padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-color); font-size: 0.9rem; font-weight: 600; z-index: 2000; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, bottom 0.3s ease; }
.copy-tooltip.visible { opacity: 1; visibility: visible; bottom: 90px; }

@media (max-width: 768px) {
    .filter-controls { flex-direction: column; }
    header h1 { font-size: 1.5rem; }
}

@media (min-width: 768px) {
    header { justify-content: flex-start; }
    .header-title-wrapper { text-align: left; margin: 0 auto 0 0; }
    header h1 { font-size: 3.5rem; }
    header p { display: block; }
    #sidebar-toggle { z-index: 5000; }
}