@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300&display=swap');
*, *::before, *::after {
    padding: 0;
    margin: 0;
    scroll-behavior: smooth;
    box-sizing: border-box; /* Added for better layout handling */
}

body {
    background-color: #16161a;
    color: #fff;
    font-family: "Poppins", sans-serif;
}

/* Nav Bar */

header nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    animation: fadeInDown .8s;
}

header nav .header_links ul {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

header nav .header_links ul li, section.main ul li {
    list-style-type: none;
}

header nav .header_links ul li a {
    outline: none;
    text-decoration: none;
    color: #a6a8b8;
    padding: 5px 12px;
    transition: 0.3s all;
    font-size: 15px;
}

header nav .header_links ul li a:hover {
    color: white;
}

header nav .header_logo img {
    width: 50px;
    height: 50px;
    border-radius: 100%;
    object-fit: cover;
    border: 5px solid #3b3d4e93;
    cursor: pointer;
}

/* Responsive nav bar */

@media only screen and (max-width: 630px) {
    header nav {
        display: flex;
        flex-direction: column;
    }
    header nav .header_logo {
        margin-bottom: 20px;
    }
}

@media only screen and (max-width: 320px) {
    header nav .header_links ul {
        display: flex;
        justify-content: center;
        text-align: center;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Main */

section.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    animation: fadeInUp .8s;
}

section.main img {
    width: 150px;
    height: 150px;
    border-radius: 100%;
    object-fit: cover;
    border: 10px solid #21222b93;
    cursor: pointer;
    margin-bottom: 10px;
}

section.main span {
    color: #fffffe;
    font-size: 30px;
    font-weight: bold;
}

section.main p {
    position: relative;
    top: 50%;
    border-right: 2px solid rgba(255, 255, 255, .75);
    white-space: nowrap;
    overflow: hidden;
    color: #94a1b2;
    font-size: 13px;
    animation: typewriter 4s steps(44) 1s 1 normal both, blinkTextCursor 530ms steps(44) infinite normal;
}

section.main ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
}

section.main ul li a {
    color: #a6a8b8;
    display: flex;
    text-decoration: none;
    margin: 20px 5px;
    font-size: 25px;
    padding: 5px;
    transition: 0.2s all;
}

section.main ul li a:hover {
    transition: 0.2s all;
    color: #fff;
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 20.5em;
    }
}

@keyframes blinkTextCursor {
    from {
        border-right-color: rgba(255, 255, 255, .75);
    }
    to {
        border-right-color: transparent;
    }
}

@keyframes fadeInUp {
    from {
        transform: translate3d(0, 150px, 0)
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1
    }
}

@keyframes fadeInDown {
    from {
        transform: translate3d(0, -150px, 0)
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1
    }
}

/* New Sections Styling */

section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #fffffe;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #7f5af0; /* Using a purple accent color often seen in dark themes */
    margin: 10px auto 0;
    border-radius: 2px;
}

/* About Section */
#about .about_content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #94a1b2;
    line-height: 1.6;
    font-size: 16px;
}

/* Skills Section */
.skills_container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.skill_card {
    background-color: #242629;
    border: 1px solid #3b3d4e93;
    border-radius: 8px;
    padding: 20px;
    width: 150px;
    text-align: center;
    transition: transform 0.3s ease;
}

.skill_card:hover {
    transform: translateY(-5px);
    border-color: #7f5af0;
}

.skill_card i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #7f5af0;
}

.skill_card span {
    display: block;
    color: #fffffe;
    font-weight: 500;
}

/* Repos (Projects) Section */
.projects_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project_card {
    background-color: #242629;
    border: 1px solid #3b3d4e93;
    border-radius: 8px;
    padding: 30px;
    transition: transform 0.3s ease;
}

.project_card:hover {
    transform: translateY(-5px);
    border-color: #7f5af0;
}

.project_card h3 {
    color: #fffffe;
    font-size: 22px;
    margin-bottom: 10px;
}

.project_card p {
    color: #94a1b2;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.project_card a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #7f5af0;
    color: #fffffe;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.project_card a:hover {
    background-color: #6246ea;
}

/* Shop Section */
.shop_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.shop_item {
    background-color: #242629;
    border: 1px solid #3b3d4e93;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.shop_item:hover {
    transform: translateY(-5px);
    border-color: #7f5af0;
}

.shop_item .item_image {
    width: 100%;
    height: 150px;
    background-color: #16161a;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.shop_item .item_image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.shop_item h3 {
    color: #fffffe;
    font-size: 18px;
    margin-bottom: 5px;
}

.shop_item p {
    color: #7f5af0;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
}

.shop_item button {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #7f5af0;
    color: #7f5af0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Poppins", sans-serif;
}

.shop_item button:hover {
    background-color: #7f5af0;
    color: #fffffe;
}

/* Footer */
footer {
    background-color: #242629;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #3b3d4e93;
    margin-top: 60px;
}

footer p {
    color: #94a1b2;
    margin-bottom: 15px;
    font-size: 14px;
}

.footer_socials a {
    color: #a6a8b8;
    font-size: 20px;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer_socials a:hover {
    color: #fffffe;
}

/* Responsive adjustments */
@media only screen and (max-width: 768px) {
    section {
        padding: 40px 20px;
    }

    section h2 {
        font-size: 28px;
    }

    .project_card, .shop_item {
        margin: 0 10px;
    }
}
