/* 
******************************************************
* ⚠️ Proprietary Styles – Do not copy or reuse       *
* Author: Arcosoph                                   *
* All rights reserved                                *
******************************************************
*/

/* ==========================================
   ARCOSOPH - CORPORATE WEBSITE
   ========================================== */

/* --- THEME COLORS --- */
:root {
    --accent: #1a73e8;
    --accent-2: #9334e6;
    --accent-3: #34a853;
    --accent-gradient: linear-gradient(135deg, #1a73e8 0%, #9334e6 100%);
    --accent-light: rgba(26, 115, 232, 0.1);
    --accent-light-2: rgba(147, 52, 230, 0.1);
    --accent-hover: #1557b0;
    --font-main: 'Roboto', sans-serif;
    --font-display: 'Google Sans', 'Roboto', sans-serif;
    --navbar-height: 62px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
    --card-shadow-hover: 0 20px 40px rgba(26, 115, 232, 0.15);
    --text-light: #9aa0a6;
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --text: #202124;
    --text-muted: #5f6368;
    --border: #dadce0;
    --border-light: #f1f3f4;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg: #000000;
    --bg-light: #050505;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --text-light: #888888;
    --border: #1a1a1a;
    --border-light: #0d0d0d;
    --card-bg: #0a0a0a;
    --nav-bg: rgba(0, 0, 0, 0.95);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    --card-shadow-hover: 0 20px 40px rgba(26, 115, 232, 0.2);
}

body {
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: var(--accent);
    transition: color .2s;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    line-height: 1.2;
    color: var(--text);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 500;
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: 1.4rem;
    font-weight: 500;
}

h4 {
    font-size: 1.1rem;
    font-weight: 500;
}

/* --- UTILITIES --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.bg-light {
    background: var(--bg-light);
}

.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header.centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.75rem;
    max-width: 650px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-weight: 500;
    font-family: var(--font-display);
    font-size: 0.95rem;
    white-space: nowrap;
}

.link-arrow span {
    transition: transform .2s;
}

.link-arrow:hover span {
    transform: translateX(4px);
}

.link-arrow:hover {
    color: var(--accent-hover);
}

/* --- BUTTONS --- */
.btn-primary-lg {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.45);
}

.btn-primary-lg svg {
    transition: transform 0.3s ease;
}

.btn-primary-lg:hover svg {
    transform: translateX(4px);
}

.btn-ghost-lg {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--border);
    padding: 0.85rem 1.8rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-ghost-lg:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.btn-outline-sm {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.btn-outline-sm:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.btn-primary-sm {
    background: var(--accent-2);
    color: white;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}

.btn-primary-sm:hover {
    background: #1557b0;
}

.btn-outline-md {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: inline-block;
    margin-top: 1.5rem;
}

.btn-outline-md:hover {
    background: var(--accent);
    color: white;
}

.btn-white-lg {
    background: white;
    color: var(--accent);
    border: none;
    padding: 0.85rem 1.8rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: inline-block;
    margin-top: 2rem;
}

.btn-white-lg:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
}

