* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    /* outline: 2px solid greenyellow; */
}

@media (prefers-color-scheme: light) {
    :root {
        --text-dark: #63617f;
        --text-light: black;
        --bg: #d5e3eb;
        --cell-bg: white;
        --cell-border: #c2d2dcd3;
        --accent: #ebaf54;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #9cacc4;
        --text-light: #fff;
        --bg: #110e1a;
        --cell-bg: #222036ed;
        --cell-border: #47455faa;
        --accent: #ff3263;
    }
}

body[data-theme=dark] {
    --text-dark: #9cacc4;
    --text-light: #fff;
    --bg: #110e1a;
    --cell-bg: #222036;
    --cell-border: #47455faa;
    --accent: #ff3263;
}

body[data-theme=light] {
    --text-dark: #63617f;
    --text-light: black;
    --bg: #d5e3eb;
    --cell-bg: white;
    --cell-border: #c2d2dcd3;
    --accent: #edbb8b;
}

::-moz-selection {
    /* Code for Firefox */
    color: var(--text-light);
    background: var(--accent);
}

::selection {
    color: var(--text-light);
    background: var(--accent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-light);
    transition: color 0.1s ease-in-out;
}

body {
    min-height: 100vh;
    max-width: 100vw;
    display: grid;
    place-items: center;
    place-content: center;
    background: var(--bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

main {
    color: var(--text-dark);
    display: grid;
    gap: 1rem;
    padding: 2rem;
    min-height: 650px;
    width: fit-content;
    grid-template-columns: repeat(auto-fit, minmax(min-content, 1fr));
    grid-template-rows: repeat(auto-fit, minmax(min-content, 1fr));
    grid-auto-flow: dense;
}

section {
    background: var(--cell-bg);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-radius: 5px;
    outline: 3px solid var(--cell-border);
    transition: color 0.1s ease-in-out, outline-color 0.1s ease-in-out, opacity 0.5s ease-in, transform 0.5s cubic-bezier(.4,0,.2,1);
    min-height: fit-content;
    min-width: fit-content;
    opacity: 0;
    transform: translateY(1000px);
}

section:hover {
    outline-color: var(--accent);
}

section:hover h3 {
    color: var(--accent);
}

#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    color: var(--text-dark);
    background: var(--cell-bg);
    border: 3px solid var(--cell-border);
    font-size: 18pt;
    padding: 1rem;
    display: grid;
    place-content: center;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

#theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

#intro span {
    color: var(--text-light);
    font-weight: bolder;
    white-space: nowrap;
    transition: color 0.1s ease-in-out;
}

#intro:hover span {
    color: var(--accent);
}

#intro {
    grid-area: 1 / 1 / span 2 / span 3;
    font-size: 13pt;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#intro div {
    background: var(--bg);
    border-radius: 50%;
    border: 3px solid var(--cell-border);
    transition: all 0.1s ease-in-out;
}

#intro img {
    float: left;
    height: 100px;
    border-radius: 50%;
    background: transparent;
    
    /* mix-blend-mode: luminosity; */
    filter: grayscale(50%) opacity(75%) contrast(1.3) saturate(90%);
    /* filter: contrast(1.3) brightness(0.9) saturate(2.5); */
}

#intro:hover div {
    border-color: var(--accent);
}

#skills {
    grid-area: 1 / 4 / span 2 / span 3;
}

#skills>ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    gap: 0.5rem;
    list-style: none;
}

#skills>ul>li {
    padding: 0.5rem;
    background: var(--cell-border);
    /* border: 3px solid var(--cell-border); */
    border-radius: 5px;
    text-align: center;
    font-size: 11pt;
    transition: all 0.1s ease-in-out;
    font-weight: bold;
}

#skills>ul>li:hover {
    background: var(--accent);
    color: var(--text-light);
}

#aboutme {
    grid-area: 1 / 7 / span 4 / span 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 11pt;
}

#contact {
    grid-area: 5 / 7 / span 3 / span 2;
}

#contact>ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
    justify-content: space-evenly;
    align-items: center;
    height: 100%;
}

#contact a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.1s ease-in-out;
    font-weight: bold;
    text-align: justify;
}

#contact a:hover {
    color: var(--accent);
    text-decoration: underline;
}

#status {
    grid-area: 5 / 5 / span 1 / span 2;
}

#footer {
    grid-area: 8 / 7 / span 1 / span 2;
    font-size: 10pt;
    text-align: center;
    display: grid;
    place-content: center;
}

#projects {
    grid-area: 3 / 1 / span 6 / span 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    overflow: hidden;
    /* outline: none; */
    max-height: 400px;
}

