* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #0b1120;
    color: white;
    font-family: Arial, sans-serif;
}

#hero-github {
    display: inline-block !important;
    transition: transform 0.2s;
}

#hero-github:hover {
    transform: translateY(-2px) !important;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 8%;

    border-bottom: 1px solid #1e293b;

    position: sticky;
    top: 0;

    background: #0b1120ee;
    backdrop-filter: blur(10px);
}

nav h2 {
    margin: 0;
}

nav a {
    color: black;
    text-decoration: none;
    margin-left: 25px;
    display: inline-block;
}

nav a:hover {
    color: rgb(76, 76, 76);
    transform: translateY(-2px);
}

main {
    max-width: 1100px;
    margin: auto;
    padding: 0 25px;
}

#hero {
    min-height: 75vh;

    display: flex;
    flex-direction: column;
    justify-content: center;

    max-width: 750px;
}

.small {
    color: #94a3b8;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

h1 {
    font-size: 4rem;
    margin: 10px 0;
}

.hero .intro {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #cbd5e1;
}

button {
    width: fit-content;

    padding: 14px 24px;

    border: none;
    border-radius: 10px;

    background: white;
    color: #0b1120;

    font-size: 1rem;
    font-weight: bold;

    cursor: pointer;

    margin-top: 15px;
}

button:hover {
    transform: translateY(-2px);
}

a {
    width: fit-content;

    padding: 14px 24px;

    border: none;
    border-radius: 10px;

    background: white;
    color: #0b1120;

    font-size: 1rem;
    font-weight: bold;

    cursor: pointer;

    margin-top: 15px;

    text-decoration: none;

    display: inline-block;
}

a:hover {
    position: relative;
    top: -2px;
}

section {
    padding: 80px 0;
}

section > h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card,
.commit {
    padding: 25px;

    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 15px;
}

.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card p,
.commit p,
#about p {
    color: #cbd5e1;
    line-height: 1.6;
}

.card span {
    display: inline-block;

    margin-top: 10px;
    padding: 6px 10px;

    background: #1e293b;
    border-radius: 6px;

    font-size: 0.8rem;
}

footer {
    text-align: center;
    padding: 40px;

    color: #64748b;
    border-top: 1px solid #1e293b;
}

nav a:hover,
.card a:hover,
.hero a:hover {
    transform: translateY(-7px);
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

    nav {
        flex-direction: column;
        gap: 15px;
        padding: 20px 5%;
    }

    nav h2 {
        font-size: 1.8rem;
    }

    nav div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    nav a {
        margin: 0;
        padding: 10px 16px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    main {
        padding: 0 18px;
    }

.hero {
    min-height: 70vh;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    }

    .small {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    h1 {
        font-size: 2.7rem;
        line-height: 1.1;
        word-break: normal;
    }

    .hero .intro {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    /*
       Stack the hero buttons on phones
       so they never overflow the screen.
    */

.hero button,
.hero a {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin-left: 0;
    margin-right: 0;

    padding: 12px 18px;

    font-size: 0.95rem;

    white-space: normal;
    overflow-wrap: break-word;
    }

    section {
        padding: 55px 0;
    }

    section > h2 {
        font-size: 1.7rem;
    }

    .projects {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card,
    .commit {
        padding: 20px;
    }

    .card a,
    .commit a {
        max-width: 100%;
        padding: 12px 18px;
        font-size: 0.95rem;
    }

    footer {
        padding: 30px 18px;
    }
}


/* =========================
   SMALL PHONES
   ========================= */

@media (max-width: 400px) {

    nav a {
        padding: 9px 13px;
        font-size: 0.85rem;
    }

    h1 {
        font-size: 2.3rem;
    }

    .hero .intro {
        font-size: 1rem;
    }

.hero {
    min-height: 70vh;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    }

.hero button,
.hero a {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin-left: 0;
    margin-right: 0;

    padding: 12px 18px;

    font-size: 0.95rem;

    white-space: normal;
    overflow-wrap: break-word;
    }
}
