/* Core Variables & Root Configuration */
:root {
    --primary: #064e3b;
    --primary-dark: #022c22;
    --accent: #f59e0b;
    --text: #292524;
    --light-bg: #fafaf9;
    --white: #ffffff;
    --page-v-sep-color: rgba(245, 158, 11, 0.08);
    --page-v-sep-glow: rgba(245, 158, 11, 0.35);
    --hero-main-width: 1100px;
    --inst-font: 'Merriweather', serif;
    --transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    --transition-fast: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    --edu-phd: #28a745;
    --edu-msc: #dc3545;
    --edu-bsc: #20b0c9;
    --exp-full: #28a745;
    --exp-part: #6f42c1;
    --exp-trainee: #6f42c1;
    --sub-heading: #1e40af;
    --ref-1: #2563eb;
    --ref-2: #dc3545;
    --ref-3: #6f42c1;
    --ref-4: #0dadbc;
    --ref-5: #28a745;
    --ref-6: #9f0f85;
    --vision-color-1: #eef7f6;
    --vision-color-2: #fef8e7;
    --vision-color-3: #f5f3ff;
    --vision-color-4: #fef2f2;
    --vision-color-5: #f0fdfa;
    --vision-color-6: #f0f5ff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --tooltip-bg: rgba(0, 0, 0, 0.95);
    --tooltip-text: var(--white);

    /* Dynamic variables for consolidation */
    --card-bg: var(--white);
    --card-text: var(--text);
    --card-border: #f0f0f0;
    --card-shadow: var(--shadow-sm);
    --card-shadow-hover: var(--shadow-md);
}

/* Resets & Accessibility Enhancements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 65px;
    background-color: var(--primary-dark); /* overscroll below the footer blends with it, not white */
    margin-top: 0px !important;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light-bg);
    padding-top: 50px;
    overflow-x: hidden;
    top: 0px !important;
    position: static !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

::selection {
    background: var(--accent);
    color: var(--white);
}

:focus-visible {
    outline: 2px solid var(--accent) !important;
    outline-offset: 3px;
    border-radius: 4px;
}

.accordion-btn:focus-visible,
.cv-btn-half:focus-visible,
.ai-expand-btn:focus-visible,
.back-to-top:focus-visible,
#ai-widget-toggle:focus-visible {
    outline: 2px solid var(--accent) !important;
    outline-offset: 3px;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
body>.skiptranslate {
    display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f9f9f9;
    border-left: 1px solid #eee;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
    border: 2px solid #f9f9f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8860b;
}

/* Utility Animations & Search Highlighting */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes cascadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(-4px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    }
}

.reveal .edu-card,
.reveal .exp-box,
.reveal .bento-card,
.reveal .patent-box,
.reveal .award-card,
.reveal .referee-card {
    opacity: 0;
}

.reveal.active .edu-card,
.reveal.active .exp-box,
.reveal.active .bento-card,
.reveal.active .patent-box,
.reveal.active .award-card,
.reveal.active .referee-card {
    opacity: 1;
    animation: cascadeUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

/* Consolidated Animation Delays */
.reveal.active > *:nth-child(1) { animation-delay: 0.05s; }
.reveal.active > *:nth-child(2) { animation-delay: 0.10s; }
.reveal.active > *:nth-child(3) { animation-delay: 0.15s; }
.reveal.active > *:nth-child(4) { animation-delay: 0.20s; }
.reveal.active > *:nth-child(5) { animation-delay: 0.25s; }
.reveal.active > *:nth-child(n+6) { animation-delay: 0.30s; }

/* General Card Utility Class */
.ui-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ui-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

/* Compositor-driven for the same reason as `sweep`; the badge highlight is 50%
   of the badge's width, so -100%..200% parent-relative becomes 600%. */
@keyframes metallicShimmer {
    0% {
        transform: translateX(0) skewX(-20deg);
    }

    20% {
        transform: translateX(600%) skewX(-20deg);
    }

    100% {
        transform: translateX(600%) skewX(-20deg);
    }
}

@keyframes goldShine {
    0% {
        background-position: -200% center;
    }

    20% {
        background-position: 200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes gradientRun {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.separator {
    height: 4px;
    border: none;
    background: linear-gradient(90deg, #0d0b0c, var(--accent), #f3071f);
    background-size: 200% 100%;
    animation: gradientRun 3s linear infinite;
    margin: 3rem 0;
    opacity: 0.9;
}

.highlight-match {
    background-color: rgba(245, 158, 11, 0.22);
    color: inherit;
    font-weight: 700;
    border-radius: 3px;
    padding: 0 2px;
}

.highlight-match.active {
    background-color: rgba(245, 158, 11, 0.75);
    color: #1a1a1a;
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-radius: 3px;
}

/* Primary Navigation Header */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10001;
    height: 60px;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.header-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition);
    cursor: pointer;
}

@media (min-width: 901px) {
    .header-name {
        display: none !important;
    }

    .header-content {
        justify-content: center;
    }
}

.header-name.visible {
    opacity: 1;
    transform: translateX(0);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 10px;
    padding: 0;
    margin: 0;
    align-items: center;
}

.nav-link {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    transition: var(--transition);
    background: transparent;
    display: inline-block;
    position: relative;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--accent);
    background: rgba(6, 78, 59, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 2px;
    left: 50%;
    background-color: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active-section::after {
    width: 80%;
}

.nav-link.active-section {
    color: var(--accent) !important;
}

.nav-item-dropdown {
    position: relative;
    display: inline-block;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: max-content;
    width: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 2005;
    border-left: 3px solid var(--accent);
    border-top: none;
    border-radius: 0 0 4px 4px;
    top: 100%;
    left: 0;
    padding-top: 5px;
}

@media (min-width: 901px) {
    .nav-item-dropdown:hover .nav-dropdown-content {
        display: block;
    }
}

.dropdown-item-wrapper {
    position: relative;
}

.nav-dropdown-content a {
    color: var(--primary);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid #f9f9f9;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-dropdown-content a:hover,
.dropdown-item-wrapper:hover>a {
    background-color: #f0f4f8;
    color: var(--accent);
    padding-left: 20px;
}

.desktop-arrow {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.7em;
    transition: transform 0.3s;
}

.nav-toggle {
    display: none;
}

.mobile-dropdown-toggle {
    display: none;
}

.global-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 15px;
    border-left: 1px solid #ddd;
    padding-left: 15px;
    height: 30px;
}

.header-sep {
    color: var(--exp-trainee);
    opacity: 0.5;
    font-size: 1.1rem;
    font-weight: 300;
    user-select: none;
}

.control-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--primary);
    transition: 0.3s;
    font-size: 1rem;
    line-height: 1;
}

.control-icon:hover {
    color: var(--accent);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* ===== COMMAND PALETTE / SPOTLIGHT SEARCH ===== */
.srch-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(48px, 8vh, 90px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    background: rgba(10, 18, 38, 0.60);
}

.srch-overlay.srch-open {
    opacity: 1;
    pointer-events: auto;
}

.srch-box {
    width: min(640px, 92vw);
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 72vh;
    transform: translateY(-16px) scale(0.97);
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
    opacity: 0;
}

.srch-overlay.srch-open .srch-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.srch-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.srch-icon-lbl {
    color: #94a3b8;
    font-size: 1rem;
    flex-shrink: 0;
}

.srch-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #0f172a;
    outline: none;
    font-family: inherit;
}

.srch-input::placeholder {
    color: #94a3b8;
}

.srch-kbd {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.srch-key {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 0.7rem;
    color: #64748b;
    font-family: monospace;
    cursor: default;
    white-space: nowrap;
}

.srch-body {
    overflow-y: auto;
    flex: 1;
}

.srch-section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}

.srch-badge {
    background: var(--accent, var(--accent));
    color: var(--white);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.srch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.12s;
    border-left: 3px solid transparent;
}

.srch-item:hover,
.srch-item.srch-active {
    background: #f8fafc;
    border-left-color: var(--accent, var(--accent));
}

.srch-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--primary, #1e3a5f);
    flex-shrink: 0;
}

.srch-item-body {
    flex: 1;
    min-width: 0;
}

.srch-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.srch-item-title mark {
    background: rgba(245, 158, 11, 0.3);
    color: inherit;
    border-radius: 2px;
    font-style: normal;
}

.srch-item-excerpt {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.srch-item-excerpt mark {
    background: rgba(245, 158, 11, 0.2);
    color: inherit;
    border-radius: 2px;
    font-style: normal;
}

.srch-item-cat {
    font-size: 0.63rem;
    font-weight: 600;
    color: var(--primary, #1e3a5f);
    background: rgba(30, 58, 95, 0.07);
    border-radius: 20px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

.srch-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.srch-pill {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary, #1e3a5f);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.srch-pill:hover {
    background: var(--accent, var(--accent));
    border-color: var(--accent, var(--accent));
    color: var(--white);
}

.srch-footer {
    display: flex;
    gap: 14px;
    padding: 8px 16px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
    background: #f8fafc;
    flex-wrap: wrap;
}

.srch-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    color: #94a3b8;
}

.srch-hint .srch-key {
    background: var(--white);
}

.srch-empty {
    text-align: center;
    padding: 32px 20px;
    color: #94a3b8;
    font-size: 0.88rem;
}

.srch-empty i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.srch-flash {
    outline: 2px solid var(--accent, var(--accent)) !important;
    outline-offset: 4px !important;
}

body.dark-mode .srch-overlay {
    background: rgba(0, 0, 0, 0.72);
}

body.dark-mode .srch-box {
    background: #1e293b;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 158, 11, 0.2);
}

body.dark-mode .srch-header {
    border-bottom-color: #334155;
}

body.dark-mode .srch-input {
    color: #f1f5f9;
}

body.dark-mode .srch-key {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

body.dark-mode .srch-section-hd {
    background: #1e293b;
    color: #64748b;
}

body.dark-mode .srch-item:hover,
body.dark-mode .srch-item.srch-active {
    background: #0f172a;
}

body.dark-mode .srch-item-icon {
    background: #0f172a;
    color: var(--accent);
}

body.dark-mode .srch-item-title {
    color: #f1f5f9;
}

body.dark-mode .srch-item-excerpt {
    color: #64748b;
}

body.dark-mode .srch-item-cat {
    color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
}

body.dark-mode .srch-pills {
    border-bottom-color: #334155;
}

body.dark-mode .srch-pill {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

body.dark-mode .srch-footer {
    background: #0f172a;
    border-top-color: #334155;
}

body.dark-mode .srch-hint .srch-key {
    background: #1e293b;
}

body.dark-mode .srch-empty {
    color: #475569;
}

@media (max-width: 600px) {
    .srch-overlay {
        align-items: flex-start;
        padding-top: calc(64px + env(safe-area-inset-top));
    }

    .srch-box {
        width: calc(100vw - 32px);
        max-width: 640px;
        border-radius: 14px;
        max-height: calc(100vh - 28px - env(safe-area-inset-top));
    }
}

.lang-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary);
}

.lang-wrapper:hover {
    color: var(--accent);
}

.lang-current-display {
    display: flex;
    align-items: center;
    gap: 5px;
}

.flag-xs {
    width: 18px;
    height: auto;
    border-radius: 2px;
}

.custom-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 5px 0;
    width: 150px;
    display: none;
    flex-direction: column;
    z-index: 2005;
}

.custom-lang-dropdown.show {
    display: flex;
}

@media (min-width: 901px) {
    .lang-wrapper:hover .custom-lang-dropdown {
        display: flex;
    }
}

.lang-option {
    padding: 8px 15px;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--card-border);
    color: var(--accent);
}

#google_translate_element {
    display: none;
}

/* Sticky Interfaces (Sidebar & To-Top Button) */
.sticky-sidebar {
    position: fixed;
    top: 50%;
    left: 0; /* Desktop Default: Left */
    transform: translateY(-50%);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--white);
    padding: 15px 8px;
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.sticky-sidebar .h-social {
    font-size: 1.5rem;
    color: var(--primary);
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; 
}

/* Global Instant Tooltip (using data-tip) */
[data-tip] {
    position: relative;
}

[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.05s ease;
    z-index: 2147483647; /* Absolute maximum z-index */
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

[data-tip]:hover::after {
    opacity: 1;
}

/* Share buttons inside the AI modal: show the tooltip above the icon (not to the
   side, where the next button covers it) and lift the hovered button. */
#ai-modal-content [data-tip]::after {
    left: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
}

#ai-modal-content [data-tip]:hover {
    z-index: 2147483647;
}

/* Floating Interface Triggers: Flip tooltip to the left to prevent edge clipping */
.global-controls [data-tip]::after,
.global-controls [data-tip]::after,
#ai-widget-toggle[data-tip]::after,
.back-to-top[data-tip]::after {
    left: auto !important;
    right: calc(100% + 15px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Tooltip positioning overrides */
.h-social::after {
    left: 100%;
    transform: translateY(-50%) translateX(10px);
}

.h-social:hover::after {
    transform: translateY(-50%) translateX(15px);
}

.f-soc-link::after {
    left: 50%;
    top: auto;
    bottom: 120%;
    transform: translateX(-50%) translateY(0);
}

.f-soc-link:hover::after {
    transform: translateX(-50%) translateY(-5px);
}

.flag-wrapper::after {
    left: 50%;
    top: auto;
    bottom: 125%;
    transform: translateX(-50%);
}

.sticky-sidebar .h-social:hover {
    color: var(--accent);
    transform: scale(1.2);
}

/* ---- Section Minimap Rail: stacked progress dashes (left edge, beside the
   social sidebar, desktop only) ---- */
.section-rail {
    display: none; /* Shown on wide desktops only (see min-width media query) */
    position: fixed;
    top: 50%;
    left: 58px; /* Sits just right of the social sidebar (left:0, ~40px wide) */
    transform: translateY(-50%);
    z-index: 1100;
    flex-direction: column;
    gap: 16px;
    background: transparent;
    padding: 0;
    border: none;
    transition: var(--transition);
}

/* Each dash: a short horizontal bar. Muted by default, accent-filled when active. */
.section-rail .rail-dot {
    display: block;
    width: 32px;
    height: 4px;
    border-radius: 4px;
    background: #cbd5e1;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: background-color 0.28s ease, box-shadow 0.28s ease;
}

.section-rail .rail-dot:hover {
    background: #94a3b8;
}

.section-rail .rail-dot.active {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
}

/* Heading label: hidden until its own dash is hovered, then shown to the
   right of that dash (no layout shift — absolutely positioned). */
.section-rail .rail-label {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.section-rail .rail-dot:hover .rail-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

.section-rail .rail-dot.active .rail-label {
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
}

/* Dark mode: brighter muted bars so they read on the dark background */
body.dark-mode .section-rail .rail-dot {
    background: #475569;
}

body.dark-mode .section-rail .rail-dot:hover {
    background: #94a3b8;
}

body.dark-mode .section-rail .rail-dot.active {
    background: var(--accent);
}

/* Show only on wide desktops (like the hero terminal / protein visuals) */
@media (min-width: 1200px) {
    .section-rail {
        display: flex;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 10005; /* Higher than AI widget (10002) */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(-4px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--primary);
    color: var(--accent);
    transform: translateY(-5px);
}

/* SVG Ring Styling for Back to Top */
.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

.progress-ring__background {
    stroke: transparent;
}

.progress-ring__circle {
    stroke: var(--primary);
    transition: stroke-dashoffset 0.1s linear;
    stroke-linecap: round;
}

.back-to-top:hover .progress-ring__circle {
    stroke: var(--accent);
}

.back-to-top:hover .progress-ring__background {
    stroke: transparent;
}

/* --- Scroll More Button in Panels (Floating) */
.panel {
    position: relative; /* Base for absolute scroll button */
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

.scroll-more-btn {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Controlled via JS based on overflow */
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: none;
    z-index: 100;
}

.scroll-more-btn:hover {
    transform: translateX(-50%) translateY(3px) scale(1.1);
    background: var(--primary);
    color: var(--accent);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Hero Landing Section */
.hero-section-wrapper {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}



#mol-canvas:active {
    cursor: grabbing;
}

.hero {
    color: var(--white);
    padding: 0; /* Remove padding to align exactly with section containers */
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row; /* Horizontal layout */
    justify-content: center; /* Group everything in the centre */
    align-items: center;
    max-width: 100%; /* Stretch fully to viewport edges */
    margin: 0 auto;
    width: 100%;
    min-height: 350px;
    pointer-events: none;
    overflow: visible; /* Prevent any clipping */
}

.hero-main-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* Center layout for balanced proportions */
    gap: 2.5rem; /* Original gap */
    width: 100%;
    max-width: var(--hero-main-width);
    margin: 0 auto;
    padding: 0 2rem; /* Match container padding exactly to align vertical lines */
    box-sizing: border-box;
    flex-shrink: 0;
    pointer-events: auto;
    position: relative;
    transition: var(--transition);
}

.hero-column-side {
    width: 350px;
    height: 350px;
    pointer-events: auto;
    overflow: visible;
    transition: var(--transition);
}

#hero-side-left {
    position: absolute;
    right: calc(100% + 40px); /* Positioned outside left of main group */
    top: 0;                   /* Align with top of main group container */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;    /* Align molecule closest to separator */
}

#hero-side-right {
    position: absolute;
    left: calc(100% + 40px);  /* Positioned outside right of main group */
    top: 0;                   /* Align with top of main group container */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Anchor terminal to bottom-left to grow upwards and rightwards */
    align-items: flex-start;  /* Align terminal closest to separator */
}

/* Vertical Separators for Hero - Matching the container separators exactly */
.hero-v-sep {
    position: absolute;
    top: 2rem; /* offset from top of hero section */
    bottom: 2rem; /* offset from bottom of hero section */
    width: 2px;
    z-index: 10;
    pointer-events: none;
    clip-path: polygon(50% 0%, 100% 15%, 100% 85%, 50% 100%, 0% 85%, 0% 15%);
    background-size: 100% 200%;
    animation: flowVerticalLine 24s linear infinite;
}

#hero-sep-left {
    left: -1px; /* Align exactly with the left boundary of main group container */
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--page-v-sep-color) 25%, 
        var(--page-v-sep-glow) 50%, 
        var(--page-v-sep-color) 75%, 
        transparent 100%
    );
}

#hero-sep-right {
    right: -1px; /* Align exactly with the right boundary of main group container */
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--page-v-sep-color) 25%, 
        var(--page-v-sep-glow) 50%, 
        var(--page-v-sep-color) 75%, 
        transparent 100%
    );
}

/* Section Content Layout and Vertical Separators for Desktop */
@keyframes flowVerticalLine {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 200%;
    }
}

@media (min-width: 1200px) {
    .container {
        position: relative;
    }

    .container::before,
    .container::after {
        content: '';
        position: absolute;
        top: 1.5rem; /* start from headings */
        bottom: 5.5rem; /* end at section content, before separator */
        width: 2px;
        z-index: 10;
        pointer-events: none;
        background-size: 100% 200%;
        animation: flowVerticalLine 24s linear infinite;
    }

    .container::before {
        left: -1px;
        background: linear-gradient(to bottom, 
            var(--page-v-sep-color) 0%, 
            var(--page-v-sep-glow) 50%, 
            var(--page-v-sep-color) 100%
        );
    }

    .container::after {
        right: -1px;
        background: linear-gradient(to bottom, 
            var(--page-v-sep-color) 0%, 
            var(--page-v-sep-glow) 50%, 
            var(--page-v-sep-color) 100%
        );
    }
}

.bg-canvas-inline {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.95;
    pointer-events: none;
}

.ai-terminal-inline {
    width: fit-content;
    max-width: 100%;
    height: fit-content;
    max-height: 100%;
    background: rgba(15, 23, 42, 0.7); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    color: #38bdf8;
    font-size: 0.65rem;
    line-height: 1.35;
    padding: 12px 16px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5), 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    opacity: 0;
}

/* Show background only when terminal has content */
.ai-terminal-inline:not(:empty) {
    opacity: 1;
}

@media (max-width: 1550px) {
    /* Hide side columns (visual assets) on screens below 1550px to prevent horizontal scrollbars */
    .hero-column-side {
        display: none !important;
    }
    .hero {
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    /* Hide separators below 1200px (matching page separator visibility threshold) */
    .hero-v-sep {
        display: none !important;
    }
}

.hero-text-group {
    flex: none; /* Keep content tight */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Left-align name, emails, and role */
    text-align: left; /* Left-align text content */
    white-space: nowrap;
    pointer-events: auto;
    margin-left: 1.5rem; /* Standard gap between photo and name details */
}

.hero-img-wrap {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 0; /* Standard position */
    flex-shrink: 0;
    border-radius: 50%;
    padding: 0; 
    z-index: 10;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.hero-img-wrap:hover {
    transform: scale(1.08);
}

.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.6rem; /* Slightly more padding */
    width: 360px; /* Increased width from 320px */
    margin: 0;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: left;
    animation: float 4s ease-in-out infinite;
    pointer-events: auto;
}

.ai-terminal::before {
    display: none;
}

.hero-bridge-section {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
    animation-delay: 2s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}



.interaction-2d.show {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
}

.i2d-title {
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    border-bottom: 2px solid #ddd;
    width: 100%;
    text-align: center;
    padding-bottom: 5px;
}

.i2d-content {
    font-size: 0.85rem;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.i2d-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 8px;
    border-radius: 6px;
    font-weight: bold;
}

.i2d-link {
    color: #94a3b8;
    font-size: 1.2rem;
}

@keyframes pulse-shadow {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 161, 29, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 161, 29, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 161, 29, 0);
    }
}

.hero-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--accent); /* Single bold accent border */
    object-fit: cover;
    background-color: var(--white);
    animation: pulse-shadow 2s infinite; /* Continuous pulse */
    transition: all 0.4s ease;
    flex-shrink: 0;
    margin: 0;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.hero-img-wrap:hover .hero-img {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.7);
    border-width: 5px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.9rem, 4.5vw, 3.2rem);
    margin-bottom: 0.2rem;
    line-height: 1.1;
}

.hero-name-span {
    display: inline-block; /* Required for transform scale */
    transition: var(--transition);
    cursor: default;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.hero-name-span:hover {
    color: var(--accent);
    transform: scale(1.05);
    text-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
    /* Stronger glow matching the accent color */
}

.hero-info-combined {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.info-sep {
    color: var(--accent);
    opacity: 0.5;
    font-weight: 300;
}

@media (max-width: 900px) {
    .info-sep {
        display: none;
    }
    .hero-info-combined {
        flex-direction: column;
        gap: 8px;
    }
}

.hero-contact {
    margin-top: 0; /* reset for combined block */
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.95);
}

.hero-contact i {
    color: var(--accent);
    margin-right: 5px;
}

/* Travels on the compositor instead of animating `left`, which relaid out the
   element every frame. The element is 50% of its parent's width, so the
   original -120%..120% parent-relative sweep is 480% element-relative. */
@keyframes sweep {
    0% {
        transform: translateX(0) skewX(-20deg);
    }

    23% {
        transform: translateX(480%) skewX(-20deg);
    }

    100% {
        transform: translateX(480%) skewX(-20deg);
    }
}

.hero-seeking-line {
    margin: 0;
    font-size: 0.95rem;
    font-style: italic;
    color: #f1f5f9;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4em;
    white-space: nowrap;
    width: auto;
    position: relative;
    overflow: hidden;
}

.hero-seeking-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: sweep 13s infinite;
    pointer-events: none;
}

