* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style-type: none;
}

:root {
    --bg: #000000;
    --text: #f5f5f5;
    --accent: #3e0158;
    --glow: #8a01c5;
    --proj_corner_size: 30px;
    font-family: 'Tektur', monospace;
}

html {
    scroll-behavior: smooth;
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
}

.background-pcb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body {
    background-color: var(--bg);
    color: var(--text);
    justify-content: center;
}

main {
    display: flex;
    flex-direction: column;
}

.cyber-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    overflow-x: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
    align-items: center;
    z-index: 1;
}

.nav-bar {
    position: relative;
    display: flex;
    justify-content: center; /* center contents in each nav bar */
    gap: 3rem;
    padding: 1rem 2rem;
    transition: 0.3s ease;
    z-index: 1;
    --r: 10px; /* control the rounded part*/
    --s: 20px; /* control the size of the cut */
    --a: 50deg; /* control the depth of the curvature*/
    --p: 50%; /* control the position */
    --nav-border-color: #4b4d51;
    --nav-width: 510px;
    --nav-height: 52px;
}

.nav-bar.left {
    margin-left: auto;
    width: var(--nav-width);
    height: var(--nav-height);
    background-color: var(--nav-border-color);
    clip-path: polygon(
        var(--nav-width) 0,      /* right top */
        var(--nav-width) var(--nav-height),   /* right bottom */
        48px var(--nav-height),    /* bottom inward notch */
        0 42px,       /* left bottom inset */
        0 10px,       /* left top inset */
        48px 0        /* top inward notch */
    );
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: var(--r);
    --_m:,#000 calc(100% - 1px),#0000;
    --_r:var(--r) at calc(100% - var(--r));
    --_d:(var(--s) + var(--r))*cos(var(--a));
    mask:
        radial-gradient(var(--_r) calc(var(--p) + var(--_d)) var(--_m)),
        radial-gradient(var(--_r) calc(var(--p) - var(--_d)) var(--_m)),
        radial-gradient(var(--s) at calc(100% + sin(var(--a))*var(--s)) var(--p),
        #0000 100%,#000 calc(100% + 1px)) calc(var(--r)*(sin(var(--a)) - 1)) 0 no-repeat,
        linear-gradient(#000 calc(var(--p) - var(--_d)),#0000 0 calc(var(--p) + var(--_d)),#000 0);
}

.nav-bar.left::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 0.5px;
    background-color: black;
    clip-path: polygon(
        var(--nav-width) 0,      /* right top */
        var(--nav-width) var(--nav-height),   /* right bottom */
        48px 50.5px,    /* bottom inward notch */
        0 40.5px,       /* left bottom inset */
        0 10px,       /* left top inset */
        48px 0        /* top inward notch */
    );
    z-index: -1;
    border-radius: var(--r);
    --_m:,#000 calc(100% - 1px),#0000;
    --_r:var(--r) at calc(100% - var(--r));
    --_d:(var(--s) + var(--r))*cos(var(--a));
    mask:
        radial-gradient(var(--_r) calc(var(--p) + var(--_d)) var(--_m)),
        radial-gradient(var(--_r) calc(var(--p) - var(--_d)) var(--_m)),
        radial-gradient(var(--s) at calc(100% + sin(var(--a))*var(--s)) var(--p),
        #0000 100%,#000 calc(100% + 1px)) calc(var(--r)*(sin(var(--a)) - 1)) 0 no-repeat,
        linear-gradient(#000 calc(var(--p) - var(--_d)),#0000 0 calc(var(--p) + var(--_d)),#000 0);
}

.nav-bar.right {
    margin-right: auto;
    width: var(--nav-width);
    height: var(--nav-height);
    background-color: var(--nav-border-color);
    --cut-point: calc(var(--nav-width) - 48px); /* adjust for the notch */
    clip-path: polygon(
        0 0, 
        0 var(--nav-height), 
        var(--cut-point) var(--nav-height), 
        var(--nav-width) 42px, 
        var(--nav-width) 10px, 
        var(--cut-point) 0
    );
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: var(--r);
    --_m:,#000 calc(100% - 1px),#0000;
    --_d:(var(--s) + var(--r))*cos(var(--a));
    mask:
        radial-gradient(var(--r) at var(--r) calc(var(--p) + var(--_d)) var(--_m)),
        radial-gradient(var(--r) at var(--r) calc(var(--p) - var(--_d)) var(--_m)),
        radial-gradient(var(--s) at calc(-1*sin(var(--a))*var(--s)) var(--p),
          #0000 100%,#000 calc(100% + 1px)) calc(var(--r)*(1 - sin(var(--a)))) 0 no-repeat,
        linear-gradient(#000 calc(var(--p) - var(--_d)),#0000 0 calc(var(--p) + var(--_d)),#000 0);
}

.nav-bar.right::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 0.5px;
    background-color: black;
    clip-path: polygon(
        0 0, 
        0 var(--nav-height), 
        var(--cut-point) calc(var(--nav-height) - 2px), 
        var(--nav-width) 40px, 
        var(--nav-width) 10px, 
        calc(var(--cut-point) - 1px) 0
    );
    z-index: -1;
    border-radius: var(--r);
    --_m:,#000 calc(100% - 1px),#0000;
    --_d:(var(--s) + var(--r))*cos(var(--a));
    mask:
        radial-gradient(var(--r) at var(--r) calc(var(--p) + var(--_d)) var(--_m)),
        radial-gradient(var(--r) at var(--r) calc(var(--p) - var(--_d)) var(--_m)),
        radial-gradient(var(--s) at calc(-1*sin(var(--a))*var(--s)) var(--p),
          #0000 100%,#000 calc(100% + 1px)) calc(var(--r)*(1 - sin(var(--a)))) 0 no-repeat,
        linear-gradient(#000 calc(var(--p) - var(--_d)),#0000 0 calc(var(--p) + var(--_d)),#000 0);
}

.nav-bar a {
    text-decoration: none;
    color: var(--text);
}

.nav-bar a:hover {
    color: var(--glow);
    text-shadow: 
            2px 2px 7px var(--glow),
            -2px 2px 7px var(--glow),
            2px -2px 7px var(--glow),
            -2px -2px 7px var(--glow);
    transition: 0.25s;
}

.nav-circle {
    position: relative;
    display: flex;
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--glow);
    box-shadow: 0 0 20px var(--glow);
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    color: var(--text);
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
        0%, 100% {
            transform: scale(1);
            box-shadow: 0px 0px 2px var(--glow); 
        }
        50% { 
            transform: scale(1.07);
            box-shadow: 0 0 30px var(--glow); 
        }
    }

@media (max-width: 1080px) {
    .cyber-nav {
        justify-content: center;
        z-index: 1000;
    }

    .nav-bar.left,
    .nav-bar.right {
        --nav-width: 100px;
        width: var(--nav-width);
    }
    
    .nav-bar.left a,
    .nav-bar.right a {
        display: none;
    }
    
    .nav-circle {
        cursor: pointer;
        
    }

    .nav-circle .cp-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1rem;
        color: var(--text);
        animation: cpFade 4s infinite;
    }

    .nav-circle .bar {
        position: absolute;
        left: 50%;
        width: 20px;
        height: 2px;
        background: var(--text);
        opacity: 0;
        transform: translate(-50%, 50%);
        animation: barFade 4s infinite;
    }

    .nav-circle .bar:nth-child(2) { top: 35%; }
    .nav-circle .bar:nth-child(3) { top: 45%; }
    .nav-circle .bar:nth-child(4) { top: 58%; }

    @keyframes cpFade {
        0%, 40% { opacity: 1; }
        50%, 90% { opacity: 0; }
        100% { opacity: 1; }
    }

    @keyframes barFade {
        0%, 40% { opacity: 0; }
        50%, 90% { opacity: 1; }
        100% { opacity: 0; }
    }
}

.mobile-menu {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    gap: 1rem;
    left: 0;
    bottom: -390px;
    width: 100%;
    height: 390px;
    background: black;
    transition: bottom 0.3s ease;
    z-index: 500;
}

body.menu-open .mobile-menu {
    box-shadow: -2px 0 10px var(--glow);
    bottom: 0;
}

.mobile-menu a {
    color: var(--text);
    font-size: 1.2rem;
    text-decoration: none;
}

.mobile-menu a:hover {
    color: var(--glow);
    text-shadow: 0 0 10px var(--glow);
}

@media (max-height: 568px) {
    .mobile-menu {
        bottom: -200px;
        height: 200px;
        overflow: scroll;
    }
}

.section {
    position: relative;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 1rem;
    color: var(--text);
    overflow-wrap: normal;
}

.landing {
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
    
}

#terminal-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 20px;
    height: 600px;
    max-height: 80vh;
    width: 80vw;
    overflow: hidden;
    box-sizing: border-box;
    background-color: rgba(47, 44, 44, 0.7);
    clip-path: polygon(
        0 0,
        40% 0,
        45% calc(100% - 93%),
        55% calc(100% - 93%),
        60% 0,
        calc(100% - 7%) 0,
        100% 7%,
        100% 100%,
        7% 100%,
        0% calc(100% - 7%)
    );
}

#terminal-panel::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    bottom: 2px;
    right: 2px;
    clip-path: polygon(
        0 0,
        40% 0,
        45% calc(100% - 93%),
        55% calc(100% - 93%),
        60% 0,
        calc(100% - 7%) 0,
        100% 7%,
        100% 100%,
        7% 100%,
        0% calc(100% - 7%)
    );
    background-color: rgb(0, 0, 0, 0.85);
    z-index: -2;
}

@media (max-width: 450px) {
    #terminal-panel {
        height: 400px;
    }
}

#terminal-text {
    display: inline-block;
    text-align: left;
    max-width: 90%;
    width: 830px;
    height: 200px;
    max-height: 80%;
    font-size: clamp(1rem, 4.5vmin, 3.5rem);
    font-weight: bold;
    color: var(--text);
    text-shadow: 0 0 5px var(--glow);
}

