/* CSS Reset and Base Styles */
html {
    scroll-behavior: smooth;
}

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

:root {
    --background-color: #0F1419;
    --card-background: #1A2332;
    --primary-color: #D4AF37;
    --text-color: #F5F5DC;
    --text-secondary: #cccccc;
    --transition-speed: 0.4s;
    --glow-color: #FFD700;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 4%;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}

ul {
    list-style: none;
}

/* Header Styles - FIXED for full width */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background-color: #0f14191e;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4%;
    max-width: 1440px;
    margin: 0 auto;
}

.logo {
    transition: transform var(--transition-speed) ease;
}

.logo:hover {
    transform: scale(1.1);
}

.logo svg rect {
    fill: var(--primary-color);
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav ul li a {
    position: relative;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

nav ul li a:before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: all var(--transition-speed) ease;
    box-shadow: 0 0 8px var(--primary-color);
}

nav ul li a:hover:before,
nav ul li a.active:before {
    width: 100%;
}

nav ul li a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 6rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--dark-accent) 100%);
}


.hero-content {
    width: 50%;
    padding-right: 2rem;
    position: relative;
    z-index: 2;
}

.hero-content h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.hero-content p {
    max-width: 400px;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.button-wrapper {
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background-color: transparent;
    border: 1px solid var(--text-secondary);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn .arrow {
    margin-right: 0.8rem;
    transition: transform var(--transition-speed) ease;
}

.btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn:hover .arrow {
    transform: translateX(5px);
}

.hero-image {
    width: 50%;
    position: relative;
    height: 100%;
}

.statue {
    position: absolute;
    height: 600px;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    filter: brightness(0.95) saturate(1.2) contrast(1.1);
    transition: transform 0.8s ease-in-out;
    animation: floatStatue 17s ease-in-out infinite;
}

.statue:hover {
    transform: translateY(-50%) scale(1.02);
    animation-play-state: paused;
}

.statue::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 60% 30%,
        rgba(255, 58, 58, 0.2),
        transparent 70%
    );
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 3;
}

@keyframes floatStatue {
    0%, 100% {
        transform: translateY(-50%) translateX(0px);
    }
    25% {
        transform: translateY(-52%) translateX(-5px);
    }
    50% {
        transform: translateY(-48%) translateX(0px);
    }
    75% {
        transform: translateY(-52%) translateX(5px);
    }
}

.statue-light {
    position: absolute;
    width: 300px;
    height: 700px;
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(212, 175, 55, 0.6) 0%,
        rgba(212, 175, 55, 0.2) 40%,
        rgba(212, 175, 55, 0) 80%
    );
    z-index: 1;
    pointer-events: none;
    filter: blur(20px) brightness(1.2);
    mix-blend-mode: screen;
    animation: pulseLight 4s infinite alternate;
    transform-style: preserve-3d;
}

@keyframes pulseLight {
    0% {
        opacity: 0.7;
        transform: translate(50%, -50%) scale(1);
        filter: blur(20px) brightness(1.2);
    }
    50% {
        opacity: 0.9;
        transform: translate(50%, -50%) scale(1.05);
        filter: blur(25px) brightness(1.4);
    }
    100% {
        opacity: 1;
        transform: translate(50%, -50%) scale(1.1);
        filter: blur(30px) brightness(1.6);
    }
}

/* Sword Sparkle Effects */
.sword-sparkles {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    z-index: 3;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #fff 0%, #FFD700 50%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    animation: sparkleGlow 3s infinite;
    filter: blur(0.5px);
    box-shadow: 
        0 0 6px #FFD700,
        0 0 12px #FFD700,
        0 0 18px #FFD700;
}

.sparkle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 8px;
    background: linear-gradient(to bottom, transparent, #FFD700, transparent);
    border-radius: 1px;
}

.sparkle::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 1px;
    background: linear-gradient(to right, transparent, #FFD700, transparent);
    border-radius: 1px;
}

/* Individual sparkle positions and animations - positioned along the sword blade */
.sparkle-1 {
    top: 15%;
    left: 80%;
    animation-delay: 0s;
    animation-duration: 2.5s;
}

.sparkle-2 {
    top: 20%;
    left: 78%;
    animation-delay: 0.8s;
    animation-duration: 3.2s;
}

.sparkle-3 {
    top: 25%;
    left: 82%;
    animation-delay: 1.5s;
    animation-duration: 2.8s;
}

.sparkle-4 {
    top: 25%;
    left: 79%;
    animation-delay: 2.2s;
    animation-duration: 3.5s;
}

.sparkle-5 {
    top: 25%;
    left: 81%;
    animation-delay: 0.5s;
    animation-duration: 2.2s;
}

.sparkle-6 {
    top: 25%;
    left: 81%;
    animation-delay: 1.8s;
    animation-duration: 3.8s;
}