.hero-seeking-line>* {
    position: relative;
    z-index: 1;
}

.hsl-ap {
    color: #d8b4fe;
    font-weight: 700;
    font-style: normal;
    text-decoration: none;
    border-bottom: 1px dashed rgba(216, 180, 254, 0.45);
    transition: color 0.2s, border-color 0.2s;
}

.hsl-tcp {
    color: var(--accent);
    font-weight: 700;
    font-style: normal;
    text-decoration: none;
    border-bottom: 1px dashed rgba(245, 158, 11, 0.5);
    transition: color 0.2s, border-color 0.2s;
}

.hsl-ap:hover {
    color: #f3e8ff;
    border-color: #f3e8ff;
}

.hsl-tcp:hover {
    color: #fcd34d;
    border-color: #fcd34d;
}

.email-click {
    color: inherit;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.hero-contact .email-click {
    border-bottom-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
}

.email-click::before {
    content: 'Click to copy';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(0, 0, 0, 0.85);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    z-index: 10;
}

.email-click:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.email-click:hover {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

.hero-link-hover {
    color: var(--white) !important;
    text-decoration: none !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
    transition: 0.3s;
    cursor: pointer;
}

.hero-link-hover:hover {
    color: var(--accent) !important;
    border-bottom-color: var(--accent) !important;
    text-decoration: none !important;
}

.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.1rem;
    width: 260px;
    margin: 1.5rem auto 0 auto; /* Centred with top margin */
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: left;
    animation: float 4s ease-in-out infinite;
    pointer-events: auto;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-4px);
    }

    100% {
        transform: translateY(0px);
    }
}

.stat-row-link,
.stat-row-container {
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, background 0.2s;
    border-radius: 4px;
}

.stat-row-link:last-of-type {
    border-bottom: none;
}

.stat-row-link:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-row-link:hover .stat-value {
    color: var(--white);
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 5px;
    font-size: 0.95rem;
}

.stat-label {
    font-weight: 400;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-value {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
    transition: color 0.2s;
}

.stat-toggle {
    padding: 0 10px;
    cursor: pointer;
    color: #ff3131; /* Vibrant red for high visibility */
    transition: all 0.3s ease;
    margin: 0 auto;
    filter: drop-shadow(0 0 2px rgba(255, 49, 49, 0.3));
}

.stat-toggle:hover {
    color: #ff3131;
    transform: scale(1.25);
    filter: drop-shadow(0 0 8px rgba(255, 49, 49, 0.6));
}

.pub-breakdown {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0 12px;
    opacity: 0;
}

.pub-breakdown.open {
    margin-top: 10px;
    max-height: 600px;
    padding: 10px 12px;
    opacity: 1;
}

.stat-group {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    padding-bottom: 5px;
}

.stat-group-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-sub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 0.9rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.2s;
}

.stat-sub-item:last-child {
    border-bottom: none;
}

.stat-sub-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
}

.stat-sub-item:hover .pub-badge {
    color: var(--accent);
}

.pub-badge {
    color: var(--accent);
    font-weight: bold;
    transition: 0.2s;
}

.cv-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.cv-btn-half {
    flex: 1;
    padding: 9px 12px;
    background: var(--accent);
    color: var(--primary-dark);
    text-align: center;
    font-weight: 700;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.cv-btn-half:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(220, 161, 29, 0.4);
}

.stat-row-link.active-box {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 10px 0;
    padding-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

/* --- Apple-Style 5-Bento Box Grid (3 columns) */

/* Key Scientific Contributions layout:
   - mobile: single stacked column
   - large screens: row 1 = two cards (60 / 40), row 2 = three equal cards */
.bento-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
/* 5 contribution cards stacked one-per-row (lives in the narrow left column) */

.bento-card {
    border-radius: 18px;
    padding: 1.15rem 1.4rem;
    min-height: 138px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--card-border);
    text-align: left;
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Premium 3D Inner Light Overlay */
.bento-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 35%);
    pointer-events: none;
    z-index: 1;
    border-radius: 20px;
}

/* Breathing Background Watermark Icon */
@keyframes watermarkBreathe {

    0%,
    100% {
        transform: rotate(-15deg) scale(1);
        opacity: 0.06;
    }

    50% {
        transform: rotate(-12deg) scale(1.05);
        opacity: 0.12;
    }
}

.bento-card::before {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 8.5rem;
    z-index: 0;
    transition: all 0.5s ease;
    transform: rotate(-15deg);
    opacity: 0.06;
    pointer-events: none;
    animation: watermarkBreathe 6s ease-in-out infinite;
}

.bento-card:hover::before {
    animation: none;
    transform: rotate(0deg) scale(1.2) translate(-10px, -10px);
    opacity: 0.15;
}

/* Content above watermark */
.bento-header,
.bento-title,
.bento-desc,
.bento-tags {
    position: relative;
    z-index: 2;
}

/* Header row: title in middle, icon on left */
.bento-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
    position: relative;
    min-height: 34px;
}

.bento-header-text {
    flex: 1;
    text-align: center;
    min-width: 0;
    padding: 0 54px; /* Leaves room for the 44px absolute icon + margin on BOTH sides to keep text perfectly centered */
}

/* Compact icon badge positioned on the left */
.bento-icon-wrapper {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.bento-card:hover .bento-icon-wrapper {
    transform: translateY(-50%) scale(1.15) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.bento-icon {
    font-size: 1.4rem;
    margin: 0;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.bento-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.bento-desc {
    font-size: 0.87rem;
    line-height: 1.45;
    flex-grow: 1;
    margin-bottom: 0.6rem;
    /* Raised from 0.85 opacity for WCAG AA on the brighter gradient stops */
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.bento-tag {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    transition: var(--transition);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

/* --- Bento Card Variations */
.bento-card {
    background: var(--bento-bg);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.bento-card::before { content: var(--bento-icon-code); color: var(--white); }
.bento-card .bento-icon-wrapper { background: var(--bento-icon-bg); border: 1px solid var(--bento-icon-border); }
.bento-card .bento-icon { color: var(--bento-accent); }
.bento-card .bento-tag { background: var(--bento-tag-bg); color: var(--bento-tag-text); border: 1px solid var(--bento-tag-border); }
.bento-card:hover .bento-tag { background: var(--bento-accent); color: var(--bento-hover-text); border-color: var(--bento-accent); }

.bento-h1 {
    --bento-bg: linear-gradient(135deg, #6d1239 0%, #be185d 100%);
    --bento-icon-code: '\f604';
    --bento-accent: #fbcfe8;
    --bento-icon-bg: rgba(244, 114, 182, 0.25);
    --bento-icon-border: rgba(244, 114, 182, 0.45);
    --bento-tag-bg: rgba(244, 114, 182, 0.15);
    --bento-tag-text: #fdf2f8;
    --bento-tag-border: rgba(244, 114, 182, 0.35);
    --bento-hover-text: #4c0519;
}

/* Clinical & Translational Informatics — medical blue */
.bento-h2 {
    --bento-bg: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    --bento-icon-code: '\f812';
    --bento-accent: #93c5fd;
    --bento-icon-bg: rgba(96, 165, 250, 0.2);
    --bento-icon-border: rgba(96, 165, 250, 0.4);
    --bento-tag-bg: rgba(96, 165, 250, 0.14);
    --bento-tag-text: #dbeafe;
    --bento-tag-border: rgba(96, 165, 250, 0.3);
    --bento-hover-text: #1e3a8a;
}

/* Computational Genomics — violet / data */
.bento-v2 {
    --bento-bg: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%);
    --bento-icon-code: '\f471';
    --bento-accent: #c4b5fd;
    --bento-icon-bg: rgba(167, 139, 250, 0.2);
    --bento-icon-border: rgba(167, 139, 250, 0.4);
    --bento-tag-bg: rgba(167, 139, 250, 0.14);
    --bento-tag-text: #ede9fe;
    --bento-tag-border: rgba(167, 139, 250, 0.3);
    --bento-hover-text: #4c1d95;
}

/* Pathogen Informatics & AMR — crimson / danger */
.bento-h3 {
    --bento-bg: linear-gradient(135deg, #6b1717 0%, #b91c1c 100%);
    --bento-icon-code: '\e059';
    --bento-accent: #fca5a5;
    --bento-icon-bg: rgba(248, 113, 113, 0.2);
    --bento-icon-border: rgba(248, 113, 113, 0.4);
    --bento-tag-bg: rgba(248, 113, 113, 0.14);
    --bento-tag-text: #fee2e2;
    --bento-tag-border: rgba(248, 113, 113, 0.3);
    --bento-hover-text: #7f1d1d;
}

/* PFAS Biodegradation — environmental green */
.bento-v3 {
    --bento-bg: linear-gradient(135deg, #123f24 0%, #15803d 100%);
    --bento-icon-code: '\f06c';
    --bento-accent: #86efac;
    --bento-icon-bg: rgba(74, 222, 128, 0.2);
    --bento-icon-border: rgba(74, 222, 128, 0.4);
    --bento-tag-bg: rgba(74, 222, 128, 0.14);
    --bento-tag-text: #dcfce7;
    --bento-tag-border: rgba(74, 222, 128, 0.3);
    --bento-hover-text: #14532d;
}

/* Standard Content Layouts & Typography */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (min-width: 1400px) {
    :root {
        --hero-main-width: 1250px;
    }
    .container,
    .hero-bridge-inner,
    .header-content {
        max-width: 1250px;
    }
}

@media (min-width: 1600px) {
    :root {
        --hero-main-width: 1380px;
    }
    .container,
    .hero-bridge-inner,
    .header-content {
        max-width: 1380px;
    }
    .hero-img-wrap {
        margin: 0 0 0 4.5rem; /* Push picture towards the right side on widescreen only */
    }
    .hero-text-group {
        margin-left: 3.5rem; /* Increase gap between photo and details on widescreen only */
    }
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    border-left: 6px solid var(--accent);
    padding-left: 18px;
    letter-spacing: 0.5px;
}

/* Global h3 — consistent sub-section heading across all sections */
h3:not([class]) {
    font-family: 'Roboto', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sub-heading);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

body.dark-mode h3:not([class]) {
    color: #38bdf8;
}

.about-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: stretch;
}

.about-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.about-right {
    min-width: 0;
}

.profile-text {
    text-align: justify;
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 1.5rem;
    line-height: 1.85;
}

.profile-text p {
    margin-bottom: 1rem;
}

.profile-text p:last-child {
    margin-bottom: 0;
}

.niper-hover {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: rgba(6, 78, 59, 0.5);
    text-underline-offset: 3px;
    transition: color 0.2s ease-in-out, text-decoration-color 0.2s ease-in-out;
    padding: 0 2px;
    font-weight: inherit;
}

.niper-hover:hover {
    color: var(--accent) !important;
    text-decoration-color: var(--accent);
}

.unified-sub-heading {
    margin-top: 0;
    border-left: none;
    padding-left: 0;
    font-size: 1.5rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    position: relative;
    display: inline-block;
    cursor: default;
    margin-bottom: 1.2rem;
}

.ush-primary {
    color: var(--sub-heading);
}

.ush-accent {
    color: var(--accent);
}

.unified-sub-heading::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: currentColor;
    transition: width 0.5s ease;
}

.unified-sub-heading:hover::after {
    width: 100%;
}

@keyframes subtleRun {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.subtle-separator {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(6, 78, 59, 0.1), rgba(6, 78, 59, 0.5), var(--accent), rgba(6, 78, 59, 0.5), rgba(6, 78, 59, 0.1), transparent);
    background-size: 200% 100%;
    animation: subtleRun 4s linear infinite;
    margin: 1.5rem 0;
    border-radius: 2px;
}

/* AI Elements */
@keyframes aiSparkle {

    0%,
    100% {
        filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(245, 158, 11, 1));
        transform: scale(1.2);
        color: #ffd000 !important;
    }
}

.ai-expand-btn {
    background-color: transparent !important;
    color: var(--accent) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    border-radius: 30px !important;
    padding: 8px !important;
    max-width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    gap: 0 !important;
    white-space: nowrap;
    cursor: pointer;
}

.ai-expand-btn .btn-icon {
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-style: normal;
    transition: color 0.3s;
    animation: aiSparkle 4s infinite ease-in-out;
}

.ai-expand-btn:hover .btn-icon,
.ai-expand-btn.processing-gold .btn-icon {
    animation: none;
    filter: none;
}

.ai-expand-btn .btn-text {
    opacity: 0;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
    display: inline-block;
    width: 0;
    font-weight: 700;
    font-size: 0.9rem;
}

.ai-expand-btn:hover,
.ai-expand-btn.processing-gold {
    max-width: 250px;
    padding: 8px 18px !important;
    background-color: var(--accent) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 10px rgba(220, 161, 29, 0.3) !important;
}

.ai-expand-btn:hover .btn-icon,
.ai-expand-btn.processing-gold .btn-icon {
    color: var(--white) !important;
    animation: none;
    filter: none;
}

.ai-expand-btn:hover .btn-text,
.ai-expand-btn.processing-gold .btn-text {
    opacity: 1;
    margin-left: 8px;
    width: auto;
}

/* Hover/press reveal for every AI expand button (all screens) is defined once
   in the unified "AI buttons — leftward label reveal" block at the end of this
   file. */

/* Dynamic Grid & Profile Cards */
.edu-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-right: 40px;
    margin-right: 5px;
    padding-left: 0;
    margin-left: 0;
}

.edu-grid::before {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 15px;
    right: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent) 90%, rgba(220, 161, 29, 0.1) 100%);
    border-radius: 2px;
}

.edu-grid .edu-card {
    position: relative;
    padding: 1rem 1rem 1rem 2.2rem;
    box-shadow: var(--shadow-sm);
}

.edu-grid .edu-card::before {
    content: '';
    position: absolute;
    right: -39.5px;
    top: 50%;
    transform: translate(50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--white);
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition);
}

.edu-grid .edu-card:hover::before {
    transform: translate(50%, -50%) scale(1.3);
}

.exp-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-right: 40px;
    margin-right: 5px;
}

.exp-grid-vertical::before {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 15px;
    right: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent) 90%, rgba(220, 161, 29, 0.1) 100%);
    border-radius: 2px;
}

.exp-grid-vertical .exp-box {
    position: relative;
    padding: 1rem 1rem 1rem 2.2rem;
    box-shadow: var(--shadow-sm);
}

.exp-grid-vertical .exp-box::before {
    content: '';
    position: absolute;
    right: -39.5px;
    top: 50%;
    transform: translate(50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--white);
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition);
}

.exp-grid-vertical .exp-box:hover::before {
    transform: translate(50%, -50%) scale(1.3);
}

.exp-grid-vertical .exp-box::after,
.edu-grid .edu-card::after,
.referee-grid .referee-card::after {
    right: auto !important;
    left: 0 !important;
    transform: translate(-50%, -50%) !important;
}

.exp-grid-vertical .exp-box:hover::after,
.edu-grid .edu-card:hover::after,
.referee-grid .referee-card:hover::after {
    transform: translate(-50%, -50%) scale(1.15) !important;
}