@media (max-height: 450px) {
    #terminal-text {
        height: 150px;
    }
}

#terminal-command-text, 
#terminal-command-program,
#terminal-command-ellipsis,
#terminal-more-text {
    white-space: normal;
    word-break: break-word;
}

.prompt {
    color: blue;
    flex-shrink: 1;
}

.dollar {
    white-space: pre-wrap;
}

#terminal-command-program {
    color: green;
    text-shadow: none;
    white-space: normal;
}

.terminal-desc {
    padding-top: 2rem;
}

.cursor {
    width: 1ch;
    animation: blink 0.8s step-end infinite;
    color: var(--text);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    60% { opacity: 0; } 
}

.cursor.stopped {
    animation: none;
    opacity: 1;
}

@media (max-height: 480px) {
    #terminal-panel {
        max-height: 75vh;
    }
}

/* SECTION HEADER STYLE */

@media (max-width: 768px) {
    .section-head {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .section-head {
        font-size: 24px;
    }
}

.section-head {
    position: relative;
    display: flex;
    justify-content: left;
    text-align: left;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    max-width: 445px;
    overflow: hidden;
    z-index: 0;
    background-color: white; 
    opacity: 0.97;
    clip-path: polygon(
        0 25px,
        25px 0,
        100% 0,
        100% calc(100% - 25px),
        calc(100% - 25px) 100%,
        0 100%
    );
}

.section-head::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(20, 18, 20, 1) 74%, rgba(38, 24, 59, 1) 91%, rgba(47, 16, 70, 1) 94%, rgba(66, 0, 94, 1) 100%);
    z-index: -1;
    clip-path: polygon(
        1px 25px,
        25px 1px,
        100% 1px,
        100% calc(100% - 25px),
        calc(100% - 25px) 100%,
        1px 100%
    );
}

