/* ==========================================================================
   PYTHONEERS — The Quant Finance Society of Católica Lisbon
   Single stylesheet for the whole site.

   Sections:
     01. Reset & tokens        06. About
     02. Nav                   07. People (team / alumni cards)
     03. Hero + page hero      08. Timeline (legacy)
     04. Ticker & metrics      09. Roadmap
     05. Pillars / departments 10. Research & events
                               11. CTA, footer, utilities, responsive
   ========================================================================== */

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

:root {
    --blue: #182b3c;
    --blue-light: #1e3449;
    --blue-lighter: #243b51;
    --white: #f5f4f0;
    --white-dim: #f5f4f0cc;
    --white-muted: #f5f4f080;
    --white-faint: #f5f4f033;
    --white-ghost: #f5f4f015;
    --white-border: #f5f4f018;
    --accent: #93c5fd;
    --green: #86efac;
    --red: #fca5a5;
    --gold: #e0c068;

    /* ink-on-light equivalents, used on the cream sections */
    --ink-75: rgba(24, 43, 60, 0.75);
    --ink-50: rgba(24, 43, 60, 0.5);
    --ink-30: rgba(24, 43, 60, 0.3);
    --ink-15: rgba(24, 43, 60, 0.15);
    --ink-08: rgba(24, 43, 60, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--blue);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Skip link — keyboard users land here first */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--white);
    color: var(--blue);
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---------- 02. NAV ---------- */
/* Scoped to #navbar on purpose: a bare `nav` selector also grabs the <nav>
   inside the footer and pins it to the top of the viewport. */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: background 0.3s;
}

#navbar.scrolled {
    background: rgba(24, 43, 60, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--white-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-decoration: none;
}

.nav-logo img {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-logo span {
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 16px;
    color: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--white-dim);
    text-decoration: none;
    transition: color 0.15s;
    letter-spacing: 0.02em;
}

.nav-links a:hover {
    color: var(--white);
}

/* current page marker */
.nav-links a[aria-current="page"] {
    color: var(--white);
}

.nav-links a[aria-current="page"]::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--accent);
    margin-top: 4px;
}

.nav-cta {
    background: transparent;
    color: var(--white);
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.04em;
    border: 1px solid var(--white-muted);
    transition: all 0.25s ease;
}

.nav-cta:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px rgba(147, 197, 253, 0.15);
}

.nav-links a.nav-cta[aria-current="page"]::after {
    display: none;
}

.mobile-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--blue);
    border-bottom: 1px solid var(--white-border);
    padding: 16px 24px 24px;
}

.mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: var(--white-dim);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--white-ghost);
}

.mobile-menu .nav-cta {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 14px;
}

/* ---------- 03. HERO & PAGE-HERO BACKGROUND ---------- */
.hero,
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--blue);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
}

.page-hero {
    padding: 180px 0 90px;
    border-bottom: 1px solid var(--white-border);
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#matrix-canvas {
    z-index: 1;
    opacity: 0.85;
}

#particle-canvas {
    z-index: 2;
    opacity: 0.95;
}

.hero-ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: 
        radial-gradient(ellipse 65% 55% at 50% 35%, rgba(37, 99, 235, 0.22) 0%, transparent 70%),
        radial-gradient(circle at 82% 70%, rgba(56, 189, 248, 0.14) 0%, transparent 50%),
        radial-gradient(circle at 18% 75%, rgba(79, 70, 229, 0.18) 0%, transparent 60%);
    filter: blur(30px);
    opacity: 0.9;
}

.hero-grain {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

.hero-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(to top, var(--blue) 0%, rgba(24, 43, 60, 0.8) 40%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.hero-content,
.page-hero-content {
    position: relative;
    z-index: 4;
}

.hero-content {
    max-width: 900px;
}

.page-hero-content {
    max-width: 760px;
}

.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim-1 { animation-delay: 0.3s; }
.hero-anim-2 { animation-delay: 0.6s; }
.hero-anim-3 { animation-delay: 0.9s; }
.hero-anim-4 { animation-delay: 1.2s; }
.hero-anim-5 { animation-delay: 1.5s; }

@keyframes heroFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.hero-tag span.dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--accent);
}

