@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes spin {
    from {
        --angle: 0deg;
    }

    to {
        --angle: 360deg;
    }
}

/* variables */
:root {
    --bg: #1b1b1b;
    --card-bg: #1c1f2b;
    --accent1: rgb(0, 183, 255);
    --accent2: rgb(90, 0, 102);
    --muted: #e7e7e7;
    --card-radius: 10px;
}

/* global */
* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}




html,
body {
    height: 100%;
    scroll-padding-top: 200px;
}

/* overall stuff and background */
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial;
    background:
        repeating-linear-gradient(135deg,
            rgba(90, 150, 255, 0.08) 0px,
            rgba(90, 150, 255, 0.08) 2px,
            rgba(200, 80, 255, 0.08) 2px,
            rgba(200, 80, 255, 0.08) 4px),
        #0a0b0d;
    color: var(--muted);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background coloring*/
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 20%, rgba(75, 120, 255, 0.18), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(180, 80, 255, 0.18), transparent 60%),
        radial-gradient(circle at 70% 20%, rgba(80, 255, 220, 0.15), transparent 60%);
    mix-blend-mode: screen;
    filter: blur(40px);
}

/* headerdiv */
.site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    background-color: transparent;
    position: fixed;
    backdrop-filter: blur(6px);
    top: 0;
    left: 0;
    width: 100%;
    z-index: 8000;
    overflow: visible;
    --site-header-height: 100px;
    padding-bottom: 100px;
}

/* icons in header */
.topIcons {
    display: flex;
    gap: 5vw;
    justify-content: center;
    position: fixed;
    top: 30px;
    left: 50px;
    z-index: 1200;
    pointer-events: auto;
}

/* left 3 icons */
.leftIcons {
    display: flex;
    gap: clamp(1em, 5vw, 4em);
    size-adjust: none;
    position: fixed;
    top: 20px;
    left: 50px;
    z-index: 1200;
    pointer-events: auto;
}


.my-icons {
    font-size: clamp(24px, 5vw, 50px);
}

/* each top icon */
.headerIcon {
    color: white;
    font-size: 60px;

}

/* sandwich icon div */
.rightIcon {
    position: fixed;
    top: 30px;
    right: 50px;
}

/* sandwich icon */
.fa {
    display: none;
    position: fixed;
    top: 20px;
    right: 50px;
}

/* buttons for navigating page at top */
.topnav {
    position: fixed;
    z-index: 2000;
    overflow: hidden;
    right: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;

}

/* links for buttons for navigating page at top */
.topnav a {
    display: block;
    color: #e7e7e7;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}

/* icons for buttons for navigating page at top */
.topnav.icon {
    color: #e7e7e7;
    font-size: 50px;
    display: none;
}

/* div for wrapping intro */
.introWrapper {
    display: flex;
    justify-content: center;
}

/* intro name and paragraph */
.intro {
    text-align: center;
    transform: translateY(100px);
    margin-right: 30px;
    margin-left: 30px;
    margin-bottom: 250px;
    font-size: 25px;
}

/* intro name */
.intro h1 {
    color: rgb(149, 225, 255);
}

/* intro job title */
.intro h2 {
    margin: -10px 0 20px 0;
}

/* make strong words blue */
.intro p strong {
    color: #71bcd3;
}

/* projects intro */
h1.page-title {
    text-align: center;
    text-decoration: underline;
    font-size: clamp(28px, 4.5vw, 50px);
    margin: 50px 0 30px;
}

/* projects */
.projects-grid {
    justify-content: center;
    justify-items: center;
    margin: 30px;
}

/* top row of 3 projects */
.topRow {
    display: grid;
    gap: 5vw;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    justify-content: center;
    justify-items: center;
    align-items: stretch;
}

/* size of each project card */
.scale {
    transition: 0.6s ease;
}

/* size of each project when hovered */
.scale:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* each project card */
.card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    height: 100%;
    min-height: 0;
    border-radius: var(--card-radius);
    padding: 1rem;
    position: relative;
    text-align: center;
    transition: transform 0.2s ease,
        box-shadow 0.2s ease;
    overflow: visible;
    cursor: pointer;
}

/* the link for each card */
.card a.card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}


/* card text */
.card p {
    font-size: clamp(12px, 1.8vw, 14px);
    line-height: 1.4;
    height: auto;
    margin: 12px 0;
    margin-bottom: 4em;
    color: var(--muted);
    white-space: normal;
    word-break: break-word;
    flex: 0 0 auto;
}