.btn-white-md {
    background: white;
    color: var(--accent);
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.btn-white-md:hover {
    background: #f8f9fa;
}

.btn-outline-inv {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.btn-outline-inv:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* ========================
   NAVBAR
======================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    height: var(--navbar-height);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

/* Theme Toggle */
.theme-toggle-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.5rem;
    transition: var(--transition);
    font-size: 1.25rem;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .theme-toggle-btn {
    background: #111;
    border-color: #222;
}

.theme-toggle-btn svg {
    width: 22px;
    height: 22px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.theme-toggle-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn {
    background: #2d2d2d;
    border-color: #444;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border-bottom-color: transparent;
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
    /* Pushed further to edges */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.logo-name {
    height: 18px;
    width: auto;
    object-fit: contain;
    /* Remove filters that might distort colors */
    transition: var(--transition);
}

[data-theme="dark"] .logo-name {
    /* If the logo is dark text on transparent, we make it white with a subtle glow for maximum visibility */
    filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.logo img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
}

.hamburger:hover {
    background: var(--bg-light);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* NAV LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* Increased gap */
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
}

.nav-link:hover {
    color: var(--accent);
    background: var(--bg-light);
}

.nav-link.github-link {
    margin-left: 0.5rem;
}

.caret {
    font-size: 0.6rem;
    opacity: 0.5;
    margin-top: 2px;
}

.btn-signin {
    color: #fff;
    background: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-signin:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

/* DROPDOWN PANEL */
.dropdown-panel {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    display: none;
    min-width: 550px;
    /* Even wider mega menu */
    flex-direction: row;
    gap: 2rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.dropdown:hover .dropdown-panel {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 180px;
}

.dropdown-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    margin-top: 0.25rem;
}

.dropdown-item {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    color: var(--text);
    transition: background .15s;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--text);
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.dropdown-item-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

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

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 0.35rem;
    border-radius: 4px;
    transition: color .2s, background .2s;
}

.search-toggle:hover {
    color: var(--text);
    background: var(--bg-light);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    width: 240px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

[data-theme="light"] .search-box {
    background: #f1f3f4;
    border-color: #dfe1e5;
}

[data-theme="dark"] .search-box {
    background: #1a1a1a;
    border-color: #333;
}

.search-box:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(26, 115, 232, 0.25);
    transform: translateY(-1px);
}

.search-box:focus-within {
    background: var(--card-bg);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light), 0 6px 20px rgba(0, 0, 0, 0.12);
    width: 320px;
}

.search-icon-svg {
    color: var(--text-muted);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.search-box:focus-within .search-icon-svg {
    color: var(--accent);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    color: var(--text);
    outline: none;
    font-family: var(--font-main);
    min-width: 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.88rem;
}

.search-kbd {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    font-family: 'Roboto Mono', monospace;
    flex-shrink: 0;
    line-height: 1.4;
}

.search-box:focus-within .search-kbd {
    display: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.4rem 0;
}

[data-theme="dark"] .search-results {
    background: #111;
    border-color: #2a2a2a;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .dropdown-panel {
    background: #111;
    border-color: #2a2a2a;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
}

.search-results.show {
    display: block;
}

.search-result-item {
    display: block;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-light);
    transform: translateX(4px);
}

.search-result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--accent);
    transition: width 0.2s ease;
}

.search-result-item:hover::before {
    width: 4px;
}

.search-result-meta {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    padding: 2px 6px;
    background: var(--accent-light);
    border-radius: 4px;
}

.search-result-item strong {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: block;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.search-result-item:hover strong {
    color: var(--accent);
}

.search-result-snippet {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.5;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Search Results Enhanced ── */
.search-no-results {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.search-no-results svg {
    opacity: 0.3;
    margin-bottom: 0.25rem;
}

.search-no-results p {
    font-size: 0.95rem;
    color: var(--text);
    margin: 0;
}

.search-no-results span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Highlighted match terms */
.search-result-snippet mark {
    background: rgba(26, 115, 232, 0.18);
    color: var(--accent);
    border-radius: 2px;
    padding: 0 2px;
    font-style: normal;
}

[data-theme="dark"] .search-result-snippet mark {
    background: rgba(26, 115, 232, 0.3);
}

/* Results list wrapper */
.search-results-list {
    padding: 0.3rem 0;
}

/* Results footer */
.search-results-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.25rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: 0 0 14px 14px;
}

.search-hint {
    opacity: 0.6;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.68rem;
}

/* Active keyboard-navigated result */
.search-result-item.active {
    background: var(--bg-light);
    transform: translateX(4px);
}

.search-result-item.active::before {
    width: 4px;
}

.search-result-item.active strong {
    color: var(--accent);
}

/* Result title */
.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: block;
    margin-bottom: 4px;
    transition: color 0.2s;
    line-height: 1.3;
}

.search-result-item:hover .search-result-title,
.search-result-item.active .search-result-title {
    color: var(--accent);
}

/* Result header row */
.search-result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

/* ── Suggestions Panel (history / trending) ── */
.search-suggestions-panel {
    padding: 0.4rem 0;
}

.search-suggestions-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 1.25rem 0.25rem;
}

.search-suggestion-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 0;
}

.search-suggestion-row:hover,
.search-suggestion-row.active {
    background: var(--bg-light);
}

.search-suggestion-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.search-suggestion-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text);
}

.search-suggestion-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.search-suggestion-badge.history {
    background: var(--accent-light);
    color: var(--accent);
}

.search-suggestion-badge.trending {
    background: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

/* ── Suggestion chips (shown above results) ── */
.search-suggestions-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.search-suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.7rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.search-suggestion-chip:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-1px);
}

[data-theme="dark"] .search-suggestions-chips {
    border-color: #1e1e1e;
}

[data-theme="dark"] .search-suggestion-chip {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #aaa;
}

[data-theme="dark"] .search-suggestions-panel {
    background: transparent;
}

[data-theme="dark"] .search-suggestion-row:hover,
[data-theme="dark"] .search-suggestion-row.active {
    background: #111;
}

[data-theme="dark"] .search-results-footer {
    background: #0a0a0a;
    border-color: #1a1a1a;
}

/* MOBILE DRAWER */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: var(--bg);
    z-index: 2000;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.mobile-drawer.open {
    left: 0;
}

.mobile-search-trigger {
    display: none;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.drawer-header .logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drawer-close {
    background: var(--bg-light);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.drawer-close:hover {
    background: var(--border-light);
    color: var(--text);
}

.drawer-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.drawer-search .search-box {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-search .search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 0.95rem;
    width: 100%;
}

.drawer-search .search-box input::placeholder {
    color: var(--text-muted);
}

.drawer-search .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin: 0.5rem 1.5rem 1rem;
    width: calc(100% - 3rem);
}

.drawer-search .search-results.show {
    display: block;
}

.drawer-search .search-result-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    transition: background 0.2s;
}

.drawer-search .search-result-item:last-child {
    border-bottom: none;
}

.drawer-search .search-result-item:hover {
    background: var(--bg-light);
}

