/* ============================================
   ANIRUDH PADIYAL — Enterprise Technology Architect
   Own identity: Space Grotesk, data-flow field,
   pipeline dividers, dashboard tiles, FRAGMENTS→ONE SYSTEM.
   Craft bar: rakeshralla.com level. Devices: original.
   ============================================ */

/* === CSS Variables === */
:root {
    /* Colors — Obsidian Dark */
    --color-bg: #0A0A0A;
    --color-bg-elevated: #111111;
    --color-bg-glass: rgba(255, 255, 255, 0.03);
    --color-bg-glass-hover: rgba(255, 255, 255, 0.06);

    /* Accent — Steel Blue trio */
    --color-accent: #4A90D9;
    --color-accent-lum: #7FB4EE;
    --color-accent-deep: #2C5E96;
    --accent-rgb: 74, 144, 217;

    /* Text */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: rgba(255, 255, 255, 0.6);
    --color-text-muted: rgba(255, 255, 255, 0.4);

    /* Gradients */
    --gradient-glow: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    /* Steel sunburst — deep edges, luminous center */
    --gradient-sunburst: linear-gradient(105deg, #2E64A0 0%, #7FB4EE 38%, #B4D6F9 50%, #7FB4EE 62%, #28568C 100%);

    /* Typography */
    /* Hanken Grotesk = the free "Söhne": neutral, premium body sans.
       Fraunces = high-contrast display serif for the wordmark + headlines. */
    --font-primary: 'Hanken Grotesk', sans-serif;
    --font-display: 'Fraunces', Georgia, serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-2xl: 12rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);

    /* Glass */
    --glass-blur: blur(20px);
}

/* =====================================================
   LIGHT THEME  ([data-theme="light"] on <html>)
   The DEFAULT for this site (dark is opt-in via the nav toggle).
   Same "swap the buckets" pattern as arkfortune.com: we don't
   repaint individual rules, we re-point the CSS variables every
   rule already reads, so the whole site cascades to light with
   no per-rule edits.

   LIGHT ACCENT = FERN / MONEY GREEN (client pick, matches Ark Fortune).
   Two greens split by WCAG AA contrast on warm paper/white:
     • #2F8F4E (fern) — AA-LARGE (3:1) → FILLS & white-text-on-green buttons.
     • #24713D (deep) — AA-BODY (4.5:1+) on paper/white/tint → ALL accent
       text/icons/lines, any size. So --color-accent uses the DEEP green.
   Dark mode is UNTOUCHED and stays steel-blue.
   ===================================================== */
[data-theme="light"] {
    /* Warm enterprise off-white — same restrained warm neutral as Ark Fortune,
       so the page reads premium-B2B, not clinical and not a cream event site. */
    --color-bg:            #F8F5EF;   /* app canvas — warm off-white */
    --color-bg-elevated:   #FFFDFA;   /* card / panel — faintest warm white (lifts off base) */
    --color-bg-glass:       rgba(16, 18, 32, 0.03);
    --color-bg-glass-hover: rgba(16, 18, 32, 0.06);

    /* Accent — fern green trio (replaces steel-blue in LIGHT ONLY) */
    --color-accent:      #24713D;   /* text/icons/lines/dots — deep fern, AA-body everywhere */
    --color-accent-lum:  #2F8F4E;   /* bright fern for fills / hover glow */
    --color-accent-deep: #1C5A30;   /* deepest pressed fern */
    --accent-rgb:        36, 113, 61;

    /* Text — dark ink on warm paper */
    --color-text-primary:   #0E1220;
    --color-text-secondary: rgba(14, 18, 32, 0.62);
    --color-text-muted:     rgba(14, 18, 32, 0.42);

    /* Gradients re-point to fern */
    --gradient-glow:     radial-gradient(circle, rgba(47,143,78,0.30) 0%, transparent 70%);
    --gradient-sunburst: linear-gradient(105deg, #1C5A30 0%, #2F8F4E 38%, #57C47C 50%, #2F8F4E 62%, #1C5A30 100%);
}

/* FOUC guard: head script adds .no-transition on <html> before first paint,
   JS removes it after two frames — so the initial theme paint never animates. */
.no-transition,
.no-transition * {
    transition: none !important;
}

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 90px; }
html, body { overflow-x: clip; }

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

