/* Header Animation */

.header-animate {
    opacity: 0;
    transform: scale(0.96);
    animation: headerFadeScale 0.8s cubic-bezier(.2,1,.3,1) 0.2s forwards;
}

@keyframes headerFadeScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* Base Layout Styles */
:root {
    --text: #ffffff;
    --muted: #d1d5db;
    --duration: 0.3s;
    --bg: #000000;
    --font-scale: 1;
}

html.light-mode {
    --text: #000000;
    --muted: #333333;
    --bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: calc(16px * var(--font-scale));
}

body {
    font-family: 'Instrument Sans', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    transition: background var(--duration), color var(--duration);
}

img {
    max-width: 100%;
    display: block;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: clamp(2rem, 2.6vw, 2.6rem);
    color: var(--text);
    letter-spacing: -0.02em;
}

.section-header p {
    max-width: 760px;
    margin: 0.75rem auto 0;
    color: var(--muted);
    font-size: 1.05rem;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    transition: background var(--duration);
}

.navbar .container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    min-height: 68px;
    padding: 0 48px;
}

.logo-branding {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.logo-branding .logo-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--text);
    letter-spacing: -0.04em;
}

/* White logo variant for hero sections */
.hero .logo-branding .logo-title {
    color: var(--text);
}

.logo-branding .logo-subtitle {
    font-family: 'DM Sans', Georgia, serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 0.15em;
}

.hero .logo-branding .logo-subtitle {
    color: var(--muted);
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
    z-index: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    transition: color var(--duration), background var(--duration);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    color: var(--text);
    font-weight: 500;
    font-family: inherit;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Dropdown Navigation Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-family: inherit;
    transition: color var(--duration), background var(--duration);
    line-height: 1.6;
    display: flex;
    align-items: center;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg);
    border: 1px solid var(--muted);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 160px;
    list-style: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-dropdown-menu li {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 0;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: rgba(255, 255, 255, 0.1);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Theme Toggle Switch */
/* Hide old toggle — replaced by settings panel */
.theme-toggle-wrapper {
    display: none;
}

/* Settings button */
.settings-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    margin-left: auto;
    margin-right: 0;
    flex-shrink: 0;
}

.settings-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

html.light-mode .settings-btn:hover {
    background: rgba(0, 0, 0, 0.07);
}

/* Settings panel */
.settings-panel {
    position: fixed;
    top: 64px;
    right: 20px;
    width: 220px;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

html.light-mode .settings-panel {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.settings-panel.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.settings-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 8px;
}

.settings-label + .settings-label,
.settings-row + .settings-label {
    margin-top: 14px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text);
}

/* Pill toggle inside panel */
.settings-pill {
    cursor: pointer;
}

.settings-pill input {
    display: none;
}

.settings-pill-track {
    display: inline-block;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    position: relative;
    transition: background 0.25s;
}

html.light-mode .settings-pill-track {
    background: rgba(0, 0, 0, 0.15);
}

.settings-pill input:checked + .settings-pill-track {
    background: rgba(255, 255, 255, 0.35);
}

html.light-mode .settings-pill input:checked + .settings-pill-track {
    background: rgba(0, 0, 0, 0.3);
}

.settings-pill-thumb {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text);
    top: 3px;
    left: 3px;
    transition: left 0.25s ease;
}

.settings-pill input:checked + .settings-pill-track .settings-pill-thumb {
    left: 19px;
}

/* Font size buttons */
.settings-font-row {
    gap: 8px;
    justify-content: flex-start;
}

.font-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    border-radius: 3px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
}

html.light-mode .font-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.font-btn:hover,
.font-btn.active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text);
}

html.light-mode .font-btn:hover,
html.light-mode .font-btn.active {
    background: rgba(0, 0, 0, 0.12);
}

.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active, .theme-toggle:hover, .theme-toggle:focus-visible {
    color: var(--text) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    outline: none;
}

html.light-mode .nav-links a:hover,
html.light-mode .nav-links a:focus-visible,
html.light-mode .nav-links a.active,
html.light-mode .theme-toggle:hover,
html.light-mode .theme-toggle:focus-visible {
    background: rgba(0, 0, 0, 0.1) !important;
}

.nav-links a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

