:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --neon-glow: 0 0 10px var(--primary-color),
                 0 0 20px var(--primary-color),
                 0 0 30px var(--primary-color);
    --neon-glow-purple: 0 0 10px var(--secondary-color),
                        0 0 20px var(--secondary-color),
                        0 0 30px var(--secondary-color);
    
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: rgba(0, 123, 255, 0.15);
    --shadow-color: rgba(0, 123, 255, 0.1);
    --gradient-bg: linear-gradient(45deg, rgba(0,0,0,.97) 0%, rgba(0,0,0,.95) 100%);
}

[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e8eef5;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --border-color: rgba(0, 123, 255, 0.2);
    --shadow-color: rgba(0, 123, 255, 0.15);
    --gradient-bg: linear-gradient(45deg, rgba(240,244,248,.98) 0%, rgba(232,238,245,.98) 100%);
    --neon-glow: 0 0 5px var(--primary-color),
                 0 0 10px rgba(0, 123, 255, 0.3);
}

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

body {
    margin: 0;
    font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg),
        repeating-linear-gradient(45deg, transparent 0, transparent 2px, rgba(0,255,157,0.1) 2px, rgba(0,255,157,0.1) 4px);
    z-index: -1;
    pointer-events: none;
    transition: background 0.5s ease;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.custom-navbar {
    background-color: var(--bg-secondary) !important;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 2px 15px var(--shadow-color);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.2rem;
}

#profile-pic-small {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary) !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px var(--primary-color),
                 0 0 20px var(--primary-color),
                 0 0 30px var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    outline: none !important;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    width: 24px;
    height: 24px;
    background-image: none !important;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon {
    background-color: var(--text-primary);
    content: '';
    display: block;
    height: 2px;
    position: absolute;
    width: 100%;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: 7px;
}

.navbar-toggler-icon::after {
    bottom: 7px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: translateY(7px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: translateY(-7px) rotate(-45deg);
}

.navbar-collapse {
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
}

@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        padding: 1rem;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .navbar-nav {
        padding: 1rem 0;
    }

    .nav-item {
        opacity: 0;
        transform: translateY(20px);
        animation: slideIn 0.3s forwards;
    }

    .nav-item:nth-child(1) { animation-delay: 0.1s; }
    .nav-item:nth-child(2) { animation-delay: 0.2s; }
    .nav-item:nth-child(3) { animation-delay: 0.3s; }
    .nav-item:nth-child(4) { animation-delay: 0.4s; }

    .nav-link {
        padding: 1rem 0;
        font-size: 1.1rem;
        text-align: center;
    }

    .navbar-collapse.collapsing {
        height: auto;
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .navbar-collapse.show {
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    }
}

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

.hero {
    min-height: 100vh;
    padding-top: 80px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg),
        repeating-linear-gradient(45deg, transparent 0, transparent 2px, rgba(0,255,157,0.05) 2px, rgba(0,255,157,0.05) 4px);
    z-index: 0;
    animation: gridMove 20s linear infinite;
    transition: background 0.5s ease;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-shadow: var(--neon-glow);
    position: relative;
    z-index: 1;
}

.hero p {
    position: relative;
    z-index: 1;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.hero-buttons .btn-primary {
    background: var(--primary-color);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--primary-color);
}

.hero-buttons .btn-outline {
    background: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px var(--primary-color);
}

.hero-buttons .btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}