/* ABOUT ME */

.section.about-me {
    min-height: 130vh;
}

#about-body-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

#my-img {
    max-width: 450px;
    max-height: 450px;
    transition: opacity 1s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.header {
    padding-bottom: 0.5rem;
}

.div-style {
    position: relative;
    padding: 1rem 2rem;
    background-color: rgba(50, 48, 50, 0.9);
    z-index: 0;
    clip-path: polygon(
        0 0,
        calc(100% - 35px) 0,
        100% 35px,
        100% 100%,
        35px 100%,
        0 calc(100% - 35px)
    );
    opacity: 0.90;
}

.div-style::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(29, 12, 33, 1) 99%);
    clip-path: polygon(
        0 0,
        calc(100% - 35px) 0,
        100% 35px,
        100% 100%,
        35px 100%,
        0 calc(100% - 35px)
    );
}

#about-background {
    width: 100%;
    max-width: 70vw;
    min-height: 460px;
    transition: opacity 1s ease;
}

#about-background > p {
    text-indent: 1.5rem;
    line-height: 30px;
    margin-bottom: 20px;
}

#about-body-2 {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding-top: 1rem;
}

#hobbies {
    min-height: 240px;
    min-width: 25vw;
    max-width: 30vw;
    align-self: start;
    transition: opacity 1s ease;
}