.carousel {
    padding: 0;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.1s ease-in;
    overflow: hidden;
}

.carousel button {
    /* outline: 2px solid red; */
    position: absolute;
    display: flex;
    align-items: center;
    top: 0;
    bottom: 0;
    margin: auto;
    height: 100%;
    background: transparent;
    background: var(--cell-bg);
    /* background: color-mix(in srgb, var(--text-light) 30%, transparent); */
    /* backdrop-filter: blur(10px); */
    /* height: fit-content; */
    border: none;
    font-size: 2.5rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--cell-border);
    /* opacity: 0.6; */
    transition: all 0.1s ease-in-out;
    padding-top: 0.75rem;   
    /* border: 3px solid var(--cell-border); */
}

#projects:hover .carousel button {
    color: var(--accent);
    border-color: var(--accent);
}

#prev-button {
    left: 0;
    border-radius: 5px 0 0 5px;
    border-right: 3px solid;
}

#next-button {
    right: 0;
    border-radius: 0 5px 5px 0;
    border-left: 3px solid;
}

.slide-container {
    overflow-y: hidden;
    transition: all 0.25s ease-in;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;

    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: scroll;
    scroll-behavior: smooth;
    list-style: none;
}

.slide-container::-webkit-scrollbar {
    display: none;
}


.slide {
    width: 100%;
    height: 100%;
    flex: 1 0 100%;
    scroll-snap-align: center;
    cursor: pointer;
    padding: 0;
}

.slide>img {
    width: 100%;
    height: clamp(300px, 100%, 400px);
    object-fit: cover;
    object-position: center;
    /* aspect-ratio: 16 / 9; */
}

#expanded-preview {
    margin: auto;
    height: fit-content;
    width: fit-content;
    max-width: min(900px, 90%);
    overflow: hidden;
    border-radius: 10px;
    border: 3px solid var(--cell-border);
    padding: 0;
    background: var(--cell-bg);
    color: var(--text-dark);
}

#expanded-preview>div {
    display: flex;
    width: 100%;
    height: 100%;
}

#expanded-preview>div>div {
    flex: 1;
    /* width: 250px; */
    padding: 1.5rem;
    border-left: 3px solid var(--cell-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

::backdrop {
    background: rgba(0, 0, 0, 0.598);
}

#expanded-preview img {
    flex: 2 1;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
    display: block;
}

#expanded-preview button.close-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: 3px solid var(--cell-border);
    background: var(--cell-bg);
    color: var(--text-dark);
    outline: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-content: center;
    place-items: center;
    font-weight: bolder;
    transition: all 0.1s ease-in-out;
}

#expanded-preview button.close-button:hover {
    color: var(--accent);
    border-color: var(--accent);
}

#expanded-preview a.visit-button {
    background:transparent;
    border-radius: 10px;
    border: 3px solid var(--cell-border);
    padding: 0.5rem 0;
    font-size: 12pt;
    /* font-weight: 400; */
    color: var(--text-dark);
    transition: all 0.1s ease-in-out;
    text-align: center;
    text-decoration: none;
}

#expanded-preview a.visit-button:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media only screen and (min-width: 320px) and (max-width: 600px) {
    #intro {
        grid-area: 1 / 1 / span 4 / span 4;
    }

    #aboutme {
        grid-area: 5 / 1 / span 4 / span 4;
    }

    #skills {
        grid-area: 9 / 1 / span 4 / span 4;
    }

    #projects {
        grid-area: 13 / 1 / span 4 / span 4;
    }

    #expanded-preview>div {
        flex-direction: column;
    }

    #contact {
        grid-area: 17 / 1 / span 4 / span 4;
    }

    #contact>ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    #contact li {
        flex: 1;
        text-align: center;
    }

    #footer {
        grid-area: 21 / 1 / span 1 / span 4;
    }
}


@media only screen and (min-width: 600px) and (max-width: 979px) {
    #intro {
        grid-area: 1 / 1 / span 2 / span 4;
    }

    #skills {
        grid-area: 3 / 1 / span 2 / span 4;
    }

    #aboutme {
        grid-area: 1 / 5 / span 4 / span 2;
    }

    #projects {
        grid-area: 5 / 1 / span 4 / span 6;
    }

    #expanded-preview>div {
        flex-direction: column;
    }

    #expanded-preview>div>div{
        width: 100%;
        max-width: fit-content;
        height: 100%;
        flex: 1;
    }

    #contact {
        grid-area: 9 / 1 / span 1 / span 4;
    }

    #contact>ul {
        flex-direction: row;
    }

    #footer {
        grid-area: 9 / 5 / span 1 / span 2;
    }
}

/* * {
    outline: 3px solid yellowgreen;
} */