
/* ---------- basics ---------- */

body {
    margin: 0 auto;
    padding: 24px 20px 48px;
    max-width: 42em;                 
    background-color: #f7f8f9;
    color: #24303b;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

p {
    margin: 0 0 1em;
}

a {
    color: #2f6690;
}

a:hover,
a:focus {
    color: #1d4160;
}

main {
    padding-top: 20px;
}

hr {
    border: none;
    border-top: 1px solid #d5dbe0;
    margin: 32px 0;
}


/* ---------- header and photo ---------- */

header {
    padding-bottom: 8px;
}

header img {
    display: block;
    width: 150px;
    height: auto;
    border: 3px solid #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

h1 {
    margin: 16px 0 4px;
    font-size: 2em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h2 {
    margin: 0 0 12px;
    font-size: 1.25em;
    font-weight: 600;
    color: #2f4858;
}


/* ---------- site navigation (tabs) ---------- */

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 24px;
    padding: 5px;
    background-color: #ffffff;
    border: 1px solid #d5dbe0;
    border-radius: 8px;
}

/* unselected (normal) */
.site-nav a {
    padding: 7px 14px;
    border-radius: 5px;
    color: #2f6690;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease,
                transform 0.15s ease, box-shadow 0.15s ease;
}

/* hover (and keyboard focus) */
.site-nav a:hover,
.site-nav a:focus {
    background-color: #e3edf4;
    color: #1d4160;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(29, 65, 96, 0.2);
}

/* selected (the page you are on) - comes after :hover so it wins */
.site-nav a.selected {
    background-color: #2f6690;
    color: #ffffff;
}

.site-nav a.selected:hover,
.site-nav a.selected:focus {
    background-color: #1d4160;
    color: #ffffff;
}

.site-nav a:focus-visible {
    outline: 2px solid #1d4160;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .site-nav a {
        transition: none;
    }

    .site-nav a:hover,
    .site-nav a:focus {
        transform: none;
    }
}


/* ---------- ID selectors ---------- */
/* These match the id="" attributes used in index.htm. */

#top {
    border-bottom: 1px solid #d5dbe0;
    padding-bottom: 20px;
}

#hobbies {
    margin: 0 0 1em;
    padding: 14px 18px;
    background-color: #ffffff;
    border-left: 4px solid #2f6690;
    border-radius: 0 4px 4px 0;
}

#about,
#education,
#experience,
#contact {
    scroll-margin-top: 16px;         
}


/* ---------- class selectors ---------- */
/* matching the class="" attributes used in the index */

.tagline {
    margin: 0;
    color: #6a7681;
    font-weight: 400;
    font-style: italic;
}

.intro {
    font-size: 1.05em;
}

.hobby {
    display: block;
    margin-bottom: 6px;
}

.hobby:last-child {
    margin-bottom: 0;
}

.campus {
    display: block;
    width: 100%;                     
    height: auto;                    
    margin: 4px 0 1em;
    border: 3px solid #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.year {
    color: #6a7681;
    font-variant-numeric: tabular-nums;
}

.updated {
    font-size: 0.9em;
}

.grades {
    padding-left: 1.2em;
    list-style: none;
}

.grades li {
    margin-bottom: 8px;
}

.grade {
    display: inline-block;
    min-width: 2.6em;
    margin: 0 4px;
    padding: 1px 8px;
    border-radius: 4px;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.grade-a {
    background-color: #2f6690;
}

.grade-b {
    background-color: #3d7a5a;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 0 0 1em;
}

.portfolio img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 30%;
    background-color: #e3edf4;
    border: 3px solid #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}


/* ---------- footer ---------- */

footer p {
    color: #6a7681;
    font-size: 0.92em;
}


/* ---------- small screens ---------- */

@media (max-width: 480px) {

    body {
        font-size: 16px;
        padding: 16px 14px 36px;
    }

    header img {
        width: 120px;
    }

    .site-nav a {
        flex: 1 1 auto;
        padding: 7px 10px;
        text-align: center;
    }

    .portfolio {
        grid-template-columns: 1fr;
    }

}