@media (max-width: 768px) {
    .hero {
        text-align: center;
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        justify-content: center;
        gap: 15px;
    }

    .hero-buttons .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .navbar-toggler {
        margin-left: 15px;
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .hero-buttons .btn {
        width: 100%;
        margin: 5px 0;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}


.projects {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    transition: background 0.5s ease;
}

.project-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 25px var(--shadow-color);
    margin-bottom: 30px;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(90deg, var(--primary-color), #0066cc);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 35px rgba(0, 123, 255, 0.2);
}

.project-card .card-img-top {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background-color: var(--bg-secondary);
    transition: all 0.5s ease;
    padding: 0;
    position: relative;
}

.project-card:hover .card-img-top {
    transform: scale(1.05);
}

.project-card .card-body {
    padding: 2rem;
    background: linear-gradient(to bottom, var(--bg-card) 0%, var(--bg-secondary) 100%);
    flex: 1;
    position: relative;
    z-index: 1;
    transition: background 0.5s ease;
}

.project-card .card-title {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.project-card .card-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.project-card:hover .card-title::after {
    width: 100%;
}

.project-card .card-text {
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.9;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.5rem;
}

.project-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.project-actions .btn {
    padding: 6px 14px;
}

.badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

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

.badge:hover::before {
    left: 100%;
}

.badge:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

@media (max-width: 768px) {
    .project-card {
        margin: 20px 0;
    }

    .project-card .card-img-top {
        height: 340px;
    }

    .project-card .card-body {
        padding: 1.8rem;
    }

    .project-card .card-title {
        font-size: 1.4rem;
    }

    .tech-stack {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .project-card .card-img-top {
        height: 280px;
    }

    .project-card .card-body {
        padding: 1.5rem;
    }

    .projects .row {
        margin: 0 -10px;
    }

    .projects .col-md-6 {
        padding: 0 10px;
    }

    .badge {
        padding: 7px 14px;
        font-size: 0.85rem;
    }
}

@media (min-width: 992px) {
    .project-card .card-img-top {
        height: 320px;
    }
}

@media (min-width: 1200px) {
    .project-card .card-img-top {
        height: 340px;
    }
}

.about {
    background-color: var(--bg-primary);
    padding: 5rem 0;
    transition: background-color 0.5s ease;
}

.about-image {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.avatar-circle {
    width: clamp(180px, 45vw, 360px);
    height: clamp(180px, 45vw, 360px);
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.35);
    display: block;
    margin: 0 auto;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contact {
    background-color: var(--bg-card);
    padding: 5rem 0;
    transition: background-color 0.5s ease;
}

.contact-info {
    margin-bottom: 3rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.footer {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    transition: background-color 0.5s ease;
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .hero {
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-image {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    #profile-pic-small {
        width: 32px;
        height: 32px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    .social-buttons {
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%;
        padding-right: 20px;
        padding-left: 20px;
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .project-card img {
        height: 180px;
    }

    .project-actions {
        flex-direction: column;
    }

    .project-actions .btn {
        width: 100%;
    }
    
    .about-image {
        max-width: 100%;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
    }
    
    .social-img {
        width: 24px;
        height: 24px;
    }
}

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

.hero, .projects, .about, .contact {
    animation: fadeIn 1s ease-out;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid #333;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: loading 0.8s infinite linear;
}

@keyframes loading {
    to {
        transform: rotate(360deg);
    }
}

.glitch-text {
    position: relative;
    text-shadow: 0.05em 0 0 var(--primary-color), -0.025em -0.05em 0 var(--secondary-color),
                0.025em 0.05em 0 #ff0000;
    animation: glitch 500ms infinite;
}

[data-theme="light"] .glitch-text {
    text-shadow: none;
    animation: none;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 var(--primary-color), -0.025em -0.05em 0 var(--secondary-color),
                    0.025em 0.05em 0 #ff0000;
    }
    14% {
        text-shadow: 0.05em 0 0 var(--primary-color), -0.025em -0.05em 0 var(--secondary-color),
                    0.025em 0.05em 0 #ff0000;
    }
    15% {
        text-shadow: -0.05em -0.025em 0 var(--primary-color), 0.025em 0.025em 0 var(--secondary-color),
                    -0.05em -0.05em 0 #ff0000;
    }
    49% {
        text-shadow: -0.05em -0.025em 0 var(--primary-color), 0.025em 0.025em 0 var(--secondary-color),
                    -0.05em -0.05em 0 #ff0000;
    }
    50% {
        text-shadow: 0.025em 0.05em 0 var(--primary-color), 0.05em 0 0 var(--secondary-color),
                    0 -0.05em 0 #ff0000;
    }
    99% {
        text-shadow: 0.025em 0.05em 0 var(--primary-color), 0.05em 0 0 var(--secondary-color),
                    0 -0.05em 0 #ff0000;
    }
    100% {
        text-shadow: -0.025em 0 0 var(--primary-color), -0.025em -0.025em 0 var(--secondary-color),
                    -0.025em -0.05em 0 #ff0000;
    }
}

.cyber-text {
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    letter-spacing: 2px;
}

.neon-text {
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

.btn-cyber {
    position: relative;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    padding: 10px 30px;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
}

.btn-cyber::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-cyber:hover::before {
    left: 100%;
}

.btn-cyber:hover {
    box-shadow: var(--neon-glow);
    transform: scale(1.05);
    color: var(--bg-primary);
}

.badge-cyber {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 5px 10px;
    margin: 2px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.badge-cyber:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    box-shadow: var(--neon-glow);
}

.cyber-card {
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cyber-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 157, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: glowingEffect 2s linear infinite;
}

.card-glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--shadow-color);
    opacity: 0;
    pointer-events: none;
    animation: glitchEffect 2s infinite;
    z-index: 1;
}

@keyframes glitchEffect {
    0% {
        opacity: 0;
        transform: translate(0);
    }
    1% {
        opacity: 0.1;
        transform: translate(-5px, 5px);
    }
    2% {
        opacity: 0.1;
        transform: translate(5px, -5px);
    }
    3% {
        opacity: 0;
        transform: translate(0);
    }
    100% {
        opacity: 0;
        transform: translate(0);
    }
}

.section-title {
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: var(--neon-glow);
}


html {
    scroll-behavior: smooth;
}

.fade-in {
    opacity: 1;
    transform: none;
}

.loading-image {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.loading-image.loaded {
    opacity: 1;
}

.btn {
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.card-glitch-effect,
.cyber-card::before,
.btn::after,
.social-btn::before {
    display: none;
}

.navbar {
    background: var(--bg-secondary);
    padding: 1rem 0;
    transition: background 0.5s ease;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), #00d4ff);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.35);
    z-index: 1100;
}

.nav-link {
    color: var(--text-primary) !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.2);
    z-index: 1000;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

[data-theme="light"] .preview-overlay {
    background: rgba(240, 244, 248, 0.95);
}

.preview-overlay.open {
    display: flex;
}

.preview-dialog {
    width: min(92vw, 1000px);
    max-height: 85vh;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: 0 10px 40px rgba(0, 123, 255, 0.25);
    position: relative;
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    padding: 12px;
}

.preview-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-right: 30px;
}

.preview-body video {
    width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.preview-overlay.open .preview-dialog {
    transform: scale(1);
    opacity: 1;
}

.preview-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.preview-body video,
.preview-body img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 8px;
}

@media (max-width: 576px) {
    .preview-dialog {
        width: 96vw;
        max-height: 90vh;
        padding: 10px;
    }

    .preview-close {
        font-size: 34px;
        top: 2px;
        right: 6px;
    }

    .avatar-circle {
        width: 60vw;
        height: 60vw;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero {
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .project-card {
        margin-bottom: 20px;
    }

    .project-card .card-img-top {
        height: 180px;
    }

    .about-image {
        max-width: 80%;
        margin: 0 auto 30px;
    }

    .whatsapp-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        padding: 0.8rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .skill-tags {
        justify-content: center;
    }

    .badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .project-card .card-img-top {
        height: 160px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .social-buttons {
        gap: 15px;
    }

    .social-btn img {
        width: 35px;
        height: 35px;
    }

    .contact-info {
        padding: 20px;
    }
}

@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .project-card .card-img-top {
        height: 140px;
    }

    .badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .whatsapp-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 10px;
        right: 10px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }

    .project-card .card-img-top {
        height: 220px;
    }

    .hero-content {
        padding-right: 50px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--bg-secondary);
        padding: 20px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .navbar-nav {
        text-align: center;
    }

    .nav-item {
        margin: 10px 0;
    }

    .navbar-toggler {
        padding: 0;
        border: none;
    }

    .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.row {
    margin-left: -15px;
    margin-right: -15px;
}

[class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

.theme-toggle {
    position: relative;
    width: 70px;
    height: 36px;
    border-radius: 50px;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    overflow: visible;
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 0 20px rgba(0, 123, 255, 0.4),
        0 0 40px rgba(0, 123, 255, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    margin-left: 15px;
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: scale(1.08);
    box-shadow: 
        0 0 30px rgba(0, 123, 255, 0.6),
        0 0 60px rgba(0, 123, 255, 0.3),
        inset 0 0 25px rgba(0, 0, 0, 0.5);
}

.theme-toggle-inner {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-icon-moon {
    position: absolute;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    opacity: 1;
    transform: rotate(0deg) scale(1);
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: #ffd700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    animation: moonGlow 3s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)); }
    50% { filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1)); }
}

.theme-icon-moon svg {
    width: 100%;
    height: 100%;
}

.theme-icon-sun {
    position: absolute;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    opacity: 0;
    transform: rotate(-180deg) scale(0.3);
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: #ff6b35;
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.8));
}

.theme-icon-sun svg {
    width: 100%;
    height: 100%;
    animation: sunRays 4s linear infinite;
}

@keyframes sunRays {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

[data-theme="light"] .theme-toggle {
    background: linear-gradient(135deg, #56ccf2 0%, #f093fb 50%, #f5576c 100%);
    border-color: #ff6b35;
    box-shadow: 
        0 0 25px rgba(255, 107, 53, 0.5),
        0 0 50px rgba(255, 107, 53, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .theme-toggle-inner {
    left: calc(100% - 31px);
}

[data-theme="light"] .theme-icon-moon {
    opacity: 0;
    transform: rotate(180deg) scale(0.3);
}

[data-theme="light"] .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    animation: sunGlow 2s ease-in-out infinite;
}

@keyframes sunGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.8)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)); }
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    overflow: hidden;
    opacity: 1;
    transition: all 0.8s ease;
}

.theme-toggle .star-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px #fff;
    animation: starFall 2s linear infinite;
    opacity: 0;
}

@keyframes starFall {
    0% {
        opacity: 1;
        transform: translateY(-5px) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(35px) translateX(5px);
    }
}

[data-theme="light"] .theme-toggle .star-particle {
    display: none;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 12px;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.9;
    box-shadow: 
        18px 5px 0 0 rgba(255, 255, 255, 0.8),
        12px -3px 0 -0.5px rgba(255, 255, 255, 0.6),
        25px 2px 0 0 rgba(255, 255, 255, 0.7),
        8px 10px 0 -0.5px rgba(255, 255, 255, 0.5),
        22px 12px 0 -0.5px rgba(255, 255, 255, 0.4);
    animation: twinkle 1.5s ease-in-out infinite;
    transition: all 0.8s ease;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.4; }
}

[data-theme="light"] .theme-toggle::before {
    opacity: 0;
    transform: scale(0);
}

[data-theme="light"] .theme-toggle::after {
    opacity: 0;
    transform: scale(0) rotate(180deg);
}

.theme-transition-wave {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

.theme-wave-circle {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
}

.theme-wave-circle.dark {
    background: radial-gradient(circle, #000000 0%, #0a0a0a 50%, transparent 70%);
}

.theme-wave-circle.light {
    background: radial-gradient(circle, #f0f4f8 0%, #e8eef5 50%, transparent 70%);
}

.theme-wave-circle.animate {
    animation: waveExpand 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes waveExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.theme-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
}

.theme-particle.star {
    background: #ffd700;
    box-shadow: 0 0 10px #ffd700;
}

.theme-particle.sun {
    background: #ff6b35;
    box-shadow: 0 0 10px #ff6b35;
}

.theme-particle.animate {
    animation: particleFly 0.6s ease-out forwards;
}

@keyframes particleFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

@media (max-width: 991px) {
    .theme-toggle {
        position: fixed !important;
        bottom: 20px;
        left: 20px !important;
        right: auto !important;
        top: auto !important;
        margin: 0;
        width: 70px;
        height: 36px;
        z-index: 1001;
    }
    
    .theme-toggle-inner {
        width: 28px;
        height: 28px;
    }
    
    .theme-icon-moon,
    .theme-icon-sun {
        width: 28px;
        height: 28px;
    }
    
    [data-theme="light"] .theme-toggle-inner {
        left: calc(100% - 32px);
    }
}

.theme-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.theme-transition-overlay.active {
    opacity: 1;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        #00d4ff 25%, 
        var(--primary-color) 50%, 
        #00d4ff 75%, 
        var(--primary-color) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.03;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

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

.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.3),
                    0 0 40px rgba(0, 123, 255, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(0, 123, 255, 0.5),
                    0 0 60px rgba(0, 123, 255, 0.2);
    }
}

.hover-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2);
}

.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textReveal 0.8s ease forwards;
}

@keyframes textReveal {
    to { transform: translateY(0); }
}

.smooth-scale {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smooth-scale:hover {
    transform: scale(1.05);
}

.border-glow {
    position: relative;
}

.border-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), #00d4ff, var(--primary-color));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderGlow 3s ease infinite;
}

.border-glow:hover::before {
    opacity: 1;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

*:not(video):not(img):not(.theme-toggle *) {
    transition: background-color 0.5s ease, 
                border-color 0.5s ease, 
                color 0.3s ease;
}

img, video {
    transition: none !important;
    filter: none !important;
    opacity: 1 !important;
}

[data-theme="light"] img,
[data-theme="light"] video {
    filter: none !important;
    opacity: 1 !important;
}

[data-theme="light"] .card-img-top,
[data-theme="light"] .project-card img,
[data-theme="light"] .video-wall-main video,
[data-theme="light"] .video-thumb video,
[data-theme="light"] .hero-image {
    filter: none;
    opacity: 1;
    mix-blend-mode: normal;
}

.no-transition {
    transition: none !important;
}

.parallax-container {
    perspective: 1000px;
    overflow: hidden;
}

.parallax-item {
    transform-style: preserve-3d;
}

img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

.cursor-trail {
    pointer-events: none;
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

::selection {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #00d4ff, var(--primary-color));
    z-index: 10002;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 20s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 22s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 24s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 19s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 21s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 17s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 23s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3s; animation-duration: 20s; }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3s steps(30) forwards, blink 0.7s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-down-arrow i {
    font-size: 30px;
    color: var(--primary-color);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-down-arrow:hover i {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-15px); }
    60% { transform: translateX(-50%) translateY(-7px); }
}

.stats-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 123, 255, 0.1) 0%, transparent 50%);
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    min-height: auto;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .stats-section {
        padding: 2rem 0;
    }
    
    .stat-card {
        padding: 1rem 0.5rem;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        line-height: 1.2;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stats-section .col-6 {
        padding: 0 5px;
    }
    
    .stat-card {
        padding: 0.8rem 0.4rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
        line-height: 1.1;
    }
}

.skills-progress {
    margin-top: 2rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.skill-name i {
    color: var(--primary-color);
}

.skill-percent {
    color: var(--primary-color);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #00d4ff);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-out;
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.project-card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(10px);
}

.project-card-3d .card-inner {
    transition: transform 0.3s ease;
}

.project-card-3d:hover .card-inner {
    transform: translateZ(20px);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), #00d4ff, var(--primary-color));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
    padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
    margin-left: 50%;
    text-align: left;
}

.timeline-item:nth-child(even) {
    margin-left: 0;
    text-align: right;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 0;
    box-shadow: 0 0 20px var(--primary-color);
    animation: pulse 2s infinite;
}

.timeline-item:nth-child(odd) .timeline-dot {
    left: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: -10px;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px var(--primary-color); }
    50% { box-shadow: 0 0 40px var(--primary-color); }
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        margin-left: 0 !important;
        padding-left: 50px;
        text-align: left !important;
    }
    
    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }
}

