:root {
    --bright: #fe6148;
    --dark: #1c191c;
    
}

@font-face {
    font-family: Lexend;
    src: url("/assets/fonts/Lexend-VariableFont_wght.ttf")
}

.sr-only {
    position: absolute;
    left: -10000px;
    top: auto;

    width: 1px;
    height: 1px;
   
    overflow: hidden;
}

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

a:visited {
    color: rgb(250, 129, 129);

}

a:hover {
    color: white;
}

a:active {
    color: gray;
}



body {
    margin: 0;
    font-size: 16px;
    font-family: Lexend, Arial, Helvetica, sans-serif;
    color: white;
    background-color: #000000;
}

h1 {
    font-size: 2em;
    margin: 0;
}

button {
    background-color: var(--dark);
    text-transform: uppercase;
    border: none;
    color: var(--bright);
    padding: 10px;
}

body > *:not(#top-nav), main > * {
    margin: 15px;
    vertical-align: top;
}

#top-nav {
    margin-bottom: 15px;

    /* -20 px for padding, -30 for margin */
    width: calc(100%-50px);
    min-height: 55px;
    height: fit-content;
    background-color: var(--bright);
    box-shadow: 0px 2px 1px #471b14;

    padding: 0px 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;    
}
#top-nav h1 {
    color: black;
    font-size: 0.9em;
    letter-spacing: 3px;
    text-transform: uppercase;
}

#top-nav button {
    font-weight: bold;
    letter-spacing: 1px;
}

header, #about, #contact, #vertical-text-block,
#spread, #toolbelt, hr, #projects,
#portrait, #a-creature-building-for-a-future, #musicplayer,
#resume {
    border: 0.8px solid var(--bright);
}


header {
    margin:auto; 
    /* -20px for padding, 30 for margin */
    width: calc(100% - 50px);
    color: white;
    text-transform: uppercase;
    min-height: 92px;
    

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px;

    gap: 20px;

}

header >:not(svg) {
    flex: 1;
}
header > span {
    flex-basis: 35%;
    font-weight: 150;
}
header > span > span {
    letter-spacing: 3px;
}
header h2 {
    color: var(--bright);
    margin: 0;
    margin-bottom: 10px;
    letter-spacing: 2px;
}
header svg {
    fill: var(--bright);
    width: auto;
    height: 80%;
    min-width: 40px;
    max-height: 92px;
}
header img {
    flex-basis: 45%;
    border: 1px solid white;
    max-width: 100%;
}

#about {
    text-align: center;
}
#about p:not(:last-of-type) {
    font-weight: bold;
}

#about-and-contact {
    vertical-align: top;
    display: inline-grid;
    grid-template-columns: minmax(100px, 544px) fit-content(60px);
    grid-template-rows: fit-content(40%) 0.1fr 1.4fr;

    margin: auto;

    margin-bottom: 80px;

    position: relative;
}

#about-and-contact > section {
    max-width: 544px;
}


#about {
    grid-column-start: 1;
    grid-row-start: 1;
}

#vertical-text-block {
    grid-column-start: 2;
    grid-row: span 3;
}

#links ul {
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    max-width: 100%;
}
#links ul * {
    width: 35px;
    height: 35px;
}

#links .svg-icon {
    transition-property: background-color;
    transition-timing-function: ease-in-out;
    transition-duration: 250ms;
    background-color: var(--bright);
    border-radius: 100%;
}
#links .svg-icon path {
    transition: fill 250ms ease-in-out;
}

#links .svg-icon:hover {
    background-color: var(--dark);
    border-radius: 100%;
}

#links .svg-icon:hover path {
    fill: white;
}

#links .svg-icon li {
    display: flex;
    justify-content: center;
    align-items: center;
}

#links .svg-icon li svg {
    width: 70%;
}

#contact {
    grid-column: 1;
    grid-row: 3;
    background-image: url("contactme.png");
    background-repeat: no-repeat;
    background-position-y: bottom;
    background-position-x: right;
    background-size: cover;
    overflow: hidden;
}

#contact a:link {
    color: white;
}

#contact a:visited {
    text-underline-position: var(--bright);
}

#contact a:hover {
    color: var(--bright);
}

#contact a:active {
    color: gray;
}


#contact svg path {
    /* TODO: too general selecter, might cause issues down the line */
    fill: white;
}