html.light-mode .hero::before {
    background: transparent;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-media {
    margin-top: 3rem;
    border-radius: 22px;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(2.8rem, 4vw, 3.8rem);
    margin-bottom: 1rem;
    color: #ffffff;
}

.hero .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: #ffffff;
}

.hero p {
    color: #ffffff;
}

/* Hero variant with article-specific background image */
.hero-article {
    background-size: cover;
    background-position: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.4s cubic-bezier(0.2, 1, 0.3, 1), color 0.4s ease, transform 0.4s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.4s ease;
    font-weight: 600;
    background: var(--bg) !important;
    color: var(--text) !important;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    border: 1px solid var(--text);
    font-family: inherit;
    letter-spacing: -0.01em;
}

html.light-mode .btn {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn:hover, .btn:focus-visible {
    background: #1a1a1a !important;
    color: #fff !important;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
    outline: none;
    transform: translateY(-3px) scale(1.03);
}

/* Sections */
.mission,
.pillars,
.content-section,
.impact-band {
    padding: 60px 0;
}

.pillars {
    background: var(--bg);
    border-radius: 30px;
    margin: 40px 20px;
    padding: 80px 0;
    transition: background var(--duration);
}

.mission h2,
.pillars h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.mission p {
    text-align: center;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.pillar-card {
    padding: 2rem;
    border-radius: 20px;
    transition: transform var(--duration), box-shadow var(--duration), background var(--duration), border-color var(--duration);
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

html.light-mode .pillar-card {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pillar-card .icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.pillar-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1);
}

.pillar-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.page-header {
    padding: 60px 0;
    text-align: center;
    background: var(--bg);
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
    transition: background var(--duration);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--text);
}

/* Page header with image banner (e.g. research.html) */
.page-header-image {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.page-header-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

.page-header-image .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.page-header-image .container {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    color: white;
}

.page-header-image h1 {
    color: #ffffff;
}

html.light-mode .page-header-image .overlay {
    background: rgba(0, 0, 0, 0.65);
}

.page-header-image .article-meta {
    color: rgba(255, 255, 255, 0.85);
}

.article-meta {
    margin-top: 0.75rem;
    font-size: 1rem;
}

.article-content-area {
    max-width: 860px;
}

.article-content-area h2 {
    margin-top: 2.5rem;
}

.article-content-area p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--text) !important;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-card {
    padding: 2rem;
    border-radius: 18px;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: background var(--duration), border-color var(--duration);
}

html.light-mode .team-card {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.team-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.team-role {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.team-bio {
    color: var(--muted);
    line-height: 1.7;
}

.mt-section {
    margin-top: 2rem;
}

/* Grids */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

.feature-card {
    padding: 1.5rem;
    border-radius: 18px;
    transition: transform var(--duration) ease, box-shadow var(--duration) ease, background var(--duration), border-color var(--duration);
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

html.light-mode .feature-card {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1);
}

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.card-media {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    aspect-ratio: 16 / 9;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

html.light-mode .card-media {
    border-color: rgba(0, 0, 0, 0.1);
}

.card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card {
    border-radius: 18px;
    overflow: hidden;
    transition: transform var(--duration), box-shadow var(--duration), background var(--duration), border-color var(--duration);
    background: var(--bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

html.light-mode .article-card {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-card.clickable-card {
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.1);
}

html.light-mode .article-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.article-card .article-content {
    padding: 1.5rem;
}

.article-date {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
}

.read-more:hover {
    text-decoration: underline;
}

/* Forms */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0;
    width: 100%;
}

.newsletter-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
}

.newsletter-form button {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.form-status {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.3s, box-shadow 0.3s, background var(--duration), color var(--duration);
}

html.light-mode .form-group input,
html.light-mode .form-group textarea {
    border-color: rgba(0, 0, 0, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    padding: 12px 40px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--text);
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

html.light-mode .submit-btn {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background: #1a1a1a;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.03);
}

/* Article citations reference link */
.article-citations-link {
    font-size: 0.9rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.article-citations-link:hover {
    color: var(--muted);
}

/* Citations page */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #fff;
}

.citations-header {
    margin-top: 1.5rem;
}

.citations-container {
    padding: 2rem 0 4rem;
}

.citations-glass {
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 2rem;
}

html.light-mode .citations-glass {
    border-color: rgba(0, 0, 0, 0.12);
}

.citations-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.citation-card {
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
}

html.light-mode .citation-card {
    border-color: rgba(0, 0, 0, 0.1);
}

.citation-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

html.light-mode .citation-card:hover {
    border-color: rgba(0, 0, 0, 0.25);
}

.citation-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.citation-meta {
    flex: 1;
}

.citation-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.25rem;
}

.citation-author {
    font-size: 0.875rem;
    color: var(--muted);
}

.citation-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.citation-link {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

html.light-mode .citation-link {
    border-color: rgba(0, 0, 0, 0.2);
}

.citation-link:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

html.light-mode .citation-link:hover {
    border-color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.05);
}

.copy-citation {
    font-size: 0.8rem;
    color: var(--muted);
    background: transparent;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

html.light-mode .copy-citation {
    border-color: rgba(0, 0, 0, 0.2);
}

.copy-citation:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

html.light-mode .copy-citation:hover {
    border-color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.05);
}

.citation-details {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 2rem;
    background: var(--bg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    transition: background var(--duration);
}

html.light-mode footer {
    border-top-color: rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-nav a {
    text-decoration: none;
    color: var(--muted);
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--text);
}

.footer-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.to-top {
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

html.light-mode .to-top {
    border-color: rgba(0, 0, 0, 0.3);
}

.to-top:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Scroll Indicator */
.scroll-indicator-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
}

.scroll-indicator {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

html.light-mode .scroll-indicator {
    border-color: rgba(0, 0, 0, 0.4);
}

.scroll-indicator:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-4px);
}

html.light-mode .scroll-indicator:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.6);
}

.scroll-indicator .chev {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Impact */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity calc(var(--duration) * 2) ease, transform calc(var(--duration) * 2) ease;
    will-change: transform, opacity;
}

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

.delay-1 {
    transition-delay: calc(var(--duration) * 0.5);
}

.delay-2 {
    transition-delay: var(--duration);
}

.delay-3 {
    transition-delay: calc(var(--duration) * 1.5);
}

@media (prefers-reduced-motion: reduce) {
    html {
        --duration: 0;
        scroll-behavior: auto;
    }
}

/* ==========================================================
   Hamburger button (hidden on desktop)
   ========================================================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    z-index: 101;
    flex-shrink: 0;
}

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

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   Mobile styles
   ========================================================== */
@media (max-width: 768px) {
    /* Navbar */
    .navbar .container {
        padding: 0 20px;
        position: relative;
    }

    .hamburger {
        display: flex;
        order: 3;
    }

    .settings-btn {
        order: 4;
        margin-left: 0.5rem;
    }

    /* Nav links become a full-width dropdown panel */
    .nav-links {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 0.75rem 20px 1.5rem;
        gap: 0.1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 99;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
        transform: none;
        position: fixed;
        left: 0;
        right: 0;
    }

    html.light-mode .nav-links {
        border-top-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a,
    .nav-dropdown-toggle {
        display: block;
        width: 100%;
        padding: 0.7rem 0.75rem;
        border-radius: 10px;
        font-size: 1rem;
        text-align: left;
        box-sizing: border-box;
    }

    /* Mobile dropdowns: always open, indented */
    .nav-dropdown {
        position: static;
    }

    .nav-dropdown-menu {
        position: static !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        background: transparent !important;
        border: none !important;
        padding: 0 0 0 1rem;
        transform: none !important;
        pointer-events: auto !important;
    }

    .nav-dropdown-menu li a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        color: var(--muted);
    }

    /* Hero */
    .hero {
        min-height: 60vh;
        padding: 80px 0 50px;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 9vw, 3rem) !important;
        line-height: 1.1 !important;
    }

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

    /* Layout stacking */
    .split {
        grid-template-columns: 1fr;
    }

    .split > div:last-child img {
        width: 100%;
        border-radius: 16px;
    }

    .pillar-grid,
    .feature-grid,
    .team-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    /* Page sections */
    .page-header {
        padding: 40px 0 30px;
    }

    .content-section {
        padding: 40px 0;
    }

    .pillars {
        padding: 40px 0;
        margin: 0;
    }

    /* Typography */
    h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem) !important;
    }

    h3 {
        font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
    }

    /* Footer */
    .footer-nav {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .footer-actions {
        flex-direction: column;
        align-items: center;
    }
}
