@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Dancing+Script:wght@400..700&family=Great+Vibes&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

html, body {
    padding: 0;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/** ------------------------------------------------- Navbar ------------------------------------------------------------*/
.navbar {
    position: fixed;
    background-color: #ffffff;
    width: 100%;
    height: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 40px;
    font-family: 'Dancing Script', cursive;
    text-decoration: none;
    color: #000000;
}

.navbar-links {
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-size: large;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    gap: 15px;
}

.navbar-links a {
    text-decoration: none;
    color: black;
    transition: all 0.2s ease; /* Faster transition for snappy feel */
}

.navbar-links a:hover {
    transform: scale(1.1); /* Larger scale for clearer feedback */
    background-color: rgba(0, 0, 0, 0.1); /* Stronger background */
    color: #333; /* Darker text on hover */
}

.navbar-links a:active {
    transform: scale(0.95); /* Shrink on tap */
    background-color: rgba(0, 0, 0, 0.2);
}

/* مجموعة الروابط (في الوسط) */
.nav-center {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex: 1;
}

/* زر الـ CV (على اليمين) */
.navbar-links .nav-btn {
    margin-left: auto;
    color: #000000;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.navbar-links .nav-btn:hover {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.navbar-links .nav-btn:active {
    transform: scale(0.95);
    background-color: #333333;
}

/* أيقونة البرجر */
.burger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    margin-left: auto;
}

/* =============================
    Responsive - Mobile and Tablet (up to 1024px)
   ============================= */