/* === Cursor Glow === */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--gradient-glow);
    opacity: 0.07;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: opacity var(--transition-smooth);
}

/* === Navigation === */
.nav {
    position: fixed;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
}
.nav-right {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: flex;
    gap: 2rem;
    align-items: center;
    pointer-events: auto;
    padding: 6px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background var(--transition-smooth), border-color var(--transition-smooth);
}
.nav--scrolled .nav-right {
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.07);
}
.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
}
.nav-link:hover { color: var(--color-accent); }
.nav-link--cta {
    color: var(--color-accent-lum);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 10px;
    padding: 0.55rem 1.3rem;
    transition: color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.nav-link--cta:hover {
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.25);
}

/* === Theme toggle (sun ↔ moon sliding switch) === */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: 4px;
    padding-left: 20px;
    border-left: 1px solid rgba(var(--accent-rgb), 0.18);
    background: none;
    line-height: 1;
    cursor: pointer;
}
.theme-toggle .theme-icon {
    font-size: 13px;
    font-style: normal;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}
/* Default STATE = light: sun lit, moon dim */
.theme-toggle .theme-icon-sun  { color: var(--color-accent); opacity: 1; }
.theme-toggle .theme-icon-moon { color: var(--color-text-muted); opacity: 0.5; }
[data-theme="dark"] .theme-toggle .theme-icon-sun  { color: var(--color-text-muted); opacity: 0.5; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { color: #F4F6F9; opacity: 1; }

.theme-toggle .toggle-track {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 50px;
    /* Apple-style: soft translucent capsule, faint inner shadow for depth */
    background: rgba(16, 18, 32, 0.06);
    border: 1px solid rgba(16, 18, 32, 0.08);
    box-shadow: inset 0 1px 2px rgba(16, 18, 32, 0.06);
    transition: background var(--transition-smooth), border-color var(--transition-fast);
    flex-shrink: 0;
}
[data-theme="dark"] .theme-toggle .toggle-track {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.theme-toggle .toggle-thumb {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent);
    /* premium two-layer shadow — the iOS knob lift */
    box-shadow: 0 1px 2px rgba(16, 18, 32, 0.12), 0 2px 8px rgba(16, 18, 32, 0.18);
    /* Light (default): thumb sits left, under the sun */
    transform: translateY(-50%) translateX(0);
    transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition-fast);
}
[data-theme="dark"] .theme-toggle .toggle-thumb {
    /* Dark: thumb slides right, under the moon */
    transform: translateY(-50%) translateX(20px);
    background: var(--color-accent-lum);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 12px rgba(var(--accent-rgb), 0.45);
}
.theme-toggle:hover .toggle-track { border-color: rgba(var(--accent-rgb), 0.4); }

/* === Light-theme fixups for the few HARDCODED dark values
       (literal hex/rgba that don't read a variable, so they can't cascade) === */
[data-theme="light"] .hero {
    background:
        radial-gradient(ellipse 120% 50% at 50% 108%, rgba(var(--accent-rgb), 0.06), transparent 60%),
        linear-gradient(180deg, #F8F5EF 0%, #F1EEE6 55%, #F8F5EF 100%);
}
[data-theme="light"] .hero__title { color: #0E1220; }

/* CTA button: on hover the text turns white, so the button must FILL green
   (default cream fill + white text = invisible). Fill + lift on hover. */
[data-theme="light"] .nav-link--cta:hover {
    color: #fff;
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.28);
}

/* Scrolled nav: premium Apple-glass panel — translucent warm paper,
   real blur, hairline border + soft lift (not a hard grey slab). */
[data-theme="light"] .nav--scrolled .nav-right {
    background: rgba(250, 248, 243, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    border-color: rgba(16, 18, 32, 0.07);
    box-shadow: 0 6px 24px -12px rgba(16, 18, 32, 0.18);
}

/* Footer FRAGMENTS → ONE SYSTEM: the dark wash + faint muted text read
   cheap on paper. Repaint for light — clean upward paper fade, readable
   FRAGMENTS, deep-fern ONE SYSTEM (the pale gradient center washed out). */
[data-theme="light"] .footer {
    border-top: 1px solid rgba(16, 18, 32, 0.06);
    background: linear-gradient(to top, rgba(228, 241, 232, 0.55), transparent);
}
[data-theme="light"] .lockup__fragments { color: rgba(14, 18, 32, 0.5); }
[data-theme="light"] .lockup__arrow { color: var(--color-accent); opacity: 0.85; }
[data-theme="light"] .lockup__one {
    /* solid deep fern with a subtle luminous core — no washed-out pale center */
    background: linear-gradient(135deg, #1C5A30 0%, #2F8F4E 50%, #1C5A30 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(36, 113, 61, 0.22));
}
[data-theme="light"] .footer__lockup::before {
    background: radial-gradient(ellipse, rgba(47, 143, 78, 0.16) 0%, transparent 55%);
}

/* === Hero === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* subtle vertical depth — darker floor, faint steel horizon */
    background:
        radial-gradient(ellipse 120% 50% at 50% 108%, rgba(var(--accent-rgb), 0.07), transparent 60%),
        linear-gradient(180deg, #0A0A0A 0%, #0B0E13 55%, #0A0A0A 100%);
}
.hero__background { position: absolute; inset: 0; z-index: 0; }
#flowCanvas { width: 100%; height: 100%; }

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--space-sm);
}

.hero__eyebrow {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

/* Giant wordmark — solid ivory, assembles from fragments (JS),
   then breathes a slow steel glow. No shimmer gradient: that's RALLA's move. */
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 14vw, 10.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    color: #F4F6F9;
    animation: steelBreathe 6s ease-in-out 2.2s infinite;
}
.hero__title .glyph {
    display: inline-block;
    will-change: transform, opacity, filter;
}
@keyframes steelBreathe {
    0%, 100% { text-shadow: 0 0 0 rgba(var(--accent-rgb), 0); }
    50% { text-shadow: 0 0 60px rgba(var(--accent-rgb), 0.35); }
}

.hero__subtitle {
    font-size: clamp(0.85rem, 2.2vw, 1.1rem);
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--color-accent-lum);
    margin-top: var(--space-sm);
}

.hero__tagline {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-top: 0.9rem;
}

.hero__availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 1.6rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.05);
}
.availability__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
    animation: availPulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes availPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.hero__actions {
    margin-top: var(--space-md);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 2.2rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-bg);
    background: var(--color-accent);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.hero__button:hover { box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.35); }