.exp-grid-vertical .exp-full:hover::before {
    background: var(--exp-full);
    border-color: var(--exp-full);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.exp-grid-vertical .exp-part:hover::before {
    background: var(--exp-part);
    border-color: var(--exp-part);
    box-shadow: 0 0 10px rgba(111, 66, 193, 0.5);
}

.exp-grid-vertical .exp-trainee:hover::before {
    background: var(--exp-trainee);
    border-color: var(--exp-trainee);
    box-shadow: 0 0 10px rgba(111, 66, 193, 0.5);
}

.edu-grid .edu-phd:hover::before {
    background: var(--edu-phd);
    border-color: var(--edu-phd);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

.edu-grid .edu-msc:hover::before {
    background: var(--edu-msc);
    border-color: var(--edu-msc);
    box-shadow: 0 0 10px rgba(23, 162, 184, 0.5);
}

.edu-grid .edu-bsc:hover::before {
    background: var(--edu-bsc);
    border-color: var(--edu-bsc);
    box-shadow: 0 0 10px rgba(232, 62, 140, 0.5);
}

.referee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.edu-card,
.exp-box,
.referee-card {
    background: var(--card-bg);
    padding: 1.2rem 1rem 1.2rem 2.2rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    border-top: 6px solid var(--variant-color, #ccc);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.edu-card:hover,
.exp-box:hover,
.referee-card:hover {
    transform: translateY(-5px);
    border-color: var(--variant-color);
    box-shadow: var(--shadow-md);
}

.exp-box::after,
.edu-card::after,
.referee-card::after {
    content: attr(data-badge);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 2px solid var(--variant-color, #ccc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--variant-color, #555);
    z-index: 10;
    transition: var(--transition);
}

.exp-box:hover::after,
.edu-card:hover::after,
.referee-card:hover::after {
    color: var(--white);
    transform: translate(50%, -50%) scale(1.15);
    background: var(--variant-color);
    border-color: var(--variant-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.exp-full { --variant-color: var(--exp-full); }
.exp-part { --variant-color: var(--exp-part); }
.exp-trainee { --variant-color: var(--exp-trainee); }
.edu-phd { --variant-color: var(--edu-phd); }
.edu-msc { --variant-color: var(--edu-msc); }
.edu-bsc { --variant-color: var(--edu-bsc); }
.ref-1 { --variant-color: var(--ref-1); }
.ref-2 { --variant-color: var(--ref-2); }
.ref-3 { --variant-color: var(--ref-3); }
.ref-4 { --variant-color: var(--ref-4); }
.ref-5 { --variant-color: var(--ref-5); }
.ref-6 { --variant-color: var(--ref-6); }

.edu-header,
.ref-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.edu-card h4,
.referee-name {
    font-size: 1.15rem;
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    flex: 1;
    padding-right: 10px;
    transition: color 0.3s ease;
}

.year-span,
.referee-role,
.type-badge {
    color: var(--variant-color, #888);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 4px;
    transition: var(--transition);
    background: transparent;
}

.edu-card:hover .year-span,
.referee-card:hover .referee-role,
.exp-box:hover .type-badge {
    background: var(--variant-color);
    color: var(--white);
}

.type-badge {
    font-size: 0.75rem;
    color: var(--variant-color, #888);
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    align-self: center;
    white-space: nowrap;
    transition: var(--transition);
    background: transparent;
}

.exp-box:hover .type-badge {
    background: var(--variant-color);
    color: var(--white);
}

.inst-link,
.exp-inst {
    font-family: var(--inst-font);
    font-size: 1rem;
    color: var(--primary);
    display: block;
    margin-bottom: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.inst-link:hover,
.exp-inst:hover {
    color: var(--accent);
}

.inst-link i,
.exp-inst i,
.ref-inst-row i {
    margin-right: 6px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    width: 100%;
}

.exp-role {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.exp-full:hover .exp-role {
    color: var(--exp-full);
}

.exp-part:hover .exp-role {
    color: var(--exp-part);
}

.exp-trainee:hover .exp-role {
    color: var(--exp-trainee);
}

.type-badge {
    font-size: 0.75rem;
    color: var(--variant-color, #888);
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    align-self: center;
    white-space: nowrap;
    transition: var(--transition);
    background: transparent;
}

.bg-full {
    border-color: var(--exp-full);
}

.bg-part {
    border-color: var(--exp-part);
}

.bg-trainee {
    border-color: var(--exp-trainee);
}

.exp-date {
    font-size: 0.85rem;
    color: #777;
    font-weight: bold;
    margin-bottom: 8px;
}

.exp-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
}

.badge-gold-inline {
    color: #dca11d;
    margin-left: 6px;
    font-size: 1.25rem;
    filter: drop-shadow(0px 2px 3px rgba(218, 165, 32, 0.5));
    transition: transform 0.3s ease;
    display: inline-block;
    position: relative;
}

.badge-gold-inline:hover {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0px 4px 6px rgba(218, 165, 32, 0.8));
}

/* Specialized Gold Tooltip for PhD Medal */
.badge-gold-inline[data-tip]::after {
    color: #dca11d;
    background: transparent;
    box-shadow: none;
    font-weight: 800;
    padding: 0;
    font-size: 14px;
}

.badge-gold-inline i {
    background: linear-gradient(110deg, #dca11d 30%, var(--white) 50%, #dca11d 70%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: goldShine 3s linear infinite;
}

.referee-card {
    background: var(--card-bg);
    padding: 1.2rem 1rem 1.2rem 2.2rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    border-top: 5px solid var(--ref-color, #ccc);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.referee-card:hover {
    transform: translateY(-5px);
    border-color: var(--ref-color);
    box-shadow: var(--shadow-md);
}

.referee-card::after {
    content: attr(data-badge);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 2px solid var(--ref-color, #ccc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ref-color, #555);
    z-index: 10;
    transition: var(--transition);
}

.referee-card:hover::after {
    color: var(--white);
    transform: translate(50%, -50%) scale(1.15);
    background: var(--ref-color);
    border-color: var(--ref-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ref-1 { --ref-color: var(--ref-1); }
.ref-2 { --ref-color: var(--ref-2); }
.ref-3 { --ref-color: var(--ref-3); }
.ref-4 { --ref-color: var(--ref-4); }
.ref-5 { --ref-color: var(--ref-5); }
.ref-6 { --ref-color: var(--ref-6); }

.ref-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.referee-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.referee-name a {
    color: var(--primary);
    transition: color 0.3s ease;
}

.referee-name a:hover {
    color: var(--accent);
}

.ref-1:hover .referee-name,
.ref-1:hover .referee-name a {
    color: var(--ref-1);
}

.ref-2:hover .referee-name,
.ref-2:hover .referee-name a {
    color: var(--ref-2);
}

.ref-3:hover .referee-name,
.ref-3:hover .referee-name a {
    color: var(--ref-3);
}

.ref-4:hover .referee-name,
.ref-4:hover .referee-name a {
    color: var(--ref-4);
}

.ref-5:hover .referee-name,
.ref-5:hover .referee-name a {
    color: var(--ref-5);
}

.ref-6:hover .referee-name,
.ref-6:hover .referee-name a {
    color: var(--ref-6);
}

.referee-role {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--ref-color, #888);
    padding: 2px 8px;
    border-radius: 4px;
    transition: var(--transition);
    white-space: nowrap;
}

.referee-card:hover .referee-role {
    background: var(--ref-color);
    color: var(--white);
}

.referee-title-line {
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.ref-inst-row,
.ref-inst-row a {
    font-family: var(--inst-font) !important;
    font-size: 1rem !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
    transition: color 0.3s;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-inst-row:hover,
.ref-inst-row a:hover {
    color: var(--accent) !important;
}

.referee-contact {
    font-size: 0.9rem;
    color: #444;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-badge {
    color: var(--accent);
    font-size: 1.1rem;
    transition: var(--transition);
}

.flag-img {
    width: 22px;
    height: auto;
    vertical-align: middle;
    margin-left: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    display: inline-block;
    cursor: pointer;
}

.flag-wrapper {
    display: inline-block;
    position: relative;
    line-height: 1;
}

/* Accolades & IPR */
/* ===== OVERHAULED ACCOLADES & IPR STYLE SYSTEM ===== */

/* Patent Dashboard Grid Layout */
/* Patent Dashboard Grid Layout */
.patent-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .patent-dashboard {
        grid-template-columns: 1fr;
    }
}

/* Patent Card Compact Styles */
.patent-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--card-border);
    border-radius: 14px;
    padding: 1.3rem 1.4rem;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    min-height: 170px;
    overflow: hidden;
}

/* Corner glow accent */
.patent-card::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--patent-glow, transparent) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.patent-card > * { position: relative; z-index: 1; }

/* Different accents for Granted and Pipeline Patent Cards */
.patent-card-granted {
    border-color: rgba(16, 185, 129, 0.28);
    border-left-color: #10B981;
    background: linear-gradient(135deg, color-mix(in srgb, #10B981 7%, var(--card-bg)), var(--card-bg) 62%);
    --patent-glow: rgba(16, 185, 129, 0.18);
}

.patent-card-pipeline {
    border-color: rgba(56, 189, 248, 0.28);
    border-left-color: #38bdf8;
    background: linear-gradient(135deg, color-mix(in srgb, #38bdf8 7%, var(--card-bg)), var(--card-bg) 62%);
    --patent-glow: rgba(56, 189, 248, 0.18);
}

.patent-card-granted:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #10B981;
}

.patent-card-pipeline:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #38bdf8;
}

.patent-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.patent-status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.patent-status-badge.status-granted {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
}

.patent-status-badge.status-granted::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9), transparent);
    transform: skewX(-20deg);
    animation: metallicShimmer 3s infinite linear;
}

.patent-status-badge.status-pipeline {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.patent-territory {
    font-size: 0.72rem;
    color: var(--text);
    opacity: 0.8;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.patent-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.patent-desc {
    font-size: 0.85rem;
    color: var(--text);
    opacity: 0.85;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.patent-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--card-border);
}

.patent-id {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text);
    opacity: 0.65;
}

.patent-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: transparent;
    transition: var(--transition-fast);
}

/* Card Hover Highlights for Patents */
.patent-card-granted .patent-link {
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.4);
}

.patent-card-granted:hover .patent-link {
    color: #ffffff !important;
    background: #10B981 !important;
    border-color: #10B981 !important;
    text-decoration: none !important;
}

.patent-card-granted .patent-link:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

.patent-applications-count {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    background: transparent;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.patent-card-pipeline:hover .patent-applications-count {
    background: #38bdf8 !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
}

.patent-card-pipeline:hover .patent-applications-count span {
    color: #ffffff !important;
}

body.dark-mode .patent-card {
    background-color: var(--white);
    color: var(--text);
    border-color: var(--card-border);
}

/* ======================================= */
/* Overhauled Awards Grid & Bento Cards */
/* ======================================= */
/* Connected Grid Timeline for Awards */
/* Connected Grid Timeline for Awards */
/* ===== Awards (redesigned: clean chronological cards) ===== */
.award-box-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    position: relative;
    padding-left: 0;
}

/* Use the extra width on large viewports without cramming */
@media (min-width: 1250px) {
    .award-box-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem 1rem;
    }
}

.award-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--award-color);
    border-radius: 12px;
    padding: 0.95rem 1.1rem;
    position: relative;
    transition: var(--transition);
    display: grid;
    grid-template-columns: 42px 1fr;
    column-gap: 14px;
    row-gap: 7px;
    align-items: start;
    text-align: left;
    box-shadow: var(--shadow-sm);
    overflow: visible;
}

/* Bento grid wide layout for highlights */
@media (min-width: 900px) {
    .award-card.bento-wide {
        grid-column: span 2;
    }
}

.award-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--award-color) !important;
}

.award-icon-box {
    grid-column: 1;
    grid-row: 1;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(var(--award-color-rgb, 108, 117, 125), 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.award-card:hover .award-icon-box {
    background: var(--award-color);
    box-shadow: 0 0 15px rgba(var(--award-color-rgb, 108, 117, 125), 0.4);
}

.award-badge-icon {
    font-size: 1.15rem;
    color: var(--award-color);
    transition: var(--transition);
}

.award-card:hover .award-badge-icon {
    color: var(--white);
    transform: scale(1.15) rotate(12deg);
}

/* Absolute Year Tag */
.award-year-tag {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    align-self: start;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(var(--award-color-rgb, 108, 117, 125), 0.08);
    border: 1px solid rgba(var(--award-color-rgb, 108, 117, 125), 0.25);
    color: var(--award-color);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.award-card:hover .award-year-tag {
    background: var(--award-color);
    color: var(--white);
    border-color: var(--award-color);
}

.award-content-wrapper {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    width: 100%;
    min-width: 0;
}

.award-top {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 3px;
    line-height: 1.3;
}

.award-bottom {
    font-size: 0.8rem;
    color: var(--text);
    opacity: 0.82;
    line-height: 1.4;
}

/* Unified scholarly palette: deep green default, amber for flagship (gold) tier */
.award-card { --award-color: #0d5c46; --award-color-rgb: 13, 92, 70; }
.award-card.award-tier-gold { --award-color: #b45309; --award-color-rgb: 180, 83, 9; }

.patent-link {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.4s ease;
}

.patent-link:hover {
    color: var(--accent) !important;
}

@media (min-width: 900px) {
    .grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .patent-box {
        margin-bottom: 0;
    }
}

/* Bold & Morphing Accordion Framework */
.accordion-btn {
    width: 100%;
    padding: 1.2rem 1.5rem;
    text-align: left;
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.accordion-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.05) 0%, rgba(245, 158, 11, 0.08) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.accordion-btn:hover {
    transform: scale(1.01) translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.15);
}

.accordion-btn:hover::before {
    opacity: 1;
}

.accordion-btn.active {
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: scale(1) translateY(0);
    box-shadow: 0 10px 20px rgba(6, 78, 59, 0.25);
}

.accordion-btn.active::before {
    opacity: 0;
}

/* Morphing Icon Treatments */
.accordion-btn span {
    display: flex;
    align-items: center;
    z-index: 1;
}

.accordion-btn .acc-badge-icon {
    background: #f1f5f9;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 15px !important;
    transition: var(--transition);
    color: var(--primary) !important;
    font-size: 1.2rem;
}

.accordion-btn:hover .acc-badge-icon {
    background: var(--accent);
    color: var(--white) !important;
    border-radius: 50%;
    transform: rotate(-10deg) scale(1.1);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.accordion-btn.active .acc-badge-icon {
    background: transparent;
    color: var(--accent) !important;
    border-radius: 50%;
    transform: rotate(0) scale(1.2);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.accordion-btn i.fa-chevron-down {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #64748b;
    background: transparent;
    border: 1px solid #e2e8f0;
    margin: 0;
}

.accordion-btn:hover i.fa-chevron-down {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.accordion-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-color: transparent;
}

/* Seamless Panel Integration */
.panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    background: var(--white);
    border: 2px solid transparent;
    border-top: none;
    margin-bottom: 15px;
    border-radius: 0 0 16px 16px;
    opacity: 0;
    box-shadow: none;
}

.accordion-btn.active+.panel {
    opacity: 1;
    border-color: #e2e8f0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-left: 2px solid #e2e8f0;
    border-right: 2px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
}

.panel-content {
    padding: 20px 20px 20px 20px;
}

.panel-content a:not(.pub-doi):not(.btn-send):not(.btn-data):not(.btn-cite):hover {
    color: var(--accent) !important;
    text-decoration: none;
}

/* FIX: Accordion Slide-in Animation (Uses 'backwards' to unlock smooth hovers) */
/* Accordion panel slide-in delays — 5 card types share these delays (already maximally consolidated) */
@keyframes slideInLeftAnim {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.accordion-btn.active+.panel .pub-item,
.accordion-btn.active+.panel .tech-card,
.accordion-btn.active+.panel .culture-card,
.accordion-btn.active+.panel .tcp-time-node,
.accordion-btn.active+.panel .tcp-focus-card {
    opacity: 1;
    animation: slideInLeftAnim 0.5s ease-out backwards;
}

.accordion-btn.active+.panel .pub-item:nth-child(1),
.accordion-btn.active+.panel .tech-card:nth-child(1),
.accordion-btn.active+.panel .culture-card:nth-child(1),
.accordion-btn.active+.panel .tcp-time-node:nth-child(1),
.accordion-btn.active+.panel .tcp-focus-card:nth-child(1) {
    animation-delay: 0.05s;
}

.accordion-btn.active+.panel .pub-item:nth-child(2),
.accordion-btn.active+.panel .tech-card:nth-child(2),
.accordion-btn.active+.panel .culture-card:nth-child(2),
.accordion-btn.active+.panel .tcp-time-node:nth-child(2),
.accordion-btn.active+.panel .tcp-focus-card:nth-child(2) {
    animation-delay: 0.15s;
}

.accordion-btn.active+.panel .pub-item:nth-child(3),
.accordion-btn.active+.panel .tech-card:nth-child(3),
.accordion-btn.active+.panel .culture-card:nth-child(3),
.accordion-btn.active+.panel .tcp-time-node:nth-child(3),
.accordion-btn.active+.panel .tcp-focus-card:nth-child(3) {
    animation-delay: 0.25s;
}

.accordion-btn.active+.panel .pub-item:nth-child(4),
.accordion-btn.active+.panel .tech-card:nth-child(4),
.accordion-btn.active+.panel .culture-card:nth-child(4) {
    animation-delay: 0.35s;
}

.accordion-btn.active+.panel .pub-item:nth-child(n+5),
.accordion-btn.active+.panel .tech-card:nth-child(n+5) {
    animation-delay: 0.45s;
}

.accordion-btn.active+.panel .course-card {
    opacity: 1;
    animation: cascadeUp 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.accordion-btn.active+.panel .course-card:nth-child(1) {
    animation-delay: 0.05s;
}

.accordion-btn.active+.panel .course-card:nth-child(2) {
    animation-delay: 0.18s;
}

.accordion-btn.active+.panel .course-card:nth-child(3) {
    animation-delay: 0.31s;
}

.accordion-btn.active+.panel .course-card:nth-child(4) {
    animation-delay: 0.44s;
}

.accordion-btn.active+.panel .course-card:nth-child(5) {
    animation-delay: 0.57s;
}

.accordion-btn.active+.panel .course-card:nth-child(6) {
    animation-delay: 0.70s;
}

.accordion-btn.active+.panel .strategy-card-item {
    opacity: 1;
    animation: cascadeUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.accordion-btn.active+.panel .strategy-card-item:nth-child(1) {
    animation-delay: 0.05s;
}

.accordion-btn.active+.panel .strategy-card-item:nth-child(2) {
    animation-delay: 0.18s;
}

.accordion-btn.active+.panel .strategy-card-item:nth-child(3) {
    animation-delay: 0.31s;
}

.scrollable-list {
    max-height: 450px;
    overflow-y: auto;
    padding: 10px 20px 10px 10px;
    -webkit-overflow-scrolling: touch;
}

.pub-list {
    padding-left: 30px;
}

.pub-list li::marker {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

.pub-item {
    margin-bottom: 1rem;
    padding: 12px;
    border-bottom: 1px dashed #eee;
    border: 1px solid transparent;
    border-bottom-color: #eee;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.pub-item:hover {
    transform: translateY(-3px);
    background: var(--white);
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-bottom-color: var(--accent);
    z-index: 10;
    position: relative;
}

.pub-doi,
.btn-data {
    font-size: 0.75rem;
    color: var(--white) !important;
    padding: 3px 8px;
    border-radius: 6px;
    margin-left: 8px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.pub-doi {
    background-color: var(--accent);
}

.pub-doi::after {
    content: '\f35d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: 6px;
}

.btn-data {
    background-color: var(--primary);
}

.pub-doi:hover,
.btn-data:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-data i {
    font-size: 0.7rem;
}

.event-meta {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: 500;
    border-left: 3px solid var(--accent);
    padding-left: 8px;
    margin-left: 2px;
}

/* Reviewer Badges & Tech Grids */
.peer-review-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 10px;
}

.pr-badge-item {
    background-color: var(--white);
    border: 1px solid #eee;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    transition: all 0.2s ease;
    cursor: default;
}

.pr-badge-item:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.verified-badge {
    background-color: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    vertical-align: middle;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.scrollable-grid {
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 5px;
    -webkit-overflow-scrolling: touch;
}

.tech-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0.5rem;
}

.tech-card {
    --tc-accent: #9ca3af;
    background: linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
    padding: 1.35rem 1.2rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--tc-accent);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tech-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.05), transparent 46%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tech-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
    border-color: var(--tc-accent);
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card:hover .tech-sub-title {
    color: var(--tc-accent);
    transition: color 0.3s ease;
}

.tech-card:hover .tech-sub-title i {
    color: var(--tc-accent);
    transition: color 0.3s ease;
}

.tech-card:hover .tech-ul li::before {
    color: var(--tc-accent);
    transition: color 0.3s ease;
}

/* An actual blue. This used to be var(--primary), the brand's dark green, which
   left the first two cards in every group reading as two shades of green. */
.tc-blue {
    --tc-accent: #2563eb;
}

.tc-green {
    --tc-accent: #20c997;
}

.tc-purple {
    --tc-accent: var(--exp-part);
}

.tc-orange {
    --tc-accent: #fd7e14;
}

.tech-sub-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.tech-sub-title i {
    color: var(--accent);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.tech-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.tech-ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--accent);
    font-size: 0.7rem;
    transition: color 0.3s ease;
}

/* Premium TCP Group UI (Timeline & Focus Cards) */
.tcp-timeline {
    position: relative;
    padding-left: 45px;
    margin: 30px 0 10px 0;
}

.tcp-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
    border-radius: 4px;
    opacity: 0.8;
}

.tcp-time-node {
    position: relative;
    margin-bottom: 40px;
    padding: 35px;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    z-index: 1;
}

.tcp-time-node:last-child {
    margin-bottom: 0;
}

.tcp-time-node::before {
    content: '';
    position: absolute;
    left: -42px;
    top: 32px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--accent);
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.15);
    transition: all 0.4s ease;
    z-index: 2;
}

.tcp-time-node::after {
    content: '';
    position: absolute;
    left: -30px;
    top: 43px;
    width: 30px;
    height: 2px;
    background: rgba(245, 158, 11, 0.4);
    z-index: 1;
    transition: all 0.4s ease;
}

.tcp-time-node:hover {
    transform: translateX(8px) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.tcp-time-node:hover::before {
    background: var(--accent);
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.tcp-time-node:hover::after {
    background: var(--accent);
    width: 40px;
    left: -40px;
}

.tcp-year {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.35rem;
    margin-bottom: 15px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.tcp-time-node:hover .tcp-year {
    color: var(--accent);
}

.tcp-desc {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
    text-align: justify;
    margin: 0;
}

.tcp-focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 10px 5px;
}

.tcp-focus-card {
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tcp-focus-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(var(--white) 0 0) content-box, linear-gradient(var(--white) 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: all 0.5s ease;
    pointer-events: none;
}

.tcp-focus-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    z-index: -1;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.98;
}

.tcp-focus-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(6, 78, 59, 0.15);
    border-color: transparent;
}

.tcp-focus-card:hover::before {
    background: linear-gradient(135deg, var(--accent) 0%, #fcd34d 100%);
}

.tcp-focus-card:hover::after {
    transform: translateY(-4px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.tcp-focus-card:hover .tfc-icon {
    color: var(--white);
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.4));
    margin-bottom: 25px;
}

.tcp-focus-card:hover .tfc-title {
    color: var(--white);
}

.tcp-focus-card:hover .tfc-desc {
    color: rgba(255, 255, 255, 0.9);
}

.tfc-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 90px;
    height: 90px;
    border-radius: 20px;
    background: rgba(6, 78, 59, 0.05);
}

.tcp-focus-card:hover .tfc-icon {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.tfc-title {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.45rem;
    margin-bottom: 15px;
    transition: color 0.4s ease;
}

.tfc-desc {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    transition: color 0.4s ease;
    text-align: justify;
    margin: 0;
}

.culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 15px;
}

.culture-card {
    background: var(--white);
    padding: 2.2rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--accent);
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.culture-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.culture-card h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s;
}

.culture-card:hover h4 {
    color: var(--accent);
}

.culture-card p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

/* Contact Platform & Forms */
.contact-footer-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1.25rem 0 0.5rem;
    margin-top: 1rem;
}

.contact-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 0;
}

.contact-left h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
    color: var(--white);
}

.contact-left p {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.contact-item i {
    color: var(--accent);
    margin-right: 15px;
    font-size: 1.2rem;
    width: 20px;
}

.contact-item a:hover {
    color: var(--white);
}

.contact-left {
    position: relative;
    padding-left: 15px;
    padding-bottom: 12px;
    align-self: start;
}

/* ===== UNIFIED ANIMATED SVG CONTACT ARROW ===== */
.contact-arrow-wrapper {
    position: absolute;
    top: 0;
    left: -15px;
    width: calc(100% + 15px);
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.contact-arrow-line-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.contact-arrow-line-svg .arrow-line {
    stroke: var(--accent);
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    fill: none;
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 0.9s ease-in-out;
}

.contact-arrow-head-svg {
    position: absolute;
    bottom: calc(1% - 6px);
    right: -6px;
    width: 12px;
    height: 12px;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.contact-arrow-head-svg path {
    stroke: var(--accent);
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Hover transitions on desktop / container level hover */
.contact-left:hover .contact-arrow-line-svg .arrow-line {
    stroke-dashoffset: 0;
}

.contact-left:hover .contact-arrow-head-svg {
    opacity: 1;
    transition: opacity 0.2s ease-out 0.8s; /* fade in when the line finishes drawing */
}

.link-anim-slow {
    position: relative;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: color 0.3s ease;
}

.link-anim-slow:hover {
    color: var(--accent) !important;
}

.link-anim-slow::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.6s ease;
}

.link-anim-slow:hover::after {
    width: 100%;
}

.footer-copyright {
    display: inline-block;
    position: relative;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 5px;
    cursor: pointer;
    transition: color 0.3s;
}

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

.footer-copyright::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.footer-copyright:hover::after {
    width: 100%;
}

.footer-bottom-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin-top: 15px;
    width: 100%;
}

.cf-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cf-input,
.cf-textarea {
    width: 100%;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.cf-input {
    padding: 10px 14px;
    height: 42px;
}

.cf-input:focus,
.cf-textarea:focus {
    border-color: var(--accent);
    outline: none !important;
}

.cf-textarea {
    padding: 12px 14px;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 1rem;
}

.cf-input::placeholder,
.cf-textarea::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 300;
}

.cf-btn {
    background-color: #b8860b;
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: auto;
}

.cf-btn:hover {
    background-color: var(--accent);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-socials {
    display: inline-flex;
    gap: 15px;
    justify-content: flex-start;
    margin-bottom: 5px;
    margin-top: 5px;
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.4s ease;
    margin-left: -15px;
}

.footer-socials:has(.f-soc-link:hover) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.f-soc-link {
    color: #94a3b8;
    font-size: 1.3rem;
    transition: var(--transition);
    position: relative; /* For tooltip */
}

.f-soc-link::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(0, 0, 0, 0.9);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 10;
}

.f-soc-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

.f-soc-link:hover {
    color: var(--accent);
    transform: translateY(-3px) scale(1.1);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.msg-success-box {
    position: relative;
    padding: 10px 15px;
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--exp-full);
    border-radius: 4px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    display: none;
    margin-left: 10px;
}

.msg-success-box span {
    position: absolute;
    background-color: var(--exp-full);
    display: block;
}

.msg-success-box span:nth-child(1) {
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
}

.msg-success-box span:nth-child(2) {
    top: 0;
    right: 0;
    width: 2px;
    height: 0%;
}

.msg-success-box span:nth-child(3) {
    bottom: 0;
    right: 0;
    width: 0%;
    height: 2px;
}

.msg-success-box span:nth-child(4) {
    bottom: 0;
    left: 0;
    width: 2px;
    height: 0%;
}

@keyframes runWidth {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

@keyframes runHeight {
    from {
        height: 0%;
    }

    to {
        height: 100%;
    }
}

@keyframes reverseWidth {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@keyframes reverseHeight {
    from {
        height: 100%;
    }

    to {
        height: 100%;
    }
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(-4px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    }
}

@keyframes fadeOutMsg {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        display: none;
    }
}

.msg-success-box.anim-start {
    display: block;
    animation: fadeInMsg 0.5s forwards;
}

.msg-success-box.anim-running span:nth-child(1) {
    animation: runWidth 0.3s linear forwards;
}

.msg-success-box.anim-running span:nth-child(2) {
    animation: runHeight 0.3s linear 0.3s forwards;
}

.msg-success-box.anim-running span:nth-child(3) {
    animation: runWidth 0.3s linear 0.6s forwards;
}

.msg-success-box.anim-running span:nth-child(4) {
    animation: runHeight 0.3s linear 0.9s forwards;
}

.msg-success-box.anim-reverse span:nth-child(1) {
    animation: reverseWidth 0.3s linear 0.9s forwards;
}

.msg-success-box.anim-reverse span:nth-child(2) {
    animation: reverseHeight 0.3s linear 0.6s forwards;
}

.msg-success-box.anim-reverse span:nth-child(3) {
    animation: reverseWidth 0.3s linear 0.3s forwards;
}

.msg-success-box.anim-reverse span:nth-child(4) {
    animation: reverseHeight 0.3s linear forwards;
}

.msg-success-box.anim-end {
    animation: fadeOutMsg 0.5s forwards;
}

.copy-feedback {
    position: absolute;
    background: var(--primary);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    top: -34px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(6, 78, 59, 0.35);
}

.copy-feedback::before {
    content: '✓ ';
}

.copy-feedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Artificial Intelligence Chat Module */
#ai-widget-toggle {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 56px;
    height: 56px;
    padding: 0;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    z-index: 10002;
    transition: var(--transition);
    border: 2px solid var(--accent);
}

.ai-widget-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

#ai-widget-toggle:hover {
    transform: scale(1.1);
    background-color: var(--accent);
}

#ai-chat-window {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 350px;
    height: 500px;
    max-height: 80vh;
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10002;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ddd;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(-4px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    }
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--accent);
}

.chat-header-id {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.chat-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

.chat-header-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.chat-title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.chat-status {
    font-size: 0.72rem;
    opacity: 0.85;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    animation: chatPulse 2s infinite;
    flex-shrink: 0;
}

@keyframes chatPulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.chat-close {
    background: none;
    border: none;
    color: inherit;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.chat-close:hover { opacity: 1; }

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f9f9f9;
}

.chat-footer {
    padding: 10px;
    background: var(--white);
    border-top: 1px solid #eee;
    display: flex;
    gap: 5px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
}

.chat-send-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: var(--accent);
}

.msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.msg-bot {
    background: #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    color: #333;
}

.msg-user {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.msg-loading {
    background: #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    padding: 11px 12px;
}

.typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.quick-action-btn {
    background: var(--white);
    border: 1px solid var(--accent);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 5px;
    display: inline-block;
    transition: 0.2s;
    margin-right: 5px;
}

.quick-action-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.chat-chips .quick-action-btn {
    margin: 0;
}

.msg-bot a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    word-break: break-word;
}

.msg-bot b {
    color: var(--primary-dark);
}

.msg-bot .chat-list {
    margin: 6px 0 2px;
    padding-left: 18px;
}

.msg-bot .chat-list li {
    margin: 2px 0;
}

.msg-bot code {
    background: rgba(6, 78, 59, 0.08);
    padding: 1px 5px;
    border-radius: 5px;
    font-size: 0.82em;
}

/* Citation Generation Engine UI */
.pub-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    vertical-align: middle;
    position: relative;
    flex-wrap: wrap;
}

.btn-cite {
    font-size: 0.75rem;
    color: #555;
    background-color: var(--card-border);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-cite:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-cite i {
    font-size: 0.7rem;
}

.cite-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    min-width: 200px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    margin-top: 5px;
    overflow: hidden;
}

.cite-dropdown-menu.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.pub-item.z-active {
    z-index: 50 !important;
    position: relative;
    border-color: var(--accent);
}

.cite-option {
    padding: 10px 15px;
    font-size: 0.85rem;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
    width: 100%;
}

.cite-option:hover {
    background-color: #f5f5f5;
    color: var(--accent);
}

.cite-option i {
    width: 16px;
    text-align: center;
    color: var(--primary);
}

.cite-option:hover i {
    color: var(--accent);
}

.cite-divider {
    height: 1px;
    background-color: #eee;
    margin: 0;
}

/* Mobile Responsive Scaling Media Queries */
.mobile-only-separator {
    display: none;
}

@media (max-width: 900px) {
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Optimised Mobile Search */
    .srch-overlay {
        padding-top: calc(64px + env(safe-area-inset-top)) !important;
        align-items: flex-start !important;
        background: rgba(0, 0, 0, 0.4) !important;
    }

    .hero-v-sep {
        display: none !important;
    }

    .srch-box {
        width: calc(100vw - 32px) !important;
        max-width: 640px !important;
        max-height: 85vh !important;
        margin-top: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    }

    .srch-footer,
    .srch-hint,
    .srch-empty {
        display: none !important;
    }

    .srch-input-wrapper {
        padding: 10px 12px !important;
    }

    .srch-input {
        font-size: 1rem !important;
    }

    /* Removed html constraint to restore iOS momentum scroll */
    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .mobile-only-separator {
        display: block;
        border: none;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--accent), transparent);
        margin: 3rem auto 1rem auto;
        width: 85%;
        opacity: 0.7;
        border-radius: 50%;
    }

    .header-content {
        justify-content: space-between;
        gap: 5px;
        padding: 0 15px;
    }

    /* Fixed Header Name constraints to prevent overlap */
    .header-name {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        color: var(--accent) !important;
        font-size: 1.6rem;
        position: static !important;
        margin: 0;
        flex: 1;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: 1002;
        max-width: none;
    }

    .header-name i {
        display: none !important;
    }

    /* Enhanced Breathing Room for Header Icons & Strict Separator Removal */
    .header-sep {
        display: none !important;
    }

    .global-controls {
        display: flex;
        align-items: center;
        gap: 24px;
        margin-left: auto;
        z-index: 2002;
        flex-shrink: 0;
    }

    .nav-toggle {
        display: block;
        position: relative;
        background: none;
        border: none;
        padding: 0;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--primary);
        transition: transform 0.3s ease;
        margin-left: 24px;
    }

    .nav-toggle.open {
        transform: rotate(90deg);
    }

    .control-icon {
        font-size: 1.15rem;
    }

    /* Fixed Mobile Menu Layout (Perfect Alignment & Wrap Logic) */
    .nav-list {
        position: fixed;
        top: 42px;
        right: -100%;
        width: 200px;
        max-width: 85vw;
        height: auto;
        min-height: auto; /* Shorter mobile menu */
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 2000;
        display: flex;
        border-radius: 0 0 0 15px;
        border: 1px solid #eee;
        border-top: none;
        border-right: none;
        align-items: flex-start;
    }

    .nav-list.active {
        right: 0;
    }

    .nav-item {
        width: 100%;
        display: block;
    }

    /* Reduced vertical padding for a more compact menu */
    .nav-link {
        color: var(--primary) !important;
        text-align: left;
        font-size: 0.9rem;
        padding: 10px 20px 10px 70px;
        border-bottom: 1px solid #eee;
        border-radius: 0;
        width: 100%;
        display: block;
        box-sizing: border-box;
    }

    /* MUST Wrap to allow dropdown sub-menu to fall to the next line */
    .nav-item-dropdown {
        display: flex;
        flex-wrap: wrap !important;
        width: 100%;
        border-bottom: 1px solid #eee;
        align-items: stretch;
        padding: 0;
    }

    /* 15px padding + 55px toggle box = Exactly 70px offset to match regular links */
    .nav-item-dropdown .nav-link {
        border-bottom: none;
        flex: 0 0 calc(100% - 55px);
        width: calc(100% - 55px);
        display: flex;
        align-items: center;
        order: 2;
        padding-left: 15px;
        box-sizing: border-box;
        white-space: normal;
    }

    .mobile-dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 55px;
        width: 55px;
        height: auto;
        font-size: 1.1rem;
        color: var(--primary);
        cursor: pointer;
        border-right: 1px solid #eee;
        border-left: none;
        transition: background 0.2s, color 0.2s;
        order: 1;
        background-color: transparent;
    }

    .mobile-dropdown-toggle:hover,
    .mobile-dropdown-toggle.active {
        background-color: #f0f4f8;
        color: var(--accent);
    }

    .desktop-arrow {
        display: none;
    }

    /* Updated Mobile Dropdown Sub-menu */
    .nav-dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--accent);
        background: #f8fafc;
        flex: 0 0 100%;
        width: 100%;
        min-width: auto;
        box-sizing: border-box;
        padding-left: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        display: block;
        order: 3;
        opacity: 0;
    }

    .nav-dropdown-content.show-mobile {
        max-height: 600px;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 1;
    }

    /* Compact sub-links for mobile */
    .nav-dropdown-content a {
        padding: 8px 20px 8px 67px;
        text-align: left;
        border-bottom: 1px solid var(--card-border);
        width: 100%;
        box-sizing: border-box;
        font-size: 0.85rem;
    }

    .dropdown-item-wrapper:hover .sub-dropdown-content {
        position: static;
        display: none;
    }

    .dropdown-item-wrapper>a {
        display: flex;
        align-items: center;
        padding: 0 !important;
        height: 40px;
        border-bottom: 1px solid var(--card-border);
        transition: background-color 0.2s, color 0.2s;
    }

    .dropdown-item-wrapper>a.active-parent {
        color: var(--accent);
        background-color: #f0f4f8;
    }

    .dropdown-item-wrapper>a>span {
        order: 2;
        padding-left: 10px;
        flex: 1;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .nested-arrow {
        order: 1;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-right: none;
        background-color: transparent;
        color: var(--primary);
        font-size: 0.8rem;
        margin: 0;
        transition: transform 0.3s ease;
    }

    .nested-arrow.rotated {
        transform: rotate(-180deg);
        color: var(--accent);
    }

    .sub-dropdown-content.show-nested {
        display: block !important;
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 15px;
        background-color: #f9f9f9;
        border-left: 3px solid #e0e0e0;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .sticky-sidebar {
        left: auto;
        right: 0;
        top: 50%;
        border-radius: 8px 0 0 8px;
        background-color: var(--white);
        border: 1px solid #eee;
        padding: 4px 1px; /* Ultra compact */
        box-shadow: -2px 0 6px rgba(0, 0, 0, 0.1);
        display: flex;
        gap: 2px; /* Minimal gap */
    }

    .sticky-sidebar [data-tip]::after {
        left: auto !important;
        right: calc(100% + 15px) !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .sticky-sidebar .h-social {
        font-size: 0.95rem; /* Smaller icons */
        margin: 0;
        width: 28px;
        height: 28px;
        background: none;
        box-shadow: none;
    }

    /* Flip Tooltip to Left on Mobile */
    .h-social::after {
        left: auto !important;
        right: 100% !important;
        transform: translateY(-50%) translateX(-10px) !important;
    }

    .h-social:hover::after {
        transform: translateY(-50%) translateX(-15px) !important;
    }

    /* Responsive Hero Updates */
    .hero {
        flex-direction: column !important;
        gap: 2.5rem !important;
        padding: 3rem 1.5rem !important;
        text-align: center !important;
        min-height: auto !important;
        pointer-events: auto !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1.5rem !important; /* Reset desktop padding-left */
    }

    .hero-main-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        align-items: center !important;
        width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .hero-text-group {
        display: flex !important;
        align-items: center !important;
        text-align: center !important;
        white-space: normal !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    .hero-info-combined {
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .hero-img-wrap {
        display: flex !important;
        width: 180px !important;
        height: 180px !important;
        margin: 0 auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .hero-img {
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }

    .hero-stats {
        display: block !important;
        width: 100% !important;
        max-width: 340px !important;
        margin: 0 auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        animation: none !important; /* Stop float animation but keep box visible */
    }

    .exp-grid,
    .award-box-grid,
    .grid-container,
    .tech-panel-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
        position: relative;
    }

    .contact-left {
        position: static;
        padding-left: 12px;
    }

    .contact-right {
        padding-left: 15px;
    }

    /* offset form inputs from the arrow line running at left:0 */

    /* Responsive targeting for mobile SVG arrow wrapper */
    .contact-arrow-wrapper {
        left: 0;
        width: max(20px, calc(50% - 130px));
        height: calc(100% - 25px);
    }

    .contact-left:hover .contact-arrow-line-svg .arrow-line,
    .contact-grid-layout:hover .contact-arrow-line-svg .arrow-line {
        stroke-dashoffset: 0;
    }

    .contact-left:hover .contact-arrow-head-svg,
    .contact-grid-layout:hover .contact-arrow-head-svg {
        opacity: 1;
        transition: opacity 0.2s ease-out 0.8s;
    }

    .cf-input-group {
        grid-template-columns: 1fr;
    }

    .footer-bottom-wrapper {
        flex-wrap: wrap;
        white-space: normal;
        justify-content: flex-start;
    }

    .footer-copyright {
        margin-left: 0 !important;
        margin-top: 10px;
        width: fit-content;
        align-self: flex-start;
        display: inline-block;
    }

    .form-actions {
        justify-content: center;
        width: 100%;
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        margin-top: 5px;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .msg-success-box {
        max-width: 100%;
    }

    .back-to-top {
        bottom: 20px;
        right: 15px;
        left: auto;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    #ai-widget-toggle {
        position: fixed;
        bottom: 20px;
        right: 65px;
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }

    #ai-chat-window {
        bottom: 75px;
        right: 15px;
        left: auto;
        width: calc(100vw - 30px);
        max-width: 320px;
    }

    .contact-footer-section {
        padding: 1rem 0 0; /* tight top, footer ends right below the form buttons */
    }

    .about-split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-text {
        text-align: justify;
    }


    .bento-card {
        width: 100%;
        margin: 0;
    }
}

/* Print Output Configuration */
@media print {

    #main-header,
    .sticky-sidebar,
    .back-to-top,
    .accordion-btn i,
    .nav-toggle,
    .global-controls,
    .header-search-bar,
    .search-tools,
    .form-footer,
    .contact-form-box,
    .cv-btn-group,
    .hero-contact,
    footer,
    .control-icon,
    #ai-widget-toggle,
    #ai-chat-window,
    .ai-modal-overlay,
    .ai-expand-btn {
        display: none !important;
    }

    body {
        padding-top: 0;
        background: var(--white);
        color: #000;
        font-size: 11pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .hero-section-wrapper {
        background: none;
        color: #000;
    }

    .hero {
        padding: 0;
        gap: 20px;
        justify-content: flex-start;
        text-align: left;
    }

    .hero h1 {
        color: #000;
        font-size: 24pt;
        margin: 0;
    }

    .hero-img {
        border-color: #000;
        width: 120px;
        height: 120px;
    }

    .hero-stats {
        display: none;
    }

    .section-title {
        font-size: 16pt;
        border-left: none;
        border-bottom: 2px solid #000;
        padding-left: 0;
        margin-top: 20px;
    }

    .accordion-btn {
        background: none;
        border: none;
        padding: 0;
        margin: 10px 0 5px 0;
        font-weight: 800;
        font-size: 13pt;
        color: #000;
    }

    .panel {
        max-height: none !important;
        opacity: 1 !important;
        border: none !important;
        display: block !important;
        margin-bottom: 10px;
    }

    .panel-content {
        padding: 0;
    }

    .scrollable-list,
    .scrollable-grid {
        max-height: none !important;
        overflow: visible !important;
        padding: 0;
    }

    .about-split-layout {
        display: block;
    }

    a {
        text-decoration: none;
        color: #000 !important;
    }

    .pub-doi {
        border: 1px solid #000;
        color: #000 !important;
        background: var(--white);
    }

    #print-footer {
        display: block !important;
        text-align: center;
        margin-top: 30px;
        border-top: 1px solid #ccc;
        padding-top: 10px;
        font-size: 9pt;
        color: #555;
    }
}

/* --- AI POPUP MODAL CSS */
.ai-logo-svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    fill: currentColor;
    display: inline-block;
    margin-right: 4px;
    margin-top: -2px;
}

.ai-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10005;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.ai-modal-box {
    background: var(--white);
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-top: 4px solid var(--accent);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ai-modal-overlay.show .ai-modal-box {
    transform: scale(1);
}

.ai-modal-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.ai-modal-body {
    padding: 22px 24px;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.65;
    max-height: 65vh;
    overflow-y: auto;
}

.ai-modal-body ol {
    padding-left: 1.5rem;
    margin: 0.4rem 0 0.9rem;
}

.ai-modal-body ul {
    padding-left: 1.4rem;
    margin: 0.4rem 0 0.9rem;
    list-style: disc;
}

.ai-modal-body li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.ai-modal-body p {
    margin-bottom: 0.75rem;
    text-align: justify;
}

.ai-close-btn {
    cursor: pointer;
    color: #888;
    transition: 0.3s;
    font-size: 1.3rem;
}

.ai-close-btn:hover {
    color: var(--exp-trainee);
}

/* New Editable AI Content Block */
.ai-generated-content {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
    min-height: 120px;
    transition: box-shadow 0.3s;
    margin-top: 10px;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.ai-generated-content:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Global Dark Mode Framework */
body.dark-mode {
    --text: #e2e8f0;
    --light-bg: #0f172a;
    --white: #1e293b;
    --sub-heading: #38bdf8;
    --card-bg: var(--white);
    --card-border: #334155;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.5);
    --tooltip-bg: #ffffff;
    --tooltip-text: #1a1a1a;
    --page-v-sep-color: rgba(245, 158, 11, 0.1);
    --page-v-sep-glow: rgba(245, 158, 11, 0.45);
}

body.dark-mode,
body.dark-mode .panel,
body.dark-mode .nav-dropdown-content,
body.dark-mode .custom-lang-dropdown,
body.dark-mode .sticky-sidebar,
body.dark-mode .ai-modal-box,
body.dark-mode #ai-chat-window,
body.dark-mode .chat-footer {
    background-color: var(--light-bg);
    color: var(--text);
    border-color: var(--card-border);
}

body.dark-mode .ui-card,
body.dark-mode .edu-card,
body.dark-mode .exp-box,
body.dark-mode .referee-card,
body.dark-mode .award-card,
body.dark-mode .patent-box,
body.dark-mode .accordion-btn {
    background-color: var(--white);
    color: var(--text);
    border-color: var(--card-border);
}

body.dark-mode .hero-section-wrapper,
body.dark-mode .contact-footer-section {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    border-bottom: 1px solid #1e293b;
}

body.dark-mode .nav-link,
body.dark-mode .control-icon,
body.dark-mode .lang-wrapper,
body.dark-mode .header-name,
body.dark-mode .h-social,
body.dark-mode .mobile-dropdown-toggle,
body.dark-mode .nav-toggle {
    color: #e2e8f0 !important;
}

body.dark-mode header {
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.35);
}

body.dark-mode .nav-dropdown-content {
    background-color: #0f172a;
}

body.dark-mode .ai-generated-content,
body.dark-mode .chat-body,
body.dark-mode .chat-input,
body.dark-mode .ai-modal-body input,
body.dark-mode .ai-modal-body textarea {
    background-color: #020617;
    color: var(--text);
    border-color: #334155;
}

/* Chat quick-reply chips: gold outline in dark mode for legibility. */
body.dark-mode .quick-action-btn {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

body.dark-mode .quick-action-btn:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

body.dark-mode .pub-item:hover,
body.dark-mode .nav-dropdown-content a:hover,
body.dark-mode .lang-option:hover {
    background-color: #334155;
}

/* Simplified Dark Mode Hover Colours using variables */
body.dark-mode .ui-card:hover { border-color: var(--accent); }
body.dark-mode .exp-full:hover { border-color: var(--exp-full); }
body.dark-mode .exp-part:hover { border-color: var(--exp-part); }
body.dark-mode .exp-trainee:hover { border-color: var(--exp-trainee); }

/* === STRATEGY SECTION STYLES === */
.strategy-cards-grid,
.funding-timeline,
.lab-structure,
.dei-cards {
    display: grid;
    gap: 1.5rem;
    padding: 15px 0;
}

.strategy-cards-grid,
.lab-structure {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.funding-timeline,
.dei-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.strategy-card-item,
.timeline-item,
.lab-section,
.dei-card {
    --panel-accent: var(--accent);
    --panel-bg: linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
    --panel-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    --panel-shadow-hover: 0 18px 32px rgba(15, 23, 42, 0.12);
    background: var(--panel-bg);
    padding: 1.35rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--panel-accent);
    box-shadow: var(--panel-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.strategy-card-item:hover,
.timeline-item:hover,
.lab-section:hover,
.dei-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--panel-shadow-hover);
    border-color: var(--panel-accent);
}

.strategy-card-item::before,
.lab-section::before,
.dei-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.05), transparent 46%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.strategy-card-item:hover::before,
.lab-section:hover::before,
.dei-card:hover::before {
    opacity: 1;
}

.strategy-card-item>*,
.lab-section>*,
.dei-card>* {
    position: relative;
    z-index: 1;
}

.strategy-card-item h5,
.timeline-content h5,
.lab-section h5,
.dei-card h5 {
    margin: 0 0 12px 0;
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.strategy-card-item p,
.timeline-content p,
.lab-section p,
.dei-card p,
.team-level {
    margin: 8px 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.strategy-card-item ul,
.lab-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strategy-card-item li,
.lab-section li {
    padding: 8px 0 8px 20px;
    color: #555;
    font-size: 0.95rem;
    position: relative;
}

.strategy-card-item li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #1e293b;
    transition: color 0.3s ease;
    font-weight: bold;
}

.strategy-card-item:hover li::before {
    color: var(--panel-accent);
}

.timeline-item {
    --panel-accent: #0284c7;
    --panel-bg: linear-gradient(180deg, var(--white) 0%, #f8fbff 100%);
    --panel-shadow-hover: 0 18px 34px rgba(2, 132, 199, 0.16);
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    top: -45px;
    right: -35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
}

.timeline-item-1 {
    --panel-accent: #22c55e;
    --panel-bg: linear-gradient(180deg, var(--white) 0%, #f0fdf4 100%);
    --panel-shadow-hover: 0 18px 34px rgba(34, 197, 94, 0.16);
}

.timeline-item-2 {
    --panel-accent: var(--accent);
    --panel-bg: linear-gradient(180deg, var(--white) 0%, #fffbeb 100%);
    --panel-shadow-hover: 0 18px 34px rgba(245, 158, 11, 0.16);
}

.timeline-item-3 {
    --panel-accent: #8b5cf6;
    --panel-bg: linear-gradient(180deg, var(--white) 0%, #f5f3ff 100%);
    --panel-shadow-hover: 0 18px 34px rgba(139, 92, 246, 0.16);
}

.timeline-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: var(--white);
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.lab-section {
    --panel-accent: var(--primary);
}

.team-hierarchy {
    background: var(--white);
    padding: 12px;
    border-radius: 12px;
    border-left: 3px solid var(--accent);
}

.team-level {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.team-level:last-child,
.lab-section li:last-child {
    border-bottom: none;
}

.lab-section li {
    border-bottom: 1px solid #eee;
}

.lab-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #1e293b;
    transition: color 0.3s ease;
    font-weight: bold;
}

.lab-section:hover li::before {
    color: var(--panel-accent);
}

.dei-card {
    padding: 1.5rem;
    border-radius: 18px;
}

.dei-card-1 {
    --panel-accent: #dc2626;
    --panel-bg: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
}

.dei-card-2 {
    --panel-accent: var(--accent);
    --panel-bg: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.dei-card-3 {
    --panel-accent: #22c55e;
    --panel-bg: linear-gradient(135deg, #f0fdf4 0%, #f8fcf7 100%);
}

.dei-card-4 {
    --panel-accent: #0284c7;
    --panel-bg: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
}

.centered-card {
    text-align: center;
}

.centered-card ul {
    display: inline-block;
    text-align: left;
    padding: 0;
}

.centered-card li {
    border-bottom: 1px solid #eee;
    padding: 8px 0 8px 20px;
}

.centered-card li:last-child {
    border-bottom: none;
}

.centered-card li::before {
    top: 10px;
}


/* === TCP RESEARCH VISION & LEADERSHIP ENHANCEMENTS === */
@keyframes tcpFloat {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(-10px, 10px, 0);
    }
}

.tcp-vision-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.9fr);
    gap: 1.5rem;
    margin-bottom: 1.8rem;
    padding: 1.9rem;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 26%),
        linear-gradient(135deg, #f6f8f4 0%, #edf7f2 55%, #fff9ef 100%);
    border: 1px solid rgba(6, 78, 59, 0.12);
    box-shadow: 0 18px 45px rgba(6, 78, 59, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease, border-color 0.5s ease;
}

.tcp-vision-hero:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(6, 78, 59, 0.15);
    border-color: rgba(6, 78, 59, 0.25);
}

.tcp-vision-hero::before,
.tcp-vision-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.tcp-vision-hero::before {
    width: 260px;
    height: 260px;
    top: -120px;
    right: -70px;
    background: rgba(6, 78, 59, 0.08);
    animation: tcpFloat 12s ease-in-out infinite;
}

.tcp-vision-hero::after {
    width: 180px;
    height: 180px;
    bottom: -80px;
    left: -50px;
    background: rgba(245, 158, 11, 0.12);
    animation: tcpFloat 10s ease-in-out infinite reverse;
}

.tcp-vision-copy,
.tcp-vision-kpis {
    position: relative;
    z-index: 1;
}

.tcp-eyebrow i {
    transition: transform 0.4s ease, color 0.4s ease;
}

.tcp-vision-hero:hover .tcp-eyebrow i {
    transform: scale(1.3) rotate(15deg);
    color: var(--accent);
}

.tcp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(6, 78, 59, 0.12);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tcp-vision-copy h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-dark);
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    line-height: 1.2;
}

.tcp-vision-copy p {
    margin: 0 0 0.9rem 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.75;
    text-align: justify;
}

.tcp-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.2rem;
}

.tcp-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(6, 78, 59, 0.08);
    border: 1px solid rgba(6, 78, 59, 0.1);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    transition: var(--transition);
    cursor: default;
}

.tcp-vision-hero:hover .tcp-tag,
.tcp-tag:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(6, 78, 59, 0.2);
}

/* Cascading highlight effect on hero hover */
.tcp-vision-hero:hover .tcp-tag:nth-child(1) {
    transition-delay: 0.05s;
}

.tcp-vision-hero:hover .tcp-tag:nth-child(2) {
    transition-delay: 0.10s;
}

.tcp-vision-hero:hover .tcp-tag:nth-child(3) {
    transition-delay: 0.15s;
}

.tcp-vision-hero:hover .tcp-tag:nth-child(4) {
    transition-delay: 0.20s;
}

.tcp-vision-hero:hover .tcp-tag:nth-child(5) {
    transition-delay: 0.25s;
}

.tcp-vision-kpis {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.tcp-kpi {
    padding: 1.1rem 1.15rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(6, 78, 59, 0.1);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tcp-kpi:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.tcp-kpi:hover .tcp-kpi-label {
    text-decoration: underline;
}

.tcp-kpi-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #047857;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tcp-kpi strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #0f172a;
    font-size: 1.08rem;
}

.tcp-kpi p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.55;
}

.tcp-summary-grid,
.tcp-impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.tcp-summary-card,
.tcp-impact-card {
    background: linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tcp-summary-card:hover,
.tcp-impact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.1);
    border-color: rgba(6, 78, 59, 0.18);
}

.tcp-summary-card::before,
.tcp-impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.tcp-summary-card h4,
.tcp-impact-card h4 {
    margin: 0 0 0.65rem 0;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 700;
}

.tcp-summary-card p,
.tcp-impact-card p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.65;
    text-align: justify;
}

