        :root {
            --frame: 40px;
            --bg-dark: #0A0A0A;
            --bg-navy: #141313;
            --surface-high: #1E1E1E;
            --accent: #ff6b35;
            --accent-on: #7a2c0e;
            --accent-soft: #ff9c78;
            --muted: #9B9695;
            --text-primary: #E5E2E1;
            --text-secondary: #9B9695;
            --ghost-border: rgba(84, 67, 62, 0.15);
        }

        /* ── Loading screen ── */
        #loader {
            position: fixed;
            inset: 0;
            background: var(--bg-dark);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                        visibility 0.9s cubic-bezier(0.4, 0, 0.2, 1);
        }


        #loader.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        #loader .loader-letters {
            transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #loader.hidden .loader-letters {
            transform: translateY(-6px);
            opacity: 0;
        }

        .loader-letters {
            display: flex;
            flex-wrap: nowrap;
            align-items: baseline;
            justify-content: center;
            max-width: 90vw;
        }

        .loader-letter {
            font-family: 'Inconsolata', monospace;
            font-size: clamp(0.7rem, 2.25vw, 1.6rem);
            font-weight: 200;
            font-stretch: 100%;
            color: var(--text-primary);
            display: inline-block;
            width: 0.76em;
            text-align: center;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transition: color 0.04s ease-in-out;
        }

        .loader-letter.matrix {
            color: var(--accent);
        }

        .loader-letter.space {
            width: 0.4em;
        }

        .loader-letter.portfolio {
            font-weight: 300;
        }

        .loader-letter.fade-out {
            opacity: 0;
            transition: color 0.04s ease-in-out, opacity 0.5s ease-out;
        }

        @media (prefers-reduced-motion: reduce) {
            .loader-letter { transition: none; }
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg-dark);
            color: var(--text-primary);
            overflow-x: hidden;
            user-select: none;
        }

        /* Ethereal background */
        #ethereal-bg {
            position: fixed;
            inset: var(--frame);
            overflow: hidden;
            z-index: -1;
            pointer-events: none;
            contain: strict;
        }

        @keyframes ethereal-drift {
            0%   { transform: scale(1)    translate(0px,    0px)   rotate(0deg); }
            25%  { transform: scale(1.04) translate(-12px,  8px)   rotate(0.4deg); }
            50%  { transform: scale(1.02) translate(8px,   -10px)  rotate(-0.3deg); }
            75%  { transform: scale(1.05) translate(-6px,   12px)  rotate(0.2deg); }
            100% { transform: scale(1)    translate(0px,    0px)   rotate(0deg); }
        }

        #ethereal-inner {
            position: absolute;
            inset: -60px;
            will-change: transform;
            animation: ethereal-drift 13s ease-in-out infinite;
        }

        #ethereal-mask {
            position: relative;
            width: 100%;
            height: 100%;
            background-color: rgba(229, 226, 225, 0.12);
            mask-image: url('https://framerusercontent.com/images/ceBGguIpUU8luwByxuQz79t7To.png');
            mask-size: cover;
            mask-repeat: no-repeat;
            mask-position: center;
            -webkit-mask-image: url('https://framerusercontent.com/images/ceBGguIpUU8luwByxuQz79t7To.png');
            -webkit-mask-size: cover;
            -webkit-mask-repeat: no-repeat;
            -webkit-mask-position: center;
        }

        #ethereal-grain {
            position: absolute;
            inset: 0;
            background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
            background-size: 220px 220px;
            background-repeat: repeat;
            opacity: 0.45;
            mix-blend-mode: overlay;
            pointer-events: none;
        }

        /* ── Light mode ── */
        html.light {
            --bg-dark: #F5F3F0;
            --bg-navy: #ECEAE6;
            --surface-high: #E2DED9;
            --accent: #ff6b35;
            --accent-on: #7a2c0e;
            --accent-soft: #ff9c78;
            --muted: #6B6560;
            --text-primary: #111111;
            --text-secondary: #6B6560;
            --ghost-border: rgba(60, 50, 45, 0.15);
        }

        /* View transition — circular reveal */
        ::view-transition-old(root) { animation: none; }
        ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

        html.light body {
            background: var(--bg-dark);
            color: var(--text-primary);
            transition: background 0.4s ease, color 0.4s ease;
        }

        /* Light mode: panel item names and header labels darker; tags unchanged */
        html.light .projects-panel-name {
            color: #000000;
        }
        html.light .projects-panel-name.pressed,
        html.light .hero-menu-item.pressed {
            animation: menu-press 0.18s ease-out forwards;
            color: var(--accent);
        }
        html.light .projects-panel-title {
            color: #2a2a2a;
        }
        html.light .projects-panel-link-arrow {
            color: #000000;
        }

        html.light #ethereal-bg {
            filter: none;
        }

        /* Dark grey waves on white background */
        html.light #ethereal-mask {
            background-color: rgba(15, 12, 10, 0.55);
        }

        /* Grey grain, prominent */
        html.light #ethereal-grain {
            opacity: 0.55;
            mix-blend-mode: multiply;
            filter: grayscale(1);
        }