.hero__button--ghost {
    color: var(--color-text-primary);
    background: transparent;
    border: 1px solid rgba(var(--accent-rgb), 0.4);
}
.hero__button--ghost:hover { border-color: var(--color-accent); box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.18); }

/* Scroll Indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
    transition: opacity var(--transition-smooth);
}
.hero__scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.scroll-line {
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, rgba(var(--accent-rgb), 0.6), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.7; }
    50% { transform: scaleY(0.6); opacity: 1; transform-origin: top; }
}
.hero__scroll-indicator.fade-out { opacity: 0; pointer-events: none; }

/* === Sections === */
.section { position: relative; padding: var(--space-xl) var(--space-md); z-index: 1; }
.section__container { max-width: 1200px; margin: 0 auto; width: 100%; }

.section-header {
    margin-bottom: var(--space-lg);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal);
}
.section-header.revealed { opacity: 1; transform: translateY(0); }
.section-header--center { text-align: center; }
.section-header--center .section-label::before { display: none; }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent-lum);
    margin-bottom: 1.25rem;
}
.section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--color-accent);
    transition: width 0.6s var(--ease-reveal);
}
.revealed .section-label::before { width: 40px; }

.section-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -0.015em;
    line-height: 1.08;
    color: var(--color-text-primary);
    margin-bottom: 1.25rem;
}
.section-heading--xl { font-size: clamp(2.3rem, 6vw, 4.4rem); }

