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

:root {
    --primary-gold: #d4af37;
    --primary-purple: #9370db;
    --gold-light: #f9e7a8;
    --gold-dark: #b8941f;
    --purple-dark: #7a5dc9;
    --bg-dark: #050508;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-light: #f8fafc;
    --text-muted: #cbd5e1;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    padding: 12px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-gold), var(--primary-purple));
    transition: width 0.4s ease;
}

.nav-links a:hover {
    color: var(--primary-gold);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-gold);
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: rotate(90deg);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 30px 80px;
}

.hero .container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-purple), var(--gold-light));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

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

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: var(--bg-dark);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
}

.btn-secondary:hover {
    background: var(--primary-gold);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.2s ease 0.3s both;
}

.profile-image-container {
    position: relative;
    width: 380px;
    height: 380px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid transparent;
    background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
                linear-gradient(135deg, var(--primary-gold), var(--primary-purple)) border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 60px rgba(212, 175, 55, 0.15);
    animation: float 3s ease-in-out infinite;
}

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

.profile-glow {
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(147, 112, 219, 0.15));
    filter: blur(40px);
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

section {
    padding: 100px 30px;
    position: relative;
    z-index: 1;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about {
    background: linear-gradient(180deg, transparent, rgba(147, 112, 219, 0.05), transparent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 20px;
    color: var(--primary-gold);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.9;
    font-size: 1.05rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.skill-tag {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(147, 112, 219, 0.15));
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-gold);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(147, 112, 219, 0.25));
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.about-image {
    position: relative;
}

.about-image-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.about-image-decoration {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 3px solid var(--primary-gold);
    border-radius: 20px;
    top: -25px;
    right: -25px;
    z-index: -1;
    animation: rotate 10s linear infinite;
}

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

.projects {
    background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.03), transparent);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
    transition: left 0.7s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 50px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

.project-screenshot {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.5s ease;
}

.project-card:hover .project-screenshot {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.project-overlay {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    height: 200px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(5, 5, 8, 0.7), rgba(5, 5, 8, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

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

.project-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: all 0.4s ease 0.1s;
}

.project-card:hover .project-icon {
    transform: scale(1);
}

.project-icon i {
    font-size: 2rem;
    color: var(--bg-dark);
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.98rem;
}

.project-link {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.project-link:hover {
    gap: 15px;
}

.contact {
    background: linear-gradient(180deg, transparent, rgba(147, 112, 219, 0.05), transparent);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 15px;
    transition: all 0.4s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-item i {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-gold);
}

.contact-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-gold);
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    padding: 40px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: rgba(5, 5, 8, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

footer {
    background: rgba(5, 5, 8, 0.9);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding: 40px 30px;
    position: relative;
    z-index: 1;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.4s ease;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: var(--bg-dark);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 30px;
    padding: 50px;
    max-width: 650px;
    width: 100%;
    position: relative;
    animation: modalSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 80px rgba(212, 175, 55, 0.1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 25px;
    left: 25px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--primary-gold);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 1.3rem;
}

.modal-close:hover {
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: var(--bg-dark);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.modal-screenshot {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 2;
    margin-bottom: 30px;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 35px;
}

.tech-tag {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-gold);
}

.modal-btn {
    width: 100%;
    justify-content: center;
}

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

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

@media (max-width: 992px) {
    .hero .container,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .about-image {
        order: -1;
    }

    .profile-image-container {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(5, 5, 8, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        border-left: 1px solid rgba(212, 175, 55, 0.2);
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        border-radius: 0 0 0 20px;
        width: 250px;
    }

    .nav-links.active {
        display: flex;
        animation: slideInRight 0.3s ease;
    }

    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(100%);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .mobile-menu-btn {
        display: block;
    }

    section {
        padding: 70px 20px;
    }

    .hero {
        padding: 100px 20px 60px;
    }

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

    .contact-form {
        padding: 30px;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
    }

    .modal {
        padding: 35px;
    }

    .modal-screenshot {
        height: 220px;
    }

    .modal h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .profile-image-container {
        width: 250px;
        height: 250px;
    }

    .btn {
        padding: 14px 30px;
        font-size: 0.95rem;
    }

    .project-card {
        padding: 25px;
    }

    .project-screenshot {
        height: 180px;
    }

    .project-overlay {
        height: 180px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .modal {
        padding: 25px;
    }

    .modal-screenshot {
        height: 200px;
    }

    .modal h2 {
        font-size: 1.4rem;
    }
}
