:root {
    --primary-blue: #0D0B14;
    --primary-blue-dark: #0D0B14;
    --secondary-orange: #D946EF;
    --secondary-orange-hover: #EC008C;
    --bg-light: #f5f7fb;
    --text-dark: #1a1a2e;
    --primary-text: #F8FAFC;
    --secondary-text: #1a1a2e;
    --text-muted: #1a1a2e;
    --white: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.05);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    padding-top: 0;
    min-height: 100vh;
}

/* HEADER */
header {
    background: var(--primary-blue);
    color: var(--primary-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    background-color: rgba(11, 15, 23, 0.85); /* 85% opacity */
    backdrop-filter: blur(10px); /* Gives a premium frosted glass effect */
    
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-text);
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: #fff;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.brand-text {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

nav a {
    color: var(--primary-text);
    text-decoration: none;
    margin-left: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover {
    color: var(--secondary-orange);
}

@media (max-width: 1200px) {
    header {
        padding: 15px 30px;
    }
    nav a {
        margin-left: 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    /* Header stays horizontal – logo + hamburger only */
    header {
        padding: 14px 20px;
        position: fixed;
        flex-direction: row;
        gap: 0;
    }
    #main-nav {
        display: none;
    }
    .nav-hamburger {
        display: flex !important;
    }
    .hero, .lefthero {
        padding-top: 80px;
    }
}



/* HERO SECTION */
.hero, .lefthero {
    padding: 120px 20px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('image/Gemini_Generated_Image_3exhys3exhys3exh.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
}

.demo-page {
    background: #f5f7fb;
}

.demo-hero {
    position: relative;
    min-height: 420px;
    padding: 120px 70px 40px;
    background:
        linear-gradient(rgba(4, 10, 20, 0.52), rgba(4, 10, 20, 0.52)),
        url('image/Gemini_Generated_Image_3exhys3exhys3exh.png') center/cover no-repeat;
    overflow: hidden;
    text-align: left;
}

.demo-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0;
}

.demo-hero h1 {
    font-size: clamp(3rem, 6vw, 8rem);
    line-height: 0.95;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.06em;
    margin: 0;
    align-items: center;
}

@media (max-width: 900px) {
    .demo-hero {
        min-height: 320px;
        padding: 110px 28px 30px;
    }
}

@media (max-width: 640px) {
    .demo-hero {
        min-height: 280px;
        padding: 100px 20px 24px;
    }
}

.hero h1, .lefthero h1 {
    animation: slideDown 1s ease;
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    animation: fadeIn 2s ease;
    font-size: 20px;
    margin-bottom: 30px;
}

.hero button {
    animation: fadeUp 2.5s ease;
    transition: 0.3s;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
}

.hero button:hover {
    transform: scale(1.05);
}

/* KEYFRAMES */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Member profile buttons */
.member-links{display:flex;gap:8px;margin-top:8px}
.profile-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px;background:#fff;border:1px solid rgba(0,0,0,0.06);box-shadow:var(--shadow-sm);color:var(--primary-blue);text-decoration:none;transition:transform .12s ease,box-shadow .12s ease}
/*.profile-btn svg{width:18px;height:18px;fill:none}*/
.profile-btn:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,0.09)}
.profile-btn--orcid{background-image:url('image/orcid_icon_146132.png');background-size:18px 18px;background-repeat:no-repeat;background-position:center}
.profile-btn--scholar{background-image:url('image/google_scholar_icon_130918.png');background-size:18px 18px;background-repeat:no-repeat;background-position:center}
.profile-btn--wos{background:#fff4e6;color:#ff8a00}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* HIGHLIGHTS SECTION */
.highlights-section {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 0 30px;
}

.highlights-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.highlights-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.highlights-subtitle a {
    color: var(--secondary-orange);
    text-decoration: none;
}

.highlights-subtitle a:hover {
    text-decoration: underline;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.highlight-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.25s ease;
}

.highlight-card:hover {
    transform: translateY(-4px);
}

.highlight-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #ddd;
}

.highlight-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.highlight-card:hover .highlight-img-wrap img {
    transform: scale(1.04);
}

.highlight-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #222;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}

.highlight-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.highlight-date {
    display: inline-block;
    background: #f0f0f0;
    color: #444;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    width: fit-content;
}

.highlight-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.5;
}

.highlights-footer {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    padding-bottom: 20px;
}

.highlights-btn {
    background: var(--secondary-orange);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.25s ease;
}

.highlights-btn:hover {
    background: var(--secondary-orange-hover);
    transform: scale(1.03);
}