.sparkle-7 {
    top: 25%;
    left: 83%;
    animation-delay: 2.5s;
    animation-duration: 2.9s;
}

.sparkle-8 {
    top: 25%;
    left: 80%;
    animation-delay: 0.3s;
    animation-duration: 3.1s;
}

.sparkle-9 {
    top: 25%;
    left: 78%;
    animation-delay: 1.2s;
    animation-duration: 2.7s;
}

.sparkle-10 {
    top: 25%;
    left: 84%;
    animation-delay: 0.9s;
    animation-duration: 3.4s;
}

.sparkle-11 {
    top: 25%;
    left: 76%;
    animation-delay: 2.8s;
    animation-duration: 2.3s;
}

.sparkle-12 {
    top: 58%;
    left: 27%;
    animation-delay: 1.6s;
    animation-duration: 3.6s;
}

.sparkle-13 {
    top: 56%;
    left: 23%;
    animation-delay: 0.2s;
    animation-duration: 2.6s;
}

.sparkle-14 {
    top: 57%;
    left: 25%;
    animation-delay: 2.1s;
    animation-duration: 3.3s;
}

.sparkle-15 {
    top: 59%;
    left: 21%;
    animation-delay: 1.4s;
    animation-duration: 2.4s;
}

.sparkle-16 {
    top: 63%;
    left: 19%;
    animation-delay: 0.3s;
    animation-duration: 3.7s;
}

@keyframes sparkleGlow {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    10% {
        opacity: 1;
        transform: scale(1) rotate(45deg);
    }
    90% {
        opacity: 1;
        transform: scale(1.2) rotate(315deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

/* Hover effect to intensify sparkles */
.hero-image:hover .sparkle {
    animation-duration: 1.5s;
    filter: blur(0.3px);
    box-shadow: 
        0 0 8px #FFD700,
        0 0 16px #FFD700,
        0 0 24px #FFD700,
        0 0 32px #FFD700;
}

/* Projects Section */
.projects {
    padding: 8rem 0;
}

.projects h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    position: relative;
}

.projects h2:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--glow-color));
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.project-grid {
    display: flex;
   justify-content: center;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    cursor: pointer;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.view-project {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.eye-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

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

.project-card:hover .view-project {
    transform: translateY(0);
}

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

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.2rem;
}

.project-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 58, 58, 0.2);
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
    padding-right: 60px;
}

.modal-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.modal-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-gallery img:hover {
    transform: scale(1.03);
}

.modal-text {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.modal-tech li {
    background-color: rgba(255, 58, 58, 0.2);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    list-style: none;
}

.modal-tech li:hover {
    background-color: rgba(255, 58, 58, 0.3);
    transform: translateY(-2px);
}

/* Footer */
footer {
    display: flex;
    text-align: center;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    font-weight: 600;
    transition: color var(--transition-speed) ease;
}

.social-link:hover {
    color: var(--primary-color);
}

/* Mobile Responsive Design */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        width: 100%;
        padding-right: 0;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .hero-image {
        width: 100%;
        margin-top: 3rem;
        height: 400px;
    }

    .red-circle {
        right: 50%;
        transform: translate(50%, -50%);
    }
    
    .statue-light {
        right: 50%;
        transform: translate(50%, -50%);
    }

    .statue {
        right: 50%;
        transform: translate(50%, -50%);
    }

    /* Adjust sparkles for tablet view */
    .sword-sparkles {
        right: 50%;
        transform: translate(50%, -50%);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem 4%;
    }

    nav ul {
        gap: 1rem;
    }

    /* Mobile Hero Adjustments */
    .hero {
        padding-top: 4rem;
        min-height: 70vh;
        padding-bottom: 2rem;
    }

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

    .hero-content h3 {
        font-size: 0.9rem;
    }

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

    /* HIDE HERO IMAGE ON MOBILE (including sparkles) */
    .hero-image {
        display: none;
    }

    .hero-content {
        width: 100%;
    }

    /* Reduce spacing between hero and projects */
    .projects {
        padding: 3rem 0;
    }

    .projects h2 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    /* Mobile Modal Improvements */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 2rem;
        padding-right: 50px;
        margin-bottom: 1rem;
    }
    
    .modal-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }

    .modal-gallery img {
        height: 180px;
    }

    .modal-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .modal-tech {
        gap: 0.8rem;
        margin: 1.5rem 0;
    }

    .modal-tech li {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    /* Project Grid Mobile */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-image {
        height: 180px;
    }

    footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    nav ul {
        gap: 0.8rem;
    }

    nav ul li a {
        font-size: 0.8rem;
    }

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

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

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

    .modal-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .header-content {
        padding: 0.8rem 3%;
    }

    .hero {
        padding-top: 3.5rem;
    }
}