/* ==========================================================================
   The Level UP - Dark Premium Theme
   Design tokens mirrored from /portal/receipt-manager/styles/config.css
   Accent standardized to brand orange #fba504 + warm gradient #ff7a00 -> #ffb627.
   NOTE: Tailwind config (inline in index.php) mirrors these same hex values.
   Keep the two in sync if either changes.
   ========================================================================== */

:root {
    /* Surfaces */
    --color-background: #0a0a0f;
    --color-surface: #13131c;
    --color-surface-elevated: #1a1a26;
    --color-surface-hover: #1f1f2e;

    /* Text */
    --color-text-primary: #e8e8ee;
    --color-text-secondary: #a0a0b2;
    --color-text-muted: #6b6b7f;

    /* Accent (brand orange) */
    --color-accent-primary: #fba504;
    --color-accent-secondary: #ff7a00;
    --color-accent-deep: #c47e00;
    --color-accent-glow: rgba(251, 165, 4, 0.15);

    /* Borders */
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-strong: rgba(255, 255, 255, 0.12);

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Motion */
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 200ms;
    --duration-normal: 350ms;
    --duration-slow: 600ms;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

::selection {
    background: var(--color-accent-glow);
    color: #fff;
}

/* Let grid children shrink below their content's intrinsic size
   (prevents images/long words from blowing out tracks -> horizontal overflow) */
.grid > * {
    min-width: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-background); }
::-webkit-scrollbar-thumb {
    background: var(--color-surface-elevated);
    border-radius: 10px;
    border: 2px solid var(--color-background);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-deep); }

/* --------------------------------------------------------------------------
   Signature components
   -------------------------------------------------------------------------- */

/* Frosted glass surface */
.glass {
    background: rgba(26, 26, 38, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--color-border);
}

/* Ambient radial orange bloom (decorative, slowly drifting) */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 165, 4, 0.22) 0%, rgba(255, 122, 0, 0.08) 40%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
    animation: orb-drift 20s var(--transition-smooth) infinite alternate;
}
@keyframes orb-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(4%, -5%) scale(1.12); }
    100% { transform: translate(-4%, 4%) scale(0.95); }
}

/* Shimmer text (ported from 21st shimmer-text) - animated warm sweep */
.shimmer {
    background: linear-gradient(110deg, #ff7a00 0%, #ffe6c2 42%, #ffffff 50%, #ffe6c2 58%, #ff7a00 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shimmer-move 4.5s linear infinite;
}
@keyframes shimmer-move {
    0%   { background-position: 220% 0; }
    100% { background-position: -120% 0; }
}

/* Glowy-waves aurora - drifting blurred orange blooms behind the hero */
.aurora {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.aurora span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.28;
    mix-blend-mode: screen;
}
.aurora span:nth-child(1) {
    width: 46vw; height: 46vw; top: -12%; left: -8%;
    background: radial-gradient(circle, #ff7a00, transparent 62%);
    animation: aurora-1 19s ease-in-out infinite;
}
.aurora span:nth-child(2) {
    width: 40vw; height: 40vw; top: 10%; right: -10%;
    background: radial-gradient(circle, #fba504, transparent 62%);
    animation: aurora-2 23s ease-in-out infinite;
}
.aurora span:nth-child(3) {
    width: 34vw; height: 34vw; bottom: -16%; left: 30%;
    background: radial-gradient(circle, #ff5e00, transparent 60%);
    opacity: 0.2;
    animation: aurora-3 27s ease-in-out infinite;
}
@keyframes aurora-1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(8%,10%)} }
@keyframes aurora-2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-10%,6%)} }
@keyframes aurora-3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(6%,-8%)} }

@media (prefers-reduced-motion: reduce) {
    .glow-orb, .aurora span, .shimmer { animation: none !important; }
}