.highlights-scrollbar {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.highlights-scrollbar-thumb {
    height: 100%;
    width: 30%;
    background: var(--secondary-orange);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: left 0.3s ease;
}

@media (max-width: 768px) {
    .highlights-grid { grid-template-columns: 1fr; }
}

.demo-content {
    max-width: 100%;
    margin: 0;
    padding: 18px 12px 40px;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.demo-card {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
}

.demo-card__thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(8, 42, 88, 0.95), rgba(59, 130, 246, 0.78));
    color: white;
}

.demo-card__body {
    padding: 20px;
}

.demo-card__body h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: #0f172a;
}

.demo-card__body p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.demo-empty {
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    border-radius: 16px;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.demo-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
    padding: 0;
}

.demo-modal.is-open {
    display: block;
}

.demo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(8px);
}

.demo-modal__panel {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin: 0;
    background: linear-gradient(180deg, rgba(4, 9, 20, 0.98), rgba(8, 15, 31, 0.98));
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

.demo-viewer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.75);
}

.demo-viewer__header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #e2e8f0;
    letter-spacing: -0.03em;
}

.demo-viewer__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-close-btn {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.demo-close-btn:hover {
    transform: scale(1.04);
    border-color: rgba(94, 234, 212, 0.6);
}

#demo-frame {
    width: 100%;
    height: calc(100% - 72px);
    border: 0;
    background: #020817;
    display: block;
}

@media (max-width: 768px) {
    .demo-content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .demo-modal {
        padding: 10px;
    }

    .demo-modal__panel {
        width: 100%;
        height: 90vh;
    }

    .demo-viewer__header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* FOOTER */
footer {
    background: var(--primary-blue);
    color: var(--primary-text);
    padding: 50px 20px;
    margin-top: 100px;
}

.footer-content {
    max-width: 1000px;
    margin: auto;
    text-align: center;
}

.footer-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.footer-logo {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.9);
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}

.footer-content h3 { margin-bottom: 15px; font-size: 28px; }
.footer-content p { margin-bottom: 20px; line-height: 1.6; }
.footer-links { margin-bottom: 20px; }
.footer-links a { color: var(--primary-text); text-decoration: none; margin: 0 15px; }
.footer-links a:hover { text-decoration: underline; }
.copyright { font-size: 14px; opacity: 0.8; }

/* CONTACT SECTION */
.contact-section { padding: 80px 60px; background: var(--white); }
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.contact-info h2 { font-size: 32px; color: var(--primary-blue); margin-bottom: 20px; }
.contact-info p { font-size: 18px; margin-bottom: 10px; color: #333; }
.map-container { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }

@media (max-width: 768px) {
    .contact-container { grid-template-columns: 1fr; padding: 40px 20px; }
    .contact-section { padding: 40px 20px; }
}

/* PUBLICATIONS PAGE */
.publications-container { max-width: 1000px; margin: 40px auto; padding: 0 20px; }
.pub-filter {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0 8px;
}

.pub-filter > span {
    white-space: nowrap;
    font-weight: 600;
    color: #475569;
}

.pub-filter-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.pub-filter-scroll {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    scroll-behavior: smooth;
    padding: 2px 0;
}

.filter-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #dbe2ea;
    background: #fff;
    color: #334155;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-btn {
    background: #e0e0e0;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 0 auto;
}

