/* Global Variables - Modern Dark Mode with Neon Accents */
:root {
    --primary-color: #00bcd4; /* Neon Cyan */
    --secondary-color: #ffeb3b; /* Neon Yellow/Amber */
    --bg-dark-primary: #121212; /* Very Dark Background */
    --bg-dark-secondary: #1a1a1a; /* Slightly Lighter Dark Background */
    --text-light: #ffffff; /* Main Light Text */
    --text-secondary: #b0b0b0; /* Secondary Light Text */
    --card-bg: #1f1f1f; /* Card Background */
    --border-color: #333333; /* Subtle Border */
    --shadow-light: rgba(0, 188, 212, 0.3); /* Soft Neon Shadow */
    --shadow-dark: rgba(0, 0, 0, 0.6); /* Darker Shadow for depth */
}

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

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    background-color: var(--bg-dark-primary);
    color: var(--text-light);
    text-align: right;
    direction: rtl;
    transition: background-color 0.5s ease-in-out;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

a:hover {
    opacity: 0.8;
    color: var(--secondary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-shadow: 0 0 8px var(--shadow-light);
}

h2 {
    font-size: 2.5em;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
    margin-top: 30px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title span {
    color: var(--secondary-color);
    text-shadow: 0 0 8px rgba(255, 235, 59, 0.4);
}

.highlight {
    color: var(--secondary-color);
}

.light-text {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1em;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow-dark);
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--bg-dark-primary);
    border: none;
}

.btn.primary:hover {
    background-color: var(--secondary-color);
    color: var(--bg-dark-primary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 235, 59, 0.5);
}

/* Social Buttons */
.social-links {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: 50px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1em;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
    box-shadow: 0 4px 15px var(--shadow-dark);
}