.tcp-summary-card-1::before,
.tcp-impact-card-1::before {
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.tcp-summary-card-2::before,
.tcp-impact-card-2::before {
    background: linear-gradient(90deg, var(--accent), #f97316);
}

.tcp-summary-card-3::before,
.tcp-impact-card-3::before {
    background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.tcp-impact-card-4::before {
    background: linear-gradient(90deg, #dc2626, #fb7185);
}

.tcp-pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.tcp-pillar-card {
    min-height: 260px;
    padding: 1.4rem;
    border-radius: 24px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.tcp-pillar-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.18);
}

.tcp-pillar-card::before,
.tcp-pillar-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.tcp-pillar-card::before {
    width: 180px;
    height: 180px;
    top: -100px;
    right: -70px;
    background: rgba(255, 255, 255, 0.1);
}

.tcp-pillar-card::after {
    width: 120px;
    height: 120px;
    bottom: -50px;
    left: -30px;
    background: rgba(255, 255, 255, 0.08);
}

.tcp-pillar-card>* {
    position: relative;
    z-index: 1;
}

.tcp-pillar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.25rem;
}

.tcp-pillar-card h4 {
    margin: 0 0 0.7rem 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.tcp-pillar-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.65;
    text-align: justify;
}

.tcp-pillar-points {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.tcp-pillar-points li {
    margin-bottom: 0.55rem;
    padding-left: 18px;
    position: relative;
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.92rem;
    line-height: 1.55;
}

.tcp-pillar-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

.tcp-pillar-card-1 {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
}

.tcp-pillar-card-2 {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
}

.tcp-pillar-card-3 {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
}

.tcp-roadmap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    position: relative;
    padding-top: 0.6rem;
}

.tcp-roadmap::before {
    content: '';
    position: absolute;
    left: 4%;
    right: 4%;
    top: 26px;
    height: 2px;
    background: linear-gradient(90deg, rgba(6, 78, 59, 0.2), rgba(245, 158, 11, 0.35), rgba(124, 58, 237, 0.25));
    z-index: 0;
}

.tcp-phase-card {
    --phase-color: var(--primary);
    position: relative;
    z-index: 1;
    padding: 1.4rem 1.2rem 1.2rem;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--phase-color);
    background: var(--white);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tcp-phase-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 32px rgba(15, 23, 42, 0.14);
}

.tcp-phase-card::before {
    content: attr(data-phase);
    position: absolute;
    top: -18px;
    left: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--phase-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.tcp-phase-range {
    display: inline-flex;
    align-items: center;
    margin-top: 0.6rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.tcp-phase-card h4 {
    margin: 0.8rem 0 0.55rem 0;
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
}

.tcp-phase-card p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

.tcp-phase-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.tcp-phase-list li {
    margin-bottom: 0.55rem;
    padding-left: 18px;
    position: relative;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
}

.tcp-phase-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--phase-color);
}

.tcp-phase-1 {
    --phase-color: #0f766e;
}

.tcp-phase-2 {
    --phase-color: var(--accent);
}

.tcp-phase-3 {
    --phase-color: #7c3aed;
}

@media (max-width: 900px) {
    .tcp-vision-hero {
        grid-template-columns: 1fr;
        padding: 1.35rem;
        border-radius: 22px;
        background: linear-gradient(135deg, #f6f8f4 0%, #edf7f2 55%, #fff9ef 100%);
    }

    .tcp-vision-hero::before,
    .tcp-vision-hero::after {
        display: none;
    }

    .tcp-vision-copy h3 {
        font-size: 1.6rem;
    }

    .tcp-vision-kpis,
    .tcp-summary-grid,
    .tcp-pillar-grid,
    .tcp-impact-grid,
    .tcp-roadmap {
        grid-template-columns: 1fr;
    }

    .tcp-roadmap::before {
        display: none;
    }

    .tcp-kpi,
    .tcp-summary-card,
    .tcp-phase-card,
    .tcp-impact-card {
        padding: 1.1rem;
    }
}

/* TCP and leadership section dark mode */
body.dark-mode .tcp-vision-hero {
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 28%),
        linear-gradient(135deg, #111827 0%, #0f172a 58%, #1e293b 100%);
    border-color: #334155;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.4);
}

body.dark-mode .tcp-eyebrow {
    background: rgba(15, 23, 42, 0.82);
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .tcp-tag {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.24);
    color: #7dd3fc;
}

body.dark-mode .tcp-vision-hero:hover .tcp-tag,
body.dark-mode .tcp-tag:hover {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

body.dark-mode .tcp-vision-hero:hover {
    box-shadow: 0 25px 50px rgba(2, 6, 23, 0.6);
    border-color: #475569;
}

body.dark-mode .tcp-kpi,
body.dark-mode .tcp-summary-card,
body.dark-mode .tcp-impact-card,
body.dark-mode .tcp-phase-card,
body.dark-mode .strategy-card-item,
body.dark-mode .timeline-item,
body.dark-mode .lab-section,
body.dark-mode .dei-card,
body.dark-mode .team-hierarchy,
body.dark-mode .tcp-roadmap .exp-box {
    background: var(--white);
    border-color: #334155;
}

body.dark-mode .tcp-focus-card:hover {
    background-color: #0f172a;
}

body.dark-mode .tcp-focus-card-1:hover {
    border-color: #0ea5e9;
}

body.dark-mode .tcp-focus-card-2:hover {
    border-color: #10b981;
}

body.dark-mode .tcp-focus-card-3:hover {
    border-color: #f43f5e;
}

body.dark-mode .tcp-focus-card-4:hover {
    border-color: #8b5cf6;
}

body.dark-mode .tcp-focus-card-5:hover {
    border-color: var(--accent);
}

body.dark-mode .tcp-focus-card-6:hover {
    border-color: #14b8a6;
}

body.dark-mode .tcp-card-1:hover {
    border-color: #38bdf8 !important;
    background-color: #1e293b;
}

body.dark-mode .tcp-card-2:hover {
    border-color: #34d399 !important;
    background-color: #1e293b;
}

body.dark-mode .tcp-card-3:hover {
    border-color: #c084fc !important;
    background-color: #1e293b;
}

body.dark-mode .tcp-card-1:hover h4 {
    color: #38bdf8 !important;
}

body.dark-mode .tcp-card-2:hover h4 {
    color: #34d399 !important;
}

body.dark-mode .tcp-card-3:hover h4 {
    color: #c084fc !important;
}

body.dark-mode .tcp-roadmap .tcp-ph-1 {
    border-top-color: #38bdf8;
}

body.dark-mode .tcp-roadmap .tcp-ph-1::before {
    border-color: #38bdf8;
    background: #0f172a;
}

body.dark-mode .tcp-roadmap .tcp-ph-1:hover::before {
    background: #38bdf8;
}

body.dark-mode .tcp-roadmap .tcp-ph-1:hover {
    border-color: #38bdf8;
}

body.dark-mode .tcp-roadmap .tcp-ph-2 {
    border-top-color: #fbbf24;
}

body.dark-mode .tcp-roadmap .tcp-ph-2::before {
    border-color: #fbbf24;
    background: #0f172a;
}

body.dark-mode .tcp-roadmap .tcp-ph-2:hover::before {
    background: #fbbf24;
}

body.dark-mode .tcp-roadmap .tcp-ph-2:hover {
    border-color: #fbbf24;
}

body.dark-mode .tcp-roadmap .tcp-ph-3 {
    border-top-color: #c084fc;
}

body.dark-mode .tcp-roadmap .tcp-ph-3::before {
    border-color: #c084fc;
    background: #0f172a;
}

body.dark-mode .tcp-roadmap .tcp-ph-3:hover::before {
    background: #c084fc;
}

body.dark-mode .tcp-roadmap .tcp-ph-3:hover {
    border-color: #c084fc;
}

/* === Hero Tagline Bridge Section === */
@keyframes bridgeFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(-4px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08); }
}

.hero-bridge-section {
    background: none;
    border: none;
    padding: 0.6rem 0 0;
    margin: 0;
    text-align: center;
    /* Fade in after hero has loaded — 2 s delay */
    animation: bridgeFadeIn 0.7s ease forwards;
    animation-delay: 2s;
    opacity: 0;  /* hidden until animation starts */
}

.hero-bridge-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-bridge-text {
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    letter-spacing: 0.01em;
    white-space: normal;
    text-align: center;
}

/* Grey base — always visible */
.hero-bridge-grey {
    color: #9ca3af;
}

.hero-bridge-grey span {
    color: #9ca3af;
    font-style: normal;
    font-weight: 700;
}

body.dark-mode .hero-bridge-grey {
    color: #4b5563;
}

body.dark-mode .hero-bridge-grey span {
    color: #4b5563;
}

/* Coloured overlay — animates on top via clip-path */
.hero-bridge-colour {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--primary-dark);
    /* clip-path reveal: right side clipped → fully revealed → wipe out left → reset */
    animation: bridgeColourCycle 20s cubic-bezier(0.4, 0, 0.2, 1) 0.5s infinite;
}