@media (max-width: 1024px) {
    .navbar {
        height: 60px;
    }

    .logo {
        font-size: 32px;
    }

    .burger {
        display: block !important;
        color: black;
        margin-right: 22px;
    }

    .navbar-container {
        padding: 0 15px;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100vw;
        flex-direction: column;
        align-items: center;
        background: white;
        padding: 20px 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 999;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .navbar-links.active {
        display: flex;
        animation: fadeIn 0.3s ease-out; /* Simplified fade-in animation */
    }

    .nav-center {
        flex-direction: column;
        width: 100%;
        gap: 10px; /* Reduced gap for better fit */
        align-items: center; /* Center align items */
    }

    .navbar-links a {
        padding: 15px 25px; /* Adjusted padding for better touch targets */
        width: 80%; /* Constrain width for centering */
        text-align: center;
        border-bottom: 1px solid #eee;
        transition: all 0.2s ease;
        opacity: 0;
        transform: translateY(10px); /* Smaller translate for faster animation */
    }

    .navbar-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger animations for links and button */
    .navbar-links.active .nav-center a:nth-child(1) { transition-delay: 0.05s; }
    .navbar-links.active .nav-center a:nth-child(2) { transition-delay: 0.1s; }
    .navbar-links.active .nav-center a:nth-child(3) { transition-delay: 0.15s; }
    .navbar-links.active .nav-center a:nth-child(4) { transition-delay: 0.2s; }
    .navbar-links.active .nav-center a:nth-child(5) { transition-delay: 0.25s; }
    .navbar-links.active .nav-btn { transition-delay: 0.3s; }

    .navbar-links a:hover {
        background-color: #f0f0f0; /* Stronger hover background */
        transform: scale(1.05); /* Subtle scale */
        color: #000; /* Ensure text contrast */
    }

    .navbar-links a:active {
        transform: scale(0.95);
        background-color: #d0d0d0; /* Darker on tap */
    }

    .navbar-links .nav-btn {
        margin: 20px auto 10px; /* Auto margins for centering */
        width: 80%; /* Match link width for consistency */
        padding: 12px 0 12px 31%; /* Adjusted padding for better fit */
        transition: all 0.2s ease;
        opacity: 0;
        transform: translateY(10px);
    }

    .navbar-links.active .nav-btn {
        opacity: 1;
        transform: translateY(0);
    }

    .navbar-links .nav-btn:hover {
        background-color: #000000;
        color: #ffffff;
        transform: scale(1.05);
    }

    .navbar-links .nav-btn:active {
        transform: scale(0.95);
        background-color: #333333;
    }
}

/* Keyframe for simplified menu animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/** ------------------------------------------------- Main section ------------------------------------------------------------*/
.main-section {
    background-image: url('../media/imagedark.png');
    height: 100vh;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-section {
    border: 2px solid white;
    width: 50%;
    height: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.intro-text {
    font-size: 3.6rem;
    font-family: 'Montserrat', sans-serif;
}

.small-text-intro {
    font-family: 'Montserrat', sans-serif;
    margin-top: 20px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =============================
    Main Section - Responsive
   ============================= */
@media (max-width: 768px) {
    .main-section {
        padding: 40px 10px;
        height: auto;
        display: block;
    }

    .intro-section {
        width: 90%;
        height: auto;
        padding: 20px;
        text-align: center;
        margin: 30px auto;
    }

    .intro-text {
        font-size: 1.8rem;
        line-height: 1.4;
    }

    .small-text-intro {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .intro-section {
        width: 70%;
        height: 35%;
        padding: 30px;
    }

    .intro-text {
        font-size: 2.8rem;
    }

    .small-text-intro {
        font-size: 1.2rem;
    }
}

@media (min-width: 1025px) {
    .intro-section {
        width: 50%;
        height: 50%;
    }

    .intro-text {
        font-size: 3.6rem;
    }

    .small-text-intro {
        font-size: 1.5rem;
    }
}

/** ------------------------------------------------ About me --------------------------------------------------------- */
/** ------------------------------------------------ About me --------------------------------------------------------- */
.aboutme-section {
    background: linear-gradient(to bottom, #0A0A0A, #000000);
    color: #fff;
    padding: 100px 20px;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    font-family: 'Montserrat', sans-serif;
    color: #DBDBDB;
}

.about-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: auto;
}

.about-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 1 1 500px;
    font-size: 1.1rem;
    line-height: 1.8;
    font-family: 'Inter', sans-serif;
    padding: 20px; /* Added padding for better text breathing room */
}

.about-text h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffcc00;
}

.about-intro, .about-details {
    margin-bottom: 20px; /* Added spacing between paragraphs */
}

.about-highlights {
    list-style: none;
    padding-left: 0;
    margin: 20px 0; /* Added margin for separation */
}

.about-highlights li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 500; /* Slightly bolder for emphasis */
}

.about-highlights i {
    color: #ffd700;
    margin-right: 10px;
}

.about-btn {
    display: inline-block;
    padding: 12px 20px;
    background: #ffd700;
    color: #111;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
    margin-top: 20px; /* Added margin to separate from highlights */
}

.about-btn:hover {
    background: #e6c200;
    transform: translateY(-3px); /* Slight lift on hover */
}

.about-btn i {
    margin-right: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .aboutme-section {
        padding: 60px 10px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .about-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        width: 180px;
        height: 180px;
    }

    .about-text {
        font-size: 1rem;
        padding: 10px;
    }

    .about-text h3 {
        font-size: 2rem;
    }

    .about-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .main-section {
        background-size: cover;
        padding-top: 60px;
        height: auto;
    }

    .intro-section {
        width: 70%;
        height: 70%;
        padding: 5%;
        text-align: center;
    }

    .intro-text {
        font-size: 2rem;
    }

    .small-text-intro {
        font-size: 1.2rem;
        flex-direction: column;
    }

    .about-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        width: 180px;
        height: 180px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .about-text h3 {
        font-size: 2rem;
    }
}

/** ------------------------------------------------------------- Skills -------------------------------------------- */
.skills-section {
    background: linear-gradient(to bottom, #0A0A0A, #000000);
    padding: 80px 20px;
    background-color: #f9f9f9;
}

.skills-section .container {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.skill-card {
    background-color: #1e1e1e;
    color: #f1f1f1;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.skill-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.skill-card span {
    font-size: 16px;
    font-weight: 500;
}

/** --------------------------------------------------------- Projects section -----------------------------------------*/
.projects-section {
    padding: 80px 20px;
    background: linear-gradient(to bottom, #0A0A0A, #000000);
    color: #fff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.project-card {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

/* Existing project image styling */
.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* Responsive adjustments for mobile (up to 768px) */
@media (max-width: 768px) {
    .project-card img {
        height: auto; /* Allow height to adjust based on aspect ratio */
        min-height: 150px; /* Minimum height for visibility */
        object-fit: contain; /* Ensure the entire image is visible */
    }

    .project-card {
        flex-direction: column; /* Stack image and info vertically if not already */
        height: auto; /* Allow card to adjust height */
    }

    .project-info {
        padding: 15px; /* Reduce padding for smaller screens */
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Single column layout on mobile */
        gap: 20px; /* Reduce gap between cards */
    }
}

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 20px;
    color: #ffd700;
}

.project-info p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-btn {
    display: inline-block;
    padding: 10px 15px;
    background: #ffd700;
    color: #111;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.project-btn:hover {
    background: #e6c200;
}

/** ------------------------------------------------------- Contact me -------------------------------------------------------*/
.contact-section {
    padding: 80px 20px;
    background: linear-gradient(to bottom, #0A0A0A, #000000);
    color: #BCB8AF;
    text-align: center;
}

.section-title {
    font-size: 36px;
    color: #DBDBDB;
    font-weight: bold;
    margin-bottom: 50px;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-card {
    flex: 1 1 300px;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 50px 30px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.contact-card i {
    font-size: 50px;
    color: #e6c200;
    margin-bottom: 20px;
}

.contact-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #e6c200;
}

.contact-card p {
    font-size: 16px;
    opacity: 0.85;
}

/** ------------------------------------------------------ Footer -----------------------------------------------------------*/
.footer {
    background: #0d0d0d;
    color: #DBDBDB;
    padding: 60px 20px 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-brand h2 {
    color: #ffd700;
    font-size: 26px;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 30px;
}

.footer-socials {
    margin-bottom: 25px;
}

.footer-socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #ffd700;
    font-size: 20px;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background: #e6c200;
    color: #111;
    transform: translateY(-5px);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.footer-bottom p {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}