.section-sub {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 520px;
    line-height: 1.8;
    font-weight: 400;
}
.section-sub--center { margin-left: auto; margin-right: auto; text-align: center; max-width: 560px; }

.section__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent-lum);
    margin-bottom: var(--space-lg);
}

/* Generic reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* === The Pattern === */
.about__content { max-width: 800px; }
.about__text {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    font-weight: 400;
}
.about__text--large {
    font-size: clamp(1.9rem, 5vw, 3.3rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

.text-accent {
    color: var(--color-accent-lum);
    background: var(--gradient-sunburst);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (forced-colors: active) {
    .text-accent { -webkit-text-fill-color: currentColor; color: currentColor; }
}

/* === Pipeline dividers — Anirudh's own device ===
   Two source nodes feed a stage label; the line fills like a
   pipeline completing. */
.flow-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}
.flow-divider__line {
    height: 1px;
    flex: 1;
    max-width: 180px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.35));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.1s var(--ease-reveal) 0.2s;
}
.flow-divider__line--r {
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.35), transparent);
    transform-origin: right;
    transition-delay: 0.2s;
}
.flow-divider.revealed .flow-divider__line { transform: scaleX(1); }
.flow-divider__node {
    width: 6px;
    height: 6px;
    background: rgba(var(--accent-rgb), 0.25);
    transform: rotate(0deg);
    transition: background 0.5s 0.9s, box-shadow 0.5s 0.9s;
}
.flow-divider.revealed .flow-divider__node {
    background: var(--color-accent);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
}
.flow-divider__chapter {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--color-accent-lum);
    opacity: 0;
    transition: opacity 0.6s 0.6s;
    white-space: nowrap;
}
.flow-divider.revealed .flow-divider__chapter { opacity: 0.85; }
.flow-divider--final .flow-divider__chapter { font-size: 1rem; }

/* Story bridges */
.story-bridge { text-align: center; padding: 2rem 2rem 1rem; position: relative; z-index: 1; }
.story-bridge__text {
    font-size: 1.05rem;
    font-weight: 400;
    font-style: italic;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
}
.story-bridge__text::after {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: rgba(var(--accent-rgb), 0.3);
    margin: 12px auto 0;
}
.story-bridge--final .story-bridge__text { font-size: 1.25rem; color: var(--color-text-secondary); }

/* === Impact tiles — dashboard flavor, his world === */
.impact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    max-width: 920px;
    margin: 0 auto 4rem;
}
.impact__tile {
    position: relative;
    background: var(--color-bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.6rem 1.6rem 1.4rem;
    text-align: left;
    overflow: hidden;
    transition: border-color var(--transition-smooth), background var(--transition-smooth);
}
.impact__tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), transparent 70%);
}
.impact__tile:hover { border-color: rgba(var(--accent-rgb), 0.25); background: var(--color-bg-glass-hover); }
.impact__label {
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}
.impact__number {
    display: block;
    font-size: clamp(2.1rem, 4.5vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: var(--gradient-sunburst);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.impact__context {
    display: block;
    font-size: 0.76rem;
    color: var(--color-text-muted);
    margin-top: 0.7rem;
    letter-spacing: 0.02em;
}

/* === Case studies — dashboard panels === */
.cases { display: flex; flex-direction: column; gap: 2rem; }

.case {
    position: relative;
    background: var(--color-bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: clamp(1.8rem, 3.5vw, 3rem);
    overflow: hidden;
    transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal),
                border-color var(--transition-smooth), background var(--transition-smooth);
}
.case::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), transparent 60%);
}
.case:hover { border-color: rgba(var(--accent-rgb), 0.25); background: var(--color-bg-glass-hover); }

