:root {
    --primary: #00a8e8;
    --primary-glow: rgba(0, 168, 232, 0.4);
    --cyan: #00f2ff;
    --cyan-glow: rgba(0, 242, 255, 0.3);
    --royal: #1445b2;
    --white: #ffffff;
    --bg-dark: #020204;
    --text-dark: #f5f5f7;
    --glass: rgba(0, 168, 232, 0.03);
    --border-glass: rgba(0, 242, 255, 0.1);

    --font-header: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-cinematic: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
    --bg: var(--bg-dark);
    --text: var(--text-dark);
    --glass: var(--glass-dark);
    --bg-gradient: radial-gradient(circle at 50% 50%, #0a0a0f 0%, #020202 100%);
}

[data-theme='light'] {
    --bg: var(--bg-light);
    --text: var(--text-light);
    --glass: rgba(255, 255, 255, 0.7);
    --bg-gradient: radial-gradient(circle at 50% 50%, #f5f5f7 0%, #e0e0e4 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: auto !important;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.5;
    background-image: radial-gradient(circle at 50% -20%, #0a1832 0%, var(--bg-dark) 70%);
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15000;
    opacity: 0.04;
    pointer-events: none;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
}

/* HUD Layer */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    padding: 40px;
}

.hud-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.top-left {
    top: 40px;
    left: 40px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 40px;
    right: 40px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 40px;
    left: 40px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 40px;
    right: 40px;
    border-left: none;
    border-top: none;
}

.hud-stats {
    position: absolute;
    bottom: 60px;
    right: 80px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--cyan);
    opacity: 0.5;
}

.stat-item {
    margin-bottom: 5px;
}

.stat-item .label {
    opacity: 0.6;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 110px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    z-index: 20000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 242, 255, 0.05);
    background: rgba(10, 10, 10, 0.2);
    transition: width 0.4s ease;
}

.nav-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-transform: uppercase;
}

.logo img {
    width: 55px;
    height: auto;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.2));
}

.logo-w {
    color: var(--cyan);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 15px 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-decoration: none;
}

.nav-link:hover {
    opacity: 1;
    color: var(--cyan);
}

.nav-link::after {
    display: none;
}

/* Page Spacing for Sidebar */
main {
    margin-left: 110px;
}

.footer {
    margin-left: 110px;
    width: calc(100% - 110px);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 20001;
    width: 40px;
    height: 40px;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--cyan);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0a0a0a;
    z-index: 19999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    clip-path: circle(0% at 100% 0%);
    transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
    visibility: visible;
    clip-path: circle(150% at 100% 0%);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.mobile-nav-link {
    font-family: var(--font-header);
    font-size: clamp(2rem, 10vw, 4rem);
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    transition: all 0.4s ease;
    text-decoration: none;
    letter-spacing: -0.04em;
    opacity: 0;
    transform: translateY(30px);
}

.mobile-menu.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for mobile links */
.mobile-menu.active .mobile-nav-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-menu.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-menu.active .mobile-nav-link:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-menu.active .mobile-nav-link:nth-child(5) {
    transition-delay: 0.5s;
}

.mobile-menu.active .mobile-nav-link:nth-child(6) {
    transition-delay: 0.6s;
}

.mobile-nav-link:hover {
    color: var(--cyan);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .navbar {
        width: 100%;
        height: 80px;
        flex-direction: row;
        padding: 0 30px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 242, 255, 0.05);
    }

    .nav-container {
        flex-direction: row;
        width: 100%;
    }

    .logo {
        flex-direction: row;
    }

    .logo img {
        margin-bottom: 0;
        margin-right: 10px;
        width: 40px;
    }

    main {
        margin-left: 0;
    }

    .footer {
        margin-left: 0;
        width: 100%;
    }
}

h1,
h2,
h3 {
    font-family: var(--font-header);
}