.filter-btn.active { background: var(--primary-blue); color: var(--white); }
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 24px; /* increase space between cards */
}
.pub-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary-blue);
    transition: transform 0.2s ease;
    margin-bottom: 8px; /* extra space at bottom of each card */
}
.pub-card:hover { transform: translateX(10px); }
.pub-meta { font-size: 0.8rem; color: var(--secondary-orange); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.pub-title { font-size: 1.4rem; color: var(--text-dark); margin-bottom: 10px; }
.pub-authors { color: var(--text-muted); font-style: italic; margin-bottom: 5px; }
.pub-journal { font-size: 0.95rem; color: #777; margin-bottom: 15px; }
.read-btn {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    border: 1.5px solid var(--primary-blue);
    padding: 6px 15px;
    border-radius: 6px;
    transition: 0.3s;
}
.read-btn:hover { background: var(--primary-blue); color: var(--white); }

/* ── ADMIN PANEL STYLES ── */
.topbar {
    background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.topbar-logo { font-size: 1.08rem; font-weight: 700; letter-spacing: 0.5px; }

.tab-nav {
    max-width: 1120px;
    margin: 20px auto 0;
    padding: 0 40px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 10px 16px;
    border: 1px solid #dfe6ee;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s ease;
    background: #edf2f7;
    color: #334155;
    white-space: nowrap;
    margin-bottom: 5px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.tab-btn:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
}
.tab-btn.active {
    background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.22);
}

.container {
    max-width: 1120px;
    margin: 20px auto;
    padding: 0 40px 60px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: start;
}

.form-panel {
    background: rgba(255,255,255,0.96);
    padding: 28px 24px 20px;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 20px;
    border: 1px solid #edf2f7;
}
.form-heading {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #475569;
}
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    background: #f8fafc;
}
.form-group input:focus {
    outline: none;
    border-color: #0f172a;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: #f8fbff;
    box-shadow: 0 0 0 3px rgba(11, 26, 61, 0.08);
}
#f-desc {
    min-height: 220px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.desc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: #f7fafc;
    border: 1.5px solid #e2e8f0;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}
.format-btn {
    padding: 5px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #fff;
    color: #4a5568;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    font-family: inherit;
}
.format-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: #f8fbff;
}
.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #cbd5e0;
    margin: 0 2px;
}
.desc-list {
    margin: 0 0 12px 0;
    padding-left: 1.4rem;
    line-height: 1.7;
}
.desc-list li {
    margin-bottom: 6px;
}
.desc-paragraph {
    margin: 0 0 10px 0;
}
.desc-paragraph:last-child,
.desc-list:last-child {
    margin-bottom: 0;
}
.desc-large {
    font-size: 1.15em;
    font-weight: 600;
    color: #1a202c;
}
.desc-small {
    font-size: 0.88em;
    color: #718096;
}
#f-research {
    min-height: 100px;
}
.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.4;
}
.textarea-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 6px;
}
.textarea-meta .field-hint {
    margin-top: 0;
    flex: 1;
}
.word-count {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
    white-space: nowrap;
}

.btn { width: 100%; padding: 12px; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-primary { background: var(--primary-blue); color: var(--white); margin-bottom: 10px; }
.btn-primary:hover { background: var(--primary-blue-dark); transform: translateY(-1px); }
.btn-secondary { background: #edf2f7; color: #4a5568; }

.list-panel {
    background: rgba(255,255,255,0.96);
    border-radius: 18px;
    padding: 26px 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    min-height: 400px;
    border: 1px solid #edf2f7;
}

#data-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    transition: 0.2s ease;
}

.card-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    background: #ffffff;
}

.card-item .card-info .card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
    overflow-wrap: break-word;
    word-wrap: break-word;
    color: #0f172a;
    font-weight: 700;
}

.card-item .card-info {
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: #e2e8f0;
    border: 1px solid #dfe7f2;
    flex-shrink: 0;
}

.card-tag {
    font-size: 0.72rem;
    color: #f97316;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.action-btns { display: flex; gap: 8px; }
.icon-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
    color: #334155;
}
.icon-btn:hover {
    background: #f8fafc;
    border-color: #0f172a;
    color: #0f172a;
}

/* TOAST MESSAGE */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: var(--white);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: 0.4s ease;
    opacity: 0;
    z-index: 10000;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: #28a745; border-left: 4px solid #48bb78; }
.toast.error { background: #dc3545; border-left: 4px solid #f56565; }

/* ── EVENTS PAGE ── */
.events-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 30px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 80px;
}

.event-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.event-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-blue);
    backdrop-filter: blur(4px);
}

