/* General Reset and Body Styling */
* {
    scroll-behavior: smooth;
    box-sizing: border-box;
    font-family: 'Playwrite NG Modern', Arial, sans-serif;

}

body,
html {
    overflow: hidden;
    /* Prevents double scrollbars */
}

/* Global Styles */
body {
    font-family: 'Playwrite NG Modern';
    margin: 0;
    padding: 0;
    background-color: #0d1117;
    /* Dark background */
    color: #c9d1d9;
    line-height: 1.6;
    text-align: center;
}

/* Header and Navigation */
header.navbar {
    display: flex;
    background-color: #161b22;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    gap: 2rem;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    font-weight: bold;
}

.navbar a {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
}

.navbar a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2a9d8f;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.navbar a:hover::before {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.navbar-item:hover {
    color: #2a9d8f !important;
}

.navbar-item {
    color: white !important;
}

.navbar-burger {
    color: white !important;
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background-color: #161b22;
    color: #c9d1d9;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    margin: 40px auto;
    text-align: center;
}

.about-section h1.title {
    font-size: 2.8rem;
    color: #58a6ff;
    margin-bottom: 25px;
    font-weight: bold;
    letter-spacing: 1.2px;
    position: relative;
}

.about-section h1.title::after {
    content: '';
    display: block;
    width: 60px;
    height: 5px;
    background: #58a6ff;
    margin: 20px auto;
}

.about-section .subtitle {
    font-size: 1.2rem;
    color: #8b949e;
    margin: 0 auto 40px;
    line-height: 1.8;
    max-width: 700px;
}

/* Section Container */
.section-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Columns */
.columns {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* Skill Container */
.skill-container {
    display: inline-flex;
    /* Inline layout to fit around content */
    justify-content: center;
    align-items: center;
    /* Center-align items vertically */
    gap: 15px;
    /* Reduced gap for compactness */
    padding: 10px 15px;
    /* Smaller padding to make it more compact */
    background-color: #161b22;
    border-radius: 10px;
    /* Slightly smaller border radius */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Subtle shadow for depth */
    max-width: fit-content;
    /* Adjust width to fit content */
    margin: auto;
    /* Center container horizontally */
}

.skills-section+.skills-section {
    border-top: 1.5px solid #30363d;
    /* subtle divider */
    padding-top: 2rem;
    margin-top: 2rem;
}

/* Skill Icons Section */
.skills-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.skill {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Skill Icons and Skill Names */
.skill i,
.skill-icon {
    font-size: 3.5rem;
    color: #fff;
    /* White color for icons */
    transition: color 0.3s ease, transform 0.3s ease;
}

.skill-icon {
    width: 60px;
    height: 60px;
}

/* Hover effect for skill icons */
.skill:hover i,
.skill:hover .skill-icon {
    color: #1f6feb;
    /* Darker shade on hover */
    transform: scale(1.2);
}

.skill-name {
    font-size: 1rem;
    color: #fff;
    /* White color for skill names */
    margin-top: 10px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}

.skill:hover .skill-name {
    opacity: 1;
    max-height: 40px;
}

.skills-icons .skill:hover {
    transform: translateY(-20px);
}

/* Cards for skills, tools, etc. */
.card {
    background-color: #161b22;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 280px;
    margin: 20px;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card h3 {
    font-size: 1.4rem;
    color: #c9d1d9;
    margin-bottom: 15px;
}

.card p {
    color: #8b949e;
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: #161b22;
    padding: 20px;
    text-align: center;
    color: #8b949e;
    margin-top: 40px;
}

/* Contact Button */
#contact .button {
    background-color: #238636;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    margin-top: 20px;
}

#contact .button:hover {
    background-color: #2ea043;
}

/* Section Spacing */
.section {
    margin: 60px auto;
    max-width: 900px;
    padding: 20px;
}

/* Testimonials Section */
.testimonials-section {
    grid-area: inherit;
    padding: 40px 20px;
    background-color: #161b22;
    color: #c9d1d9;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.testimonials-section h2 {
    font-size: 2rem;
    color: #58a6ff;
    margin-bottom: 20px;
    text-align: center;
}

.testimonial {
    margin-bottom: 20px;
    color: #8b949e;
    font-size: 1rem;
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio-section {
    grid-area: portfolio;
    padding: 40px 20px;
    background-color: #161b22;
    color: #c9d1d9;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.portfolio-section h2 {
    font-size: 2rem;
    color: #58a6ff;
    margin-bottom: 20px;
}

.project-card {
    background-color: #0d1117;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

/* Certifications Section */
.certifications-section {
    padding: 60px 20px;
    background-color: #161b22;
    color: #c9d1d9;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin-top: 40px;
}

.certifications-section h2 {
    font-size: 2.5rem;
    color: #58a6ff;
    margin-bottom: 20px;
    font-weight: bold;
    letter-spacing: 1.2px;
}

/* Container for certifications */
.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 10px;
}

/* Individual certification card */
.certification-card {
    background-color: #161b22;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0;
    /* No margin needed; grid layout handles spacing */
}

.certification-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.certification-card img {
    width: 89%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.certification-card h3 {
    font-size: 1.4rem;
    color: #c9d1d9;
    margin-bottom: 10px;
}

.certification-card p {
    color: #8b949e;
    font-size: 1rem;
    line-height: 1.6;
}

h2 {
    color: white;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 10px;
    display: none;
    z-index: 1000;
    font-size: 20px;
    cursor: pointer;
}

.back-to-top i {
    margin: 0;
}

/* Media Queries */
@media (max-width: 768px) {
    .about-section h1.title {
        font-size: 2.5rem;
    }

    .about-section .subtitle {
        font-size: 1rem;
    }

    .columns {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
    }

    .certifications-section h2 {
        font-size: 2rem;
    }

    .certifications-container {
        flex-direction: column;
        align-items: center;
    }

    .certification-card {
        width: 90%;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar a {
        font-size: 0.9rem;
        color: black !important;
    }

    /* Skill Container with Flexbox */
    .skill-container {
        display: flex;
        /* Ensure Flexbox is active */
        flex-direction: row;
        /* Arrange items horizontally */
        gap: 10px;
        /* Space between items */
        padding: 8px;
        /* Adjust padding for smaller devices */
        overflow-x: auto;
        /* Allow horizontal scrolling if items overflow */
    }

    /* Individual Skill Icon */
    .skill-container .skill-icon {
        max-width: 100%;
        /* Ensure icons don't exceed the container's width */
        width: 90px;
        /* Adjust width of icons */
        height: auto;
        /* Adjust height of icons */
        object-fit: contain;
        /* Ensure icons maintain their aspect ratio */
    }
}

@media (max-width: 768px) {
    .skill-container {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        /* space between Fluent and Certifications sections */
        padding: 1rem;
        max-width: 100%;
    }

    .skills-icons {
        justify-content: center;
        gap: 25px;
    }

    .skill {
        flex: 0 1 100px;
        /* shrink on mobile */
    }

    .skills-section h2 {
        font-size: 1.6rem;
        text-align: center;
        margin-bottom: 1.2rem;
    }
}