:root {
    --primary-bg: #0a1020;
    --secondary-bg: #131c30;
    --tertiary-bg: #1a2440;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #38bdf8;
    --accent-dim: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --border: #1e293b;
    --border-light: #334155;
    --max-width: 1100px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at top left, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(56, 189, 248, 0.04) 0%, transparent 50%);
}

h1, h2, h3, h4 {
    font-family: 'EB Garamond', 'Georgia', serif;
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

p { color: var(--text-muted); }
strong { color: var(--text-main); font-weight: 400; }

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

a:hover { color: var(--text-main); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER ===== */
header {
    padding: 1.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(10, 16, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
}

.logo-text {
    font-family: 'EB Garamond', serif;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    font-weight: 500;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.25rem;
    align-items: center;
}

nav ul li a {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 400;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--transition);
}

nav ul li a:hover::after, nav ul li a.active::after { width: 100%; }
nav ul li a:hover, nav ul li a.active { color: var(--text-main); }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
}

@media (min-width: 769px) {
    .mobile-toggle { display: none !important; }
}

/* ===== HERO ===== */
.hero {
    padding: 7rem 0 5rem;
    text-align: center;
    position: relative;
}

.hero-eyebrow {
    display: inline-block;
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 2px;
}

.hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.cta {
    display: inline-block;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.9rem 2.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: var(--transition);
    background: transparent;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transition: left var(--transition);
    z-index: -1;
}

.cta:hover {
    color: var(--primary-bg);
}

.cta:hover::before { left: 0; }

/* ===== SECTIONS ===== */
section {
    padding: 4.5rem 0;
}

.section-eyebrow {
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1rem;
    font-weight: 400;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 2.5rem;
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    font-weight: 500;
}

.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 760px;
    line-height: 1.8;
}

/* ===== GRID & CARDS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--secondary-bg);
    padding: 2.25rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    background: var(--tertiary-bg);
}

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

.card svg {
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.card h3 {
    margin: 1rem 0 0.75rem;
    font-size: 1.3rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Analyst Cards */
.analyst-card {
    display: block;
    color: inherit;
    text-align: left;
}

.analyst-card:hover { color: inherit; }

.analyst-initial {
    font-family: 'EB Garamond', serif;
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    line-height: 1;
}

.analyst-card h3 { margin: 0 0 0.5rem; }
.analyst-card .role {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ===== PROFILE PAGES ===== */
.profile-header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.profile-name {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.profile-role {
    color: var(--accent);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.profile-tagline {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-style: italic;
    max-width: 700px;
}

.profile-body {
    max-width: 760px;
}

.profile-body p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
}

.profile-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding: 2rem;
    margin: 3rem 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border);
}

.meta-item-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.meta-item-value {
    color: var(--text-main);
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.35rem 0.85rem;
    background: var(--tertiary-bg);
    border: 1px solid var(--border-light);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.language-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.lang-pill {
    padding: 0.3rem 0.7rem;
    background: var(--tertiary-bg);
    border: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

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

/* ===== TYPOGRAPHY HELPERS ===== */
.legal-content {
    max-width: 800px;
}

.legal-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.legal-content p, .legal-content li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content strong { color: var(--text-main); }

.legal-meta {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 2.5rem;
}

/* ===== CONTACT FORM ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.contact-info-item:last-child { border-bottom: none; }

.contact-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.contact-info-value {
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    color: var(--text-main);
}

/* ===== FOOTER ===== */
footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-brand p {
    color: var(--text-dim);
    font-size: 0.9rem;
    max-width: 350px;
    margin-top: 1rem;
}

.footer-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ===== BACKGROUND CANVAS ===== */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1, .hero p, .hero .cta, .hero-eyebrow,
.section-title, .lead, main > section > * {
    animation: fadeUp 0.8s ease-out backwards;
}

.hero-eyebrow { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.2s; }
.hero p { animation-delay: 0.3s; }
.hero .cta { animation-delay: 0.4s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    
    header {
        padding: 1.25rem 0;
        flex-wrap: wrap;
    }
    
    .mobile-toggle { display: block; }
    
    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }
    
    nav.open { max-height: 400px; }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding-top: 1.5rem;
        align-items: flex-start;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }
    
    nav ul li a::after { display: none; }
    
    .hero { padding: 4rem 0 3rem; }
    section { padding: 3rem 0; }
    
    .section-title {
        padding-left: 1rem;
        margin-bottom: 1.75rem;
    }
    
    .card { padding: 1.75rem; }
    
    .profile-meta { padding: 1.5rem; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-text { font-size: 1.2rem; }
    .hero-eyebrow { font-size: 0.7rem; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    #background-canvas { display: none; }
    html { scroll-behavior: auto; }
}

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