.case__head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
    padding-bottom: 1.6rem;
    margin-bottom: 1.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.case__company {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-accent-lum);
    margin-bottom: 0.8rem;
}
.case__title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.6vw, 1.8rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.7rem;
}
.case__context {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    line-height: 1.6;
}
.case__metric { text-align: right; }
.case__metric-num {
    display: block;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: var(--gradient-sunburst);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 24px rgba(var(--accent-rgb), 0.25));
}
.case__metric-unit { font-size: 0.5em; font-weight: 700; }
.case__metric-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 8px;
}

.case__body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.case__block-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-accent-lum);
    margin-bottom: 0.7rem;
}
.case__block-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: rgba(var(--accent-rgb), 0.6);
}
.case__block p {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}
.case__block strong { color: var(--color-text-primary); font-weight: 700; }

/* === History === */
.history { margin-top: 2.5rem; }
.history__row {
    display: grid;
    grid-template-columns: 170px 1fr auto;
    gap: 1.2rem;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal),
                border-color var(--transition-fast);
}
.history__row:hover { border-color: rgba(var(--accent-rgb), 0.25); }
.history__row:last-child { border-bottom-color: transparent; }
.history__dates { font-size: 0.78rem; color: var(--color-text-muted); letter-spacing: 0.04em; }
.history__role { font-size: 0.95rem; font-weight: 500; color: var(--color-text-primary); }
.history__company {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent-lum);
    text-align: right;
}
.history__edu {
    margin-top: 2.2rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.03em;
}

/* === Toolkit === */
.engine__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.engine-node {
    padding: 2rem 1.6rem;
    background: var(--color-bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal),
                border-color var(--transition-smooth), background var(--transition-smooth);
}
.engine-node:hover { border-color: rgba(var(--accent-rgb), 0.3); background: var(--color-bg-glass-hover); }
.engine-node__icon { width: 42px; height: 42px; margin-bottom: 1.1rem; color: var(--color-accent-lum); }
.engine-node__icon svg { width: 100%; height: 100%; }
.engine-node__title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.4rem; }
.engine-node__desc { font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.6; }

.techstack__cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}
.tech-chip {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.tech-chip:hover { color: var(--color-accent-lum); border-color: rgba(var(--accent-rgb), 0.35); }

/* === Contact === */
.section--contact {
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 56vh;
    display: flex;
    align-items: center;
}
.contact-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
#convergeCanvas { width: 100%; height: 100%; }

.architecture__ambient { position: absolute; inset: 0; pointer-events: none; }
.ambient__glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
}
.ambient__glow--left {
    top: 20%;
    left: -10%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08), transparent 70%);
    animation: ambientFloat 15s ease-in-out infinite;
}
.ambient__glow--right {
    bottom: 20%;
    right: -10%;
    background: radial-gradient(circle, rgba(127, 180, 238, 0.06), transparent 70%);
    animation: ambientFloat 18s ease-in-out infinite reverse;
}
@keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(30px, -20px); opacity: 0.8; }
}

.contact__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    position: relative;
    z-index: 1;
    width: 100%;
}
.contact__cta {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

/* Pulsing hub — the "one system" period */
.cta__hub {
    display: inline-block;
    position: relative;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    vertical-align: middle;
    transform: translateY(-2px);
}
.hub__ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid;
}
.hub__ring--1 { width: 10px; height: 10px; border-color: rgba(var(--accent-rgb), 0.5); animation: hubPulse1 2.5s ease-in-out infinite; }
.hub__ring--2 { width: 18px; height: 18px; border-color: rgba(var(--accent-rgb), 0.25); animation: hubPulse2 3s ease-in-out infinite 0.3s; }
.hub__core {
    position: absolute;
    top: 50%; left: 50%;
    width: 6px; height: 6px;
    transform: translate(-50%, -50%);
    background: var(--color-accent);
    border-radius: 50%;
    animation: hubCorePulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--color-accent), 0 0 16px rgba(var(--accent-rgb), 0.4);
}
@keyframes hubPulse1 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}
@keyframes hubPulse2 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.25; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.4; }
}
@keyframes hubCorePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.contact__actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.contact__button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-bg);
    background: var(--color-accent);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.contact__button:hover { box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.3); }
