/* ═══════════════════════════════════════
   VARIABLES
   ═══════════════════════════════════════ */
:root {
    --black: #000;
    --white: #fff;
    --g100: #eee;
    /* Text ramp — this is the UNLIT state, and it is the worst case: the spotlight
       only ever adds light. Every value clears 4.5:1 on black, and still clears it
       against the faint .glow layer. #7a7a7a is the floor; anything darker fails
       WCAG AA before the lamp even touches it. */
    --g300: #949494;
    --g400: #878787;
    --g500: #808080;
    --g600: #7a7a7a;
    /* Border ramp. Decorative only — never use these for text. */
    --g700: #2f2f2f;
    --g800: #1a1a1a;
    --g900: #111;
    --accent: #a78bfa;
    --font-h: 'Space Grotesk', sans-serif;
    --font-b: 'Inter', sans-serif;
    --font-m: 'JetBrains Mono', monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --container: 1140px;
}

/* ═══════════════════════════════════════
   RESET
   ═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-b);
    font-size: 16px;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* Solid, not translucent: a 15%-white highlight sits at rgb(38,38,38) on this page,
   and the beam would dodge it up to a pale slab with white text on top of it. */
::selection { background: var(--white); color: var(--black); }

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

/* ═══════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════ */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.3s;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.3s, width 0.4s var(--ease), height 0.4s var(--ease), border-color 0.3s;
}

.cursor-follower.is-active {
    width: 60px;
    height: 60px;
    border-color: rgba(255, 255, 255, 0.5);
}

body.cursor-ready .cursor,
body.cursor-ready .cursor-follower {
    opacity: 1;
}

@media (pointer: coarse), (hover: none) {
    .cursor, .cursor-follower { display: none !important; }
}

@media (hover: hover) and (pointer: fine) {
    body.cursor-ready { cursor: none; }
    body.cursor-ready a,
    body.cursor-ready button { cursor: none; }
}

/* ═══════════════════════════════════════
   SPOTLIGHT / LAMP EFFECT
   ═══════════════════════════════════════ */
/* The beam. mix-blend-mode: color-dodge is the whole trick — per spec it returns 0
   whenever the backdrop pixel is 0, and 1 whenever the backdrop is 1:

       Cb == 0 -> 0        the pure black page background is untouchable
       Cb == 1 -> 1        white headings and the white CTA fill stay exactly white
       else    -> pulled toward white

   So the light cannot wash out the background and cannot darken a single glyph.
   Grey text, hairline borders and the photo light up as the beam crosses them;
   contrast under the beam only ever goes UP, which makes the unlit page the worst
   case. That is what lets the text ramp above stay dark.

   A dark radial-gradient painted on top (what this used to be) does the opposite:
   it multiplies every glyph, and on a #000 background it adds no atmosphere at all
   because there is nothing darker than black to fade to. Never reintroduce one. */
.spotlight {
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    background: radial-gradient(
        26vmax circle at var(--spotlight-x, 50%) var(--spotlight-y, 40%),
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.42) 35%,
        rgba(255, 255, 255, 0.16) 65%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.8s ease;
    will-change: opacity;
}

/* color-dodge leaves #000 at #000, so the beam is invisible over empty background.
   This layer is the light you actually see in the void. It sits ABOVE the beam:
   underneath it, its own tint would be dodged up to near-white. Keep it faint —
   it is the only thing here that can lower contrast. */
.glow {
    position: fixed;
    inset: 0;
    z-index: 9001;
    pointer-events: none;
    background:
        radial-gradient(18vmax circle at var(--spotlight-x, 50%) var(--spotlight-y, 40%),
            rgba(255, 255, 255, 0.02), transparent 60%),
        radial-gradient(30vmax circle at var(--spotlight-x, 50%) var(--spotlight-y, 40%),
            rgba(167, 139, 250, 0.05), rgba(167, 139, 250, 0.02) 50%, transparent 80%);
    opacity: 0;
    transition: opacity 0.8s ease;
}

body.spotlight-active .spotlight,
body.spotlight-active .glow {
    opacity: 1;
}

@media (pointer: coarse), (hover: none) {
    .spotlight, .glow { display: none; }
}

/* It chases the cursor and it tints the backdrop — both are opted out of here. */
@media (prefers-reduced-motion: reduce), (prefers-contrast: more) {
    .spotlight, .glow { display: none; }
}

/* Nothing on the page sets a focus style, and body sets `cursor: none`.
   Without this a keyboard user has no idea where they are. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ═══════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 48px;
}

@media (max-width: 768px) {
    .container { padding: 0 24px; }
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════ */
.tag {
    font-family: var(--font-m);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 20px;
}

.heading-xl {
    font-family: var(--font-h);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.05;
    color: var(--white);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
    display: inline-block;
    font-family: var(--font-b);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 16px 32px;
    border-radius: 0;
    transition: all 0.4s var(--ease);
}