.social-btn i {
    margin-left: 10px;
    font-size: 1.3em;
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

/* Specific Social Button Colors & Hover */
.whatsapp { background-color: #25D366; }
.whatsapp:hover { background-color: #1DA851; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5); }

.tiktok { background-color: #000000; border: 2px solid #ffffff; }
.tiktok:hover { background-color: #222222; border-color: var(--primary-color); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8); }

.telegram { background-color: #0088CC; }
.telegram:hover { background-color: #006AA7; box-shadow: 0 8px 20px rgba(0, 136, 204, 0.5); }

.contact-me { background-color: var(--primary-color); }
.contact-me:hover { background-color: var(--secondary-color); box-shadow: 0 8px 20px var(--shadow-light); color: var(--bg-dark-primary); }


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark-primary) 0%, var(--bg-dark-secondary) 100%);
    padding: 100px 0 80px 0;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    overflow: hidden; /* For animations */
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 30px;
    border: 8px solid var(--primary-color);
    box-shadow: 0 0 25px var(--shadow-light);
    animation: glow 3s infinite alternate, pulse 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 15px var(--shadow-light); }
    to { box-shadow: 0 0 30px var(--primary-color); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.hero-section h1 {
    font-size: 4.5em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-section h2 {
    font-size: 1.8em;
    color: var(--text-secondary);
    margin-top: 10px;
    margin-bottom: 40px;
    border-bottom: none;
    text-shadow: none;
}

.hero-section .bio {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.3em;
    color: var(--text-light);
    line-height: 1.8;
}

/* Animations for Hero Section Text */
.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
}

.hero-section h1.animate-text { animation-delay: 0.3s; }
.hero-section h2.animate-text { animation-delay: 0.6s; }
.hero-section .bio.animate-text { animation-delay: 0.9s; }
.hero-section .social-links.animate-element { animation-delay: 1.2s; }


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


/* General Section Styling */
.section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-dark-primary);
}

.section:nth-of-type(even) {
    background-color: var(--bg-dark-secondary);
}

/* Project Kashef Section */
.project-kashef-section {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(160deg, var(--bg-dark-secondary) 0%, #1e1e1e 100%);
}

.project-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin-top: 50px;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-dark);
    border: 1px solid var(--primary-color);
}

.project-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 20px var(--shadow-light);
    transition: transform 0.5s ease;
}
.project-image img:hover {
    transform: scale(1.03);
}

.project-info {
    flex: 1;
    min-width: 300px;
    text-align: right;
}

.project-info h3 {
    font-size: 2.2em;
    margin-bottom: 20px;
}

.project-info p {
    font-size: 1.15em;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.project-btn {
    margin-top: 25px;
    padding: 15px 30px;
    font-size: 1.2em;
}


/* Experience Section - Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    right: 50%;
    margin-right: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    right: 0;
}

.timeline-item:nth-child(even) {
    left: 0;
}

.timeline-dot {
    height: 18px;
    width: 18px;
    background-color: var(--primary-color);
    position: absolute;
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 12px var(--primary-color);
    animation: dotPulse 1.5s infinite alternate;
}

@keyframes dotPulse {
    from { transform: scale(0.9); opacity: 0.7; }
    to { transform: scale(1.1); opacity: 1; }
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -9px;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: -9px;
}

.timeline-content {
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 20px var(--shadow-dark);
    transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out;
    border-left: 3px solid transparent;
}

.timeline-content:hover {
    transform: translateY(-8px) scale(1.02);
    border-left-color: var(--primary-color);
}

.timeline-content h3 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-shadow: none;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 1.05em;
}

/* Skills Section - Tags */
.skills-section {
    text-align: center;
    background-color: var(--bg-dark-primary);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.skill-tag {
    background-color: var(--card-bg);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease-in-out;
    cursor: default;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark-primary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
    border-color: var(--secondary-color);
}

/* Portfolio Section */
.portfolio-section {
    background-color: var(--bg-dark-secondary);
}

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

.project-card {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 6px 25px var(--shadow-dark);
    transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out;
    border-bottom: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 188, 212, 0.1) 0%, rgba(255, 235, 59, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

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

.project-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-bottom-color: var(--secondary-color);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8em;
    text-shadow: none;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.7;
}

.project-link {
    display: inline-block;
    font-weight: 700;
    margin-top: 15px;
    color: var(--secondary-color);
    border-bottom: 2px dashed var(--secondary-color);
    padding-bottom: 3px;
    transition: all 0.3s ease-in-out;
}

.project-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    transform: translateX(-5px);
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-dark-primary);
    text-align: center;
    padding-bottom: 100px;
}

.contact-form {
    max-width: 600px;
    margin: 50px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-dark);
    border: 1px solid var(--border-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: var(--text-light);
    font-family: 'Cairo', sans-serif;
    font-size: 1.1em;
    width: 100%;
    resize: vertical;
    transition: all 0.3s ease-in-out;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-light);
    outline: none;
}

.contact-form button[type="submit"] {
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 15px;
    margin-top: 10px;
}

/* Footer */
footer {
    background-color: #0d0d0d;
    color: var(--text-secondary);
    text-align: center;
    padding: 30px 0;
    font-size: 0.95em;
    border-top: 1px solid var(--border-color);
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 3.5em;
    }
    .hero-section h2 {
        font-size: 1.5em;
    }
    .project-details {
        flex-direction: column;
        gap: 30px;
    }
    .project-image {
        width: 100%;
    }
    .project-info {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 20px 0;
    }
    h2 {
        font-size: 2em;
    }
    .hero-section h1 {
        font-size: 3em;
    }
    .hero-section h2 {
        font-size: 1.3em;
    }
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .timeline::after {
        right: 18px; /* Timeline line to the side */
    }
    .timeline-item {
        width: 100%;
        padding-right: 40px;
        padding-left: 10px;
    }
    .timeline-item:nth-child(even) {
        left: auto;
    }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        right: auto;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2.5em;
    }
    .hero-section .bio {
        font-size: 1.1em;
    }
    .project-info h3 {
        font-size: 1.8em;
    }
    .skill-tag {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}