.hero-tag span.label {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--white-muted);
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(42px, 6.5vw, 76px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero h1 .gradient {
    background: linear-gradient(90deg, var(--white), var(--accent), var(--white), var(--white-muted));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShimmer 6s ease infinite;
}

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

.scramble-cursor {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background: var(--accent);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 0.6s step-end infinite;
}

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

.scramble-cursor.hidden { display: none; }

.hero p {
    font-size: 18px;
    color: var(--white-dim);
    line-height: 1.6;
    max-width: 640px;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--white);
    color: var(--blue);
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 244, 240, 0.2);
}

.btn-outline {
    border: 1px solid var(--white-faint);
    color: var(--white);
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--white-ghost);
    border-color: var(--white-muted);
    transform: translateY(-2px);
}

.hero-marker {
    margin-top: 64px;
    font-size: 12px;
    color: var(--white-muted);
    letter-spacing: 0.1em;
}

/* Compact hero typography for interior pages */

.page-hero h1 {
    font-size: clamp(34px, 5.5vw, 60px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.page-hero p.lede {
    font-size: 17px;
    line-height: 1.7;
    color: var(--white-dim);
    font-weight: 300;
    max-width: 620px;
}

.breadcrumb {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--white-muted);
    text-decoration: none;
    transition: color 0.15s;
}

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

/* ---------- 04. TICKER & METRICS ---------- */
.ticker-strip {
    border-top: 1px solid var(--white-border);
    border-bottom: 1px solid var(--white-border);
    overflow: hidden;
    padding: 14px 0;
    position: relative;
}

.ticker-strip::before,
.ticker-strip::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.ticker-strip::before {
    left: 0;
    background: linear-gradient(to right, var(--blue), transparent);
}

.ticker-strip::after {
    right: 0;
    background: linear-gradient(to left, var(--blue), transparent);
}

.ticker-track {
    display: flex;
    gap: 48px;
    animation: tickerScroll 30s linear infinite;
    width: max-content;
}

.ticker-track span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--white-muted);
    white-space: nowrap;
    text-transform: uppercase;
}

.ticker-track span strong {
    color: var(--accent);
    font-weight: 600;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.metrics {
    border-top: 1px solid var(--white-border);
    border-bottom: 1px solid var(--white-border);
    padding: 64px 0;
}

.metrics-grid {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.metric {
    text-align: center;
    padding: 0 56px;
    border-right: 1px solid var(--white-border);
    transition: transform 0.25s ease;
}

.metric:last-child { border-right: none; }
.metric:hover { transform: scale(1.05); }

.metric .num {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--white), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric .lbl {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--white-muted);
    text-transform: uppercase;
}

/* ---------- 05. PILLARS / DEPARTMENTS ---------- */
.pillars {
    padding: 120px 0;
    position: relative;
}

.section-tag {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--white-muted);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    max-width: 600px;
}

.section-intro {
    font-size: 16px;
    line-height: 1.7;
    color: var(--white-dim);
    max-width: 620px;
    margin-bottom: 64px;
    font-weight: 300;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.pillar {
    background: var(--blue-light);
    padding: 44px 36px;
    transition: all 0.3s ease;
    border: 1px solid var(--white-border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pillar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.pillar:hover {
    background: var(--blue-lighter);
    transform: translateY(-8px);
    border-color: rgba(147, 197, 253, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(147, 197, 253, 0.05);
}

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

.pillar-num {
    font-size: 48px;
    font-weight: 800;
    color: var(--white-faint);
    letter-spacing: -0.03em;
    transition: color 0.3s ease;
}

.pillar:hover .pillar-num { color: var(--accent); }

.pillar-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--white-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pillar:hover .pillar-icon {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px rgba(147, 197, 253, 0.2);
}

.pillar h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.pillar .tagline {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.pillar p {
    font-size: 14px;
    color: var(--white-dim);
    line-height: 1.7;
    margin-bottom: 24px;
}

.pillar ul { list-style: none; }

.pillar ul li {
    font-size: 13px;
    color: var(--white-muted);
    padding: 8px 0;
    border-bottom: 1px solid var(--white-ghost);
    transition: all 0.2s ease;
}

.pillar ul li:last-child { border-bottom: none; }
.pillar:hover ul li { color: var(--white-dim); }

.pillar ul li::before {
    content: '→ ';
    color: var(--white-faint);
    transition: color 0.2s ease;
}

.pillar:hover ul li::before { color: var(--accent); }

.pillar .goal {
    margin-top: auto;
    padding-top: 24px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--white-muted);
    border-top: 1px solid var(--white-ghost);
}

.pillar .goal strong {
    color: var(--white-dim);
    font-weight: 600;
}

/* ---------- 06. ABOUT ---------- */
.about {
    padding: 120px 0;
    background: var(--white);
    color: var(--blue);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about .section-tag { color: var(--ink-50); }

.about h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--blue);
}

.about p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-75);
    margin-bottom: 20px;
}

.about strong { color: var(--blue); }

.about-visual {
    position: relative;
    height: 440px;
    background: var(--blue);
    border: 1px solid var(--ink-15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-visual canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.about-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            transparent 0px, transparent 2px,
            rgba(245, 244, 240, 0.015) 2px, rgba(245, 244, 240, 0.015) 4px);
    pointer-events: none;
    z-index: 2;
}

.about-visual .chart-label {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(245, 244, 240, 0.3);
    z-index: 3;
    text-transform: uppercase;
}

.about-stats {
    display: flex;
    gap: 48px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(24, 43, 60, 0.1);
}

.about-stat .val {
    font-size: 36px;
    font-weight: 800;
}

.about-stat .desc {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-50);
    margin-top: 4px;
}