.contact__button--ghost {
    color: var(--color-text-primary);
    background: transparent;
    border: 1px solid rgba(var(--accent-rgb), 0.4);
}
.contact__button--ghost:hover { border-color: var(--color-accent); box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.2); }

.button__glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}
.contact__button:hover .button__glow,
.hero__button:hover .button__glow { transform: translateX(100%); }

.contact__links {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.contact__link { color: var(--color-text-secondary); transition: color var(--transition-fast); }
a.contact__link:hover { color: var(--color-accent-lum); }
.contact__link--static { cursor: default; }
.contact__sep { color: rgba(255, 255, 255, 0.2); }

/* === Footer — FRAGMENTS → ONE SYSTEM (thesis, typographically enacted) === */
.footer {
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.footer__lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    position: relative;
}
.footer__lockup::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.13) 0%, transparent 55%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
    animation: pulse-glow 5s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

/* the broken word: widely tracked, dim, each glyph slightly displaced (JS jitter) */
.lockup__fragments {
    font-size: clamp(0.9rem, 2.6vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.85em;
    margin-right: -0.85em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.lockup__fragments .glyph {
    display: inline-block;
    transition: transform 1.1s var(--ease-reveal), opacity 1.1s var(--ease-reveal);
}
.lockup__arrow {
    font-size: 1.1rem;
    color: var(--color-accent-lum);
    opacity: 0.7;
}
/* the resolved system: huge, tight, solid, steel */
.lockup__one {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 9vw, 6.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
    background: var(--gradient-sunburst);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 44px rgba(var(--accent-rgb), 0.25));
}

.footer__credit {
    margin-top: var(--space-lg);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* === Responsive === */
@media (max-width: 820px) {
    .case__head { grid-template-columns: 1fr; gap: 1.2rem; }
    .case__metric { text-align: left; }
    .case__body { grid-template-columns: 1fr; gap: 1.4rem; }
    .history__row { grid-template-columns: 1fr; gap: 4px; }
    .history__company { text-align: left; }
    .impact { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 480px) {
    .section { padding: var(--space-lg) var(--space-sm); }
    .nav-right { gap: 0.8rem; right: var(--space-sm); }
    .nav-link { font-size: 0.72rem; }
    .nav-link--cta { padding: 0.45rem 0.9rem; }
    .hero__title { font-size: clamp(2.4rem, 13vw, 10.5rem); letter-spacing: -0.01em; }
    .hero__subtitle { letter-spacing: 0.2em; font-size: 0.72rem; }
    .hero__availability { font-size: 0.62rem; letter-spacing: 0.12em; padding: 0.55rem 0.9rem; }
    .hero__actions { flex-direction: column; width: 100%; padding: 0 var(--space-sm); }
    .hero__button { width: 100%; justify-content: center; min-height: 48px; }
    .lockup__fragments { letter-spacing: 0.5em; margin-right: -0.5em; }
    .contact__actions { flex-direction: column; width: 100%; }
    .contact__button { width: 100%; min-height: 48px; }
}

/* === Reduced motion — everything lands in final state === */
@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-reveal], .section-header, .flow-divider, .story-bridge {
        opacity: 1 !important;
        transform: none !important;
    }
    .flow-divider__line { transform: scaleX(1) !important; }
    .flow-divider__chapter { opacity: 0.85 !important; }
    .hero__title .glyph, .lockup__fragments .glyph { transform: none !important; opacity: 1 !important; filter: none !important; }
}