/* card titles */
.card h2 {
    margin: 8px 0;
    font-size: clamp(18px, 2.4vw, 28px);
}

/* card animation effect */
.card::before,
.card::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: calc(var(--card-radius) + 6px);
    z-index: -1;
    background-image: conic-gradient(from var(--angle),
            var(--accent1),
            var(--accent2),
            var(--accent1));
    padding: 3px;
    transform: translateZ(0);
    animation: spin 2s linear infinite;
}

/* card animation effect */
.card::before {
    filter: blur(40px);
    opacity: 0.5;
}

/* card animation effect */
.card::after {
    mix-blend-mode: screen;
}

/* image invis when hovered */
.card:hover .hover img,
.card:focus-within .hover img {
    opacity: 0;
}

/* video appears when hovered */
.card:hover .hover video,
.card:focus-within .hover video {
    opacity: 1;
}

/* card transform when hovered */
.hover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--card-radius) - 2px);
    overflow: hidden;
    display: block;
    background: linear-gradient(180deg, #111, #222);
}

/* image and videos transform when hovered */
.hover img,
.hover video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* image hovered goes to 0 opacity */
.hover img {
    transition: opacity 0.45s ease;
}

/* hovered video goes to 1 opacity */
.hover video {
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

/* the play now button */
.cta {
    display: inline-block;
    background: var(--accent1);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    align-self: center;
    position: absolute;
    bottom: 20px;
}

/* clicking play now button */
.cta:active {
    transform: translateY(1px);
}

/* bottom row of 2 projects */
.bottomRow {
    margin-top: 5vw;
    display: grid;
    gap: 5vw;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    justify-content: center;
    justify-items: center;
    align-items: stretch;
    margin-bottom: 200px;
}

/* div wrapper for all skills */
.skills-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 24px auto;
    margin-bottom: clamp(100px, 15vw, 300px);
    padding: 0 16px;
    box-sizing: border-box;
}

/* all skills */
.skills-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* each skill pill */
.skill-pill {
    display: inline-block;
    white-space: nowrap;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-weight: 600;
    font-size: clamp(25px, 1.2vw, 30px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    cursor: default;
}

/* bottom of page div (contact section) */
.contactBottom {
    justify-content: center;
    text-align: center;
}

/* each link should be the same regardless of visited or not */
.contactBottom a,
.contactBottom a:link,
.contactBottom a:visited {
    cursor: pointer;
}

/* grid for contact cards */
.contact-grid {
    display: flex;
    justify-content: center;
    gap: 4vw;
    margin: 4vw;
}

/* each individual contact card */
.contactCard {
    width: 100%;
    cursor: default;
    background: var(--card-bg);
}

/* footer for the page */
.site-footer {
    color: white;
    text-align: center;
    width: 100%;
    border-top: solid rgba(0, 183, 255, 0.171) 1px;
    padding: 30px;
}





@media (min-width: 1400px) {

    .projects,
    .intro h1,
    .intro h2,
    .intro p,
    .contact {
        max-width: 1400px;
    }
}

@media screen and (max-width: 1200px) {
    .fa {
        display: initial;
    }

    .topnav a {
        display: none;
    }

    .topnav.icon {
        float: right;
        display: block;
    }

    .leftIcons {
        display: default;
    }

    .topIcons {
        display: flex;
    }

    .topnav.responsive {
        position: fixed;
        top: calc(var(--site-header-height, 1000px));
        left: 0;
        width: 100%;
        display: block;
        z-index: 999;
        background: rgba(10, 10, 12, 0.95);
        box-sizing: border-box;
        padding: 8px 12px;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
}

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

@media (max-width: 720px) {

    .topRow,
    .bottomRow {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .skills-wrapper {
        padding: 0 10px;
    }

    .projects {
        padding: 12px 10px;
    }

    .card {
        padding: 0.75rem;
    }

    .card p {
        font-size: 13px;
        max-height: 5.3em;
    }
}


@media screen and (max-width: 380px) {
    .headerIcon {
        font-size: 15vw;
    }

    .fa {
        position: static;
    }

    .rightIcon {
        display: initial;
        position: static;
        color: red;
    }

    .leftIcons {
        display: flex;
        gap: 5vw;
        position: static;
    }
}