/* ================================================================
   MAHEN SAMARANAYAKE | mahens.com
   Design: Refined light / editorial  ·  International & professional
   Display: Fraunces (self-hosted)  ·  Body: Inter (self-hosted)
   ================================================================ */

/* ===== SELF-HOSTED FONTS (no third-party requests, GDPR friendly) ===== */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/fraunces-var.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/fraunces-italic-var.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/inter-var.woff2') format('woff2');
}

/* ===== DESIGN TOKENS ===== */
:root {
    /* Palette: warm ivory paper, deep navy ink, refined cobalt accent */
    --paper: #f8f6f1;
    --surface: #ffffff;
    --paper-alt: #f1eee6;
    --ink: #14213a;
    --ink-2: #3d4759;
    --muted: #6c7688;
    --line: #e5e1d7;
    --line-strong: #d8d3c6;
    --accent: #2549c9;
    --accent-deep: #1c3aa3;
    --accent-soft: rgba(37, 73, 201, 0.08);
    --gold: #b98a3e;

    /* Dark sections */
    --dark: #14213a;
    --dark-2: #101a30;
    --on-dark: rgba(255, 255, 255, 0.92);
    --on-dark-muted: rgba(255, 255, 255, 0.6);
    --on-dark-line: rgba(255, 255, 255, 0.14);

    /* Type */
    --ff-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --ff-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Fluid type scale */
    --fs-eyebrow: 0.78rem;
    --fs-sm: 0.9rem;
    --fs-base: 1.0625rem;
    --fs-md: 1.2rem;
    --fs-lg: clamp(1.35rem, 1.1rem + 1vw, 1.6rem);
    --fs-h3: clamp(1.4rem, 1.15rem + 1vw, 1.75rem);
    --fs-h2: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
    --fs-hero: clamp(2.5rem, 1.6rem + 4.4vw, 4.6rem);

    /* Layout */
    --container: 1160px;
    --header-h: 76px;
    --radius: 14px;
    --radius-lg: 22px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t: 0.35s var(--ease);
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ff-body);
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--ink-2);
    background: var(--paper);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--ff-display);
    color: var(--ink);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-optical-sizing: auto;
}

a { color: inherit; text-decoration: none; transition: color var(--t); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
em { font-style: italic; color: var(--accent-deep); }

::selection { background: var(--accent); color: #fff; }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* ===== ACCESSIBILITY ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--ink);
    color: #fff;
    border-radius: 10px;
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 14px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* ===== LAYOUT PRIMITIVES ===== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 48px);
}

.section { padding: clamp(64px, 9vw, 120px) 0; }

.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }

.section__label {
    display: inline-block;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}
.section__label--invert { color: rgba(255, 255, 255, 0.7); }

.section__title { font-size: var(--fs-h2); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-deep);
    margin-bottom: 26px;
}
.eyebrow__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--gold);
}

.prose { color: var(--ink-2); margin-bottom: 1.1em; max-width: 62ch; }
.prose:last-of-type { margin-bottom: 0; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 10px;
    border: 1.5px solid transparent;
    transition: var(--t);
    white-space: nowrap;
}
.btn .icon { transition: transform 0.3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }

.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(28, 58, 163, 0.22); }

.btn--ghost { color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25); }

.btn--outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ===== HEADER / NAV ===== */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-h);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-color 0.35s ease;
}
/* Backdrop lives on a pseudo-element so the header itself is NOT a containing
   block for the position:fixed mobile menu (backdrop-filter would clip it). */
.header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(248, 246, 241, 0.82);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.header--scrolled::before { opacity: 1; }
.header--scrolled { border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 12px; z-index: 1001; }
.brand__mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    font-family: var(--ff-display);
    font-weight: 600; font-size: 0.95rem;
    color: #fff; background: var(--ink);
    border-radius: 10px; letter-spacing: 0.02em;
}
.brand__name {
    font-family: var(--ff-display);
    font-weight: 600; font-size: 1.05rem;
    color: var(--ink); letter-spacing: -0.01em;
}

.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__link {
    display: inline-flex; align-items: center;
    padding: 9px 15px;
    font-size: var(--fs-sm); font-weight: 500;
    color: var(--ink-2);
    border-radius: 8px;
}
.nav__link:hover { color: var(--accent); }
.nav__link--active { color: var(--accent); font-weight: 600; }
.nav__link--cta {
    margin-left: 10px;
    padding: 10px 20px;
    background: var(--ink); color: #fff !important;
    border-radius: 9px; font-weight: 600;
}
.nav__link--cta:hover { background: var(--accent-deep); }