.drawer-search .search-result-meta {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.drawer-search .search-result-item strong {
    font-size: 0.9rem;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}

.drawer-search .search-result-snippet {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drawer-search {
    position: relative;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    overflow-y: auto;
    flex: 1;
}

.drawer-nav a {
    padding: 1rem 1.5rem;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1rem;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-nav a.drawer-sub-link {
    padding-left: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.drawer-section-label {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.drawer-section-label:hover {
    background: var(--bg-light);
}

.drawer-section-label:active {
    background: var(--border-light);
}

.drawer-section-label .caret-icon {
    font-size: 1.25rem;
    transition: transform 0.3s;
    opacity: 0.5;
    color: var(--text-muted);
}

.drawer-section-label.active .caret-icon {
    transform: rotate(180deg);
}

.drawer-sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-light);
}

.drawer-section-label.active+.drawer-sub-menu {
    max-height: 500px;
}

.drawer-sub-link {
    padding: 0.85rem 3rem !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    font-weight: 400 !important;
    border-bottom: none;
}

.drawer-sub-link:hover {
    color: var(--accent) !important;
    background: transparent !important;
}

.drawer-nav a:hover {
    background: var(--bg-light);
    color: var(--accent);
}

.drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drawer-footer .btn-signin {
    display: block;
    text-align: center;
    padding: 0.85rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
}

.drawer-footer .social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.drawer-footer .social-links a {
    padding: 0.5rem;
    color: var(--text-muted);
}

/* ========================
   PROJECT / RESEARCH CARDS
======================== */
.project-card-refined {
    margin-bottom: 5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.project-image-box {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

@media (max-width: 1024px) {
    .project-card-refined {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .project-image-box {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .project-card-refined {
        margin-bottom: 3rem;
    }

    .project-image-box {
        padding: 2rem 1rem;
    }
}

/* ========================
   ABOUT / STORY PAGE
======================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        text-align: center;
    }
}

/* ========================
   CAREERS / ROLES
======================== */
.role-card-refined {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

@media (max-width: 600px) {
    .role-card-refined {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .role-card-refined .btn-primary-sm {
        width: 100%;
    }
}

/* ========================
   HERO OVERRIDES
======================== */
.hero.centered-hero {
    background: var(--bg-light) !important;
    padding: 8rem 0 4rem;
    text-align: center;
}

.hero.centered-hero .container {
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero.centered-hero {
        padding: 6rem 0 3rem;
    }

    .hero.centered-hero h1 {
        font-size: 2.2rem !important;
    }
}

.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
}

.drawer-overlay.show {
    display: block;
}

/* ========================
   ANNOUNCEMENT BAR
======================== */
.announcement-bar {
    background: var(--accent-gradient);
    color: white;
    padding: 0.65rem 0;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 100;
    display: none;
}

.announcement-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.announcement-bar a {
    color: white;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

/* ========================
   HERO
======================== */
.hero {
    padding: calc(var(--navbar-height) + 3.5rem) 0 7rem;
    overflow: hidden;
    background: var(--bg);
    position: relative;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(147, 52, 230, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    display: flex;
    align-items: center;
    /* Balanced vertical centering */
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image-wrap {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Old orbs - replaced by hero-bg */
.hero-orb {
    display: none;
}

.hero-img {
    width: 100%;
    max-width: 520px;
    height: auto;
    animation: float 6s ease-in-out infinite;
}

/* ===== ENHANCED HERO STYLES ===== */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-gradient-1 {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

.hero-gradient-2 {
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(147, 52, 230, 0.12) 0%, transparent 70%);
    animation: pulse 10s ease-in-out infinite reverse;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

[data-theme="light"] .hero-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
}

[data-theme="light"] .hero-gradient-1 {
    background: radial-gradient(circle, rgba(26, 115, 232, 0.25) 0%, transparent 70%);
    opacity: 0.8;
}

[data-theme="light"] .hero-gradient-2 {
    background: radial-gradient(circle, rgba(147, 52, 230, 0.2) 0%, transparent 70%);
    opacity: 0.8;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.hero-content {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(26, 115, 232, 0.1);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #9334e6 50%, #1a73e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 540px;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-primary-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary-lg:hover {
    background: #1557b0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.35);
}

.btn-primary-lg svg {
    transition: transform 0.3s ease;
}

.btn-primary-lg:hover svg {
    transform: translateX(4px);
}

.btn-secondary-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary-lg:hover {
    background: var(--bg-light);
    border-color: var(--accent);
    color: var(--accent);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-light);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-img-wrap {
    position: relative;
    max-width: 600px;
    width: 100%;
}

.hero-img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.1));
    animation: floating-img 6s ease-in-out infinite;
}

@keyframes floating-img {

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

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

@keyframes glow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-badge {
        font-size: 0.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .cta-group {
        flex-direction: column;
    }

    .btn-primary-lg,
    .btn-secondary-lg {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        text-align: center;
    }

    .hero-visual {
        display: flex;
        width: 100%;
        margin-top: 2rem;
    }

    .hero-img-wrap {
        max-width: 400px;
        margin: 0 auto;
    }
}

@keyframes float {

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

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

/* ========================
   PARTNERS
======================== */
.partners {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.partners-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 0 2rem;
}

.partner-logo {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: #b0b8c4;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color .2s;
    cursor: default;
}

.partner-logo:hover {
    color: var(--text-muted);
}

/* ========================
   NEWS SECTION
======================== */
.news-section {
    padding: 6rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .25s;
    color: var(--text);
    overflow: hidden;
    height: 100%;
}

.news-img-box {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: var(--bg-light);
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img {
    transform: scale(1.1);
}

.news-card .news-tag,
.news-card h3,
.news-card p,
.news-card .news-date,
.news-card .card-link {
    padding: 0 1.5rem;
}

.news-card .news-tag {
    margin-top: 1.5rem;
}

.news-card .card-link {
    margin-bottom: 2rem;
}

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

.news-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.news-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.news-date {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.card-link {
    margin-top: auto;
}

/* --- BLOG CARDS --- */
.blog-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 25px 50px rgba(26, 115, 232, 0.15) !important;
    border-color: var(--accent) !important;
}

.blog-thumb {
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-thumb {
    transform: scale(1.05);
}

/* ========================
   VIDEO SECTION
======================== */
.video-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg) 100%);
}

.video-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.video-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow .3s, transform .3s, border-color .3s;
    color: var(--text);
    position: relative;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity .3s;
}

.video-card:hover {
    box-shadow: 0 20px 40px rgba(26, 115, 232, 0.15);
    transform: translateY(-8px);
    border-color: var(--accent);
}

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

.video-thumb {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.video-thumb iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.25rem 1.5rem 1.5rem;
}

.video-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--accent-light);
}

.video-info h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* THUMB BOX */
.video-thumb-box {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.video-thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
    z-index: 1;
}

.video-card:hover .video-thumb-img {
    transform: scale(1.05);
}

.video-play-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 0px rgba(235, 50, 35, 0.4);
}

.play-icon {
    width: 32px;
    height: 32px;
    fill: #eb3223;
    /* Modern Vibrant Red */
    transition: transform 0.3s ease;
}

/* Subtle Heartbeat Pulse */
@keyframes play-pulse {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 0px rgba(235, 50, 35, 0.4);
    }

    70% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 15px rgba(235, 50, 35, 0);
    }

    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 0px rgba(235, 50, 35, 0);
    }
}

.video-play-ring {
    animation: play-pulse 2s infinite;
}

.video-card:hover .video-play-ring,
.video-card:active .video-play-ring {
    background: #eb3223;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(235, 50, 35, 0.5);
    animation: none;
    /* Stop pulse to keep it steady on hover */
}

.video-card:hover .play-icon,
.video-card:active .play-icon {
    fill: #ffffff;
    transform: scale(1.1);
}

.video-thumb-label {
    position: absolute;
    bottom: 0.75rem;
    left: 1rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    z-index: 2;
}

.video-thumb-duration {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

/* MODAL */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.video-modal.show {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.video-modal-box {
    position: relative;
    width: 90%;
    max-width: 960px;
    z-index: 10;
}

.video-modal-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.video-modal-frame {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.video-modal-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================
   RESEARCH SECTION
======================== */
.research-section {
    padding: 6rem 0;
}

.research-layout {
    display: flex;
    align-items: center;
    gap: 6rem;
}

.research-text {
    flex: 1;
}

.research-text h2 {
    margin-bottom: 1rem;
}

.research-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.research-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat span {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

.research-image {
    flex: 1;
}

.research-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--card-shadow-hover);
}

/* ========================
   ECOSYSTEM SECTION
======================== */
.ecosystem-section {
    padding: 6rem 0;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.eco-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow .3s, transform .3s, border-color .3s;
    position: relative;
    overflow: hidden;
}

.eco-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity .3s;
}

.eco-card:hover {
    box-shadow: 0 20px 40px rgba(26, 115, 232, 0.12);
    transform: translateY(-6px);
    border-color: var(--accent);
}

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

.eco-card--featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.05) 0%, white 100%);
}

.eco-card--featured::before {
    content: 'FEATURED';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
    opacity: 1;
}

.eco-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.eco-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.eco-tag {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: block;
}

.eco-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.eco-link {
    margin-top: auto;
}

/* ========================
   COMMUNITY SECTION
======================== */
.community-section {
    padding: 6rem 0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.community-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow .25s, transform .25s;
    color: var(--text);
}

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

.community-icon {
    width: 64px;
    height: 64px;
    background: #fff5f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.community-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.community-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

/* ========================
   CAREERS SECTION
======================== */
.careers-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #202124, #2d2f32);
}

.careers-inner {
    display: flex;
    align-items: center;
    gap: 6rem;
}

.careers-text {
    flex: 1.2;
}

.careers-text .section-label {
    color: rgba(255, 255, 255, 0.5);
}

.careers-text h2 {
    color: white;
    font-size: 2.5rem;
}

.careers-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-top: 1rem;
}

.careers-stats {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.careers-stat {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.25rem;
}

.careers-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.careers-stat span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}


/* ========================
   TERMINAL SECTION
======================== */
.terminal-section {
    padding: 8rem 0;
}

.terminal-section .section-header {
    margin-bottom: 3rem;
}

.terminal-section h2 {
    font-size: 2.5rem;
    margin-top: 1rem;
}

.terminal-section .section-subtitle {
    margin: 1rem auto 0;
    max-width: 650px;
}

.terminal-window {
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Roboto Mono', monospace;
}

.terminal-header {
    background: #1a1a1a;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #222;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.terminal-title {
    color: #888;
    font-size: 0.8rem;
    margin-left: 2rem;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 2.5rem;
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1.8;
}

.t-line {
    margin-bottom: 0.5rem;
}

.t-prompt {
    color: var(--accent);
    margin-right: 10px;
    font-weight: 700;
}

.t-success {
    color: #4ade80;
}

.t-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: var(--accent);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ========================
   IMPACT SECTION
======================== */
.impact-section {
    position: relative;
    background: linear-gradient(rgba(26, 115, 232, 0.82), rgba(147, 52, 230, 0.82)),
        url('https://pub-812e108f164d4805821c37cb3d3810f1.r2.dev/images/common/beautifull_bangladesh_place_2880x1386.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 10rem 0;
    overflow: hidden;
    text-align: center;
}

[data-theme="dark"] .impact-section {
    background: linear-gradient(rgba(10, 12, 16, 0.88), rgba(10, 12, 16, 0.88)),
        url('https://pub-812e108f164d4805821c37cb3d3810f1.r2.dev/images/common/beautifull_bangladesh_place_2880x1386.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.impact-val {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: white !important;
    margin-bottom: 0.5rem;
    line-height: 1;
    -webkit-text-fill-color: initial;
    background: none;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.impact-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================
   ECOSYSTEM / PRODUCTS
======================== */
.ecosystem-section {
    padding: 5rem 0;
}

.ecosystem-section .section-header {
    margin-bottom: 4rem;
}

.ecosystem-section h2 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

.ecosystem-section .section-subtitle {
    max-width: 600px;
    margin: 0 auto;
}

.product-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- CONTACT / STAY CONNECTED --- */
.contact-section {
    padding: 3rem 0;
    /* Reduced as requested */
    background: var(--bg);
    border-top: 1px solid var(--border-light);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
}

.contact-info .display-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.social-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.social-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text);
    transition: var(--transition);
    text-align: center;
    gap: 0.5rem;
}

.social-tile:hover {
    background: var(--card-bg);
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
}

.tile-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    color: var(--accent);
    transition: var(--transition);
}

.social-tile:hover .tile-icon {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Brand Colors on Hover */
.social-tile:hover .tile-icon--yt {
    background: #ff0000;
    border-color: #ff0000;
}

.social-tile:hover .tile-icon--x {
    background: #000000;
    border-color: #000000;
}

.social-tile:hover .tile-icon--discord {
    background: #5865F2;
    border-color: #5865F2;
}

.social-tile:hover .tile-icon--fb {
    background: #1877F2;
    border-color: #1877F2;
}
.social-tile:hover .tile-icon--email {
    background: #000000;
    border-color: #000000;
}

.social-tile:hover .tile-icon--qtm {
    background: #000000;
    border-color: #000000;
}

.social-tile:hover .tile-icon--hf {
    background: #facc15;
    border-color: #facc15;
    color: #000;
}

.social-tile span {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

@media (max-width: 480px) {
    .social-tile {
        padding: 0.75rem 0.4rem;
        gap: 0.35rem;
    }

    .tile-icon {
        width: 32px;
        height: 32px;
    }

    .tile-icon svg {
        width: 18px;
        height: 18px;
    }

    .social-tile span {
        font-size: 0.7rem;
    }
}

.tile-icon--yt {
    color: #ff0000;
}

.contact-form-wrap {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text);
    opacity: 0.9;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text);
    font-family: var(--font-main);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    background: var(--card-bg);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.contact-form textarea {
    height: 150px;
    resize: none;
}

.form-footer {
    margin-top: 2rem;
    text-align: right;
}

/* Transition to Dark Footer */
.contact-footer-overlap {
    background: #f8f9fa;
    height: 120px;
    margin-bottom: -1px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 40%);
}

/* ========================
   UNIFIED FOOTER
   ======================== */
.footer {
    background: #000000;
    color: white;
    padding: 2rem 0 1rem;
    position: relative;
    z-index: 10;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    padding-bottom: 2rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    color: white !important;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.footer-socials {
    display: flex;
    gap: 1.2rem;
}

.social-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-btn:hover {
    background: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1.8rem;
    color: white;
    font-weight: 700;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white !important;
    transform: translateX(6px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ========================
   ANIMATIONS
======================== */
/* ========================
   ANIMATIONS
======================== */

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delayed-1 {
    transition-delay: 0.12s;
}

.delayed-2 {
    transition-delay: 0.24s;
}

.delayed-3 {
    transition-delay: 0.36s;
}

/* ========================
   COMPACT PRODUCTS GRID
   ======================== */
.product-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.product-box {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.product-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.product-box-icon {
    font-size: 2.4rem;
    margin-bottom: 1.2rem;
}

.product-box h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.product-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.product-box a {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

/* --- SOCIAL LINKS BAR --- */
.social-links-bar {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    padding: 1.5rem 3rem;
    border-radius: 100px;
    display: inline-flex;
    gap: 2rem;
}

.social-link-item {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    transition: var(--transition);
}

.social-link-item:hover {
    background: var(--card-bg);
    color: var(--accent);
}

/* --- DARK MODE BUTTON OVERRIDES --- */
/* [data-theme="dark"] .contact-container,
[data-theme="dark"] .bg-light {
    background-color: var(--bg-light) !important;
}

[data-theme="dark"] .product-box,
[data-theme="dark"] .contact-form-wrap {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
} */

/* --- DARK MODE BUTTON OVERRIDES --- */
[data-theme="dark"] .bg-light {
    background-color: var(--bg-light) !important;
}

[data-theme="dark"] .product-box,
[data-theme="dark"] .contact-form-wrap {
    background-color: var(--card-bg) !important; 
    border-color: var(--border-light) !important; 
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    background-color: #000000 !important;
    border-color: #222222 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form textarea:focus {
    border-color: var(--accent) !important;
}

/* --- UNIFIED FOOTER --- */
.footer {
    background: #000;
    color: white;
    padding: 2rem 0 1rem;
    border-top: 1px solid #222;
    position: relative;
    z-index: 10;
}

.footer-inner-wrap {
    padding: 0 4rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    padding-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    color: white !important;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.footer-socials {
    display: flex;
    gap: 1.2rem;
}

.social-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-btn:hover {
    background: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1.8rem;
    color: white;
    font-weight: 700;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white !important;
    transform: translateX(6px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ==========================================
   RESPONSIVE DESIGN SYSTEM (Final Polish)
   ========================================== */

/* Utility class used in index.html */
.text-center {
    text-align: center !important;
}

/* --- TABLETS & LARGE MOBILE --- */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
        padding: 0 1rem;
    }

    .hero-visual,
    .hero-img-wrap,
    .hero-image-wrap {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .hero-text {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .product-mini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .research-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .careers-inner {
        flex-direction: column;
        gap: 2rem;
    }

    .news-grid,
    .video-carousel,
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Better tablet layout */
    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .terminal-section {
        padding: 5rem 0 !important;
    }

    .contact-section {
        padding: 4rem 0;
    }

    .footer-links-grid {
        gap: 3rem;
    }
}

/* --- MOBILE LANDSCAPE & SMALL TABLETS --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .footer-inner-wrap {
        padding: 0 1.5rem !important;
    }

    h1 {
        font-size: clamp(2.2rem, 8vw, 3rem) !important;
    }

    h2 {
        font-size: clamp(1.8rem, 6vw, 2.2rem) !important;
    }

    .hero p {
        font-size: 1.1rem !important;
    }

    .nav-right .btn-signin,
    .nav-right .github-link {
        display: none;
    }

    .announcement-inner {
        flex-wrap: wrap;
        text-align: center;
        gap: 0.5rem;
        padding: 0.5rem 1.5rem;
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-mini-grid,
    .news-grid,
    .video-carousel {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }

    .contact-info .display-title,
    .contact-info p {
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding-bottom: 1.5rem;
    }

    .footer-links-grid {
        grid-template-columns: 1fr 1fr;
        justify-items: center;
        gap: 2rem;
    }

    .footer-col {
        text-align: center;
    }
    
    .footer-bottom {
        padding-top: 1rem;
    }

    /* Mobile Navbar Search - stay in-place expansion */
    #navbar .search-box {
        display: none;
    }

    #navbar .search-container {
        display: none;
    }

    /* When search is expanded on mobile top navbar */
    #navbar.search-expanded .nav-left,
    #navbar.search-expanded #themeToggle,
    #navbar.search-expanded .hamburger,
    #navbar.search-expanded .btn-signin,
    #navbar.search-expanded .github-link {
        display: none !important;
    }

    #navbar.search-expanded .mobile-search-trigger {
        display: none !important;
    }

    #navbar.search-expanded .search-container {
        display: flex !important;
        flex: 1;
        width: 100% !important;
        /* Force full width minus some padding */
        padding: 0 0.5rem;
    }

    #navbar.search-expanded .search-box {
        display: flex !important;
        width: 100% !important;
        background: var(--bg-light) !important;
    }

    /* Full width search results on mobile top navbar */
    #navbar.search-expanded .search-results {
        width: calc(100vw - 3rem) !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 10px !important;
        max-height: 80vh !important;
    }

    .mobile-search-trigger {
        display: flex !important;
        background: none;
        border: none;
        color: var(--text);
        padding: 4px;
        margin-right: 0.25rem;
        cursor: pointer;
        align-items: center;
        justify-content: center;
    }

    /* Mobile navbar layout - prevent items piling on top */
    .nav-right {
        gap: 0.5rem !important;
        flex: 1;
        justify-content: flex-end;
    }

    /* Enhanced tablet fixes */
    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        width: 100%;
    }

    .hero-text p {
        margin: 0 auto 2rem;
    }

    .cta-group {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .section-header.centered {
        align-items: center;
    }

    .terminal-section {
        padding: 4rem 0 !important;
    }

    .terminal-window {
        margin: 0;
    }

    .impact-section {
        padding: 4rem 0 !important;
    }

    .social-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .drawer-overlay {
        backdrop-filter: blur(3px);
    }
}

/* --- SEARCH OVERLAY --- */
#fullSearchOverlay {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#fullSearchOverlay.active {
    top: 0;
}