#hobbies-text {
    padding-bottom: 0.5rem;
}

#hobbies-list {
    line-height: 30px;
    margin-bottom: 20px;
}

#learn {
    align-self: start;
    min-height: 300px;
    min-width: 40vw;
    transition: opacity 1s ease;
}

#learn-text {
    margin-bottom: 0.5rem;
}

.about-hidden {
    opacity: 0;
}

@media (max-width: 1000px) {
    #about-body-1,
    #about-body-2 {
        flex-direction: column;
    }

    #about-body-2 {
        gap: 1rem;
    }

    #about-background {
        max-width: 90vw;
    }

    #hobbies {
        max-width: 90vw;
        align-self: center;
    }

    #learn {
        max-width: 90vw;
        align-self: center;
    }

    #my-img {
        order: -1;
        margin-top: 2rem;
    }
}

/* SKILLS */

.overview-wrapper {
    position: relative;
    display: flex;
    margin: 2rem;
    min-height: 75px;
    align-items: center;
    white-space: pre-wrap;
    padding: 1rem 2rem;
    background-color: rgba(50, 48, 50, 0.9);
    z-index: 0;
    justify-content: center;
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
    opacity: 0.90;
    transform: translateX(0);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.overview-wrapper::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(29, 12, 33, 1) 99%);
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.overview-wrapper-hidden {
    opacity: 0;
    transform: translateX(-100%);
}

#skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 1200px) {
    #skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .skill-column {
        justify-self: center;
    }
}

@media (max-width: 768px) {
    #skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #skills-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.skill-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 2rem;
}

.skill-category {
    margin-bottom: 1rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem 2rem;
    z-index: 0;
    background: rgba(50, 48, 50, 0.9);
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
    opacity: 0.97;
}

.skill-category::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(29, 12, 33, 1) 99%);
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.skill-transform-wrapper {
    width: 80%;
    height: 100%;
}

.skill {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 2rem;
    cursor: auto;
    text-align: center;
    align-content: center;
    padding: 1rem 1rem;
    z-index: 0;
    transition: background-color 0.2s ease;
    opacity: 0.9;
    background: rgb(0, 0, 0);
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.skill::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(29, 12, 33, 1) 99%);
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.skill-category,
.skill-transform-wrapper {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.skill-category.visible,
.skill-transform-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.skill-tooltip {
    position: absolute;
    width: max-content;
    text-align: center;
    bottom: 110%;
    left: 50%;
    width: 110%;
    padding: 1rem;
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 10;
    visibility: hidden;
    transition: opacity 0.2s ease;
    transform: translateX(-50%);
    opacity: 0;
    background: white;
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.skill-tooltip::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: black;
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.hover-ready {
    transition-delay: 0s !important;
}

.skill-transform-wrapper.visible.hover-ready:hover {
    transform: scale(1.05) !important;
    transition: transform 0.1s ease !important;
}

.skill-transform-wrapper.visible.hover-ready:hover .skill-tooltip,
.skill-transform-wrapper.visible.hover-ready .skill-tooltip.active {
    opacity: 1;
    visibility: visible;
}

.skill-transform-wrapper.visible.hover-ready:hover .skill,
.skill-transform-wrapper.visible.hover-ready .skill.active {
    font-weight: bold;
}

.skill.hover-novice::before {
    background: rgb(132, 125, 125, 0.9);
}

.skill.hover-beginner::before {
    background: green;
}

.skill.hover-proficient::before {
    background: #3563f0;
}

.skill.hover-expert::before {
    background: #f20c3e;
}

.skill.hover-master::before {
    background: gold;
}

/* PROJECTS */

/* Specifically target sections in the projects section */
.projects-container {
    position: relative;
    overflow: visible;
}

#projects {
    position: relative;
    transition: opacity 0.5s ease, transform 1s ease, visibility 0s linear 0.5s;
    opacity: 1;
    transform: translateX(0);
    margin: 1rem 0;
}

#projects.hide {
    opacity: 0;
    transform: translateX(-100%);
}