/* Warm orange clip-text headline */
.text-gradient {
    background: linear-gradient(120deg, #ffffff 0%, var(--color-accent-primary) 55%, var(--color-accent-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Uppercase tracked eyebrow label */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-accent-primary);
    background: linear-gradient(110deg, #ff7a00 0%, #ffe6c2 42%, #ffffff 50%, #ffe6c2 58%, #ff7a00 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-move 4.5s linear infinite;
}
.section-eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 1px;
    background: var(--color-accent-primary);
    opacity: 0.6;
}

/* Animated code-window mock (about section) */
.code-window { background: rgba(13, 13, 20, 0.85); }
.code-body { color: var(--color-text-secondary); }
.code-body .c-key { color: #ff9e2c; }
.code-body .c-cls { color: #ffd27a; }
.code-body .c-fn  { color: #fbbf6b; }
.code-body .c-var { color: #e8e8ee; }
.code-body .c-str { color: #6fcf97; }
/* lines slide/fade in sequentially */
.code-body .cl {
    display: block;
    opacity: 0;
    transform: translateX(-8px);
    animation: code-in 0.5s var(--transition-smooth) forwards;
}
.code-body .cl:nth-child(1) { animation-delay: 0.2s; }
.code-body .cl:nth-child(2) { animation-delay: 0.45s; }
.code-body .cl:nth-child(3) { animation-delay: 0.7s; }
.code-body .cl:nth-child(4) { animation-delay: 0.95s; }
.code-body .cl:nth-child(5) { animation-delay: 1.2s; }
.code-body .cl:nth-child(6) { animation-delay: 1.45s; }
.code-body .cl:nth-child(7) { animation-delay: 1.7s; }
.code-body .cl:nth-child(8) { animation-delay: 1.95s; }
@keyframes code-in { to { opacity: 1; transform: none; } }
.code-body .caret {
    display: inline-block;
    width: 8px; height: 1.05em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--color-accent-primary);
    animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .code-body .cl { opacity: 1; transform: none; animation: none; }
    .code-body .caret { animation: none; }
}

/* Refined feature card - soft depth, barely-there edge, warm corner tint */
.feature-card {
    border-radius: 1.1rem;
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(251, 165, 4, 0.06), transparent 42%),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.35s var(--transition-smooth),
                border-color 0.35s var(--transition-smooth),
                box-shadow 0.35s var(--transition-smooth);
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 165, 4, 0.28);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 165, 4, 0.12);
}

/* Refined feature-card icon (subtle gradient chip + ring) */
.feat-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    color: var(--color-accent-primary);
    font-size: 1.05rem;
    background: linear-gradient(150deg, rgba(251, 165, 4, 0.16), rgba(251, 165, 4, 0.02));
    border: 1px solid rgba(251, 165, 4, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.3s var(--transition-smooth), border-color 0.3s, box-shadow 0.3s;
}
.feature-card:hover .feat-icon {
    transform: translateY(-2px);
    border-color: rgba(251, 165, 4, 0.4);
    box-shadow: 0 8px 24px rgba(251, 165, 4, 0.14);
}

/* Masked tech icon (Kotlin etc.) - takes currentColor like the FA glyphs */
.tech-mask {
    display: inline-block;
    width: 1.6rem;
    height: 1.6rem;
    background: currentColor;
    -webkit-mask: var(--mask) center / contain no-repeat;
    mask: var(--mask) center / contain no-repeat;
}

/* Project (Our Work) card - subtle surface, hairline edge, soft hover */
.portfolio-card {
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.35s var(--transition-smooth),
                border-color 0.35s var(--transition-smooth),
                box-shadow 0.35s var(--transition-smooth);
}
.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 165, 4, 0.22);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
}

/* Clean testimonial (single, click-to-cycle) */
.testi {
    position: relative;
    max-width: 44rem;
    margin: 0 auto;
    padding: 4rem 2.5rem 2.5rem;
    border-radius: 1.5rem;
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(251, 165, 4, 0.05), transparent 45%),
        rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.045);
    cursor: pointer;
    transition: border-color 0.3s var(--transition-smooth);
}
.testi:hover { border-color: rgba(251, 165, 4, 0.18); }
.testi:focus-visible { outline: 2px solid var(--color-accent-primary); outline-offset: 3px; }

