* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}

body {
    background-color: #000000;
    color: #ecf0f1;
}

nav {
    position: fixed;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    transition: background 0.3s ease;
    z-index: 10;
    background: transparent;
}

nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 160px;
    height: 100px;
    background: linear-gradient(
        to bottom right,
        rgba(0, 0, 0, 0.7),
        rgba(0, 0, 0, 0)
    );
    pointer-events: none;
    z-index: -1;
    border-bottom-right-radius: 20px;
}

nav .logo {
    width: 92px;
    z-index: 1;
}

.cover {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #151515 url("https://via.placeholder.com/1920x1080")
        center/cover no-repeat;
    position: relative;
    text-align: center;
}

.cover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cover-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
}

.text {
    max-width: 800px;
}

.text h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-in;
    color: #ecf0f1;
}

.text p {
    font-size: 1.1rem;
    animation: fadeIn 2s ease-in;
    color: #dfe6e9;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mastery-box {
    background: #050505;
    color: #ecf0f1;
    padding: 3rem 10%;
    text-align: center;
    margin-top: 2rem;
}

.mastery-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.mastery-box p {
    margin-bottom: 2rem;
}

.progress {
    width: 100%;
    margin: 0 auto 1rem auto;
    position: relative;
}

.progress span {
    position: absolute;
    bottom: -1.5rem;
    font-size: 0.9rem;
    color: #ecf0f1;
}

.progress-bar {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.rust {
    width: 35%;
    background: #cd5656;
}

.csharp {
    width: 30%;
    background: #aab99a;
}
.java {
    width: 20%;
    background: #ef9c66;
}
.dart {
    width: 10%;
    background: #78aba8;
}
.c {
    width: 5%;
    background: #555555;
}
.web {
    width: 5%;
    background: #ff3e00;
}

.portfolio,
.achievements,
.contact {
    padding: 12rem 3rem 0rem 3rem;
    text-align: center;
    background: #000000;
    color: #ecf0f1;
}

.portfolio h2,
.achievements h2,
.contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    align-items: center; /* Center cards horizontally */
}

.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    align-items: center;
}

.portfolio-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    background-size: cover;
    background-position: center;
    width: 100%;
    max-width: 800px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    color: #fff;
}

/* Hide the <img> element since we use it only for src */
.portfolio-item img.portfolio-img {
    display: none;
}

/* Dim overlay */
.portfolio-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Text content on top of background */
.portfolio-text {
    position: relative;
    z-index: 1;
    padding: 1rem 1.5rem;
    max-width: 80%;
    text-align: left;
}

.portfolio-text h3 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.portfolio-text p {
    margin: 0;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.achievements img {
    width: 100px;
    height: 100px;
    margin: 0.5rem;
    border-radius: 10px;
}

.socials img {
    width: 40px;
    height: 40px;
    margin: 0.5rem;
    filter: invert(1);
}

footer {
    background: #000000;
    color: #ecf0f1;
    padding: 5rem 2rem;
    text-align: center;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.footer-content p {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center; /* vertically centers text inside the <p> */
    height: 40px; /* matches image height */
}
