@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap');
@font-face {font-family: "IBM Plex Sans Roman"; src: url("fonts/IBMPlexSansVar-Roman.ttf");}

:root {
    font-size: 18px;
    --gap: 1.5rem;
    --dark: 135, 12%, 4%; /*090b0a*/
    --light: 140, 100%, 99%; /*fafffc*/
    --accent: 135, 60%, 58%; /*54d474*/
    --accent-2: 152, 63%, 55%; /*44d591*/
}


*, *::before, *::after {border: none; outline: none; font-size: inherit; font-family: inherit; color: inherit; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 0px; margin: 0px; scroll-behavior: smooth;}
table {border-collapse: collapse;}
button {width: max-content;}

h1::selection, h3::selection, h4::selection {
    color: hsl(var(--light));
    background-color: transparent;
    text-shadow: 
    0px 0px 5px hsla(0, 0, 0, 0.5), 
    -1px -1px 1px hsl(var(--light)), 
    1px 1px 1px hsl(var(--light)), 
    1px -1px 1px hsl(var(--light)), 
    -1px 1px 1px hsl(var(--light)), 
    0px 0px 1px hsl(var(--light)), 
    0px 0px 5px black;
}
p::selection {
    color: hsl(var(--accent));
    background-color: transparent;
}
a::selection {
    color: hsl(var(--light));
    background-color: transparent;
}

html, body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: hsl(var(--dark));
    background-image: url("images/tile.png");
    background-attachment: fixed;
    font-family: 'Open Sans', sans-serif;
    z-index: 0;
}

a {
    color: hsl(var(--accent-2));
    text-decoration: none;
    cursor: pointer;
}
a:hover {
    color: hsl(var(--accent));
}

nav {
    position: fixed;
    width: 100%;
    padding: var(--gap);
    background-color: hsla(var(--dark),0.9);
    z-index: 2;
}
nav ul {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: var(--gap);
    list-style-type: none;
    padding: 0px;
    margin: 0px;
    letter-spacing: 0em;
}
nav ul li {
    display: block;
    transition-property: color, letter-spacing;
    transition: 200ms ease;
}
nav ul li:hover {
    letter-spacing: 0.05em;
}


h1 {
    font-family: "IBM Plex Sans Roman", Arial;
    color: hsl(var(--accent));
    font-size: 4rem;
    /* display: grid;
    place-items: center; */
	user-select: none;
    background: linear-gradient(50deg, hsla(var(--accent),0.9) 0%,hsla(var(--accent-2),0.9) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}
h2 {
    font-family: "IBM Plex Sans Roman", Arial;
    color: hsl(var(--light));
    font-size: 2.5rem;
    user-select: none;
    text-transform: uppercase;
    margin-bottom: 0.5em;
}
section h2 {
    --decoration-padding: 1rem;
}
section h2::before {
    margin-right: var(--decoration-padding);
    font-weight: 400;
    content: "--==";
}
section h2::after {
    margin-left: var(--decoration-padding);
    font-weight: 400;
    content: "==--";
}
h3 {
    font-size: 1.5rem;
    text-align: center;
    color: hsl(var(--accent-2));
    /* text-decoration: underline hsl(var(--accent)); */
    font-weight: 700;
    margin-bottom: 1em;
    text-transform: uppercase;
}
h4 {
    font-size: 1.25rem;
    text-align: center;
    color: hsl(var(--accent-2));
    font-weight: 500;
    margin-bottom: 0.25em;
    /* text-transform: uppercase; */
}
.education {
    margin-bottom: var(--gap);
}
.education:last-of-type {
    margin-bottom: 0;
}
.duration {
    font-size: 1.125rem;
    color: hsl(var(--light));
    font-weight: 500;
    text-align: center;
    margin-bottom: 0.5em;
}
figure {
    margin-top: 1rem;
    /* padding: var(--gap); */
}
p, figcaption {
    color: hsl(var(--light));
    font-weight: 300;
}
p:last-child {
    margin-bottom: 0px;
}
figcaption {
    margin-top: 0.5rem;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: var(--gap);
    flex-wrap: wrap;
    padding: 27svh calc(4 * var(--gap));
    /* -webkit-box-shadow: inset 0px -160px 80px -100px hsla(var(--dark, 0.65)); */
    /* -moz-box-shadow: inset 0px -160px 80px -100px hsla(var(--dark, 0.65)); */
    /* box-shadow: inset 0px -160px 80px -100px hsla(var(--dark, 0.65)); */
}
header h2 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
	/* font-variation-settings: 'wght' 200, 'wdth' 100; */
}
#links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap);
    /* width: 15rem; */
}
#links a {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: calc(var(--gap) / 2);
    width: 100%;
    padding: calc(var(--gap) / 2);
    font-size: 1.125rem;
    text-decoration: none;
    cursor: pointer;
    transition-property: color, transform;
    transition-duration: 150ms;
    background-color: hsla(var(--accent),0.9);
}
#links a:hover {
    background-color: hsla(var(--accent),1);
    transform: scale(1.05);
}
#links a img {
    height: 1.75rem;
    aspect-ratio: 1/1;
    object-fit: contain;
}
#links a p {
    color: hsl(var(--dark));
    font-variation-settings: 'wght' 400, 'wdth' 100;
}