.testi-index {
    position: absolute; top: 1.6rem; right: 1.8rem;
    display: flex; align-items: baseline; gap: 0.3rem;
    font-family: 'Space Grotesk', monospace; font-size: 0.8rem;
}
.testi-cur { font-size: 1.5rem; font-weight: 400; color: var(--color-text-primary); }
.testi-sep, .testi-total { color: var(--color-text-muted); }

.testi-avatars { position: absolute; top: 1.9rem; left: 1.8rem; display: flex; gap: 0.4rem; }
.testi-chip {
    width: 1.85rem; height: 1.85rem;
    border-radius: 50%;
    background: var(--color-surface-elevated);
    border: 2px solid var(--color-background);
    color: var(--color-text-secondary);
    font-family: var(--font-display); font-size: 0.6rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s var(--transition-smooth);
}
.testi-chip.is-active {
    background: rgba(251, 165, 4, 0.15);
    color: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    transform: translateY(-1px);
}

.testi-quote {
    font-size: clamp(1.05rem, 1.7vw, 1.4rem);
    font-weight: 300;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
    transition: opacity 0.25s var(--transition-smooth),
                filter 0.25s var(--transition-smooth),
                transform 0.25s var(--transition-smooth);
}
.testi-quote.is-swapping { opacity: 0; filter: blur(6px); transform: translateY(8px); }

.testi-author {
    margin-top: 2.5rem;
    display: flex; align-items: center; gap: 1rem;
    transition: opacity 0.25s var(--transition-smooth);
}
.testi-author.is-swapping { opacity: 0; }
.testi-mono {
    position: relative;
    width: 3rem; height: 3rem;
    border-radius: 50%;
    background: rgba(251, 165, 4, 0.14);
    color: var(--color-accent-primary);
    font-family: var(--font-display); font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.testi-mono::after {
    content: ""; position: absolute; inset: -5px;
    border-radius: 50%; border: 1px solid rgba(251, 165, 4, 0.35);
}
.testi-meta { position: relative; padding-left: 1rem; }
.testi-meta::before {
    content: ""; position: absolute; left: 0; top: 2px; bottom: 2px;
    width: 1px; background: var(--color-accent-primary);
}
.testi-name { display: block; font-size: 0.9rem; font-weight: 500; color: var(--color-text-primary); letter-spacing: 0.01em; }
.testi-role { display: block; margin-top: 0.2rem; font-family: 'Space Grotesk', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--color-text-muted); }

.testi-progress { margin-top: 2.75rem; height: 1px; background: var(--color-border); position: relative; overflow: hidden; }
.testi-progress span {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg, #ff7a00, #ffb627);
    width: 33%;
    transition: width 0.5s var(--transition-smooth);
}
.testi-hint {
    margin-top: 1.5rem;
    font-family: 'Space Grotesk', monospace;
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em;
    color: var(--color-text-muted); opacity: 0.5;
}

/* Radial orbital timeline (Our Stack) */
.orbital { position: relative; }
.orbital-stage {
    position: relative;
    width: 100%;
    height: 560px;
    margin: 0 auto;
    max-width: 760px;
    perspective: 1000px;
}
@media (max-width: 640px) { .orbital-stage { height: 440px; } }

