/*

Color Theme (Dark->Light)
#002400
#273B09
#58641D
#7B904B
#DBD2E0

*/

@font-face {
    font-family: 'Instrument Serif';
    src: url('/assets/fonts/instrument-serif.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter.woff2') format('woff2');
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: #273B09;
    color: #DBD2E0;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}
h1, h2 {
    font-family: 'Instrument Serif', serif;
    font-weight: normal;
}
button {
    font-family: inherit;
}

#bar {
    height: clamp(2.5rem, 6vh, 4rem);
    display: grid;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-inline: 10vw;
    grid-template-columns: 3fr 1fr 1fr 1fr 1fr 1fr;
    border-bottom: solid #002400;
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #273B09;
}
#bar > h2 {
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
    justify-content: center;
    font-size: clamp(1.1rem, 3vmin, 2.5rem);
}
#bar > a {
    background-color: #273B09;
    color: #DBD2E0;
    text-decoration: none;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    height: clamp(2.5rem, 6vh, 4rem);
    font-size: clamp(0.8rem, 2vmin, 1.5rem);
    transition: background-color 0.2s;
}
#bar > a:hover {
    background-color: #002400;
    color: #DBD2E0;
    border: none;
}

/* Hero */

#hero {
    display: grid;
    grid-template-columns: 3fr 2fr;
    margin-inline: 20vmin;
    text-align: center;
    min-height: 95vh;
    align-items: center;
    position: relative;
    justify-self: center;
}
#hero > h1 {
    font-size: clamp(3.5rem, 8vw, 10rem);
    position: relative;
    justify-self: center;
}
#hero>h1::before {
    content: "";
    display: block;
    background-color: #7B904B;
    width: 20vw;
    height: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
}
#hero > p {
    font-size: clamp(1.1rem, 3vmin, 2.5rem);
}
#hero > div {
    display: grid;
    position: absolute;
    left: 7vw;
    bottom: 30vh;
    display: block;
}
#projectLink {
    text-decoration: none;
    color: #DBD2E0;
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    transition: color 0.2s;
}
#projectLink:hover {
    color: #7B904B;
}
/* Carousel */

#carousel {
    background-color: #002400;
    display: grid;
    grid-template-columns: 1fr 20fr 1fr;
}
#slides {
    display: grid;
    grid-template-columns: 1fr;
}
.slideshow-frame {
    display: grid;
    justify-content: center;
    align-items: center;
    grid-area: 1 / 1;
    grid-template-columns: 1fr 1fr;
    padding-top: 3rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}
.slideshow-frame.active {
    opacity: 1;
    visibility: visible;
}
.slideshow-frame > img {
    width: 40vw;
    height: auto;
}
.arrows {
    background-color: #002400;
    color: #DBD2E0;
    border: none;
    font-size: clamp(1.5rem, 4vw, 4rem);
    transition: color 0.2s;
}
.arrows:hover {
    color: #7B904B;
}
.frame-text {
    font-size: clamp(1rem, 1.4vw, 1.5rem);
    margin: 3vw;
}
.frame-text > a {
    text-decoration: none;
    color: #DBD2E0;
    background-color: #273B09;
    padding: 2vmin;
    border-radius: 1em;
    display: inline-block;
}
#counter {
    position: absolute;
    left: 8vw;
    font-size: clamp(0.9rem, 3vmin, 1.5rem);
    background-color: #273B09;
    padding-inline: 2vmin;
    padding-block: 1vmin;
    border-radius: 1em;
}
.carouselTags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11ch, 1fr));
    gap: 1vh 1vw;
    margin-bottom: 3vh;
    font-size: 0.85em;
}
.carouselTags > p {
    margin: 0;
    text-align: center;
    white-space: nowrap;
    background-color: #013301;
    padding-inline: 0.5em;
    padding-block: 1vh;
    border-radius: 1em;
}


/* Projects Table */

#projects-table {
    width: 94%;
    margin-inline: auto;
    font-size: clamp(0.9rem, 1.6vw, 1.75rem);
    border-collapse: collapse;
    border: none;
}
#projects-table > h1 {
    position: relative;
    justify-self: center;
}
td > a {
    text-decoration: none;
    color: #DBD2E0;
}
th {
    font-size: clamp(1rem, 1.8vw, 1.9rem);
    border-bottom: 2px solid #7B904B;
}
th, td {
    border-bottom: 1px solid #58641D;
}
td {
    padding-left: 1vw;
    padding-block: 1vh;
}
tbody > tr {
    transition: background-color 0.2s;
}
tbody > tr:hover {
    background-color: #203107;
}
#table-section > h1 {
    font-size: clamp(2rem, 6vmin, 6rem);
    text-align: center;
    position: relative;
    justify-self: center;
}
#table-section > h1::before {
    content: "";
    display: block;
    background-color: #002400;
    width: 20vw;
    height: 5px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}
#table-section {
    margin-block: 6vh;
}

/* About Me */
#about-me {
    background-color: #002400;
    color: #DBD2E0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding-block: 8vh;
}
#about-me > h1 {
    text-align: center;
    font-size: clamp(2.2rem, 4vw, 4.5rem);
    position: relative;
    justify-self: center;
}
#about-me > h1::before {
    content: "";
    width: 10vw;
    height: 5px;
    background-color: #58641D;
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
}
#about-me > div > p {
    padding-right: 6vw;
    font-size: clamp(1rem, 1.4vw, 1.75rem);
    max-width: 60ch;
}