.event-details {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.event-date-chip, .event-time-chip {
    background: #f0f2f5;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #4a5568;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    line-height: 1.4;
    color: var(--text-dark);
}

.event-info {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.6;
}

.event-info strong {
    color: #4a5568;
}

/* Calendar Section */
.calendar-section {
    margin-top: 100px;
    padding-top: 60px;
    border-top: 1px solid #e2e8f0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--primary-blue);
}

/* Full-Width Custom Calendar (CQT Style) */
.calendar-wrapper {
    background: var(--white);
    padding: 0;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-today {
    padding: 6px 16px;
    border: 1px solid #dadce0;
    background: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-today:hover { background: #f1f3f4; }

.nav-btns {
    display: flex;
    align-items: center;
}

.btn-nav {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #5f6368;
}

.btn-nav:hover { background: #f1f3f4; }

.month-label {
    font-size: 1.25rem;
    font-weight: 400;
    color: #3c4043;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-group {
    display: flex;
    gap: 12px;
    color: #5f6368;
    cursor: pointer;
    font-size: 1.1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #e2e8f0;
    gap: 1px; /* Creates the grid lines */
}

.day-name {
    background: #f8fafc;
    text-align: center;
    font-weight: 600;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 12px 0;
}

.day {
    min-height: 120px;
    background: var(--white);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.day.empty {
    background: #f1f5f9;
}

.day.today {
    background: #f0f7ff;
}

.day.today .day-number {
    background: var(--primary-blue);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
    align-self: flex-start;
}

/* Event Bars (The requested style) */
.calendar-event-bar {
    background: #7c83c3; /* Purple/Blue from image */
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.calendar-event-bar:hover {
    filter: brightness(1.1);
    transform: translateX(2px);
}

@media (max-width: 900px) {
    .day { min-height: 80px; padding: 4px; }
    .day-name { font-size: 0.65rem; }
    .calendar-event-bar { font-size: 0.6rem; padding: 2px 4px; }
}

@media (max-width: 600px) {
    .events-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .container { grid-template-columns: 1fr; }
    .form-panel { position: static; }
}

/* ── PEOPLE PAGE ── */
.people-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 30px;
}

.people-filter {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(42, 67, 101, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.people-group-section {
    margin-bottom: 50px;
}

.member-group-title {
    font-size: 1.75rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary-orange);
    display: inline-block;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.member-card {
    background: #f8fafc;
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.member-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.member-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
}

.member-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #4a5568;
    backdrop-filter: blur(4px);
}

.member-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.member-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.member-position {
    font-size: 0.85rem;
    font-weight: 600;
    color: #d35400; /* Secondary accent */
    margin-bottom: 12px;
}

.member-research {
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.5;
    margin-bottom: 20px;
}

.member-link-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #4a5568;
    transition: 0.3s;
}

.member-card:hover .member-link-arrow {
    background: var(--primary-blue);
    color: white;
}

@media (max-width: 1100px) {
    .people-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
    .people-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .people-grid { grid-template-columns: 1fr; }
}

/* ── GENERIC CATEGORY PAGES (Research, Outreach, Industry) ── */
.generic-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.generic-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    border: 1px solid #edf2f7;
}

.generic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1.2;
}

.card-desc {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.card-link {
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    transition: 0.2s;
    display: inline-block;
    padding-top: 10px;
}

.card-link:hover {
    color: var(--secondary-orange);
    transform: translateX(5px);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.blog-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border: 1px solid #edf2f7;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.blog-card:hover,
.blog-card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    outline: none;
}

.blog-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #edf2f7;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-content {
    padding: 18px 18px 22px;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.blog-card-tag {
    display: inline-block;
    background: rgba(217, 70, 239, 0.12);
    color: #7c2d92;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 10px;
    border-radius: 999px;
}

.blog-card-date {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
}

.blog-card h3 {
    color: #0f172a;
    font-size: 1.2rem;
    line-height: 1.4;
    margin: 0;
}

.blog-card .card-desc {
    margin-bottom: 0;
    font-size: 0.96rem;
}

.blog-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}

.blog-modal.show {
    display: block;
}

.blog-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.blog-modal-panel {
    position: relative;
    max-width: 900px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.blog-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 2;
}

.blog-modal-image-wrap {
    width: 100%;
    max-height: 52vh;
    min-height: 220px;
    background: #edf2f7;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-modal-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-modal-body {
    padding: 22px 24px 28px;
    overflow-wrap: anywhere;
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: calc(90vh - 52vh);
}

.blog-modal-body h3 {
    margin: 0 0 14px;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #0f172a;
    line-height: 1.3;
}

.blog-modal-desc {
    color: #475569;
    line-height: 1.8;
    font-size: 1rem;
    overflow-y: auto;
    padding-right: 6px;
}

.blog-modal-desc .desc-paragraph,
.blog-modal-desc .desc-list {
    margin-bottom: 14px;
}

.blog-detail-empty {
    color: #64748b;
}

@media (max-width: 900px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-modal-panel { margin: 8vh 16px; }
}

@media (max-width: 800px) {
    .category-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
}

/* Drag & Drop Upload Zone Styles */
.upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 120px;
    margin-bottom: 8px;
}

.upload-zone:hover {
    border-color: var(--primary-blue);
    background: #f0f4f8;
}

.upload-zone.dragover {
    border-color: var(--secondary-orange);
    background: #fffaf0;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2rem;
}

.upload-text {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
}

.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(229, 62, 62, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: 0.2s;
    z-index: 20;
}

.remove-btn:hover {
    background: rgb(229, 62, 62);
    transform: scale(1.1);
}

.or-separator {
    text-align: center;
    margin: 12px 0;
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 600;
    position: relative;
}

.or-separator::before,
.or-separator::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #e2e8f0;
}

.or-separator::before {
    left: 0;
}

.or-separator::after {
    right: 0;
}

/* ── DROPDOWN NAVIGATION MENU ── */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Clear anchor line offsets and extend padding down slightly */
.dropdown-trigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 12px; /* Pulls the hover container zone downward */
    margin-bottom: -12px;
}

/* Force the dropdown to show instantly on hover */
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-blue-dark, #082d6b);
    min-width: 140px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    border-radius: 8px;
    
    /* Move the dropdown box closer to eliminate the hover gap */
    top: calc(100% - 4px); 
    left: 50%;
    transform: translateX(-50%);
    
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

/* THE HOVER BRIDGE: An invisible extension block above the menu */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;       /* Extends 20px up to join the text trigger area */
    left: 0;
    width: 100%;
    height: 20px;     /* Invisible safety bridge zone */
    background: transparent;
}

