body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: black;
}

/* ==========================
   HEADER
========================== */

header {
    margin-top: 60px;

    background-image: url("images/bde.jpg");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;

    color: black;
    text-align: center;
    height: 160px;
    padding: 100px 0;
}

.header-box {
    display: inline-block;

    background: rgba(255, 255, 255, 0.75);

    padding: 20px 40px;

    border-radius: 8px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.header-box h1 {
    margin: 0;
    font-size: 2.8rem;
    color: black;
}

.header-box p {
    margin-top: 12px;
    margin-bottom: 0;

    color: black;

    font-size: 1.2rem;

    text-align: center;
}

/* ==========================
   MAIN CONTENT
========================== */

section {
    max-width: 900px;
    margin: 10px auto;
    padding: 20px;
}

.project {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,.1);

    text-align: justify;

    margin-bottom: 30px;   /* Space between boxes */
}

/* ==========================
   NAVIGATION
========================== */

nav {
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    width: 100%;
    padding: 21px 0;
    text-align: center;
    z-index: 1000;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color:  rgba(0, 0, 0, 0.8);
}

/* ==========================
    ABOUT ME
========================== */

.about-container {
    display: flex;
    max-width: 1000px;
    margin: 80px auto;
    gap: 100px;
    align-items: flex-start;
    text-align: justify;
}

.sidebar {
    width: 280px;
    text-align: center;
}

.about-content {
    flex: 1;
    text-align: justify;
}

.about-content h2 {
    margin-top: 0;
    margin-bottom: 20px;

    font-size: 2rem;
    font-weight: 400;
    color: #333;
}

.profile-pic {
    width: 240px;
    height: 300px;

    object-fit: cover;

    border-radius: 12px;          /* Rounded corners instead of a circle */

    box-shadow: 0 3px 10px rgba(0,0,0,.1);

    margin-top: 40px;
}

/* ==========================
   FOOTER
========================== */

.footer {
    margin-top: 20px;
    background: #fafafa;
    border-top: 1px solid #ddd;
}

/* Main footer container */
.footer-container {

    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;

    display: grid;

    /* Contact | Location | Email */
    grid-template-columns: 350px 1fr 1fr;

    column-gap: 30px;

    align-items: start;
}

/* Contact column */
.footer-title {
    display: flex;
    justify-content: center;
    align-items: flex-start;

    transform: translateX(-20px);
}

/* All three headings have the same style */
.footer-title h2,
.footer-column h3 {
    margin: 0 0 10px 0;

    font-size: 1.3rem;
    font-weight: bold;
    color: black;

}

/* Footer text */
.footer-column p {
    margin: 0 0 20px 0;
    line-height: 1.3rem;
    color: #777;
    text-align: left;
}

/* Footer links */
.footer-column a {
    color: #777;
    text-decoration: none;
}

.footer-column a:hover {
    text-decoration: underline;
}

/* Copyright bar */

.copyright {
    background: #111;
    color: white;

    text-align: center;

    padding: 20px;

    font-size: 0.9rem;
}

/* ==========================
   SIDEBAR LINKS
========================== */

a,
a:visited,
a:hover,
a:active {
    color: #777 !important;
}

/* ==========================
   MOBILE
========================== */

@media (max-width: 768px) {

    /* ---------- General ---------- */

    body {
        font-size: 0.7rem;
        line-height: 1.6;
    }

    h2 {
        font-size: 1.2rem;
        font-weight: bold;
    }

    h3 {
        font-size: 0.9rem;
        font-weight: bold;
    }

    p,
    li {
        font-size: 0.7rem;
    }

    section {
        max-width: 100%;
        margin: 30px auto;
        padding: 0 30px;
    }

    /* ---------- Navigation ---------- */

    nav {
        padding: 12.2px 10px;      /* thinner navbar */
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 20px;          /* row gap | column gap */
        line-height: 1.2;
    }

    nav a {
        flex: 0 0 28%;          /* three items per row */
        text-align: center;
        margin: 0;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* ---------- Header ---------- */

   header {
        height: 160px;
        padding: 0;

        display: flex;
        justify-content: center;
        align-items: flex-start;

        background-position: top;
        background-size: cover;
    }

    .header-box {
        width: 80%;
        max-width: 280px;
        margin: 0 auto;
        padding: 10px 16px;
        text-align: center;
        margin-top: 30px;
    }

    .header-box h1 {
        font-size: 1.4rem !important;
        margin: 0 0 6px;
        text-align: center;
    }

    .header-box p {
        font-size: 0.7rem !important;
        line-height: 1.2;
        margin: 0;
        text-align: center;
    }

    /* ---------- About Me ---------- */

    .about-container {
        flex-direction: column;
        gap: 35px;
        margin: 40px auto;
    }

    .sidebar {
        width: 100%;
        display: flex;
        justify-content: center;
        padding-top: 0;
    }

    .profile-pic {
        width: 220px;
        height: auto;
        margin-top: 0;
    }

    .about-content {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 0 35px;
        box-sizing: border-box;
    }

    .about-content h2 {
        text-align: center;
        margin-bottom: 25px;
    }

    /* ---------- Projects ---------- */

    .project {
        padding: 22px;
        margin-bottom: 25px;
    }

    .project h3 {
        font-size: 0.7rem;
    }

    .project p,
    .project li {
        font-size: 0.7rem;
    }

    /* ---------- Teaching ---------- */
   
    .teaching-section {
        min-height: 65vh;
    }

    /* ---------- Footer ---------- */

    .footer-container {
        grid-template-columns: 1fr;
        row-gap: 15px;
        padding: 20px 30px;
    }

    .footer-title {
    display: flex;
    justify-content: flex-start;

    transform: translateX(+1px);
    }

    .footer-title h2 {
    margin: 0 0 12px 0;
    text-align: left;
    }

    .footer-column h3 {
        font-size: 0.7rem;
    }

    .footer-column p,
    .footer-column a {
        font-size: 0.7rem;
    }

    .copyright {
        padding: 18px;
        font-size: 0.7rem;
    }

}