/* Tag Section */
#skills {
    display: grid;
    grid-template-columns: 2fr 1fr;
    justify-content: center;
    align-items: center;
    padding-block: 6vh;
}
#skills > h1 {
    font-size: clamp(2.2rem, 4vw, 4.5rem);
    text-align: center;
    order: 1;
}
.skillsTitle {
    font-size: clamp(1.3rem, 2vw, 2.5rem);
    position: relative;
    width: fit-content;
}
.skillsTitle::before {
    content: "";
    position: absolute;
    left: 0em;
    right: -1em;
    bottom: 0;
    height: 5px;
    background-color: #7B904B;
}
#tag-section > div {
    margin-inline: 3vw;
}
.tagContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14ch, 1fr));
    gap: 2vh 1vw;
    font-size: clamp(0.9rem, 1.2vw, 1.25rem);
}
.tag {
    background-color: #002400;
    text-align: center;
    margin: 0;
    white-space: nowrap;
    padding-inline: 0.5em;
    padding-block: 1vw;
    border-radius: 1em;
}

/* Contact Section */
#contact {
    background-color: #002400;
    display: grid;
    text-align: center;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 4vh;
    padding-block: 6vh;
}
#contact > h1 {
    font-size: clamp(2.2rem, 4vw, 4.5rem);
    position: relative;
    justify-self: center;
}
#contact > h1::before {
    content: "";
    width: 10vw;
    height: 5px;
    background-color: #58641D;
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
}
#contact > p {
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.75rem);
}
#contact-link {
    margin-inline: 10vw;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2vw;
}
#contact-link > a {
    text-decoration: none;
    color: #DBD2E0;
    text-align: center;
    background-color: #273B09;
    border-radius: 1rem;
    padding-block: 2vh;
    padding-inline: 1em;
    font-size: clamp(1rem, 3vmin, 2.5rem);
    transition: background-color 0.2s;
}
#contact-link > a:hover {
    background-color: #58641D;
}
#contact-link > a:focus-visible {
    outline: 2px solid #7B904B;
    outline-offset: 3px;
}

/* Footer */
#footer {
    margin-inline: 5vw;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}
#footer > h1 {
    font-size: clamp(1.3rem, 2vw, 2rem);
}
#footer > a {
    text-decoration: none;
    color: #DBD2E0;
    justify-self: end;
    font-size: clamp(1rem, 1.4vw, 1.75rem);
}
#footer > a:hover {
    color: #7B904B;
}

/* 404 */
#not-found {
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
    min-height: 80vh;
    margin-inline: 6vw;
}
#not-found > h1 {
    font-size: clamp(6rem, 18vw, 16rem);
    margin: 0;
    line-height: 1;
    position: relative;
}
#not-found > h1::before {
    content: "";
    display: block;
    background-color: #7B904B;
    width: 100%;
    height: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
}
#not-found > h1.long-title {
    font-size: clamp(3rem, 8vw, 8rem);
}
#not-found > p {
    font-size: clamp(1.1rem, 3vmin, 2rem);
    max-width: 40ch;
}
#not-found-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2vw;
}
#not-found-links > a {
    text-decoration: none;
    color: #DBD2E0;
    background-color: #002400;
    border-radius: 1rem;
    padding-block: 2vh;
    padding-inline: 1em;
    font-size: clamp(1rem, 1.4vw, 1.5rem);
    transition: background-color 0.2s;
}
#not-found-links > a:hover {
    background-color: #58641D;
}
#not-found-links > a:focus-visible {
    outline: 2px solid #7B904B;
    outline-offset: 3px;
}

/* Mobile */
@media (max-width: 768px) {
    #bar {
        height: auto;
        padding-inline: 1vw;
        grid-template-columns: 4fr 4fr 3fr 4fr 4fr;
    }
    #bar > h2 {
        grid-column: 1 / -1;
        padding-block: 1vh;
    }
    #hero {
        grid-template-columns: 1fr;
        margin-inline: 6vw;
        min-height: 80vh;
        align-content: center;
    }
    /* Put the See Projects link back in the flow, under the intro text */
    #hero > div {
        position: static;
    }
    #carousel {
        grid-template-columns: 1fr 10fr 1fr;
    }
    .slideshow-frame {
        grid-template-columns: 1fr;
        align-content: start;
        padding-top: 8vh;
        padding-bottom: 3vh;
    }
    .slideshow-frame > img {
        width: 100%;
    }
    /* Hide Category and Stack so the table fits */
    th:nth-child(2), td:nth-child(2),
    th:nth-child(4), td:nth-child(4) {
        display: none;
    }
    #about-me {
        grid-template-columns: 1fr;
        padding-inline: 6vw;
        min-height: auto;
    }
    #about-me > div > p {
        padding-right: 0;
    }
    #skills {
        grid-template-columns: 1fr;
    }
    #skills > h1 {
        order: 0;
    }
    #contact {
        padding-block: 5vh;
    }
    #contact-link {
        margin-inline: 5vw;
        gap: 4vw;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
