@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

:root {
    --text: #eae9fc;
    --background: #071428;
    --background-secondary: #22334d;
    --input-background: #1c283a;
    --primary: #5cbeff;
    --primary-transparent: #5cbeff63;
    --secondary: #020024;
    --accent: #0600c2;
    --linearPrimarySecondary: linear-gradient(to bottom right, #5cbeff, #020024);
    --linearPrimaryAccent: linear-gradient(to bottom right, #5cbeff, #0600c2);
    --linearSecondaryAccent: linear-gradient(to bottom right, #020024, #0600c2);
    --radialPrimarySecondary: radial-gradient(to bottom right, #5cbeff, #020024);
    --radialPrimaryAccent: radial-gradient(to bottom right, #5cbeff, #0600c2);
    --radialSecondaryAccent: radial-gradient(to bottom right, #020024, #0600c2);
}

/* General styles */
html {
    scroll-behavior: smooth;
}
body {
    color: var(--text);
    background-color: var(--background);
    font-family: "Quicksand";
    margin: 0;
    padding: 0;
    line-height: 1.6;
}
main, nav, .introduction {
    max-width: 1800px;
    margin: auto;
}
section {
    padding: 0 6rem;
    scroll-margin-top: 30px;
}

/* Introduction Screen */
canvas.cursor-follow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.introduction {
    height: 100vh;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.introduction div {
    text-align: center;
    font-size: 4rem;
}
.emphasis {
    color: var(--primary);
}
.view-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem;
    letter-spacing: 0.1rem;
    color: var(--primary);
    font-size: 1.2rem;
    text-decoration: none;
}
.background-slide-link {
    border-radius: 4px;
    text-transform: uppercase;
    border: 2px solid var(--primary);
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.55, 0, 0.1, 1);
    cursor: pointer;
    box-shadow: var(--background-secondary) 0px 0px 0px;
}
.background-slide-link:hover {
    box-shadow: var(--primary) 8px 8px 0px, var(--background-secondary) -8px -8px 0px;
    letter-spacing: 0.25rem;
    background-color: #ffffff0f;
}
.view-more:active {
    transition: 0.2s;
    background-color: #ffffff4d;
}
.background-slide-link:hover .background-slide {
    opacity: 1;
    transform: translateZ(0px);
}
.down-arrow {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.down-arrow, .down-arrow svg {
    width: 1.2rem;
    height: 1.2rem;
}
.view-more svg path {
    fill: var(--primary);
}

/* Header and Navigation */
header {
    position: sticky;
    padding: 0.9rem 6rem;
    background: var(--background-secondary);
    color: var(--text);
    top: 0;
    z-index: 10;
    text-align: right;
}
header nav {
    display: flex;
    gap: 1.5rem;
    justify-content: end;
}
header nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.2s;
}
header nav a.active {
    color: var(--primary);
}

header nav a:hover {
    color: var(--primary);
}

/* About Section */
#about {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}
section h1 {
    font-size: 3rem;
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 0;
}
.bio {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.bio .description {
    flex-basis: 500px;
    max-width: 700px;
    flex-grow: 1;
}
.bio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}
.social-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.social-icon {
    width: 2.5rem;
    height: 2.5rem;
}
.social-icon svg {
    width: 100%;
    height: 100%;
}
.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.9);
    cursor: pointer;
    transition: 0.4s;
}
.social-icon svg path.background-path {
    fill: var(--text);
    transition: fill 0.4s;
}
.social-icon:hover {
    transform: scale(1);
}
.social-icon:hover svg path.background-path {
    fill: var(--primary);
}
.headshot {
    border-radius: 1000px;
    width: 350px;
    height: 350px;
    border: 3px solid var(--primary);
    overflow: hidden;
    position: relative;
    flex-basis: 350px;
    max-width: 100%;
}
.headshot img {
    width: 115%;
    position: absolute;
    top: 50%;
    left: calc(50% - 22px);
    transform: translate(-50%, -50%);
}
.all-skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    gap: 2rem;
}
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
}
.skill-container {
    text-decoration: none;
}
.skill-container .skill-content {
    display: flex;
    flex-direction: column;
    position: relative;
    bottom: 0;
    align-items: center;
    cursor: default;
    box-shadow: var(--primary-transparent) 0px 3px 8px;
    color: var(--text);
    cursor: pointer;
    transition: background-image 0.2s ease-in-out, bottom 0.2s;
}
.skill-container:visited .skill-label {
    text-decoration: none;
}
.gradient-border {
    border-radius: 6px;
    border: double 2px transparent;
    background-image: linear-gradient(var(--background), var(--background)), linear-gradient(to bottom right, var(--accent), var(--primary), var(--background-secondary));
    background-origin: border-box;
    background-clip: content-box, border-box;
}
.skill-container:hover .skill-content {
    background-image: linear-gradient(var(--background), var(--background-secondary)), linear-gradient(to bottom right, var(--accent), var(--primary), var(--background-secondary));
}
.skill-container:hover .skill-content {
    bottom: 4px;
}
.skill-logo, .skill-logo svg {
    width: 100px;
    height: 100px;
}
.skill-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 15px;
}
.skill-label {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    padding: 0 15px 10px;
}

/* Projects Section */
#projects {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}
.project-item {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.project-image {
    flex-grow: 1;
    flex-basis: 500px;
    max-width: 100%;
}
.project-image a {
    display: flex;
    border-width: 3px;
    transform: scale(0.98);
}
.project-image a:hover {
    transform: scale(1);
}
.project-image img {
    width: 100%;
    border-radius: 1px;
}
.project-description {
    flex-basis: 330px;
    max-width: 100%;
}
.project-item:nth-child(odd) .project-description {
    text-align: right;
}

/* Timeline Section */
#timeline {
    padding: 2rem 1rem;
}