/* Values row */
.values {
    padding: 100px 0;
    border-top: 1px solid var(--white-border);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.value {
    background: var(--blue);
    padding: 32px 28px;
    transition: background 0.25s ease;
    border: 1px solid var(--white-border);
    margin: -1px 0 0 -1px;
}

.value:hover { background: var(--blue-light); }

.value .idx {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--white-faint);
    margin-bottom: 12px;
}

.value h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.value p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--white-muted);
}

/* ---------- 07. PEOPLE (team / alumni) ---------- */
.team {
    padding: 120px 0;
    background: var(--white);
    color: var(--blue);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 64px;
}

.team-header h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.team-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.team-link:hover {
    gap: 12px;
    opacity: 0.7;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
}

.team-card {
    border: 1px solid var(--ink-08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background: var(--white);
    display: flex;
    flex-direction: column;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--accent), var(--blue));
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.team-card:hover::before {
    opacity: 1;
    animation: borderShimmer 2s ease infinite;
}

@keyframes borderShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 56px rgba(24, 43, 60, 0.2);
    border-color: var(--ink-15);
}

/* `display:flex` above outranks the UA rule for [hidden], so the department
   filter needs this to actually hide a card. Same for a filtered-out cohort. */
.team-card[hidden],
.cohort[hidden] {
    display: none;
}

/* Founding-cohort emphasis */
.team-card.is-founder {
    border-color: rgba(224, 192, 104, 0.45);
    box-shadow: 0 0 0 1px rgba(224, 192, 104, 0.12);
}

.team-card.is-founder::before {
    background: linear-gradient(90deg, var(--gold), #f3e0a8, var(--gold));
    background-size: 200% 100%;
    opacity: 1;
}

.founder-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--blue);
    padding: 4px 8px;
    font-weight: 700;
}

.team-avatar {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(24, 43, 60, 0.06), rgba(147, 197, 253, 0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
    transition: all 0.3s ease;
}

.team-card:hover .team-avatar {
    background: linear-gradient(135deg, rgba(24, 43, 60, 0.1), rgba(147, 197, 253, 0.08));
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    box-shadow: 0 4px 20px rgba(24, 43, 60, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover .team-avatar img {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(24, 43, 60, 0.18);
}

.team-avatar svg {
    width: 64px;
    height: 64px;
    color: var(--ink-15);
    transition: all 0.3s ease;
}

.team-card:hover .team-avatar svg {
    color: var(--ink-30);
    transform: scale(1.1);
}

/* Monogram fallback when there is no photo */
.team-avatar .monogram {
    font-family: 'JetBrains Mono', monospace;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-30);
    transition: all 0.3s ease;
}

.team-card:hover .team-avatar .monogram {
    color: var(--ink-50);
    transform: scale(1.06);
}

.team-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.team-info h4 {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.team-info .role {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ink-50);
    text-transform: uppercase;
    line-height: 1.5;
}

.team-info .dept {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--ink-30);
    text-transform: uppercase;
    margin-top: 2px;
}

/* "Now: Analyst @ X" line — the recruiting payload of the legacy page */
.team-info .now {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-75);
    font-family: 'JetBrains Mono', monospace;
}