.dropdown-content a {
    color: var(--white) !important;
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0 !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--secondary-orange, #e05a00);
    color: var(--white) !important;
}

/* Keeps script class state active if toggled via code */
.dropdown.open .dropdown-content {
    display: block;
}

/* ── PAST ACTIVITIES PAGE SHOWCASE ── */
.activities-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 30px;
}

.disclaimer-card {
    background: rgba(11, 61, 145, 0.04);
    border: 1px dashed rgba(11, 61, 145, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4a5568;
}

.disclaimer-card em {
    font-weight: 500;
    color: var(--primary-blue);
}

.activities-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.activities-links-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.activity-item-link {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    width: fit-content;
    text-align: left;
}

.activity-item-link:hover {
    color: var(--secondary-orange);
    transform: translateX(4px);
}

.activity-item-link.active {
    color: var(--secondary-orange);
    font-weight: 700;
}

.activity-showcase-panel {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid #edf2f7;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 480px;
    margin-top: 20px;
    transition: opacity 0.3s ease;
}

.activity-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f7fafc;
}

.activity-showcase-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.activity-showcase-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-dark);
}

.activity-showcase-tag {
    display: inline-block;
    color: var(--secondary-orange);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.activity-showcase-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a5568;
}

@media (max-width: 900px) {
    .activity-showcase-panel {
        grid-template-columns: 1fr;
    }
    .activity-showcase-img {
        aspect-ratio: 16/10;
        height: auto;
    }
    .activity-showcase-content {
        padding: 30px;
    }
}

/* =========================================
   YEAR ACCORDION STYLES
   ========================================= */
.year-accordion {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* =========================================
   ACTIVITY TIMELINE ITEMS (INDIVIDUAL EVENTS)
   ========================================= */
.activity-timeline-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.activity-timeline-item:last-child {
    border-bottom: none;
}

.activity-timeline-item:hover {
    background: #f9fafb;
}

.activity-date {
    flex-shrink: 0;
    width: 60px;
    padding: 8px 12px;
    background: var(--primary-blue);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.4;
}

.year-summary {
    background: #f8fafc;
    padding: 15px 24px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0b1a3d;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Hides the native arrow */
}

/* Hides native arrow in WebKit (Safari/Chrome) */
.year-summary::-webkit-details-marker {
    display: none; 
}

.year-summary:hover {
    background: #f1f5f9;
}

/* Rotate our custom arrow when open */
.year-accordion[open] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 1rem;
    color: #4a5568;
}

.accordion-content {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    /* Optional: limits background color bleed if you use custom timeline CSS */
    background: #ffffff; 
}

/* =========================================
   ACTIVITY TIMELINE CARDS (TEXT LEFT, IMG RIGHT)
   ========================================= */
.activity-card {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;               /* Adds breathing room between text and image */
}

/* 1. Text on the Left */
.activity-card-body {
    order: 1;                /* Forces the text to appear first (left) */
    flex: 1;                 /* Allows the text to take up all remaining space */
    text-align: justify;     /* Justifies the text as requested */
    max-width: 55%;
    margin-top: 20px;  
    margin-right: 10px;      /* Adds a bit of vertical spacing for better balance */
}

.activity-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a202c;
}

/* Description text — formatted content from admin toolbar */
.activity-card-desc {
    word-wrap: break-word;
    line-height: 1.7;
    color: #4a5568;
    font-size: 1.0rem;
}

.activity-card-body .read-btn {
    margin-top: 16px;
}