.nav__toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    position: relative; z-index: 1001; border-radius: 8px;
}
.nav__toggle-bar {
    position: absolute; left: 11px;
    width: 22px; height: 2px; border-radius: 2px;
    background: var(--ink);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle-bar:nth-child(1) { top: 16px; }
.nav__toggle-bar:nth-child(2) { top: 22px; }
.nav__toggle-bar:nth-child(3) { top: 28px; }
.nav__toggle.is-active .nav__toggle-bar:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav__toggle.is-active .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle.is-active .nav__toggle-bar:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ===== HERO ===== */
.hero {
    position: relative;
    padding-top: calc(var(--header-h) + clamp(36px, 7vw, 84px));
    padding-bottom: clamp(48px, 7vw, 90px);
    background:
        radial-gradient(60% 55% at 82% 15%, rgba(37, 73, 201, 0.06), transparent 60%),
        radial-gradient(50% 50% at 8% 90%, rgba(185, 138, 62, 0.06), transparent 60%),
        var(--paper);
}
.hero__container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.hero__title {
    font-size: var(--fs-hero);
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 26px;
}
.hero__lead {
    font-size: var(--fs-md);
    color: var(--ink-2);
    max-width: 54ch;
    margin-bottom: 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero__meta {
    display: flex; flex-wrap: wrap;
    gap: 12px 40px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.hero__meta li { display: flex; flex-direction: column; gap: 3px; }
.hero__meta-k {
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted);
}
.hero__meta-v { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.hero__meta-v--live { display: inline-flex; align-items: center; gap: 8px; }
.live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #1faa5b; box-shadow: 0 0 0 4px rgba(31, 170, 91, 0.16);
    animation: live-pulse 2.4s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(31, 170, 91, 0.16); }
    50% { box-shadow: 0 0 0 7px rgba(31, 170, 91, 0.05); }
}

/* Portrait */
.hero__media { display: flex; justify-content: center; }
.portrait { position: relative; width: min(420px, 100%); }
.portrait__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-strong);
    box-shadow: 0 30px 60px -30px rgba(20, 33, 58, 0.35);
}
.portrait::before {
    content: '';
    position: absolute; inset: 16px -16px -16px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-strong);
    z-index: -1;
}
.portrait__badge {
    position: absolute;
    left: -18px; bottom: 26px;
    display: flex; flex-direction: column; gap: 2px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 40px -20px rgba(20, 33, 58, 0.4);
    max-width: 210px;
}
.portrait__badge-num {
    font-family: var(--ff-display);
    font-weight: 700; font-size: 2.1rem; color: var(--ink); line-height: 1;
}
.portrait__badge-num span { color: var(--gold); }
.portrait__badge-label {
    font-size: 0.78rem; color: var(--muted); line-height: 1.4; margin-top: 4px;
}

