:root {
            color-scheme: light;
            --black: #000000;
            --white: #ffffff;
            --orange: #ff6b00;
            --green: #165844;
            --bg: var(--white);
            --bg2: #fcfcfc;
            --card: var(--bg2);
            --surface: rgba(255, 255, 255, .98);
            --surface2: var(--white);
            --nav: rgba(255, 255, 255, .98);
            --text: var(--black);
            --muted: rgba(5, 5, 5, .62);
            --line: rgba(5, 5, 5, .08);
            --accent: var(--green);
            --secondary: var(--orange);
            --accent-ink: var(--white);
            --soft: rgba(22, 88, 68, .08);
            --soft2: rgba(255, 107, 0, .1);
            --shadow: 0 20px 60px rgba(0, 0, 0, .05), 0 4px 12px rgba(0, 0, 0, .03);
            --shadow2: 0 10px 30px rgba(0, 0, 0, .04);
            --l1: rgba(22, 88, 68, .12);
            --l2: rgba(255, 107, 0, .14);
            --l3: rgba(22, 88, 68, .05);
            --accent-line: rgba(22, 88, 68, .15);
            --px: 18%;
            --py: 18%;
            --grid: rgba(0, 0, 0, .04);
            --bezier: cubic-bezier(0.2, 0.8, 0.2, 1);
            --vibrant-gradient: linear-gradient(135deg, var(--accent), #2a9d8f);
        }

        html[data-theme=dark] {
            color-scheme: dark;
            --bg: #070707;
            --bg2: #0c0c0c;
            --card: var(--bg2);
            --surface: rgba(22, 22, 22, .98);
            --surface2: rgba(35, 35, 35, 0.98);
            --nav: rgba(10, 10, 10, .98);
            --text: #fdfdfd;
            --muted: rgba(240, 240, 240, .7);
            --line: rgba(255, 255, 255, .08);
            --accent: var(--orange);
            --secondary: var(--green);
            --accent-ink: var(--black);
            --soft: rgba(255, 107, 0, .18);
            --soft2: rgba(22, 88, 68, .12);
            --shadow: 0 30px 90px rgba(0, 0, 0, .8);
            --shadow2: 0 18px 44px rgba(0, 0, 0, .4);
            --l1: rgba(255, 107, 0, .18);
            --l2: rgba(22, 88, 68, .14);
            --l3: rgba(255, 255, 255, .04);
            --accent-line: rgba(255, 107, 0, .28);
            --grid: rgba(255, 255, 255, .03);
            --vibrant-gradient: linear-gradient(135deg, #ff7a00, #ffba00);
            --aura: radial-gradient(circle at top right, rgba(255, 107, 0, 0.08) 0%, transparent 60%),
                radial-gradient(circle at bottom left, rgba(22, 88, 68, 0.05) 0%, transparent 60%);
        }

        :root {
            --aura: radial-gradient(circle at top right, rgba(22, 88, 68, 0.06) 0%, transparent 60%),
                radial-gradient(circle at bottom left, rgba(255, 107, 0, 0.05) 0%, transparent 60%);
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }

        .show-mobile,
        .br-mobile {
            display: none !important;
        }

        .hide-mobile,
        .br-desktop {
            display: inline !important;
        }

        * {
            box-sizing: border-box;
            outline: none;
            -webkit-tap-highlight-color: transparent;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            user-select: none;
            -webkit-user-select: none;
            -webkit-user-drag: none;
            text-rendering: optimizeSpeed;
        }

        p,
        h1,
        h2,
        h3,
        h4,
        li,
        .lead,
        .project-card p,
        .service-card p,
        .method-text span,
        .contact-info p {
            user-select: text;
            -webkit-user-select: text;
        }

        :focus-visible {
            outline: 2px solid var(--accent) !important;
            outline-offset: 4px;
            border-radius: 4px;
        }

        html {
            scroll-behavior: smooth;
            scrollbar-gutter: stable;
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            color: var(--text);
            background-color: var(--bg);
            overflow-x: hidden;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        /* Strict Dual-Font System: Manrope for English, Hind Siliguri for Bangla (Zero Nirmala UI fallback bleed) */
        html[data-lang="en"],
        html[data-lang="en"] body,
        html[data-lang="en"] button,
        html[data-lang="en"] input,
        html[data-lang="en"] textarea,
        html[data-lang="en"] select {
            font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        html[data-lang="bn"],
        html[data-lang="bn"] body,
        html[data-lang="bn"] button,
        html[data-lang="bn"] input,
        html[data-lang="bn"] textarea,
        html[data-lang="bn"] select,
        html[data-lang="bn"] h1,
        html[data-lang="bn"] h2,
        html[data-lang="bn"] h3,
        html[data-lang="bn"] h4,
        html[data-lang="bn"] p,
        html[data-lang="bn"] a,
        html[data-lang="bn"] span:not([class*="fa-"]),
        html[data-lang="bn"] li,
        html[data-lang="bn"] small,
        html[data-lang="bn"] strong,
        html[data-lang="bn"] div:not(.code-box):not(.PerfGovernor) {
            font-family: 'Hind Siliguri', 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        /* Modern Scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--line);
            border-radius: 99px;
            border: 2px solid var(--bg);
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--accent);
        }

        body:before {
            content: "";
            position: fixed;
            pointer-events: none;
            inset: -10%;
            z-index: -4;
            background:
                radial-gradient(circle at 20% 30%, var(--l1) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, var(--l2) 0%, transparent 40%);
            animation: randomLight 25s infinite alternate ease-in-out;
            transform: translate3d(0, 0, 0);
            opacity: 0.5;
            filter: blur(25px);
            contain: strict;
            isolation: isolate;
            will-change: transform;
        }

        /* Adaptive Performance Governor Tier: Lean Mode for Software Rasterizers & No-GPU Hardware */
        html[data-perf-tier="lean"] body:before {
            animation: none !important;
            filter: none !important;
            background:
                radial-gradient(circle at 20% 30%, var(--l1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, var(--l2) 0%, transparent 50%);
            will-change: auto !important;
        }

        html[data-perf-tier="lean"] .orb {
            animation: none !important;
            filter: blur(10px) !important;
            will-change: auto !important;
        }

        html[data-perf-tier="lean"] .reveal {
            transition-duration: 0.35s !important;
        }
        html[data-perf-tier="lean"] .d1 { transition-delay: 0.05s !important; }
        html[data-perf-tier="lean"] .d2 { transition-delay: 0.1s !important; }
        html[data-perf-tier="lean"] .d3 { transition-delay: 0.15s !important; }
        html[data-perf-tier="lean"] .d4 { transition-delay: 0.2s !important; }

        @keyframes randomLight {
            0% { transform: translate3d(0, 0, 0) scale(1); }
            33% { transform: translate3d(5%, 8%, 0) scale(1.05); }
            66% { transform: translate3d(-5%, 4%, 0) scale(0.95); }
            100% { transform: translate3d(2%, -5%, 0) scale(1); }
        }

        @media (max-width: 1024px) {
            body:before, .bg {
                display: none !important;
                animation: none !important;
            }
            body { 
                background-color: var(--bg) !important; 
                background-image: none !important; 
                transition: none !important;
            }
            .hero-copy h1,
            .card,
            .section {
                transition: none !important;
            }
        }

        a {
            text-decoration: none;
            color: inherit;
            transition: 0.3s ease
        }

        .show-mobile { display: none !important; }
        .hide-mobile { display: inline !important; }

        img {
            display: block;
            max-width: 100%;
            height: auto;
            image-rendering: -webkit-optimize-contrast;
            pointer-events: none;
            -webkit-user-drag: none;
            content-visibility: auto;
        }

        .bg {
            position: fixed;
            inset: 0;
            z-index: -2;
            pointer-events: none;
            overflow: hidden;
            background-image: var(--aura);
            background-size: cover;
            background-repeat: no-repeat;
            contain: strict;
        }

        .orb {
            position: absolute;
            border-radius: 999px;
            filter: blur(22px);
            opacity: .72;
            animation: randomLight 18s infinite alternate ease-in-out;
            pointer-events: none;
            display: block;
            contain: strict;
            /* God level performance forcing hardware rendering */
            will-change: transform;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            transform: translateZ(0); 
        }

        @media (max-width: 1024px) {
            .orb {
                display: none !important;
            }
        }

        .o1 { width: 26rem; height: 26rem; top: 5%; left: -8%; background: rgba(255, 107, 0, .18); animation-delay: 0s; }
        .o2 { width: 22rem; height: 22rem; top: 56%; right: -5%; background: rgba(22, 88, 68, .18); animation-delay: -5s; }
        .o3 { width: 18rem; height: 18rem; top: 12%; right: 16%; background: rgba(255, 255, 255, .08); animation-delay: -10s; }

        .shell {
            position: relative;
            isolation: isolate;
            width: min(1400px, calc(100% - 2rem));
            margin: 0 auto
        }

        .container {
            width: min(1260px, calc(100% - 1.25rem));
            margin: 0 auto
        }

        .header {
            position: sticky;
            top: 0;
            z-index: 1000;
            padding: 1.25rem 0 0;
            background: transparent;
            pointer-events: none;
        }

        .nav-wrap {
            pointer-events: auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            width: 100%;
            box-sizing: border-box;
            padding: .65rem 1.25rem;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: var(--nav);
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
            transition: transform 0.4s var(--bezier), border-color 0.3s ease, background 0.3s ease;
            will-change: transform;
        }

        .nav-bar-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            width: 100%;
        }

        @media (max-width: 1024px) {
            .header {
                padding-top: 0.5rem;
                height: 66px;
            }

            .header .container {
                position: relative;
                height: 58px;
            }

            .nav-wrap {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 58px;
                padding: 0;
                background: var(--nav);
                backdrop-filter: blur(24px);
                -webkit-backdrop-filter: blur(24px);
                border: 1px solid var(--line);
                border-radius: 28px;
                overflow: hidden;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;
                align-items: stretch;
                gap: 0;
                box-sizing: border-box;
                box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
                transition: height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                            box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                            border-color 0.3s ease,
                            background 0.3s ease;
                will-change: height, box-shadow;
            }

            .nav-wrap.menu-open {
                height: calc(100dvh - 1.5rem);
                border-radius: 28px;
                box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.55);
            }

            .nav-bar-row {
                height: 56px;
                min-height: 56px;
                max-height: 56px;
                padding: 0 1rem;
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 0.75rem;
                width: 100%;
                box-sizing: border-box;
                flex-shrink: 0;
            }
        }

        .brand {
            display: flex;
            align-items: center;
            gap: .85rem;
            min-width: 0
        }

        .mark {
            width: 3.35rem;
            height: 2.65rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 3.35rem;
            border-radius: 999px;
            overflow: hidden;
            background: #ffffff;
            box-shadow: 0 4px 14px rgba(11, 11, 11, .08), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
            transition: transform 0.3s var(--bezier), box-shadow 0.3s ease;
        }

        html[data-theme="dark"] .mark {
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 255, 255, 0.06);
        }

        .mark img {
            width: auto;
            height: 80%;
            max-height: 2.15rem;
            transform: scale(1.55);
            object-fit: contain;
            contain: paint;
            transition: transform 0.3s var(--bezier);
        }

        .brand:hover .mark img {
            transform: scale(1.62);
        }

        .brand-text {
            display: flex;
            flex-direction: column;
            line-height: 1.1;
            gap: 0.15rem;
            min-width: 0
        }

        .brand-text strong {
            font-size: .95rem;
            letter-spacing: -0.01em
        }

        .brand-text small {
            font-size: .65rem;
            letter-spacing: .12em;
            text-transform: uppercase;
            color: var(--muted)
        }

        .nav {
            display: flex;
            align-items: center;
            gap: .25rem;
            position: relative;
            isolation: isolate;
            contain: layout style;
        }

        .nav a {
            padding: .6rem .9rem;
            border-radius: 999px;
            color: var(--muted);
            background: transparent;
            border: 0;
            font: inherit;
            font-size: 0.88rem;
            font-weight: 600;
            cursor: pointer;
            transition: color 0.2s ease, transform 0.2s ease;
            position: relative;
            z-index: 2;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .nav a.active {
            color: var(--accent-ink);
            opacity: 1;
        }

        /* ─── Segmented Sliding Theme Toggle (SnapSignFit Symmetrical Design) ─── */
        .segmented-toggle,
        .toggle,
        .theme-switch {
            position: relative;
            display: inline-flex;
            align-items: center;
            width: 68px;
            height: 32px;
            padding: 2.5px;
            border-radius: 999px;
            background-color: #f4f4f5;
            border: 1px solid #e2e8f0;
            cursor: pointer;
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
            overflow: hidden;
            flex-shrink: 0;
            vertical-align: middle;
        }

        html[data-theme="dark"] .segmented-toggle,
        html[data-theme="dark"] .toggle,
        html[data-theme="dark"] .theme-switch,
        [data-theme="dark"] .segmented-toggle,
        [data-theme="dark"] .toggle,
        [data-theme="dark"] .theme-switch {
            background-color: #1b1b1e;
            border-color: #26262a;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
        }

        .segmented-toggle:hover,
        .toggle:hover,
        .theme-switch:hover {
            border-color: #94a3b8;
        }

        .segmented-toggle:focus-visible,
        .toggle:focus-visible,
        .theme-switch:focus-visible {
            outline: 2px solid #2563eb;
            outline-offset: 2px;
        }

        /* Sliding highlight (thumb) */
        .toggle-slider,
        .toggle-thumb {
            position: absolute;
            top: 2.5px;
            left: 2.5px;
            width: calc((100% - 5px) / 2);
            height: calc(100% - 5px);
            border-radius: 999px;
            background-color: #ffffff;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
            pointer-events: none;
            transform: translate3d(0, 0, 0);
            transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, box-shadow 0.25s ease;
            will-change: transform;
            z-index: 1;
        }

        html[data-theme="dark"] .toggle-slider,
        html[data-theme="dark"] .toggle-thumb,
        [data-theme="dark"] .toggle-slider,
        [data-theme="dark"] .toggle-thumb {
            background: rgba(255, 255, 255, 0.22);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
        }

        /* ─── 1. Theme Toggle Slider Movement (Strictly Independent) ─── */
        html[data-theme="light"] #themeToggle .toggle-slider,
        html[data-theme="light"] #themeToggleMobile .toggle-slider,
        #themeToggle[data-state="left"] .toggle-slider,
        #themeToggleMobile[data-state="left"] .toggle-slider {
            transform: translate3d(0, 0, 0) !important;
        }

        html[data-theme="dark"] #themeToggle .toggle-slider,
        html[data-theme="dark"] #themeToggleMobile .toggle-slider,
        #themeToggle[data-state="right"] .toggle-slider,
        #themeToggleMobile[data-state="right"] .toggle-slider {
            transform: translate3d(100%, 0, 0) !important;
        }

        /* ─── 2. Language Toggle Slider Movement (Strictly Independent) ─── */
        html[data-lang="bn"] .lang-toggle .toggle-slider,
        html[data-lang="bn"] #langToggle .toggle-slider,
        html[data-lang="bn"] #langToggleMobile .toggle-slider,
        .lang-toggle[data-state="left"] .toggle-slider,
        #langToggle[data-state="left"] .toggle-slider,
        #langToggleMobile[data-state="left"] .toggle-slider {
            transform: translate3d(0, 0, 0) !important;
        }

        html[data-lang="en"] .lang-toggle .toggle-slider,
        html[data-lang="en"] #langToggle .toggle-slider,
        html[data-lang="en"] #langToggleMobile .toggle-slider,
        .lang-toggle[data-state="right"] .toggle-slider,
        #langToggle[data-state="right"] .toggle-slider,
        #langToggleMobile[data-state="right"] .toggle-slider {
            transform: translate3d(100%, 0, 0) !important;
        }

        /* Option slots */
        .toggle-opt,
        .toggle-icon {
            flex: 1;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.04em;
            color: #475569;
            transition: color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            line-height: 1;
            pointer-events: none;
            position: relative;
            top: auto;
            left: auto;
            right: auto;
            width: auto;
        }

        /* ─── Theme Toggle Icons (Sun / Moon) ─── */
        #themeToggle .sun i,
        #themeToggleMobile .sun i,
        #themeToggle .sun svg,
        #themeToggleMobile .sun svg,
        #themeToggle .moon i,
        #themeToggleMobile .moon i,
        #themeToggle .moon svg,
        #themeToggleMobile .moon svg {
            flex-shrink: 0;
            font-size: 13px;
            transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease, opacity 0.25s ease;
        }

        /* Light state active Sun (Black) */
        html[data-theme="light"] #themeToggle .sun i,
        html[data-theme="light"] #themeToggleMobile .sun i,
        html[data-theme="light"] #themeToggle .sun svg,
        html[data-theme="light"] #themeToggleMobile .sun svg,
        #themeToggle[data-state="left"] .sun i,
        #themeToggleMobile[data-state="left"] .sun i,
        #themeToggle[data-state="left"] .sun svg,
        #themeToggleMobile[data-state="left"] .sun svg {
            color: #000000 !important;
            transform: scale(1.12);
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
            opacity: 1;
        }

        html[data-theme="light"] #themeToggle .moon i,
        html[data-theme="light"] #themeToggleMobile .moon i,
        html[data-theme="light"] #themeToggle .moon svg,
        html[data-theme="light"] #themeToggleMobile .moon svg,
        #themeToggle[data-state="left"] .moon i,
        #themeToggleMobile[data-state="left"] .moon i,
        #themeToggle[data-state="left"] .moon svg,
        #themeToggleMobile[data-state="left"] .moon svg {
            color: #4b5563 !important;
            transform: scale(0.9);
            filter: none;
            opacity: 0.85;
        }

        /* Dark state active Moon (White) */
        html[data-theme="dark"] #themeToggle .moon i,
        html[data-theme="dark"] #themeToggleMobile .moon i,
        html[data-theme="dark"] #themeToggle .moon svg,
        html[data-theme="dark"] #themeToggleMobile .moon svg,
        #themeToggle[data-state="right"] .moon i,
        #themeToggleMobile[data-state="right"] .moon i,
        #themeToggle[data-state="right"] .moon svg,
        #themeToggleMobile[data-state="right"] .moon svg {
            color: #ffffff !important;
            transform: scale(1.12);
            filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
            opacity: 1;
        }

        html[data-theme="dark"] #themeToggle .sun i,
        html[data-theme="dark"] #themeToggleMobile .sun i,
        html[data-theme="dark"] #themeToggle .sun svg,
        html[data-theme="dark"] #themeToggleMobile .sun svg,
        #themeToggle[data-state="right"] .sun i,
        #themeToggleMobile[data-state="right"] .sun i,
        #themeToggle[data-state="right"] .sun svg,
        #themeToggleMobile[data-state="right"] .sun svg {
            color: #94a3b8 !important;
            transform: scale(0.9);
            filter: none;
            opacity: 0.85;
        }

        .toggle:focus-visible,
        .theme-switch:focus-visible,
        .lang-toggle:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 3px;
        }

        /* ─── Header Controls (Theme & Language Toggles) ─── */
        .header-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            z-index: 2;
        }

        .lang-toggle {
            width: 68px;
            height: 32px;
            cursor: pointer;
        }

        .lang-toggle .toggle-opt {
            color: #94a3b8;
            opacity: 0.65;
            cursor: pointer;
            pointer-events: none; /* Anywhere clickable: clicks pass directly to button */
            transition: color 0.25s ease, opacity 0.25s ease, text-shadow 0.25s ease;
            user-select: none;
            line-height: 1;
            transform: none !important;
            display: flex;
            align-items: center;
            justify-content: center;
            padding-bottom: 1px;
        }

        /* English Language Mode Typography (clean rounded font matching navbar) */
        html[data-lang="en"] .lang-toggle,
        html[data-lang="en"] .lang-toggle .toggle-opt {
            font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif !important;
            font-size: 10.5px !important;
            font-weight: 700 !important;
            letter-spacing: 0.04em !important;
        }

        /* Bangla Language Mode Typography (authentic Bengali font with clean 1) */
        html[data-lang="bn"] .lang-toggle,
        html[data-lang="bn"] .lang-toggle .toggle-opt {
            font-family: 'Hind Siliguri', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif !important;
            font-size: 11px !important;
            font-weight: 700 !important;
            letter-spacing: 0.01em !important;
        }

        /* ─── Light Mode Active & Inactive Language States ─── */
        /* Active Left (বাং) in Light Mode */
        html[data-theme="light"][data-lang="bn"] .lang-toggle .opt-left,
        html[data-theme="light"] .lang-toggle[data-state="left"] .opt-left,
        .lang-toggle[data-state="left"] .opt-left {
            color: #000000 !important;
            opacity: 1 !important;
            font-weight: 700 !important;
            transform: none !important;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
        }
        html[data-theme="light"][data-lang="bn"] .lang-toggle .opt-right,
        html[data-theme="light"] .lang-toggle[data-state="left"] .opt-right,
        .lang-toggle[data-state="left"] .opt-right {
            color: #475569 !important;
            opacity: 1 !important;
            font-weight: 600 !important;
            transform: none !important;
            text-shadow: none !important;
        }

        /* Active Right (ইং) in Light Mode */
        html[data-theme="light"][data-lang="en"] .lang-toggle .opt-right,
        html[data-theme="light"] .lang-toggle[data-state="right"] .opt-right,
        .lang-toggle[data-state="right"] .opt-right {
            color: #000000 !important;
            opacity: 1 !important;
            font-weight: 700 !important;
            transform: none !important;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
        }
        html[data-theme="light"][data-lang="en"] .lang-toggle .opt-left,
        html[data-theme="light"] .lang-toggle[data-state="right"] .opt-left,
        .lang-toggle[data-state="right"] .opt-left {
            color: #475569 !important;
            opacity: 1 !important;
            font-weight: 600 !important;
            transform: none !important;
            text-shadow: none !important;
        }

        /* ─── Dark Mode Active & Inactive Language States (Matches White Moon) ─── */
        /* Active Left (বাং) in Dark Mode: Pure White with Soft Glow */
        html[data-theme="dark"][data-lang="bn"] .lang-toggle .opt-left,
        html[data-theme="dark"] .lang-toggle[data-state="left"] .opt-left {
            color: #ffffff !important;
            opacity: 1 !important;
            font-weight: 700 !important;
            transform: none !important;
            text-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
        }
        html[data-theme="dark"][data-lang="bn"] .lang-toggle .opt-right,
        html[data-theme="dark"] .lang-toggle[data-state="left"] .opt-right {
            color: #94a3b8 !important;
            opacity: 1 !important;
            font-weight: 600 !important;
            transform: none !important;
            text-shadow: none !important;
        }

        /* Active Right (ইং) in Dark Mode: Pure White with Soft Glow */
        html[data-theme="dark"][data-lang="en"] .lang-toggle .opt-right,
        html[data-theme="dark"] .lang-toggle[data-state="right"] .opt-right {
            color: #ffffff !important;
            opacity: 1 !important;
            font-weight: 700 !important;
            transform: none !important;
            text-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
        }
        html[data-theme="dark"][data-lang="en"] .lang-toggle .opt-left,
        html[data-theme="dark"] .lang-toggle[data-state="right"] .opt-left {
            color: #94a3b8 !important;
            opacity: 1 !important;
            font-weight: 600 !important;
            transform: none !important;
            text-shadow: none !important;
        }

        /* ─── Mobile Hamburger Menu Button (Morphing to X) ─── */
        .hamburger-btn {
            display: none;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--soft);
            border: 1px solid var(--line);
            color: var(--text);
            cursor: pointer;
            position: relative;
            padding: 0;
            transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
            -webkit-tap-highlight-color: transparent;
            flex-shrink: 0;
            z-index: 2;
        }

        .hamburger-btn:hover,
        .hamburger-btn:focus-visible {
            background: var(--accent-line);
            border-color: var(--accent);
            color: var(--text);
            box-shadow: 0 0 10px var(--soft);
        }

        .hamburger-btn:active {
            transform: scale(0.92);
            background: var(--accent-line);
            border-color: var(--accent);
            color: var(--text);
        }

        /* Active / Open state: High contrast, theme accent border and soft tint */
        .hamburger-btn.active {
            background: var(--soft);
            border-color: var(--accent);
            color: var(--text);
            box-shadow: 0 0 10px var(--soft);
        }

        .hamburger-btn.active:hover,
        .hamburger-btn.active:focus-visible {
            background: var(--accent-line);
            border-color: var(--accent);
            color: var(--text);
        }

        .hamburger-btn.active:active {
            transform: scale(0.92);
            background: var(--accent-line);
            border-color: var(--accent);
            color: var(--text);
        }

        .hamburger-box {
            width: 16px;
            height: 12px;
            position: relative;
            display: block;
            transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .hamburger-line {
            position: absolute;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--text);
            border-radius: 2px;
            transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                        opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            transform-origin: center;
            will-change: transform, opacity;
        }

        .hamburger-line.line-top { top: 0; }
        .hamburger-line.line-mid { top: 5px; }
        .hamburger-line.line-bot { top: 10px; }

        /* Morph into Rotating Cross (X) over 1.5s */
        .hamburger-btn.active .hamburger-box {
            transform: rotate(180deg);
        }

        .hamburger-btn.active .hamburger-line.line-top {
            transform: translateY(5px) rotate(45deg);
        }

        .hamburger-btn.active .hamburger-line.line-mid {
            opacity: 0;
            transform: scaleX(0);
        }

        .hamburger-btn.active .hamburger-line.line-bot {
            transform: translateY(-5px) rotate(-45deg);
        }

        /* ─── Expanding Navigation Content (Direct Child of .nav-wrap) ─── */
        .nav-expanded-content {
            width: 100%;
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            padding: 0.75rem 1rem 2.25rem;
            box-sizing: border-box;
            gap: 1.35rem;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease 0s;
        }

        .nav-expanded-content::-webkit-scrollbar {
            width: 4px;
        }

        .nav-expanded-content::-webkit-scrollbar-thumb {
            background: var(--line);
            border-radius: 4px;
        }

        .nav-wrap.menu-open .nav-expanded-content {
            opacity: 1;
            pointer-events: auto;
            transition: opacity 0.32s ease 0.05s;
        }

        /* Staggered Sections (Left Aligned) */
        .nav-expand-section {
            opacity: 0;
            transform: translateY(-16px);
            transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            flex-direction: column;
            align-items: stretch;
            text-align: left;
            width: 100%;
        }

        .nav-wrap.menu-open .nav-expand-section:nth-child(1) {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.35s ease 0.04s, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.04s;
        }

        .nav-wrap.menu-open .nav-expand-section:nth-child(2) {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.35s ease 0.09s, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.09s;
        }

        .nav-wrap.menu-open .nav-expand-section:nth-child(3) {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.35s ease 0.14s, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.14s;
        }

        .nav-expand-title {
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--muted);
            font-weight: 700;
            margin-bottom: 0.6rem;
            text-align: left;
            padding-left: 0.35rem;
        }

        /* 1. Preferences Toggles (Card Layout: Left Label, Right Toggle) */
        .nav-expand-toggles {
            display: flex;
            flex-direction: column;
            gap: 0.7rem;
            background: var(--bg2);
            border: 1px solid var(--line);
            border-radius: 0.95rem;
            padding: 0.8rem 0.95rem;
            width: 100%;
            box-sizing: border-box;
        }

        .nav-toggle-row {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text);
            width: 100%;
        }

        .nav-toggle-row > span {
            font-size: 0.85rem;
            color: var(--text);
            font-weight: 600;
        }

        /* 2. Navigation Links (Left Aligned with Icon) */
        .nav-expand-links {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            width: 100%;
        }

        .nav-expand-link {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.85rem;
            width: 100%;
            box-sizing: border-box;
            padding: 0.7rem 0.95rem;
            border-radius: 0.85rem;
            color: var(--text);
            font-weight: 600;
            font-size: 0.92rem;
            text-decoration: none;
            transition: all 0.2s ease;
            border: 1px solid transparent;
            -webkit-tap-highlight-color: transparent;
            text-align: left;
        }

        .nav-expand-link i {
            font-size: 0.95rem;
            color: var(--accent);
            width: 1.25rem;
            text-align: center;
            transition: color 0.2s ease;
            flex-shrink: 0;
        }

        .nav-expand-link:hover,
        .nav-expand-link:focus {
            background: var(--soft);
            border-color: var(--line);
            color: var(--text);
            transform: translateX(3px);
        }

        .nav-expand-link.active {
            background: var(--vibrant-gradient);
            color: var(--accent-ink) !important;
            border-color: transparent;
            box-shadow: 0 6px 18px -2px var(--soft);
        }

        .nav-expand-link.active i {
            color: var(--accent-ink) !important;
        }

        /* 3. Direct Contact Methods (Left Aligned Full Width) */
        .nav-expand-contacts {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            width: 100%;
        }

        .nav-expand-contacts .method {
            width: 100%;
            padding: 0.6rem 0.8rem;
            background: var(--bg2);
            border: 1px solid var(--line);
            border-radius: 0.95rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-sizing: border-box;
            text-align: left;
        }

        .nav-expand-contacts .method-main {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
            min-width: 0;
            flex: 1;
        }

        .nav-expand-contacts .method-text strong {
            font-size: 0.76rem;
            display: block;
            color: var(--text);
        }

        .nav-expand-contacts .method-text span {
            font-size: 0.7rem;
            color: var(--muted);
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .nav-expand-contacts .method-icon {
            width: 2rem;
            height: 2rem;
            border-radius: 0.6rem;
            display: grid;
            place-items: center;
            background: var(--soft);
            color: var(--accent);
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .nav-expand-contacts .method-icon svg {
            width: 1.1rem;
            height: 1.1rem;
        }

        /* Desktop Media Query: Hide Expanded Mobile Menu Content */
        @media (min-width: 1025px) {
            .nav-expanded-content {
                display: none !important;
            }
        }

        @media (max-width: 1024px) {
            .nav {
                display: none !important;
            }

            .hamburger-btn {
                display: inline-flex;
            }

            .header-controls .lang-toggle,
            .header-controls #themeToggle {
                display: none !important;
            }
        }

        /* Reduced Motion Accessibility */
        @media (prefers-reduced-motion: reduce) {
            .nav-wrap,
            .nav-expanded-content,
            .nav-expand-section,
            .hamburger-box,
            .hamburger-line {
                transition: opacity 0.15s ease !important;
                transform: none !important;
                animation: none !important;
            }
            .hamburger-btn.active .hamburger-box {
                transform: none !important;
            }
        }

        /* Glider Navigation Hover & Smooth Pill Physics */

        .nav a:not(.active):hover {
            color: var(--text);
            transform: translateY(-1px);
        }

        .nav a:hover {
            background: transparent !important;
        }

        .glider {
            position: absolute;
            height: calc(100% - 0.5rem);
            top: 0.25rem;
            left: 0;
            background: var(--vibrant-gradient);
            border-radius: 999px;
            z-index: 1;
            transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), width 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
            pointer-events: none;
            opacity: 0;
            will-change: transform, width;
            box-shadow: 0 4px 15px -4px var(--accent);
            border: 0;
        }

        .glider.moving {
            transform: scaleX(0.85) scaleY(0.95);
        }

        .glider.visible {
            opacity: 1;
        }

        /* ─── Ultra-Smooth Hardware-Accelerated Page Transitions (120 FPS GPU) ─── */
        .page-main {
            display: block;
        }

        .page-main.page-slide-in-right {
            animation: pageSlideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        .page-main.page-slide-in-left {
            animation: pageSlideInLeft 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        .page-main.page-exit-left {
            animation: pageExitLeft 0.16s cubic-bezier(0.4, 0, 1, 1) forwards;
            pointer-events: none;
        }

        .page-main.page-exit-right {
            animation: pageExitRight 0.16s cubic-bezier(0.4, 0, 1, 1) forwards;
            pointer-events: none;
        }

        @keyframes pageSlideInRight {
            0% {
                opacity: 0;
                transform: translate3d(16px, 0, 0);
            }
            100% {
                opacity: 1;
                transform: translate3d(0, 0, 0);
            }
        }

        @keyframes pageSlideInLeft {
            0% {
                opacity: 0;
                transform: translate3d(-16px, 0, 0);
            }
            100% {
                opacity: 1;
                transform: translate3d(0, 0, 0);
            }
        }

        @keyframes pageExitLeft {
            0% {
                opacity: 1;
                transform: translate3d(0, 0, 0);
            }
            100% {
                opacity: 0;
                transform: translate3d(-12px, 0, 0);
            }
        }

        @keyframes pageExitRight {
            0% {
                opacity: 1;
                transform: translate3d(0, 0, 0);
            }
            100% {
                opacity: 0;
                transform: translate3d(12px, 0, 0);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .page-main.page-slide-in-right,
            .page-main.page-slide-in-left,
            .page-main.page-exit-left,
            .page-main.page-exit-right {
                animation: none !important;
                transform: none !important;
                opacity: 1 !important;
            }
            .glider {
                transition: none !important;
            }
        }

        .section {
            padding: 4rem 0;
            scroll-margin-top: 6rem;
            contain: layout style;
        }

        .split-section {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            padding: 4.5rem 0 3.5rem;
        }

        #projects {
            padding-bottom: 6rem;
        }

        #contact {
            padding-top: 5.5rem;
            min-height: 85vh;
        }

        .hero {
            display: flex;
            align-items: center;
            min-height: calc(100vh - 8rem);
            padding: 4rem 0
        }

        .hero-grid {
            display: grid;
            grid-template-columns: 1.2fr 0.8fr;
            gap: clamp(2rem, 4vw, 3.5rem);
            align-items: center
        }

        .hero-side {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            width: 100%;
        }

        .hero-copy h2 {
            font-size: clamp(0.95rem, 2vw, 1.25rem);
            margin: 0 0 0.5rem;
            color: var(--accent);
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .hero-copy h1,
        .hero-copy .hero-main-heading {
            font-size: clamp(2rem, 3.6vw, 3.5rem);
            line-height: 1.15;
            letter-spacing: -0.015em;
            margin: 0 0 0.8rem;
            font-weight: 800;
            color: #000;
            transition: color 0.5s var(--bezier);
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
        }

        .hero-copy h1 .hero-name,
        .hero-copy .hero-main-heading .hero-name {
            white-space: nowrap;
            display: inline-block;
        }

        /* Bengali Typography: Golden Ratio Proportions & Crisp Diacritic Breathing Room */
        html[data-lang="bn"] .hero-copy h2 {
            letter-spacing: 0.02em;
            margin-bottom: 0.55rem;
        }

        html[data-lang="bn"] .hero-copy h1,
        .hero-copy .hero-main-heading {
            letter-spacing: 0.008em;
            line-height: 1.20;
            margin-bottom: 0.85rem;
            font-weight: 700;
            word-spacing: 0.08em;
        }

        html[data-lang="bn"] #typing {
            letter-spacing: 0.01em;
            margin-bottom: 1.35rem;
            line-height: 1.35;
        }

        html[data-theme=dark] .hero-copy h1,
        .hero-copy .hero-main-heading {
            color: #fff;
            filter: drop-shadow(0 0 30px rgba(255, 122, 0, 0.4)) drop-shadow(0 0 60px rgba(255, 122, 0, 0.15));
        }

        @media (max-width: 768px) {
            html[data-theme=dark] .hero-copy h1,
        .hero-copy .hero-main-heading {
                filter: drop-shadow(0 0 16px rgba(255, 122, 0, 0.35));
            }
        }

        #typing {
            font-weight: 600;
            font-size: clamp(1.1rem, 2.2vw, 1.5rem);
            letter-spacing: 0.02em;
            min-height: 1.8rem;
            margin: 0 0 1.3rem;
            background: var(--vibrant-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
        }

        .about-text {
            font-size: clamp(0.95rem, 1.8vw, 1.1rem);
            line-height: 1.65;
            color: var(--muted);
            margin: 0 0 2rem;
            max-width: 40rem
        }

        .actions {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 2.5rem
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .75rem;
            min-height: 3.25rem;
            padding: .85rem 1.75rem;
            border-radius: 999px;
            font-weight: 700;
            font-size: 0.95rem;
            border: 0;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .btn.primary {
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            box-shadow: 0 8px 16px -1px var(--soft);
        }

        .btn.primary:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px -10px var(--soft), 0 0 25px -2px var(--soft);
        }

        .btn.secondary {
            background: var(--surface);
            box-shadow: inset 0 0 0 1px var(--line);
            color: var(--text);
        }

        .btn.secondary:hover {
            transform: translateY(-6px);
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            box-shadow: 0 12px 32px var(--soft);
        }

        .btn.outline {
            background: transparent;
            border: 1.5px solid transparent;
            color: var(--accent-ink);
            background-image: linear-gradient(var(--bg), var(--bg)), var(--vibrant-gradient);
            background-origin: border-box;
            background-clip: padding-box, border-box;
        }

        .btn.outline span,
        .btn.outline i {
            background: var(--vibrant-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            transition: all 0.3s ease;
        }

        .btn.outline:hover {
            transform: translateY(-3px);
            background-image: var(--vibrant-gradient), var(--vibrant-gradient);
            box-shadow: 0 10px 25px -5px var(--soft);
        }

        .btn.outline:hover span,
        .btn.outline:hover i {
            -webkit-text-fill-color: var(--accent-ink);
        }

        .hero-notes {
            display: flex;
            flex-wrap: wrap;
            gap: .75rem
        }

        .hero-note {
            position: relative;
            padding: .45rem .9rem;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: var(--surface);
            color: var(--muted);
            font-size: .8rem;
            font-weight: 600;
            transition: border-color .3s, color .3s, transform .3s, box-shadow .3s;
            overflow: hidden;
            z-index: 1;
        }

        .hero-note::before {
            content: "";
            position: absolute;
            inset: 0;
            background: var(--vibrant-gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
            transform: scale(1.02);
        }

        @media (hover: hover) {
            .hero-note:hover {
                color: var(--accent-ink);
                border-color: transparent;
                transform: translateY(-3px);
                box-shadow: 0 10px 20px -5px var(--soft), 0 0 15px var(--soft);
            }

            .hero-note:hover::before {
                opacity: 1;
            }
        }

        .portrait {
            position: relative;
            width: 100%;
            max-width: 380px;
            margin: 0 0 0 auto;
            padding: 1rem;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 2.5rem;
            box-shadow: var(--shadow);
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)
        }

        @media (hover: hover) {
            .portrait:hover {
                transform: translateY(-10px) rotate(1deg)
            }
        }

        .frame {
            aspect-ratio: 1;
            border-radius: 1.75rem;
            overflow: hidden;
            background: var(--bg2);
            contain: strict;
        }

        .frame img {
            width: 100%;
            height: 100%;
            object-fit: cover
        }

        .portrait-meta {
            margin-top: 1.25rem;
            display: flex;
            justify-content: center;
            gap: 1rem;
            padding-top: 1rem;
            border-top: 1px solid var(--line)
        }

        .available {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--muted)
        }

        .dot {
            width: 0.6rem;
            height: 0.6rem;
            border-radius: 50%;
            background: #10b981;
            box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
            animation: pulse 2s infinite
        }

        @keyframes pulse {
            0% {
                transform: scale(0.95);
                opacity: 0.8
            }

            50% {
                transform: scale(1.1);
                opacity: 1
            }

            100% {
                transform: scale(0.95);
                opacity: 0.8
            }
        }

        .section-title {
            font-size: clamp(1.8rem, 3.5vw, 2.5rem);
            font-weight: 800;
            letter-spacing: -0.03em;
            margin: 0 0 1rem;
            line-height: 1.1;
            background: var(--vibrant-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .section-title::after {
            content: "";
            display: block;
            width: 4rem;
            height: 4px;
            background: var(--vibrant-gradient);
            margin-top: 1rem;
            border-radius: 2px
        }

        .services-grid,
        .skills-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem
        }

        .service-card,
        .skill-card {
            padding: 2.25rem;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 2.25rem;
            transition: transform 0.35s var(--bezier), box-shadow 0.35s var(--bezier), border-color 0.3s ease, background 0.3s ease;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
            contain: layout style;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            transform: translateZ(0);
        }

        @media (hover: hover) {
            .service-card:hover,
            .skill-card:hover {
                transform: translateY(-12px) translateZ(0);
                border-color: var(--accent-line);
                box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.18), 0 0 20px var(--soft);
                background: var(--surface2);
            }
        }

        .service-card::after,
        .skill-card::after {
            content: "";
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at top right, var(--soft), transparent 60%);
            opacity: 0;
            transition: opacity 0.5s ease;
            pointer-events: none;
        }

        @media (hover: hover) {
            .service-card:hover::after {
                opacity: 1;
            }
        }

        .service-icon {
            width: 3.5rem;
            height: 3.5rem;
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            display: grid;
            place-items: center;
            border-radius: 1rem;
            font-size: 1.5rem;
            margin-bottom: 1.25rem;
            box-shadow: 0 10px 20px var(--soft);
        }

        .service-card h3 {
            font-size: 1.25rem;
            margin: 0 0 0.75rem;
            font-weight: 700
        }

        .service-card p {
            font-size: 0.9rem;
            color: var(--muted);
            line-height: 1.5;
            margin: 0 0 1.25rem
        }

        .chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            list-style: none;
            padding: 0;
            margin: 0
        }

        .chips li {
            position: relative;
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.35rem 0.75rem;
            background: var(--bg2);
            border: 1px solid var(--line);
            border-radius: 999px;
            color: var(--text);
            white-space: nowrap;
            transition: border-color .3s, color .3s, transform .3s, box-shadow .3s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
            transform: translateZ(0);
            backface-visibility: hidden;
            overflow: hidden;
            z-index: 1;
        }

        .chips li::before {
            content: "";
            position: absolute;
            inset: 0;
            background: var(--vibrant-gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
            /* Force sub-pixel coverage */
            transform: scale(1.02);
        }

        @media (hover: hover) {
            .chips li:hover {
                border-color: transparent;
                color: var(--accent-ink);
                transform: translateY(-3px);
                box-shadow: 0 10px 20px -5px var(--soft), 0 0 15px var(--soft);
            }

            .chips li:hover::before {
                opacity: 1;
            }

            html[data-theme=dark] .chips li:hover {
                border-color: rgba(255, 255, 255, 0.1);
                box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 20px var(--soft);
            }
        }

        .projects-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem
        }

        .project-card {
            position: relative;
            padding: 2rem;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 2.25rem;
            overflow: hidden;
            transition: transform 0.35s var(--bezier), box-shadow 0.35s var(--bezier), border-color 0.3s ease, background 0.3s ease;
            contain: layout style;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            transform: translateZ(0);
        }

        @media (hover: hover) {
            .project-card:hover {
                transform: translateY(-10px) translateZ(0);
                border-color: var(--accent-line);
                box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
                background: var(--surface2);
            }
        }

        .project-visual-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.1rem;
            padding-bottom: 0.85rem;
            border-bottom: 1px solid var(--line);
        }

        .project-visual-icon {
            width: 2.85rem;
            height: 2.85rem;
            border-radius: 0.95rem;
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            display: grid;
            place-items: center;
            font-size: 1.2rem;
            box-shadow: 0 8px 20px -4px var(--soft);
            transition: transform 0.35s var(--bezier);
        }

        @media (hover: hover) {
            .project-card:hover .project-visual-icon {
                transform: scale(1.08) rotate(4deg);
            }
        }

        .project-visual-badge {
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0.28rem 0.7rem;
            border-radius: 999px;
            background: var(--soft);
            color: var(--accent);
            border: 1px solid var(--accent-line);
        }

        .project-content h3 {
            font-size: 1.35rem;
            font-weight: 800;
            margin: 0 0 0.5rem
        }

        .project-tags {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem
        }

        .tag {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            background: var(--vibrant-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .project-links {
            display: grid;
            gap: 0.75rem
        }

        .project-links-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.5rem;
        }

        .project-links-row .project-link {
            padding: 0.75rem 0.85rem;
            font-size: 0.82rem;
        }

        .project-links-row .project-link span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .project-links-row .project-link i {
            flex-shrink: 0;
            margin-left: 0.35rem;
        }

        .project-links-row .project-link:hover {
            transform: translateY(-2px);
        }

        .project-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            background: var(--bg2);
            box-shadow: inset 0 0 0 1px var(--line);
            border: 0;
            border-radius: 999px;
            font-weight: 700;
            font-size: 0.85rem;
            transition: all 0.3s ease;
            outline: none;
        }

        .project-link:hover {
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            box-shadow: 0 8px 20px -2px var(--soft);
            border: 0;
            transform: translateX(5px)
        }

        .contact-layout {
            display: grid;
            grid-template-columns: 1fr 1.2fr;
            gap: clamp(2rem, 5vw, 5rem);
            align-items: stretch;
            margin-top: clamp(1.75rem, 3vw, 2.75rem);
        }

        .contact-info {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            height: 100%;
        }

        .contact-info h2,
        .contact-info h3 {
            font-size: clamp(2.8rem, 5.5vw, 4.4rem);
            font-weight: 800;
            margin: 0 0 1.25rem;
            line-height: 1.16;
            letter-spacing: -0.015em;
        }

        /* Bengali Typography: Breathable row spacing preventing vowel / diacritic overlaps */
        html[data-lang="bn"] .contact-info h2,
        html[data-lang="bn"] .contact-info h3 {
            line-height: 1.25;
            letter-spacing: 0.01em;
            word-spacing: 0.04em;
            margin-bottom: 1.25rem;
        }

        .contact-info p {
            font-size: clamp(0.95rem, 1.8vw, 1.1rem);
            line-height: 1.65;
            color: var(--muted);
            margin: 0 0 1.5rem;
            max-width: 40rem;
        }

        .contact-methods {
            display: grid;
            gap: 1rem;
            margin-top: auto;
        }

        .method {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1.5rem;
            padding: 1.5rem 1.75rem;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 2rem;
            transition: all 0.4s var(--bezier);
            position: relative;
        }

        @media (hover: hover) {
            .method:hover {
                transform: translateY(-8px);
                border-color: var(--accent);
                box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 0 15px var(--soft);
            }
        }

        .method-main {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            flex: 1;
            min-width: 0
        }

        .method-icon {
            width: 3.5rem;
            height: 3.5rem;
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            display: grid;
            place-items: center;
            border-radius: 1.25rem;
            font-size: 1.5rem;
            flex: 0 0 3.5rem;
            box-shadow: 0 10px 20px var(--soft);
        }

        /* WhatsApp icon inherits the premium method-icon style */

        #waMethod .method-icon svg {
            width: 1.5rem;
            height: 1.5rem;
        }

        .method-text strong {
            display: block;
            font-size: 0.85rem;
            color: var(--text);
            font-weight: 800;
            margin-bottom: 0.15rem;
        }
        
        .method-text span {
            font-size: 1.1rem;
            font-weight: 900;
            color: var(--text);
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis
        }

        .copy-btn {
            width: 3.25rem;
            height: 3.25rem;
            display: grid;
            place-items: center;
            background: var(--bg2);
            box-shadow: inset 0 0 0 1px var(--line);
            border: 0;
            border-radius: 50%;
            cursor: pointer;
            color: var(--muted);
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            flex: 0 0 3.25rem;
            position: relative;
            z-index: 5;
            font-size: 1.25rem;
            outline: none;
        }

        .copy-btn:hover {
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            box-shadow: 0 8px 20px -2px var(--soft);
            border: 0;
            transform: translateY(-4px) rotate(5deg)
        }

        .copy-btn.copied {
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            box-shadow: 0 8px 20px -2px var(--soft);
            border: 0;
            transform: translateY(-4px)
        }

        .copy-btn::after {
            content: "Copied!";
            position: absolute;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            padding: 0.5rem 0.9rem;
            border-radius: 0.65rem;
            font-size: 0.85rem;
            font-weight: 700;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s ease;
            white-space: nowrap;
            z-index: 100;
        }

        .copy-btn.copied::after {
            opacity: 1;
            transform: translateX(-50%) translateY(0)
        }

        html[data-lang="bn"] .copy-btn::after {
            content: "কপি হয়েছে!";
        }

        .social-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 18vw, 260px), 1fr));
            gap: clamp(1rem, 1.5vw, 1.5rem);
        }

        .social-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 2.5vw, 1.75rem);
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 1.75rem;
            transition: transform 0.35s var(--bezier), box-shadow 0.35s var(--bezier), border-color 0.3s ease;
            position: relative;
            z-index: 1;
            min-width: 0;
            overflow: hidden;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            transform: translateZ(0);
        }

        @media (hover: hover) {
            .social-item:hover {
                border-color: transparent;
                transform: translateY(-8px) translateZ(0);
                background-image: linear-gradient(var(--surface2), var(--surface2)), var(--vibrant-gradient);
                background-origin: border-box;
                background-clip: padding-box, border-box;
                box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.2), 0 0 20px var(--soft);
                z-index: 10;
            }
        }

        .social-item i {
            font-size: clamp(1.2rem, 2.5vw, 1.5rem);
            background: var(--vibrant-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            flex-shrink: 0;
        }

        .social-item span {
            font-size: clamp(0.9rem, 1.1vw, 1.1rem);
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

        .footer {
            padding: 2.5rem 0;
            border-top: 1px solid var(--line);
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--muted);
            font-size: 0.9rem
        }

        .footer a:hover {
            color: var(--accent)
        }

        .show-mobile {
            display: none;
        }

        .hide-mobile {
            display: inline;
        }

        @keyframes drift {
            from {
                transform: translate3d(0, 0, 0)
            }

            to {
                transform: translate3d(2%, 2%, 0)
            }
        }

        @keyframes float {

            0%,
            100% {
                transform: translate3d(0, 0, 0)
            }

            50% {
                transform: translate3d(0, -20px, 0)
            }
        }

        .reveal {
            opacity: 0;
            transform: translate3d(0, 24px, 0);
            transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .reveal.animating {
            will-change: transform, opacity;
        }

        .reveal.active {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }

        .d1 {
            transition-delay: 0.1s
        }

        .d2 {
            transition-delay: 0.2s
        }

        .d3 {
            transition-delay: 0.3s
        }

        .d4 {
            transition-delay: 0.4s
        }

        @media (max-width: 1024px) {

            .section-title {
                text-align: left;
            }

            .section-title::after {
                margin-left: 0;
                margin-right: auto;
            }

            .hero-grid {
                grid-template-columns: 1fr;
                gap: 2.5rem;
                text-align: center
            }

            .contact-layout {
                grid-template-columns: 1fr;
                gap: 3rem;
                text-align: left;
            }

            .contact-info {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                text-align: left;
                height: auto;
            }

            .contact-methods {
                margin-top: 1.5rem;
            }

            .contact-methods,
            .social-grid {
                max-width: 600px;
                margin-left: auto;
                margin-right: auto;
                width: 100%;
            }

            .method {
                text-align: left;
            }

            .social-grid {
                grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
                gap: 1.25rem;
            }

            .contact-methods,
            .social-grid {
                width: 100%;
            }

            .method {
                text-align: left;
            }

            .reveal {
                opacity: 1 !important;
                transform: none !important;
                transition: none !important;
                will-change: auto !important;
            }

            .hero-copy {
                display: flex;
                flex-direction: column;
                align-items: center
            }

            .hero-side {
                order: -1;
                display: flex;
                justify-content: center;
                width: 100%;
            }

            .portrait {
                margin: 0 auto;
            }

            .actions,
            .hero-notes {
                justify-content: center
            }

            .method {
                text-align: left
            }

            .split-section {
                min-height: auto;
                padding: 4rem 0;
            }

            .services-grid,
            .skills-grid,
            .projects-grid {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
                gap: 1.5rem
            }
        }

        @media (max-width: 768px) {
            #contact {
                scroll-margin-top: 0;
            }

            .contact-layout {
                grid-template-columns: 1fr;
                gap: 2rem;
                text-align: left;
            }

            .contact-info {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                text-align: left;
            }

            .contact-methods {
                grid-template-columns: 1fr;
                gap: 1rem;
                width: 100%;
            }

            .social-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.75rem;
                width: 100%;
            }

            .social-item span {
                font-size: 0.95rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .hero-grid {
                gap: 1.5rem;
            }
        }

        @media (max-width: 600px) {
            .section {
                padding: 1.5rem 0
            }

            .hero {
                min-height: calc(100svh - 3.5rem);
                padding: 1rem 0 1rem;
                display: flex;
                flex-direction: column;
                justify-content: center
            }

            .mark {
                width: 2.9rem;
                height: 2.35rem;
                flex: 0 0 2.9rem;
            }

            .brand-text strong {
                font-size: 0.85rem;
            }

            .hero-grid {
                gap: 0.75rem
            }

            .hero-copy h2 {
                font-size: 0.85rem;
                margin-bottom: 0.55rem;
                letter-spacing: 0.04em;
            }

            .hero-copy h1,
        .hero-copy .hero-main-heading {
                margin: 0 0 0.75rem;
                font-size: clamp(1.85rem, 6.8vw, 2.15rem);
                letter-spacing: -0.01em;
                line-height: 1.22;
            }

            html[data-lang="bn"] .hero-copy h1,
        .hero-copy .hero-main-heading {
                letter-spacing: 0.015em;
                line-height: 1.28;
                word-spacing: 0.12em;
                margin-bottom: 0.85rem;
            }

            #typing {
                margin: 0 0 0.85rem;
                font-size: 0.95rem;
                min-height: 1.35rem;
                line-height: 1.4;
            }

            .about-text {
                margin: 0 0 1rem;
                font-size: 0.85rem;
                line-height: 1.45
            }

            .actions {
                margin-bottom: 1rem;
                gap: 0.5rem
            }

            .btn {
                min-height: 2.5rem;
                padding: 0.5rem 1rem;
                font-size: 0.8rem;
                flex: 1
            }

            .portrait {
                max-width: 180px;
                padding: 0.45rem;
                border-radius: 1.5rem;
                box-shadow: none !important;
            }

            .frame {
                border-radius: 1.15rem
            }

            .portrait-meta {
                margin-top: 0.5rem;
                padding-top: 0.5rem;
            }

            .available {
                font-size: 0.65rem;
            }

            .hero-note {
                padding: 0.35rem 0.75rem;
                font-size: 0.7rem;
            }

            .shell {
                width: calc(100% - 1.25rem)
            }

            .nav {
                display: none
            }

            .header {
                padding-top: 0.5rem;
            }

            .mark {
                width: 2.9rem;
                height: 2.35rem;
                flex: 0 0 2.9rem;
            }

            .service-card,
            .project-card {
                padding: 1.5rem;
                border-radius: 1.5rem
            }

            .service-icon {
                width: 2.75rem;
                height: 2.75rem;
                font-size: 1.25rem;
                margin-bottom: 1rem;
                border-radius: 0.75rem
            }

            .service-card,
            .project-card {
                padding: 1rem;
                border-radius: 1.25rem;
                text-align: center;
                display: flex;
                flex-direction: column;
                align-items: center;
            }

            .service-card h3,
            .project-content h3 {
                font-size: 0.95rem;
                margin-bottom: 0.25rem;
                line-height: 1.2;
            }

            .service-card p,
            .project-content p {
                font-size: 0.75rem;
                line-height: 1.4;
                margin-bottom: 0.5rem;
                text-align: center;
            }

            .service-icon {
                width: 2.25rem;
                height: 2.25rem;
                font-size: 1.1rem;
                margin-bottom: 0.75rem;
                border-radius: 0.6rem;
                /* Center the icon frame itself */
                margin-left: auto;
                margin-right: auto;
            }

            .chips {
                gap: 0.25rem;
                justify-content: center;
            }

            .chips li {
                font-size: 0.65rem;
                padding: 0.2rem 0.5rem;
            }

            .services-grid,
            .skills-grid,
            .projects-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.65rem;
            }

            /* Lone odd project card in bottom row spans both columns */
            .projects-grid > .project-card:last-child:nth-child(odd) {
                grid-column: 1 / -1;
            }

            .project-card .project-content {
                width: 100%;
            }

            .service-card,
            .skill-card,
            .project-card {
                padding: 0.85rem;
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                min-height: auto;
                contain: layout style;
                /* Isolate rendering for mobile perf without clipping shadows */
            }

            .service-card h3,
            .project-content h3 {
                font-size: 0.85rem;
                line-height: 1.2;
                margin-bottom: 0.25rem;
                min-height: 2.1rem;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .service-card p,
            .project-content p {
                font-size: 0.70rem;
                line-height: 1.35;
                margin-bottom: 0.5rem;
                opacity: 0.9;
                text-align: center;
            }

            .service-icon {
                aspect-ratio: 1;
                width: 2rem;
                height: auto;
                font-size: 1rem;
                margin-bottom: 0.5rem;
                border-radius: 0.6rem;
                display: grid;
                place-items: center;
            }

            .chips {
                gap: 0.35rem;
                display: flex;
                flex-direction: column;
                align-items: center;
            }

            .chips li {
                font-size: 0.72rem;
                padding: 0.35rem 0.75rem;
                white-space: nowrap;
                line-height: 1.1;
                border-radius: 999px;
            }

            .hide-mobile,
            .br-desktop {
                display: none !important;
            }

            .show-mobile,
            .br-mobile {
                display: inline !important;
            }

            .project-links {
                gap: 0.35rem;
                width: 100%;
                display: flex;
                flex-direction: column;
            }

            .project-links-row {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.35rem;
                width: 100%;
            }

            .project-links-row .project-link {
                padding: 0.5rem 0.65rem;
                font-size: 0.62rem;
            }

            .project-link {
                padding: 0.5rem 1rem;
                font-size: 0.65rem;
                border-radius: 999px;
                width: 100%;
                white-space: normal;
                /* CRITICAL: Allow long project titles to wrap */
                word-wrap: break-word;
                line-height: 1.2;
                display: flex;
                align-items: center;
                justify-content: space-between;
                min-height: 2.2rem;
                /* Keep hit area consistent */
            }

            .project-link span {
                text-align: left;
                flex: 1;
                padding-right: 0.25rem;
            }

            .project-link i {
                font-size: 0.55rem;
                flex: 0 0 0.5rem;
            }

            .project-tags {
                margin-bottom: 0.4rem;
                gap: 0.15rem;
                flex-wrap: wrap;
                /* Ensure tags wrap to avoid leaking out */
                justify-content: center;
            }

            .tag {
                font-size: 0.5rem;
                /* Shrunk for narrow columns */
                padding: 0.1rem 0.3rem;
                letter-spacing: -0.01em;
            }

            .contact-info h2,
            .contact-info h3 {
                font-size: clamp(2.4rem, 10.5vw, 3.4rem);
                line-height: 1.15;
                letter-spacing: -0.02em;
                margin-bottom: 0.65rem;
                text-align: left;
                width: 100%;
            }

            html[data-lang="bn"] .contact-info h2,
            html[data-lang="bn"] .contact-info h3 {
                font-size: clamp(2.65rem, 11.5vw, 3.65rem);
                line-height: 1.2;
                letter-spacing: -0.005em;
                word-spacing: 0.05em;
                margin-bottom: 0.65rem;
                text-align: left;
                width: 100%;
            }

            .contact-info p {
                font-size: clamp(0.85rem, 3.2vw, 0.95rem);
                line-height: 1.55;
                margin-bottom: 1.15rem;
                text-align: left;
            }

            .contact-methods {
                margin-top: 0.5rem;
                gap: 0.4rem;
            }

            .method {
                padding: 0.75rem 1rem;
                gap: 0.75rem;
                border-radius: 1rem;
            }

            .method-icon {
                width: 2.25rem;
                height: 2.25rem;
                font-size: 1.1rem;
                border-radius: 0.6rem;
                flex: 0 0 2.25rem;
            }

            #waMethod .method-icon svg {
                width: 1.1rem;
                height: 1.1rem;
            }

            .method-text strong {
                font-size: 0.55rem;
            }

            .method-text span {
                font-size: 0.75rem;
            }

            .copy-btn {
                width: 2rem;
                height: 2rem;
                font-size: 0.8rem;
                flex: 0 0 2rem;
            }

            .copy-btn::after {
                font-size: 0.7rem;
                padding: 0.3rem 0.4rem;
                border-radius: 0.5rem;
            }

            .social-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.75rem;
                margin-top: 0.75rem;
            }

            .social-item {
                padding: 1rem 0.75rem;
                gap: 0.6rem;
                border-radius: 1.25rem;
                min-height: 3.5rem;
                min-width: 0;
                overflow: hidden;
            }

            .social-item i {
                font-size: clamp(1.1rem, 5vw, 1.35rem);
                flex-shrink: 0;
            }

            .social-item span {
                font-size: clamp(0.75rem, 3.5vw, 0.95rem);
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .footer {
                padding: 1rem 0;
                margin-top: 1.5rem;
                flex-direction: column;
                gap: 0.5rem;
                text-align: center;
                font-size: 0.75rem;
            }

            /* Mega Lite optimizations & Full Hover Sticky Fix for Mobile */
            .portrait:hover,
            .service-card:hover,
            .project-card:hover,
            .social-item:hover,
            .method:hover,
            .btn:hover {
                transform: none !important;
                box-shadow: none !important;
                /* Disable color changes that 'stick' on touchscreens */
                background: unset !important;
                border-color: unset !important;
                color: unset !important;
                background-color: revert !important;
            }

            .btn.secondary:hover {
                background: var(--surface) !important;
                color: var(--text) !important;
                box-shadow: inset 0 0 0 1px var(--line) !important;
            }

            .btn.outline:hover {
                background: transparent !important;
                color: var(--accent) !important;
                border-color: var(--accent) !important;
            }

            /* Prevent primary button from looking stuck/active while preserving gradient */
            .btn.primary:hover {
                background: var(--vibrant-gradient) !important;
                color: var(--accent-ink) !important;
            }

            .section {
                contain: layout;
                /* Replaced paint with layout to prevent tooltip clipping */
            }
        }

        @media (max-width: 480px) {
            .services-grid,
            .projects-grid {
                grid-template-columns: 1fr;
                gap: 0.85rem;
            }

            .service-card,
            .project-card {
                padding: 1.25rem 1.15rem;
                text-align: left;
                align-items: flex-start;
            }

            .project-visual-head {
                width: 100%;
                margin-bottom: 0.75rem;
                padding-bottom: 0.65rem;
            }

            .project-visual-icon {
                width: 2.4rem;
                height: 2.4rem;
                font-size: 1rem;
                border-radius: 0.75rem;
            }

            .service-card h3,
            .project-content h3 {
                font-size: 1.05rem;
                min-height: 0;
                justify-content: flex-start;
                text-align: left;
                margin-bottom: 0.35rem;
            }

            .service-card p,
            .project-content p {
                font-size: 0.84rem;
                line-height: 1.5;
                text-align: left;
                margin-bottom: 0.75rem;
            }

            .project-tags {
                justify-content: flex-start;
                gap: 0.35rem;
                margin-bottom: 0.6rem;
            }

            .tag {
                font-size: 0.68rem;
                padding: 0.15rem 0.45rem;
            }

            .project-link,
            .project-links-row .project-link {
                font-size: 0.78rem;
                padding: 0.6rem 0.9rem;
            }

            .chips {
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: flex-start;
                gap: 0.4rem;
            }

            .chips li {
                font-size: 0.76rem;
                padding: 0.38rem 0.75rem;
            }
        }


        /* Reduced Motion */
        @media (prefers-reduced-motion: reduce) {

            *,
            ::before,
            ::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* Software HQ Search Empty State */
        .empty-state {
            grid-column: 1 / -1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 4rem 1.5rem;
            background: var(--surface);
            border: 1px dashed var(--line);
            border-radius: 2rem;
            margin: 1rem 0;
            backdrop-filter: blur(10px);
        }

        .empty-icon {
            font-size: 2.5rem;
            color: var(--accent);
            margin-bottom: 1.25rem;
            opacity: 0.7;
        }

        .empty-state h3 {
            font-size: 1.35rem;
            font-weight: 800;
            margin: 0 0 0.5rem;
            color: var(--text);
        }

        .empty-state p {
            font-size: 0.95rem;
            color: var(--muted);
            max-width: 450px;
            margin: 0 0 1.5rem;
            line-height: 1.5;
        }

        .empty-clear-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.75rem;
            border-radius: 999px;
            background: var(--vibrant-gradient);
            color: var(--accent-ink);
            font-size: 0.9rem;
            font-weight: 800;
            border: none;
            cursor: pointer;
            transition: all 0.3s var(--bezier);
            box-shadow: 0 10px 25px var(--soft);
        }

        .empty-clear-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 15px 35px var(--soft);
        }

        /* Keyboard Accessibility Focus Rings */
        .file-card:focus-visible,
        .pill:focus-visible,
        .back-btn:focus-visible,
        .download-hero:focus-visible,
        .btn-secondary-soft:focus-visible,
        .empty-clear-btn:focus-visible {
            outline: 2px solid var(--accent) !important;
            outline-offset: 3px;
        }

        /* =========================================================================
           Photo Viewer / Lightbox Component
           ========================================================================= */
        .photo-viewer-modal {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
            user-select: none;
            -webkit-user-select: none;
        }

        .photo-viewer-modal.is-open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .photo-viewer-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(8, 8, 10, 0.88);
            backdrop-filter: blur(24px) saturate(160%);
            -webkit-backdrop-filter: blur(24px) saturate(160%);
            transition: opacity 0.3s ease;
        }

        /* Header */
        .photo-viewer-header {
            position: relative;
            z-index: 2;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 1.25rem 2rem;
            background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
        }

        .photo-viewer-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            min-width: 0;
        }

        .photo-viewer-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.35rem 0.75rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.14);
            color: #ff9d42;
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            flex-shrink: 0;
        }

        .photo-viewer-text {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .photo-viewer-title {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 800;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            letter-spacing: -0.01em;
        }

        .photo-viewer-subtitle {
            font-size: 0.82rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.65);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .photo-viewer-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-shrink: 0;
        }

        /* Zoom toolbar pill */
        .photo-viewer-zoom-bar {
            display: inline-flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 999px;
            padding: 3px;
            backdrop-filter: blur(10px);
        }

        .photo-viewer-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: transparent;
            border: none;
            color: #ffffff;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s var(--bezier);
            text-decoration: none;
        }

        .photo-viewer-btn:hover {
            background: rgba(255, 255, 255, 0.16);
            color: #ff9d42;
            transform: scale(1.06);
        }

        .photo-viewer-btn:active {
            transform: scale(0.95);
        }

        .zoom-level-btn {
            width: auto;
            min-width: 54px;
            padding: 0 0.5rem;
            border-radius: 999px;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.02em;
        }

        .zoom-level-btn:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.14);
        }

        /* Cross Close button */
        .photo-viewer-close {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.18);
            color: #ffffff;
            font-size: 1.15rem;
            cursor: pointer;
            transition: all 0.25s var(--bezier);
        }

        .photo-viewer-close:hover {
            background: #ff3b30;
            border-color: #ff3b30;
            color: #ffffff;
            transform: rotate(90deg) scale(1.08);
            box-shadow: 0 0 25px rgba(255, 59, 48, 0.5);
        }

        /* Stage & Viewport */
        .photo-viewer-stage {
            position: relative;
            z-index: 2;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            overflow: hidden;
            width: 100%;
            touch-action: none;
        }

        .photo-viewer-viewport {
            flex: 1;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
            touch-action: none;
            min-width: 0;
            min-height: 0;
        }

        /* Slide Track & 3-Slide System (Task 3.1 & 3.2) */
        .photo-viewer-track {
            position: absolute;
            inset: 0;
            display: flex;
            width: 100%;
            height: 100%;
            align-items: center;
            justify-content: center;
            transform: translate3d(0, 0, 0);
            pointer-events: auto;
            touch-action: none;
        }

        .photo-viewer-slide {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem 1.5rem;
            box-sizing: border-box;
            contain: layout paint;
            pointer-events: none;
            touch-action: none;
        }

        .photo-viewer-slide[data-slot="prev"] {
            transform: translate3d(-100%, 0, 0);
        }

        .photo-viewer-slide[data-slot="curr"] {
            transform: translate3d(0, 0, 0);
            pointer-events: auto;
        }

        .photo-viewer-slide[data-slot="next"] {
            transform: translate3d(100%, 0, 0);
        }

        /* Slide Frame with GPU acceleration and full image containment */
        .photo-viewer-frame {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            max-width: 100%;
            max-height: 100%;
            transform-origin: center center;
            cursor: zoom-in;
            user-select: none;
            -webkit-user-select: none;
            touch-action: none;
            transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        .photo-viewer-frame.is-zoomed {
            cursor: grab;
            transition: none;
        }

        .photo-viewer-frame.is-dragging {
            cursor: grabbing;
        }

        /* Crystal-Clear Sharp Image - Fits 100% fully visible on any screen size with zero cut */
        .pv-img {
            position: relative;
            z-index: 2;
            display: block;
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12);
            pointer-events: auto;
        }

        /* Error state with 'Tap to retry' button */
        .pv-error {
            position: absolute;
            inset: 0;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.85rem;
            padding: 1.5rem;
            text-align: center;
            background: rgba(18, 22, 28, 0.95);
            z-index: 5;
            color: #ff7b7b;
        }

        .photo-viewer-frame.has-error .pv-error {
            display: flex;
        }

        .photo-viewer-frame.has-error .pv-spinner,
        .photo-viewer-frame.has-error .pv-lqip {
            display: none !important;
        }

        .pv-retry-btn {
            padding: 0.5rem 1.25rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.25);
            color: #ffffff;
            font-size: 0.84rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .pv-retry-btn:hover {
            background: #ff9d42;
            color: #000000;
        }

        /* Navigation arrows */
        .photo-viewer-nav-btn {
            position: relative;
            z-index: 3;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 52px;
            height: 52px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: #ffffff;
            font-size: 1.25rem;
            cursor: pointer;
            backdrop-filter: blur(12px);
            transition: all 0.25s var(--bezier);
            flex-shrink: 0;
        }

        .photo-viewer-nav-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #ff9d42;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        }

        .photo-viewer-nav-btn.prev:hover {
            transform: translateX(-3px) scale(1.08);
        }

        .photo-viewer-nav-btn.next:hover {
            transform: translateX(3px) scale(1.08);
        }

        .photo-viewer-nav-btn:disabled {
            opacity: 0.2;
            pointer-events: none;
        }

        /* Footer Hint */
        .photo-viewer-footer {
            position: relative;
            z-index: 2;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.85rem 1.5rem;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
        }

        .photo-viewer-hint {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.6);
            font-weight: 600;
        }

        .photo-viewer-hint kbd {
            padding: 0.15rem 0.45rem;
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.18);
            font-family: inherit;
            font-size: 0.74rem;
            color: #ffffff;
        }

        @media (max-width: 768px) {
            .photo-viewer-header {
                padding: 0.75rem 1rem;
            }
            .photo-viewer-title {
                font-size: 0.95rem;
            }
            .photo-viewer-zoom-bar {
                display: none !important;
            }
            .photo-viewer-nav-btn {
                display: none !important;
            }
            .photo-viewer-stage {
                padding: 0;
                width: 100%;
                height: 100%;
                justify-content: center;
            }
            .photo-viewer-viewport {
                width: 100%;
                height: 100%;
            }
            .photo-viewer-slide {
                padding: 0.35rem;
            }
            .photo-viewer-frame {
                width: 100%;
                height: 100%;
            }
            .photo-viewer-footer {
                display: none !important;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .photo-viewer-track,
            .photo-viewer-frame,
            .photo-viewer-slide,
            .pv-img {
                transition: opacity 0.15s ease !important;
                animation: none !important;
            }
        }

        /* ─── Apple-Grade Tactile Responsiveness & Input Optimization (INP < 50ms) ─── */
        a, button, input, select, textarea,
        .btn, .service-card, .project-card, .bento-card,
        .segmented-toggle, .pill, .filter-pill, .photo-viewer-btn {
            touch-action: manipulation;
        }

        .btn:active,
        .segmented-toggle:active,
        .pill:active,
        .photo-viewer-btn:active,
        .hamburger-btn:active {
            transform: scale(0.96) !important;
            transition: transform 0.08s cubic-bezier(0.2, 0.9, 0.3, 1.2) !important;
        }



        /* Prevent Scroll Chaining & Bounce Glitches */
        .photo-viewer-modal,
        .nav-expanded-content,
        .detail-view {
            overscroll-behavior-y: none;
        }

        /* ─── Antigravity Performance Governor Debug HUD (?perf=1) ─── */
        #perfGovernorHud {
            position: fixed;
            bottom: 1.25rem;
            right: 1.25rem;
            z-index: 2147483647;
            background: rgba(12, 14, 18, 0.88);
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 1rem;
            padding: 0.85rem 1.15rem;
            color: #f1f5f9;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
            font-size: 0.76rem;
            line-height: 1.45;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
            pointer-events: auto;
            user-select: none;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            min-width: 250px;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        #perfGovernorHud .hud-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-weight: 800;
            font-size: 0.82rem;
            color: #38bdf8;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 0.35rem;
        }

        #perfGovernorHud .hud-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.75rem;
        }

        #perfGovernorHud .hud-label {
            color: #94a3b8;
            font-weight: 500;
        }

        #perfGovernorHud .hud-val {
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }

        #perfGovernorHud .hud-val.fps-good { color: #34d399; }
        #perfGovernorHud .hud-val.fps-mid { color: #fbbf24; }
        #perfGovernorHud .hud-val.fps-bad { color: #f87171; }

        #perfGovernorHud .hud-tier-buttons {
            display: flex;
            gap: 0.35rem;
            margin-top: 0.3rem;
            padding-top: 0.4rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        #perfGovernorHud .hud-tier-btn {
            flex: 1;
            padding: 0.3rem 0.45rem;
            border-radius: 0.45rem;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.14);
            color: #e2e8f0;
            font-size: 0.7rem;
            font-weight: 700;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
        }

        #perfGovernorHud .hud-tier-btn:hover {
            background: rgba(56, 189, 248, 0.2);
            border-color: #38bdf8;
            color: #ffffff;
        }

        #perfGovernorHud .hud-tier-btn.active {
            background: #38bdf8;
            border-color: #38bdf8;
            color: #040d1a;
            box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
        }