.team-info .now .now-label {
    color: var(--ink-30);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
    display: block;
    margin-bottom: 2px;
}

.team-info .socials {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--ink-08);
    display: flex;
    gap: 12px;
    align-items: center;
}

.team-info .socials a {
    color: var(--ink-30);
    transition: all 0.2s ease;
    display: inline-flex;
}

.team-info .socials a:hover {
    color: var(--blue);
    transform: scale(1.15);
}

/* Filter bar */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.filter-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 9px 16px;
    background: transparent;
    border: 1px solid var(--ink-15);
    color: var(--ink-50);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.filter-btn[aria-pressed="true"] {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

.filter-group-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-30);
    align-self: center;
    margin-right: 4px;
}

/* ---------- 08. TIMELINE (legacy) ---------- */
.timeline-section {
    padding: 100px 0;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

/* the vertical trunk */
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent,
            var(--white-faint) 6%,
            var(--white-faint) 94%,
            transparent);
}

.commit {
    position: relative;
    padding-bottom: 44px;
}

.commit:last-child { padding-bottom: 0; }

.commit-node {
    position: absolute;
    left: -40px;
    top: 4px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--blue);
    border: 2px solid var(--white-faint);
    transition: all 0.3s ease;
}

.commit:hover .commit-node {
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(147, 197, 253, 0.45);
}

.commit.is-major .commit-node {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 12px rgba(147, 197, 253, 0.35);
}

.commit.is-planned .commit-node {
    border-style: dashed;
    border-color: var(--white-faint);
    background: transparent;
}

.commit-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.commit-version {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.06em;
}

.commit-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--white-faint);
    letter-spacing: 0.1em;
}

.commit-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid var(--white-faint);
    color: var(--white-muted);
}

.commit-badge.planned {
    border-color: rgba(224, 192, 104, 0.4);
    color: var(--gold);
}

.commit-badge.shipped {
    border-color: rgba(134, 239, 172, 0.35);
    color: var(--green);
}

.commit h3 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.commit p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--white-dim);
    max-width: 640px;
    font-weight: 300;
}

.commit-people {
    margin-top: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--white-muted);
    letter-spacing: 0.04em;
}

.commit-people span {
    color: var(--white-dim);
}

/* Cohort blocks on the legacy page */
.cohort {
    padding: 100px 0;
    background: var(--white);
    color: var(--blue);
    border-top: 1px solid var(--ink-08);
}

.cohort:nth-of-type(even) { background: #efeeea; }

.cohort-header {
    margin-bottom: 40px;
}

.cohort-header .year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--ink-30);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cohort-header h2 {
    font-size: clamp(26px, 3.6vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.cohort-header p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-75);
    max-width: 640px;
}

.cohort-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-30);
    margin-top: 24px;
}

/* Founder's note */
.founder-note {
    padding: 110px 0;
    background: var(--blue-light);
    border-top: 1px solid var(--white-border);
    border-bottom: 1px solid var(--white-border);
}

.founder-note-inner {
    max-width: 720px;
    margin: 0 auto;
}

.founder-note blockquote {
    font-size: clamp(19px, 2.4vw, 25px);
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 32px;
}

.founder-note blockquote p { margin-bottom: 20px; }
.founder-note blockquote p:last-child { margin-bottom: 0; }

.founder-sign {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 28px;
    border-top: 1px solid var(--white-border);
}

.founder-sign .who .name {
    font-weight: 700;
    font-size: 15px;
}

.founder-sign .who .meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white-muted);
    margin-top: 3px;
}

/* Hall of firsts */
.firsts {
    padding: 100px 0;
}

/* Bordered cells rather than the 1px-gap-over-background trick: with auto-fit
   the last row is usually short, and a tinted container paints that leftover
   space as a solid block. */
.firsts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
}

.first {
    background: var(--blue);
    padding: 32px 26px;
    transition: background 0.25s ease;
    border: 1px solid var(--white-border);
    margin: -1px 0 0 -1px; /* collapse adjacent borders into single hairlines */
}