/* ── Theme toggle button ── */
        .theme-toggle {
            position: fixed;
            top: calc(var(--frame) + 1rem);
            right: calc(var(--frame) + 1rem);
            z-index: 1001;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border: none;
            background: transparent;
            cursor: pointer;
            color: var(--text-primary);
            flex-shrink: 0;
            touch-action: manipulation;
            transition: color 0.2s ease, transform 0.2s ease;
        }

        .theme-toggle:hover {
            color: var(--accent);
            transform: rotate(20deg) scale(1.15);
        }

        .theme-toggle-icon {
            position: relative;
            width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .theme-toggle .icon-sun,
        .theme-toggle .icon-moon {
            width: 18px;
            height: 18px;
            position: absolute;
        }

        /* Default (dark mode): moon visible, sun hidden */
        .theme-toggle .icon-sun  { opacity: 0; transform: scale(0.55); }
        .theme-toggle .icon-moon { opacity: 1; transform: scale(1); }

        /* Light mode: sun visible, moon hidden (baseline, animation overrides during transition) */
        html.light .theme-toggle .icon-sun  { opacity: 1; transform: scale(1); }
        html.light .theme-toggle .icon-moon { opacity: 0; transform: scale(0.55); }

        @keyframes iconEnter {
            from { opacity: 0; transform: scale(0.55) rotate(-25deg); }
            to   { opacity: 1; transform: scale(1)    rotate(0deg); }
        }
        @keyframes iconExit {
            from { opacity: 1; transform: scale(1)    rotate(0deg); }
            to   { opacity: 0; transform: scale(0.55) rotate(25deg); }
        }

        .theme-toggle .icon-entering { animation: iconEnter 0.33s ease-out forwards; }
        .theme-toggle .icon-exiting  { animation: iconExit  0.33s ease-out forwards; }

        /* Grain overlay */
        /* Site border frame */
        #site-frame {
            position: fixed;
            inset: var(--frame);
            border: 1.5px solid rgba(255, 255, 255, 0.28);
            pointer-events: none;
            z-index: 9997;
            transition: opacity 0.22s ease;
        }

        html.light #site-frame {
            border-color: rgba(0, 0, 0, 0.35);
        }

        /* Geometric mesh — bottom left inside frame */
        #geo-mesh {
            position: fixed;
            bottom: calc(var(--frame) + 3.2rem);
            left: calc(var(--frame) + 6rem);
            width: 450px;
            height: 450px;
            z-index: 100;
            opacity: 1;
            transition: opacity 0.35s ease;
        }
        html.light #geo-mesh {
            filter: invert(1);
        }
        #geo-mesh.hidden {
            opacity: 0;
            pointer-events: none;
        }
        #geo-canvas {
            display: block;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }
        #geo-label {
            position: absolute;
            bottom: -2.4rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            color: rgba(229, 226, 225, 0.8);
            font-family: 'Inconsolata', monospace;
            font-size: 9px;
            font-weight: 200;
            letter-spacing: 0.15em;
            white-space: nowrap;
            pointer-events: none;
        }
        .geo-click-hint {
            color: #ffffff;
            font-size: 8px;
            letter-spacing: 0.2em;
            animation: geo-hint-pulse 2.4s ease-in-out infinite;
        }
        @keyframes geo-hint-pulse {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 0.9; }
        }

        /* Mascot character — bottom right inside frame */
        #mascot {
            position: fixed;
            bottom: calc(var(--frame) + 1.5rem);
            right: calc(var(--frame) + 1.5rem);
            width: 160px;
            height: 160px;
            z-index: 500;
            pointer-events: auto;
            overflow: visible;
            filter: sepia(0.18) saturate(1.4) hue-rotate(-8deg);
            transition: filter 0.3s ease, transform 0.3s ease;
        }
        #mascot:hover {
            filter: sepia(0.28) saturate(1.6) hue-rotate(-8deg);
            transform: translateY(-4px);
        }
        #ghost {
            position: relative;
            width: 160px;
            height: 160px;
            overflow: visible;
        }

        .grain-overlay {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 9999;
            opacity: 0.08;
        }

        /* Header Navigation - Enhanced */
        header {
            position: fixed;
            top: var(--frame);
            left: var(--frame);
            right: var(--frame);
            padding: 2rem 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
            background: transparent;
            backdrop-filter: none;
            border-bottom: none;
            box-shadow: none;
            animation: slideDown 0.6s ease;
        }
        
        @keyframes slideDown {
            from { transform: translateY(-100%); }
            to { transform: translateY(0); }
        }


        /* Theme toggle wrapper */
        .header-right {
            display: flex;
            align-items: center;
        }

        /* Clock — fixed above the top frame border, right edge flush with frame line */
        #clock-widget {
            position: fixed;
            top: calc(var(--frame) / 2);
            right: var(--frame);
            transform: translateY(-50%);
            z-index: 1001;
            font-family: 'Inconsolata', monospace;
            font-weight: 200;
            font-size: clamp(0.9rem, 1.2vw, 1.1rem);
            color: var(--text-primary);
            letter-spacing: -0.01em;
            line-height: 1;
            overflow: visible;
            white-space: nowrap;
        }

        #clock-widget * {
            font-family: 'Inconsolata', monospace !important;
            font-weight: 200 !important;
            color: var(--text-primary) !important;
        }

        html.light #clock-widget {
            color: #111111;
        }

        html.light #clock-widget * {
            color: #111111 !important;
        }

        nav ul {
            display: flex;
            gap: 3rem;
            list-style: none;
        }

        nav a {
            display: inline-block;
            text-decoration: none;
            color: var(--muted);
            font-weight: 500;
            position: relative;
            transition: color 0.3s;
        }

        nav a:hover {
            color: var(--text-primary);
        }

        nav a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 3px;
            background: var(--accent);
            transition: width 0.3s ease;
        }

        nav a:hover::after {
            width: 100%;
        }

        /* Mobile nav toggle (hidden on desktop) */
        .nav-toggle {
            display: none;
            background: rgba(26, 35, 50, 0.35);
            border: 1px solid var(--ghost-border);
            color: var(--text-primary);
            border-radius: 999px;
            padding: 0.55rem 0.8rem;
            font-size: 0.9rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            cursor: pointer;
            align-items: center;
            gap: 0.4rem;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
        }

        .nav-toggle span {
            display: block;
            width: 18px;
            height: 2px;
            background: currentColor;
            position: relative;
            border-radius: 999px;
            transition: background 0.18s ease;
        }

        .nav-toggle span::before,
        .nav-toggle span::after {
            content: '';
            position: absolute;
            left: 0;
            width: 18px;
            height: 2px;
            background: currentColor;
            border-radius: 999px;
            transition: transform 0.18s ease, top 0.18s ease, opacity 0.18s ease;
        }

        .nav-toggle span::before {
            top: -5px;
        }

        .nav-toggle span::after {
            top: 5px;
        }

        .nav-toggle:hover {
            background: rgba(26, 35, 50, 0.55);
            border-color: rgba(224, 124, 92, 0.55);
            transform: translateY(-1px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
        }

        .nav-toggle:active {
            transform: translateY(0) scale(0.98);
        }

        .nav-toggle:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(224, 124, 92, 0.35), 0 12px 30px rgba(0, 0, 0, 0.32);
        }

        /* When mobile nav is open, animate burger into an X */
        body.nav-open .nav-toggle span {
            background: transparent;
        }

        body.nav-open .nav-toggle span::before {
            top: 0;
            transform: rotate(45deg);
        }

        body.nav-open .nav-toggle span::after {
            top: 0;
            transform: rotate(-45deg);
        }

        @keyframes navPop {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            70% { transform: scale(0.95); }
            100% { transform: scale(1); }
        }

        @keyframes logoPress {
            0% { transform: scale(1); opacity: 1; }
            40% { transform: scale(0.94); opacity: 0.85; }
            100% { transform: scale(1); opacity: 1; }
        }

        @keyframes sectionFadeIn {
            from { opacity: 0.4; }
            to { opacity: 1; }
        }

        section.section-fade-in {
            animation: sectionFadeIn 0.5s ease forwards;
        }

        /* Hero Section */
        .hero {
            min-height: 100dvh;
            display: flex;
            align-items: flex-start;
            justify-content: flex-start;
            text-align: left;
            padding: calc(var(--frame) + 3rem) calc(var(--frame) + 0.5rem) 0 calc(var(--frame) + 1.5rem);
            position: relative;
            max-width: none;
            margin-left: 0;
            margin-right: 0;
            width: 100%;
        }

        .hero h1 {
            font-family: 'Inconsolata', monospace;
            font-size: clamp(2.37rem, 3.48vw, 3.09rem);
            font-weight: 200;
            font-stretch: 100%;
            line-height: 1.2;
            letter-spacing: 0.08em;
            margin-bottom: 0.4rem;
            color: var(--text-primary);
            animation: fadeInUp 0.8s ease 0.2s both;
        }

        .hero p {
            font-family: 'Courier New', Monaco, Consolas, 'Lucida Console', monospace;
            font-size: clamp(0.62rem, 0.9vw, 0.82rem);
            font-weight: 200;
            letter-spacing: 0.01em;
            line-height: 1.3;
            max-width: 700px;
            margin: 0;
            color: var(--accent);
            animation: fadeInUp 0.8s ease 0.4s both;
        }

        /* Hero vertical menu */
        .hero-menu {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            margin-top: 2.8rem;
            animation: fadeInUp 0.8s ease 0.6s both;
        }

        .hero-menu-item {
            display: inline-flex;
            align-items: baseline;
            width: max-content;
            font-family: 'Courier New', Monaco, Consolas, 'Lucida Console', monospace;
            font-size: clamp(0.62rem, 0.9vw, 0.82rem);
            font-weight: 200;
            letter-spacing: 0.08em;
            line-height: 2.2;
            color: var(--text-primary);
            text-decoration: none;
        }

        @keyframes arrow-slide-in {
            0%   { opacity: 0; transform: translateX(-8px); }
            65%  { opacity: 1; transform: translateX(3px); }
            100% { opacity: 1; transform: translateX(0); }
        }

        @keyframes menu-press {
            0%   { transform: scale(1)    translateY(0); }
            35%  { transform: scale(0.88) translateY(2px); }
            100% { transform: scale(0.94) translateY(1px); }
        }

        .hero-menu-arrow {
            display: inline-block;
            width: 1.4em;
            white-space: nowrap;
            opacity: 0;
            will-change: transform, opacity;
            color: var(--accent);
        }

        .hero-menu-item:hover {
            color: var(--accent);
        }

        .hero-menu-item:hover .hero-menu-arrow,
        .hero-menu-item.active .hero-menu-arrow {
            animation: arrow-slide-in 0.22s ease-out forwards;
        }

        .hero-menu-item.pressed {
            animation: menu-press 0.18s ease-out forwards;
            color: var(--accent);
        }

        .projects-panel-name.pressed {
            animation: menu-press 0.18s ease-out forwards;
            color: var(--accent);
        }

        /* Projects popup — bottom left aligned with hero text */
        .projects-panel {
            position: fixed;
            bottom: calc(var(--frame) + 1.2rem);
            left: calc(var(--frame) + 1.2rem);
            right: auto;
            width: min(660px, calc(100vw - var(--frame) * 2 - 2.4rem));
            max-height: calc(100vh - var(--frame) * 2 - 4rem);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            background: none;
            border: none;
            border-radius: 0;
            z-index: 900;
            opacity: 0;
            transform: translateY(12px);
            pointer-events: none;
            transition: opacity 0.2s ease-out, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: none;
        }

        .projects-panel.open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .projects-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 0 0.81rem 0;
            border-bottom: none;
        }

        .projects-panel-header-left {
            display: flex;
            align-items: center;
            gap: 0.58rem;
        }

        .projects-panel-symbols {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.92rem;
            font-weight: 200;
            color: var(--accent);
        }

        .projects-panel-title {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.71rem;
            font-weight: 400;
            letter-spacing: 0.14em;
            color: var(--muted);
            text-transform: uppercase;
        }


        .projects-panel-list {
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            flex: 1;
            min-height: 0;
            max-height: calc(5 * 5.3rem);
            scrollbar-width: none;
            -ms-overflow-style: none;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        .projects-panel-list::-webkit-scrollbar {
            display: none;
        }

        .projects-panel-list:has(.projects-panel-item:nth-child(6)) {
            mask-image: linear-gradient(to bottom, black calc(100% - 2.5rem), transparent 100%);
            -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 2.5rem), transparent 100%);
        }

        /* Dim only triggers when hovering a title that has a card */
        .projects-panel-list:has([data-img]:hover) .projects-panel-item,
        .projects-panel-list:has([data-images]:hover) .projects-panel-item {
            opacity: 0.3;
        }
        .projects-panel-list:has([data-img]:hover) [data-img]:hover,
        .projects-panel-list:has([data-images]:hover) [data-images]:hover {
            opacity: 1;
        }

        .projects-panel-item {
            display: block;
            text-decoration: none;
            color: var(--text-primary);
            padding: 1.04rem 0;
            will-change: opacity;
        }

        .projects-panel-row {
            display: flex;
            gap: 0.92rem;
        }


        .projects-panel-body {
            flex: 1;
        }

        .projects-panel-name {
            font-family: 'Inconsolata', monospace;
            font-size: clamp(1.13rem, 2.8vw, 1.53rem);
            font-weight: 200;
            font-stretch: 100%;
            letter-spacing: -0.01em;
            color: var(--text-primary);
            line-height: 1.3;
            display: inline-block;
            margin: 0;
        }

        .projects-panel-link-arrow {
            display: inline-block;
            opacity: 0;
            will-change: opacity;
            vertical-align: middle;
            margin-left: 0.4rem;
            color: var(--text-primary);
            transition: color 0.15s ease;
        }

        .projects-panel-item:hover .projects-panel-link-arrow {
            opacity: 1;
            transform: translateX(0);
            color: var(--accent);
        }

        #contact-panel .projects-panel-link-arrow {
            opacity: 1;
        }

        #contact-panel .projects-panel-item:hover .projects-panel-link-arrow {
            opacity: 1;
        }

        .projects-panel-name.pressed ~ .projects-panel-link-arrow {
            opacity: 1;
            color: var(--accent);
        }

        .projects-panel-tags {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.46rem;
            margin-top: 0.35rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.69rem;
            color: var(--muted);
            letter-spacing: 0.05em;
        }

        /* ── Testimonials ── */
        .testimonials-list {
            display: flex;
            flex-direction: column;
            gap: 0;
        }

        .testimonial-item {
            display: block;
            text-decoration: none;
            color: inherit;
            position: relative;
            padding: 1.3rem 0 1.3rem 1.8rem;
            transition: opacity 0.18s ease;
        }

        .testimonials-list:hover .testimonial-item {
            opacity: 0.35;
        }

        .testimonials-list:hover .testimonial-item:hover {
            opacity: 1;
        }

        .testimonial-mark {
            position: absolute;
            top: 0.9rem;
            left: 0;
            font-family: 'Newsreader', serif;
            font-size: 2rem;
            line-height: 1;
            color: var(--accent);
            font-style: italic;
            font-weight: 300;
            pointer-events: none;
        }

        .testimonial-quote {
            font-family: 'Newsreader', serif;
            font-size: 1rem;
            font-style: italic;
            font-weight: 300;
            line-height: 1.55;
            color: var(--text-primary);
            margin: 0 0 0.85rem 0;
        }

        .testimonial-footer {
            display: flex;
            align-items: baseline;
            gap: 0.6rem;
            flex-wrap: wrap;
        }

        .testimonial-name {
            font-family: 'Inconsolata', monospace;
            font-size: 0.9rem;
            font-weight: 200;
            color: var(--text-primary);
            letter-spacing: -0.01em;
        }

        .testimonial-role {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.67rem;
            font-weight: 200;
            color: var(--muted);
            letter-spacing: 0.06em;
        }

        .testimonial-arrow {
            margin-left: auto;
            color: var(--muted);
            display: flex;
            align-items: center;
            transition: color 0.15s ease;
        }

        a.testimonial-item:hover .testimonial-arrow {
            color: var(--text-primary);
        }

        html.light .testimonial-quote,
        html.light .testimonial-name {
            color: #111111;
        }

        /* ── Project detail modal ── */
        @keyframes projCardIn {
            0%   { transform: perspective(900px) rotateY(8deg) scale(0.96); opacity: 0; }
            100% { transform: perspective(900px) rotateY(0deg) scale(1); opacity: 1; }
        }
        @keyframes projCardOut {
            0%   { transform: perspective(900px) rotateY(0deg) scale(1); opacity: 1; }
            100% { transform: perspective(900px) rotateY(8deg) scale(0.96); opacity: 0; }
        }

        .proj-modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 1100;
            pointer-events: none;
        }
        .proj-modal-overlay.open {
            pointer-events: auto;
        }

        /* Centering wrapper — holds [prev] [card] [next] in a row */
        .proj-modal-inner {
            position: absolute;
            left: 68%;
            top: 50%;
            transform: translateX(-50%) translateY(-50%);
            display: flex;
            align-items: center;
            gap: 2rem;
        }

        .proj-modal-card {
            position: relative;
            width: min(580px, calc(60vw - var(--frame) * 2));
            max-height: calc(100vh - var(--frame) * 2 - 4rem);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            background: #1a1a1a;
            border: 1px solid rgba(84, 67, 62, 0.28);
            opacity: 0;
            pointer-events: none;
            flex-shrink: 0;
        }
        .proj-modal-overlay.open .proj-modal-card {
            animation: projCardIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            pointer-events: auto;
        }
        .proj-modal-overlay.closing .proj-modal-card {
            animation: projCardOut 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
        }

        /* Outer carousel arrows — flanking the card */
        .proj-carousel-outer-btn {
            background: none;
            border: none;
            color: #fff;
            font-family: 'Inconsolata', monospace;
            font-weight: 200;
            font-size: 4rem;
            line-height: 1;
            cursor: pointer;
            padding: 0;
            opacity: 0;
            pointer-events: none;
            transition: color 0.15s ease, transform 0.12s ease;
            user-select: none;
            flex-shrink: 0;
        }
        .proj-modal-overlay.open .proj-carousel-outer-btn.visible {
            opacity: 1;
            pointer-events: auto;
        }
        .proj-carousel-outer-btn:hover { color: rgba(255,255,255,0.7); }
        .proj-carousel-outer-btn.clicked {
            color: var(--accent);
            transform: scale(0.82);
        }

        .proj-modal-close {
            position: absolute;
            top: 0.4rem;
            right: 0.4rem;
            z-index: 10;
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.85);
            font-size: 1.4rem;
            line-height: 1;
            cursor: pointer;
            padding: 0.2rem 0.4rem;
            transition: color 0.15s ease;
        }
        .proj-modal-close:hover { color: #fff; }

        .proj-modal-img {
            width: 100%;
            aspect-ratio: 16 / 9;
            background: var(--bg-navy);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        /* Coming soon placeholder */
        .proj-modal-img .img-coming-soon {
            font-family: 'JetBrains Mono', monospace;
            font-size: 2.4rem;
            letter-spacing: 0.3em;
            color: var(--muted);
            text-transform: uppercase;
            opacity: 0.4;
            user-select: none;
            display: block;
            width: calc(100% - 3rem);
            text-align: center;
        }

        /* Blurred backdrop — fills dead space around contained image */
        .proj-modal-img .img-backdrop {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: blur(22px) brightness(0.32) saturate(1.4);
            transform: scale(1.08);
            z-index: 0;
            display: block;
        }
        /* Main image — contained, sharp, on top */
        .proj-modal-img .img-main {
            position: relative;
            z-index: 1;
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
        }

        /* Portrait card variant — narrower than landscape, natural portrait ratio */
        .proj-modal-card.is-portrait {
            width: min(320px, calc(38vw - var(--frame) * 2));
        }
        .proj-modal-card.is-portrait .proj-modal-img {
            aspect-ratio: unset;
            height: auto;
        }
        .proj-modal-card.is-portrait .proj-modal-img .img-main {
            height: auto;
            object-fit: contain;
        }

        /* Carousel dots (inside image) */
        .proj-carousel-dots {
            position: absolute;
            bottom: 0.55rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 0.3rem;
            z-index: 5;
        }
        .proj-carousel-dot {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: rgba(255,255,255,0.3);
            transition: background 0.15s ease;
            flex-shrink: 0;
        }
        .proj-carousel-dot.active { background: rgba(255,255,255,0.9); }

        /* Image hover — dark overlay + "View" label */
        .proj-modal-img {
            cursor: zoom-in;
        }
        .proj-modal-img.no-image {
            cursor: default;
        }
        .proj-modal-img.no-image::before,
        .proj-modal-img.no-image::after {
            display: none;
        }
        .proj-modal-img::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0);
            transition: background 0.2s ease;
            z-index: 8;
            pointer-events: none;
        }
        .proj-modal-img::after {
            content: 'View';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Inconsolata', monospace;
            font-weight: 200;
            font-size: 1rem;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: rgba(255,255,255,0);
            z-index: 9;
            pointer-events: none;
            transition: color 0.2s ease;
        }
        .proj-modal-img:hover::before { background: rgba(0,0,0,0.38); }
        .proj-modal-img:hover::after  { color: rgba(255,255,255,0.9); }

        /* Lightbox */
        .img-lightbox {
            position: fixed;
            inset: 0;
            z-index: 1200;
            background: rgba(0,0,0,0);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3rem;
            pointer-events: none;
            transition: background 0.22s ease;
        }
        .img-lightbox.open {
            background: rgba(0,0,0,0.96);
            pointer-events: auto;
        }
        /* Wrapper tightly around the image — close btn anchors here */
        .img-lightbox-wrap {
            position: relative;
            display: inline-flex;
            line-height: 0;
            flex-shrink: 1;
        }
        .img-lightbox-img {
            max-width: min(90vw, 1400px);
            max-height: 88vh;
            object-fit: contain;
            display: block;
            opacity: 0;
            transform: scale(0.94);
            transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16,1,0.3,1);
        }
        .img-lightbox.open .img-lightbox-img {
            opacity: 1;
            transform: scale(1);
        }
        /* Close button — top-right above the image */
        .img-lightbox-close {
            position: absolute;
            top: -2.6rem;
            right: 0;
            z-index: 10;
            background: none;
            border: none;
            color: rgba(255,255,255,0.75);
            font-size: 1.5rem;
            line-height: 1;
            cursor: pointer;
            padding: 0.15rem 0.3rem;
            opacity: 0;
            transition: color 0.15s ease, transform 0.12s ease, opacity 0.22s ease;
        }
        .img-lightbox.open .img-lightbox-close {
            opacity: 1;
        }
        .img-lightbox-close:hover { color: #fff; }
        .img-lightbox-close.clicked {
            color: var(--accent);
            transform: scale(0.82);
        }
        .img-lightbox-arrow {
            background: none;
            border: none;
            color: rgba(255,255,255,0);
            font-family: 'Inconsolata', monospace;
            font-weight: 200;
            font-size: 4rem;
            line-height: 1;
            cursor: default;
            padding: 0;
            flex-shrink: 0;
            user-select: none;
            pointer-events: none;
            transition: color 0.15s ease, transform 0.12s ease;
        }
        .img-lightbox.open .img-lightbox-arrow.visible {
            color: #fff;
            cursor: pointer;
            pointer-events: auto;
        }
        .img-lightbox-arrow:hover { color: rgba(255,255,255,0.65); }
        .img-lightbox-arrow.clicked {
            color: var(--accent);
            transform: scale(0.82);
        }

        /* Non-image project items — now open modal with Coming soon */
        .projects-panel-item[data-modal]:not([data-img]):not([data-images]) {
            cursor: pointer;
        }

        .proj-modal-body {
            padding: 1.4rem 1.6rem 1.6rem;
        }
        .proj-modal-name {
            font-family: 'Inconsolata', monospace;
            font-size: clamp(1.2rem, 3vw, 1.6rem);
            font-weight: 200;
            color: var(--text-primary);
            letter-spacing: -0.01em;
            margin-bottom: 0.6rem;
        }
        .proj-modal-desc {
            font-family: 'Inter', sans-serif;
            font-size: 0.82rem;
            font-weight: 300;
            color: var(--muted);
            line-height: 1.6;
            margin-bottom: 1rem;
        }
        .proj-modal-tags {
            margin-top: 0;
        }

        html.light .proj-modal-card {
            background: #f5f5f5;
            border-color: rgba(0,0,0,0.1);
        }
        html.light .proj-modal-name { color: #111; }
        html.light .proj-modal-desc { color: #555; }
        html.light .proj-modal-close { color: rgba(0,0,0,0.35); }
        html.light .proj-modal-close:hover { color: #111; }

        .cta-buttons {
            display: flex;
            gap: 1rem;
            justify-content: flex-start;
            flex-wrap: wrap;
            animation: fadeInUp 0.8s ease 0.6s both;
        }

        .btn {
            padding: 1rem 2rem;
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: inline-block;
            position: relative;
            will-change: transform;
        }

        .btn-primary {
            background: var(--accent);
            color: var(--accent-on);
            box-shadow: 0 8px 24px rgba(15, 13, 13, 0.4);
            position: relative;
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 32px rgba(15, 20, 25, 0.5);
        }

        .btn-primary:active {
            transform: translateY(-1px);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-primary);
            border: 1px solid var(--ghost-border);
            font-family: 'Newsreader', serif;
            font-style: italic;
        }

        .btn-secondary:hover {
            background: var(--bg-navy);
            border-color: var(--accent);
            color: var(--text-primary);
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(15, 20, 25, 0.4);
        }

        .btn-secondary:active {
            transform: translateY(-1px);
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Section Styling */
        section {
            padding: 8rem 5%;
            max-width: 1400px;
            margin: 0 auto;
        }

        .section-title {
            font-family: 'Newsreader', serif;
            font-size: clamp(2.5rem, 5vw, 4rem);
            font-weight: 700;
            margin-bottom: 1rem;
            position: relative;
            display: inline-block;
        }

        .section-title::before {
            content: '';
            position: absolute;
            top: -20px;
            left: -20px;
            width: 60px;
            height: 60px;
            background: rgba(224, 124, 92, 0.3);
            border-radius: 50%;
            z-index: -1;
            opacity: 0.5;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
            border-radius: 2px;
        }

        .section-subtitle {
            font-size: 1.2rem;
            color: var(--muted);
            margin-bottom: 4rem;
            max-width: 600px;
        }

        /* About Section */
        .about-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: start;
        }

        .about-text h3 {
            font-family: 'Newsreader', serif;
            font-size: 1.8rem;
            margin-bottom: 1rem;
            color: var(--accent);
        }

        .about-text p {
            line-height: 1.8;
            margin-bottom: 1.5rem;
            color: var(--muted);
        }

        .skills {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-top: 2rem;
        }

        .skill-tag {
            padding: 0.5rem 1.25rem;
            background: var(--surface-high);
            color: var(--text-primary);
            border: 1px solid var(--ghost-border);
            border-radius: 0.75rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            font-weight: 500;
            letter-spacing: 0.04em;
            transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
            will-change: transform;
        }

        .skill-tag:hover {
            transform: translateY(-3px);
            border-color: var(--accent);
            background: rgba(255, 140, 66, 0.1);
        }

        .about-visual {
            position: relative;
            height: 500px;
            background: linear-gradient(135deg, var(--bg-navy), rgba(224, 124, 92, 0.2));
            border-radius: 20px;
            overflow: hidden;
            border: 1px solid var(--ghost-border);
            align-self: center;
            margin-top: -10rem;
        }

        .about-visual::before {
            content: 'YOUR PHOTO HERE';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Newsreader', serif;
            font-size: 2rem;
            font-weight: 700;
            color: var(--muted);
            text-align: center;
        }

        /* Portfolio Grid */
        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 2rem;
        }

        .portfolio-item {
            background: var(--bg-navy);
            border-radius: 20px;
            overflow: hidden;
            border: 1px solid var(--ghost-border);
            transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
            position: relative;
            will-change: transform;
        }


        .portfolio-item:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 50px rgba(15, 20, 25, 0.6);
            border-color: rgba(224, 124, 92, 0.5);
        }

        .portfolio-item:hover .portfolio-image {
            transform: scale(1.03);
        }

        .portfolio-image {
            width: 100%;
            height: 250px;
            background: linear-gradient(135deg, var(--bg-dark), rgba(224, 124, 92, 0.15));
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Newsreader', serif;
            font-size: 1.5rem;
            color: var(--muted);
            font-weight: 700;
            transition: transform 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .portfolio-content {
            padding: 2rem;
            position: relative;
            z-index: 2;
        }

        .portfolio-content h3 {
            font-family: 'Zen Kaku Gothic New', sans-serif;
            font-size: 1.5rem;
            font-weight: 300;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
            transition: color 0.3s ease;
        }

        .portfolio-item:hover .portfolio-content h3 {
            color: var(--accent);
        }

        .portfolio-category {
            font-size: 0.85rem;
            background: linear-gradient(135deg, #ff6b35, #e05520);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            margin-bottom: 1rem;
            display: inline-block;
        }

        .portfolio-content p {
            line-height: 1.6;
            color: var(--muted);
            transition: color 0.3s ease;
        }

        .portfolio-item:hover .portfolio-content p {
            color: var(--text-secondary);
        }

        /* Projects list component (App.tsx-style) */
        .projects-list-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 2.5rem;
        }

        .projects-list-symbols {
            font-family: 'JetBrains Mono', monospace;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--accent);
            min-width: 2ch;
        }

        .projects-list-title {
            margin: 0 !important;
            font-size: 0.8rem !important;
            letter-spacing: 0.18em !important;
        }

        .projects-list {
            display: flex;
            flex-direction: column;
        }

        .projects-list-item {
            display: block;
            text-decoration: none;
            color: var(--text-primary);
            padding: 1.4rem 0;
            border-bottom: 1px solid var(--ghost-border);
            transition: opacity 0.25s ease;
        }

        .projects-list-item:first-child {
            padding-top: 0;
        }

        .projects-list-item:last-child {
            border-bottom: none;
        }

        .projects-list:hover .projects-list-item {
            opacity: 0.3;
        }

        .projects-list:hover .projects-list-item:hover {
            opacity: 1;
        }

        .projects-list-row {
            display: flex;
            gap: 1.2rem;
        }

        .projects-list-num {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            color: var(--muted);
            padding-top: 0.6rem;
            min-width: 3.5ch;
            flex-shrink: 0;
        }

        .projects-list-body {
            flex: 1;
        }

        .projects-list-name {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
            font-size: clamp(2.2rem, 5vw, 3.8rem);
            font-weight: 100;
            line-height: 1.1;
            letter-spacing: -0.01em;
            color: var(--text-primary);
            display: inline;
            margin: 0;
        }

        .projects-list-link-arrow {
            display: inline-block;
            opacity: 0;
            transform: translateX(-6px);
            transition: opacity 0.18s ease, transform 0.18s ease;
            vertical-align: middle;
            margin-left: 0.5rem;
            color: var(--text-primary);
        }

        .projects-list-item:hover .projects-list-link-arrow {
            opacity: 1;
            transform: translateX(0);
        }

        .projects-list-tags {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.5rem;
            margin-top: 0.5rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--muted);
            letter-spacing: 0.06em;
        }

        .tag-dot {
            display: inline-block;
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: var(--surface-high);
            flex-shrink: 0;
        }

        /* Scramble spans are visual-only — pointer-events on parent h3 handles all clicks */
        .scramble-hover span {
            pointer-events: none;
        }

        /* Scramble char wiggle */
        .scramble-char-active {
            display: inline-block;
            color: #ff6b35;
            transform: scale(1.1);
        }

        /* Services Section */
        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 2rem;
        }

        .service-card {
            background: var(--bg-navy);
            border-radius: 20px;
            padding: 2rem;
            border: 1px solid var(--ghost-border);
            transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
            position: relative;
            overflow: hidden;
            will-change: transform;
        }


        .service-card:hover {
            border-color: rgba(224, 124, 92, 0.5);
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(15, 20, 25, 0.5);
        }

        .service-card:hover .service-icon {
            transform: scale(1.05);
            background: rgba(224, 124, 92, 0.2);
            border-color: rgba(224, 124, 92, 0.4);
        }

        .service-icon {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            background: rgba(224, 124, 92, 0.12);
            border: 1px solid rgba(224, 124, 92, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            color: rgba(240, 244, 248, 0.92);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
            overflow: hidden;
        }

        .service-icon::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            height: 40%;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
            border-radius: 12px;
        }

        .service-icon svg {
            width: 28px;
            height: 28px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .service-card h4 {
            font-family: 'Newsreader', serif;
            font-size: 1.35rem;
            margin-bottom: 0.75rem;
            color: var(--text-primary);
        }

        .service-card p {
            color: var(--muted);
            line-height: 1.6;
            font-size: 0.95rem;
        }

        /* Schedule Modal - centered */
        .schedule-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(8px);
            z-index: 2000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.35s ease, visibility 0.35s ease;
        }
        .schedule-overlay.open {
            opacity: 1;
            visibility: visible;
        }
        .schedule-panel {
            background: linear-gradient(145deg, var(--bg-navy) 0%, var(--bg-dark) 100%);
            border-radius: 24px;
            padding: 3rem 2.5rem;
            max-width: 420px;
            width: 100%;
            position: relative;
            box-shadow:
                0 0 0 1px rgba(224, 124, 92, 0.2),
                0 25px 80px rgba(0, 0, 0, 0.5);
            transform: scale(0.9) translateY(20px);
            opacity: 0;
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease, box-shadow 0.3s ease;
        }
        .schedule-panel:hover {
            box-shadow:
                0 0 0 1px rgba(224, 124, 92, 0.35),
                0 25px 80px rgba(0, 0, 0, 0.55);
        }
        .schedule-overlay.open .schedule-panel {
            transform: scale(1) translateY(0);
            opacity: 1;
        }
        .schedule-panel-close {
            position: absolute;
            top: 1.25rem;
            right: 1.25rem;
            width: 36px;
            height: 36px;
            border: none;
            background: rgba(139, 156, 181, 0.15);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 1.4rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s, color 0.2s;
        }
        .schedule-panel-close:hover {
            background: var(--accent);
            color: white;
        }
        .schedule-panel h2 {
            font-family: 'Syne', sans-serif;
            font-size: 1.85rem;
            margin-bottom: 0.5rem;
            padding-right: 2.5rem;
        }
        .schedule-panel p {
            color: var(--muted);
            margin-bottom: 2rem;
            line-height: 1.6;
        }
        .btn-schedule {
            font-size: 1.1rem;
            padding: 1rem 2rem;
            width: 100%;
            text-align: center;
            border-radius: 12px;
        }

        /* Testimonials */
        .testimonials-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }

        .testimonial-card {
            background: var(--bg-navy);
            padding: 2rem;
            border-radius: 20px;
            border: 1px solid var(--ghost-border);
            position: relative;
            transition: transform 0.3s ease, border-color 0.3s ease;
            will-change: transform;
        }

        .testimonial-card:hover {
            transform: translateY(-3px);
            border-color: rgba(224, 124, 92, 0.3);
        }

        .testimonial-card::before {
            content: '"';
            font-family: 'Newsreader', serif;
            font-size: 5.5rem;
            position: absolute;
            top: -12px;
            left: 8px;
            color: var(--accent);
            opacity: 0.2;
        }

        .testimonial-text {
            font-style: italic;
            line-height: 1.7;
            margin-bottom: 1.5rem;
            color: var(--muted);
        }

        .testimonial-author {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .author-avatar {
            width: 50px;
            height: 50px;
            min-width: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #ff6b35, #e05520);
            overflow: hidden;
            border: 2px solid rgba(224, 124, 92, 0.3);
            box-shadow: 0 4px 12px rgba(15, 20, 25, 0.35);
            transition: all 0.3s ease;
        }

        .testimonial-card:hover .author-avatar {
            transform: scale(1.1);
            box-shadow: 0 6px 16px rgba(15, 20, 25, 0.45);
            border-color: rgba(224, 124, 92, 0.6);
        }

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

        .author-info h5 {
            font-weight: 600;
            margin-bottom: 0.2rem;
            color: var(--text-primary);
        }

        .author-info p {
            font-size: 0.9rem;
            color: var(--muted);
        }
        .author-info a {
            color: inherit;
            text-decoration: none;
            transition: color 0.3s;
        }
        .author-info a:hover {
            color: var(--accent);
        }

        /* Contact Form */
        .contact-content {
            max-width: 700px;
            margin: 0 auto;
        }

        .form-group {
            margin-bottom: 2rem;
        }

        label {
            display: block;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
        }

        input, textarea {
            width: 100%;
            padding: 1rem;
            user-select: text;
            background: linear-gradient(135deg, var(--bg-navy) 0%, rgba(26, 35, 50, 0.8) 100%);
            border: 2px solid rgba(139, 156, 181, 0.2);
            border-radius: 15px;
            font-family: 'DM Sans', sans-serif;
            font-size: 1rem;
            color: var(--text-primary);
            transition: all 0.3s ease;
            position: relative;
        }

        input::placeholder,
        textarea::placeholder {
            color: var(--muted);
        }

        input:focus, textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow:
                0 0 0 4px rgba(224, 124, 92, 0.1),
                0 0 20px rgba(255, 140, 66, 0.2);
            transform: translateY(-2px);
        }

        input:hover, textarea:hover {
            border-color: rgba(224, 124, 92, 0.4);
        }

        textarea {
            min-height: 150px;
            resize: vertical;
        }

        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
        }

        .form-message {
            margin-top: 1rem;
            padding: 1rem;
            border-radius: 15px;
            text-align: center;
            font-weight: 500;
            display: none;
            animation: messageSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes messageSlideIn {
            from {
                opacity: 0;
                transform: translateY(-10px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .form-message.success {
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.25));
            border: 2px solid rgba(76, 175, 80, 0.6);
            color: #4CAF50;
            display: block;
            box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
        }

        .form-message.error {
            background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(244, 67, 54, 0.25));
            border: 2px solid rgba(244, 67, 54, 0.6);
            color: #f44336;
            display: block;
            box-shadow: 0 0 20px rgba(244, 67, 54, 0.2);
        }

        .contact-info {
            display: flex;
            gap: 2rem;
            margin-top: 3rem;
            justify-content: center;
            flex-wrap: wrap;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
            transform: translateX(-0.75rem);
        }

        .contact-item {
            text-align: center;
            transition: transform 0.3s ease;
        }

        .contact-item:hover {
            transform: translateY(-5px);
        }

        .contact-item-icon {
            width: 60px;
            height: 60px;
            background: radial-gradient(circle, rgba(255, 140, 66, 0.2), rgba(224, 124, 92, 0.1));
            border: 2px solid rgba(224, 124, 92, 0.3);
            border-radius: 50%;
            margin: 0 auto 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(240, 244, 248, 0.92);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
            overflow: hidden;
        }

        .contact-item-icon::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            height: 50%;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
            border-radius: 50%;
        }

        .contact-item:hover .contact-item-icon {
            transform: scale(1.1) rotate(5deg);
            background: radial-gradient(circle, rgba(255, 140, 66, 0.3), rgba(224, 124, 92, 0.2));
            border-color: rgba(224, 124, 92, 0.6);
            box-shadow: 0 6px 20px rgba(15, 20, 25, 0.4);
        }

        .contact-item-icon svg {
            width: 26px;
            height: 26px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .contact-item p {
            color: var(--muted);
        }

        .contact-item p strong {
            color: var(--text-primary);
        }

        .contact-item .selectable {
            user-select: text;
            cursor: text;
        }

        /* Footer */
        #copyright {
            position: fixed;
            bottom: calc(var(--frame) - 1rem);
            left: var(--frame);
            font-family: 'Courier New', Monaco, Consolas, 'Lucida Console', monospace;
            font-size: clamp(0.55rem, 0.75vw, 0.72rem);
            font-weight: 200;
            letter-spacing: 0.08em;
            color: var(--muted);
            z-index: 100;
            pointer-events: none;
            margin: 0;
        }

        footer {
            background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-navy) 100%);
            color: var(--text-primary);
            padding: 3rem 5%;
            text-align: center;
            border-top: 1px solid var(--ghost-border);
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
            position: relative;
        }

        footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255, 140, 66, 0.3), transparent);
        }

        footer > * {
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        footer p {
            color: var(--muted);
        }

        .social-links {
            display: flex;
            gap: 1.5rem;
            justify-content: center;
            margin-bottom: 2rem;
        }

        .social-links a {
            padding: 0.5rem 1.25rem;
            background: linear-gradient(135deg, rgba(139, 156, 181, 0.1), rgba(139, 156, 181, 0.05));
            border: 1px solid var(--ghost-border);
            border-radius: 50px;
            color: var(--muted);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
            overflow: hidden;
        }

        .social-links a::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 140, 66, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .social-links a:hover {
            background: linear-gradient(135deg, #ff6b35, #e05520);
            border-color: var(--accent);
            color: white;
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 10px 25px rgba(15, 20, 25, 0.45);
        }

        .social-links a:hover::before {
            left: 100%;
        }

        /* Responsive */
        @media (max-width: 768px) {
            :root {
                --frame: 12px;
            }

            /* Modal: full-width on mobile */
            .proj-modal-inner {
                left: 0;
                right: 0;
                width: 100%;
                transform: translateY(-50%);
                gap: 0.75rem;
                padding: 0 var(--frame);
                box-sizing: border-box;
            }
            .proj-modal-card {
                flex: 1;
                min-width: 0;
                width: auto;
            }
            .proj-modal-card.is-portrait {
                width: auto;
            }
            .proj-carousel-outer-btn {
                font-size: 2.5rem;
            }

            /* Loader text readable on mobile */
            .loader-letter {
                font-size: clamp(1.1rem, 5vw, 1.6rem);
            }

            /* Panels: full-width at bottom on mobile */
            .projects-panel {
                display: block;
                position: fixed;
                bottom: calc(var(--frame) * 2 + 1.5rem);
                left: calc(var(--frame) * 2);
                right: calc(var(--frame) * 2);
                width: auto;
                max-height: 36vh;
            }

            .projects-panel-item {
                padding: 0.6rem 0;
            }

            .projects-panel-name {
                font-size: 1rem;
            }

            .projects-panel-tags {
                font-size: 0.6rem;
                gap: 0.3rem;
                margin-top: 0.2rem;
            }

            .projects-panel-header {
                padding-bottom: 0.5rem;
            }

            .projects-panel-list {
                mask-image: none;
                -webkit-mask-image: none;
            }

            header {
                padding: 1rem 5%;
                align-items: center;
            }

            .header-url-removed {
                display: none;
            }


            /* Mobile: make "Digital Magic" highlight a true underline */
            .hero .highlight::after {
                bottom: 0.05em;
                left: -0.12em;
                right: -0.12em;
                height: 0.22em;
                border-radius: 999px;
                transform: none;
                background: rgba(224, 124, 92, 0.45);
                animation: none;
            }

            /* Scale down sparkles on mobile */
            .hero .highlight .sparkle {
                transform: scale(0.7);
            }

            .sparkle-1 { top: -4px; right: 8%; }
            .sparkle-2 { bottom: -2px; left: 5%; }
            .sparkle-3 { top: 0px; right: 45%; }

            /* Hero-menu handles all navigation on mobile — burger not needed */
            .nav-toggle {
                display: none;
            }

            header nav {
                display: none;
            }

            .hero {
                padding: calc(var(--frame) + 4rem) calc(var(--frame) + 0.5rem) 0 calc(var(--frame) + 0.75rem);
            }

            .hero h1 {
                font-size: clamp(1.90rem, 7.79vw, 2.46rem);
            }

            .about-content {
                grid-template-columns: 1fr;
            }

            /* On mobile: show image first, then text ("bubbles") */
            .about-visual {
                height: 280px;
                margin-top: 1.5rem;
                align-self: stretch;
                order: 1;
            }

            .about-text {
                order: 2;
            }

            /* Mobile: make skill tags a nicer grid (no awkward vertical stacking) */
            .skills {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.75rem;
                margin-top: 1.25rem;
            }

            .skill-tag {
                padding: 0.6rem 0.85rem;
                text-align: center;
                font-size: 0.95rem;
                line-height: 1.15;
                white-space: normal;
                word-break: break-word;
            }

            /* A little intentional "scramble" for visual interest */
            .skills .skill-tag:nth-child(3n) {
                grid-column: 1 / -1;
            }

            .portfolio-grid {
                grid-template-columns: 1fr;
            }

            /* Scale portfolio card mockups to fit mobile */
            .portfolio-image {
                height: 220px;
            }

            .portfolio-image > div:first-child {
                transform: scale(0.85);
                transform-origin: center center;
            }

            .services-grid,
            .testimonials-grid {
                grid-template-columns: 1fr;
            }

            .contact-info {
                transform: none;
            }

            section {
                padding: 5rem 5%;
            }

            .cta-buttons {
                flex-direction: column;
                align-items: stretch;
            }

            .schedule-fab {
                right: 0.75rem;
                bottom: 0.75rem;
                padding: 0.55rem 0.9rem;
                font-size: 0.75rem;
            }


            /* Tighter section spacing on mobile */
            .section-subtitle {
                font-size: 1rem;
                margin-bottom: 2.5rem;
            }

            /* Inputs 16px min to prevent iOS zoom */
            input, textarea {
                font-size: 16px;
            }

            /* About visual smaller on mobile */
            .about-visual::before {
                font-size: 1.2rem;
            }

            /* Services cards padding */
            .service-card {
                padding: 1.5rem;
            }

            /* Geo mesh: fits within mobile viewport */
            #geo-mesh {
                width: 200px;
                height: 200px;
                left: calc(var(--frame) + 0.5rem);
                bottom: calc(var(--frame) + 0.5rem);
            }

            /* Mascot: smaller on mobile */
            #mascot {
                width: 100px;
                height: 100px;
                bottom: calc(var(--frame) + 1rem);
                right: calc(var(--frame) + 1rem);
            }
            #ghost {
                width: 100px;
                height: 100px;
            }
        }

        /* Extra small screens */
        @media (max-width: 380px) {
            .hero h1 {
                font-size: 1.90rem;
            }

            section {
                padding: 3.5rem 4%;
            }

            .portfolio-image > div:first-child {
                transform: scale(0.72);
            }

            .skills {
                grid-template-columns: 1fr;
            }

            .skills .skill-tag:nth-child(3n) {
                grid-column: auto;
            }

            .chatbot-window {
                left: 0.5rem;
                right: 0.5rem;
            }

            /* Hide sparkles on very small screens */
            .hero .highlight .sparkle {
                display: none;
            }
        }

        /* Laptop / short-viewport fix: panel was growing above the hero-menu */
        @media (min-width: 769px) and (max-height: 900px) {
            .projects-panel {
                max-height: min(40vh, 300px);
            }

            .projects-panel-list {
                max-height: min(calc(5 * 5.3rem), calc(min(40vh, 300px) - 3.5rem));
            }
        }

        /* Optimized scroll reveal animations */
        .reveal {
            opacity: 0;
            transform: translateY(40px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }

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

        .skip-link {
            position: absolute;
            top: -100px;
            left: 20px;
            padding: 1rem 1.5rem;
            background: var(--accent);
            color: white;
            font-weight: 600;
            text-decoration: none;
            border-radius: 8px;
            z-index: 10000;
            transition: top 0.3s ease;
        }
        .skip-link:focus {
            top: 20px;
        }


        /* Schedule floating trigger - Enhanced */
@keyframes scheduleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes scheduleGlow {
    0%, 100% {
        box-shadow:
            0 8px 32px rgba(15, 20, 25, 0.45),
            inset 0 1px 1px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 12px 48px rgba(15, 20, 25, 0.55),
            inset 0 1px 1px rgba(255, 255, 255, 0.15);
    }
}

@keyframes scheduleShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 150%;
    }
}
        .schedule-fab {
            position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: .75rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b35 0%, #e05520 50%, #ff6b35 100%);
    background-size: 200% 200%;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    z-index: 999;
    position: fixed;
    overflow: hidden;
    animation: scheduleFloat 3s ease-in-out infinite, scheduleGlow 2s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
}