.project-detail {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.5s ease, transform 1s ease;
    pointer-events: none;
}

.project-detail.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

#projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    #projects-grid {
        grid-template-columns: repeat(2, 1fr);
        --proj_corner_size: 20px;
    }
}

@media (min-width: 1024px) {
    #projects-grid {
        grid-template-columns: repeat(3, 1fr);
        --proj_corner_size: 25px;
    }
}

.project-card-hidden {
    opacity: 0;
    transform: translateY(100%);
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

@media (max-width: 768px) {
    .project-header {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .project-header {
        font-size: 20px;
    }
}

.project-header {
    position: relative;
    width: 100%;
    font-weight: bold;
    text-align: center;
    padding: 1rem 2rem;
    z-index: 0;
    background: white;
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
    opacity: 0.97;
}

.project-header::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(29, 12, 33, 1) 99%);
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.project-img-wrapper {
    position: relative;
    padding: 2px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    z-index: 0;
    background-color: white;
    clip-path: polygon(
        0 var(--proj_corner_size),
        var(--proj_corner_size) 0,
        calc(100% - var(--proj_corner_size)) 0,
        100% var(--proj_corner_size),
        100% calc(100% - var(--proj_corner_size)),
        calc(100% - var(--proj_corner_size)) 100%,
        var(--proj_corner_size) 100%,
        0 calc(100% - var(--proj_corner_size))
    );
}

.project-img-wrapper:hover, 
.project-img-wrapper.expanded {
    transform: scale(1.03);
}

.project-img {
    display: block;
    width: 100%;
    height: auto;
    clip-path: inherit;
}

@media (max-width: 768px) {
    .project-overlay p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .project-overlay p {
        font-size: 14px;
    }
}

.project-overlay {
    position: absolute;
    display: flex;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 1rem;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    gap: 0.5rem;
    cursor: default;
}

.proj-description-wrapper {
    display: flex;
    align-items: center;
    text-align: center;
    padding: 0 0.5rem;
    font-size: clamp(10px, 3vw, 16px);
}

.project-img-wrapper:hover .project-overlay,
.project-img-wrapper.expanded .project-overlay {
    opacity: 1;
}

.project-img-wrapper:hover .proj-button,
.project-img-wrapper.expanded .proj-button {
    pointer-events: auto;
}

.proj-button {
    display: inline-flex;
    position: relative;
    text-align: center;
    align-self: center;
    padding: 0.8rem 1.7rem;
    margin-top: 1rem;
    z-index: 0;
    background: white;
    text-decoration: none;
    /* pointer-events: none; */
    color: var(--text);
    gap: 0.3rem;
    clip-path: polygon(
        0 10px,
        10px 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        10px 100%,
        0 calc(100% - 10px)
    );
    opacity: 0.97;
}

.proj-button::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 1px;
    background: black;
    clip-path: polygon(
        0 10px,
        10px 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        10px 100%,
        0 calc(100% - 10px)
    );
}

.proj-button:hover {
    font-weight: bold;
    transition: 0.2s;
    transform: scale(1.05);
    cursor: pointer;
}