.first:hover { background: var(--blue-light); }

.first .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--white-faint);
    margin-bottom: 12px;
}

.first .value {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.first .when {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.06em;
}

/* ---------- 09. ROADMAP ---------- */
.roadmap {
    padding: 100px 0;
}

.phase {
    border: 1px solid var(--white-border);
    background: var(--blue-light);
    padding: 40px 36px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.phase:hover {
    border-color: rgba(147, 197, 253, 0.2);
    background: var(--blue-lighter);
}

.phase-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.phase-years {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--accent);
}

.phase h3 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.phase .focus {
    font-size: 14px;
    color: var(--white-dim);
    line-height: 1.7;
    margin-bottom: 28px;
    font-weight: 300;
    max-width: 640px;
}

.phase-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

.phase-cols h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white-faint);
    margin-bottom: 14px;
}

.phase-cols ul { list-style: none; }

.phase-cols li {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--white-dim);
    padding: 7px 0 7px 22px;
    position: relative;
}

.phase-cols li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--white-faint);
}

/* metric checklist items carry a status */
.phase-cols li.metric-item::before {
    content: '○';
    color: var(--white-faint);
}

.phase-cols li.metric-item.done::before {
    content: '●';
    color: var(--green);
}

.phase-cols li.metric-item.done {
    color: var(--white);
}

.status-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid var(--white-faint);
    color: var(--white-muted);
}

.status-pill.active {
    border-color: var(--accent);
    color: var(--accent);
}

.status-pill.complete {
    border-color: rgba(134, 239, 172, 0.4);
    color: var(--green);
}

/* ---------- 10. RESEARCH & EVENTS ---------- */
.projects {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 24px;
}

.project {
    border: 1px solid var(--white-border);
    background: var(--blue-light);
    padding: 32px 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project:hover {
    transform: translateY(-6px);
    border-color: rgba(147, 197, 253, 0.2);
    background: var(--blue-lighter);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.project-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.project-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white-muted);
    border: 1px solid var(--white-border);
    padding: 4px 9px;
    white-space: nowrap;
}

.project h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
    margin-bottom: 10px;
}

.project .abstract {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--white-dim);
    font-weight: 300;
    margin-bottom: 22px;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--white-ghost);
    border-bottom: 1px solid var(--white-ghost);
    margin-bottom: 20px;
}

.project-stat .k {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white-faint);
    margin-bottom: 5px;
}

.project-stat .v {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.project-stat .v.pos { color: var(--green); }
.project-stat .v.neg { color: var(--red); }
.project-stat .v.empty { color: var(--white-faint); }

.project-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.project-authors {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--white-muted);
}

.project-links {
    display: flex;
    gap: 14px;
}

.project-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.project-links a:hover { opacity: 0.7; }

/* Draft / sample marker — makes unpublished placeholder content obvious */
.sample-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--blue);
    padding: 4px 10px;
    font-weight: 700;
    z-index: 3;
}

.project.is-sample {
    border-style: dashed;
    border-color: rgba(224, 192, 104, 0.35);
}

/* Events */
.events { padding: 100px 0; }

.event-row {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 28px;
    align-items: center;
    padding: 26px 0;
    border-bottom: 1px solid var(--white-border);
    transition: all 0.25s ease;
}

.event-row:first-of-type { border-top: 1px solid var(--white-border); }

.event-row:hover {
    background: var(--white-ghost);
    padding-left: 12px;
    padding-right: 12px;
}

.event-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.event-body h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.event-body p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--white-muted);
    font-weight: 300;
}

.event-access {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px 10px;
    border: 1px solid var(--white-faint);
    color: var(--white-muted);
    white-space: nowrap;
}

.event-access.open {
    border-color: rgba(134, 239, 172, 0.35);
    color: var(--green);
}

/* ---------- SOCIAL CHANNELS ---------- */
.social {
    padding: 100px 0;
    border-top: 1px solid var(--white-border);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.social-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 30px 28px;
    background: var(--blue-light);
    border: 1px solid var(--white-border);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.social-card:hover {
    background: var(--blue-lighter);
    transform: translateY(-6px);
    border-color: rgba(147, 197, 253, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.social-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--white-border);
    border-radius: 50%;
    color: var(--white-muted);
    transition: all 0.3s ease;
}

.social-card:hover .social-icon {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px rgba(147, 197, 253, 0.2);
}

.social-body { flex: 1; }

.social-body h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.social-handle {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 10px;
    word-break: break-word;
}

.social-body p {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--white-dim);
    font-weight: 300;
}