.hero-bridge-colour .btw-kw1 {
    color: #0ea5e9;
    font-style: normal;
    font-weight: 700;
}

.hero-bridge-colour .btw-kw2 {
    color: var(--accent);
    font-style: normal;
    font-weight: 700;
}

.hero-bridge-colour .btw-kw3 {
    color: #10b981;
    font-style: normal;
    font-weight: 700;
}

body.dark-mode .hero-bridge-colour {
    color: #94a3b8;
}

@keyframes bridgeColourCycle {

    /* Start: fully clipped from the RIGHT side — colour invisible */
    0% {
        clip-path: inset(0 100% 0 0);
        opacity: 1;
    }

    /* Sweep LEFT → RIGHT: right clip shrinks to 0, revealing colour */
    30% {
        clip-path: inset(0 0% 0 0);
        opacity: 1;
    }

    /* Hold fully coloured */
    60% {
        clip-path: inset(0 0% 0 0);
        opacity: 1;
    }

    /* Fade out (dissolve, don't wipe again) */
    80% {
        clip-path: inset(0 0% 0 0);
        opacity: 0;
    }

    /* Reset clip silently while invisible, ready for next sweep */
    99% {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }

    100% {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
}

body.dark-mode .timeline-item-1 {
    background: linear-gradient(180deg, #1e293b 0%, rgba(34, 197, 94, 0.1) 100%);
}

body.dark-mode .timeline-item-2 {
    background: linear-gradient(180deg, #1e293b 0%, rgba(245, 158, 11, 0.1) 100%);
}

body.dark-mode .timeline-item-3 {
    background: linear-gradient(180deg, #1e293b 0%, rgba(139, 92, 246, 0.12) 100%);
}

body.dark-mode .tcp-vision-copy h3,
body.dark-mode .tcp-kpi strong,
body.dark-mode .tcp-summary-card h4,
body.dark-mode .tcp-impact-card h4,
body.dark-mode .tcp-phase-card h4,
body.dark-mode .strategy-card-item h5,
body.dark-mode .timeline-content h5,
body.dark-mode .lab-section h5,
body.dark-mode .dei-card h5 {
    color: #f8fafc;
}

body.dark-mode .tcp-vision-copy p,
body.dark-mode .tcp-kpi p,
body.dark-mode .tcp-summary-card p,
body.dark-mode .tcp-impact-card p,
body.dark-mode .tcp-phase-card p,
body.dark-mode .strategy-card-item li,
body.dark-mode .strategy-card-item p,
body.dark-mode .timeline-content p,
body.dark-mode .lab-section li,
body.dark-mode .lab-section p,
body.dark-mode .tech-sub-title {
    border-bottom-color: #334155;
}

/* TCP Vision Boxes & Hovers Dark Mode */
body.dark-mode .tcp-focus-card-1:hover {
    background-color: #0c4a6e;
    border-color: #0ea5e9;
}

body.dark-mode .tcp-focus-card-2:hover {
    background-color: var(--primary);
    border-color: #10b981;
}

body.dark-mode .tcp-focus-card-3:hover {
    background-color: #881337;
    border-color: #f43f5e;
}

body.dark-mode .tcp-focus-card-4:hover {
    background-color: #4c1d95;
    border-color: #8b5cf6;
}

body.dark-mode .tcp-focus-card-5:hover {
    background-color: #78350f;
    border-color: var(--accent);
}

body.dark-mode .tcp-focus-card-6:hover {
    background-color: #134e4a;
    border-color: #14b8a6;
}

body.dark-mode .tcp-impact-card:nth-child(3n+1):hover,
body.dark-mode .strategy-card-item:nth-child(3n+1):hover,
body.dark-mode .culture-card:nth-child(3n+1):hover,
body.dark-mode .lab-section:nth-child(3n+1):hover {
    border-top-color: #38bdf8;
    background-color: #1e293b;
}

body.dark-mode .tcp-impact-card:nth-child(3n+2):hover,
body.dark-mode .strategy-card-item:nth-child(3n+2):hover,
body.dark-mode .culture-card:nth-child(3n+2):hover,
body.dark-mode .lab-section:nth-child(3n+2):hover {
    border-top-color: #34d399;
    background-color: #1e293b;
}

body.dark-mode .tcp-impact-card:nth-child(3n+3):hover,
body.dark-mode .strategy-card-item:nth-child(3n+3):hover,
body.dark-mode .culture-card:nth-child(3n+3):hover,
body.dark-mode .lab-section:nth-child(3n+3):hover {
    border-top-color: #c084fc;
    background-color: #1e293b;
}

body.dark-mode .tcp-impact-card:nth-child(3n+1):hover h4,
body.dark-mode .strategy-card-item:nth-child(3n+1):hover h4,
body.dark-mode .culture-card:nth-child(3n+1):hover h4,
body.dark-mode .lab-section:nth-child(3n+1):hover h4 {
    color: #38bdf8;
}

body.dark-mode .tcp-impact-card:nth-child(3n+2):hover h4,
body.dark-mode .strategy-card-item:nth-child(3n+2):hover h4,
body.dark-mode .culture-card:nth-child(3n+2):hover h4,
body.dark-mode .lab-section:nth-child(3n+2):hover h4 {
    color: #34d399;
}

body.dark-mode .tcp-impact-card:nth-child(3n+3):hover h4,
body.dark-mode .strategy-card-item:nth-child(3n+3):hover h4,
body.dark-mode .culture-card:nth-child(3n+3):hover h4,
body.dark-mode .lab-section:nth-child(3n+3):hover h4 {
    color: #c084fc;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-1 {
    border-top-color: #38bdf8;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-1::before {
    border-color: #38bdf8;
    background: #0f172a;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-1:hover::before {
    background: #38bdf8;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-2 {
    border-top-color: #fbbf24;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-2::before {
    border-color: #fbbf24;
    background: #0f172a;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-2:hover::before {
    background: #fbbf24;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-3 {
    border-top-color: #c084fc;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-3::before {
    border-color: #c084fc;
    background: #0f172a;
}

body.dark-mode .tcp-roadmap-vertical .tcp-ph-3:hover::before {
    background: #c084fc;
}

/* --- Custom User Styles */

.tcp-summary-card h4 {
    position: relative;
}

.tcp-summary-card:hover h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

/* Request 3: Vision & Research Themes colours */
.tcp-focus-card:nth-child(1) {
    background-color: var(--vision-color-1);
}

.tcp-focus-card:nth-child(2) {
    background-color: var(--vision-color-2);
}

.tcp-focus-card:nth-child(3) {
    background-color: var(--vision-color-3);
}

.tcp-focus-card:nth-child(4) {
    background-color: var(--vision-color-4);
}

.tcp-focus-card:nth-child(5) {
    background-color: var(--vision-color-5);
}

.tcp-focus-card:nth-child(6) {
    background-color: var(--vision-color-6);
}

/* Vision cards: refined hover — darken slightly + colored border, no dark overlay */
.tcp-focus-card:hover::after {
    transform: translateY(100%) !important;
}

.tcp-focus-card:hover::before {
    background: linear-gradient(135deg, transparent, transparent) !important;
}

.tcp-focus-card:hover {
    border-width: 2px;
}

.tcp-focus-card:hover .tfc-icon {
    color: var(--primary) !important;
    background: rgba(6, 78, 59, 0.1) !important;
    border-radius: 20px !important;
    filter: none !important;
    margin-bottom: 15px !important;
}

.tcp-focus-card:hover .tfc-title {
    color: var(--primary) !important;
}

.tcp-focus-card:hover .tfc-desc {
    color: #555 !important;
}

.tcp-focus-card:hover .tech-ul li {
    color: var(--text) !important;
}

/* Vision cards: list alignment, separators & tick centering */
.tcp-focus-card .tech-ul {
    text-align: left;
    width: 100%;
    margin-top: 4px;
}

.tcp-focus-card .tech-ul li {
    padding: 7px 0 7px 22px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tcp-focus-card .tech-ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tcp-focus-card .tech-ul li::before {
    top: 50%;
    transform: translateY(-50%);
}

.tcp-focus-card-1:hover {
    background-color: #c5e5e2 !important;
    border-color: #0ea5e9 !important;
}

.tcp-focus-card-2:hover {
    background-color: #fde49e !important;
    border-color: #d97706 !important;
}

.tcp-focus-card-3:hover {
    background-color: #dbd5ff !important;
    border-color: #8b5cf6 !important;
}

.tcp-focus-card-4:hover {
    background-color: #fcc4c4 !important;
    border-color: #f43f5e !important;
}

.tcp-focus-card-5:hover {
    background-color: #a8ede5 !important;
    border-color: #14b8a6 !important;
}

.tcp-focus-card-6:hover {
    background-color: #c2d4ff !important;
    border-color: #6366f1 !important;
}

/* Request 4b: Funding hover border colours */
.strategy-card-item:nth-child(1):hover {
    border-color: #0ea5e9;
}

.strategy-card-item:nth-child(2):hover {
    border-color: #10b981;
}

.strategy-card-item:nth-child(3):hover {
    border-color: #f43f5e;
}

/* Roadmap Phase boxes: thin separators + centred tick */
#roadmap-funding .edu-card .tech-ul li {
    padding: 7px 0 7px 22px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#roadmap-funding .edu-card .tech-ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#roadmap-funding .edu-card .tech-ul li::before {
    top: 50%;
    transform: translateY(-50%);
}

/* Roadmap Funding Logic boxes: thin separators */
#roadmap-funding .strategy-card-item li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#roadmap-funding .strategy-card-item li:last-child {
    border-bottom: none;
}

/* Lab Model: per-box accent colours */
#lab-model .lab-section:nth-child(1) {
    --panel-accent: #0ea5e9;
}

#lab-model .lab-section:nth-child(2) {
    --panel-accent: #10b981;
}

#lab-model .lab-section:nth-child(3) {
    --panel-accent: #8b5cf6;
}

/* Request 5: Teaching colours */
.culture-card:nth-child(1) {
    border-left-color: #22c55e;
}

.culture-card:nth-child(2) {
    border-left-color: var(--accent);
}

.culture-card:nth-child(3) {
    border-left-color: #8b5cf6;
}

.culture-card:nth-child(1):hover {
    border-color: #22c55e;
}

.culture-card:nth-child(2):hover {
    border-color: var(--accent);
}

.culture-card:nth-child(3):hover {
    border-color: #8b5cf6;
}

/* Teaching & Culture: per-card accents, hover heading = border colour, bullet centering */
#tcp-culture+.panel .strategy-card-item:nth-child(1) {
    --panel-accent: #0ea5e9;
}

#tcp-culture+.panel .strategy-card-item:nth-child(2) {
    --panel-accent: #10b981;
}

#tcp-culture+.panel .strategy-card-item:nth-child(3) {
    --panel-accent: #f43f5e;
}

#tcp-culture+.panel .strategy-card-item h4 {
    transition: color 0.3s ease;
    font-size: 1.25rem;
}

#tcp-culture+.panel .strategy-card-item:hover h4 {
    color: var(--panel-accent);
}

#tcp-culture+.panel .tech-ul li::before {
    top: 50%;
    transform: translateY(-50%);
}

/* Core Lab Culture: hover heading = border colour + separators */
.culture-card:nth-child(1):hover h4 {
    color: #22c55e;
}

.culture-card:nth-child(2):hover h4 {
    color: var(--accent);
}

.culture-card:nth-child(3):hover h4 {
    color: #8b5cf6;
}

.culture-card .tech-ul li {
    padding: 7px 0 7px 22px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.culture-card .tech-ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.culture-card .tech-ul li::before {
    top: 50%;
    transform: translateY(-50%);
}

/* Roadmap phases: hover heading = border colour */
#roadmap-funding .edu-card h4 {
    transition: color 0.3s ease;
    font-size: 1.25rem;
}

#roadmap-funding .edu-card.edu-phd:hover h4 {
    color: var(--edu-phd);
}

#roadmap-funding .edu-card.edu-msc:hover h4 {
    color: var(--edu-msc);
}

#roadmap-funding .edu-card.edu-bsc:hover h4 {
    color: var(--edu-bsc);
}

/* Roadmap Funding Logic: per-card accents, hover heading = border colour */
#roadmap-funding .strategy-card-item:nth-child(1) {
    --panel-accent: #0ea5e9;
}

