/* ------------------------------ General Styles ------------------------------ */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    margin: 0;
    padding-top: 80px; /* for fixed navbar */
}

a {
    text-decoration: none;
}

h1, h2, h3, h4, h5 {
    color: #c9d1d9;
}

.text-primary {
    color: #0d6efd !important;
}

.btn-animated {
    transition: all 0.3s ease;
}
.btn-animated:hover {
    transform: scale(1.05);
}

/* ------------------------------ Navbar ------------------------------ */
.navbar {
    background-color: #161b22;
    transition: background-color 0.3s ease;
}

.navbar-brand span {
    color: #0d6efd;
}

.nav-link {
    color: #c9d1d9 !important;
    transition: color 0.3s;
}
.nav-link:hover, .nav-link.active {
    color: #0d6efd !important;
    font-weight: bold;
}

/* ------------------------------ Hero Section ------------------------------ */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d1117, #161b22);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 15px;
}

.profile-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #0d6efd;
    box-shadow: 0px 0px 25px rgba(0, 123, 255, 0.4);
    margin-bottom: 20px;
}

#changing-text {
    font-size: 1.4rem;
    color: #3ddfd5;
    min-height: 40px;
    transition: opacity 0.5s ease;
}

/* ------------------------------ About Section ------------------------------ */
#about {
    padding: 80px 0;
    text-align: center;
}

.about-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 20px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.about-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,123,255,0.3);
}
.about-card p {
    margin: 0;
    font-size: 0.95rem;
}
.about-card i {
    min-width: 40px;
}

/* ------------------------------ Skills Section ------------------------------ */
/* ------------------------------ Skills Section ------------------------------ */
#skills {
    padding: 120px 0; /* مسافة أكبر من باقي Sections */
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* center the cards horizontally */
    gap: 30px; /* space between cards */
    background-color: #0f131a; /* optional: تمييز الSection */
}

.skill-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: transform 0.6s ease, box-shadow 0.3s, background 0.5s, opacity 0.6s ease;
    flex: 0 0 220px; /* fixed width for better spacing */
}
.skill-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s, filter 0.3s;
}
.skill-card h5 {
    color: #0d6efd;
    margin-bottom: 8px;
    font-size: 1.2rem;
}
.skill-card p {
    font-size: 0.95rem;
}
.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #0d6efd, #3ddfd5);
    opacity: 1;
}
.skill-card:hover img {
    filter: brightness(0) invert(0.4) sepia(1) saturate(10000%) hue-rotate(200deg);
    transform: scale(1.2) rotate(-5deg);
}

.skill-badge {
    font-size: 1rem;
    margin: 5px;
    padding: 10px 15px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 30px;
    color: #c9d1d9;
    transition: 0.3s;
}
.skill-badge:hover {
    background-color: #0d6efd;
    color: #fff;
}

/* ------------------------------ Projects Section ------------------------------ */
#projects {
    padding: 80px 0;
    text-align: center;
}

.project-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.project-card img {
    border-radius: 10px;
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 15px;
}
.project-card h5 {
    color: #0d6efd;
    font-weight: 600;
}
.project-card p {
    color: #c9d1d9;
    font-size: 0.95rem;
}
.project-card .btn-primary {
    font-size: 0.85rem;
    padding: 5px 10px;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 20px rgba(0,123,255,0.3);
}

/* ------------------------------ Contact Section ------------------------------ */
#contact {
    padding: 80px 0;
    text-align: center;
}

#contact form {
    max-width: 600px;
    margin: auto;
}
#contact input, #contact textarea {
    background-color: #161b22;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 15px;
}
#contact input::placeholder, #contact textarea::placeholder {
    color: #8b949e;
}
#contact button {
    width: 100%;
}
#contact form:hover input, #contact form:hover textarea {
    border-color: #0d6efd;
}

/* ------------------------------ Contact Card ------------------------------ */
.contact-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.contact-card h5 {
    color: #0d6efd;
    margin-bottom: 15px;
}
.contact-card p {
    margin: 0;
    font-size: 0.95rem;
}
.contact-card i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #0d6efd;
}

/* Contact Form inside card */
.contact-form .form-control {
    background: #1c2128;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    margin-bottom: 15px;
}

.contact-form .form-control:focus {
    background: #1c2128;
    color: #fff;
    border-color: #0d6efd;
    box-shadow: none;
}

#contact button {
    width: 100%;
}

/* ------------------------------ Footer ------------------------------ */
footer {
    background-color: #161b22;
    color: #8b949e;
    text-align: center;
    padding: 20px 0;
}
footer p {
    margin-bottom: 10px;
}
footer a {
    color: #0d6efd;
    margin: 0 10px;
    font-size: 1.3rem;
    transition: transform 0.3s, color 0.3s;
}
footer a:hover {
    color: #3ddfd5;
    transform: translateY(-3px);
}
footer .social-icons a {
    font-size: 1.3rem;
    margin: 0 8px;
    color: #c9d1d9;
    transition: 0.3s;
}
footer .social-icons a:hover {
    color: #0d6efd;
}

/* ------------------------------ Responsive Adjustments ------------------------------ */
@media (max-width: 992px) {
    .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .profile-img {
        width: 140px;
        height: 140px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    #changing-text {
        font-size: 1.1rem;
    }
    #about p, #contact form {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
