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

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f5f5;
    color: #222;
    line-height: 1.6;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.logo {
    line-height: 1;
    /* remove extra space around text */
    display: flex;
    align-items: center;
    /* vertical center the text inside logo */
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #0056b3;
}

/* Hero Section */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #e9f2ff;
    padding: 0 5%;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    color: #007bff;
    margin-bottom: 10px;
}

.hero h2 {
    
    font-size: 20px;
    color: #555;
    margin-bottom: 10px;
}

.subtitle {
    color: #555;
    margin-bottom: 20px;
    font-size: 18px;
}

/* CTA Button */
.cta {
    display: inline-block;
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    /* keep text white */
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta:hover {
    background: #0056b3;
    color: #fff;
    /* ensure text stays white on hover */
    transform: translateY(-3px);
}

/* Sections */
section {
    padding: 80px 10%;
    text-align: center;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

/* Alternate section backgrounds */
#skills,
#contact {
    background: #f5f5f5;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    /* automatically collapse columns */
    gap: 20px;
    margin-top: 30px;
}

.skill {
    background: #e0eaff;
    padding: 15px;
    border-radius: 30px;
    font-weight: 500;
    transition: transform 0.3s ease, background 0.3s ease;
    cursor: pointer;

    display: flex;
    /* enable flex */
    justify-content: center;
    /* center horizontally */
    align-items: center;
    /* center vertically */
}

.skill:hover {
    transform: scale(1.05);
    background: #c0dbff;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Project Card */
.project-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    /* ensures all cards have same height */
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.project-card button {
    margin-top: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    background: #007bff;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-card button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* Footer */
footer {
    background: #f0f0f0;
    color: #555;
    padding: 20px;
    text-align: center;
    margin-top: 60px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
}

/* Ensure header elements align properly on mobile */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        /* stack logo + nav */
        align-items: flex-start;
        /* align left */
        gap: 10px;
        /* spacing between logo and nav */
    }

    .logo {
        display: flex;
        align-items: center;
        /* vertical center with nav if needed */
    }

    nav {
        display: flex;
        align-items: center;
        /* vertically align nav links with logo */
        flex-wrap: wrap;
        /* allow wrapping on narrow screens */
        /* spacing between nav items */
    }
}