/* ===== TRUST STRIP ===== */
.strip {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
.strip__inner {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 16px 40px;
    padding-top: 26px; padding-bottom: 26px;
}
.strip__label {
    font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted);
}
.strip__list { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.strip__list li {
    font-family: var(--ff-display);
    font-weight: 600; font-size: 1.05rem; color: var(--ink);
    opacity: 0.85;
}

/* ===== EXPERTISE CARDS ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2.4vw, 28px);
}
.card {
    position: relative;
    padding: clamp(26px, 3vw, 38px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.5s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -28px rgba(20, 33, 58, 0.4); border-color: var(--line-strong); }
.card:hover::before { transform: scaleX(1); }
.card__num {
    position: absolute; top: 24px; right: 28px;
    font-family: var(--ff-display); font-weight: 600;
    font-size: 1.05rem; color: var(--line-strong);
}
.card__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; margin-bottom: 24px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 14px;
}
.card__icon svg { width: 26px; height: 26px; }
.card__title { font-size: var(--fs-h3); margin-bottom: 14px; }
.card__text { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 22px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card__tags li {
    font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em;
    color: var(--accent-deep);
    background: var(--accent-soft);
    padding: 5px 12px; border-radius: 100px;
}

/* ===== ABOUT ===== */
.about { background: var(--paper-alt); }
.about__grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
}
.about__media { position: relative; }
.framed { position: relative; width: 100%; }
.framed__img {
    width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-strong);
    box-shadow: 0 30px 60px -34px rgba(20, 33, 58, 0.4);
}
.framed::after {
    content: '';
    position: absolute; inset: -14px -14px 14px 14px;
    border: 1px solid var(--gold); opacity: 0.5;
    border-radius: var(--radius-lg); z-index: -1;
}
.about__stats {
    display: flex; gap: 14px;
    margin-top: 26px;
}
.stat {
    flex: 1;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.stat__num, .stat__plus {
    font-family: var(--ff-display); font-weight: 700;
    font-size: 2rem; color: var(--ink); line-height: 1;
}
.stat__plus { color: var(--gold); }
.stat__label { display: block; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }

.about__content .section__title { margin-bottom: 22px; }
.facts {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    margin: 32px 0 36px;
}
.fact dt {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 4px;
}
.fact dt .icon { color: var(--accent); width: 17px; height: 17px; }
.fact dd { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }

/* ===== EXPERIENCE / TIMELINE ===== */
.timeline {
    max-width: 860px;
    border-top: 1px solid var(--line);
}
.tl { border-bottom: 1px solid var(--line); }
.tl__row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px;
    padding: 26px 6px;
    cursor: pointer;
    transition: background 0.25s ease;
}
.tl__row:hover { background: rgba(37, 73, 201, 0.03); }
.tl__head { display: flex; flex-direction: column; gap: 3px; }
.tl__role { font-size: var(--fs-lg); font-weight: 600; }
.tl__org { font-size: var(--fs-sm); font-weight: 600; color: var(--accent); }
.tl__meta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.tl__date { font-size: 0.82rem; font-weight: 600; color: var(--muted); white-space: nowrap; letter-spacing: 0.03em; }
.tl__chev { width: 20px; height: 20px; color: var(--muted); transition: transform 0.35s var(--ease), color 0.25s ease; }
.tl__row[aria-expanded="true"] .tl__chev { transform: rotate(180deg); color: var(--accent); }
.tl__body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease);
}
.tl__body p {
    padding: 0 6px 26px;
    font-size: var(--fs-sm); color: var(--ink-2); max-width: 65ch;
}
.tl__row[aria-expanded="true"] + .tl__body { max-height: 220px; }

