/* default margins & padding */
:root {
    --background-c: #ffffff;
    --text-c: rgb(44, 42, 114);
    --emphasis-box-c: rgb(182, 210, 255);
    --emphasis-text-c: rgb(44, 42, 114);
    --emphasis-text-highlight-c: rgb(107, 103, 229);
    --header-footer-c: rgb(182, 210, 255);
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-c: rgb(14, 13, 28);
        --text-c: #ffffff;
        --emphasis-box-c: rgb(28, 25, 71);
        --emphasis-text-c: rgb(130, 146, 238);
        --emphasis-text-highlight-c: rgb(182, 192, 249);
        --header-footer-c: rgb(28, 25, 71);
    }
}

* {
    background-color: var(--background-c);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--text-c);
}

body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100vh;
    font-family: 'Noto Serif', 'Times New Roman', serif;
    background-color: var(--background-c);
    color: var(--text-c);
    line-height: 1.6;
    text-align: justify;
    hyphens: auto;
}
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family:'Noto Sans', 'Helvetica Neue', Arial, sans-serif; 
    text-align: left;
    hyphens: none;
    color: var(--text-c);
}

header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    background: var(--header-footer-c);
    color: var(--text-c);
    display: flex;
    justify-content: center;
    background-color: var(--header-footer-c);
}
.header-box {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-c);
    background: var(--header-footer-c);
    background-color: var(--header-footer-c);
}

footer {
    bottom: 0;
    left: 0;
    width: 100vw;
    padding: 1rem 0;
    background: var(--header-footer-c);
    color: var(--text-c);
    z-index: 1000;
}
footer a {
    background: var(--header-footer-c);
}
.footer-box {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    background-color: var(--header-footer-c);
    text-align: left;
}
.footer-text {
    font-size: 0.9rem;
    color: var(--text-c);
    background-color: var(--header-footer-c);
}
.footer-image {
    max-width: 50px;
    border-radius: 50px;
    border: 1px solid var(--text-c);
    display: block;
    margin: 0 1rem 0.5rem 0;
}

h1.site-title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    font-family: 'Times New Roman', serif;
    font-weight: normal;
    font-size: 2rem;
    color: var(--text-c);
    background-color: var(--header-footer-c);
}
nav.site-nav {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0 0;
    background-color: var(--header-footer-c);
}
nav.site-nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
    background-color: var(--header-footer-c);
}
nav.site-nav li {
    background-color: var(--header-footer-c);
}
nav.site-nav a {
    color: var(--emphasis-text-c);
    text-decoration: none;
    transition: 0.2s;
    background-color: var(--header-footer-c);
}
nav.site-nav a:hover {
    color: var(--emphasis-text-highlight-c);
    background-color: var(--header-footer-c);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

/* link formatting */
a {
    color: var(--emphasis-text-c);
    text-decoration: underline;
}
a:hover {
    color: var(--emphasis-text-highlight-c);
    text-decoration: underline;
    transition: 0.2s;
}

p {
    margin-bottom: 0.5rem;
}

figcaption {
    text-align: center;
}

.project-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    border: 2px solid var(--emphasis-box-c);
    padding: 0.5rem 1rem;
    gap: 2rem;
    width: 100%;
}
.project-card figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}
.project-card figure img {
    border: 2px solid var(--text-c);
    height: 200px;
    width: auto;
    object-fit: fill;
}
.project-card figure a {
    color: var(--emphasis-text-c);
    text-decoration: none;
}
.project-card figure a:hover {
    color: var(--emphasis-text-highlight-c);
    text-decoration: none;
}
.project-card img {
    border: 2px solid var(--text-c);
}
.project-card a {
    color: var(--emphasis-text-c);
    text-decoration: none;
}
.project-card a:hover {
    color: var(--emphasis-text-highlight-c);
    text-decoration: none;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    border-radius: 40px;
}
.about-content .text {
    flex: 1;
}

.profile-pic {
    max-width: 150px;
    height: auto;
    border-radius: 150px;
    border: 2px solid var(--text-c);
}

.banner {
    width: 100%;
    height: 25vh;
    overflow: hidden;
}
.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin: 0 auto;
}

/* for mobile / touchscreen devices */
@media (pointer: coarse) {
    /* make about page left-aligned */
    .about-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-pic {
        max-width: 100px;
        margin: 0;
        align-self: flex-start;
    }
    /* make project cards column-aligned on mobile */
    .project-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .project-card figure {
        width: 100%;
        align-items: flex-center;
    }
    .project-card figure img {
        width: 80%;
        height: auto;
    }
    /* make site title left-aligned */
    header {
        justify-content: flex-start;
    }
    .header-box {
        margin-left: 0;
        margin-right: auto;
        padding-left: 2rem;
    }
    /* make text larger */
    h1.site-title {
        font-size: 4rem;
    }
    nav.site-nav {
        font-size: 2rem;
    }
    body {
        font-size: 2rem;
    }
    footer a {
        font-size: 2rem;
    }
    .footer-text {
        font-size: 2rem;
        text-align: center;
    }
    /* hide image on mobile */
    .footer-image {
        max-width: 0px;
    }
}

ul {
    margin-left: 20px;
    margin-bottom: 1rem;
}