/* ============================================================
   VARIABLES
============================================================ */
:root {
    --navy:       #06111F;
    --navy-800:   #0C1D33;
    --navy-700:   #142848;
    --navy-600:   #1A3A5C;
    --brand:      #2F6BFF;
    --brand-700:  #1E54E0;
    --brand-300:  #8FB4FF;
    --blue:       var(--brand);
    --blue-h:     var(--brand-700);
    --blue-br:    var(--brand-300);
    --amber:      #D97706;
    --amber-br:   #F59E0B;
    --bg:         #FFFFFF;
    --bg-alt:     #F5F5F7;
    --text:       #0C1A2E;
    --muted:      #52647F;
    --border:     #E4E4E7;
    --sh:         0 2px 20px rgba(6,17,31,.07);
    --sh-lg:      0 10px 48px rgba(6,17,31,.14);
    --slate:       #64748B;
    --blue-accent: #378ADD;
    --r-sm:       10px;
    --r:          16px;
    --font-head:  'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font:       'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nav-h:      64px;
    --mw:         1160px;
}

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ============================================================
   LAYOUT
============================================================ */
.container  { max-width: var(--mw); margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-alt{ background: var(--bg-alt); }
.section-dk { background: var(--navy); }
.sec-head   { margin-bottom: 56px; }

/* ============================================================
   TYPOGRAPHY
============================================================ */
.label {
    display: inline-block;
    font-size: 11px; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--slate); margin-bottom: 12px;
}
.section-dk .label { color: rgba(148,163,184,.65); }