/* Lifted above the beam (z-index 9000), like .hero__photo. color-dodge pulls every
   non-black pixel toward white, so the 8%-white hover shadow — rgb(20,20,20) on the
   black page — would balloon into a grey slab with visible banding rings. Anything
   below the beam that paints a soft, low-alpha glow has to be hoisted or removed. */
.btn--primary {
    position: relative;
    z-index: 9002;
    color: var(--black);
    background: var(--white);
}

.btn--primary:hover {
    background: var(--g100);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

.btn--ghost {
    color: var(--g300);
    background: transparent;
    border: 1px solid var(--g700);
    padding: 15px 31px;
}

.btn--ghost:hover {
    color: var(--white);
    border-color: var(--g400);
}

/* ═══════════════════════════════════════
   REVEAL ANIMATIONS
   ═══════════════════════════════════════ */

/* Text clip reveal (hero) */
.text-reveal {
    display: block; /* it is a <span> inside the <h1> */
    overflow: hidden;
    line-height: 1.05;
}

.text-reveal span {
    display: block;
    font-family: var(--font-h);
    font-size: clamp(36px, 8vw, 76px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--white);
    transform: translateY(110%);
    transition: transform 1.2s var(--ease);
}

.text-reveal.is-visible span {
    transform: translateY(0);
}

/* Fade in (hero right side) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.fade-in.is-visible {
    opacity: 1;
    transform: none;
}

/* Section reveal */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal-up.is-visible {
    opacity: 1;
    transform: none;
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 0;
}

.nav__logo {
    font-family: var(--font-h);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
}

.nav__links {
    display: flex;
    gap: 28px;
}

.nav__links a {
    font-family: var(--font-m);
    font-size: 12px;
    color: var(--g500);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    position: relative;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.4s var(--ease);
}

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

.nav__links a:hover::after {
    width: 100%;
}

.hero__grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 80px;
    align-items: center;
    min-height: calc(100vh - 160px);
    padding: 60px 0 100px;
}

.hero__right {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Lifted above the beam (z-index 9000). color-dodge pulls every non-black pixel
   toward white, which blows out a photograph's midtones — text and hairlines are
   what should light up, not the face. */
.hero__photo {
    position: relative;
    z-index: 9002;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.6s var(--ease);
}

.hero__photo:hover {
    filter: grayscale(0%);
}

.hero__desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--g300);
}

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

@media (max-width: 900px) {
    .hero__grid {
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: auto;
        padding: 60px 0 80px;
    }

    .text-reveal span {
        font-size: clamp(32px, 10vw, 56px);
    }
}

@media (max-width: 480px) {
    .nav { padding: 24px 0 0; }

    .hero__grid { padding: 40px 0 60px; }

    .hero__ctas {
        flex-direction: column;
    }

    .btn { text-align: center; }
}

/* ═══════════════════════════════════════
   MARQUEE
   ═══════════════════════════════════════ */
.marquee {
    border-top: 1px solid var(--g800);
    padding: 20px 0;
    overflow: hidden;
    white-space: nowrap;
}

.marquee__track {
    display: inline-flex;
    gap: 0;
    animation: marquee-scroll 40s linear infinite;
    will-change: transform;
}

.marquee__item,
.marquee__sep {
    font-family: var(--font-h);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--g500);
    padding: 0 20px;
    flex-shrink: 0;
}

.marquee__sep {
    color: var(--g600);
    padding: 0 8px;
}

.marquee__item--hl {
    color: var(--white);
}

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

/* ═══════════════════════════════════════
   TRUSEND SECTION
   ═══════════════════════════════════════ */
.s-trusend {
    padding: 140px 0;
    border-top: 1px solid var(--g900);
}

.trusend-intro {
    max-width: 680px;
    margin-bottom: 64px;
}

.trusend-intro p {
    font-size: 16px;
    color: var(--g300);
    margin-bottom: 20px;
    line-height: 1.8;
}

.trusend-intro p:last-child { margin-bottom: 0; }

/* Stats */
.stats {
    display: flex;
    gap: 64px;
    padding: 56px 0;
    margin-bottom: 64px;
    border-top: 1px solid var(--g800);
    border-bottom: 1px solid var(--g800);
}

.stat__num {
    display: block;
    font-family: var(--font-h);
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    line-height: 1;
    color: var(--white);
    letter-spacing: -0.03em;
}

.stat__label {
    display: block;
    font-size: 12px;
    color: var(--g500);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 12px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .stats {
        flex-direction: column;
        gap: 40px;
        padding: 40px 0;
    }
}

/* Features (Accordion) */
.features {
    margin-bottom: 64px;
}

.feature {
    border-top: 1px solid var(--g800);
    padding: 0;
    transition: background 0.4s ease;
}

.feature:last-child {
    border-bottom: 1px solid var(--g800);
}

.feature__head {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 28px 0;
    cursor: pointer;
}

