:root {
    --dark: #303030;
    --dark-shadow: #30303080;

    --middle-text: #595959;

    --light-text: #999999;
    --light-background: #F7F7F7;

    --middle-blue: #10a4a7;
    --green: #1EB774;
    --dark-blue: #0B5394;

    --magenta: #e1488a;
    --orange: #f4ab6b;

    --ts: 7vw;

    --small-margin: 25px;
    --large-margin: 50px;
}
@media (width < 600px) {
    :root {
        --small-margin: 12px;
        --large-margin: 25px;
    }
} 

body {
    margin: 0;
    overflow-x: clip;
    overflow-y: hidden;

    font-family: 'Poppins', sans-serif;
}
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#viewport {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: clip;
    -webkit-overflow-scrolling: touch;
    
    /* scrollbar-gutter: stable; */
}

.no-scroll {
    overflow: hidden !important;
}
.shadow {
    box-shadow: 0px 2px 4px var(--dark-shadow);
}


#loading {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background-color: var(--light-background);

    z-index: 3;
}
#l-text {
    font-size: 60px;
    font-weight: 200;
    font-family: 'Poppins', sans-serif;
    color: var(--light-text);

    margin-bottom: 50px;

    display: none;
}
#l-boxes {
    height: clamp(0px, 11vw, 80px);
    width: 100%;

    display: none;
    justify-content: center;

    overflow: hidden;
}
.l-box {
    height: 100%;
    aspect-ratio: 1;
    margin: 0 15px;

    background-color: var(--dark);
}


.scroll-container::-webkit-scrollbar-track {
  background: transparent; /* Makes the background track transparent */
}

.container {
    position: relative;
}

/* Allows penrose and right side to be positioned as such */
#hero {
    display: flex;
    flex-direction: row;
}

/* Allows vertical stacking */
#right {
    display: flex;
    flex-direction: column;
}
/* Centers description and button vertically */
#info-container {
    display: flex;
    flex-direction: column;
    justify-content: center;

    font-size: calc(var(--ts) * 0.28);

    flex-grow: 1;
}

p {
    font-weight: 300;
    color: var(--dark);
}
p strong {
    font-weight: 500;
}

.resume-button {
    border-style: none;
    border-radius: 12px;
    background-color: white;

    font-weight: 500;
    font-size: calc(var(--ts) * 0.37);
    font-family: 'Poppins', sans-serif;

    cursor: pointer;

    transition-property: background-image;
    transition-duration: 0.2s;
}
#hero .resume-button {
    width: 39%;
    height: 12%;
}

.gradient-text {
    width: fit-content;

    /* Creates a linear gradient and only shows it where the (transparent) text is */
    background-image: linear-gradient(134deg, #1fbd78, #0b5394);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;

    background-color: white;
}

#penrose-hero {
    margin: 30px var(--large-margin) 0 30px;

    background-position: center;
    background-size: cover;

    aspect-ratio: 0.785;

    /* Used for positioning the accent */
    anchor-name: --penrose;

    /* Shadows should go over the accent */
    z-index: 1;
}
#penrose-accent {
    position: absolute;
    position-anchor: --penrose;

    top: calc(anchor(top));
    right: anchor(left);

    width: 8px;
    height: 50px;

    background-image: linear-gradient(to bottom, var(--middle-blue), var(--dark-blue));

    z-index: 0;
}

#title {
    margin-top: auto;
    margin-bottom: 0; 

    transform: translateX(-0.1em);

    color: var(--dark);
    font-family: 'Montserrat';
    font-weight: 500;
    font-size: var(--ts);
    alignment-baseline: hanging;

    opacity: 0;

    /* Goes above loading screen */
    z-index: 4;
}

@media (width < 1000px) {
    #right {
        height: calc(var(--ts) * 7);
        margin-right: 30px;
        margin-left: 35px;
        margin-bottom: calc((100px - var(--ts)) * 3);
        margin-top: calc((100px - var(--ts)) * 3);
    }
    #hero .resume-button {
        width: 39%;
        height: 16%;
    }

    #description {
       anchor-name: --description; 
    }
    #penrose-accent {
        position-anchor: --description;
        top: anchor(top);
        left: calc(anchor(right));
        width: 6px;
        transform: translateY(0%) !important;
    }
    #info-container {
        font-size: calc(var(--ts) * 0.35);
    }
}


nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;

    background-color: rgb(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);

    transform: translateY(-48px);

    border-bottom: 1px rgb(200, 200, 200) solid;
    z-index: 4;
}
nav, #hero-nav {
    display: flex;
    align-items: center;

    color: var(--dark) !important;

    font-size: 17px;
    height: 45px;
}
nav img {
    margin-left: 5px;
    height: 30px;
}
#nav-links, #hero-nav {
    position: absolute;
    right: 10px;
}
.nav-link {
    color: var(--dark);
    margin: 0 10px;
}
.hamburger-menu, .x {
    cursor: pointer;
}
.hamburger-menu {
    display: none !important;
}
#hero .hamburger-menu {
    filter: brightness(9%);
    height: 30px;
    margin: 15px;
}
#full-nav {
    position: fixed;
    top: 45px;
    left: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 100vw;
    height: calc(100vh - 45px);

    background-color: rgb(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);

    transform: translateX(101vw);
    scrollbar-gutter: stable;

    z-index: 5;
}
#full-nav .nav-link {
    margin-left: var(--large-margin);
    font-size: clamp(0px, 11vw, 50px);
    font-weight: 200;
    text-decoration: none;
    text-decoration-thickness: 2px;

    width: max-content;

    transition-property: transform;
    transition-duration: 0.3s;
}
#full-nav .nav-link:hover {
    transform: translateX(15px);
}
.x {
    position: absolute;
    top: 0;
    right: 5px;

    transform: translateX(50px);
}
@media (width < 820px) {
    .hamburger-menu {
        display: block !important;
    }
    .nav-link:not(#full-nav .nav-link) {
        display: none;
    }
}








#about {
    display: flex;
    flex-direction: column;

    margin: calc(var(--ts) * 1) calc(var(--small-margin) + 5px) 0 calc(var(--small-margin) + 5px);
    padding: 0 calc(var(--ts) * 0.4);

    background-color: var(--light-background);

    z-index: 0;
}
#about-horizontal-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10%;
}
.header {
    font-size: 60px;
}
#about-separate {
    margin-top: -30px;
}
#about-with {
    margin: 0;
}

h2 {
    margin: 0;
    font-weight: 500;
    color: var(--dark);
}

#about-left {
    width: 500px;
    color: var(--dark);

    margin: 50px 0;

    z-index: 2;
}

#about-text {
    font-size: 20px;
    font-weight: 300;

    /* text-align: justify; */
}
#about p {
    font-size: 20px;
    text-indent: 2em;
    margin: 0;
}
#about-text strong {
    font-weight: 500;
}
.indent {
    display: inline-block;
    width: 50px;
}
#about-gradient {
    position: relative;
    width: 50%;
    height: 5px;
    margin-top: 25px;

    background-image: linear-gradient(to right, var(--dark-blue), var(--middle-blue));

    /* z-index: 2; */
}

#lorenz-anchor {
    width: 25%;
    anchor-name: --lorenz;
}
iframe {
    border-style: none;
    display: none;
}
#lorenz-attractor {
    /* Iframes are weird with resizing, especially with flexbox,
       so this basically just uses a normal div with predictable behavior
       and then anchors the iframe to the center of that */
    position: absolute;
    position-anchor: --lorenz;
    left: anchor(50%);
    top: anchor(50%);
    max-width: calc(100% - (var(--small-margin) + 5px) * 2);
    
    aspect-ratio: 0.8;
    transform: translateX(-50%) translateY(-50%);

    z-index: 1;
}

@media (width <= 1000px) {
    /* If screen too small, center and make lorenz attractor go to bottom */
    #about-horizontal-wrapper {
        justify-content: center;
        flex-wrap: wrap;
        overflow: hidden;
    }
    #lorenz-attractor {
        top: anchor(45%);
    }
}
@media (width <= 1000px) and (width > 900px) {
    #lorenz-attractor {
        width: calc(anchor-size(width) * 1.3) !important;
    }
    #about {
        box-sizing: border-box;
        width: calc(100% - (var(--small-margin) + 5px) * 2.1);
    }
}
@media (width >= 1400px) {
    #about-separate {
        display: block;
    }
    #about-with {
        display: none;
    }
}
@media (width < 1400px) {
    #about-separate {
        display: none;
    }
    #about-with {
        display: block;
    }
}








