/* 
========
General
======== 
*/

*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-weight: normal;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-family-base);
}

body {
    background-color: var(--hellgrey);
}

#wrapper{
    min-width: 320px;
    margin: auto;

    display: grid;
    grid-template-rows: 48px clamp(300px, 100vh, 600px) repeat(3, auto) minmax(200px, auto);
}

nav.subpage {
    display: flex;
}

/* 
========
Mobile First
======== 
*/


main,
.about-me,
.projects,
aside,
footer {
    padding-left: clamp(1.5rem, 2vw, 2vw);
    padding-right: 1rem;
    display: flex;
    justify-content: center;
    overflow: auto;
}

p,h1,h2,h3 {
    text-align: left;
    max-width: clamp(300px, 100%, 800px); 
}

header,
footer {
    background-color: var(--blue);
}

header {
    display: flex;
    flex-direction: row-reverse;
}


nav {
    width: 48px;
    aspect-ratio: 1;
    background-color: var(--darkgrey);
}

.nav2 {
    display: none;
}

.mode,
.mode-inactive {
    width: 48px;
    aspect-ratio: 1;

    font-size: var(--font-24px); 
    line-height: var(--font-32px);

    display: flex;
    justify-content: center;
    align-items: center;
}

.mode,
.back {
    color: var(--white);
    background-color: var(--grey);
}

.mode-inactive {
    color: var(--hellgrey);
    background-color: var(--darkgrey);
}


/* 
========
Landing page
======== 
*/


main,
aside {
    background-color: var(--blue);
    color: var(--white)
}

main {    
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(1rem, 6rem, 12rem);

}



h1 {
    font-size: var(--font-32px);
    line-height: var(--font-40px);
    hyphens: manual;
    
    margin-top: clamp(5rem, 20%, 20rem);
}


.scroll-bottom,
.scroll-top,
.next-page {
    font-size: var(--font-16px);
    line-height: var(--font-24px);

    display: flex;
    width: fit-content;
    flex-direction:row;
    align-items: center;

    gap: 0.5rem;
}



.scroll-top,
.next-page {
    margin-bottom: clamp(1rem, 2%, 2rem);
}

.next-icon {
    height: 24px;
}






/* 
========
About me
======== 
*/

.about-me,
.projects {
    background-color: var(--white);
    padding-top: clamp(2rem, 6rem, 24rem);
    padding-bottom: clamp(2rem, 6rem, 24rem);
}

.about-me {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    padding-bottom: 2rem;
    gap: 2rem;
}

h2 {
    color: var(--blue);
    font-size: var(--font-32px);
    line-height: var(--font-40px);
}

p {
    color: var(--black-10);
    font-size: var(--font-24px);
    line-height: var(--font-32px);
    hyphens: auto;
    overflow-wrap: break-word;
}

/* 
========
Projects
======== 
*/

.projects {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3rem;
}

.project-link {
    display: block;
}

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

    gap: 3rem;
}

.project-card {
    max-width: clamp(8rem, 100%, 26rem);
}

.thumbnail {
    background-color: var(--black);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    aspect-ratio: 4/3;

    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.t1-g {
    width: 80%;
}
.t2-g,
.t3-g {
    width: 100%;
}

/* .t1 {
    background-image: url(../pic/project1/1280x720-thumbnail1.gif);
    background-size: 80%;
}
.t2 {
    background-image: url(../pic/project2/1280x720-thumbnail2.gif);
    background-size: 110%;
}
.t3 {
    background-image: url(../pic/project3/1280x720-thumbnail3.gif);
    background-size: 110%;
} */



.thumb-back,
.thumb-back-negative {
    width: 32px;
    position: absolute;
    display: flex;
    top: 0;
    right: 0;
}

.thumb-back {
    background-color: var(--hellgrey);
    z-index: 2;  
}

h4 {
    font-size: var(--font-24px);
    line-height: var(--font-32px);
    margin-bottom: clamp(1rem, 2%, 2rem);
}

.meta {
    background-color: var(--hellgrey);
    color: var(--black);
    font-size: var(--font-16px);
    line-height: var(--font-24px);

    padding: clamp(0.25rem, 1rem, 1rem);
    height: auto;
    padding-bottom: 2rem;
}


/* 
========
Contact
======== 
*/

aside {
    font-size: var(--font-24px);
    line-height: var(--font-32px);

    padding-top: clamp(1rem, 4rem, 8rem);
    padding-bottom: clamp(1rem, 2rem, 4rem);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    gap: 3rem;
}

/* 
========
Footer
======== 
*/


footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap:  2rem;
    
    padding-top: clamp(1rem, 2rem, 4rem);
    padding-bottom: 2rem;

    hyphens: manual;
}

h3 {
    color: var(--white);

    font-size: var(--font-32px);
    line-height: var(--font-40px);
    hyphens: manual;
}

.contact {
    color: var(--white);
    font-size: var(--font-24px);
    line-height: var(--font-32px);

    display: flex;
    flex-direction: column;
}

.legal {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.legal-subpages,
.credits {
    font-size: var(--font-16px);
    line-height: var(--font-24px);
    color: var(--white);

    display: flex;

}

.legal-subpages {
    gap: 0.4rem;
}

.credits {
    gap: 0.4rem;
}

/* 
========
Interaction
======== 
*/

a {
    color: var(--white);
    text-decoration: none;
}

nav:is(:hover, :active) {
    background-color: var(--black);
}

.project-link:is(:hover, :active) {
    text-decoration: none;
    .meta {
        color: var(--white);
        background-color: var(--black-10);
        border: var(--white);
        border-width: 0.5px 0px 0px 0px;
        border-style: solid;
    }
    .thumb-back {
        display: none;
    }
}

a:is(:hover, :active) {
    text-decoration: underline;
    color: var(--white);
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

.mode:is(:hover, :active),
.back:is(:hover, :active){
    text-decoration: none;
    background-color: var(--black);
}


.legal-link {
    display: flex;
    flex-direction: row;
    gap: 0.4rem;
}

#email {
    user-select:all;
}