.feature__num {
    font-family: var(--font-m);
    font-size: 13px;
    color: var(--g600);
    min-width: 28px;
    transition: color 0.4s ease;
}

.feature__title {
    font-family: var(--font-h);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 500;
    color: var(--g400);
    transition: color 0.4s ease;
    flex: 1;
}

.feature__desc {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 15px;
    color: var(--g400);
    line-height: 1.7;
    padding-left: 68px;
    transition: max-height 0.6s var(--ease), opacity 0.4s ease, padding 0.6s var(--ease);
    padding-bottom: 0;
}

/* :focus-within is what makes these descriptions reachable without a mouse. */
.feature:hover .feature__title,
.feature:focus-within .feature__title,
.feature.is-open .feature__title {
    color: var(--white);
}

.feature:hover .feature__num,
.feature:focus-within .feature__num,
.feature.is-open .feature__num {
    color: var(--accent);
}

.feature:hover .feature__desc,
.feature:focus-within .feature__desc,
.feature.is-open .feature__desc {
    max-height: 200px; /* fits the longest description at 320px wide / enlarged font */
    opacity: 1;
    padding-bottom: 28px;
}

@media (max-width: 600px) {
    .feature__head { gap: 20px; }
    .feature__desc { padding-left: 48px; }
}

/* Bottom */
.trusend-bottom {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .s-trusend { padding: 100px 0; }
}

@media (max-width: 768px) {
    .s-trusend { padding: 80px 0; }
}

/* ═══════════════════════════════════════
   EXPERTISE SECTION
   ═══════════════════════════════════════ */
.s-expertise {
    padding: 140px 0;
    border-top: 1px solid var(--g900);
}

.expertise-text {
    max-width: 680px;
}

.expertise-text p {
    font-size: 16px;
    color: var(--g300);
    margin-bottom: 24px;
    line-height: 1.8;
}

.expertise-text p:last-child { margin-bottom: 0; }

@media (max-width: 1024px) { .s-expertise { padding: 100px 0; } }
@media (max-width: 768px) { .s-expertise { padding: 80px 0; } }

/* ═══════════════════════════════════════
   BACKGROUND SECTION
   ═══════════════════════════════════════ */
.s-background {
    padding: 140px 0;
    border-top: 1px solid var(--g900);
}

.bg-intro {
    font-size: 16px;
    color: var(--g400);
    max-width: 560px;
    margin-bottom: 56px;
    line-height: 1.8;
}

/* Track record table */
.track {
    margin-bottom: 56px;
}

.track__row {
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 1.5fr 100px;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--g900);
    font-size: 14px;
    align-items: baseline;
    transition: opacity 0.3s ease;
}

.track__row:first-child {
    border-top: 1px solid var(--g900);
}

.track:hover .track__row {
    opacity: 0.4;
}

.track:hover .track__row:hover {
    opacity: 1;
}

.track__company {
    font-family: var(--font-h);
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

.track__role {
    color: var(--g400);
    white-space: nowrap;
}

.track__detail {
    color: var(--g600);
}

.track__year {
    font-family: var(--font-m);
    font-size: 12px;
    color: var(--g600);
    text-align: right;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .track__row {
        grid-template-columns: 1fr 1fr;
        gap: 4px 16px;
    }

    .track__detail { display: none; }

    .track__year {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .track__row {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 14px 0;
    }
}

/* Education */
.edu {
    border-top: 1px solid var(--g900);
    padding-top: 32px;
}

.edu__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    font-size: 14px;
    color: var(--g500);
}

.edu__row span:last-child {
    font-family: var(--font-m);
    font-size: 12px;
    color: var(--g600);
    letter-spacing: 1px;
}

@media (max-width: 1024px) { .s-background { padding: 100px 0; } }
@media (max-width: 768px) { .s-background { padding: 80px 0; } }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
    padding: 140px 0 60px;
    border-top: 1px solid var(--g900);
}

.footer__text {
    font-size: 16px;
    color: var(--g400);
    max-width: 500px;
    margin-bottom: 56px;
    line-height: 1.8;
}

.footer__contacts {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.footer__contacts a {
    font-size: 15px;
    font-weight: 500;
    color: var(--g500);
    transition: color 0.3s ease;
    position: relative;
}

.footer__contacts a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.4s var(--ease);
}

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

.footer__contacts a:hover::after {
    width: 100%;
}

.footer__copy {
    font-size: 12px;
    color: var(--g600);
    letter-spacing: 1px;
}

@media (max-width: 1024px) { .footer { padding: 100px 0 48px; } }
@media (max-width: 768px) { .footer { padding: 80px 0 40px; } }

@media (max-width: 600px) {
    .footer__contacts {
        flex-direction: column;
        gap: 20px;
    }
}

/* ═══════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .text-reveal span,
    .fade-in,
    .reveal-up {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .marquee__track { animation: none; }

    .feature__desc { transition: none; }
}