#fullSearchOverlay .close-search-overlay {
    align-self: flex-end;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text);
    margin-bottom: 2rem;
}

#fullSearchOverlay .search-box {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex !important;
}

#fullSearchOverlay .search-results {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    position: relative;
    top: 0;
}

.product-box {
    display: none;
}

/* Default (Light Mode) */
#loadMoreProductsBtn,
#loadMoreNewsBtn {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;

    background: #f5f5f5;
    color: #222;

    border: 1px solid rgba(0,0,0,0.1);

    transition: all 0.25s ease;
}

#loadMoreProductsBtn:hover,
#loadMoreNewsBtn:hover {
    background: #eaeaea;
    border-color: rgba(0,0,0,0.2);
}

/* Dark Mode */
html[data-theme="dark"] #loadMoreProductsBtn,
html[data-theme="dark"] #loadMoreNewsBtn {
    background: transparent;
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.15);
}

html[data-theme="dark"] #loadMoreProductsBtn:hover,
html[data-theme="dark"] #loadMoreNewsBtn:hover {
    color: white;
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.05);
}

/* Click effect */
#loadMoreProductsBtn:active,
#loadMoreNewsBtn:active {
    transform: scale(0.96);
}

/* --- SMALL PHONES --- */
@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem !important;
    }

    .hero-text p {
        max-width: 100%;
        font-size: 1rem !important;
    }

    .social-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .community-grid {
        grid-template-columns: 1fr;
    }

    .btn-primary-lg,
    .btn-ghost-lg {
        width: 100%;
        margin-bottom: 0px;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    /* Fixed 'Standardizing Intelligence' Shift & Gap */
    .ecosystem-section {
        padding: 4rem 0;
    }

    .product-mini-grid {
        grid-template-columns: 1fr;
        width: 100%;
        margin: 0;
    }

    .product-box {
        width: 100%;
        box-sizing: border-box;
    }

    /* Enhanced Mobile Responsive Fixes */
    section {
        padding: 3rem 0 !important;
    }

    .hero {
        padding: calc(var(--navbar-height) + 2rem) 0 3rem !important;
        min-height: auto;
    }

    .hero-inner {
        gap: 1.5rem !important;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header.centered {
        align-items: center;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .news-card,
    .video-card,
    .product-box {
        padding: 1.25rem;
    }

    .impact-grid {
        gap: 1.5rem !important;
    }

    .impact-stat {
        padding: 1rem;
    }

    .terminal-window {
        padding: 1rem;
    }

    .terminal-header {
        padding: 0.75rem 1rem;
    }

    .terminal-body {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.75rem;
    }

    .video-thumb-label {
        font-size: 0.8rem;
    }

    .video-info h4 {
        font-size: 1rem;
    }

    .video-info p {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .drawer-sub-menu {
        background: var(--bg) !important;
    }

    .news-tag,
    .video-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .section-label {
        font-size: 0.65rem;
    }

    .link-arrow {
        font-size: 0.9rem;
    }

    .announcement-bar {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    .announcement-inner {
        flex-direction: column;
        gap: 0.25rem;
    }

    .search-box {
        padding: 0.5rem 0.75rem;
    }

    .search-icon-svg {
        width: 18px;
        height: 18px;
    }

    #fullSearchOverlay {
        padding: 1rem;
    }

    #fullSearchOverlay .close-search-overlay {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .video-modal-box {
        width: 95%;
        max-width: none;
        padding: 1rem;
    }

    /* Reduced motion for better mobile performance */
    @media (prefers-reduced-motion: reduce) {

        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* Mobile-specific animation optimizations */
    @media (max-width: 768px) {
        .fade-up {
            opacity: 1 !important;
            transform: none !important;
        }

        .hero-img {
            animation: none !important;
        }

        .video-play-ring {
            animation: none !important;
        }

        .terminal-body .t-line {
            animation: none !important;
            opacity: 1 !important;
            display: block !important;
        }

        /* Remove hover transforms on mobile */
        .news-card:hover,
        .video-card:hover,
        .product-box:hover,
        .blog-card:hover {
            transform: none;
        }

        /* Keep basic transitions but make them faster */
        * {
            transition-duration: 0.15s !important;
        }
    }
}

/* ========================
   NAV AVATAR (auth state)
======================== */
.nav-avatar-wrap {
    position: relative;
}

.nav-avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--accent-gradient);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    padding: 0;
}

.nav-avatar-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-avatar-initials {
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-display);
    line-height: 1;
}

