@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Sono:wght@200..800&display=swap');

:root {
    --header: #4a4e69;
    --background: #fff;
    --page-color-transition: background .2s ease, color .2s ease;
}

* {
    font-size: 17px;
    margin: 0;
    padding: 0;
}

.dark {
    background-color: #222222 !important;
    color: #ffffff;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 0);
    --header: #c9ada7;
    --background: #222222;
}

.dark a {
    color: #fff;
}

.light {
    background-color: #fff !important;
    color: #000;
    background-image: radial-gradient(rgba(0, 0, 0, 0.2) 1px, transparent 0);
    --header: #4a4e69;
    --background: #fff;
}

.dev-font {
    font-family: 'Share Tech Mono', monospace;
}

body {
    font-family: 'Raleway', sans-serif;
    background: var(--background);
    transition: transform 0.2s ease-in-out, var(--page-color-transition);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: radial-gradient(rgba(0, 0, 0, 0.2) 1px, transparent 0);
    background-size: 20px 20px;
    min-width: fit-content;
    max-width: 100vw;
}


hr {
    outline: none;
    border: none;
    height: 1px;
    background: #04004b;
}


.main-grid-container {
    display: grid;
    grid-template-columns: 1.5rem 1fr 1.5rem;
    grid-template-rows: 1.5rem 6rem 1.5rem auto 1.5rem 3rem 1.5rem;
    /* Two columns layout */
    justify-content: center;
    /* Center the grid horizontally */
    height: 100vh;
    max-width: 80vw;
    min-width: 768px;
}

.main-flex-container {
    grid-row: 4 / span 1;
    grid-column: 2 / span 1;
    width: 100%;
    margin-top: -1.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dark hr {
    background: rgb(0, 180, 255);
}

.standout.dark {
    box-shadow: 1rem 1rem rgba(235, 235, 235, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.standout.dark .header {
    background: #323232;
}

.standout.dark .header h1 {
    color: #625afa;
}

.standout-mini.dark {
    box-shadow: 1rem 1rem rgba(235, 235, 235, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.standout-mini.dark .header {
    background: #323232;
}

.standout-mini.dark:hover .header {
    background: #8DA1B7;
}

.standout-mini.dark .header h1 {
    color: #00a0ff !important;
}

.standout-mini.dark:hover .header h1 {
    color: #f0f0f0 !important;
}
.standout-mini.dark:hover .header hr {
    background-color: #f0f0f0;
}

.standout-mini.dark:hover {
    background: #b7c9e2 !important;
    color: #222;
}

.standout-mini.dark:hover a {
    color: #222;
}

.standout {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: 1rem 1rem rgba(20, 20, 20, 0.4);
    transition: 0.2s ease-in-out;
}

.main-flex-container .standout {
    width: calc(50% - 0.9rem);
}

.main-flex-container .standout {
    margin: 1.5rem 0;
}

.standout-mini {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0.5rem 0.5rem rgba(20, 20, 20, 0.4);
    margin: 1.5rem 0;
    width: calc(100% - 3rem);
    justify-self: center;
    transition: 0.2s ease-in-out;
}

.standout-mini:hover {
    background: #f5f5ff;
    cursor: pointer;
}


.standout-mini:hover .header {
    background: #e5e5ff;
}

.standout-mini ul {
    margin: 1em 0 0 1em;
}

a {
    color: black;
    text-decoration: none;
    position: relative;
    transition: 0.2s ease-in-out;
    font-size: 1.1rem;
}

a:hover {
    color: #F14E32 !important;
}

a:before,
a:after {
    content: '';
    border-bottom: solid 1px #F14E32;
    position: absolute;
    bottom: 0;
    width: 0;
}

a:before {
    left: 0;
}

a:after {
    right: 0;
}

a:hover:before,
a:hover:after {
    width: 50%;
}

a:before,
a:after {
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.standout-mini .header h1 {
    padding: 0 0 0.5rem 0;
}

.standout-mini .header h2:first {
    padding: 0.5rem 0;
}

.standout-mini .header h2:last-of-type {
    padding: 0.5rem 0 0 0;
}

.padded {
    padding: 1rem;
}

.project-timeframe {
    padding: 0.5rem 0;
}

#darkmode {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #fff;
    color: #fff;
    cursor: pointer;
    text-align: center;
    font-size: 1.2rem;
    z-index: 1000;
    transition: 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.darkmode_icon {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--header);
    transform-origin: center center;
    transition: transform 0.75s ease-in-out, var(--page-color-transition);
}

.darkmode_icon::after {
    position: absolute;
    content: '';
    width: 16px;
    height: 16px;
    left: 8px;
    bottom: 4px;
    border-radius: 10px;
    background: var(--background);
    transform-origin: center center;
    transition: transform 0.5s ease, left 0.25s ease, bottom 0.25s ease, var(--page-color-transition);
}

.darkmode_icon .ray {
    position: absolute;
    left: 7px;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 6px;
    background: var(--header);
    transform-origin: center;
    transition: transform 0.5s ease-in-out, var(--page-color-transition);
}

.ray:nth-child(1) {
    transform: rotate(45deg) translateX(0);
}

.ray:nth-child(2) {
    transform: rotate(90deg) translateX(0);
}

.ray:nth-child(3) {
    transform: rotate(135deg) translateX(0);
}

.ray:nth-child(4) {
    transform: rotate(180deg) translateX(0);
}

.ray:nth-child(5) {
    transform: rotate(225deg) translateX(0);
}

.ray:nth-child(6) {
    transform: rotate(270deg) translateX(0);
}

.ray:nth-child(7) {
    transform: rotate(315deg) translateX(0);
}

.ray:nth-child(8) {
    transform: rotate(360deg) translateX(0);
}

.dark {
    & .darkmode_icon {
        transform: scale(0.6);
    }

    & .darkmode_icon::after {
        left: 15px;
        bottom: 8px;
        transform: scale(0);
    }

    & .ray:nth-child(1) {
        transform: rotate(45deg) translateX(-16px);
    }

    & .ray:nth-child(2) {
        transform: rotate(90deg) translateX(-16px);
    }

    & .ray:nth-child(3) {
        transform: rotate(135deg) translateX(-16px);
    }

    & .ray:nth-child(4) {
        transform: rotate(180deg) translateX(-16px);
    }

    & .ray:nth-child(5) {
        transform: rotate(225deg) translateX(-16px);
    }

    & .ray:nth-child(6) {
        transform: rotate(270deg) translateX(-16px);
    }

    & .ray:nth-child(7) {
        transform: rotate(315deg) translateX(-16px);
    }

    & .ray:nth-child(8) {
        transform: rotate(360deg) translateX(-16px);
    }
}

/*   RESPONSIVE   */

@media only screen and (max-width: 768px),
(hover: none) and (pointer: coarse) {
    body {
        min-width: fit-content;
        max-width: 100vw;
    }

    .main-grid-container {
        grid-template-columns: 1.5rem 1fr 1.5rem;
        justify-content: center;
        width: 100%;
        height: 100vh;
        min-width: calc(100vw - 3rem);
    }

    .main-flex-container {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .main-flex-container .standout {
        width: 100%;
    }

    #darkmode {
        display: none;
    }
}