/* ===== VENTURES ===== */
.ventures__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2.4vw, 28px);
}
.venture {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.venture:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -28px rgba(20, 33, 58, 0.4); border-color: var(--line-strong); }
.venture__logo {
    display: flex; align-items: center; justify-content: center;
    height: 150px; padding: 30px;
    background: #f4f1ea;
    border-bottom: 1px solid var(--line);
}
.venture__logo img { max-height: 66px; max-width: 172px; object-fit: contain; }
.venture__info {
    display: flex; flex-direction: column; gap: 4px;
    padding: 22px 24px;
}
.venture__name { font-size: var(--fs-h3); }
.venture__role {
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--gold);
}
.venture__go {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 0 24px 24px;
    color: var(--accent);
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: var(--t);
}
.venture__go svg { width: 18px; height: 18px; }
.venture:hover .venture__go { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== INSIGHTS ===== */
.insights { background: var(--paper-alt); }
.article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.article__media { position: relative; min-height: 320px; }
.article__media img { width: 100%; height: 100%; object-fit: cover; }
.article__tag {
    position: absolute; top: 18px; left: 18px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: #fff;
    background: var(--accent); padding: 6px 14px; border-radius: 100px;
}
.article__body { padding: clamp(28px, 4vw, 48px); }
.article__title { font-size: var(--fs-h3); margin-bottom: 18px; }
.article__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.article__meta li {
    font-size: 0.76rem; font-weight: 600; color: var(--accent-deep);
    background: var(--accent-soft); padding: 5px 12px; border-radius: 100px;
}

/* ===== CONTACT (dark) ===== */
.contact {
    padding: clamp(72px, 10vw, 130px) 0;
    background:
        radial-gradient(70% 90% at 50% 0%, rgba(37, 73, 201, 0.28), transparent 70%),
        var(--dark);
    color: var(--on-dark);
    text-align: center;
}
.contact__inner { max-width: 760px; }
.contact__title {
    font-size: var(--fs-h2); color: #fff; margin-bottom: 18px;
}
.contact__lead {
    font-size: var(--fs-md); color: var(--on-dark-muted);
    max-width: 56ch; margin: 0 auto 36px;
}
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 44px; }
.contact__socials {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.contact__socials a {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 18px;
    font-size: var(--fs-sm); font-weight: 500;
    color: var(--on-dark-muted);
    border: 1px solid var(--on-dark-line);
    border-radius: 100px;
    transition: var(--t);
}
.contact__socials svg { width: 17px; height: 17px; }
.contact__socials a:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); }

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-2);
    color: var(--on-dark-muted);
    padding: clamp(48px, 6vw, 72px) 0 32px;
}
.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--on-dark-line);
}
.brand__name--foot { color: #fff; font-size: 1.2rem; }
.footer__tag { margin-top: 12px; font-size: var(--fs-sm); max-width: 40ch; }
.footer__heading {
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #fff; margin-bottom: 16px;
    font-family: var(--ff-body);
}
.footer__nav li, .footer__connect li { margin-bottom: 9px; }
.footer__nav a, .footer__connect a { font-size: var(--fs-sm); color: var(--on-dark-muted); }
.footer__nav a:hover, .footer__connect a:hover { color: #fff; }
.footer__bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px; padding-top: 28px;
    font-size: 0.82rem; color: rgba(255, 255, 255, 0.45);
}
.footer__legal a { color: rgba(255, 255, 255, 0.7); }
.footer__legal a:hover { color: #fff; }
.footer__note { color: rgba(255, 255, 255, 0.4); }

/* ===== BACK TO TOP ===== */
.to-top {
    position: fixed; right: 24px; bottom: 24px;
    width: 46px; height: 46px; z-index: 900;
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: var(--ink);
    border-radius: 12px;
    opacity: 0; visibility: hidden; transform: translateY(14px);
    transition: var(--t);
    box-shadow: 0 12px 28px -12px rgba(20, 33, 58, 0.6);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent-deep); transform: translateY(-3px); }

/* ===== PRIVACY NOTICE ===== */
.privacy-note {
    position: fixed; left: 24px; bottom: 24px; z-index: 1200;
    max-width: 400px;
    display: flex; flex-direction: column; gap: 12px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 20px 50px -18px rgba(20, 33, 58, 0.35);
    font-size: 0.86rem; color: var(--ink-2);
    animation: note-in 0.4s var(--ease);
}
.privacy-note[hidden] { display: none; }
.privacy-note a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.privacy-note__btn {
    align-self: flex-start;
    padding: 8px 18px; font-size: 0.82rem; font-weight: 600;
    color: #fff; background: var(--ink); border-radius: 8px;
    transition: var(--t);
}
.privacy-note__btn:hover { background: var(--accent-deep); }
@keyframes note-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ===== SCROLL REVEAL ===== */
[data-animate] {
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-animate].in { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .hero__container { grid-template-columns: 1fr; gap: 48px; }
    .hero__media { order: -1; justify-content: flex-start; }
    .portrait { width: min(340px, 100%); }
    .about__grid { grid-template-columns: 1fr; gap: 44px; }
    .cards { grid-template-columns: 1fr; max-width: 520px; }
    .ventures__grid { grid-template-columns: repeat(2, 1fr); }
    .article { grid-template-columns: 1fr; }
    .article__media { min-height: 260px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .nav__toggle { display: flex; }
    .nav__menu {
        position: fixed; inset: 0 0 0 auto;
        width: min(82%, 340px);
        background: var(--surface);
        border-left: 1px solid var(--line);
        box-shadow: -16px 0 40px -20px rgba(20, 33, 58, 0.4);
        padding: calc(var(--header-h) + 16px) 24px 32px;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease);
        overflow-y: auto;
    }
    .nav__menu.open { transform: translateX(0); }
    .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
    .nav__link { padding: 14px 16px; font-size: 1rem; border-radius: 10px; }
    .nav__link:hover { background: var(--accent-soft); }
    .nav__cta-item { margin-top: 10px; }
    .nav__link--cta { margin-left: 0; justify-content: center; }
    body.menu-open { overflow: hidden; }
    body.menu-open::after {
        content: ''; position: fixed; inset: 0; z-index: 999;
        background: rgba(20, 33, 58, 0.4);
        backdrop-filter: blur(2px);
        animation: note-in 0.3s ease;
    }
    .portrait__badge { left: 0; }
    .facts { grid-template-columns: 1fr; gap: 18px; }
    .tl__row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .tl__meta { width: 100%; justify-content: space-between; }
    .privacy-note { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

@media (max-width: 480px) {
    .ventures__grid { grid-template-columns: 1fr; max-width: 360px; }
    .about__stats { flex-direction: column; }
    .contact__actions .btn, .hero__actions .btn { width: 100%; justify-content: center; }
    .footer__grid { grid-template-columns: 1fr; }
    .strip__inner { gap: 12px; }
}

/* ===== MOTION / CONTRAST PREFERENCES ===== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    [data-animate] { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
    .card, .venture, .article, .stat, .timeline, .tl { border: 1px solid currentColor; }
    .btn { border: 1px solid currentColor; }
}