/* center hub */
.orbital-hub {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 96px; height: 96px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 40%, #1c1c28, #0c0c12 75%);
    border: 1px solid rgba(251, 165, 4, 0.4);
    box-shadow: 0 0 50px rgba(251, 165, 4, 0.30), inset 0 0 24px rgba(251, 165, 4, 0.08);
    z-index: 10;
}
.orbital-core {
    width: 62px;
    height: auto;
    pointer-events: none;
}
.orbital-ping {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(251, 165, 4, 0.4);
    animation: orbital-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes orbital-ping {
    0%   { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* guide ring */
.orbital-guide {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 400px; height: 400px;
    pointer-events: none;
}
@media (max-width: 640px) { .orbital-guide { width: 300px; height: 300px; } }

/* nodes */
.orbital-node {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: 0;
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.4s var(--transition-smooth);
    /* JS overrides transform each frame */
}
.orbital-icon {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(26, 26, 38, 0.85);
    border: 2px solid rgba(251, 165, 4, 0.35);
    color: var(--color-accent-primary);
    font-size: 1.05rem;
    box-shadow: 0 0 0 4px rgba(10, 10, 15, 0.6);
    transition: transform 0.3s var(--transition-smooth), background 0.3s, color 0.3s, border-color 0.3s;
}
.orbital-node:hover .orbital-icon { border-color: var(--color-accent-primary); }
.orbital-label {
    display: block;
    margin-top: 0.55rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    white-space: nowrap;
    transition: color 0.3s;
}
.orbital-node.is-active { z-index: 200 !important; opacity: 1 !important; }
.orbital-node.is-active .orbital-icon {
    background: var(--color-accent-primary);
    color: #0a0a0f;
    border-color: var(--color-accent-primary);
    transform: scale(1.25);
    box-shadow: 0 0 0 4px rgba(10, 10, 15, 0.6), 0 0 30px rgba(251, 165, 4, 0.5);
}
.orbital-node.is-active .orbital-label { color: #fff; }

/* detail card */
.orbital-detail {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 250px;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    text-align: left;
    background: rgba(8, 8, 12, 0.94);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--color-border-strong);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--transition-smooth), transform 0.35s var(--transition-smooth);
    z-index: 210;
}
.orbital-node.is-active .orbital-detail {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.orbital-detail::before {
    content: "";
    position: absolute;
    top: -14px; left: 50%;
    width: 1px; height: 14px;
    background: rgba(251, 165, 4, 0.5);
    transform: translateX(-50%);
}
.orbital-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0a0a0f;
    background: var(--color-accent-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.orbital-meter {
    margin-top: 0.7rem;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.orbital-meter span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #ff7a00, #ffb627);
}

/* Animated growth chart (drawn when the parent [data-reveal] gets .in-view) */
.chart-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 2.2s var(--transition-smooth);
}
.in-view .chart-line { stroke-dashoffset: 0; }
.chart-area {
    opacity: 0;
    transition: opacity 1.4s ease 0.5s;
}
.in-view .chart-area { opacity: 1; }
.chart-dot {
    opacity: 0;
    transition: opacity 0.45s ease;
    transition-delay: var(--d, 1s);
}
.in-view .chart-dot { opacity: 1; }

/* CSS fallback sphere behind the WebGL globe */
.globe-fallback {
    background:
        radial-gradient(circle at 35% 30%, rgba(251, 165, 4, 0.30), transparent 55%),
        radial-gradient(circle at 70% 75%, rgba(255, 94, 0, 0.20), transparent 60%),
        radial-gradient(circle at 50% 50%, #1a1a26, #0a0a0f 72%);
    box-shadow: inset 0 0 60px rgba(0,0,0,0.55);
}

/* Faint dotted grid background helper (hero) */
.bg-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 40%, transparent 100%);
}

/* Gradient hairline top border on cards (port of portal .model-card::before) */
.card-glow {
    position: relative;
    transition: transform var(--duration-normal) var(--transition-smooth),
                box-shadow var(--duration-normal) var(--transition-smooth),
                border-color var(--duration-normal) var(--transition-smooth);
}
.card-glow::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent-primary), transparent);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--transition-smooth);
}
.card-glow:hover {
    transform: translateY(-6px);
    border-color: var(--color-border-strong);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(251, 165, 4, 0.08);
}
.card-glow:hover::before { opacity: 1; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-glow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.6rem;
    border-radius: 9999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: #0a0a0f;
    background: var(--color-accent-primary);
    border: 1px solid transparent;
    box-shadow: 0 8px 30px rgba(251, 165, 4, 0.25);
    transition: all var(--duration-normal) var(--transition-smooth);
    cursor: pointer;
}
.btn-glow:hover {
    background: #ffb627;
    box-shadow: 0 10px 40px rgba(251, 165, 4, 0.45);
    transform: translateY(-2px);
    color: #0a0a0f;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.6rem;
    border-radius: 9999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border-strong);
    backdrop-filter: blur(10px);
    transition: all var(--duration-normal) var(--transition-smooth);
    cursor: pointer;
}
.btn-ghost:hover {
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background var(--duration-normal) var(--transition-smooth),
                border-color var(--duration-normal) var(--transition-smooth),
                backdrop-filter var(--duration-normal) var(--transition-smooth);
    border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
    background: rgba(10, 10, 15, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: var(--color-border);
}
.nav-link-lux {
    position: relative;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color var(--duration-fast) var(--transition-smooth);
}
.nav-link-lux::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--color-accent-primary);
    transition: width var(--duration-normal) var(--transition-smooth);
}
.nav-link-lux:hover,
.nav-link-lux.active {
    color: var(--color-text-primary);
}
.nav-link-lux:hover::after,
.nav-link-lux.active::after {
    width: 100%;
}