.social-arrow {
    font-size: 14px;
    color: var(--white-faint);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.social-card:hover .social-arrow {
    color: var(--accent);
    transform: translate(3px, -3px);
}

/* Empty state */
.empty-state {
    border: 1px dashed var(--white-faint);
    padding: 56px 32px;
    text-align: center;
}

.empty-state .glyph {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    color: var(--white-faint);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
    color: var(--white-muted);
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto;
}

/* ---------- 11. CTA / FOOTER / UTILITIES ---------- */
.cta {
    padding: 120px 0;
    border-top: 1px solid var(--white-border);
    position: relative;
    overflow: hidden;
}

.cta-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 24px;
}

.cta .section-tag { animation: pulse 2s infinite; }

.cta h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cta p {
    font-size: 16px;
    color: var(--white-dim);
    margin-bottom: 40px;
    font-weight: 300;
}

.cta-btn {
    display: inline-block;
    background: var(--white);
    color: var(--blue);
    padding: 18px 48px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: none;
}

.cta-btn:hover::after { animation: shimmerSweep 0.6s ease forwards; }

@keyframes shimmerSweep {
    to { left: 100%; }
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(245, 244, 240, 0.2);
}

footer {
    border-top: 1px solid var(--white-border);
    padding: 64px 0 48px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    align-items: start;
    gap: 48px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.footer-brand img,
.footer-left > img {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-brand span,
.footer-left > span {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.1em;
}

.footer-affiliation {
    display: flex;
    align-items: center;
}

.footer-affiliation img,
.footer-catolica-logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.footer-brand:hover img,
.footer-affiliation img:hover,
.footer-catolica-logo:hover {
    opacity: 1;
}

.footer-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
}

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

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

.footer-right { text-align: right; }

.footer-right p {
    font-size: 12px;
    color: var(--white-muted);
    margin-bottom: 12px;
}

.footer-right a.mail {
    color: var(--white-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--white-border);
    transition: color 0.2s;
}

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

.footer-socials {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 12px;
}

.footer-socials a {
    color: var(--white-faint);
    transition: all 0.2s ease;
    display: inline-flex;
    padding: 6px;
    border-radius: 50%;
}

.footer-socials a:hover {
    color: var(--accent);
    background: rgba(147, 197, 253, 0.1);
    box-shadow: 0 0 16px rgba(147, 197, 253, 0.1);
}

.footer-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--white-border), transparent);
    margin-top: 16px;
}

.footer-bottom {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 11px;
    color: var(--white-faint);
    letter-spacing: 0.05em;
    line-height: 1.8;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Light-section overrides for shared components */
.on-light .section-tag { color: var(--ink-50); }
.on-light .section-title { color: var(--blue); }
.on-light .section-intro { color: var(--ink-75); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .pillars-grid { grid-template-columns: 1fr; }
    .phase-cols { grid-template-columns: 1fr; gap: 24px; }
    .values-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-btn { display: block; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .team-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .metric { padding: 16px 24px; }
    .about-stats { flex-wrap: wrap; gap: 28px; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-left { align-items: center; justify-content: center; }
    .footer-right { text-align: center; }
    .footer-socials { justify-content: center; }
    .page-hero { padding: 140px 0 64px; }
    .event-row { grid-template-columns: 1fr; gap: 10px; }
    .timeline { padding-left: 32px; }
    .commit-node { left: -32px; }
    .timeline::before { left: 6px; }
}

@media (max-width: 480px) {
    .team-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .metrics-grid { flex-direction: column; align-items: center; }
    .metric {
        border-right: none;
        border-bottom: 1px solid var(--white-border);
        padding: 24px 0;
    }
    .metric:last-child { border-bottom: none; }
    .project-stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- MOTION PREFERENCES ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .hero-anim { opacity: 1; transform: none; }
    .reveal { opacity: 1; transform: none; }
    .ticker-track { animation: none; }
}