#selected-works {
    position: relative;

    z-index: 2;

    /* padding-bottom: 100px; */

    /* Gives the bottom corners a curve */
    clip-path: rect(-60vh 100% 100% 0 round 0 0 clamp(50px, 30vw, 200px) clamp(50px, 30vw, 200px));
}
#sw-padding-wrapper {
    position: relative;
    left: 0;
    top: 0;

    z-index: 3;
}
#sw-header-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    
    width: 100%;

    background-color: white;
}
#sw-color-padding-before {
    position: absolute;
    width: 100%;
    height: 60vh;
    top: -60vh;
    left: 0;
    background-image: none;

    

    pointer-events: none;

    z-index: 3;
}
#sw-color-padding {
    position: absolute;
    width: 100%;
    height: 130vh;
    background-image: linear-gradient(#FFFFFF 50%, #FFFFFF00 100%);

    pointer-events: none;

    z-index: 3;
}

#sw-header {
    font-size: calc(var(--ts) * 0.9);

    margin-top: 30vh;
    margin-bottom: -7px;

    color: black;

    anchor-name: --sw-header;
}
#sw-header-underline {
    width: 100%;
    height: 5px;
    background-image: linear-gradient(to right, var(--dark-blue), var(--middle-blue));
}

#barnes-hut, #schrodinger {
    position: relative;

    background-color: black;
    left: 0;
    margin: 0;
    width: 100%;
    
    touch-action: pan-y;

    color: white !important;
}
.pin-spacer {
    pointer-events: none;
}
#schrodinger {
    margin-bottom: 100px;
}
.sw-info-card {
    position: absolute;
    top: calc(100vh);

    margin: 25px var(--small-margin);
    width: clamp(200px, 530px, calc(100% - 2 * var(--small-margin)));
}
#s-info-card {
    right: 0;
    text-align: right;
}
#s-info-card div {
    margin-left: auto;
}
.sw-info-card > div {
    width: min-content;
}
.sw-info-card h3 {
    font-weight: 600;
    font-size: 25px;
    margin: 0;

    width: max-content;
    anchor-name: --sw-title;
}
.sw-underline {
    height: 3px;
    background-image: linear-gradient(to right, var(--magenta), var(--orange));
}
.sw-info-card p {
    margin-top: 7px;
    color: white;

    font-size: 20px;
}
.sw-info-card .external-link, .sw-info-card .github-link {
    position: relative;
    top: 4px;
}

.sw-info-card .external-link {
    color: white;
}
.sw-info-card .external-link img {
    position: absolute;
    height: 30px;
    display: inline-block;
    position-anchor: --sw-title;
    top: 1px;
}
#bh-link-img {
    left: calc(anchor(right) + 10px);
}
#s-link-img {
    right: calc(anchor(left) + 10px);
}
@media (height < 500px) {
    #schrodinger {
        padding-bottom: 100px;
    }
}



.github-link {
    height: 20px;
    margin-left: 3px;
}
.external-link, .github-link {
    text-decoration: none;
}
.sw-info-card .external-link img, .sw-info-card .github-link img {
    filter: invert(100%);
}
.external-link img, .github-link img {
    height: inherit;
}
#portfolio .github-link {
    position: absolute;
    right: 12px;
    top: 12px;

    opacity: 81%;
}

#portfolio .header {
    margin: 50px var(--large-margin);
    margin-top: 70px;
}
#p-wrapper {
    display: flex;
    flex-direction: row;
    
    margin: 50px var(--large-margin);
}
.p-info-card {
    position: relative;
    width: 400px;

    margin-bottom: 25px;
    padding: 15px 15px 15px 35px;

    border-radius: 25px;

    transition-property: transform;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);

    cursor: pointer;
}
.p-info-card:hover {
    transform: translateX(15px);
}

.p-title {
    font-weight: 500;
    margin-bottom: 5px;
}
.p-description {
    font-weight: 200;
}
.p-accent {
    position: absolute;
    left: 17px;
    top: 18px;

    width: 3px;
    height: calc(100% - 18px * 2);

    background-image: linear-gradient(to bottom, var(--middle-blue), var(--dark-blue));
}

#p-display-wrapper {
    position: sticky;
    top: 50px;

    display: flex;
    flex-direction: column;
    flex-grow: 1;

    margin-left: var(--large-margin);

    height: calc(100vh - 50px * 2);

    align-items: center;
    justify-content: center;
}
.p-display {
    position: absolute;
    max-width: calc(100%);
    max-height: calc(100vh - 50px * 2);

    border-radius: 20px;

    display: none;

    transform: translateY(5px);
}

