* {
    margin: 0;
    padding: 0;
    list-style-type: none;
    text-decoration: none;
}

@font-face {
    font-family: 'basictext';
    src: url('../res/fonts/Champagne\ &\ Limousines.ttf');
}

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--scroll-bar) var(--scroll-background);
    scrollbar-width: thin;
}

/* Theme-aware scrollbars for the document and overflowed project lists. */
* {
    scrollbar-color: var(--scroll-bar) var(--scroll-background);
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 0.75rem;
    height: 0.75rem;
}

*::-webkit-scrollbar-track {
    background: var(--scroll-background);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scroll-bar);
    border: 3px solid var(--scroll-background);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--font-color);
    padding: 1rem 1.75rem;
    border-radius: .5rem;
    font-weight: 500;
    transition: 1s;
    width: fit-content;
    margin-top: 10px;
    cursor: pointer;
    opacity: 0;
}

.visibleanimation {
    opacity: 1;
}

.button:hover {
    background-color: var(--color-accent);
}

p,
h1,
h2,
h3,
h4 {
    color: var(--font-color);
    font-family: 'basictext';
}

p {
    font-size: 1.4em;
}

a:-webkit-any-link {
    color: var(--font-color);
    width: fit-content;
    transition: 1s;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
}


i {
    color: var(--font-color);
}

i:hover {
    color: var(--color-accent);
}

.theme-dark {
    --background-color: #111827;
    --background-second: #1f2937;

    --font-color: #f3f4f6;
    --font-color2: #111827;

    --shade: rgba(15, 23, 42, 0.78);

    --primary-color: #334155;
    --secondary-color: #475569;
    --color-accent: #8ba8d9;

    --scroll-background: #475569;
    --scroll-bar: #cbd5e1;
}

.theme-light {
    --background-color: #f4efe8;
    --background-second: #e6ddd1;

    --font-color: #233143;
    --font-color2: #f8f5ef;

    --shade: rgba(255, 255, 255, 0.82);

    --primary-color: #d8d6e8;
    --secondary-color: #c4b7a6;
    --color-accent: #7f95b8;

    --scroll-background: #cbbca8;
    --scroll-bar: #5e6780;
}

body {
    background: linear-gradient(90deg, var(--background-color) 50%, var(--background-second) 90%);
    overflow-x: hidden;
}

img {
    color: var(--font-color);
    text-align: center;
    animation: blink 4s linear;
}


