@font-face {
    font-family: "Poppins";
    src: url("/assets/Poppins/Poppins-Medium.ttf");
}

@font-face {
    font-family: "Poppins Regular";
    src: url("/assets/Poppins/Poppins-Regular.ttf");
}

@font-face {
    font-family: "Poppins SemiBold";
    src: url("/assets/Poppins/Poppins-SemiBold.ttf");
}

:root{
    --body-width: min(calc(95vw), 1100px);

    --body-width: min(calc(95vw), 900px);

    --section-radius: 16px;
    /* --section-radius: 8px; */
}

body{
    font-family: "Poppins";
    /* background-color: rgb(55, 55, 177); */
    background-color: rgb(130, 130, 141);
    background-image: linear-gradient(to bottom, rgb(179, 179, 199), rgb(121, 121, 141));
    background-size: cover;
    background-size: 100dvh;
    
    margin: 0; 
    background-attachment: fixed;

    color: white;
    padding-bottom: 3rem;
}

*{
    line-height: 1.54;
}

.header{
    /* padding: 0px 4rem; */

    /* border-bottom: 4px solid rgba(255, 255, 255, 0.233); */
    /* padding-bottom: 2rem; */

    left: 50%;

    translate: -50%;

    position: relative;

    display: grid;
    grid-template-columns: 1fr 1fr;

    width: var(--body-width);

    box-sizing: border-box;

    margin-top: 4rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    
    align-items: center;

    user-select: none;
}

.header > :first-child {
    justify-self: start;
    width: fit-content;
}

.header > :last-child {
    justify-self: end;
}

section{
    font-family: "Poppins Regular";
    margin-inline: auto;
    width: var(--body-width);
    margin-bottom: 2rem;

    box-sizing: border-box;
}

section:not(:last-of-type){
    margin-bottom: 2rem;
}

h1, h2, h3{
    font-family: "Poppins Regular";
    margin-top: 0;
    margin-bottom: 1rem;
}

#title{
    margin-top: 0px;
    display: contents;

    white-space: nowrap;
    color: white;
    font-weight: 450;

    font-family: "Poppins SemiBold";
    text-shadow: 0px 4px 4px #2b2b2b4b;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;

    max-width: none;

    font-size: 1.9rem;    
    transform: translateY(10px);
}

#title a{
    overflow: hidden;
    text-overflow: ellipsis;

    white-space: nowrap;
    text-decoration: none;
    color: unset;

    display: inline-block;

    align-items: center;
    white-space: nowrap;
    width: fit-content;
}

#title a span{
    display: inline-block;
    translate: 0 1px;
}


.pfp{
    flex-shrink: 0;
    flex: 0 0 auto;

    height: 2.9rem;
    aspect-ratio: 1 / 1;
    border-radius: 25%;
    
    vertical-align: middle;
    margin-right: 15px;
    background-image: #337237;
    background-color: #337237;
    color: transparent;
}

.icons{
    color: white;
    display: flex;
    align-items: center;
}

.icons img{
    height: 18px;
}

.icons a{    
    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    user-select: none;
    /* font-size: 0.9rem; */
    
    text-decoration: none;
    color: white;
    height: 30px !important;
    width: 30px !important;
    border-radius: 0.45rem;
    background-color: rgba(0, 0, 0, 0.295);
}

.icons .x-icon {
    height: 14px;
}

.icons a:not(:last-of-type){
    margin-right: 0.5rem;
}

.icons a:hover{
    background-color: rgba(0, 0, 0, 0.432);
}


/* Featured showcase */

section.projects {
    backdrop-filter: blur(20px);
    
    position: relative;

    text-align: center;


    border-radius: var(--section-radius);


    box-sizing: border-box;

    height: calc(100dvh - 225px - var(--side-margin));

    box-shadow: inset 0 0 50px -10px rgba(0, 0, 0, 0.11);
    background-color: rgba(0, 0, 0, 0.055);

    display: grid;

    --min: 300px;
    --gap: 22px;

    /* grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); */
    grid-template-columns: repeat(
        auto-fit,
        minmax(
        min(100%, max(var(--min), calc((100% - var(--gap)) / 2))),
        1fr
        )
    );

    gap: var(--gap);

    overflow-x: hidden;

    row-gap: 49px;

    padding: 40px 26px;

    /* --vertical-padding: 24px;
    padding-top: var(--vertical-padding);
    padding-bottom: var(--vertical-padding); */

    justify-content: center;
    place-items: center;    
}

section.projects > *{
    min-width: 0;
    overflow-wrap: break-word;
}


