/* =============================
   GLOBAL
============================= */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* prevent horizontal scroll */
    width: 100%;
}

body {
    background-color: black;
    color: lightblue;
    font-family: "Mozilla Headline", sans-serif;
    background: url('images/magespecbackground.jpg');
}

a {
    color: lightblue;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =============================
   HEADINGS
============================= */
h1 {
    font-size: 60px;
    text-align: center;
    margin-bottom: 40px;
}

h2 {
    font-size: 40px;
    text-align: center;
    margin-bottom: 20px;
}

h5 {}

/* =============================
   HEADER / NAVBAR
============================= */
.header {
    position: fixed; /* always visible */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: black;
    padding: 18px 40px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* prevent overflow on mobile */
}

.navbar {
    display: flex;
    justify-content: space-between;
    width: 70%;
}

.navbar a {
    font-size: 22px;
    color: lightblue;
    display: block;
}

/* =============================
   MAIN CONTENT
============================= */
.content {
    padding-top: 60px; /* space under fixed navbar */
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.55);
    border-radius: 12px;
    padding: 2rem;
    box-sizing: border-box;
}

section {
    margin-bottom: 80px;
}

ul {
    margin-top: 10px;
    padding-left: 20px;
    line-height: 1.8;
}

/* =============================
   CARDS & LAYOUT
============================= */
.col-md-4 {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
}

.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 100px;
}

.card-body {
    background-color: #000033;
    border: 2px outset lightblue;
    padding: 20px;
    border-radius: 10px;
}

/* =============================
   INTERESTS GRID
============================= */
.interests {
    font-size: 30px;
    font-weight: bold;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    align-items: center;
    grid-gap: 60px;
    padding-top: 100px;
    margin: auto;
    width: 55%;
}

/* =============================
   BUTTONS
============================= */
.button {
    background-color: #000033;
    border: 2px solid lightblue;
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    color: lightblue;
    transition: 0.3s;
}

.button:hover {
    background-color: lightblue;
    color: black;
}

/* =============================
   IFRAME
============================= */
.responsive-iframe {
    width: 100%;
    height: 290px;
    border: none;
}

/* =============================
   FOOTER
============================= */
footer {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
}

.github-link {
    text-align: center;
    margin-top: 40px;
}

/* =============================
   MOBILE RESPONSIVE
============================= */
/* =============================
   MOBILE RESPONSIVE (ONLY)
============================= */
/* =============================
   MOBILE STYLES
============================= */
@media (max-width: 768px) {

    /* Remove body padding and prevent horizontal scroll */
    body {
        padding: 0;
        margin: 0;
        overflow-x: hidden; /* no horizontal scroll */
    }

    /* Header adjustments */
    .header {
        padding: 10px 0;       /* smaller header */
        position: fixed;       /* always visible */
        top: 0;
        width: 100%;
        z-index: 1000;
        background-color: black;
    }

    .navbar {
        display: flex;
        justify-content: center; /* links perfectly centered */
        gap: 20px;
        flex-wrap: nowrap;
    }

    .navbar a {
        font-size: 15px;
        white-space: nowrap;
    }

    /* Main content container */
    .content {
        margin: 0 auto;         /* centers horizontally */
        padding: 1.5rem;        /* inner spacing */
        width: min(90%, 700px); /* adapt width to screen but max 700px */
        background-color: rgba(0, 0, 0, 0.55);
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 0 15px lightblue;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        box-sizing: border-box;
        margin-top: 50px;        
        margin-bottom: 10px;
    }

    /* Titles and spacing */
    h1 {
        font-size: 32px;
        margin-top: 0;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 24px;
        margin-top: 0;
        margin-bottom: 0.8rem;
    }

    p, li {
        font-size: 16px;
        line-height: 1.6;
        margin-top: 0.5rem;
    }

    /* Footer always at bottom of content */
    footer {
        position: relative;
        margin-top: auto;
        width: 100%;
        padding: 10px 0;
        text-align: center;
    }

    /* Interests grid single column */
    .interests {
        grid-template-columns: 1fr;
        width: 100%;
        grid-gap: 30px;
        font-size: 22px;
        padding-top: 20px;
    }

    /* Cards adjustments */
    .col-md-4, .card-container {
        padding-top: 20px;
    }

    .card-body {
        padding: 16px;
    }
}

    section {
        margin-bottom: 30px; /* even tighter for tiny phones */
    }
}

/* Very small screens */
@media (max-width: 480px) {
    h1 { font-size: 26px; }
    h2 { font-size: 20px; }
    p, li { font-size: 14px; }
    .navbar a { font-size: 13px; }
}