#roadmap-funding .strategy-card-item:nth-child(2) {
    --panel-accent: #10b981;
}

#roadmap-funding .strategy-card-item:nth-child(3) {
    --panel-accent: #f43f5e;
}

#roadmap-funding .strategy-card-item h5 {
    transition: color 0.3s ease;
    font-size: 1.25rem;
}

#roadmap-funding .strategy-card-item:hover h5 {
    color: var(--panel-accent);
}

/* Lab Model: hover heading = border colour */
#lab-model .lab-section h4 {
    transition: color 0.3s ease;
    font-size: 1.25rem;
}

#lab-model .lab-section:hover h4 {
    color: var(--panel-accent);
}

/* Dynamic Bullet Colours for TCP Sections (Default Black/Dark, hover to Accent) */
#research-vision .tcp-focus-card .tech-ul li::before,
#roadmap-funding .edu-card .tech-ul li::before,
#teaching-mentorship .culture-card .tech-ul li::before,
#teaching-mentorship .strategy-card-item .tech-ul li::before {
    color: #1e293b;
    transition: color 0.3s ease;
}

#teaching-mentorship .strategy-card-item:hover .tech-ul li::before {
    color: var(--panel-accent);
}

#research-vision .tcp-focus-card-1:hover .tech-ul li::before {
    color: #0ea5e9;
}

#research-vision .tcp-focus-card-2:hover .tech-ul li::before {
    color: #d97706;
}

#research-vision .tcp-focus-card-3:hover .tech-ul li::before {
    color: #8b5cf6;
}

#research-vision .tcp-focus-card-4:hover .tech-ul li::before {
    color: #f43f5e;
}

#research-vision .tcp-focus-card-5:hover .tech-ul li::before {
    color: #14b8a6;
}

#research-vision .tcp-focus-card-6:hover .tech-ul li::before {
    color: #6366f1;
}

#roadmap-funding .edu-card.edu-phd:hover .tech-ul li::before {
    color: var(--edu-phd);
}

#roadmap-funding .edu-card.edu-msc:hover .tech-ul li::before {
    color: var(--edu-msc);
}

#roadmap-funding .edu-card.edu-bsc:hover .tech-ul li::before {
    color: var(--edu-bsc);
}

#teaching-mentorship .culture-card:nth-child(1):hover .tech-ul li::before {
    color: #22c55e;
}

#teaching-mentorship .culture-card:nth-child(2):hover .tech-ul li::before {
    color: var(--accent);
}

#teaching-mentorship .culture-card:nth-child(3):hover .tech-ul li::before {
    color: #8b5cf6;
}

/* Dark Mode Equivalents */
body.dark-mode #research-vision .tcp-focus-card .tech-ul li::before,
body.dark-mode #roadmap-funding .edu-card .tech-ul li::before,
body.dark-mode #teaching-mentorship .culture-card .tech-ul li::before,
body.dark-mode #teaching-mentorship .strategy-card-item .tech-ul li::before,
body.dark-mode .strategy-card-item li::before,
body.dark-mode .lab-section li::before {
    color: #94a3b8;
}

body.dark-mode .strategy-card-item:hover li::before,
body.dark-mode .lab-section:hover li::before,
body.dark-mode #teaching-mentorship .strategy-card-item:hover .tech-ul li::before {
    color: var(--panel-accent);
}

body.dark-mode #research-vision .tcp-focus-card-1:hover .tech-ul li::before {
    color: #0ea5e9;
}

body.dark-mode #research-vision .tcp-focus-card-2:hover .tech-ul li::before {
    color: #10b981;
}

body.dark-mode #research-vision .tcp-focus-card-3:hover .tech-ul li::before {
    color: #f43f5e;
}

body.dark-mode #research-vision .tcp-focus-card-4:hover .tech-ul li::before {
    color: #8b5cf6;
}

body.dark-mode #research-vision .tcp-focus-card-5:hover .tech-ul li::before {
    color: var(--accent);
}

body.dark-mode #research-vision .tcp-focus-card-6:hover .tech-ul li::before {
    color: #14b8a6;
}

body.dark-mode #teaching-mentorship .culture-card:nth-child(1):hover .tech-ul li::before {
    color: #38bdf8;
}

body.dark-mode #teaching-mentorship .culture-card:nth-child(2):hover .tech-ul li::before {
    color: #34d399;
}

body.dark-mode #teaching-mentorship .culture-card:nth-child(3):hover .tech-ul li::before {
    color: #c084fc;
}

/* === Hero Floating Icons Layer === */
#hi-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hero-img-wrap {
    position: relative;
    flex-shrink: 0;
}

/* === 4.18.5: Course Cards === */
.course-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.course-card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card-top {
    padding: 1.1rem 1.2rem 0.7rem;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.course-card-info {
    flex: 1;
    min-width: 0;
}

.course-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Merged: course-title base + transition */
.course-title {
    font-weight: 700;
    font-size: 0.97rem;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.25s ease;
}

.course-card-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.course-level-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.ccard-sep {
    color: rgba(0, 0, 0, 0.22);
    font-size: 0.75rem;
    line-height: 1;
    user-select: none;
}

body.dark-mode .ccard-sep {
    color: rgba(255, 255, 255, 0.2);
}

/* Inline AI Syllabus button — collapses to ✨ icon, expands on hover like ai-expand-btn */
.course-ai-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 3px;
    max-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    transition: var(--transition);
    gap: 0;
    white-space: nowrap;
    cursor: pointer;
    vertical-align: middle;
}

.course-ai-btn .btn-icon {
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    animation: aiSparkle 4s infinite ease-in-out;
}

.course-ai-btn:hover .btn-icon,
.course-ai-btn.processing-gold .btn-icon {
    color: var(--white);
    animation: none;
    filter: none;
}

.course-ai-btn .btn-text {
    opacity: 0;
    width: 0;
    display: inline-block;
    font-weight: 700;
    font-size: 0.72rem;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
    white-space: nowrap;
}

.course-ai-btn:hover,
.course-ai-btn.processing-gold {
    max-width: 120px;
    padding: 3px 8px;
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 3px 8px rgba(220, 161, 29, 0.3);
}

.course-ai-btn:hover .btn-icon,
.course-ai-btn.processing-gold .btn-icon {
    color: var(--white);
}

.course-ai-btn:hover .btn-text,
.course-ai-btn.processing-gold .btn-text {
    opacity: 1;
    margin-left: 4px;
    width: auto;
}

.course-body {
    padding: 0.6rem 1.2rem 1rem;
    flex: 1;
}

.course-desc {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.55;
    margin-bottom: 0.7rem;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.course-tag {
    font-size: 0.73rem;
    background: #f3f4f6;
    color: #374151;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    transition: background 0.25s ease, color 0.25s ease;
}

/* Per-card accent: RIGHT border + gradient header background */
.cc-blue {
    border-right: 4px solid #3b82f6;
}

.cc-green {
    border-right: 4px solid #10b981;
}

.cc-purple {
    border-right: 4px solid #7c3aed;
}

.cc-amber {
    border-right: 4px solid var(--accent);
}

.cc-teal {
    border-right: 4px solid #14b8a6;
}

.cc-rose {
    border-right: 4px solid #f43f5e;
}

.cc-blue .course-card-top {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.cc-green .course-card-top {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.cc-purple .course-card-top {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.cc-amber .course-card-top {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.cc-teal .course-card-top {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
}

.cc-rose .course-card-top {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
}

.cc-blue .course-icon-box {
    background: #bfdbfe;
    color: #1d4ed8;
}

.cc-blue .course-level-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.cc-blue:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.18);
}

.cc-blue:hover .course-title {
    color: #1d4ed8;
}

.cc-blue:hover .course-tag {
    background: #dbeafe;
    color: #1d4ed8;
}

.cc-blue:hover .course-icon-box {
    background: #93c5fd;
}

.cc-green .course-icon-box {
    background: #a7f3d0;
    color: #065f46;
}

.cc-green .course-level-badge {
    background: #d1fae5;
    color: #065f46;
}

.cc-green:hover {
    border-color: #10b981;
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.18);
}

.cc-green:hover .course-title {
    color: #065f46;
}

.cc-green:hover .course-tag {
    background: #d1fae5;
    color: #065f46;
}

.cc-green:hover .course-icon-box {
    background: #6ee7b7;
}

.cc-purple .course-icon-box {
    background: #ddd6fe;
    color: #5b21b6;
}

.cc-purple .course-level-badge {
    background: #ede9fe;
    color: #5b21b6;
}

.cc-purple:hover {
    border-color: #7c3aed;
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.18);
}

.cc-purple:hover .course-title {
    color: #5b21b6;
}

.cc-purple:hover .course-tag {
    background: #ede9fe;
    color: #5b21b6;
}

.cc-purple:hover .course-icon-box {
    background: #c4b5fd;
}

.cc-amber .course-icon-box {
    background: #fde68a;
    color: #92400e;
}

.cc-amber .course-level-badge {
    background: #fef3c7;
    color: #92400e;
}

.cc-amber:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.18);
}

.cc-amber:hover .course-title {
    color: #92400e;
}

.cc-amber:hover .course-tag {
    background: #fef3c7;
    color: #92400e;
}

.cc-amber:hover .course-icon-box {
    background: #fcd34d;
}

.cc-teal .course-icon-box {
    background: #99f6e4;
    color: #0f766e;
}

.cc-teal .course-level-badge {
    background: #ccfbf1;
    color: #0f766e;
}

.cc-teal:hover {
    border-color: #14b8a6;
    box-shadow: 0 8px 28px rgba(20, 184, 166, 0.18);
}

.cc-teal:hover .course-title {
    color: #0f766e;
}

.cc-teal:hover .course-tag {
    background: #ccfbf1;
    color: #0f766e;
}

.cc-teal:hover .course-icon-box {
    background: #5eead4;
}

.cc-rose .course-icon-box {
    background: #fecdd3;
    color: #be123c;
}

.cc-rose .course-level-badge {
    background: #ffe4e6;
    color: #be123c;
}

.cc-rose:hover {
    border-color: #f43f5e;
    box-shadow: 0 8px 28px rgba(244, 63, 94, 0.18);
}

.cc-rose:hover .course-title {
    color: #be123c;
}

.cc-rose:hover .course-tag {
    background: #ffe4e6;
    color: #be123c;
}

.cc-rose:hover .course-icon-box {
    background: #fda4af;
}

.cc-indigo {
    border-right: 4px solid #6366f1;
}

.cc-indigo .course-card-top {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.cc-indigo .course-icon-box {
    background: #c7d2fe;
    color: #4338ca;
}

.cc-indigo .course-level-badge {
    background: #e0e7ff;
    color: #4338ca;
}

.cc-indigo:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.18);
}

.cc-indigo:hover .course-title {
    color: #4338ca;
}

.cc-indigo:hover .course-tag {
    background: #e0e7ff;
    color: #4338ca;
}

.cc-indigo:hover .course-icon-box {
    background: #a5b4fc;
}

/* Dark mode course cards */
body.dark-mode .course-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .course-title {
    color: #e2e8f0;
}

body.dark-mode .course-desc {
    color: #94a3b8;
}

body.dark-mode .course-tag {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .cc-blue .course-card-top {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.08) 100%);
}

body.dark-mode .cc-green .course-card-top {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.08) 100%);
}

body.dark-mode .cc-purple .course-card-top {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18) 0%, rgba(124, 58, 237, 0.08) 100%);
}

body.dark-mode .cc-amber .course-card-top {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%);
}

body.dark-mode .cc-teal .course-card-top {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18) 0%, rgba(20, 184, 166, 0.08) 100%);
}

body.dark-mode .cc-rose .course-card-top {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.18) 0%, rgba(244, 63, 94, 0.08) 100%);
}

body.dark-mode .cc-indigo .course-card-top {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0.08) 100%);
}

/* Syllabus modal content */
.syllabus-modal-content {
    font-size: 0.9rem;
}

.syllabus-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid var(--accent);
}

.syllabus-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.syllabus-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
}

.syllabus-subtitle {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 3px;
}

.syllabus-body {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #374151;
}

.syllabus-body ol {
    padding-left: 1.5rem;
    margin: 0.35rem 0 1rem;
}

.syllabus-body ul {
    padding-left: 1.4rem;
    margin: 0.35rem 0 1rem;
    list-style: disc;
}

.syllabus-body li {
    margin-bottom: 0.3rem;
    line-height: 1.55;
}

.syllabus-body strong {
    display: block;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.syllabus-body strong:first-child {
    margin-top: 0;
}

.syllabus-disclaimer {
    margin-top: 0.9rem;
    font-size: 0.73rem;
    color: #94a3b8;
    font-style: italic;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.6rem;
    margin-bottom: 0;
}

body.dark-mode .syllabus-title {
    color: #7dd3fc;
}

body.dark-mode .syllabus-body {
    color: #cbd5e1;
}

body.dark-mode .syllabus-body strong {
    color: #38bdf8;
    border-bottom-color: #1e293b;
}

/* === 4.19.0: Conferences older-entry toggle === */
#attended-list .older-entry {
    display: none;
}

#attended-list.show-older .older-entry {
    display: list-item;
}

/* === 4.19: Selected Key Publications (in-contributions) === */
.sel-pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.85rem;
}

@media (max-width: 700px) {
    .sel-pub-grid {
        grid-template-columns: 1fr;
    }
}

.sel-pub-card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-left: 5px solid var(--primary);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.sel-pub-card:nth-child(5n+1) { border-left-color: var(--primary); }
.sel-pub-card:nth-child(5n+2) { border-left-color: var(--ref-2); }
.sel-pub-card:nth-child(5n+3) { border-left-color: var(--ref-3); }
.sel-pub-card:nth-child(5n+4) { border-left-color: var(--ref-4); }
.sel-pub-card:nth-child(5n+5) { border-left-color: var(--accent); }

.sel-pub-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.sel-pub-card:nth-child(5n+1):hover { border-color: var(--primary); }
.sel-pub-card:nth-child(5n+2):hover { border-color: var(--ref-2); }
.sel-pub-card:nth-child(5n+3):hover { border-color: var(--ref-3); }
.sel-pub-card:nth-child(5n+4):hover { border-color: var(--ref-4); }
.sel-pub-card:nth-child(5n+5):hover { border-color: var(--accent); }

.sel-pub-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 3px;
}

.sel-pub-meta {
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 4px;
}

.sel-pub-impact {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    background: rgba(6, 78, 59, 0.06);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 5px 9px;
    line-height: 1.4;
}

.sel-pub-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: center;
}

body.dark-mode .sel-pub-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .sel-pub-impact {
    background: rgba(6, 78, 59, 0.18);
    color: #6ee7b7;
}

body.dark-mode .sel-pub-title {
    color: #e2e8f0;
}

body.dark-mode .sel-pub-meta {
    color: #94a3b8;
}

/* === 4.20: About Me Hero Card === */
.about-hero-card {
    display: block;
    padding: 1.6rem;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 30%), linear-gradient(135deg, #edf7f2 0%, #f6f8f4 55%, #fff9ef 100%);
    border: 1px solid rgba(100, 116, 139, 0.2); /* Lighter Elegant Slate Gray */
    box-shadow: 0 12px 35px rgba(100, 116, 139, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.about-hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(100, 116, 139, 0.15);
    border-color: rgba(71, 85, 105, 0.4); /* Slate 600 */
}

.about-hero-card:hover::before {
    transform: scale(1.15);
}

.about-hero-card:hover::after {
    transform: scale(1.2);
}

.about-hero-card::before {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    width: 200px;
    height: 200px;
    top: -90px;
    right: -60px;
    background: rgba(6, 78, 59, 0.07);
    animation: tcpFloat 13s ease-in-out infinite;
    transition: transform 0.4s ease;
}

.about-hero-card::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    width: 130px;
    height: 130px;
    bottom: -55px;
    left: -40px;
    background: rgba(245, 158, 11, 0.1);
    animation: tcpFloat 10s ease-in-out infinite reverse;
    transition: transform 0.4s ease;
}

.about-hero-copy {
    position: relative;
    z-index: 1;
}

.about-hero-copy .section-title {
    border-left: none;
    padding-left: 0;
    font-size: 2.5rem;
    margin-bottom: 0;
}

body.dark-mode .about-hero-card {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.09), transparent 30%), linear-gradient(135deg, #162219 0%, #1a2b1f 55%, #221f0e 100%);
    border-color: rgba(148, 163, 184, 0.15); /* Slate 400 Lighter */
}

body.dark-mode .about-hero-card:hover {
    border-color: rgba(148, 163, 184, 0.4);
}

/* === 4.21: Highlighted Publications Marquee === */
.pub-mq-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.pub-mq-track {
    display: flex;
    width: max-content;
    overflow-x: hidden;
    gap: 18px;
    align-items: stretch;
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    scrollbar-width: none;
    padding: 14px 0 18px;
}

.pub-mq-track.run-animation {
    animation: pubMarquee 64s linear infinite;
}

.pub-mq-track.run-animation:hover {
    animation-play-state: paused;
}

@keyframes pubMarquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.pub-mq-track::-webkit-scrollbar {
    display: none;
}

.pub-mq-card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--card-border-color, var(--primary));
    border-radius: 12px;
    padding: 0.95rem 1.15rem;
    min-width: 340px;
    max-width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.pub-mq-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-color, var(--accent));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.pub-mq-journal {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-radius: 20px;
    padding: 4px 10px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    width: fit-content;
}

.pub-mq-title {
    font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.32;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.pub-mq-desc {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.4;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-mq-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

body.dark-mode .pub-mq-card {
    background: #1e293b;
    border-color: #334155;
    border-left-color: var(--primary);
}

body.dark-mode .pub-mq-journal {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.22);
}

body.dark-mode .pub-mq-title {
    color: #e2e8f0;
}

body.dark-mode .pub-mq-desc {
    color: #94a3b8;
}

body.dark-mode .pub-mq-actions {
    border-top-color: #334155;
}

/* AI description injected into list-view items */
.pub-list-ai-desc {
    font-size: 0.82rem;
    color: #555;
    font-style: italic;
    margin: 3px 0 5px 0;
    line-height: 1.5;
}

body.dark-mode .pub-list-ai-desc {
    color: #94a3b8;
}

/* Bento card tags — boost opacity in dark mode so they stay legible */
body.dark-mode .bento-h1 .bento-tag {
    background: rgba(244, 114, 182, 0.2);
    color: #fbcfe8;
    border-color: rgba(244, 114, 182, 0.4);
}

body.dark-mode .bento-h2 .bento-tag {
    background: rgba(96, 165, 250, 0.22);
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.4);
}


body.dark-mode .bento-v2 .bento-tag {
    background: rgba(167, 139, 250, 0.22);
    color: #ede9fe;
    border-color: rgba(167, 139, 250, 0.4);
}

body.dark-mode .bento-h3 .bento-tag {
    background: rgba(248, 113, 113, 0.22);
    color: #fee2e2;
    border-color: rgba(248, 113, 113, 0.4);
}

body.dark-mode .bento-v3 .bento-tag {
    background: rgba(74, 222, 128, 0.22);
    color: #dcfce7;
    border-color: rgba(74, 222, 128, 0.4);
}

/* =====================================================
   ACCESSIBILITY: prefers-reduced-motion
   Stops all decorative animations for users who
   have enabled "reduce motion" in their OS settings.
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Reveal elements appear instantly */
    .reveal {
        opacity: 1 !important;
        transform: translateY(0) !important;
        transition: none !important;
    }

    .reveal .edu-card,
    .reveal .exp-box,
    .reveal .bento-card,
    .reveal .patent-box,
    .reveal .award-card,
    .reveal .referee-card {
        opacity: 1 !important;
    }

    /* Hide purely decorative canvas/icon layers */
    #mol-canvas,
    #hi-layer {
        display: none !important;
    }

    /* Stop infinite looping animations */
    .hero-img,
    .hero-stats,
    .separator,
    .subtle-separator,
    .bento-card::before,
    .about-hero-card::before,
    .about-hero-card::after {
        animation: none !important;
    }

    /* Stop bridge and pill sweep animations */
    .hero-bridge-colour,
    .hero-seeking-line::before {
        animation: none !important;
    }
}
body.dark-mode .theme-toggle {
    color: var(--accent) !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

/* Background interactive particles canvas */
#bg-dots-canvas {
    display: none;
}

@media (min-width: 1150px) {
    #bg-dots-canvas {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: -1;
        pointer-events: none;
        background: transparent;
    }
}

/* ===== ACADEMIC & RESEARCH JOURNEY TIMELINE ===== */
.journey-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    flex-wrap: nowrap;
}

.journey-filter-btn {
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--card-border);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

@media (max-width: 900px) {
    .journey-filters {
        display: none !important;
    }
}

.journey-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    color: var(--accent);
}

.journey-filter-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.journey-timeline {
    position: relative;
    padding-right: 2.25rem;
    padding-left: 0;
    margin-top: 1rem;
}

.journey-timeline::before {
    content: '';
    position: absolute;
    right: 14px;
    left: auto;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent) 0%, var(--primary) 50%, var(--accent) 100%);
    border-radius: 4px;
}

/* Static arrowhead at the top of the trajectory timeline line */
.journey-timeline-arrow-top {
    position: absolute;
    right: 16px;
    top: 0px;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid var(--accent);
    z-index: 4;
}

/* Animated Upward-Flowing Arrow on Career Timeline Line */
.journey-timeline::after {
    content: '▲';
    position: absolute;
    right: 16px;
    transform: translateX(50%);
    font-size: 11px;
    color: #ef4444;
    z-index: 3;
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
    animation: flowUpwardTrajectory 6s infinite linear;
    pointer-events: none;
}

@keyframes flowUpwardTrajectory {
    0% {
        bottom: 10px;
        opacity: 0;
        transform: translateX(50%) scale(0.8);
    }
    10% {
        opacity: 1;
        transform: translateX(50%) scale(1.1);
    }
    90% {
        opacity: 1;
        transform: translateX(50%) scale(1.1);
    }
    100% {
        bottom: calc(100% - 20px);
        opacity: 0;
        transform: translateX(50%) scale(0.8);
    }
}

.journey-node {
    position: relative;
    margin-bottom: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.journey-marker {
    position: absolute;
    right: -34px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--variant-color, var(--primary));
    z-index: 2;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, color 0.3s ease;
    color: var(--variant-color, var(--primary));
    font-size: 0.85rem;
    font-weight: 800;
}

.journey-node:hover .journey-marker {
    transform: translateY(-50%) scale(1.25);
    background: var(--variant-color, var(--primary));
    color: var(--white);
}

.journey-card {
    position: relative;
    background: var(--card-bg, var(--white));
    border-radius: 12px;
    border: 1px dashed color-mix(in srgb, var(--variant-color, var(--primary)) 35%, transparent);
    border-top: 6px solid var(--variant-color, var(--primary));
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.journey-card-number {
    position: absolute;
    left: 0;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--card-bg, var(--white));
    border: 2px solid var(--variant-color, var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--variant-color, var(--primary));
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Outfit', sans-serif;
}