h2.title {
    font-family: var(--font-head);
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 700; color: var(--navy);
    line-height: 1.08; letter-spacing: -.8px; text-wrap: balance;
    margin-bottom: 14px;
}
.section-dk h2.title { color: #fff; }

.subtitle {
    font-size: 16px; color: var(--muted);
    max-width: 540px; line-height: 1.75;
}
.section-dk .subtitle { color: rgba(255,255,255,.62); }

/* ============================================================
   PROGRESS BAR
============================================================ */
.progress {
    position: fixed; top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, #334155 0%, var(--slate) 100%);
    width: 0%; z-index: 1001; pointer-events: none;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    transition: all .22s; border: none; cursor: pointer; white-space: nowrap;
    font-family: var(--font);
}
.btn-primary {
    background: #1C2B3C; color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.btn-primary:hover {
    background: #243447;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.36);
}
/* On-dark contexts: light solid primary stays legible on navy backgrounds */
.contact-strip .btn-primary {
    background: #E8E8ED; color: #1D1D1F;
    box-shadow: 0 1px 3px rgba(0,0,0,.10);
}
.contact-strip .btn-primary:hover {
    background: #D4D4DA;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.btn-ghost {
    background: transparent; color: rgba(255,255,255,.82);
    border: 1.5px solid rgba(255,255,255,.16);
}
.btn-ghost:hover {
    border-color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.05);
    transform: translateY(-2px); color: #fff;
}
.btn-ghost-light {
    background: rgba(255,255,255,.07); color: rgba(255,255,255,.8);
    border: 1.5px solid rgba(255,255,255,.2);
}
.btn-ghost-light:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.35);
}
/* Brand-filled CTA — dominant action (hero, nav) */
.btn-brand {
    background: var(--brand); color: #fff;
    box-shadow: 0 2px 10px rgba(47,107,255,.35);
}
.btn-brand:hover {
    background: var(--brand-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47,107,255,.45);
}
/* GitHub-filled CTA — black, for use on dark sections */
.btn-github {
    background: #161B22; color: #fff;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.btn-github:hover {
    background: #21262D; border-color: rgba(255,255,255,.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

/* ============================================================
   TAGS
============================================================ */
.stag {
    background: var(--bg-alt); color: var(--navy-600);
    font-size: 12px; font-weight: 500;
    padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
}
.stag-dk {
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.14);
    font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 6px;
}
.stack-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Project link buttons */
.plinks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; }
.plink {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600;
    padding: 8px 16px; border-radius: 8px; transition: all .2s;
}
.plink-dk  { background: var(--navy); color: #fff; }
.plink-dk:hover { background: var(--navy-700); }
.plink-out { background: transparent; color: var(--text); border: 1px solid var(--border); }
.plink-out:hover { border-color: var(--slate); color: #1E293B; }
.plink-cs  { background: #E8E8ED; color: #1D1D1F; box-shadow: 0 1px 3px rgba(0,0,0,.10); }
.plink-cs:hover { background: #D4D4DA; transform: translateY(-1px); }

/* Metric pills */
.proj-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.pm {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 600; color: var(--navy-600);
    background: rgba(20,40,72,.05); border: 1px solid rgba(20,40,72,.1);
    padding: 3px 9px; border-radius: 5px;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:.25; } }
@keyframes bounce { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(5px); } }
@keyframes dotPulse {
    0%,100% { box-shadow: 0 0 0 2px rgba(100,116,139,.5), 0 0 0 6px rgba(100,116,139,.1); }
    50%     { box-shadow: 0 0 0 3px rgba(100,116,139,.7), 0 0 0 10px rgba(100,116,139,.06); }
}

/* Whole-card clickable: the primary link is stretched over the card.
   Card titles stay as headings; only one link per card, so no nesting conflict. */
.article-card, .pcard { position: relative; }
.article-card .article-card-btn::after,
.pcard .btn-primary::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.article-card .article-card-btn, .pcard .btn-primary { position: static; }

/* Visible by default (no-JS / crawler safe); only hidden when JS is present */
.fade-up { opacity: 1; }
.js .fade-up { opacity: 0; }
.js .fade-up.in, .js .fade-up.visible { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   FOOTER
============================================================ */
.footer {
    background: #020810; color: rgba(255,255,255,.55);
    text-align: center; padding: 22px 24px; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    gap: 14px; flex-wrap: wrap;
}
.footer a { color: rgba(255,255,255,.62); transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-sep { opacity: .2; }

/* ============================================================
   ARTICLE/PROJECT PAGE NAV (white)
============================================================ */
nav.page-nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: box-shadow .2s;
}
nav.page-nav.scrolled { box-shadow: 0 2px 20px rgba(6,17,31,.07); }
.nav-inner {
    max-width: var(--mw); margin: 0 auto; padding: 0 24px;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo {
    font-family: var(--font-head);
    font-size: 18px; font-weight: 800;
    letter-spacing: -.4px;
}
.logo em, .logo span { color: var(--slate); font-style: normal; }
.nav-crumb {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: var(--muted);
}
.nav-crumb a { color: var(--slate); font-weight: 500; }
.nav-crumb .sep { opacity: .35; }
.nav-crumb .curr {
    color: var(--text); font-weight: 500;
    max-width: 260px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.nav-back {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 500; color: var(--muted);
    transition: color .2s;
}
.nav-back svg { transition: transform .2s; }
.nav-back:hover { color: var(--slate); }
.nav-back:hover svg { transform: translateX(-2px); }

/* ============================================================
   ARTICLE/PROJECT HERO
============================================================ */
.proj-hero {
    padding: calc(var(--nav-h) + 72px) 0 72px;
    background: var(--navy);
    background-image:
        radial-gradient(ellipse 72% 56% at 62% 38%, rgba(59,111,255,.14) 0%, transparent 70%),
        radial-gradient(circle at 12% 72%, rgba(123,167,255,.06) 0%, transparent 52%);
    position: relative; overflow: hidden;
}
.proj-hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: 32px 32px; pointer-events: none;
}
.proj-hero-inner { position: relative; }
.proj-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 13px; border-radius: 20px;
    background: rgba(59,111,255,.12); border: 1px solid rgba(59,111,255,.28);
    font-size: 12px; font-weight: 600; letter-spacing: .06em;
    color: var(--blue-br); margin-bottom: 24px;
}
h1.proj-title {
    font-family: var(--font-head);
    font-size: clamp(46px, 7.5vw, 80px);
    font-weight: 800; line-height: .94; letter-spacing: -2.4px; text-wrap: balance;
    background: linear-gradient(140deg, #fff 0%, #fff 38%, var(--blue-br) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 22px;
}
.proj-sub {
    font-size: 18px; color: rgba(255,255,255,.52);
    line-height: 1.72; max-width: 600px; margin-bottom: 22px;
}
.proj-meta {
    display: flex; align-items: center; gap: 18px;
    margin-top: 28px; flex-wrap: wrap;
}
.proj-meta-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: rgba(255,255,255,.62);
}

/* ============================================================
   ARTICLE BODY
============================================================ */
.art-wrap {
    max-width: 900px; margin: 0 auto;
    padding: 72px 24px 80px;
}
.art-intro {
    font-size: 18px; line-height: 1.85; color: var(--text);
    margin-bottom: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--border);
}
.art-intro p + p { margin-top: 20px; }
.art-section {
    margin-bottom: 60px; padding-bottom: 60px; border-bottom: 1px solid var(--border);
}
.art-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.art-label {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--slate); margin-bottom: 10px;
}
.art-h2 {
    font-family: var(--font-head);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700; color: var(--navy);
    line-height: 1.15; letter-spacing: -.5px; margin-bottom: 18px; text-wrap: balance;
}
.art-p { font-size: 16px; line-height: 1.85; color: var(--text); margin-bottom: 16px; }
.art-p strong { color: var(--navy); font-weight: 600; }
.art-wrap code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em; color: var(--navy);
    background: var(--bg-alt); border: 1px solid var(--border);
    padding: 1px 6px; border-radius: 5px;
}
.art-list { margin: 14px 0 16px; padding-left: 0; list-style: none; }
.art-list li {
    font-size: 16px; line-height: 1.78; color: var(--text);
    padding: 5px 0 5px 20px; position: relative;
}
.art-list li::before {
    content: ''; position: absolute; left: 0; top: 15px;
    width: 6px; height: 6px; border-radius: 50%; background: #94A3B8;
}
.art-list li strong { color: var(--navy); font-weight: 600; }
.art-callout {
    background: #fff;
    border: 1px solid rgba(100,116,139,.2);
    border-left: 3px solid var(--slate);
    border-radius: 0 10px 10px 0; padding: 18px 20px; margin: 24px 0;
    font-size: 15px; color: var(--muted); line-height: 1.75;
}
/* Case-study question prompt (the quoted case question above an answer) */
.case-q {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-left: 3px solid var(--slate); border-radius: 0 10px 10px 0;
    padding: 14px 18px; margin-bottom: 22px;
    font-size: 15px; font-style: italic; color: var(--navy); line-height: 1.6;
}
.case-q-tag {
    font-family: var(--font-head); font-style: normal; font-weight: 800;
    font-size: 12px; letter-spacing: .04em; color: #fff;
    background: var(--slate); border-radius: 6px; padding: 3px 9px;
    flex-shrink: 0; margin-top: 1px;
}
/* Data table (P&L and metric comparisons) */
.art-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.art-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.art-table th, .art-table td {
    padding: 10px 14px; text-align: left;
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.art-table thead th {
    font-family: var(--font-head); font-weight: 700; font-size: 12px;
    letter-spacing: .04em; text-transform: uppercase; color: var(--navy);
    border-bottom: 2px solid var(--border);
}
.art-table td.num, .art-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.art-table .art-table-group td {
    font-family: var(--font-head); font-weight: 700; font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; color: var(--slate);
    background: var(--bg-alt);
}
.art-table .art-table-key td { font-weight: 700; color: var(--navy); }
.art-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   VISUAL COMPONENTS (articles)
============================================================ */
.art-visual { margin: 32px 0 28px; }
.art-visual-label {
    font-size: 12px; font-weight: 600; color: var(--muted);
    margin-top: 12px; text-align: center; letter-spacing: .02em;
}
.vis-grid { display: grid; gap: 14px; }
.vis-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vis-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vis-grid-4 { grid-template-columns: repeat(4, 1fr); }
.vis-grid-32 { grid-template-columns: repeat(3, 1fr); }
.vis-card {
    background: #fff;
    border: 1px solid rgba(90,111,200,.2);
    border-radius: 12px; padding: 20px 18px;
    transition: box-shadow .2s, border-color .2s;
}
.vis-card:hover { box-shadow: 0 4px 20px rgba(59,111,255,.1); border-color: rgba(59,111,255,.2); }
.vis-card-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(59,111,255,.1); border: 1px solid rgba(59,111,255,.18);
    display: flex; align-items: center; justify-content: center;
    color: var(--blue); margin-bottom: 12px;
}
.vis-card-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--blue-accent); margin-bottom: 4px; }
.vis-card-sub { font-size: 13px; color: var(--muted); line-height: 1.6; }
.vis-card-accent { background: var(--blue-accent); border-color: var(--blue-accent); }
.vis-card-accent .vis-card-title { color: #fff; }
.vis-card-accent .vis-card-sub { color: rgba(255,255,255,.78); }
.vis-card-accent .vis-card-icon { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.25); color: #fff; }
.vis-card-violet { background: rgba(124,58,237,.1); border-color: rgba(124,58,237,.25); }
.vis-card-violet .vis-card-title { color: #7C3AED; }
.vis-concept {
    background: var(--blue-accent); border: 1px solid rgba(255,255,255,.2);
    border-radius: 14px; padding: 28px 24px; text-align: center;
}
.vis-concept-title { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.vis-concept-sub { font-size: 13px; color: rgba(255,255,255,.82); line-height: 1.55; }
.vis-flow-wrap { background: linear-gradient(135deg, rgba(59,111,255,.08) 0%, rgba(124,58,237,.07) 100%); border: 1px solid rgba(59,111,255,.18); border-radius: 14px; padding: 28px 24px; }
.vis-flow-row { display: flex; align-items: center; justify-content: center; gap: 0; }
.vis-flow-box {
    background: #fff; border: 1.5px solid var(--border); border-radius: 10px;
    padding: 12px 16px; text-align: center; min-width: 110px; flex: 1;
}
.vis-flow-box-accent { background: rgba(59,111,255,.14); border-color: rgba(59,111,255,.32); }
.vis-flow-box-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--navy); }
.vis-flow-box-accent .vis-flow-box-title { color: var(--blue); }
.vis-flow-box-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.vis-flow-arrow { padding: 0 10px; color: var(--blue); font-size: 20px; line-height: 1; flex-shrink: 0; }
.vis-flow-mid { margin: 16px 0; }
.vis-flow-side-row { display: flex; justify-content: space-between; padding: 0 80px; }
.vis-flow-side { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.vis-flow-side-arrow { font-size: 18px; color: var(--blue); }
.vis-flow-connector { display: flex; align-items: stretch; gap: 0; margin: 4px 0; }
.vis-flow-mid-label {
    text-align: center; font-size: 12px; font-weight: 600; color: var(--muted);
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 14px; flex: 1; align-self: center;
}
.vis-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vis-step {
    background: #fff;
    border: 1px solid rgba(59,111,255,.18);
    border-radius: 12px; padding: 22px 18px; position: relative; overflow: hidden;
    transition: box-shadow .2s, border-color .2s;
}
.vis-step:hover { box-shadow: 0 6px 24px rgba(65,58,133,.18); border-color: rgba(65,58,133,.3); }
.vis-step::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue-accent), #413a85);
}
.vis-step-num { font-family: var(--font-head); font-size: 36px; font-weight: 800; color: rgba(55,138,221,.22); line-height: 1; margin-bottom: 10px; letter-spacing: -1px; }
.vis-step-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: #413a85; margin-bottom: 6px; }
.vis-step-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }
.vis-rows { display: flex; flex-direction: column; gap: 12px; }
.vis-row {
    display: flex; align-items: flex-start; gap: 16px;
    background: #fff;
    border: 1px solid rgba(59,111,255,.16);
    border-left: 3px solid rgba(59,111,255,.35);
    border-radius: 11px; padding: 16px 18px;
}
.vis-row-label { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--blue-accent); min-width: 110px; padding-top: 1px; }
.vis-row-desc { font-size: 14px; color: var(--muted); line-height: 1.65; }
.vis-dark-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.vis-dark-card { background: var(--blue-accent); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 22px 20px; }
.vis-dark-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.vis-dark-sub { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.6; }
.vis-dark-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 8px; }