h1 {
    font-size: clamp(3rem, 15vw, 10rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 0.85;
    margin-bottom: 20px;
    letter-spacing: -0.06em;
    background: linear-gradient(180deg, var(--white) 30%, rgba(255, 255, 255, 0.1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 0;
    z-index: 1;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
    width: 100%;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.section-title {
    margin-bottom: 100px;
    opacity: 0.6;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5em;
    font-weight: 700;
    color: var(--cyan);
}

/* Responsive adjustments for Hero */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
    height: 100%;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-visual-slot {
        height: 40vh;
        order: -1;
    }
}

.hero-visual-slot {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-magnetic {
    position: relative;
    padding: 24px 48px;
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    overflow: hidden;
    transition: border-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-magnetic span {
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.05em;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: opacity 0.5s var(--transition-cinematic);
    pointer-events: none;
    z-index: 1;
}

.btn-magnetic:hover {
    border-color: var(--cyan);
}

.btn-magnetic:hover .btn-glow {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: 60px;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform-style: preserve-3d;
    transition: border-color 0.5s ease;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    border-color: var(--cyan-glow);
}

.lordicon-container {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.1));
    transition: transform 0.5s var(--transition-cinematic);
}

.lordicon-container lord-icon {
    width: 60px;
    height: 60px;
}

.card:hover .lordicon-container {
    transform: translateZ(60px) scale(1.1);
}

.card h3 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    transform: translateZ(50px);
}

.card p {
    font-size: 1.1rem;
    opacity: 0.7;
    max-width: 80%;
    transform: translateZ(30px);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    padding: 60px 0;
    width: 100%;
}

.tech-item {
    font-family: var(--font-header);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    position: relative;
    padding: 15px 20px 15px 45px;
    background: transparent;
    transition: color 0.3s ease, transform 0.3s ease;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    border-radius: 12px;
}

.tech-item::before {
    content: '';
    position: absolute;
    left: 10px;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transform: translateX(-10px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-item:hover {
    transform: translateX(10px);
}

.tech-item:hover::before {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Brand Colors and Logos */
.tech-item[data-logo="react"]:hover {
    color: #61DAFB;
}

.tech-item[data-logo="react"]::before {
    background-image: url('https://cdn.simpleicons.org/react/61DAFB');
}

.tech-item[data-logo="nodedotjs"]:hover {
    color: #339933;
}

.tech-item[data-logo="nodedotjs"]::before {
    background-image: url('https://cdn.simpleicons.org/nodedotjs/339933');
}

.tech-item[data-logo="tensorflow"]:hover {
    color: #FF6F00;
}

.tech-item[data-logo="tensorflow"]::before {
    background-image: url('https://cdn.simpleicons.org/tensorflow/FF6F00');
}

.tech-item[data-logo="amazonaws"]:hover {
    color: #FF9900;
}

.tech-item[data-logo="amazonaws"]::before {
    background-image: url('https://cdn.simpleicons.org/amazonaws/FF9900');
}

.tech-item[data-logo="typescript"]:hover {
    color: #3178C6;
}

.tech-item[data-logo="typescript"]::before {
    background-image: url('https://cdn.simpleicons.org/typescript/3178C6');
}

.tech-item[data-logo="python"]:hover {
    color: #3776AB;
}

.tech-item[data-logo="python"]::before {
    background-image: url('https://cdn.simpleicons.org/python/3776AB');
}

.tech-item[data-logo="docker"]:hover {
    color: #2496ED;
}

.tech-item[data-logo="docker"]::before {
    background-image: url('https://cdn.simpleicons.org/docker/2496ED');
}

.tech-item[data-logo="postgresql"]:hover {
    color: #4169E1;
}

.tech-item[data-logo="postgresql"]::before {
    background-image: url('https://cdn.simpleicons.org/postgresql/4169E1');
}

.tech-item[data-logo="mongodb"]:hover {
    color: #47A248;
}

.tech-item[data-logo="mongodb"]::before {
    background-image: url('https://cdn.simpleicons.org/mongodb/47A248');
}

.tech-item[data-logo="nextdotjs"]:hover {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.tech-item[data-logo="nextdotjs"]::before {
    background-image: url('https://cdn.simpleicons.org/nextdotjs/white');
}

.tech-item[data-logo="threedotjs"]:hover {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.tech-item[data-logo="threedotjs"]::before {
    background-image: url('https://cdn.simpleicons.org/threedotjs/white');
}

.tech-item[data-logo="gsap"]:hover {
    color: #88CE02;
}

.tech-item[data-logo="gsap"]::before {
    background-image: url('https://cdn.simpleicons.org/gsap/88CE02');
}

.timeline {
    padding-left: 100px;
    border-left: 1px solid var(--border-glass);
}

.step {
    padding: 60px 0;
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    left: -105px;
    top: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary);
    transform: scale(0);
    transition: transform 0.5s var(--transition-cinematic);
}

.step.active::before {
    transform: scale(3);
}

.step-num {
    font-size: 6rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    position: absolute;
    left: -200px;
    top: 50%;
    transform: translateY(-50%);
}

.step.active h3 {
    color: var(--cyan);
}

#custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
}

#cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    filter: blur(20px);
}

#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

@keyframes soulFloat {

    0%,
    100% {
        transform: translateY(-50%) translateX(0) rotate(0deg);
    }

    33% {
        transform: translateY(-55%) translateX(10px) rotate(2deg);
    }

    66% {
        transform: translateY(-45%) translateX(-10px) rotate(-2deg);
    }
}

#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#cta-final {
    background: black;
    overflow: hidden;
}

.reveal-text {
    font-size: clamp(3rem, 7vw, 6rem);
    margin-bottom: 50px;
}

#particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Responsive Layouts V2.0 */
@media (max-width: 992px) {
    .cards-container {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 50px;
    }

    .step-num {
        display: none;
    }

    .step::before {
        left: -55px;
    }
}

@media (max-width: 768px) {
    * {
        cursor: auto !important;
    }

    #custom-cursor,
    #cursor-glow {
        display: none !important;
    }

    .section {
        padding: 60px 0;
    }

    h1 {
        margin-bottom: 20px;
        font-size: clamp(3rem, 12vw, 5rem);
    }

    h2 {
        font-size: clamp(1.4rem, 6vw, 2.5rem);
    }

    .section-title {
        margin-bottom: 40px;
        font-size: 0.7rem;
    }

    .hero-visual-slot {
        height: 35vh;
    }

    #ai-soul-container {
        transform: scale(0.7) translateY(-30%);
    }

    .hud-overlay {
        padding: 20px;
    }

    .hud-corner {
        width: 15px;
        height: 15px;
    }

    .top-left {
        top: 20px;
        left: 20px;
    }

    .top-right {
        top: 20px;
        right: 20px;
    }

    .bottom-left {
        bottom: 20px;
        left: 20px;
    }

    .bottom-right {
        bottom: 20px;
        right: 20px;
    }

    .hud-stats {
        right: 20px;
        bottom: 25px;
        font-size: 8px;
    }

    .btn-magnetic {
        padding: 18px 36px;
        width: 100%;
        text-align: center;
    }

    .cards-container {
        gap: 20px;
    }

    .card {
        padding: 30px;
        height: auto;
        aspect-ratio: 4/5;
    }

    .lordicon-container {
        height: 60px;
        justify-content: flex-start;
    }

    .lordicon-container lord-icon {
        width: 40px;
        height: 40px;
    }

    .card h3 {
        font-size: 1.8rem;
    }

    .floating-logos {
        gap: 20px;
        height: auto;
        padding: 40px 0;
    }

    .logo-item {
        font-size: 1.8rem;
    }

    .case-item {
        padding: 30px;
        border-radius: 20px;
    }

    .case-item.large,
    .case-item.medium {
        height: 450px;
    }

    .case-info h3 {
        font-size: 1.8rem;
    }

    .timeline {
        padding-left: 30px;
    }

    .step::before {
        left: -35px;
    }

    .reveal-text {
        font-size: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}