.activity-card--text-only .activity-card-body {
    max-width: 100%;
}

.activity-media {
    position: relative;
    order: 2;
    flex: 0 0 auto;
    width: 380px;
    max-width: 50%;
}

.activity-media-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-img {
    order: 2;
    flex-shrink: 0;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin: 0;
    background: #f8fafc;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.activity-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.activity-gallery-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.activity-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 11;
    transition: all 0.2s ease;
}

.activity-gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.05);
}

.activity-gallery-nav.prev {
    left: 8px;
}

.activity-gallery-nav.next {
    right: 8px;
}

.activity-media:hover .activity-gallery-nav {
    display: flex;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 26, 61, 0.95); /* Match Kelab Qubit's dark blue brand color */
    display: none;                      /* Kept hidden until image is clicked */
    justify-content: center;
    align-items: center;
    z-index: 99999;                     /* Ensures it sits on top of everything */
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Class added via JS to fade the lightbox in */
.lightbox-overlay.show {
    opacity: 1;
}

/* The high-resolution target image inside the lightbox */
.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

/* Pop the image up slightly when loaded */
.lightbox-overlay.show .lightbox-img {
    transform: scale(1);
}

/* 3. Mobile Responsiveness */
@media (max-width: 768px) {
    .activity-timeline-item {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .activity-date {
        width: 100%;
        text-align: center;
    }

    .activity-card {
        flex-direction: column;
    }

    .activity-img {
        order: 1;
        width: 100%;
        max-width: 100%;
        margin-bottom: 16px;
        /* Allow it to be as tall as necessary on mobile after switching to column layout */
        max-height: none; 
    }

    .activity-media {
        width: 100%;
        max-width: 100%;
    }

    .activity-card-body {
        order: 2;
        text-align: left;
        max-width: 100%;
        margin-top: 0;
    }

    .activity-pdf-preview {
        order: 1;
        flex: 1 1 100%;
        align-self: stretch;
        width: 100%;
        max-width: 100%;
        margin-bottom: 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .activity-pdf-toolbar {
        display: flex;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
    }

    .activity-pdf-controls button {
        background: #fff;
        border: 1px solid #cbd5e0;
        padding: 6px 10px;
        border-radius: 6px;
        cursor: pointer;
    }

    .activity-pdf-controls button:hover {
        background: #f0f4f8;
    }

    .activity-pdf-frame-wrap {
        width: 1000px;
        height: 700px;
        overflow: hidden;
        border-radius: 8px;
    }

    .activity-pdf-iframe {
        width: 100%;
        height: 100%;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        display: block;
        transform-origin: 0 0;
    }

    .activity-gallery-nav {
        display: flex !important;
    }
}

/* =========================================
   EQUIPMENT SPECS DROPDOWN
   ========================================= */
.equipment-specs-dropdown {
    margin-top: 0px;
}

.equipment-specs-dropdown summary {
    outline: none;
    transition: all 0.2s ease;
}

.equipment-specs-dropdown summary:hover {
    background: #082d6b !important;
    box-shadow: 0 2px 8px rgba(11, 61, 145, 0.3);
}

.equipment-specs-dropdown[open] summary span:first-child {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

/* =========================================
   PAST ACTIVITIES MAIN CONTAINER SIZE
   ========================================= */
.activities-main {
    width: 100%;
    max-width: 1200px;        /* 1. CONTROLS WIDTH: Change this to make the page wider or narrower */
    margin: 0 auto;          /* 2. CENTERS CONTAINER: Keeps it centered on large computer screens */
    padding: 40px 24px;      /* 3. PADDING: 40px top/bottom spacing, 24px left/right inner spacing */
    box-sizing: border-box;  /* Ensures padding doesn't break your max-width calculation */
}

/* =========================================
   ABOUT US PAGE LAYOUT (GRID & ROUNDED BOXES)
   ========================================= */

/* Center container on the page */
.about-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

/* Define the Grid properties */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* The core rounded-edge box style */
.about-box {
    background: var(--white);
    border-radius: 16px; /* Smooth, distinct rounded edges */
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Subtle interactive lift on hover */
.about-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11, 61, 145, 0.08);
}

/* Typography inside the boxes */
.about-box h2 {
    color: var(--primary-blue);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.about-box p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Box decorative icons */
.box-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Make the main identity block span two full columns if space allows */
@media (min-width: 768px) {
    .box-featured {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: linear-gradient(135deg, #ffffff 0%, #fcfdfe 100%);
        border-left: 5px solid var(--secondary-orange); /* Unique highlighting border */
    }
    .box-featured h2 {
        font-size: 1.7rem;
    }
}
/* Industry card adjustments for smaller logos and text */
.industry-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 360px;        /* Limit overall card width */
    margin: 0 auto;          /* Center cards if grid has extra space */
}

.industry-card img {
    max-width: 120px;        /* Shrinks logo to a reasonable size */
    height: auto;
    margin-bottom: 16px;
    object-fit: contain;
}

.industry-card .card-desc {
    font-size: 0.9rem;       /* Slightly smaller text */
    line-height: 1.4;
    margin-bottom: 12px;
    max-width: 320px;        /* Prevent text from stretching too wide */
}

.industry-card .card-link {
    font-size: 0.9rem;       /* Adjust link size */
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.industry-card .card-link:hover {
    color: var(--secondary-orange);
}

/* Responsive Grid for Industry */
#industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}


/* ==========================================================================
   MOBILE NAVIGATION – Hamburger & Slide-in Panel
   ========================================================================== */

/* Hamburger button – hidden on desktop, shown on mobile */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    z-index: 1100;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate to ✕ when open */
.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Overlay backdrop */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.is-open {
    display: block;
    opacity: 1;
}

/* Slide-in panel */
.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: #0D0B14;
    padding: 28px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.is-open .mobile-nav-panel {
    transform: translateX(0);
}

.mobile-nav-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.mobile-nav-close:hover { color: #fff; }

.mobile-nav-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* Mobile nav links */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-links a,
.mobile-nav-links summary {
    display: block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    list-style: none;
    margin-left: 0 !important;
}

.mobile-nav-links a:hover,
.mobile-nav-links summary:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.mobile-nav-links details summary::-webkit-details-marker {
    display: none;
}

.mobile-nav-links details summary::after {
    content: ' ▾';
    font-size: 0.75rem;
    opacity: 0.7;
}

.mobile-sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 12px;
    border-left: 2px solid rgba(255,255,255,0.12);
    margin: 4px 0 4px 14px;
}

.mobile-sub a {
    font-size: 0.9rem;
    padding: 8px 12px;
    color: rgba(255,255,255,0.7);
}

.mobile-sub a:hover {
    color: #D946EF;
    background: transparent;
}


/* ==========================================================================
   MOBILE RESPONSIVE — Global overhaul  (all at ≤768px unless noted)
   ========================================================================== */

@media (max-width: 768px) {

    /* ── Body / general spacing ── */
    body {
        padding-top: 60px; /* account for fixed header */
    }

    /* ── Header ── */
    header {
        padding: 12px 18px;
    }
    .logo {
        font-size: 18px;
    }
    .nav-hamburger {
        display: flex !important;
    }

    /* ── Hero ── */
    .hero, .lefthero {
        padding: 60px 20px 50px;
        text-align: center;
    }
    .lefthero {
        padding-left: 20px;
        padding-right: 20px;
    }
    .hero h1, .lefthero h1 {
        font-size: 1.8rem;
        margin-bottom: 14px;
    }
    .hero p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    /* ── Highlights section ── */
    .highlights-section {
        margin: 30px auto 0;
        padding: 0 16px;
    }
    .highlights-title {
        font-size: 1.5rem;
    }
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    .highlights-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    /* ── Footer ── */
    footer {
        padding: 40px 16px;
        margin-top: 60px;
    }
    .footer-content h3 { font-size: 1.3rem; }
    .footer-links a { margin: 0 8px; font-size: 0.85rem; }

    /* ── Publications page ── */
    .publications-container {
        padding: 0 14px;
        margin: 20px auto;
    }
    .pub-filter {
        flex-wrap: wrap;
        gap: 6px;
    }
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .pub-title {
        font-size: 1.1rem;
    }
    .pub-card {
        padding: 18px 16px;
    }
    .pub-card:hover {
        transform: none;  /* avoid horizontal shift on mobile */
    }
    /* Chart bars – allow scroll, smaller height */
    #pub-chart {
        height: 120px !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        gap: 10px !important;
        padding-bottom: 6px;
    }
    #chart-section {
        padding: 16px;
    }

    /* ── Admin panel ── */
    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .tab-nav {
        padding: 0 14px;
        gap: 6px;
    }
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .container {
        grid-template-columns: 1fr;
        padding: 0 14px 40px;
        gap: 20px;
    }
    .form-panel {
        position: static;
    }
    .list-panel {
        margin-right: 0;
        padding: 18px;
    }

    /* ── Events page ── */
    .events-container {
        margin: 30px auto;
        padding: 0 14px;
    }
    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* ── Calendar ── */
    .calendar-section {
        margin-top: 50px;
        padding-top: 30px;
    }
    .day {
        min-height: 60px;
        padding: 4px 3px;
    }
    .day-name {
        font-size: 0.6rem;
        padding: 8px 0;
    }
    .calendar-event-bar {
        font-size: 0.55rem;
        padding: 2px 3px;
    }
    .calendar-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .month-label {
        font-size: 1rem;
    }

    /* ── People page ── */
    .people-container {
        margin: 30px auto;
        padding: 0 14px;
    }
    .member-group-title {
        font-size: 1.3rem;
    }
    .people-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .member-info {
        padding: 12px;
    }
    .member-name {
        font-size: 0.9rem;
    }
    .member-position {
        font-size: 0.75rem;
    }
    .member-research {
        font-size: 0.7rem;
    }

    /* ── Generic/Research/Outreach pages ── */
    .generic-container,
    .activities-container {
        margin: 30px auto;
        padding: 0 14px;
    }
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .card-title {
        font-size: 1.2rem;
    }

    /* ── Past activities / Activities main ── */
    .activities-main {
        padding: 20px 14px;
    }
    .activity-showcase-content {
        padding: 20px;
    }
    .activity-showcase-title {
        font-size: 1.4rem;
    }
    .accordion-content {
        padding: 14px;
    }
    .year-summary {
        font-size: 1rem;
        padding: 12px 16px;
    }

    /* ── About page ── */
    .about-section {
        padding: 0 14px;
        margin: 30px auto;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-box {
        padding: 22px 18px;
    }

    /* ── Contact ── */
    .contact-section {
        padding: 30px 14px;
    }
    .contact-info h2 {
        font-size: 1.5rem;
    }
    .contact-info p {
        font-size: 0.95rem;
    }

    /* ── Section titles ── */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    /* ── Drop-down nav (desktop only, hide on mobile) ── */
    .dropdown-content {
        display: none !important;
    }
}

/* EVENT CALENDAR STYLES */
#event-calendar {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin: 60px auto;
    max-width: 1200px;
    padding: 0 30px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    color: white;
}

.calendar-month-year {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.calendar-nav {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.calendar-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    padding: 1px;
}

.calendar-weekday {
    background: #f8fafc;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
}

.calendar-day {
    background: var(--white);
    min-height: 100px;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

.calendar-day.empty {
    background: #f1f5f9;
    cursor: default;
}

.calendar-day.today {
    background: #eff6ff;
}

.calendar-day.today .day-number {
    background: var(--primary-blue);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.calendar-day.has-events {
    cursor: pointer;
    background: linear-gradient(135deg, #fef3c7 0%, #fef1e6 100%);
}

.calendar-day.has-events:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd5b4 100%);
    box-shadow: inset 0 0 0 2px #f59e0b;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.event-indicator {
    background: #d946ef;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: auto;
}

/* Event Modal */
#event-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

#event-modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.modal-close:hover {
    background: #cbd5e0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-card {
    background: #f8fafc;
    border-left: 4px solid #d946ef;
    padding: 16px;
    border-radius: 8px;
    transition: 0.2s;
}

.event-card:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.event-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.event-date,
.event-tag,
.event-subtitle {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 6px;
}

.event-date strong,
.event-tag strong,
.event-subtitle strong {
    color: #1a202c;
    font-weight: 600;
}

.event-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 10px 0;
}

.event-link {
    display: inline-block;
    color: #d946ef;
    text-decoration: none;
    font-weight: 600;
    margin-top: 8px;
    transition: 0.2s;
}

.event-link:hover {
    color: #ec008c;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .calendar-day {
        min-height: 80px;
    }
    .day-number {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    #event-calendar {
        padding: 0 15px;
        margin: 40px auto;
    }
    .calendar-day {
        min-height: 60px;
        padding: 6px;
    }
    .day-number {
        font-size: 0.75rem;
    }
    .event-indicator {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    .calendar-header {
        padding: 16px 12px;
    }
    .calendar-month-year {
        font-size: 1.2rem;
    }
    .modal-content {
        padding: 20px;
        max-height: 90vh;
    }
    .modal-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
@media (max-width: 400px) {
    .people-grid {
        grid-template-columns: 1fr;
    }
    .hero h1, .lefthero h1 {
        font-size: 1.5rem;
    }
    .highlights-btn {
        width: 100%;
        text-align: center;
    }
    .pub-title {
        font-size: 1rem;
    }
}
}