.nav-avatar-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    z-index: 2000;
    display: none;
    overflow: hidden;
}

[data-theme="dark"] .nav-avatar-dropdown {
    background: #111;
    border-color: #222;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.nav-avatar-dropdown.open { display: block; }

.nav-avatar-info {
    padding: 0.9rem 1rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.nav-avatar-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-avatar-email {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-avatar-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    text-align: left;
}

.nav-avatar-item:hover { background: var(--bg-light); }

.nav-avatar-signout {
    color: #ea4335;
    border-top: 1px solid var(--border-light);
}

[data-theme="dark"] .nav-avatar-item:hover { background: #1a1a1a; }
[data-theme="dark"] .nav-avatar-info { border-color: #1e1e1e; }
[data-theme="dark"] .nav-avatar-signout { border-color: #1e1e1e; }

/* ==========================================
   RESEARCH & DATASETS CUSTOM STYLES
   ========================================== */

/* Frame for HF Embed Viewer */
.hf-embed-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    margin: 2.5rem 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: left;
}
.hf-embed-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
}
.hf-embed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.hf-embed-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.hf-embed-badge {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
[data-theme="dark"] .hf-embed-badge {
    background: rgba(26, 115, 232, 0.2);
}
.hf-iframe-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--bg-light);
    height: 560px;
}
.hf-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Datasets Explorer Page */
.datasets-header-section {
    padding: 6rem 0 3rem;
    text-align: center;
    position: relative;
}
.datasets-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}
.filter-btn {
    background: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.filter-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}
.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.datasets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}
.dataset-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    text-align: left;
}
.dataset-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--card-shadow-hover);
}
.dataset-card-top {
    margin-bottom: 1.5rem;
}
.dataset-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.dataset-card-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-2);
    letter-spacing: 1px;
}
.dataset-card-size {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
}
.dataset-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.dataset-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.dataset-stats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}
.dataset-stat-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.dataset-card-actions {
    display: flex;
    gap: 0.75rem;
}
.dataset-card-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-display);
    transition: var(--transition);
}
.dataset-btn-primary {
    background: var(--accent);
    color: white;
}
.dataset-btn-primary:hover {
    background: var(--accent-hover);
    color: white;
}
.dataset-btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}
.dataset-btn-secondary:hover {
    background: var(--border-light);
    color: var(--text);
}