@media (max-width: 768px) {
    .project-overlay {
        gap: 0.2rem;
        padding: 0;
    }

    .proj-button {
        padding: 1rem 2rem;
        gap: 0.7rem;
    }
}

@media (max-width: 480px) {
    .project-overlay {
        gap: 0.2rem;
        padding: 0;
    }

    .proj-button {
        padding: 0.7rem 1.4rem;
        gap: 0.5rem;
    }
}

.youtube-icon {
    color: red;
}

.ml-proj-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.github-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.capstone-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project-detail-title {
    margin: 2rem;
    width: fit-content;
}

.capstone-poster-wrapper {
    position: relative;
    padding: 2px;
    overflow: hidden;
    z-index: 0;
    background-color: white;
    clip-path: polygon(
        0 var(--proj_corner_size),
        var(--proj_corner_size) 0,
        calc(100% - var(--proj_corner_size)) 0,
        100% var(--proj_corner_size),
        100% calc(100% - var(--proj_corner_size)),
        calc(100% - var(--proj_corner_size)) 100%,
        var(--proj_corner_size) 100%,
        0 calc(100% - var(--proj_corner_size))
    );
}

.capstone-img {
    max-width: 100%;
    height: auto;
    clip-path: inherit;
}

.capstone-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.capstone-button {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.capstone-button:hover {
    transform: translateY(-2px);
}

.capstone-desc {
    white-space: normal;
    max-width: 1000px;
}

@media (max-width: 768px) {
    .capstone {
        flex-direction: column;
        align-items: center;
    }
}

.back-button {
    display: inline-flex;
    position: relative;
    text-align: center;
    align-self: center;
    padding: 0.8rem 1.7rem;
    margin-top: 1rem;
    z-index: 0;
    background: white;
    text-decoration: none;
    cursor: pointer;
    color: var(--text);
    gap: 0.3rem;
    clip-path: polygon(
        0 10px,
        10px 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        10px 100%,
        0 calc(100% - 10px)
    );
    opacity: 0.97;
}

.back-button::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 1px;
    background: black;
    clip-path: polygon(
        0 10px,
        10px 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        10px 100%,
        0 calc(100% - 10px)
    );
}

.back-button:hover {
    color: var(--glow);
    background-color: var(--glow);
    transform: scale(1.05);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#ml-proj {
    padding: 0.5rem;
}

.machine-design-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.machine-design-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.machine-design-overview-header {
    margin: 1rem auto;
}

.machine-design-overview p {
    text-indent: 1.5rem;
    line-height: 30px;
    margin-bottom: 20px;
}

.design-project {
    width: 100%;
}

.design-project-header {
    width: fit-content;
    margin-top: 2rem;
}

.design-project-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    margin: 2rem 0;
}

.design-project-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.design-project-buttons {
    display: flex;
    gap: 1rem;
}

.design-project-buttons .proj-button {
    margin: 0;
}

.design-project-desc {
    margin: 0;
    flex-direction: column;
    min-height: 0;
    white-space: normal;
}

.design-project-info h3 {
    margin: 1rem auto;
}

.design-project-info li {
    margin-bottom: 1rem;
    list-style-type: disc;
}

.design-project-img {
    height: 100%;
    max-width: 100%;
    justify-content: center;
    justify-self: center;
}

.design-project-img img {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
}

.grade {
    display: flex;
    justify-content: flex-start;
    margin: 1rem auto;
}

@media (max-width: 1142px) {
    .design-project-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 684px) {
    .design-project-buttons {
        flex-direction: column;
    }
}

/* CONTACT ME */

.contact-me {
    min-height: 50vh;
    margin-top: 7rem;
}

.contact-overview-wrapper {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.contact-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 820px) {
    .contact-list {
        flex-direction: column;
    }
}

.contact-wrapper-hidden {
    opacity: 0;
    transform: translateY(-30%);
}

.contact-item-wrapper {
    opacity: 1;
    transform: translateY(0);
    width: clamp(300px, 40%, 500px);
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.contact-item {
    margin: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-item:hover {
    background-color: white;
    transform: scale(1.03);
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    white-space: normal;
    gap: 0.5rem;
}