.footer-improved {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 3rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.footer-improved::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

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

.footer-social a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.footer-social a:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--primary-color);
    color: var(--bg-primary);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.5);
}

.back-to-top i {
    color: var(--bg-primary);
    font-size: 1.2rem;
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(0, 123, 255, 0.1);
}

.cursor-dot {
    position: fixed;
    width: 5px;
    height: 5px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
    .custom-cursor,
    .cursor-dot {
        display: none;
    }
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title-line {
    overflow: hidden;
    display: block;
}

.hero-title-line span {
    display: inline-block;
    animation: slideUp 0.8s ease forwards;
    animation-delay: calc(var(--i) * 0.1s);
    opacity: 0;
    transform: translateY(100%);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

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

.hero-buttons {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, transparent 70%);
}

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 2rem 0;
    opacity: 0.3;
}

.hover-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
}

.hover-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 123, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover-card:hover::after {
    opacity: 1;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

.videos-showcase {
    padding: 4rem 0;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    transition: background 0.5s ease;
    overflow: hidden;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.video-wall {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.video-wall-main {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px var(--shadow-color);
}

.video-wall-main video {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.video-expand-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.video-expand-btn:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

[data-theme="light"] .video-expand-btn {
    background: rgba(255, 255, 255, 0.8);
}

.video-wall-info {
    padding: 1.5rem;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.video-wall-info h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-wall-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.video-wall-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.video-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.video-thumb:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.video-thumb.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
}

.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--primary-color);
}

@media (max-width: 991px) {
    .video-wall {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .video-wall-main video {
        height: 300px;
    }
    
    .video-wall-side {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .video-thumb {
        flex: 0 0 calc(50% - 8px);
        min-height: 120px;
    }
    
    .navbar-collapse {
        background: var(--bg-card);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 10px;
        border: 1px solid var(--border-color);
    }
    
    .theme-toggle {
        position: fixed !important;
        top: 15px;
        right: 70px !important;
        width: 44px !important;
        height: 44px !important;
    }
    
    .navbar-toggler {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1001;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .video-wall-main video {
        height: 220px;
    }
    
    .video-thumb {
        flex: 0 0 100%;
        min-height: 100px;
    }
    
    .video-wall-info {
        display: none;
    }
    
    .video-expand-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-image {
        max-width: 200px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .project-card {
        margin-bottom: 1rem;
    }
    
    .footer {
        padding: 1.5rem 0;
    }
}