/* GitHub link block (end of article) */
.art-github {
    margin-top: 48px; padding-top: 36px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
}
.art-github-label {
    font-size: 13px; color: var(--muted); font-weight: 500;
}

/* Accent row */
.vis-row-accent { background: rgba(55,138,221,.08); border-color: rgba(55,138,221,.22); }

/* Dark grid wrapper alias */
.vis-dark-wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Compare boxes (Fraud vs AML) */
.vis-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.vis-compare-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.vis-compare-left  { border-top: 3px solid var(--blue-accent); }
.vis-compare-right { border-top: 3px solid #413a85; }
.vis-compare-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.vis-compare-desc  { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Tag pills */
.vis-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.vis-tag-pill { background: rgba(59,111,255,.1); border: 1px solid rgba(59,111,255,.2); color: var(--blue); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; }

/* Red flags block */
.vis-flags { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-top: 14px; }
.vis-flags-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.vis-flags-list { display: flex; flex-direction: column; gap: 6px; }
.vis-flag-item { font-size: 14px; color: var(--text); line-height: 1.6; padding-left: 18px; position: relative; }
.vis-flag-item::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #94A3B8; }

/* Article prev/next navigation */
.art-nav {
    display: flex; justify-content: space-between; gap: 12px;
    margin-top: 56px; padding-top: 32px;
    border-top: 1px solid var(--border);
}
.art-nav--no-prev { justify-content: flex-end; }
.art-nav--no-next { justify-content: flex-start; }
.art-nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; border-radius: var(--r);
    border: 1px solid var(--border); background: var(--bg-alt);
    max-width: calc(50% - 6px); flex: 1;
    text-decoration: none; color: inherit;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.art-nav-item:hover { border-color: rgba(6,17,31,.2); box-shadow: var(--sh); transform: translateY(-2px); }
.art-nav-next { justify-content: flex-end; }
.art-nav-label {
    display: block; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--muted); margin-bottom: 3px;
}
.art-nav-title {
    display: block; font-family: var(--font-head);
    font-size: 14px; font-weight: 700; color: var(--navy);
    line-height: 1.25;
}
.art-nav-text { min-width: 0; }
.art-nav-next .art-nav-text { text-align: right; }
@media (max-width: 520px) {
    .art-nav { flex-direction: column; }
    .art-nav-item { max-width: 100%; }
    .art-nav-next .art-nav-text { text-align: left; }
    .art-nav-next { flex-direction: row-reverse; }
}

/* CTA dark section (articles) */
.cta-sect { background: var(--navy); padding: 80px 0; text-align: center; }
.cta-sect h2 { font-family: var(--font-head); font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; color: #fff; margin-bottom: 14px; letter-spacing: -.6px; }
.cta-sect p { font-size: 16px; color: rgba(255,255,255,.6); margin-bottom: 34px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Article footer */
footer.art-footer { background: var(--navy-800); border-top: 1px solid rgba(255,255,255,.06); padding: 26px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,.6); }
.footer-back { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: rgba(148,163,184,.7); transition: color .2s; }
.footer-back:hover { color: #fff; }

/* ============================================================
   EXPERIENCE (TIMELINE) — shared for index/about
============================================================ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
    content: ''; position: absolute;
    left: 0; top: 10px; bottom: 0; width: 2px;
    background: linear-gradient(to bottom, var(--slate) 0%, var(--border) 100%);
}
.titem { position: relative; margin-bottom: 48px; }
.titem:last-child { margin-bottom: 0; }
.tdot {
    position: absolute; left: -39px; top: 5px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--slate); border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--slate);
}
.titem.current .tdot { animation: dotPulse 2.5s ease-in-out infinite; }
.tperiod { font-size: 11px; font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.trole { font-family: var(--font-head); font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.tco   { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.tbulls li {
    font-size: 14px; color: var(--muted); line-height: 1.68;
    padding-left: 16px; position: relative; margin-bottom: 7px;
}
.tbulls li::before {
    content: ''; position: absolute; left: 0; top: 9px;
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(100,116,139,.4);
}

/* ============================================================
   SKILLS — shared for index/about
============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skcat {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--r); padding: 22px;
    transition: box-shadow .22s, border-color .22s, transform .22s;
}
.skcat:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.skcat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.skcat-ico {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.skcat.bi   .skcat-ico { background: rgba(59,111,255,.09);  color: #3B6FFF; border: 1px solid rgba(59,111,255,.18); }
.skcat.data .skcat-ico { background: rgba(124,58,237,.09);  color: #7C3AED; border: 1px solid rgba(124,58,237,.18); }
.skcat.fin  .skcat-ico { background: rgba(5,150,105,.09);   color: #059669; border: 1px solid rgba(5,150,105,.18); }
.skcat.ba   .skcat-ico { background: rgba(217,119,6,.09);   color: #D97706; border: 1px solid rgba(217,119,6,.18); }
.skcat.ai     .skcat-ico { background: rgba(239,68,68,.09);   color: #DC2626; border: 1px solid rgba(239,68,68,.18); }
.skcat.lang   .skcat-ico { background: rgba(90,110,138,.09);  color: #5A6E8A; border: 1px solid rgba(90,110,138,.18); }
.skcat.prod   .skcat-ico { background: rgba(219,39,119,.09);  color: #DB2777; border: 1px solid rgba(219,39,119,.18); }
.skcat.design .skcat-ico { background: rgba(13,148,136,.09);  color: #0D9488; border: 1px solid rgba(13,148,136,.18); }
.skcat.bi:hover     { border-color: rgba(59,111,255,.25); }
.skcat.data:hover   { border-color: rgba(124,58,237,.22); }
.skcat.fin:hover    { border-color: rgba(5,150,105,.22); }
.skcat.ba:hover     { border-color: rgba(217,119,6,.2); }
.skcat.ai:hover     { border-color: rgba(239,68,68,.2); }
.skcat.lang:hover   { border-color: rgba(90,110,138,.2); }
.skcat.prod:hover   { border-color: rgba(219,39,119,.22); }
.skcat.design:hover { border-color: rgba(13,148,136,.22); }
.skcat-name { font-size: 14px; font-weight: 600; color: var(--navy); }
.sktags { display: flex; flex-wrap: wrap; gap: 7px; }
.sktag {
    background: var(--bg-alt); color: var(--text);
    font-size: 12px; font-weight: 500;
    padding: 5px 11px; border-radius: 6px; border: 1px solid var(--border);
}
.sktag.hi {
    background: rgba(59,111,255,.07);
    border-color: rgba(59,111,255,.2); color: var(--navy);
}

/* ============================================================
   EDUCATION — shared
============================================================ */
.edu-items { display: flex; flex-direction: column; gap: 14px; }
.edu-item {
    display: flex; gap: 14px; padding: 18px;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--r); transition: box-shadow .2s, border-color .2s;
}
.edu-item:hover { box-shadow: var(--sh); border-color: rgba(59,111,255,.2); }
.edu-ico {
    width: 42px; height: 42px; border-radius: 10px;
    background: rgba(20,40,72,.06);
    display: flex; align-items: center; justify-content: center;
    color: var(--navy-600); flex-shrink: 0;
}
.edu-degree { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.edu-school { font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.edu-meta   { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.edu-grade  { color: var(--slate); font-weight: 600; }

/* ============================================================
   RESPONSIVE (shared)
============================================================ */
@media (max-width: 1020px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .section { padding: 64px 0; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .timeline { padding-left: 28px; }
    .tdot { left: -35px; }
    .vis-grid-2, .vis-grid-4 { grid-template-columns: 1fr; }
    .vis-grid-3, .vis-grid-32 { grid-template-columns: repeat(2, 1fr); }
    .vis-steps { grid-template-columns: 1fr; }
    .vis-flow-side-row { padding: 0 40px; }
    .vis-dark-grid { grid-template-columns: 1fr; }
    .nav-crumb { display: none; }
    .vis-flow-side-row { display: none; }
}
@media (max-width: 600px) {
    h1.proj-title { letter-spacing: -1.6px; }
    .art-wrap { padding: 48px 20px 64px; }
}
@media (max-width: 520px) {
    .plinks { flex-direction: column; }
    .skills-grid { grid-template-columns: 1fr; }
    .btn { justify-content: center; }
}
@media (max-width: 400px) {
    .vis-grid-3, .vis-grid-32 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .fade-up { animation: none; opacity: 1 !important; }
}

/* ============================================================
   SKIP LINK (keyboard / screen-reader navigation)
============================================================ */
.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 2000;
    background: var(--blue); color: #fff;
    padding: 10px 18px; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    transition: top .2s;
}
.skip-link:focus-visible { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }

/* ============================================================
   FOCUS STATES (keyboard navigation / accessibility)
============================================================ */
*:focus { outline: none; }
/* Skip-link target (<main>) receives focus programmatically — no visible ring */
[tabindex="-1"]:focus { outline: none; }
*:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 4px;
}
.btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 10px;
}
.plink:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 8px;
}

/* ============================================================
   LANGUAGE SWITCH  (EN | PT) — segmented control. Colour comes
   from its nav context (default below = light navs); dark navs
   override `.lang-switch` colour inline. currentColor draws the
   border + divider, so it always matches the text colour.
============================================================ */
.lang-switch {
    color: var(--muted);
    display: inline-flex; align-items: stretch;
    border: 1px solid currentColor; border-radius: 8px;
    overflow: hidden; line-height: 1;
    font-size: 13px; font-weight: 600; letter-spacing: .3px;
}
.lang-switch .lang-opt {
    display: inline-flex; align-items: center;
    padding: 6px 10px;
}
.lang-switch a.lang-opt {              /* (0,2,1) beats generic nav `a` rules */
    color: inherit; opacity: .5;
    transition: opacity .2s, background .2s;
}
.lang-switch a.lang-opt:hover,
.lang-switch a.lang-opt:focus-visible { opacity: 1; background: rgba(128,128,128,.16); }
.lang-switch .is-active { opacity: 1; font-weight: 800; }
.lang-switch .lang-opt + .lang-opt { border-left: 1px solid currentColor; }
.nav-right { display: inline-flex; align-items: center; gap: 14px; }
