/* ============================================================
   Professional personal website stylesheet
   System fonts · clean spacing · fully responsive
   ============================================================ */

/* ----- Reset ----- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ----- Base ----- */
html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #222;
    line-height: 1.75;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* ----- Navigation ----- */
.topnav {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.topnav a {
    display: inline-block;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.85rem 1.1rem;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.topnav a:hover {
    color: #111;
    border-bottom-color: #bbb;
}

.topnav a.active {
    color: #111;
    font-weight: 600;
    border-bottom-color: #2563eb;
}

/* ----- Headings ----- */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
}

h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e8e8e8;
}

/* ----- Body text ----- */
p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.9rem;
}

/* ----- Links ----- */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ----- Profile photo ----- */
.profile-photo {
    display: block;
    width: 42px !important;
    height: auto !important;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* ----- Content sections ----- */
.container,
.Project,
.Research,
.Classes,
.hobbyList {
    margin-bottom: 2rem;
}

/* ----- Lists ----- */
ul {
    padding-left: 1.4rem;
    margin-bottom: 0.75rem;
}

li {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    margin-bottom: 0.5rem;
}

li:last-child {
    margin-bottom: 0;
}

/* ----- Table ----- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

th {
    background-color: #f5f7fa;
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.8rem;
    border-bottom: 2px solid #dde0e6;
    color: #111;
}

td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #eef0f3;
    color: #333;
}

tr:last-child td {
    border-bottom: none;
}

/* ----- Footer ----- */
footer {
    border-top: 1px solid #e0e0e0;
    margin-top: 3rem;
    padding-top: 1.25rem;
    font-size: 0.875rem;
    color: #666;
}

footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

footer ul li {
    margin: 0;
    color: #666;
}

footer a {
    color: #555;
}

/* ----- Hobby page intro ----- */
p.intro {
    font-size: 1.05rem;
    font-style: italic;
    color: #444;
    margin-bottom: 1.5rem;
}

/* ----- Responsive (phones) ----- */
@media (max-width: 600px) {
    body {
        padding: 0 1rem 3rem;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.05rem;
    }

    .topnav {
        flex-wrap: wrap;
    }

    .topnav a {
        flex: 1 1 auto;
        text-align: center;
        padding: 0.7rem 0.6rem;
        font-size: 0.9rem;
    }

    table {
        font-size: 0.85rem;
    }

    .profile-photo {
        width: 42px !important;
    }
}
