* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    background: #2d2d2d;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    display: flex;
    flex-direction: column;
    min-width: 400px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Navigation Bar */
#navBar nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 80px;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

#navBar nav a {
    color: #999999;
    text-decoration: none;
    font-size: 18px;
    font-weight: 400;
    transition: color 0.3s ease;
}

#navBar nav a:hover {
    color: #ffffff;
}

/* About Me Section */
#about {
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.about-me {
    margin-bottom: 60px;
}

.description {
    background: #222222;
    box-shadow: 0px 0px 27px rgb(255 255 255 / 4%);
    border-radius: 12px;
    padding: 30px;
    position: relative;
    z-index: 1;
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.name-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

#location {
    font-size: 14px;
    color: #888888;
    display: flex;
    align-items: center;
}

.links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #2a2a2a;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.links a:hover {
    background: #3a3a3a;
}

.links img {
    width: 24px;
    height: 24px;
    margin: 0;
}

.description p {
    color: #cccccc;
    font-size: 15px;
    line-height: 1.7;
}

/* Technology Section */
.technology {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 1;
}

#worked-with {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.language {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.language p {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #222222;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: #ffffff;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.language p:hover {
    background: #2a2a2a;
    border-color: #3a3a3a;
    transform: translateY(-2px);
}

.language p img {
    width: 24px;
    height: 24px;
    margin: 0;
}

/*project section*/
/* Grid layout */
.project-grid {
    display: grid;
    grid-template-rows: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

/* Clickable card */
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease;
}

.project-card:hover {
    transform: scale(1.05);
}

/* Image wrapper */
.project-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 14px;

    /* FIX: allow hover to pass through for image scaling */
    pointer-events: none;
}

/* Project image */
h2 {
    margin-bottom: 30px;
}

.project-preview {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;

    /* Re-enable pointer events */
    pointer-events: auto;
}

.project-card:hover .project-preview {
    transform: scale(1.08);
}

/* Tech overlay – always visible, overlaps image */
.tech-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.3),
            transparent
    );

    /* Re-enable pointer events */
    pointer-events: auto;
}

/* Individual tech item */
.tech-overlay p {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 0.8rem;
    color: #ffffff;
}

/* Tech icon */
.tech-overlay img {
    width: 35px;
    height: 35px;
}

/* GitHub overlay (top-right) */
.github-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.55);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;

    /* Re-enable pointer events */
    pointer-events: auto;
}

.github-overlay img {
    width: 22px;
    height: 22px;
    opacity: 0.9;
}

/* Hover effect */
.github-overlay:hover {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.75);
}

/* Text below image */
.project-info {
    margin-top: 12px;
}

.project-info h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}

.project-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #b0b0b0;
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
    }

    #navBar nav {
        gap: 15px;
        flex-wrap: wrap;
    }

    #navBar nav a {
        font-size: 14px;
    }

    .name-section h3 {
        font-size: 20px;
    }

    #worked-with {
        font-size: 24px;
    }

    .description {
        padding: 20px;
    }

    .head {
        flex-direction: column;
        gap: 15px;
    }

    .links {
        align-self: flex-start;
    }

    .project-grid {
        grid-template-columns: 1fr; /* single column */
        gap: 20px;
    }
    .project-preview {
        height: 250px; /* smaller on mobile */
    }
    .project-preview {
        height: 200px;
    }
    .tech-overlay img {
        width: 25px;
        height: 25px;
    }
    .tech-overlay img {
        width: 20px;
        height: 20px;
    }
    .project-info h2 {
        font-size: 1.1rem;
    }
    .project-info p {
        font-size: 0.85rem;
    }
    .project-info h2 {
        font-size: 1rem;
    }
    .project-info p {
        font-size: 0.8rem;
    }
    .tech-overlay {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}