.journey-card:hover .journey-card-number {
    color: var(--white) !important;
    background: var(--variant-color) !important;
    border-color: var(--variant-color) !important;
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

body.dark-mode .journey-card-number {
    background: var(--card-bg, #1e293b);
}

body.dark-mode .journey-card:hover .journey-card-number {
    color: #0f172a !important;
}

.journey-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-style: solid;
    border-color: var(--variant-color);
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.journey-role {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    transition: color 0.3s ease;
}

.journey-card:hover .journey-role {
    color: var(--variant-color) !important;
}

.journey-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

body.dark-mode .journey-date {
    color: #94a3b8;
}

.journey-date-row {
    display: flex;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 8px;
}

.journey-badge-container {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Compact "Phase Recap" AI button sitting just before each career badge */
.journey-recap-btn {
    max-width: 34px !important;
    height: 34px !important;
    padding: 5px !important;
    border-radius: 20px !important;
    flex-shrink: 0;
}

.journey-recap-btn .btn-icon {
    min-width: 22px;
    font-size: 1.05rem;
}

.journey-recap-btn .btn-text {
    font-size: 0.78rem;
}

.journey-recap-btn:hover,
.journey-recap-btn.processing-gold {
    max-width: 190px !important;
    padding: 5px 14px !important;
}

.journey-inst-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.journey-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    color: var(--badge-color, var(--primary));
    background: transparent !important;
    transition: all 0.3s ease;
}

/* Fill background on card hover */
.journey-card:hover .journey-badge,
.journey-sub-card:hover .journey-badge {
    background: var(--badge-color, var(--primary)) !important;
    color: var(--white) !important;
}

body.dark-mode .journey-card:hover .journey-badge,
body.dark-mode .journey-sub-card:hover .journey-badge {
    color: #0f172a !important; /* high contrast dark text on gold background in dark mode */
}

.journey-desc {
    font-size: 0.92rem;
    color: #1f2937;
    font-weight: 500;
    line-height: 1.6;
}

/* Sub-timeline for nested traineeships */
.journey-sub-section {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.journey-sub-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.journey-sub-card {
    position: relative;
    background: rgba(0, 0, 0, 0.015);
    border: 1px dashed color-mix(in srgb, var(--variant-color, var(--primary)) 25%, transparent);
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.journey-sub-card:hover {
    background: color-mix(in srgb, var(--variant-color) 6%, var(--card-bg, var(--white))) !important;
    border-style: solid !important;
    border-color: var(--variant-color) !important;
    box-shadow: var(--shadow-md) !important;
    transform: translateX(4px) translateY(-2px) !important;
}

.journey-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.journey-sub-role {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.3s ease;
}

.journey-sub-card:hover .journey-sub-role {
    color: var(--variant-color) !important;
}

/* Prevent parent card hover from triggering sub-card badge/number highlights unless the sub-card itself is hovered */
.journey-card:hover .journey-sub-card:not(:hover) .journey-badge {
    background: transparent !important;
    color: var(--badge-color) !important;
}

/* Position sub-card numbers strictly on the middle right edge of the sub-boxes */
.journey-sub-card .journey-card-number {
    left: auto !important;
    right: 0 !important;
    top: 50% !important;
    transform: translate(50%, -50%) !important;
    background: var(--card-bg, var(--white));
    border-color: var(--variant-color);
    color: var(--variant-color);
    opacity: 1 !important;
}

.journey-card:hover .journey-sub-card:not(:hover) .journey-card-number {
    background: var(--card-bg, var(--white)) !important;
    color: var(--variant-color) !important;
    border-color: var(--variant-color) !important;
    transform: translate(50%, -50%) scale(1) !important;
    box-shadow: none !important;
}

body.dark-mode .journey-card:hover .journey-sub-card:not(:hover) .journey-card-number {
    background: #1e293b !important;
}

/* Specific sub-card hover animations for badge and number */
.journey-sub-card:hover .journey-badge {
    background: var(--badge-color) !important;
    color: var(--white) !important;
}

body.dark-mode .journey-sub-card:hover .journey-badge {
    color: #0f172a !important;
}

.journey-sub-card:hover .journey-card-number {
    color: var(--white) !important;
    background: var(--variant-color) !important;
    border-color: var(--variant-color) !important;
    transform: translate(50%, -50%) scale(1.15) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

body.dark-mode .journey-sub-card:hover .journey-card-number {
    color: #0f172a !important;
}

.journey-sub-date {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

/* Dark Mode Overrides */
body.dark-mode .journey-filter-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .journey-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

body.dark-mode .journey-filter-btn.active {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
}

body.dark-mode .journey-card {
    background: #1e293b;
    border-color: color-mix(in srgb, var(--variant-color, var(--primary)) 40%, transparent);
    color: #cbd5e1;
}

body.dark-mode .journey-role {
    color: #f8fafc;
}

body.dark-mode .journey-desc {
    color: #f1f5f9;
}

body.dark-mode .journey-marker {
    background: #1e293b;
}

body.dark-mode .journey-sub-section {
    border-top-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .journey-sub-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: color-mix(in srgb, var(--variant-color, var(--primary)) 30%, transparent);
}

body.dark-mode .journey-sub-card:hover {
    background: color-mix(in srgb, var(--variant-color) 10%, var(--card-bg, #1e293b)) !important;
}

body.dark-mode .journey-sub-role {
    color: #f1f5f9;
}

body.dark-mode .journey-sub-date {
    color: #94a3b8;
}

/* ===== PUBLICATIONS SEARCH HUB ===== */
.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.section-header-flex .section-title {
    margin-bottom: 0 !important;
    white-space: nowrap;
}

.section-header-flex .pub-controls,
.section-header-flex .tech-search-container {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.pub-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 260px;
}

.pub-search-icon {
    position: absolute;
    left: 1rem;
    color: #888;
    font-size: 1rem;
    pointer-events: none;
}

#pub-search-input {
    width: 100%;
    padding: 10px 2.2rem 10px 2.2rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--light-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#pub-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    background: var(--white);
}

#pub-clear-btn {
    position: absolute;
    right: 0.8rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 1rem;
    padding: 4px;
    display: none;
}

#pub-clear-btn:hover {
    color: var(--text);
}

.pub-quick-filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pub-filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-right: 4px;
    white-space: nowrap;
}

.pub-filter-buttons {
    display: flex;
    gap: 5px;
}

.pub-tag-btn {
    background: var(--white);
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pub-tag-btn:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.pub-tag-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pub-search-status {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 8px;
    padding-left: 4px;
}

.pub-highlight {
    background: rgba(245, 158, 11, 0.25);
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: inherit;
    border-bottom: 1.5px solid var(--accent);
}

/* Dark Mode Overrides for Pub Controls */
body.dark-mode .section-header-flex .pub-controls,
body.dark-mode .section-header-flex .tech-search-container {
    background: transparent;
    border: none;
    box-shadow: none;
}

body.dark-mode #pub-search-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode #pub-search-input:focus {
    background: #1e293b;
    border-color: var(--accent);
}

body.dark-mode .pub-tag-btn {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .pub-tag-btn:hover {
    border-color: var(--accent);
    color: var(--white);
}

body.dark-mode .pub-tag-btn.active {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}

body.dark-mode .pub-search-status {
    color: var(--accent);
}

/* ===== TECHNICAL SKILLS FINDER ===== */
.tech-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 280px;
}

.tech-search-icon {
    position: absolute;
    left: 1rem;
    color: #888;
    font-size: 1rem;
    pointer-events: none;
}

#tech-search-input {
    width: 100%;
    padding: 9px 2.2rem 9px 2.2rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--light-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#tech-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    background: var(--white);
}

#tech-clear-btn {
    position: absolute;
    right: 0.8rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 1rem;
    padding: 4px;
    display: none;
}

#tech-clear-btn:hover {
    color: var(--text);
}

.tech-search-status {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 8px;
    padding-left: 4px;
}

.tech-highlight {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 3px;
    padding: 0 2px;
}

.tech-dimmed {
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

/* Dark Mode Overrides for Tech Search */
body.dark-mode #tech-search-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode #tech-search-input:focus {
    background: #1e293b;
    border-color: var(--accent);
}

body.dark-mode .tech-search-status {
    color: var(--accent);
}

/* Responsive Rules: Display only on Desktop */
@media (max-width: 1024px) {
    .section-header-flex .tech-search-container {
        display: none !important;
    }
    
    .section-header-flex {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center !important;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        width: 100%;
    }
    
    .section-header-flex .section-title,
    .section-header-flex .unified-sub-heading {
        white-space: normal;
        flex: 1;
        min-width: 0;
        margin-bottom: 0 !important;
    }
    
    .tech-search-status {
        display: none !important;
    }

    .section-header-flex .pub-controls,
    .section-header-flex .vision-controls {
        display: flex !important;
        margin-left: 0;
        width: 100%;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .pub-search-box,
    .vision-search-box {
        width: 150px !important; /* Shorter search box so filters fit */
        flex-shrink: 0;
    }
    
    .pub-quick-filters {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .pub-filter-buttons {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .pub-search-status,
    .vision-search-status {
        display: block !important;
        text-align: left !important;
        margin-top: -0.5rem !important;
        margin-bottom: 1rem !important;
    }
}

/* Shorten search boxes on intermediate screens to prevent AI button wrapping out of boundaries */
@media (min-width: 1025px) and (max-width: 1350px) {
    .pub-search-box {
        width: 170px !important;
    }
    .vision-search-box {
        width: 145px !important;
    }
}

/* ===== FILTER DROPDOWN ===== */
.pub-filter-dropdown {
    position: relative;
    display: inline-block;
}

.pub-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background-color: var(--card-bg, #ffffff);
    min-width: 140px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    z-index: 100;
    overflow: hidden;
    transition: all 0.2s ease;
}

.pub-dropdown-menu a {
    color: var(--text);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.pub-dropdown-menu a:hover {
    background-color: var(--light-bg);
    color: var(--accent);
}

.pub-dropdown-menu.show {
    display: block;
}

body.dark-mode .pub-dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .pub-dropdown-menu a {
    color: #cbd5e1;
}

body.dark-mode .pub-dropdown-menu a:hover {
    background-color: #0f172a;
}

/* ===== FILTER HIGHLIGHT ===== */
.pub-item.pub-matched {
    border-left: 4px solid var(--accent) !important;
    background: rgba(245, 158, 11, 0.05) !important;
    padding-left: 16px !important;
    transition: all 0.3s ease;
}

body.dark-mode .pub-item.pub-matched {
    background: rgba(245, 158, 11, 0.1) !important;
}

/* ===== VISION SEARCH FINDER ===== */
.vision-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.vision-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px;
}

.vision-search-icon {
    position: absolute;
    left: 1rem;
    color: #888;
    font-size: 1rem;
    pointer-events: none;
}

#vision-search-input {
    width: 100%;
    padding: 9px 2.2rem 9px 2.2rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--light-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#vision-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    background: var(--white);
}

#vision-clear-btn {
    position: absolute;
    right: 0.8rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 1rem;
    padding: 4px;
    display: none;
}

#vision-clear-btn:hover {
    color: var(--text);
}

.vision-search-status {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 8px;
    padding-left: 4px;
}

.vision-highlight {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 3px;
    padding: 0 2px;
}

.vision-dimmed {
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

body.dark-mode #vision-search-input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode #vision-search-input:focus {
    background: #1e293b;
    border-color: var(--accent);
}

body.dark-mode .vision-search-status {
    color: var(--accent);
}

/* ===== ABOUT ME COLUMN BENTO GRID STACK ===== */
/* Wrapper to prevent AI button hover shift */
.ai-btn-container {
    width: 44px;
    height: 44px;
    position: relative;
    flex-shrink: 0;
}

.ai-btn-container .ai-magic-btn {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
    margin: 0 !important;
}

/* ===== FEATURED PUBLICATIONS VERTICAL SIDEBAR LAYOUT ===== */
.featured-publications-container {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.featured-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: var(--light-bg);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary);
    border-radius: 20px 5px 20px 5px;
    padding: 10px 4px;
    width: 48px;
    flex-shrink: 0;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
}

.featured-sidebar:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    border-left-color: var(--accent) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
    cursor: pointer;
}

body.dark-mode .featured-sidebar {
    background: #1e293b;
    border-color: #334155;
    border-left: 4px solid var(--accent);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
}

body.dark-mode .featured-sidebar:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    border-left-color: var(--accent) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.featured-rotated-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--primary) !important;
    white-space: nowrap;
    margin: 4px 0;
    transition: color 0.3s ease;
}

.featured-sidebar:hover .featured-rotated-title {
    color: #0f172a !important;
}

body.dark-mode .featured-rotated-title {
    color: var(--accent) !important;
    transition: color 0.3s ease;
}

body.dark-mode .featured-sidebar:hover .featured-rotated-title {
    color: #0f172a !important;
}

.featured-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pub-view-mini-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(6, 78, 59, 0.15);
    color: var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pub-view-mini-btn:hover {
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.featured-sidebar:hover .pub-view-mini-btn {
    background: #0f172a !important;
    color: var(--accent) !important;
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

body.dark-mode .pub-view-mini-btn {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(245, 158, 11, 0.25);
    color: var(--accent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

body.dark-mode .pub-view-mini-btn:hover {
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .featured-sidebar:hover .pub-view-mini-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.featured-content {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content .pub-mq-wrapper {
    margin: 0;
}

/* ===== RESEARCH VISION FILTER DROPDOWN ===== */
.vision-filter-dropdown {
    position: relative;
    display: inline-block;
}

.vision-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vision-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--white);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    margin-top: 6px;
    overflow: hidden;
}

.vision-dropdown-menu a {
    color: var(--text);
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.vision-dropdown-menu a:hover {
    background-color: var(--light-bg);
    color: var(--accent);
}

body.dark-mode .vision-dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
}

body.dark-mode .vision-dropdown-menu a {
    color: #f1f5f9;
}

body.dark-mode .vision-dropdown-menu a:hover {
    background-color: #334155;
    color: var(--accent);
}

/* ===== JOURNEY FILTERS TOOLTIP POSITION OVERRIDE ===== */
.journey-filters [data-tip]::after {
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(100% + 8px) !important;
    transform: translateX(-50%) !important;
}

/* Align Career Trajectory section header with timeline line */
@media (min-width: 901px) {
    .about-right .section-header-flex {
        margin-left: -1.5rem;
    }
}
@media (max-width: 900px) {
    .about-right .section-header-flex {
        margin-left: 0;
    }
}

/* ===== TABBED PORTFOLIO SHOWCASE FOR PATENTS & AWARDS ===== */
/* ===== AWARDS TITLE ROW (title + stats side-by-side on desktop) ===== */
.awards-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .awards-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ===== AWARDS STATS BANNER ===== */
.awards-stats-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 0.65rem 1.25rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.awards-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1.5rem;
    gap: 2px;
}

.awards-stat-num {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.awards-stat-label {
    font-size: 0.72rem;
    color: var(--text);
    opacity: 0.7;
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
}

.awards-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--card-border);
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .awards-stats-banner {
        gap: 0.5rem;
    }
    .awards-stat-divider {
        display: none;
    }
    .awards-stat-chip {
        padding: 0.4rem 1rem;
    }
}

/* ===== TAB COUNT BADGE ===== */
.tab-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 20px;
    padding: 0 5px;
    margin-left: 2px;
    line-height: 1;
    transition: all 0.3s ease;
}

.awards-tab-btn:not(.active) .tab-count-badge {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
    opacity: 0.7;
}

.awards-tab-btn.active .tab-count-badge {
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

/* ===== HERO SPOTLIGHT CARD (World Top 2%) ===== */
.award-hero-spotlight {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.35rem;
    border-radius: 16px;
    padding: 1.15rem 1.4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1a3a2a 0%, #0f2d40 60%, #1e1040 100%);
    border: 1px solid rgba(250, 204, 21, 0.25);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Left stat column: medal + Top 2% */
.award-hero-badgecol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding-right: 1.35rem;
    border-right: 1px solid rgba(250, 204, 21, 0.22);
    z-index: 1;
}

.award-hero-spotlight:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(250, 204, 21, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(250, 204, 21, 0.55);
}

/* Ambient glow orb */
.award-hero-glow {
    position: absolute;
    top: -60px;
    right: 80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.award-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(250, 204, 21, 0.05));
    border: 2px solid rgba(250, 204, 21, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.award-hero-spotlight:hover .award-hero-icon {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.35), rgba(250, 204, 21, 0.1));
    border-color: rgba(250, 204, 21, 0.65);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.25);
}

.award-hero-icon i {
    font-size: 1.4rem;
    color: #facc15;
}

.award-hero-copy {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.award-hero-label {
    display: block;
    font-size: 0.72rem;
    color: rgba(250, 204, 21, 0.85);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.award-hero-label i {
    margin-right: 5px;
}

.award-hero-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.3rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.award-hero-desc {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
    margin-bottom: 0;
    max-width: 520px;
}

.award-hero-pct {
    font-size: 1.65rem;
    font-weight: 900;
    color: #facc15;
    line-height: 1;
    text-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

@media (max-width: 680px) {
    .award-hero-spotlight {
        padding: 1rem 1.15rem;
        gap: 1rem;
    }
    .award-hero-badgecol {
        padding-right: 1rem;
    }
    .award-hero-title {
        font-size: 1.2rem;
    }
}

/* ===== GOLD-TIER AWARD CARDS ===== */
.award-tier-gold {
    border-color: rgba(250, 204, 21, 0.3) !important;
    background: linear-gradient(135deg, var(--card-bg), color-mix(in srgb, #facc15 4%, var(--card-bg))) !important;
}

.award-tier-gold:hover {
    border-color: #facc15 !important;
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.15) !important;
}

.awards-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    max-width: 1150px;
    margin: 0 auto 3rem auto;
}

@media (max-width: 1024px) {
    .awards-metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric-tab-btn {
    position: relative;
    padding: 0.85rem 1rem 0.7rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.05);
    border-bottom: 4px solid rgba(0,0,0,0.08);
    background: linear-gradient(135deg, var(--card-bg) 0%, color-mix(in srgb, var(--card-bg) 95%, transparent) 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 84px;
    transform: translateY(-4px);
    border-color: var(--accent);
    border-bottom-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}



.metric-tab-btn:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.metric-tab-btn:hover,
.metric-tab-btn.active {
    background: var(--accent);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent);
    border-color: var(--accent);
    border-bottom-color: color-mix(in srgb, var(--accent) 60%, #000);
}

body.dark-mode .metric-tab-btn {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-color: rgba(255,255,255,0.05);
    border-bottom: 4px solid rgba(0,0,0,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

body.dark-mode 

body.dark-mode .metric-tab-btn:hover,
.metric-tab-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, black) 100%);
    border-color: var(--accent);
    border-bottom-color: color-mix(in srgb, var(--accent) 40%, #000);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 20%, transparent);
}

.metric-tab-btn .mt-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.25rem;
    color: color-mix(in srgb, var(--text) 20%, transparent);
    transition: all 0.3s ease;
}

body.dark-mode .metric-tab-btn .mt-icon {
    color: rgba(255,255,255,0.15);
}

.metric-tab-btn:hover .mt-icon,
.metric-tab-btn.active .mt-icon {
    color: rgba(255,255,255,0.8) !important;
}

.metric-tab-btn .mt-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.15rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

body.dark-mode .metric-tab-btn .mt-num {
    color: #e2e8f0;
}

.metric-tab-btn:hover .mt-num, .metric-tab-btn.active .mt-num {
    color: var(--white) !important;
}

.metric-tab-btn .mt-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--sub-heading);
    transition: all 0.3s ease;
    margin-bottom: 0.4rem;
}

body.dark-mode .metric-tab-btn .mt-title {
    color: #38bdf8;
}

.metric-tab-btn:hover .mt-title, .metric-tab-btn.active .mt-title {
    color: rgba(255,255,255,0.95) !important;
}

.mt-stats-flex {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.mt-stat-group {
    display: flex;
    flex-direction: column;
}

.mt-stat-divider {
    width: 2px;
    height: 24px;
    background: #dc3545; /* Red color */
    margin: 0 4px;
    align-self: flex-end;
    margin-bottom: 4px;
}
body.dark-mode .mt-stat-divider {
    background: #ef4444; /* Bright red for dark mode */
}
.metric-tab-btn:hover .mt-stat-divider, .metric-tab-btn.active .mt-stat-divider {
    background: rgba(255,255,255,0.5) !important;
}

.mt-sub-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-top: 4px;
    white-space: nowrap;
}

body.dark-mode .mt-sub-label {
    color: #94a3b8;
}

.metric-tab-btn:hover .mt-sub-label, .metric-tab-btn.active .mt-sub-label {
    color: rgba(255,255,255,0.7) !important;
}



.awards-panel {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    margin-bottom: 2rem;
}
.awards-panel:last-child {
    margin-bottom: 0;
}
.awards-panel.active {
    opacity: 1;
    transform: translateY(0);
}

/* Awards grid: single column on mobile, two columns on wider screens */
@media (min-width: 768px) {
    .custom-awards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

body.dark-mode .awards-tab-btn {
    background: var(--white);
    color: var(--text);
    border-color: var(--card-border);
}

body.dark-mode .awards-tab-btn.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Award card year tag micro-interaction */
.award-year-tag i {
    transition: transform 0.3s ease;
    display: inline-block;
}

.award-card:hover .award-year-tag i {
    transform: translateY(-2px) scale(1.15);
}

/* Patent Highlight Number Badge */
.patent-highlight-num {
    color: #38bdf8;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    margin-right: 4px;
    display: inline-block;
}

/* Career Trajectory Card Mini-Timeline */
.trajectory-meta-grid {
    position: relative;
    padding-left: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-top: 1.5px dashed rgba(2, 132, 199, 0.45);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.92rem;
}

.trajectory-meta-grid::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(0, 0, 0, 0.08);
    z-index: 1;
}

body.dark-mode .trajectory-meta-grid::before {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .trajectory-meta-grid {
    border-top: 1.5px dashed rgba(56, 189, 248, 0.45);
}

.trajectory-meta-row {
    position: relative;
    line-height: 1.6 !important;
    color: #4b5563 !important;
}

body.dark-mode .trajectory-meta-row {
    color: #94a3b8 !important;
}

.trajectory-meta-row::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot-color, var(--primary));
    box-shadow: 0 0 0 3px var(--card-bg, #fff);
    z-index: 2;
    transition: transform 0.2s ease, background 0.2s ease;
}

body.dark-mode .trajectory-meta-row::before {
    box-shadow: 0 0 0 3px var(--card-bg, #1e293b);
}

.trajectory-meta-row:hover::before {
    transform: translate(-50%, -50%) scale(1.3);
    background: #ef4444;
}

/* Hero Section Repositioned Tagline Bridge */
.hero-profile-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
    pointer-events: auto;
}

.hero-profile-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.hero-tagline-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    animation: bridgeFadeIn 0.7s ease forwards;
    animation-delay: 1.2s;
}

.hero-tagline-relative {
    position: relative;
    width: 100%;
}

.hero-tagline-relative .hero-bridge-text {
    text-align: left !important;
}

.hero-tagline-relative .hero-bridge-colour {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #ffffff !important;
}