#contact ul {
    list-style: none;
    padding: 0;
    padding-left: 10px;
    padding-top: 20px;
}

#contact li {
    margin-bottom: 10px;
}

#contact img:not(#marquee), #contact svg {
    width: 32px;
    vertical-align: middle;
    height: auto;
}

#marquee {
    background-color: var(--bright);
}

#resume {
    margin-top: 20px;
    display: inline-flex;
    flex-direction: column;
    font-size: 1.5em;
}

#resume h3 {
    text-transform: uppercase;
    letter-spacing: 7px;
    padding-left: 10px;
    padding-right: 10px;
}

#resume a {
    transition: background-color 500ms ease-in-out;
    background-color: var(--bright);
    color: var(--dark);
    text-decoration: none;
    font-weight: bold;
    min-height: 97px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#resume a:hover {
    background-color: #ffaea1;
}

#spread-and-resume {
    display: inline-flex;
    flex-direction: column;
    text-align: center;
}
#spread a {

}

main {
    display: inline;
}

#toolbelt {
    position: absolute;
    top: 100%;
    margin-top: 20px; /* Apply same margin as main gap */
    left: 0;
    width: 100%;
    height: auto;
}

#projects {
    padding: 10px;
    vertical-align: top;
    max-width: 40%;
    display: inline-block;
}

#projects-nav {
    display: flex;
    flex-wrap: wrap;
    text-wrap: nowrap;
    /* Compensate for padding. TODO: cleaner solution */
    width: calc(100%+20px);
    margin: -10px;
    text-align: center;
    color: var(--dark);

    /* TODO: this should not need to be done. but currently it is so that's just how it is gonna be for now */
    margin-bottom: 5px;
}

#projects-nav label {
    border: 3px solid var(--dark);
    background-color: var(--bright);
    padding: 5px;
    cursor: pointer;
    flex: 1;
}

.project-radio {
    display: none;
}
.project-radio + article {
    display: none;
}

.project-radio:checked + article {
    display: flex;  /* Keep in sync with .project { display } */
}

.project {
    display: flex;
    flex-wrap: wrap;
}

.project hr {
    flex-basis: 100%;
}

.project img {
    max-width: 45%;
    margin: 5px;
    object-fit: contain;
}

.project-overview {
    max-width: 50%;
    margin-left: 15px;
}
.project-overview > * {
    margin-top: 0;
    margin-bottom: 0;
}
/* TODO: not this */
.project-overview p:first-of-type {
    color: #494549; /* TODO: contrast */
    font-size: 1.5em;
    font-style: italic;
}
.project-overview p:nth-of-type(2) {
    margin-bottom: 12px;
    font-weight: 200;
    font-size: 1.5em;

}


.project-info {
    padding: 0;
    list-style: none;
}


.project hr {
    width: 95%;
    grid-column: span 2;
    grid-row: 2;
}

.contributions {
    padding: 0;
}
.contributions-title {
    font-weight: lighter;
    font-size: 2em;
}
.contributions h4 {
    margin: 5px;
}
.contributions > li {
    max-width: 40%;
    list-style: none;
    display: inline-block;
    vertical-align: top;
    font-weight: 300;
}

.contributions li li {
    list-style: disc;
}


aside {
    max-width: 300px;
    display: inline-block;
    /*display: inline-flex;
    flex-wrap: wrap;
    */
}

aside * {
    /*object-fit: contain;
    box-sizing: border-box;
    */
}

footer p {
    margin: 7px;
}

@media (max-width: 1111px) {
    header {
        flex-wrap: wrap;
    }
    #about-and-contact {
        width: 95%;

    }
    #spread-and-resume {
        display: block;
        margin: auto;
    }
    #resume {
        display: block;
        margin-bottom: 15px;
    }
    #projects {
        display: block;
        margin: auto;
        max-width: initial;
        width: 80vw;
    }
    aside {
        width: 80vw;
        max-width: initial;
        text-align: center;
    }
    aside > * {
        margin: 15px;
    }
    
    .project 
    #vertical-text-block {
        float: right;
    }

    #links ul {
        display: flex;
        flex-wrap: wrap;
    }

    .project img, .project-overview, .contributions > li {
        max-width: 100%;
        margin: auto;
    }

    .contributions-title {
        margin-bottom: 5px;
    }
    .contributions > li {
        margin-bottom: 10px;
    }
}