#fade {
    width: 100%;
    height: 5rem;
    background-color: hsla(var(--dark),0.65);
    -webkit-mask-image: linear-gradient(transparent, rgba(0, 0, 0, 100%));
    mask-image: linear-gradient(transparent, rgba(0, 0, 0, 100%));
}
section {
    scroll-margin-top: 5rem;
    align-self: flex-end;
    display: grid;
    place-items: center;
    width: 100%;
    padding: var(--gap);
    padding-top: 0;
    margin-top: calc(4 * var(--gap));
    background-color: hsla(var(--dark),0.65);
}
section:first-of-type {
    margin-top: 0;
    padding-top: var(--gap);
}
section:nth-of-type(2n+1) {
    align-self: flex-start;
}
.content {
    width: 65%;
    text-align: center;
    margin-top: var(--gap);
}
.content:first-of-type {
    margin-top: 0px;
}
.side-to-side {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--gap);
    gap: calc(2 * var(--gap));
    margin-top: var(--gap);
}
#about-text {
    text-align: left;
    max-width: 30rem;
    font-size: 1.5rem;
}
#about-text p {
    margin-bottom: 1em;
}
#photo {
    width: clamp(15rem, 20svw, 25rem);
    object-fit: contain;
}
#technologies p {
    text-align: center;
}
#technology-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* width: 100%; */
    padding: var(--gap);
    gap: calc(var(--gap) / 2);
    /* background-color: hsla(var(--dark),0.65); */
}
.technology {
    background-color: hsl(var(--accent));
    /* width: min-content; */
    display: grid;
    place-items: center;
    padding: 1rem;
}
.technology img {
    width: 4rem;
    aspect-ratio: 1/1;
    object-fit: contain;
}

#project-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(32rem, 100%), 1fr));
    width: 100%;
    padding: var(--gap) calc(4 * var(--gap));
    gap: calc(2 * var(--gap));
    /* background-color: hsla(var(--dark),0.65); */
}
.project {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* margin-top: calc(2 * var(--gap)); */
    text-align: center;
    width: 100%;
    padding: var(--gap);
    box-shadow: 0px 0px 0rem hsla(var(--accent), 0);
    outline: solid 2px hsl(var(--accent));
    /* 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: var(--gap); 
    */
    transition-property: box-shadow, outline;
    transition-duration: 150ms;
}
iframe, .project .project-image {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: hsla(255, 255, 255, 0.05);
    object-fit: contain;
}
iframe + .project-image {
    display: none;
}
.project p {
    text-wrap: balance;
}
.project .project-image.before {
    display: unset;
}
.project .project-image.after {
    display: none;
}
footer {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: var(--gap);
    background-color: hsla(var(--dark),0.65);
}


@media (max-width: 1150px) {
    h4 {
        font-size: 1.15rem;
    }
}
@media (max-width: 930px) {
    .content {
        width: 80%;
    }
}
@media (max-width: 768px) { 
    :root {
        font-size: clamp(14px, 1vw + 10px, 18px);
    }
    header {
        padding: 24svh calc(2 * var(--gap));
    }
    header h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    .content {
        width: 90%;
    }
    #project-wrapper {
        padding: var(--gap);
    }
    iframe {
        display: none;
    }
    iframe + .project-image {
        display: unset;
    }
}

@media (max-width: 500px) { 
    :root {
        --gap: 1rem;
    }
    h1 {
        font-size: 3rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.25rem;
    }
    #links a {
        padding: var(--gap);
        font-variation-settings: 'wght' 400, 'wdth' 90;
    }
    #links a img {
        height: 1.75rem;
    }
    header {
        padding: 10svh calc(2 * var(--gap));
    }
    section h2 {
        --decoration-padding: 0.25rem;
    }
    #technology-wrapper {
        grid-template-columns: repeat(6, 1fr);
    }
    .technology {
        grid-column: span 2;
    }
    .technology:nth-of-type(7) {
        grid-column: 2 / span 2;
    }
    #project-wrapper {
        padding: 0;
    }    
    #about-text {
        font-size: 1.25rem;
    }
}
@media (max-width: 375px) { 
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    h3 {
        font-size: 1.125rem;
    }
    #links a {
        padding: calc(var(--gap) / 2);
        font-variation-settings: 'wght' 400, 'wdth' 90;
    }
    #links a img {
        height: 1.5rem;
    }
    section h2::before {
        display: none;
    }
    section h2::after {
        display: none;
    }
}
@media (hover: hover) and (pointer: fine) {
    body:hover #background {
        --shine-size: 15rem;
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0px;
        left: 0px;
        background-position: 0px 0px;
        background-attachment: fixed;
        background-image: url("images/tile-glow.png");
        background-repeat: repeat;
        z-index: -1;
        mask-image: radial-gradient(rgba(0, 0, 0, 100%) 0%, rgba(0, 0, 0, 20%) 30%, rgba(0, 0, 0, 0%) 50%);
        mask-size: var(--shine-size) var(--shine-size);
        mask-repeat: no-repeat;
    }
    .project:hover {
        box-shadow: 0px 0px 2rem hsla(var(--accent), 0.25);
        outline: solid 2px hsla(var(--accent-2), 0.65);
    }
    .project:hover .project-image.before {
        display: none;
    }
    .project:hover .project-image.after {
        display: unset;
    }
}
@media (hover: none) and (pointer: coarse) {
    #background {
        display: none;
    }
}