@font-face {
    font-family: SourceSansPro-SemiBold;
    src: url(/fonts/SourceSans3-Semibold.woff2) format(woff2);
}

@font-face {
    font-family: SourceSerif-Regular;
    src: url(/fonts/SourceSerif4-Regular.woff2) format(woff2);
}

@font-face {
    font-family: SourceSerif-Italic;
    src: url(/fonts/SourceSerif4-It.woff2) format(woff2);
}

@font-face {
    font-family: SourceSerif-Bold;
    src: url(/fonts/SourceSerif4-Bold.woff2) format(woff2);
}

:root {
    --foreground-color: black;
    --background-color: white;
    --secondary-background-color: hsl(0, 0%, 97%);
    --border-color: hsl(0, 0%, 90%);
    --accent-color: hsl(245, 86%, 36%);
    --secondary-accent-color: hsl(272, 71%, 39%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --foreground-color: white;
        --background-color: hsl(0, 0%, 12%);
        --secondary-background-color: hsl(0, 0%, 17%);
        --border-color: hsl(0, 0%, 27%);
        --accent-color: hsl(237, 100%, 74%);
        --secondary-accent-color: hsl(281, 100%, 76%);
    }
}

body {
    background-color: var(--background-color);
    color: var(--foreground-color);
    font-family: SourceSerif-Regular;
    color-scheme: light dark;
    max-width: 41.75rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 4.75rem 2fr;
    column-gap: 4rem;
}

h1 {
    font-size: 1.5rem;
    font-family: SourceSerif-Bold;
    font-weight: normal;
    margin: 0.75rem 0;
    padding: 0;
}

h2 {
    font-size: 1.25rem;
    font-family: SourceSerif-Regular;
    font-weight: normal;
    margin: 0.75rem 0;
    padding: 0;
}

h3, h4, h5, h6 {
    font-size: 1rem;
    font-family: SourceSerif-Regular;
    font-weight: normal;
}

p {
    line-height: 1.5rem;
    margin: 0.5rem 0;
    padding: 0;
}

b {
    font-weight: normal;
    font-family: SourceSerif-Bold;
}

i {
    font-style: normal;
    font-family: SourceSerif-Italic;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:link {
    color: var(--accent-color);
}

a:visited {
    color: var(--secondary-accent-color);
}

a:hover {
    text-decoration: underline;
}

h1 a, h2 a, h3 a, h4 a, h5 a,
h1 a:link, h2 a:link, h3 a:link, h4 a:link, h5 a:link,
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited {
    color: var(--foreground-color);
}

cite {
    font-style: normal;
}

sub, sup {
    line-height: 0;
}

ul {
    margin: 0.5rem 0;
    padding-top: 0;
    padding-bottom: 0;
}

header {
    position: sticky;
    top: 0;
    align-self: start;
    margin: 0 0 0.5rem 0;
    padding: 0.5rem 0 0 0;
}

header svg {
    color: var(--foreground-color);
}

header svg:hover{
    color: var(--accent-color);
}

#menu-button svg {
    height: 1rem;
    width: 1.125rem;
}

#close-button svg {
    height: 1rem;
    width: 1rem;
}

nav ul {
    list-style: none;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

nav ul {
    text-align: right;
}

nav li {
    text-transform: uppercase;
    font-family: SourceSansPro-SemiBold;
    margin: 0.5rem 0 0.5rem 0;
}

#logo {
    font-family: SourceSerif-Bold;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    display: block;
    text-align: right;
}

a#logo:link, a#logo:visited, nav a:link, nav a:visited {
    color: var(--foreground-color);
    text-decoration: none;
}

a#logo:hover, nav a:hover, nav .active a:link, nav .active a:visited, nav .active a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

button {
    all: unset;
    cursor: pointer;
    align-self: center;
    justify-self: right;
    padding: 0;
    margin: 0;
    display: none;
}

#profile {
    margin: 1rem 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1.5rem;
}

#profile div {
    align-content: center;
}

#profile h1 {
    margin-bottom: 0.5rem;
    margin-top: 0;
    font-size: 1.75rem;
}

#profile p {
    margin: 0.25rem 0;
}

#profile img {
    border-radius: 0.25rem;
    margin: 0;
    padding: 0;
    display: block;
    width: 11rem;
    height: 11rem;
}

@media screen and (max-width: 43.75rem) {
    body {
        max-width: 33rem;
        display: block;
    }

    h1 {
        margin-top: 1rem;
    }

    #logo {
        margin: 0;
    }

    header {
        background-color: var(--background-color);
    }

    header > div {
        padding: 0 0 0.25rem 0;
        display: grid;
        grid-template-columns: max-content 1fr;
        border-bottom: solid 0.125rem var(--foreground-color);
    }

    nav {
        border-bottom: solid 0.125rem var(--foreground-color);
    }

    nav ul {
        font-size: 1.25rem;
        text-align: center;
    }

    .hidden {
        display: none;
    }

    button {
        display: block;
    }
}

@media screen and (max-width: 35rem) {
    #profile {
        grid-template-columns: none;
        grid-template-rows: max-content 1fr;
    }

    #profile h1, #profile p {
        text-align: center;
    }

    #profile h1 {
        margin-top: 0.5rem;
    }

    #profile img {
        justify-self: center;
    }
}