@keyframes blink {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    40% {
        opacity: 0;
    }

    60% {
        opacity: 1;
    }

    80% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/*SCROLLEABLE*/

*,
*::after,
*::before {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

main {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.wrapper {
    height: 100%;
    width: 100%;
    transition: all 1.4s ease;
}

section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem 3rem;
}

@media (min-width: 769px) {
    body {
        overflow: hidden;
    }

    main {
        height: 100vh;
        overflow: hidden;
    }

    .wrapper {
        height: 100%;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    main {
        height: auto;
        overflow: visible;
    }

    .wrapper {
        height: auto;
        transform: none !important;
    }

    section {
        min-height: 500px;
        height: auto;
        justify-content: flex-start;
    }

    .home {
        flex-direction: column;
        gap: 2rem;
        padding-top: 6rem;
    }

    .home>.homeimgdiv>img {
        width: min(70vw, 18rem);
    }

    .webprojects>.articlescontainer {
        grid-template-columns: 1fr;
        overflow: visible;
    }
}

.sectiontitle {
    margin-bottom: 5vh;
    font-size: 2em;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.1s;
}

.animation3s {
    animation: write 3s;
}

.opacity1 {
    opacity: 1;
}

@keyframes write {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.background {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
}

/*HEADER*/
header {
    background: linear-gradient(45deg, var(--background-color) 20%, var(--background-second) 90%);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

header>nav {
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

header>nav>.navM {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 100;
}

header>nav>.navtoggle {
    position: absolute;
    left: 0px;
    top: -150px;
    font-size: 1.25rem;
    cursor: pointer;
}

header>nav>.navtoggle>.bx-grid-alt {
    font-size: 2.5em;
}

header>nav>.navM>.navclose>.bx-x {
    font-size: 1.56em;
}

header>nav>.navM>.navclose {
    position: absolute;
    right: 0;
    top: -150px;
    font-size: 1.8rem;
    cursor: pointer;
}

header>nav>.navM>ul {
    width: 90%;
    height: 100%;
    display: flex;
    column-gap: 0.5rem;
    font-weight: 500;
    font-size: 1em;
}

header>nav>.navM>ul>a {
    height: 100%;
    width: 15%;
    z-index: 100;
    cursor: pointer;
}

header>nav>.navM>ul>a>li {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

header>nav>.navM>ul>a:hover,
header>nav>.navM>ul>a.active {
    background-color: var(--color-accent);
    transition: 0.5s ease-out;
}

header>nav>.iconsmargin {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.language-select {
    border: 1px solid var(--secondary-color);
    border-radius: .35rem;
    background: var(--primary-color);
    color: var(--font-color);
    cursor: pointer;
    font-family: 'basictext';
    font-size: 1rem;
    padding: .35rem 1.75rem .35rem .6rem;
}

.language-select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bx-sun {
    cursor: pointer;
    font-size: 2em;
}

/*DOTS*/
.margindots {
    position: fixed;
    margin: auto;
    background-color: var(--shade);
    display: flex;
    flex-direction: column;
    right: -15px;
    top: 0;
    bottom: 0;
    height: fit-content;
    z-index: 99;
    transition: 0.5s;
    border-radius: 25px 0 0 25px;
}

.margindots:hover {
    right: 0;
}

.margindots>.dot {
    height: 15px;
    width: 15px;
    margin: 10px;
    background-color: var(--font-color);
    border-radius: 50%;
    display: inline-block;
    transition: 0.8s;
    cursor: pointer;
}

.margindots>.dot:hover,
.margindots>.dot.marked {
    scale: 1.5;
}

/*HOME*/
.home {
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.home>.homeimgdiv>img {
    max-width: 420px;
    width: 80%;
}

.home>.hometxtdiv {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home>.hometxtdiv>.homedata>.mainname {
    font-size: 2.2em;
    text-align: center;
}

/*ABOUT ME*/
.aboutme {
    display: flex;
    justify-content: center;
}

.aboutme>.aboutdata {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: justify;
    width: 60%;

    @media (width <=780px) {
        width: 100%;
    }
}

/*WEB PROJECTS*/
.webprojects>.webprojectsheader {
    font-size: 2em;
}

.webprojects>.articlescontainer {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    margin-left: 5px;
    max-width: 100%;
    overflow: auto;
}

.webprojects>.articlescontainer>article {
    max-width: 480px;
    position: relative;
}

.article1 {
    grid-area: 1 / 2 / 2 / 3;
}

.article2 {
    grid-area: 1 / 1 / 2 / 2;
}

.article3 {
    grid-area: 2 / 1 / 3 / 2;
}

.article4 {
    grid-area: 2 / 2 / 3 / 3;
}

.webprojects>.articlescontainer>article>.invisiblediv {
    background-color: var(--shade);
    color: var(--font-color2);
    display: flex;
    flex-direction: column;
    font-size: 1.2em;
    gap: 10px;
    height: 99%;
    justify-content: center;
    opacity: 0;
    position: absolute;
    text-align: center;
    transition: 1s;
    top: 0;
    width: 100%;
    z-index: 1;
}

.webprojects>.articlescontainer>article>.invisiblediv>a:-webkit-any-link:hover {
    background-color: var(--background-color);
}

.webprojects>.articlescontainer>article:hover .invisiblediv {
    opacity: 1;
}

.webprojects>.articlescontainer>article>.visiblediv>img {
    width: 400px;
    height: 300px;
}

/*OTHER PROJECTS*/

.otherprojects {
    height: 100%;
    overflow: hidden;
}

.otherprojects>.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin: 0 auto 1rem;
    max-width: 70rem;
}

.project-tag,
.project-card-tag {
    border: 1px solid var(--secondary-color);
    border-radius: 999px;
    color: var(--font-color);
    font-family: 'basictext';
}

.project-tag {
    background: var(--primary-color);
    cursor: pointer;
    font-size: 1rem;
    padding: .35rem .75rem;
}

.project-tag:hover,
.project-tag.is-selected {
    background: var(--color-accent);
}

.project-tag:focus-visible {
    outline: 2px solid var(--font-color);
    outline-offset: 2px;
}

.otherprojects>.projectscontainer {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 430px);
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 430px;
    margin: 5px;
    max-width: 100%;
    overflow-y: hidden;
    overflow-x: auto;
}

.otherprojects>.projectscontainer>article {
    height: 221px;
    position: relative;
    width: 430px;
}

.otherprojects>.projectscontainer>article>.visiblediv {
    height: 100%;
    width: 100%;
}

.otherprojects>.projectscontainer>article>.invisiblediv {
    position: absolute;
    z-index: 1;
    opacity: 0;
    transition: 1s;
    background-color: var(--shade);
    width: 100%;
    height: 100%;
    top: 0;
    font-size: 1.2em;
    color: var(--font-color2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 5px;
}

.otherprojects>.projectscontainer>article>.invisiblediv>a:-webkit-any-link:hover {
    background-color: var(--background-color);
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: center;
    margin: .5rem 0;
}

.project-card-tag {
    background: var(--primary-color);
    font-size: .85rem;
    padding: .2rem .55rem;
}

.otherprojects>.projectscontainer>article:hover .invisiblediv {
    opacity: 1;
}

.otherprojects>.projectscontainer>article>.visiblediv>img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.legacy-link {
    display: inline-block;
    margin: 1rem auto 0;
    color: var(--font-color);
    font-family: 'basictext';
    font-size: 1rem;
    opacity: 0.72;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.legacy-link:hover,
.legacy-link:focus-visible {
    color: var(--color-accent);
    opacity: 1;
}

/*SKILLS*/
.skills {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills>.gridskills {
    background-color: var(--primary-color);
    border-radius: 5px;
    display: grid;
    /* Four items per row is the desktop target.  Empty tracks collapse when
       there are fewer skills, and narrower screens create fewer columns. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: clamp(0.75rem, 2vw, 1.25rem);
    padding: clamp(0.75rem, 2vw, 1.25rem);
    width: 80%;
}

.skills>.gridskills>.skillsitem {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    text-align: center;
}

.skills>.gridskills>.skillsitem>img {
    width: clamp(4.5rem, 10vw, 6.25rem);
    aspect-ratio: 1;
    object-fit: contain;
}

.skills>.gridskills>.skillsitem>p {
    overflow-wrap: anywhere;
}

/* Keep the complete skills grid inside the viewport on laptop-sized screens. */
@media (min-width: 769px) and (max-width: 1200px) and (max-height: 950px) {
    .skills {
        padding: 4.25rem 1rem 1.5rem;
    }

    .skills .sectiontitle {
        margin-bottom: 2.5vh;
    }

    .skills>.gridskills {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
        width: 94%;
    }

    .skills>.gridskills>.skillsitem {
        gap: 0.25rem;
    }

    .skills>.gridskills>.skillsitem>img {
        width: clamp(3.5rem, 6vw, 4.5rem);
    }

    .skills>.gridskills>.skillsitem>p {
        font-size: 1.2em;
    }
}


/*CONTACT*/
.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact>.socialmedialinks {
    background-color: var(--primary-color);
    border-radius: 25px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 50px;
    padding: 10px 20px;
}

.contact>.socialmedialinks>a>.socialmediaitem {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5em;
    transition: 0.7s;
}

.contact>.socialmedialinks>a>.socialmediaitem:hover {
    transform: scale(1.1);
}

.contact>.socialmedialinks>a>.socialmediaitem>img {
    width: 45px;
    height: 45px;
}

/*FOOTER*/

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

footer>img {
    width: 60px;
}

@media (max-width: 720px) {

    header>nav {
        height: unset;
        justify-content: space-between;
        padding: 10px;

        .navtoggle {
            position: unset;
        }
    }

    .navM {
        position: fixed;
        top: -150%;
        width: 100vw;
        left: 0;
        padding: 3.5rem 0;
        transition: 0.4s;
        border-radius: 0 0 1.5rem 1.5rem;
        background-color: var(--background-color);

        display: flex;
        flex-direction: column;
        align-items: start;
        height: fit-content !important;
    }

    header>nav>.navM>.navclose {
        top: 0;
    }

    header>nav>.navM>ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: fit-content;
    }

    header>nav>.navM>ul>a {
        height: fit-content;
        width: fit-content;
    }

    header>nav>.navM>ul>a>li {
        height: fit-content;

    }

    header>nav>.navM>ul>a>li>p {
        font-size: 3em;
    }

    .sectiontitle {
        margin: 10px;
    }

    .home {
        flex-direction: column;
    }

    .home>.homeimgdiv {
        display: flex;
        justify-content: center;
    }

    .home>.hometxtdiv>.homedata {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .home>.hometxtdiv>.homedata>div {
        width: fit-content;
    }

    .home>.hometxtdiv>.homedata>div>.sectiontitle {
        text-align: center;
        width: fit-content;
    }

    .aboutme>.aboutdata>p {
        text-align: left;
    }

    .webprojects>.articlescontainer {
        overflow: scroll;
        padding-left: 50px;
        padding-right: 50px;
    }

    .otherprojects>.projectscontainer {
        grid-template-columns: 430px;
    }

    .otherprojects>.project-tags {
        max-height: 9rem;
        overflow-y: auto;
    }
}

/* Show menu */
.show-menu {
    top: 0;
}

@media (width <=480px) {
    .webprojects>.articlescontainer {
        padding-left: 10px;
        padding-right: 10px;
    }

    .aboutme>.aboutdata>p {
        font-size: 1.1em;
    }

    .webprojects>.articlescontainer>article>.visiblediv>img {

        max-width: 320px;
    }

    .contact>.socialmedialinks {
        display: grid;
        grid-template-rows: repeat(2, 1fr);
        grid-template-columns: repeat(2, 1fr);
    }
}