.hero-tagline-relative .hero-bridge-grey {
    color: rgba(255, 255, 255, 0.65) !important;
}

.hero-tagline-relative .hero-bridge-grey span {
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero-tagline-relative .btw-kw1 {
    color: #38bdf8 !important; /* glowing sky blue */
}

.hero-tagline-relative .btw-kw2 {
    color: #fbbf24 !important; /* glowing golden amber */
}

.hero-tagline-relative .btw-kw3 {
    color: #34d399 !important; /* glowing mint green */
}

/* Mobile Responsiveness for Repositioned Tagline */
@media (max-width: 1024px) {
    .hero-profile-container {
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        gap: 1.5rem !important;
    }
    
    .hero-profile-top {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }
    
    .hero-tagline-relative .hero-bridge-text {
        text-align: center !important;
    }
}

.traj-sub-list {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0;
}

.traj-sub-bullet {
    position: relative;
    padding-left: 1.25rem;
    margin-left: 0.75rem;
    padding-bottom: 0.3rem;
}

.traj-sub-bullet::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,0.1);
    z-index: 1;
}

body.dark-mode .traj-sub-bullet::before {
    background: rgba(255,255,255,0.1);
}

.traj-sub-sub-bullet {
    position: relative;
    padding-left: 1.25rem;
    margin-left: 2rem;
    padding-bottom: 0.3rem;
}

.traj-sub-sub-bullet::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,0.1);
    z-index: 1;
}

body.dark-mode .traj-sub-sub-bullet::before {
    background: rgba(255,255,255,0.1);
}

.traj-sub-sub-bullet::after {
    content: '';
    position: absolute;
    left: -16px;
    top: 0.8rem;
    width: 20px;
    height: 2px;
    background: rgba(0,0,0,0.1);
    z-index: 1;
}

body.dark-mode .traj-sub-sub-bullet::after {
    background: rgba(255,255,255,0.1);
}

.traj-sub-list > li:first-child::before {
    top: 0.8rem;
}

.traj-sub-list > li:last-child::before {
    bottom: auto;
    height: 0.8rem;
}

.sub-bullet-icon {
    position: absolute;
    left: 2px;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7280;
    z-index: 2;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.dark-mode .sub-bullet-icon {
    background: rgba(255, 255, 255, 0.5);
}

.traj-sub-bullet:hover .sub-bullet-icon,
.traj-sub-sub-bullet:hover .sub-bullet-icon {
    background: var(--primary); /* Turn to nice primary color on hover instead of gold/red/green */
    transform: scale(1.4);
    box-shadow: 0 0 6px var(--primary);
}

.traj-sub-bullet a:hover,
.traj-sub-sub-bullet a:hover {
    color: var(--accent) !important;
}

.trajectory-meta-grid a:hover, .trajectory-meta-row a:hover { color: var(--accent) !important; }


.impact-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 1024px) {
    .impact-split-layout {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   DARK MODE — TEXT CONTRAST FIXES
   Elements that kept light-theme colours (var(--primary)
   dark-green, var(--white) which flips to #1e293b, or
   hardcoded greys) were rendering low-contrast on the
   dark background. These overrides restore WCAG-AA
   legibility while preserving the brand palette.
   ===================================================== */

/* Lighter referee/accent hues so coloured text + borders read on dark cards */
body.dark-mode {
    --ref-1: #60a5fa;
    --ref-2: #f87171;
    --ref-3: #a78bfa;
    --ref-4: #22d3ee;
    --ref-5: #4ade80;
    --ref-6: #f0abfc;
}

/* Brand-green text (was var(--primary) #064e3b) → light emerald */
body.dark-mode .section-title,
body.dark-mode .patent-title,
body.dark-mode .award-top,
body.dark-mode .tech-sub-title,
body.dark-mode .inst-link,
body.dark-mode .tcp-kpi-label,
body.dark-mode .ref-inst-row a,
body.dark-mode .pub-item a:not(.btn-data):not(.btn-cite):not(.pub-doi):not(.cite-dropdown-item) {
    color: #34d399 !important;
}

/* Award year tag (was dark green) → light emerald */
body.dark-mode .award-year-tag,
body.dark-mode .award-year-tag i {
    color: #6ee7b7;
}

/* White text on coloured buttons/badges (var(--white) flips dark) → keep light */
body.dark-mode .btn-data,
body.dark-mode .verified-badge {
    color: #f8fafc !important;
}

/* Muted secondary text (hardcoded #444/#555/#666/#64748b) → light slate */
body.dark-mode .profile-text,
body.dark-mode .exp-desc,
body.dark-mode .referee-title-line,
body.dark-mode .event-meta {
    color: #94a3b8;
}

/* Small coloured labels: lift luminance while keeping hue */
body.dark-mode .journey-badge,
body.dark-mode .year-span {
    filter: brightness(1.55) saturate(1.05);
}

/* Dark mode — batch 2: elements using var(--white) as TEXT (flips to #1e293b)
   and inline color:var(--primary) links that render dark-on-dark. */
body.dark-mode .hero-name-span,
body.dark-mode .hero-contact .email-click,
body.dark-mode .hero-link-hover,
body.dark-mode .contact-item .email-click,
body.dark-mode .contact-footer-section h2,
body.dark-mode .bento-title,
body.dark-mode .stat-sub-item,
body.dark-mode .stat-sub-item span,
body.dark-mode .stat-group-header {
    color: #f1f5f9 !important;
}

/* Inline primary-coloured links (style="color:var(--primary)") → light emerald */
body.dark-mode a[style*="var(--primary)"] {
    color: #34d399 !important;
}

/* Muted vision/strategy list + paragraph greys (#555/#475569/#64748b) → light slate */
body.dark-mode .lab-structure li,
body.dark-mode .dei-cards li,
body.dark-mode .tcp-vision-text,
body.dark-mode .vision-statement,
body.dark-mode .roadmap-phase p,
body.dark-mode .roadmap-phase li {
    color: #94a3b8 !important;
}

/* Dark mode — batch 3: higher-specificity + inline-styled stragglers */

/* tech-sub-title (needs container specificity to beat base) + culture-card headings */
body.dark-mode .tech-card .tech-sub-title,
body.dark-mode .culture-card h4,
body.dark-mode .culture-card h3 {
    color: #34d399 !important;
}

/* Publication titles + list text */
body.dark-mode .pub-item strong {
    color: #f1f5f9 !important;
}
body.dark-mode li.pub-item {
    color: #cbd5e1;
}

/* Inline-styled dark greys (#444/#555/#666) applied via style="" */
body.dark-mode [style*="color:#444"],
body.dark-mode [style*="color: #444"],
body.dark-mode [style*="color:#555"],
body.dark-mode [style*="color: #555"],
body.dark-mode [style*="color:#666"],
body.dark-mode [style*="color: #666"] {
    color: #94a3b8 !important;
}

/* TCP vision / KPI paragraph greys */
body.dark-mode .tcp-vision-copy p,
body.dark-mode .tcp-kpi p,
body.dark-mode .tcp-kpi-desc {
    color: #94a3b8 !important;
}

/* Dark mode — batch 4: referee links, publication italics/list text,
   accordion list body text, and max-specificity tech-sub-title. */
body.dark-mode .referee-name a {
    color: #34d399 !important;
}
body.dark-mode .pub-item em {
    color: #cbd5e1 !important;
}
body.dark-mode li.pub-item,
body.dark-mode .tech-ul li,
body.dark-mode .panel-content li {
    color: #cbd5e1 !important;
}
body.dark-mode .tech-panel-grid .tech-sub-title {
    color: #34d399 !important;
}

/* =====================================================
   MOBILE — Patents & Awards metric tabs
   (relocated after base rules so equal-specificity
   overrides actually win; base .mt-sub-label had
   white-space:nowrap which clipped "Total Recognitions")
   ===================================================== */
@media (max-width: 600px) {
    .awards-metric-grid {
        gap: 0.8rem;
    }
    .metric-tab-btn {
        padding: 0.7rem 0.8rem;
        min-height: 72px;
    }
    .metric-tab-btn .mt-title {
        font-size: 0.8rem;
        padding-right: 0;
        margin-bottom: 0.25rem;
    }
    .metric-tab-btn .mt-num {
        font-size: 1.45rem;
    }
    .metric-tab-btn .mt-icon {
        font-size: 1.2rem;
        top: 0.8rem;
        right: 0.8rem;
    }
    .metric-tab-btn .mt-stats-flex {
        margin-top: 0.8rem;
    }
    .metric-tab-btn .mt-sub-label {
        font-size: 0.68rem;
        white-space: normal;
        letter-spacing: 0;
        line-height: 1.2;
    }
}

/* =====================================================
   DARK MODE — Research Vision & Lab Strategy boxes
   Fixes: pastel/white card backgrounds, tech-card
   gradient-to-white, missing/faint card outlines and
   hover outline-colour on roadmap & funding cards.
   ===================================================== */

/* Vision & Research Themes cards kept pastel light bg */
body.dark-mode .tcp-focus-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}
body.dark-mode .tcp-focus-card .tfc-title {
    color: #f1f5f9;
}
body.dark-mode .tcp-focus-card .tfc-desc,
body.dark-mode .tcp-focus-card .tech-ul li {
    color: #cbd5e1;
}

/* Expertise tech-cards: base gradient ended in white (#f8fafc) */
body.dark-mode .tech-card {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

/* Roadmap phase cards (.edu-card): visible outline + coloured top + hover */
body.dark-mode #roadmap-funding .edu-card {
    border: 1px solid #475569;
}
body.dark-mode #roadmap-funding .edu-card.edu-phd { border-top: 4px solid var(--edu-phd); }
body.dark-mode #roadmap-funding .edu-card.edu-msc { border-top: 4px solid var(--edu-msc); }
body.dark-mode #roadmap-funding .edu-card.edu-bsc { border-top: 4px solid var(--edu-bsc); }
body.dark-mode #roadmap-funding .edu-card:hover {
    border-color: var(--variant-color);
}

/* Funding Logic / Partnership / Growth cards: consistent outline + coloured top */
body.dark-mode #roadmap-funding .strategy-card-item {
    border: 1px solid #475569;
}
body.dark-mode #roadmap-funding .strategy-card-item:nth-child(1) { border-top: 4px solid #0ea5e9; }
body.dark-mode #roadmap-funding .strategy-card-item:nth-child(2) { border-top: 4px solid #10b981; }
body.dark-mode #roadmap-funding .strategy-card-item:nth-child(3) { border-top: 4px solid #f43f5e; }

/* Nav: Home on desktop, About-dropdown on mobile (≤900px) */
.nav-mobile-only { display: none; }
.nav-desktop-only { display: list-item; }
@media (max-width: 900px) {
    .nav-desktop-only { display: none; }
    /* About is a dropdown — keep nav-item-dropdown flex layout so its
       label + chevron share one row like Vision/Publications */
    .nav-mobile-only.nav-item-dropdown { display: flex; }
    .nav-mobile-only { display: block; }
}

/* Publications: gold-barred meta line (journal + DOI/Cite buttons) — matches Conferences */
.pub-meta {
    display: block;
    margin-top: 5px;
    margin-left: 2px;
    padding-left: 8px;
    border-left: 3px solid var(--accent);
    line-height: 1.7;
}
.pub-meta em {
    color: var(--text);
    opacity: 0.85;
}
body.dark-mode .pub-meta em {
    color: #cbd5e1;
    opacity: 1;
}

/* Tighten heading→content gap in Publications & Research Vision (title sat in a
   flex header whose margin stacked with the title's own margin) */
.section-heading-row .section-title {
    margin-bottom: 0;
}

/* =====================================================
   Dark mode — batch 5: restore hover outline colours +
   consistent accent edges across Vision / Funding / Lab
   Model / Teaching / Culture / Course / Expertise /
   Referee cards.

   Cause: the dark base border rules (`body.dark-mode .card`)
   carry the `body` element, out-specifying the light-mode
   `.card:hover` border-colour rules (no `body`), so the
   coloured hover outline never applied in dark. Some cards
   also had their side borders left near-invisible or their
   accent edge flattened. Fixes use end-of-file source order
   (and !important only where the base itself is !important).
   ===================================================== */

/* Vision & Research Themes — base border-colour is !important, so hover must be too */
body.dark-mode .tcp-focus-card-1:hover { border-color: #0ea5e9 !important; }
body.dark-mode .tcp-focus-card-2:hover { border-color: #10b981 !important; }
body.dark-mode .tcp-focus-card-3:hover { border-color: #f43f5e !important; }
body.dark-mode .tcp-focus-card-4:hover { border-color: #8b5cf6 !important; }
body.dark-mode .tcp-focus-card-5:hover { border-color: var(--accent) !important; }
body.dark-mode .tcp-focus-card-6:hover { border-color: #14b8a6 !important; }

/* Funding Logic & Growth Strategy (roadmap) — base carries #id, so scope hover to match */
body.dark-mode #roadmap-funding .strategy-card-item:nth-child(1):hover { border-color: #0ea5e9; }
body.dark-mode #roadmap-funding .strategy-card-item:nth-child(2):hover { border-color: #10b981; }
body.dark-mode #roadmap-funding .strategy-card-item:nth-child(3):hover { border-color: #f43f5e; }

/* TCP Lab Model & Partnerships (lab-section) — visible grey sides + coloured top + hover */
body.dark-mode #lab-model .lab-section {
    border: 1px solid #475569;
    border-top: 4px solid var(--panel-accent);
}
body.dark-mode #lab-model .lab-section:nth-child(1):hover { border-color: #0ea5e9; }
body.dark-mode #lab-model .lab-section:nth-child(2):hover { border-color: #10b981; }
body.dark-mode #lab-model .lab-section:nth-child(3):hover { border-color: #8b5cf6; }

/* Teaching & Training Philosophy (strategy cards, incl. Mentorship Model) —
   uniform visible grey sides + coloured top (matches Funding), hover = accent */
body.dark-mode #tcp-culture + .panel .strategy-card-item { border: 1px solid #475569; }
body.dark-mode #tcp-culture + .panel .strategy-card-item:nth-child(1) { border-top: 4px solid #0ea5e9; }
body.dark-mode #tcp-culture + .panel .strategy-card-item:nth-child(2) { border-top: 4px solid #10b981; }
body.dark-mode #tcp-culture + .panel .strategy-card-item:nth-child(3) { border-top: 4px solid #f43f5e; }
body.dark-mode #tcp-culture + .panel .strategy-card-item:nth-child(1):hover { border-color: #0ea5e9; }
body.dark-mode #tcp-culture + .panel .strategy-card-item:nth-child(2):hover { border-color: #10b981; }
body.dark-mode #tcp-culture + .panel .strategy-card-item:nth-child(3):hover { border-color: #f43f5e; }

/* Core Lab Culture (culture-card) — visible grey box + coloured left edge + hover */
body.dark-mode .culture-card { border: 1px solid #475569; }
body.dark-mode .culture-card:nth-child(1) { border-left: 5px solid #22c55e; }
body.dark-mode .culture-card:nth-child(2) { border-left: 5px solid var(--accent); }
body.dark-mode .culture-card:nth-child(3) { border-left: 5px solid #8b5cf6; }
body.dark-mode .culture-card:nth-child(1):hover { border-color: #22c55e; }
body.dark-mode .culture-card:nth-child(2):hover { border-color: var(--accent); }
body.dark-mode .culture-card:nth-child(3):hover { border-color: #8b5cf6; }

/* Teaching Portfolio & Courses (course-card) — brighter base outline + coloured hover */
body.dark-mode .course-card { border-color: #475569; }
body.dark-mode .cc-blue:hover   { border-color: #3b82f6; }
body.dark-mode .cc-green:hover  { border-color: #10b981; }
body.dark-mode .cc-purple:hover { border-color: #7c3aed; }
body.dark-mode .cc-amber:hover  { border-color: #f59e0b; }
body.dark-mode .cc-teal:hover   { border-color: #14b8a6; }
body.dark-mode .cc-rose:hover   { border-color: #f43f5e; }
body.dark-mode .cc-indigo:hover { border-color: #6366f1; }

/* Expertise tech-cards — hover accent outline (base border carries `body`) */
body.dark-mode .tech-card:hover { border-color: var(--tc-accent); }

/* Academic Referees — restore coloured top edge + coloured hover outline */
body.dark-mode .referee-card { border-top: 5px solid var(--ref-color, #ccc); }
body.dark-mode .referee-card:hover { border-color: var(--ref-color); }

/* ============================================================
   Low-power mode
   `body.low-power` is set by initLowPowerMode() in scripts.js when the device
   reports few cores or little memory, or when a frame-rate sample comes back
   slow. Backdrop blur makes the browser re-blur whatever sits behind the
   element on every scroll frame, which is the heaviest thing on the page for
   integrated graphics — the sticky header re-blurs the full viewport width
   continuously while scrolling.

   Only the frosting is dropped. Each element keeps whatever background its
   theme gives it, so light and dark mode both stay correct.
   ============================================================ */
body.low-power header,
body.low-power .hero-stats,
body.low-power .tcp-kpi,
body.low-power .ai-terminal-inline,
body.low-power .ai-modal-overlay,
body.low-power .bento-icon-wrapper,
body.low-power .bento-tag,
body.low-power .pub-view-mini-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ============================================================
   Dark mode — restore hover colours on headings and names

   The dark theme pins a lot of heading/link text to emerald with
   `color: #34d399 !important`. Because !important outranks specificity, it
   also overrode the :hover rules that are supposed to tint those headings
   with their card's accent, so in dark mode they simply never changed.

   Each rule below re-states the hover intent at higher specificity and with
   !important, which is the only way to outrank the blanket rules above.
   ============================================================ */

/* Expertise & Technical Proficiencies — the accents are mid-tone and sit at
   roughly 2.6:1 on the dark card, so they are lightened here before being
   used for the border and the heading hover. */
body.dark-mode .tc-blue { --tc-accent: #60a5fa; }
body.dark-mode .tc-green { --tc-accent: #2dd4bf; }
body.dark-mode .tc-purple { --tc-accent: #a78bfa; }
body.dark-mode .tc-orange { --tc-accent: #fb923c; }

body.dark-mode .tech-card:hover .tech-sub-title,
body.dark-mode .tech-card:hover .tech-sub-title i {
    color: var(--tc-accent) !important;
}

/* Academic Referees — the names are links, and the blanket rule on
   `.referee-name a` was what pinned them to emerald. --ref-1..6 are already
   lightened for dark mode, so the card's own colour can be used directly. */
body.dark-mode .referee-card:hover .referee-name,
body.dark-mode .referee-card:hover .referee-name a {
    color: var(--ref-color) !important;
}

/* Core Lab Culture — amber is unchanged between themes and reads well on dark. */
body.dark-mode .culture-card:hover h4 {
    color: var(--accent) !important;
}

/* ---- AI buttons: fixed footprint + overlay reveal. Each button stays at its
   collapsed icon size (so it NEVER grows the layout or reflows/wraps anything).
   On hover / while processing / on press (touch), the label appears as ONE gold
   pill anchored at the button's right edge and extending LEFT — the icon sits on
   top of the pill's right end so it reads as a single box, and the pill is free
   to overlay whatever text sits to its left. ---- */
.ai-expand-btn,
.course-ai-btn {
    position: relative;
    overflow: visible !important;
}

/* Hold the button at its collapsed size on reveal (cancel the base rightward
   growth); the label pill carries the gold background, so the button goes
   transparent. Lift it above neighbouring content. */
.ai-expand-btn:hover, .ai-expand-btn.processing-gold, .ai-expand-btn:active {
    max-width: 44px !important;
    padding: 8px !important;
    background-color: transparent !important;
    box-shadow: none !important;
    z-index: 20;
}

.journey-recap-btn:hover, .journey-recap-btn.processing-gold, .journey-recap-btn:active {
    max-width: 34px !important;
    padding: 5px !important;
}

.course-ai-btn:hover, .course-ai-btn.processing-gold, .course-ai-btn:active {
    max-width: 26px !important;
    padding: 3px !important;
    background-color: transparent !important;
    box-shadow: none !important;
    z-index: 20;
}

/* Icon stays put, above the pill. */
.ai-expand-btn .btn-icon,
.course-ai-btn .btn-icon {
    position: relative;
    z-index: 2;
}

/* The label pill: same height as the button, right edge flush with the button's
   right edge, extending left; right padding leaves room for the icon on top. */
.ai-expand-btn .btn-text,
.course-ai-btn .btn-text {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    z-index: 1;
    margin: 0 !important;
    width: auto !important;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 40px 0 14px;
    background: var(--accent);
    color: var(--white);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
}

.journey-recap-btn .btn-text {
    padding-right: 30px;
}

.course-ai-btn .btn-text {
    padding-right: 24px;
    font-size: 0.72rem;
}

/* Reveal the pill (hover / processing / touch press). */
.ai-expand-btn:hover .btn-text,
.ai-expand-btn.processing-gold .btn-text,
.course-ai-btn:hover .btn-text,
.course-ai-btn.processing-gold .btn-text {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (hover: none) {
    .ai-expand-btn:active .btn-text,
    .course-ai-btn:active .btn-text {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Utility: hard hide (wins over .ai-expand-btn's !important display) */
.is-hidden { display: none !important; }

/* Submit button uses the icon-pill pattern but is not an AI action — no sparkle */
#submit-btn .btn-icon { animation: none !important; }

/* Footer form buttons (Send / AI Draft / Synergy): the row has room, so let
   them expand IN-FLOW as a single pill (label inside the box) that pushes the
   neighbouring buttons aside instead of overlaying/hiding them. This overrides
   the fixed-footprint overlay used elsewhere — footer only. */
.form-actions .ai-expand-btn {
    overflow: hidden !important;
}

.form-actions .ai-expand-btn:hover,
.form-actions .ai-expand-btn.processing-gold,
.form-actions .ai-expand-btn:active {
    max-width: 250px !important;
    padding: 8px 18px !important;
    background-color: var(--accent) !important;
    box-shadow: 0 4px 10px rgba(220, 161, 29, 0.3) !important;
    z-index: auto;
}

/* Label flows inline within the pill (not an absolute overlay). */
.form-actions .ai-expand-btn .btn-text {
    position: static;
    transform: none;
    left: auto;
    right: auto;
    height: auto;
    display: inline-block;
    width: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    color: inherit;
    font-size: 0.9rem;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
}

.form-actions .ai-expand-btn:hover .btn-text,
.form-actions .ai-expand-btn.processing-gold .btn-text,
.form-actions .ai-expand-btn:active .btn-text {
    opacity: 1;
    width: auto;
    margin-left: 8px !important;
}



/* Mobile: let content sections use nearly the full width (like the header and
   footer) instead of the desktop 2rem side padding. */
@media (max-width: 900px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Mobile: shorter header bar (was 60px), matching body offset (removes the light
   strip that showed between the header and content) and search-overlay offset. */
@media (max-width: 900px) {
    header {
        height: 42px;
    }
    body {
        padding-top: 42px;
    }
    .header-content {
        padding-top: 0;
        padding-bottom: 0;
    }
    .srch-overlay {
        padding-top: calc(46px + env(safe-area-inset-top)) !important;
    }
}