.schedule-fab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: scheduleShine 3s infinite;
}

.schedule-fab::after {
    content: '';
    margin-right: 0.5rem;
    font-size: 1.1rem;
    display: inline-block;
    animation: none;
}

.schedule-fab:hover {
    transform: translateY(-4px) scale(1.05);
    background-position: 100% 50%;
    box-shadow:
        0 16px 48px rgba(15, 20, 25, 0.55),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    animation: none;
}

.schedule-fab:active {
    transform: translateY(-2px) scale(1.02);
}

        /* Code entry — bottom right */
        #code-entry {
            position: fixed;
            bottom: var(--frame);
            right: calc(var(--frame) + 0.5em);
            z-index: 1100;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.55rem;
        }

        #code-trigger {
            font-family: 'Courier New', Monaco, Consolas, 'Lucida Console', monospace;
            font-size: clamp(0.62rem, 0.9vw, 0.82rem);
            font-weight: 200;
            letter-spacing: 0.08em;
            line-height: 2.2;
            text-transform: uppercase;
            color: #fff;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            opacity: 0.55;
            transition: opacity 0.15s ease;
        }

        #code-trigger:hover,
        #code-trigger[aria-expanded="true"] {
            opacity: 1;
        }

        #code-box {
            opacity: 0;
            transform: translateY(6px);
            pointer-events: none;
            transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }

        #code-box.open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        #code-input {
            background: none;
            border: none;
            border-bottom: 1px solid rgba(255, 255, 255, 0.55);
            color: #fff;
            font-family: 'Courier New', Monaco, Consolas, 'Lucida Console', monospace;
            font-size: 0.78rem;
            font-weight: 200;
            letter-spacing: 0.18em;
            padding: 0.25rem 0;
            width: 9ch;
            text-align: right;
            outline: none;
            box-shadow: none;
            caret-color: #fff;
            -webkit-appearance: none;
            appearance: none;
            border-radius: 0;
        }

        #code-input::placeholder {
            color: rgba(255, 255, 255, 0.2);
            letter-spacing: 0.25em;
        }

        /* Chatbot Widget */
        .chatbot-container {
            position: fixed;
            bottom: 1.5rem;
            left: 1.5rem;
            z-index: 998;
        }

        .chatbot-button {
            width: 70px;
            height: 90px;
            border: none;
            background: transparent;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .chatbot-button:hover {
            transform: scale(1.15);
        }

        .chatbot-button:hover .speech-bubble {
            opacity: 1;
            transform: translateY(-2px);
        }

        .chatbot-button:hover .robot-head {
            animation: robotHeadTilt 0.4s ease-in-out;
        }

        .chatbot-button:hover .robot-arm.left {
            animation: robotArmWaveLeft 0.6s ease-in-out infinite;
        }

        .chatbot-button:hover .robot-arm.right {
            animation: robotArmWaveRight 0.6s ease-in-out infinite 0.15s;
        }

        /* When chatbot is open, move robot to the side */
        .chatbot-container.active .chatbot-button {
            transform: translateX(-30px) scale(0.85) rotate(-10deg);
        }

        .chatbot-container.active .chatbot-button .speech-bubble {
            opacity: 0;
            pointer-events: none;
        }

        .chatbot-container.active .robot {
            animation: robotWave 0.6s ease-in-out;
        }

        @keyframes robotWave {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-15deg); }
            75% { transform: rotate(15deg); }
        }

        @keyframes robotHeadTilt {
            0%, 100% { transform: rotate(0deg); }
            30% { transform: rotate(-8deg) translateY(-1px); }
            70% { transform: rotate(5deg); }
        }

        @keyframes robotArmWaveLeft {
            0%, 100% { transform: rotate(0deg); }
            50% { transform: rotate(-25deg) translateX(-2px); }
        }

        @keyframes robotArmWaveRight {
            0%, 100% { transform: rotate(0deg); }
            50% { transform: rotate(25deg) translateX(2px); }
        }

        /* Speech bubble */
        .speech-bubble {
            position: absolute;
            bottom: calc(100% - 5px);
            left: calc(100% - 10px);
            transform: translateY(8px);
            background: #ffffff;
            color: #1A2332;
            padding: 8px 14px;
            border-radius: 14px 14px 14px 4px;
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            pointer-events: none;
            border: none;
            box-shadow:
                0 4px 16px rgba(0, 0, 0, 0.15),
                0 1px 4px rgba(0, 0, 0, 0.1);
        }

        /* Tail pointing down-left toward the robot */
        .speech-bubble::before {
            content: '';
            position: absolute;
            bottom: -6px;
            left: 6px;
            width: 0;
            height: 0;
            border-left: 6px solid #ffffff;
            border-right: 6px solid transparent;
            border-top: 6px solid #ffffff;
            border-bottom: 6px solid transparent;
            border-radius: 0 0 0 2px;
        }

        .speech-bubble::after {
            display: none;
        }

        /* Robot container */
        .robot {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            animation: robotFloat 3s ease-in-out infinite;
        }

        @keyframes robotFloat {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-4px); }
        }

        /* Robot antenna */
        .robot-antenna {
            width: 3px;
            height: 10px;
            background: #1A2332;
            border-radius: 2px;
            position: relative;
            margin-bottom: 2px;
            animation: antennaSway 2.5s ease-in-out infinite;
            transform-origin: bottom center;
        }

        @keyframes antennaSway {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(6deg); }
            75% { transform: rotate(-6deg); }
        }

        .robot-antenna::after {
            content: '';
            position: absolute;
            top: -5px;
            left: 50%;
            transform: translateX(-50%);
            width: 6px;
            height: 6px;
            background: linear-gradient(135deg, #ff6b35 0%, #e05520 100%);
            border-radius: 50%;
            box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
            animation: antennaPulse 2s ease-in-out infinite;
        }

        @keyframes antennaPulse {
            0%, 100% { opacity: 0.85; }
            50% { opacity: 1; }
        }

        /* Robot head */
        .robot-head {
            width: 36px;
            height: 32px;
            background: linear-gradient(135deg, #ff6b35 0%, #e05520 100%);
            border-radius: 8px;
            border: 2px solid #1A2332;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            box-shadow:
                0 0 20px rgba(255, 140, 66, 0.6),
                0 4px 16px rgba(255, 140, 66, 0.4),
                inset 0 2px 4px rgba(255, 255, 255, 0.4),
                inset 0 -2px 4px rgba(224, 124, 92, 0.3);
            transition: transform 0.3s ease;
        }

        /* Add shine effect to head */
        .robot-head::before {
            content: '';
            position: absolute;
            top: 3px;
            left: 4px;
            right: 4px;
            height: 8px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
            border-radius: 4px;
            pointer-events: none;
        }

        /* Robot eyes */
        .robot-eyes {
            display: flex;
            gap: 8px;
            margin-top: 2px;
        }

        .robot-eye {
            width: 7px;
            height: 7px;
            background: radial-gradient(circle at 30% 30%, #2C3E50 0%, #1A2332 100%);
            border-radius: 50%;
            position: relative;
            box-shadow:
                inset 0 1px 2px rgba(0, 0, 0, 0.4),
                0 0 3px rgba(74, 144, 226, 0.3);
            animation: eyeGlow 3s ease-in-out infinite, eyeBlink 4s ease-in-out infinite;
        }

        .robot-eye::after {
            content: '';
            position: absolute;
            top: 1.5px;
            left: 1.5px;
            width: 2.5px;
            height: 2.5px;
            background: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0.6) 100%);
            border-radius: 50%;
            opacity: 0.9;
        }

        @keyframes eyeGlow {
            0%, 100% {
                box-shadow:
                    inset 0 1px 2px rgba(0, 0, 0, 0.4),
                    0 0 3px rgba(74, 144, 226, 0.3);
            }
            50% {
                box-shadow:
                    inset 0 1px 2px rgba(0, 0, 0, 0.4),
                    0 0 8px rgba(74, 144, 226, 0.6);
            }
        }

        @keyframes eyeBlink {
            0%, 42%, 46%, 100% { transform: scaleY(1); }
            44% { transform: scaleY(0.1); }
        }

        /* Robot mouth */
        .robot-mouth {
            width: 14px;
            height: 3px;
            background: #1A2332;
            border-radius: 2px;
            margin-top: 1px;
            animation: mouthTalk 3.5s ease-in-out infinite;
        }

        @keyframes mouthTalk {
            0%, 40%, 60%, 100% { width: 14px; height: 3px; border-radius: 2px; }
            45%, 55% { width: 10px; height: 5px; border-radius: 50%; }
        }

        /* Robot body */
        .robot-body {
            width: 40px;
            height: 28px;
            background: linear-gradient(135deg, #ff6b35 0%, #e05520 100%);
            border-radius: 6px;
            border: 2px solid #1A2332;
            position: relative;
            box-shadow:
                0 0 15px rgba(255, 140, 66, 0.4),
                0 4px 12px rgba(255, 140, 66, 0.3),
                inset 0 2px 3px rgba(255, 255, 255, 0.3),
                inset 0 -2px 3px rgba(224, 124, 92, 0.3);
            animation: bodyBreathe 3s ease-in-out infinite;
        }

        @keyframes bodyBreathe {
            0%, 100% { transform: scaleX(1); }
            50% { transform: scaleX(1.03); }
        }

        /* Control panel on body */
        .robot-body::before {
            content: 'T';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Newsreader', serif;
            font-size: 16px;
            font-weight: 900;
            color: #1A2332;
            text-shadow:
                0 1px 2px rgba(0, 0, 0, 0.3),
                0 0 8px rgba(255, 255, 255, 0.4);
            line-height: 1;
        }

        /* Indicator light on body */
        .robot-body::after {
            content: '';
            position: absolute;
            top: 4px;
            right: 4px;
            width: 4px;
            height: 4px;
            background: #4CAF50;
            border-radius: 50%;
            box-shadow:
                0 0 4px rgba(76, 175, 80, 0.8),
                0 0 8px rgba(76, 175, 80, 0.4);
            animation: indicatorBlink 1.5s ease-in-out infinite;
        }

        @keyframes indicatorBlink {
            0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(76, 175, 80, 0.8), 0 0 8px rgba(76, 175, 80, 0.4); }
            50% { opacity: 0.3; box-shadow: 0 0 2px rgba(76, 175, 80, 0.4), 0 0 4px rgba(76, 175, 80, 0.2); }
        }

        /* Robot arms */
        .robot-arms {
            position: absolute;
            top: 44px;
            width: 100%;
            display: flex;
            justify-content: space-between;
            pointer-events: none;
        }

        .robot-arm {
            width: 6px;
            height: 20px;
            background: linear-gradient(135deg, #1A2332 0%, #2C3E50 100%);
            border-radius: 3px;
            box-shadow:
                0 2px 6px rgba(0, 0, 0, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
            transform-origin: top center;
            transition: transform 0.3s ease;
        }

        .robot-arm.left {
            position: absolute;
            left: -2px;
            animation: armSwingLeft 3s ease-in-out infinite;
        }

        .robot-arm.right {
            position: absolute;
            right: -2px;
            animation: armSwingRight 3s ease-in-out infinite 0.3s;
        }

        @keyframes armSwingLeft {
            0%, 100% { transform: rotate(3deg); }
            50% { transform: rotate(-5deg); }
        }

        @keyframes armSwingRight {
            0%, 100% { transform: rotate(-3deg); }
            50% { transform: rotate(5deg); }
        }

        /* Robot legs */
        .robot-legs {
            display: flex;
            gap: 8px;
            margin-top: 2px;
        }

        .robot-leg {
            width: 10px;
            height: 14px;
            background: linear-gradient(180deg, #1A2332 0%, #2C3E50 100%);
            border-radius: 0 0 4px 4px;
            box-shadow:
                0 2px 8px rgba(0, 0, 0, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
            position: relative;
            animation: legTap 3s ease-in-out infinite;
        }

        .robot-leg:last-child {
            animation-delay: 0.5s;
        }

        @keyframes legTap {
            0%, 40%, 100% { transform: translateY(0); }
            20% { transform: translateY(2px); }
        }

        .robot-leg::after {
            content: '';
            position: absolute;
            bottom: 2px;
            left: 50%;
            transform: translateX(-50%);
            width: 6px;
            height: 3px;
            background: rgba(255, 140, 66, 0.3);
            border-radius: 2px;
        }

        .chatbot-window {
            position: fixed;
            bottom: 90px;
            left: 1.5rem;
            width: 380px;
            max-width: calc(100vw - 3rem);
            height: 500px;
            max-height: calc(100vh - 120px);
            background: linear-gradient(145deg, var(--bg-navy) 0%, var(--bg-dark) 100%);
            border-radius: 20px;
            border: 1px solid var(--ghost-border);
            box-shadow:
                0 0 0 2px rgba(224, 124, 92, 0.2),
                0 20px 60px rgba(0, 0, 0, 0.5);
            display: none;
            flex-direction: column;
            overflow: hidden;
            backdrop-filter: blur(20px);
            transform: scale(0.8) translateX(-50px) translateY(30px) rotate(-5deg);
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .chatbot-window.open {
            display: flex;
            transform: scale(1) translateX(0) translateY(0) rotate(0deg);
            opacity: 1;
            box-shadow:
                0 0 0 2px rgba(224, 124, 92, 0.3),
                0 0 40px rgba(255, 140, 66, 0.3),
                0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .chatbot-header {
            padding: 1.25rem 1.5rem;
            background: rgba(15, 20, 25, 0.6);
            border-bottom: 1px solid rgba(139, 156, 181, 0.15);
            display: flex;
            align-items: center;
            justify-content: space-between;
            opacity: 0;
            transform: translateY(-10px);
            transition: all 0.4s ease 0.2s;
        }

        .chatbot-window.open .chatbot-header {
            opacity: 1;
            transform: translateY(0);
        }

        .chatbot-header h3 {
            font-family: 'Newsreader', serif;
            font-size: 1.1rem;
            color: var(--text-primary);
            margin: 0;
        }

        .chatbot-status {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: var(--muted);
        }

        .chatbot-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #4CAF50;
            animation: statusPulse 2s ease-in-out infinite;
        }

        @keyframes statusPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .chatbot-close {
            background: transparent;
            border: none;
            color: var(--muted);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s ease;
        }

        .chatbot-close:hover {
            background: rgba(139, 156, 181, 0.15);
            color: var(--text-primary);
        }

        .chatbot-messages {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.4s ease 0.3s;
        }

        .chatbot-window.open .chatbot-messages {
            opacity: 1;
            transform: translateY(0);
        }

        .chatbot-message {
            display: flex;
            gap: 0.75rem;
            animation: messageSlideIn 0.3s ease;
        }

        @keyframes messageSlideIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .chatbot-message.user {
            flex-direction: row-reverse;
        }

        .chatbot-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            font-weight: 700;
        }

        .chatbot-message.bot .chatbot-avatar {
            width: 28px;
            height: 28px;
            background: linear-gradient(135deg, #ff6b35 0%, #e05520 100%);
            border: 2px solid #1A2332;
            border-radius: 6px;
            color: var(--accent);
            font-size: 0;
            position: relative;
            overflow: visible;
            box-shadow:
                0 0 8px rgba(255, 140, 66, 0.3),
                0 2px 6px rgba(255, 140, 66, 0.2),
                inset 0 1px 3px rgba(255, 255, 255, 0.3),
                inset 0 -1px 3px rgba(224, 124, 92, 0.2);
        }

        /* Shine effect on avatar head */
        .chatbot-message.bot .chatbot-avatar::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 3px;
            right: 3px;
            height: 6px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
            border-radius: 3px;
            pointer-events: none;
            z-index: 2;
        }

        /* Mini robot antenna on avatar */
        .chatbot-message.bot .chatbot-avatar::after {
            content: '';
            position: absolute;
            top: -6px;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            height: 6px;
            background: #1A2332;
            border-radius: 1px;
        }

        /* Antenna tip glow */
        .chatbot-message.bot .chatbot-avatar .avatar-antenna-tip {
            position: absolute;
            top: -11px;
            left: 50%;
            transform: translateX(-50%);
            width: 5px;
            height: 5px;
            background: linear-gradient(135deg, #ff6b35 0%, #e05520 100%);
            border-radius: 50%;
            z-index: 3;
            box-shadow:
                0 0 6px rgba(255, 140, 66, 0.5),
                0 0 10px rgba(255, 140, 66, 0.2);
            animation: antennaPulse 2s ease-in-out infinite;
        }

        /* Robot eyes container */
        .chatbot-message.bot .chatbot-avatar .avatar-eyes {
            position: absolute;
            top: 7px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
            z-index: 1;
        }

        /* Robot eyes */
        .chatbot-message.bot .chatbot-avatar .avatar-eye {
            width: 5px;
            height: 5px;
            background: radial-gradient(circle at 30% 30%, #2C3E50 0%, #1A2332 100%);
            border-radius: 50%;
            position: relative;
            box-shadow:
                inset 0 1px 1px rgba(0, 0, 0, 0.3),
                0 0 2px rgba(74, 144, 226, 0.2);
            animation: eyeGlow 3s ease-in-out infinite;
        }

        /* Eye highlights */
        .chatbot-message.bot .chatbot-avatar .avatar-eye::after {
            content: '';
            position: absolute;
            top: 1px;
            left: 1px;
            width: 2px;
            height: 2px;
            background: white;
            border-radius: 50%;
            opacity: 0.8;
        }

        /* Robot mouth */
        .chatbot-message.bot .chatbot-avatar .avatar-mouth {
            position: absolute;
            bottom: 5px;
            left: 50%;
            transform: translateX(-50%);
            width: 10px;
            height: 2px;
            background: #1A2332;
            border-radius: 1px;
            z-index: 1;
        }

        /* User avatar - person silhouette design */
        .chatbot-message.user .chatbot-avatar {
            background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
            border: 2px solid rgba(74, 144, 226, 0.4);
            border-radius: 50%;
            color: transparent;
            position: relative;
            overflow: hidden;
            box-shadow:
                0 0 12px rgba(74, 144, 226, 0.3),
                0 2px 8px rgba(74, 144, 226, 0.2),
                inset 0 2px 3px rgba(255, 255, 255, 0.3);
        }

        /* User head circle */
        .chatbot-message.user .chatbot-avatar::before {
            content: '';
            position: absolute;
            top: 6px;
            left: 50%;
            transform: translateX(-50%);
            width: 10px;
            height: 10px;
            background: rgba(255, 255, 255, 0.85);
            border-radius: 50%;
        }

        /* User body/shoulders */
        .chatbot-message.user .chatbot-avatar::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            width: 20px;
            height: 12px;
            background: rgba(255, 255, 255, 0.85);
            border-radius: 10px 10px 0 0;
        }

        .chatbot-text {
            flex: 1;
            padding: 0.75rem 1rem;
            border-radius: 12px;
            line-height: 1.5;
            font-size: 0.9rem;
        }

        .chatbot-message.bot .chatbot-text {
            background: rgba(26, 35, 50, 0.6);
            color: var(--text-primary);
            border: 1px solid rgba(139, 156, 181, 0.1);
        }

        .chatbot-message.user .chatbot-text {
            background: rgba(224, 124, 92, 0.15);
            color: var(--text-primary);
            border: 1px solid rgba(224, 124, 92, 0.25);
        }

        .chatbot-typing {
            display: none;
            gap: 0.4rem;
            padding: 0.75rem 1rem;
        }

        .chatbot-typing.active {
            display: flex;
        }

        .chatbot-typing-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--muted);
            animation: typingDot 1.4s ease-in-out infinite;
        }

        .chatbot-typing-dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .chatbot-typing-dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typingDot {
            0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
            30% { transform: translateY(-8px); opacity: 1; }
        }

        .chatbot-input-area {
            padding: 1rem 1.5rem;
            background: rgba(15, 20, 25, 0.6);
            border-top: 1px solid rgba(139, 156, 181, 0.15);
            display: flex;
            gap: 0.75rem;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.4s ease 0.4s;
        }

        .chatbot-window.open .chatbot-input-area {
            opacity: 1;
            transform: translateY(0);
        }

        .chatbot-input {
            flex: 1;
            padding: 0.75rem 1rem;
            background: var(--bg-navy);
            border: 1px solid var(--ghost-border);
            border-radius: 12px;
            color: var(--text-primary);
            font-family: 'DM Sans', sans-serif;
            font-size: 0.9rem;
            resize: none;
            max-height: 100px;
        }

        .chatbot-input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .chatbot-send {
            padding: 0.75rem 1.25rem;
            background: var(--accent);
            color: white;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.2s ease;
        }

        .chatbot-send:hover:not(:disabled) {
            background: #e05520;
            transform: translateY(-1px);
        }

        .chatbot-send:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        @media (max-width: 768px) {
            .chatbot-container {
                bottom: 0.75rem;
                left: 0.75rem;
            }

            .chatbot-button {
                width: 55px;
                height: 72px;
            }

            .robot {
                transform: scale(0.8);
            }

            .speech-bubble {
                font-size: 9px;
                padding: 5px 9px;
                white-space: nowrap;
                bottom: calc(100% + 2px);
                left: calc(100% - 8px);
            }

            /* Adjust robot when chat is open on mobile */
            .chatbot-container.active .chatbot-button {
                transform: translateX(-10px) scale(0.65) rotate(-10deg);
            }

            .chatbot-window {
                bottom: 70px;
                left: 0.75rem;
                right: 0.75rem;
                width: auto;
                height: 55vh;
                max-height: calc(100vh - 100px);
                min-height: 280px;
            }

            /* Ensure chatbot window doesn't overlap with robot on mobile */
            .chatbot-window.open {
                transform: scale(1) translateX(0) translateY(0) rotate(0deg);
            }

            .chatbot-header {
                padding: 0.85rem 1rem;
            }

            .chatbot-header h3 {
                font-size: 0.95rem;
            }

            .chatbot-input-area {
                padding: 0.6rem;
                gap: 0.4rem;
            }

            .chatbot-input {
                font-size: 16px; /* prevents iOS zoom on focus */
                padding: 0.6rem 0.8rem;
            }

            .chatbot-send {
                padding: 0.6rem 1rem;
                font-size: 0.85rem;
            }

            .chatbot-text {
                font-size: 0.85rem;
                padding: 0.6rem 0.8rem;
            }

            .chatbot-message {
                gap: 0.4rem;
                padding: 0.3rem 0.6rem;
            }
        }

