html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    height: 100vh;
    overflow-y: scroll;
}
/* ---- SCROLLBAR HIDING (Replaces slidebar) ---- */

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
    width: 0;
    background: transparent;
}

/* Hide scrollbar for IE, Edge and Firefox */
html, body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ---- NEW BUBBLE NAV STYLES ---- */

.bubble-nav-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none; /* Let clicks pass through around the bubble */
}

.bubble-nav {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.5rem;
    pointer-events: auto; /* Enable clicks on the bubble */
    position: relative;
    /* Initial small bubble state */
    width: 3rem; 
    height: 3rem;
    border-radius: 9999px;
    justify-content: center;
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* CHANGED: overflow: hidden prevented tooltips from showing. Changed to visible. */
    overflow: visible; 
}

.bubble-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border-radius: 9999px;
    z-index: -1;
    transition: all 0.3s ease;
}

/* When hovering over the container, expand */
.bubble-nav:hover {
    width: 14rem; /* Width to fit all icons */
    gap: 1.5rem;
}

.bubble-nav:hover .bubble-backdrop {
    background: rgba(10, 10, 10, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    opacity: 0; /* Hidden initially */
    transform: translateY(10px);
    transition: all 0.3s ease;
    width: 0;
    position: relative;
}

/* Center icon (could be a logo or menu icon) visible by default? 
   Actually, let's keep it clean. When collapsed, it looks like a glowing dot/orb.
   Or we can make the first icon visible. */
   
.bubble-nav::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 0 10px white;
}

.bubble-nav:hover::after {
    opacity: 0;
}

.bubble-nav:hover .nav-item {
    opacity: 0.5;
    width: auto;
    transform: translateY(0);
}

.bubble-nav:hover .nav-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

.nav-item i {
    width: 1.25rem;
    height: 1.25rem;
}

/* Tooltip Label */
.nav-item::before {
    content: attr(data-label);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    color: black;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Goofy Mode Overrides for Nav */
body.goofy-mode .bubble-backdrop {
    background: #FF0055;
    border: 3px solid black;
    border-radius: 0;
    box-shadow: 4px 4px 0 black;
}
body.goofy-mode .bubble-nav {
    border-radius: 0;
}
body.goofy-mode .nav-item {
    color: white;
}
body {
    margin: 0;
    background-color: #020202;
    font-family: 'Inter', sans-serif;
    color: white;
    cursor: none;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

h1, h2, h3, .tech-font {
    font-family: 'Space Grotesk', sans-serif;
}

section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#main-content {
    position: relative;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(2,2,2,0) 0%, rgba(2,2,2,0.9) 30%, rgba(2,2,2,1) 100%);
    transition: background 0.5s ease;
}

.section-hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.glass-panel {
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    transition: all 0.5s ease;
}

.service-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1), background-color 0.4s ease-out, border-color 0.4s ease-out, box-shadow 0.4s ease-out;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0);
}

.service-card:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.1);
    z-index: 10;
}

.form-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.05);
}

.fade-enter {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
    /* UPDATED: Faster duration (0.8s) so text appears quicker */
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease-out;
}

.fade-active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.delay-100 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.6s; }

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #020202; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    width: 6px;
    height: 6px;
    background-color: white;
    box-shadow: 0 0 15px white;
    mix-blend-mode: difference;
}

.controls-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    gap: 10px;
    width: 90%;
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 30px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.control-btn:hover {
    background: white;
    color: black;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.premium-btn {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
}

#flashlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    -webkit-mask-image: radial-gradient(circle 120px at var(--cursor-x) var(--cursor-y), transparent 20px, black 100%);
    mask-image: radial-gradient(circle 120px at var(--cursor-x) var(--cursor-y), transparent 20px, black 100%);
}

#flashlight-overlay.active {
    opacity: 1;
}

::selection {
    background: rgba(255, 255, 255, 0.9);
    color: black;
}

.magnetic {
    display: inline-block;
    transition: transform 0.1s cubic-bezier(0.1, 0, 0.3, 1);
}

@media (hover: none) and (pointer: coarse) {
    body { cursor: auto; }
    .cursor-dot { display: none !important; }
    #flashlight-overlay { display: none !important; }
    .magnetic { transform: none !important; transition: transform 0.3s ease !important; }
    #dark-mode-btn { display: none !important; }
    h1 { font-size: 2.5rem !important; }
    html { scroll-snap-type: y proximity; }
}

body.goofy-mode {
    background-color: #FFD700 !important;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', sans-serif !important;
    color: black !important;
    cursor: auto !important;
}

body.goofy-mode .cursor-dot {
    display: none !important;
}

body.goofy-mode #main-content {
    background: none !important;
}

body.goofy-mode section {
    border-bottom: 3px solid black;
}

body.goofy-mode h1,
body.goofy-mode h2,
body.goofy-mode h3,
body.goofy-mode h4,
body.goofy-mode p,
body.goofy-mode span,
body.goofy-mode i {
    color: black !important;
    text-shadow: none !important;
    mix-blend-mode: normal !important;
    font-family: 'Comic Sans MS', sans-serif !important;
}

body.goofy-mode .section-hero h1 {
    color: #FF0055 !important;
    text-shadow: 4px 4px 0px white !important;
    font-weight: 900;
    letter-spacing: -2px;
    transform: rotate(-2deg);
}

body.goofy-mode .glass-panel {
    background: black !important;
    border: 3px solid white !important;
    box-shadow: 8px 8px 0px black !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    color: white !important;
}

body.goofy-mode .glass-panel * {
    color: white !important;
}

body.goofy-mode .form-input {
    background: white !important;
    border: 3px solid white !important;
    color: black !important;
    border-radius: 0 !important;
    box-shadow: 4px 4px 0px white !important;
}

body.goofy-mode .form-input::placeholder {
    color: #666 !important;
}

body.goofy-mode .service-card {
    background: #00FFFF !important;
    border: 3px solid black !important;
    box-shadow: 6px 6px 0px black !important;
    border-radius: 0 !important;
    transform: none !important;
}

body.goofy-mode button {
    background: #FF0055 !important;
    color: white !important;
    border: 3px solid white !important;
    box-shadow: 4px 4px 0px white !important;
    border-radius: 0 !important;
    font-family: 'Comic Sans MS', sans-serif !important;
}

body.goofy-mode button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px white !important;
}

body.goofy-mode .h-px {
    height: 4px !important;
    background: white !important;
    opacity: 1 !important;
}

body.goofy-mode .controls-container button {
    background: black !important;
    color: white !important;
    border: 2px solid white !important;
    box-shadow: none !important;
}

body.goofy-mode ::-webkit-scrollbar-track { background: #FFD700; }
body.goofy-mode ::-webkit-scrollbar-thumb { background: black; border-radius: 0; border: 1px solid white; }

}