@media (width < 850px) {
    #p-display-wrapper {
        display: none;
    }
    #p-info-card-wrapper {
        width: 100%;
    }
    .p-info-card {
        width: 100%;
        box-sizing: border-box;
    }
}





#experience .header {
    margin: 50px var(--large-margin);
}
#carousel-wrapper {
    position: relative;
}
#carousel {
    display: flex;
    flex-direction: row;

    width: 100%;
    height: min-content;

    scrollbar-color: transparent transparent;
    overflow-x: scroll;
    overflow-y: visible;

    padding: 5px 0;
}
.slide {
    width: clamp(0px, calc(100vw - var(--large-margin) * 2), 350px);
    height: max-content;

    padding: 10px;
    border-radius: 25px 25px 10px 10px;

    transition-property: box-shadow;
    transition-duration: 0.1s;

    margin: 0 var(--large-margin);
    margin-bottom: 50px;
}
.slide:hover {
    box-shadow: 0px 2px 4px var(--dark-shadow);
    cursor: pointer;
}
.slide-image {
    width: clamp(0px, calc(100vw - (var(--large-margin) + 10px) * 2), 350px);
    height: 200px;

    background-size: cover;
    
    border-radius: 15px;
}
.slide-text {
    position: relative;
}
.slide-title {
    margin-top: 10px;
    font-weight: 500;
}
.slide-time {
    position: relative;
    top: -2px;

    font-size: 10px;
}
.slide-description {
    margin-top: 5px;
    width: calc(100% - 30px);

    font-size: 14px;
    font-weight: 200;
}
.slide-accent {
    position: absolute;
    top: 4px;
    right: 0;

    width: 3px;
    height: calc(100% - 4px * 2);

    background-image: linear-gradient(to bottom, var(--middle-blue), var(--dark-blue));
}
#e-button-wrapper {
    position: absolute;
    /* top: 0; */
    right: 50px;
    bottom: 0;

    display: flex;
}
#e-button-wrapper button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;

    margin: 5px;
    
    border-radius: 50px;
    border-style: none;

    font-size: 30px;
    font-family: monospace;

    cursor: pointer;

    background-color: transparent;
}
#e-button-wrapper button img {
    width: 80%;
    opacity: 81%;
}


#contact {
    display: flex;
    flex-direction: row;
    
    margin: 150px 50px 150px 0;
}
#contact .header {
    margin-top: 0;
    margin-bottom: 25px;
}
#c-wrapper {
    margin: 0 var(--large-margin);
    padding-right: var(--large-margin)
}
#contact .resume-button {
    width: 260px;
    height: 65px;

    font-size: 30px;
    border-radius: 18px;

    margin-bottom: 10px;
}
#c-links {
    margin-right: var(--large-margin);
    font-size: 23px;
}
#c-links a {
    color: var(--dark) !important;
}
.link-container {
    display: flex;
    flex-direction: row;
    align-items: center;

    margin-top: 35px;
    margin-left: 5px;
}
.logo {
    height: 1.3em;
    opacity: 81%;

    margin: 0 15px;
}
@media (width < 500px) {
    #experience .header {
        font-size: clamp(20px, 15vw, 55px) !important;
    }

    #contact .header {
        font-size: clamp(20px, 11vw, 55px) !important;
    }
    #c-links {
        font-size: clamp(10px, 4.5vw, 55px) !important;
    }
}

#c-penrose-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;

    flex: 1 1 auto;
}
#c-penrose {
    flex: 1 1 auto;

    height: 100%;
    max-width: 60vw;

    background-image: url('/assets/penrose-variant.avif');
    background-size: cover;
    background-position: center;
}
@media (width <= 550px) {
    #contact .header {
        font-size: 55px;
    }
}




footer {
    display: flex;
    align-items: center;

    padding: 25px 0;

    background-color: var(--light-background);
}
#f-links {
    display: flex;
    flex-direction: column;

    margin-left: var(--large-margin);
    margin-right: var(--small-margin);

    transform: translateY(calc(-0.07 * var(--ts)));
}
#f-links strong {
    font-weight: 600;
}
#f-links a {
    color: var(--middle-text);
    font-weight: 200;
}
#logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    width: calc(100% - 200px);
}