/* Contact Section */
#contact {
    padding: 2rem;
    text-align: center;
}

#contact-btn {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#contact-btn:hover {
    background-color: var(--accent-color);
}

#contact-form {
    margin: 1rem auto;
    max-width: 500px;
    text-align: left;
}

#contact-form input:not([type=submit]), #contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    background-color: var(--input-background);
    color: var(--text);
    box-sizing: border-box;
    font-family: "Quicksand";
}
textarea {
    resize: none;
}
.button {
    cursor: pointer;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border: none;
    transition: 0.2s;
}
.button.primary {
    background-color: var(--accent);
    color: var(--text);
}
.button.primary:hover {
    background-color: var(--primary);
}

/* server side error css */
.submit-error {
    margin: 10px auto;
    width: 95%;
    padding: 7px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #5F0000;
    background-color: #FFC7C7;
    border-color: #CB0000;
    animation: fadein 0.5s;
    scroll-margin-top: 30px;
    transition: 0.5s;
}
.submit-error * {
    color: var(--text-light);
}
@keyframes fadein {
    0% { opacity: 0; bottom: -100px; }
    100% { opacity: 1; bottom: 0; }
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: var(--primary-color);
    margin: 0 1rem;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Footer */
footer {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    background-color: var(--background-secondary);
    color: var(--text);
    font-size: 0.8rem;
}

/* popup css */
.popup-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: fixed;
    z-index: 1001;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.316);
}
.popup-container.center-items {
    align-items: center;
}
.popup-container.image-popup-container {
    background-color: var(--transparent-background);
}
.popup {
    width: 40%;
    margin: 250px 15px 0;
    background: var(--linearPrimarySecondary);
    padding: 5px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--primary-transparent) 0px 3px 8px;
}
.popup.individual-theme-popup {
    margin-top: 0;
}
.popup.fullscreen {
    max-height: 98%;
    width: 90%;
    max-width: 400px;
    margin: 0;
    align-self: center;
}
.popup.theme-background {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.popup.theme-popup-container {
    max-width: 90%;
    max-height: 90%;
}
.popup.image-popup {
    margin-top: 0;
    width: calc(100% - 50px);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    align-self: center;
    margin: auto;
}
.popup-container.center-items > .popup {
    margin-top: 0;
}
.popup-image {
    max-width: 100%;
    max-height: 100%;
}
.popup-content {
    font-size: 16px;
    padding: 0 5% 15px;
    margin-top: 40px;
    overflow: auto;
    max-height: 70vh;
    text-align: left;
    position: relative;
}
.static {
    position: static;
}
.popup.fullscreen .popup-content {
    max-height: calc(90vh - 175px);
}
.popup.fullscreen .gift-wrap-content .popup-content {
    max-height: calc(90vh - 144px);
}
.popup-content.choose-theme-popup {
    margin-top: 0;
}
/* popup css */
.close-container {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 100;
}
.close-container.transparent-background {
    background-color: var(--transparent-background);
    border-radius: 5px;
    padding: 5px;
}
.popup.image-popup .close-container {
    top: 20px;
    right: 0;
    width: 35px;
    height: 35px;
}
.close-button {
    position: relative;
    width: 20px;
    height: 20px;
    transition: width 0.2s, height 0.2s;
}
.close-button svg {
    width: 20px;
    height: 20px;
    transition: width 0.2s, height 0.2s;
}
.close-button svg.hidden {
    display: block !important;
}
.close-button path {
    fill: var(--text);
}
.popup.image-popup .close-button {
    width: 35px;
    height: 35px;
}
.popup.image-popup .close-button svg {
    width: 35px;
    height: 35px;
}
.close-container:hover .close-button, .close-container:hover .close-button svg {
    height: 15px;
    width: 15px;
}
.popup.image-popup .close-container:hover .close-button, .popup.image-popup .close-container:hover .close-button svg {
    height: 25px;
    width: 25px;
}
.close-button:active {
    top: 2px;
}
.no-button {
    margin-right: 45px;
}
.green_button, .red_button {
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    color: white;
    text-decoration: none;
    text-align: center;
}
.green_button {
    background-color: green;
}
.red_button {
    background-color: #8c0005;
}
.hidden {
    display: none;
}

@media (max-width: 1204px){
    .popup {
        width: 60%;
    }
}

@media (max-width: 1125px){
    .bio .description {
        flex-basis: 100%;
    }
    header nav {
        justify-content: center;
    }
    .submit-container {
        text-align: center;
    }
}

@media (max-width: 1100px){
    .project-description {
        flex-basis: 100%;
        text-align: left;
    }
    .project-item:nth-child(odd) .project-description {
        text-align: left;
    }    
    .project-image {
        flex-grow: 0;
        flex-basis: 0;
    }
    .project-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    .project-item:nth-child(odd){
        flex-direction: column-reverse;
    }
    #projects {
        gap: 3rem;
    }
    
}

@media (max-width: 804px){
    .popup {
        width: 90%;
    }
}

@media (max-width: 750px){
    header {
        padding: 0.9rem 1rem;
    }
    section {
        padding: 0 1rem;
    }  
    .introduction div {
        font-size: 2.5rem;
    }
    .view-more {
        padding: 0.7rem;
    }
}
@media (max-width: 500px){
    .headshot {
        flex-basis: unset;
        width: 75vw;
        height: 75vw;
    }    
    .headshot img {
        left: calc(50% - 5vw);
    }
}