/* Add a placeholder if there's only one project visible */
section.projects:has(> .project:only-child)::after {
    content: "More projects to come";

    box-sizing: border-box;
    width: min(500px, calc(100vw - 42px));
    max-width: 100%;
    aspect-ratio: 1920 / 947;
    border-radius: 10px;
    
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
    border: 2px dashed rgba(255, 255, 255, 0.247);
    color: rgba(255, 255, 255, 0.712);
    font-weight: 400;
    font-size: 0.95rem;
    
    display: flex;
    align-items: center;
    justify-content: center;
}


.project{
    display: inline-block;
    text-decoration: none;
    
    color: white;

    box-sizing: border-box;

    width: min(500px, calc(100vw - 42px));
    max-width: 100%;
    
    aspect-ratio: 1920 / 947;

    position: relative;

    text-align: center;
}


.project > span{
    background-color: rgba(0, 0, 0, 0.363);
    

    display: block;

    

    padding: 2px;
    padding-top: 3px;
    padding-left: 8px;
    padding-right: 8px;

    font-weight: 400;

    font-size: 0.9rem;
    


    border-radius: 8px;

    position: absolute;

    bottom: 0.5rem;
    left: 0.5rem;

    box-sizing: border-box;

    backdrop-filter: blur(22px);

    text-overflow: ellipsis;
    white-space: nowrap;

    max-width: calc(100% - 0.5rem * 2);
    max-height: calc(100% - 0.5rem * 2);

    min-height: none;
    min-width: none;

    overflow: hidden;

    user-select: none;
}

.project .preview{
    display: block;
    
    border-radius: 16px;  

    border-radius: 10px;
    
    width: 100%;
    
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.384), rgba(255, 255, 255, 0.144));
    height: auto;

    align-self: center;
    transition: all 100ms;

    object-fit: cover;
    object-position: top;

    inset: 0;

    aspect-ratio: 960 / 473;
}



/*  */

.section-label{
    margin: 0 auto;
    width: calc(var(--body-width));
    font-size: 11px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: white;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.692);
    user-select: none;
}

/*              */
/* Hero Section */
/*              */

.hero{
    background-color: rgb(84, 170, 84);
    height: 350px;
    border-radius: 16px;
    position: relative;
    text-align: center;

    left: 50%;
    translate: -50%;

    width: var(--body-width);
    color: white;

    margin-bottom: 2.5rem;

    text-shadow: 0px 4px 4px #2b2b2b4b;

    padding-top: 2rem;
    padding-bottom: 2rem;

    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    place-items: center;  
}

.hero h1{
    font-family: "Poppins SemiBold";
    font-size: 2.5rem;
    font-weight: 400;
    left: 50%;
    max-width: 90vw;
    margin-bottom: 1.5rem;
}

.hero p{
    margin-top: 0px;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.822);
    text-shadow: 0px 4px 4px #2b2b2b4b;
    max-width: min(90vw, min(900px));
}

/*              */
/* Availability */
/*              */

section.availability{
    
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.055), rgba(0, 0, 0, 0.116));
    
    padding: 40px 2rem;
    border-radius: var(--section-radius);
    /* margin-bottom: 2.5rem; */
}

section.availability h1{
    margin-top: -14px;
    
}

section.availability p{
    /* color: rgba(255, 255, 255, 0.822); */
    margin: 0;
}
/*         */
/* Contact */
/*         */

a.mailto{
    user-select: none;
    color: white;
    color: #c6f5cc;
    /* background: #777786cc; */
    background-color: #399e4d;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 1rem;
    display: inline-block;
    position: relative;
    width: auto;
    text-align: center;
    margin-inline: auto;
}

a.mailto:hover{
    /* background: #6a6a79d5; */
    background-color: #319444;
    
}


@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form button {
    width: 100%;
  }
}

/*        */
/* Footer */
/*        */

footer{
    border-top: 2px solid rgba(255, 255, 255, 0.233);

    margin-inline: auto;
    width: var(--body-width);

    padding-top: 1rem;
    padding-bottom: 1rem;
}

footer{
    bottom: 1rem;
    color: white;
    font-size: 0.9rem;
    text-align: center;
    left: 50%;
}

/* Mobile */
@media (width < 750px) {
    :root{
        /* --body-width: 95vw */
    }

    #center{
        top: 50px;
    }

    .desktop-only{
        display: none !important;
    }

    .header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0px;
        border-bottom: none;
    }

    .header > :first-child > * {
        text-align: center;
        justify-self: center;
        translate: -0.8rem;
    }

    
    .header > :last-child {
        margin-top: 1rem;
        justify-self: center;
        margin-bottom: -1rem;
    }

}