/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #0a0a0a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 5D Dynamic Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(64, 224, 208, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, rgba(15, 12, 41, 0.9) 0%, rgba(48, 43, 99, 0.8) 50%, rgba(36, 36, 62, 0.9) 100%);
    z-index: -2;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { 
        transform: translateX(0) translateY(0) scale(1);
        filter: hue-rotate(0deg);
    }
    25% { 
        transform: translateX(-20px) translateY(-30px) scale(1.05);
        filter: hue-rotate(90deg);
    }
    50% { 
        transform: translateX(30px) translateY(20px) scale(0.95);
        filter: hue-rotate(180deg);
    }
    75% { 
        transform: translateX(-10px) translateY(40px) scale(1.02);
        filter: hue-rotate(270deg);
    }
}

/* Animated geometric shapes */
.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphFloat 15s ease-in-out infinite;
    opacity: 0.1;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #40e0d0, #667eea);
    top: 60%;
    right: 20%;
    animation-delay: 5s;
}

.shape:nth-child(3) {
    width: 250px;
    height: 250px;
    background: linear-gradient(45deg, #764ba2, #40e0d0);
    bottom: 10%;
    left: 60%;
    animation-delay: 10s;
}

@keyframes morphFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        transform: translateY(-30px) rotate(90deg) scale(1.1);
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    50% {
        transform: translateY(20px) rotate(180deg) scale(0.9);
        border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
    }
    75% {
        transform: translateY(-10px) rotate(270deg) scale(1.05);
        border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    }
}

/* 5D Letter Animation Effects */
.letter-3d {
    display: inline-block;
    transform-style: preserve-3d;
    animation: letter3DFloat 3s ease-in-out infinite;
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px rgba(102, 126, 234, 0.8),
        0 0 35px rgba(118, 75, 162, 0.6),
        0 0 40px rgba(64, 224, 208, 0.4);
}

.letter-3d:nth-child(odd) {
    animation-delay: 0.1s;
    animation-direction: reverse;
}

.letter-3d:nth-child(even) {
    animation-delay: 0.3s;
}

@keyframes letter3DFloat {
    0%, 100% {
        transform: 
            translateZ(0px) 
            rotateX(0deg) 
            rotateY(0deg) 
            scale(1);
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px rgba(102, 126, 234, 0.8),
            0 0 35px rgba(118, 75, 162, 0.6),
            0 0 40px rgba(64, 224, 208, 0.4);
    }
    25% {
        transform: 
            translateZ(20px) 
            rotateX(15deg) 
            rotateY(-10deg) 
            scale(1.05);
        text-shadow: 
            -2px -2px 0 rgba(102, 126, 234, 0.9),
            -4px -4px 0 rgba(118, 75, 162, 0.8),
            -6px -6px 0 rgba(64, 224, 208, 0.7),
            -8px -8px 10px rgba(0, 0, 0, 0.3),
            0 0 20px currentColor,
            0 0 30px rgba(102, 126, 234, 1),
            0 0 40px rgba(118, 75, 162, 0.8);
    }
    50% {
        transform: 
            translateZ(30px) 
            rotateX(-10deg) 
            rotateY(15deg) 
            scale(1.1);
        text-shadow: 
            2px -2px 0 rgba(102, 126, 234, 0.9),
            4px -4px 0 rgba(118, 75, 162, 0.8),
            6px -6px 0 rgba(64, 224, 208, 0.7),
            8px -8px 10px rgba(0, 0, 0, 0.3),
            0 0 25px currentColor,
            0 0 35px rgba(102, 126, 234, 1),
            0 0 45px rgba(64, 224, 208, 1);
    }
    75% {
        transform: 
            translateZ(15px) 
            rotateX(20deg) 
            rotateY(-5deg) 
            scale(1.03);
        text-shadow: 
            -1px 2px 0 rgba(102, 126, 234, 0.9),
            -2px 4px 0 rgba(118, 75, 162, 0.8),
            -3px 6px 0 rgba(64, 224, 208, 0.7),
            -4px 8px 10px rgba(0, 0, 0, 0.3),
            0 0 15px currentColor,
            0 0 25px rgba(118, 75, 162, 1),
            0 0 35px rgba(64, 224, 208, 0.9);
    }
}

/* Modal Title Animation */
.modal-title-animated {
    animation: modalTitleReveal 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalTitleReveal {
    0% {
        opacity: 0;
        transform: 
            translateY(50px) 
            translateZ(-100px) 
            rotateX(90deg) 
            scale(0.5);
        filter: blur(20px);
    }
    50% {
        opacity: 0.7;
        transform: 
            translateY(10px) 
            translateZ(20px) 
            rotateX(20deg) 
            scale(0.9);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: 
            translateY(0) 
            translateZ(0) 
            rotateX(0deg) 
            scale(1);
        filter: blur(0px);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: transparent;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    height: 400px;
}

.floating-element {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 20%;
    left: 50%;
    animation-delay: 4s;
}

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

/* Projects Section */
.projects {
    padding: 100px 0;
    background: rgba(15, 15, 25, 0.9);
    backdrop-filter: blur(20px);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #40e0d0, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(64, 224, 208, 0.5);
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { 
        text-shadow: 0 0 30px rgba(64, 224, 208, 0.5);
        transform: scale(1);
    }
    100% { 
        text-shadow: 0 0 50px rgba(102, 126, 234, 0.8), 0 0 70px rgba(118, 75, 162, 0.6);
        transform: scale(1.02);
    }
}

.section-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.project-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-icon i {
    font-size: 1.5rem;
    color: white;
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.project-tagline {
    font-style: italic;
    color: #40e0d0;
    margin-bottom: 1rem;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
}

.project-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.learn-more-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.learn-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* About Section */
.about {
    padding: 100px 0;
    background: white;
}

.about-content {
    text-align: center;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content > p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    padding: 2rem;
    text-align: center;
}

.feature i {
    font-size: 3rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.feature p {
    color: #666;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    font-size: 1.3rem;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    backdrop-filter: blur(20px);
    animation: modalFadeIn 0.5s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(20px);
    }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%) scale(0.8) rotateX(20deg);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1) rotateX(0deg);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.modal-project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.modal-project-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-project-icon i {
    font-size: 2rem;
    color: white;
}

.modal-project-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    animation: letterFloat 2s ease-in-out infinite;
}

.modal-project-tagline {
    font-style: italic;
    color: #40e0d0;
    font-size: 1.1rem;
    text-shadow: 0 0 15px rgba(64, 224, 208, 0.6);
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    padding-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
}

.modal-section p, .modal-section ul {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-section ul {
    padding-left: 1.5rem;
}

.modal-section li {
    margin-bottom: 0.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.feature-item h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.9rem;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

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

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

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .modal-project-header {
        flex-direction: column;
        text-align: center;
    }
}