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

:root {
    --primary-black: #0a0e27;
    --secondary-black: #1a1f3a;
    --text-white: #ffffff;
    --text-light: #e8e8e8;
    --accent-blue: #0066cc;
    --accent-gold: #c4933a;
    --border-color: #2a2f4a;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
    --glow-blue: 0 0 15px rgba(0, 102, 204, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background-color: var(--primary-black);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    background-color: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-blue);
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo:hover {
    color: var(--accent-gold);
}

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

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--text-white);
    padding: 120px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 102, 204, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-white);
    min-height: 4rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-weight: 300;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-blue);
    color: var(--text-white);
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--accent-blue);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-blue);
    background-color: transparent;
    color: var(--accent-blue);
}

/* About Section */
.about {
    padding: 80px 20px;
    background-color: var(--primary-black);
}

.about h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-white);
    font-weight: 700;
}

.about > .container > p {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 3rem;
    text-align: center;
    line-height: 1.8;
    font-weight: 300;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-card {
    background: linear-gradient(135deg, var(--secondary-black) 0%, rgba(0, 102, 204, 0.05) 100%);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md), var(--glow-blue);
}

.about-card h3 {
    color: var(--accent-blue);
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.about-card ul {
    list-style: none;
}

.about-card li {
    color: var(--text-light);
    margin-bottom: 0.7rem;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.95rem;
    font-weight: 300;
}

.about-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: 600;
}

/* Image Carousel Section */
.image-carousel-section {
    padding: 60px 20px;
    background-color: var(--primary-black);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.image-carousel {
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--secondary-black) 0%, rgba(0, 102, 204, 0.05) 100%);
    height: 300px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-image-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

.carousel-image-item.active {
    opacity: 1;
}

.carousel-image-item svg {
    width: 100%;
    height: 100%;
}

.carousel-arrow {
    background-color: var(--accent-blue);
    color: var(--text-white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.carousel-arrow:hover {
    background-color: var(--accent-gold);
    transform: scale(1.1);
}

/* Projects Section */
.projects {
    padding: 80px 20px;
    background-color: var(--primary-black);
}

.projects h2 {
    font-size: 2.8rem;
    margin-bottom: 4rem;
    text-align: center;
    color: var(--text-white);
    font-weight: 700;
}

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

.project-card {
    background: linear-gradient(135deg, var(--secondary-black) 0%, rgba(0, 102, 204, 0.05) 100%);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg), var(--glow-blue);
}

.project-image-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 400 / 250;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide svg {
    width: 100%;
    height: 100%;
}

.image-nav {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
}

.img-arrow {
    background-color: rgba(0, 102, 204, 0.8);
    color: var(--text-white);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.img-arrow:hover {
    background-color: var(--accent-blue);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--accent-blue);
    width: 20px;
    border-radius: 3px;
}

.project-info {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    color: var(--text-white);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-size: 0.95rem;
    font-weight: 300;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.tech-badge {
    background-color: rgba(0, 102, 204, 0.15);
    color: var(--accent-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 102, 204, 0.3);
    font-weight: 500;
}

.github-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.github-link:hover {
    gap: 0.8rem;
    color: var(--accent-gold);
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--secondary-black);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.close-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: var(--secondary-black);
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    transform: rotate(90deg);
    background-color: var(--accent-blue);
    color: var(--text-white);
}

.modal-header {
    width: 100%;
}

.modal-image-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 800 / 400;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-gallery-slide.active {
    opacity: 1;
}

.modal-gallery-slide svg {
    width: 100%;
    height: 100%;
}

.modal-gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.modal-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-gallery-dot.active {
    background-color: var(--accent-blue);
    width: 24px;
    border-radius: 4px;
}

.modal-body {
    padding: 2.5rem;
}

.modal-body h2 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.modal-left h3, .modal-right h3 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-left p, .detail-item p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-weight: 300;
}

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

.detail-item strong {
    color: var(--accent-gold);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-gallery {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.modal-gallery h3 {
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 300 / 200;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--glow-blue);
    transform: scale(1.03);
}

.gallery-item svg {
    width: 100%;
    height: 100%;
}

/* Gallery Popup */
.gallery-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.gallery-popup.active {
    display: flex;
}

.popup-close {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    transform: rotate(90deg);
    background-color: var(--accent-blue);
    color: var(--text-white);
}

.popup-image {
    max-width: 800px;
    width: 100%;
    animation: slideUp 0.3s ease;
}

.popup-image svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Footer */
.footer {
    background-color: var(--secondary-black);
    color: var(--text-light);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-weight: 300;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

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

    .about h2, .projects h2 {
        font-size: 2rem;
    }

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

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

    .modal-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        top: 20px;
        right: 20px;
    }

    .modal-body {
        padding: 1.5rem;
    }

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

    .carousel-wrapper {
        gap: 1rem;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .image-carousel {
        height: 250px;
    }
}