/* Mobile menu panel */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-normal) var(--transition-smooth);
}
.mobile-menu.open {
    max-height: 24rem;
}

/* --------------------------------------------------------------------------
   Reveal on scroll (replaces WOW.js)
   -------------------------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--duration-slow) var(--transition-smooth),
                transform var(--duration-slow) var(--transition-smooth);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
[data-reveal].in-view {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Marquee (tech strip)
   -------------------------------------------------------------------------- */
.marquee {
    display: flex;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
    display: flex;
    flex-shrink: 0;
    gap: 4rem;
    padding-right: 4rem;
    animation: marquee-scroll 34s linear infinite;
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-slow) ease-out, visibility var(--duration-slow) ease-out;
    z-index: 9999;
}
#spinner.show {
    opacity: 1;
    visibility: visible;
}
/* Boot logo reveal: LEVEL wipes in, UP fades, arrow drops last */
.boot-logo {
    width: clamp(180px, 52vw, 300px);
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 0 30px rgba(251, 165, 4, 0.18));
}
.boot-logo .logo-word {
    clip-path: inset(0 100% 0 0);
    animation: boot-word 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes boot-word { to { clip-path: inset(0 0 0 0); } }

.boot-logo .logo-up {
    opacity: 0;
    transform: translateY(6px);
    transform-box: fill-box;
    transform-origin: center;
    animation: boot-up 0.35s ease forwards;
    animation-delay: 0.7s;
}
@keyframes boot-up { to { opacity: 1; transform: none; } }

.boot-logo .logo-arrow {
    opacity: 0;
    transform: translateY(-45%) scale(0.5);
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: boot-arrow 0.55s cubic-bezier(0.2, 0.8, 0.2, 1.5) forwards;
    animation-delay: 1.0s;
}
@keyframes boot-arrow {
    60% { opacity: 1; }
    to  { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .boot-logo .logo-word { clip-path: none; animation: none; }
    .boot-logo .logo-up,
    .boot-logo .logo-arrow { opacity: 1; transform: none; animation: none; }
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-accent-primary);
    background: rgba(26, 26, 38, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-border-strong);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--duration-normal) var(--transition-smooth);
    text-decoration: none;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.back-to-top:hover {
    background: var(--color-accent-primary);
    color: #0a0a0f;
    box-shadow: 0 8px 30px rgba(251, 165, 4, 0.4);
}

/* --------------------------------------------------------------------------
   Form fields (contact modal + footer newsletter)
   -------------------------------------------------------------------------- */
.lux-field {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 0.75rem;
    color: var(--color-text-primary);
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--duration-fast) var(--transition-smooth),
                box-shadow var(--duration-fast) var(--transition-smooth);
}
.lux-field::placeholder { color: var(--color-text-muted); }
.lux-field:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

/* --------------------------------------------------------------------------
   Portfolio filter pills
   -------------------------------------------------------------------------- */
.filter-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: rgba(26, 26, 38, 0.55);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--duration-fast) var(--transition-smooth);
}
.filter-pill:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-strong);
}
.filter-pill.filter-active {
    color: #0a0a0f;
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
}

/* --------------------------------------------------------------------------
   Lightbox dark override
   -------------------------------------------------------------------------- */
.lightbox .lb-image { border-radius: 0.75rem; border: 1px solid var(--color-border-strong); }
.lb-data .lb-close { filter: invert(1); }
