:root {
    --bg-dark: #090d16;
    --card-bg: rgba(22, 31, 48, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary-neon: #00f2fe;
    --secondary-neon: #4facfe;
    --accent-purple: #7000ff;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --gradient: linear-gradient(135deg, var(--primary-neon), var(--accent-purple));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    background-color: var(--bg-dark);
    color: var(--text-main);
    position: relative;
}

#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#intro-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.intro-content {
    text-align: center;
}

.intro-logo {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: zoomIn 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.intro-text {
    color: var(--text-muted);
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-top: 10px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.intro-loader {
    width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: var(--gradient);
    animation: loadBar 1.8s ease-in-out forwards;
}

@keyframes zoomIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes loadBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.glow-1, .glow-2 {
    position: fixed;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.2s ease-out;
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(80px);
}

.glow-2 {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(112, 0, 255, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(80px);
}

section, nav, footer {
    position: relative;
    z-index: 2;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--primary-neon);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-neon);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

section {
    padding: 100px 8%;
    width: 100%;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-muted);
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 120px;
}

.hero-badge {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--primary-neon);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 650px;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 35px;
}

.cta-btns {
    display: flex;
    gap: 15px;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 242, 254, 0.25);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 45px;
}

.tech-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.about-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 850px;
    margin: 0 auto;
    backdrop-filter: blur(12px);
    line-height: 1.8;
}

.about-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-neon);
}

.about-info p {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 20px;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-neon);
}

.service-icon {
    font-size: 2rem;
    color: var(--primary-neon);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.portfolio-slider-container {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.portfolio-grid {
    display: flex;
    gap: 25px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-item {
    flex: 0 0 calc((100% - 50px) / 3);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary-neon);
}

.portfolio-img {
    width: 100%;
    height: 220px;
    background: #1a2234;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.6);
    transition: all 0.3s ease;
    z-index: 3;
}

.portfolio-item:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.9);
}

.portfolio-info {
    padding: 20px;
}

.portfolio-info h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.portfolio-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.slider-arrow {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
}

.slider-arrow:hover:not(:disabled) {
    background: var(--gradient);
    border-color: transparent;
}

.slider-arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.video-modal.active { display: flex; }

.modal-content {
    width: 90%;
    max-width: 900px;
    height: 70vh;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
}

.contact-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    max-width: 650px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 10px;
    color: #fff;
    outline: none;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-neon);
}

.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.active {
    display: flex;
    opacity: 1;
}

.custom-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-modal.active .custom-modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.custom-modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.custom-modal-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.custom-modal-content button {
    width: 100%;
    padding: 12px;
}

footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.dev-credit { margin-top: 6px; font-size: 0.85rem; }
.dev-credit a { color: var(--primary-neon); text-decoration: none; }

@media (max-width: 992px) {
    .portfolio-item { flex: 0 0 calc((100% - 25px) / 2); }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(9, 13, 22, 0.95);
        padding: 20px 0;
        gap: 15px;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active { display: flex; }
    section { padding: 80px 5%; }
    .hero { padding-top: 100px; }
    .cta-btns { flex-direction: column; width: 100%; }
    .portfolio-item { flex: 0 0 100%; }
}