/* Terminal Snippet Box */
.terminal-snippet-wrapper {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
}
.terminal-snippet-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e8eaed;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.terminal-snippet-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}
.terminal-snippet-copy svg {
    width: 16px;
    height: 16px;
}
.terminal-snippet-copy.copied {
    background: var(--accent-3);
    border-color: var(--accent-3);
    color: white;
}

/* ==========================================
   ADVANCED RESEARCH HUB CSS
   ========================================== */

/* Split Framework Cards */
.split-framework-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3.5rem;
    transition: var(--transition);
}
.split-framework-card:hover {
    border-color: var(--accent);
    box-shadow: var(--card-shadow-hover);
}
.framework-install-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.framework-install-col h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.framework-info-col {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.framework-info-col p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Tabbed Dataset Console */
.dataset-console {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
}
.dataset-console::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
}
.dataset-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.25rem;
}
.dataset-tabs-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.dataset-console-tab-btn {
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.dataset-console-tab-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}
.dataset-console-tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.25);
}
.dataset-console-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}
.dataset-console-meta span strong {
    color: var(--text);
}

/* Preprint Cards & Academic layout */
.preprints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}
.paper-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    text-align: left;
}
.paper-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--card-shadow-hover);
}
.paper-card-top {
    margin-bottom: 1.5rem;
}
.paper-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    font-family: 'Roboto Mono', monospace;
    color: var(--text-light);
}
.paper-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
}
[data-theme="dark"] .paper-tag {
    background: rgba(26, 115, 232, 0.2);
}
.paper-card h3 {
    font-size: 1.3rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text);
}
.paper-authors {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}
.paper-abstract {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Math Formula Rendering */
.math-formula-box {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.25rem 0 1.5rem 0;
    text-align: center;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 0.92rem;
    color: var(--text);
    overflow-x: auto;
    white-space: nowrap;
    border-left: 3px solid var(--accent);
}

.math-symbol {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-weight: bold;
}

@media (max-width: 900px) {
    .split-framework-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
}

/* Progress bar for dataset carousel */
.dataset-progress-bar-container {
    width: 100%;
    height: 3px;
    background: var(--border-light);
    position: relative;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    overflow: hidden;
}
.dataset-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
}

/* LaTeX CSS Fraction layout */
.math-fraction {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    margin: 0 0.5rem;
}
.math-numerator {
    border-bottom: 1.5px solid var(--text);
    padding: 0 0.4rem 0.2rem 0.4rem;
    line-height: 1.15;
}
.math-denominator {
    padding: 0.2rem 0.4rem 0 0.4rem;
    line-height: 1.15;
}
.math-sum-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 0.15rem;
}
.math-sum-sign {
    font-size: 1.7rem;
    font-family: 'Times New Roman', Times, serif;
    font-weight: normal;
    line-height: 0.85;
    display: block;
    user-select: none;
}
