/* General styles */

:root {
    --container-max-width: 1200px;
    --container-padding: 1rem;
    --section-spacing: clamp(75vh, 80vw, 100vh);
    --font-size-base: clamp(0.875rem, 2.5vw, 1rem);
    --font-size-lg: clamp(1.125rem, 3vw, 1.25rem);
    --font-size-xl: clamp(1.5rem, 4vw, 2rem);
    --font-size-2xl: clamp(2rem, 5vw, 3rem);
    --font-size-3xl: clamp(2.5rem, 6vw, 4.5rem);
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    position: relative;
    background-color: #000000;
    background-image: url('imgs/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    overflow-y: auto;
    font-size: var(--font-size-base);
}

body::before {
    filter: grayscale(100%);
}

/* navbar */

.navbar {
    background-color: #00000089 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem var(--container-padding);
}

.navbar-brand {
    font-size: clamp(1.05rem, 4vw, 1.875rem);
    font-weight: bold;
    color: white;
    transition: color 0.35s ease;
}

.navbar .nav-link, .navbar-button {
    position: relative;
    font-size: clamp(0.9rem, 3vw, 1.25rem);
    font-weight: bold;
    color: white;
    transition: color 0.35s ease;
    padding: 0.5rem 1rem;
}

.navbar-brand:visited {
    color: white !important;
}

/* nav page */
.nav-page {
    background-color: #000000;
    height: 100%;
    width: 100%;
    z-index: 1000;
    color: white;
    display: none;
    position: fixed;
}

.nav-links {
    display: flex;
    flex-direction: column;
    padding-top: 15vh;
    padding-left: 15px;
    gap: 60px;
    font-size: clamp(1.875rem, 3vw, 3.75rem);
}

/* front page */

h1 {
    font-size: var(--font-size-xl);
    font-weight: bold;
    position: relative;
    top: 15vh;
    left: 5%;
    color: white;
    max-width: 90%;
}

.name {
    position: relative;
    font-size: var(--font-size-3xl);
    line-height: 1.2;
}

h1 .description {
    margin-left: 5px;
    color: #c8c8c8;
    font-size: clamp(1rem, 3vw, 1.5rem);
}

.boldDev {
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: var(--bs-purple);
}

.nav-underline .nav-item .nav-link {
    font-size: clamp(2rem, 6vw, 3.125rem);
    background-color: #0000005e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0px;
    border-radius: 50%;
    padding: 0.8rem;
    width: clamp(50px, 12vw, 70px);
    height: clamp(50px, 12vw, 70px);
    aspect-ratio: 1;
}

/* about me */

.aboutme {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: white;
    background-color: #212529f1;
    padding: clamp(1rem, 4vw, 2rem);
    margin: 0 auto;
    margin-top: clamp(75vh, 80vw, 100vh);
    width: min(90%, var(--container-max-width));
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-margin-top: 20vh;
    border-radius: 1rem;
}

.aboutmetitle {
    text-decoration: underline;
    text-decoration-color: var(--bs-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
}

.aboutme-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    align-items: center;
    justify-items: center;
}

.aboutlist {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0;
    width: 100%;
    max-width: 600px;
}

.aboutlist li {
    margin-bottom: 0.5rem;
    font-size: var(--font-size-base);
}

.pfp {
    border-radius: 50%;
    border: 3px solid var(--bs-purple);
    width: clamp(120px, 25vw, 200px);
    height: clamp(120px, 25vw, 200px);
    object-fit: cover;
    margin-bottom: 1rem;
}

.para {
    font-size: var(--font-size-base);
    font-weight: normal;
    line-height: 1.6;
}

.aboutme-descriptions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 600px;
    margin-top: 2rem;
}

.projects-desc, .experience {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.5); 
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.projectsicon, .experienceicon {
    z-index: 2;
    color: var(--bs-purple);
    background-color: #8787875e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.projectsnum, .experiencenum {
    font-size: var(--font-size-lg);
    margin: 1rem 0 0.5rem 0;
    z-index: 2;
}

.projectsdesc, .experiencedesc {
    font-size: var(--font-size-base);
    font-weight: bold;
    z-index: 2;
}

.projects-desc::before, .experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #29292995;
    z-index: 1;
    border-radius: 10px;
}

/* skills */

.skills {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: white;
    background-color: #212529f1;
    padding: clamp(1rem, 4vw, 2rem);
    margin: 0 auto;
    margin-top: var(--section-spacing);
    width: min(90%, var(--container-max-width));
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-margin-top: 20vh;
    border-radius: 1rem;
    animation: slideIn ease 2s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

.skillstitle {
    text-decoration: underline;
    text-decoration-color: var(--bs-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    font-size: var(--font-size-xl);
}

.skills-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem; 
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: clamp(1rem, 4vw, 2rem); 
    border-radius: 10px; 
}

.skillslist {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 800px;
}

.skillslist li {
    margin: 0;
}

.skill-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #29292995;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(111, 66, 193, 0.3);
}

.skill-icon {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--bs-purple);
    background-color: #8787875e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0px;
    border-radius: 50%;
    width: clamp(60px, 12vw, 70px);
    height: clamp(60px, 12vw, 70px);
    margin-bottom: 1rem;
}

.skill-desc {
    font-size: var(--font-size-base);
    z-index: 2;
}

.skills, .aboutme {
    border-radius: 2%;
}

/* Projects */

.projects {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: white;
    background-color: #212529f1;
    padding: clamp(1rem, 4vw, 2rem);
    margin: 0 auto;
    margin-top: var(--section-spacing);
    width: min(90%, var(--container-max-width));
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideIn ease 2s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    border-radius: 1rem;
}

.projectstitle {
    text-decoration: underline;
    text-decoration-color: var(--bs-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    font-size: var(--font-size-xl);
}

.projects-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem; 
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: clamp(1rem, 4vw, 2rem); 
    border-radius: 10px; 
}

.projectslist {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.project {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #29292995;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-size: var(--font-size-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(111, 66, 193, 0.3);
}

.project-title {
    font-size: var(--font-size-lg);
    text-decoration: underline;
    text-decoration-color: var(--bs-purple);
    margin-bottom: 1rem;
}

.project-desc {
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-link {
    color: var(--bs-link-color);
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--bs-purple);
}

/* Contact */
.contact {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: white;
    background-color: #212529f1;
    padding: clamp(1rem, 4vw, 2rem);
    margin: 0 auto;
    margin-top: var(--section-spacing);
    width: min(90%, var(--container-max-width));
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideIn ease 2s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    border-radius: 1rem;
}

.contact-title {
    text-decoration: underline;
    text-decoration-color: var(--bs-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    font-size: var(--font-size-xl);
}

.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem; 
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: clamp(1rem, 4vw, 2rem); 
    border-radius: 10px; 
}

.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1vh;
}

.contact-field {
    width: 60%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    color: #fff;
    background-color: #1f1f1f;
    border: 1px solid rgba(101, 13, 253, 0.75);
    border-radius: 0.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: none;
}

.contact-subject {
    width: 50vw;
    height: 15vh;
}

.contact-field::placeholder {
    color: #bbb;
}

.contact-field:focus {
    outline: none;
    border-color: var(--bs-purple);
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.3);
}

.contact-button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    color: #fff;
    background-color: var(--bs-purple);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-button:hover {
    background-color: #5a2d91;
    transform: translateY(-2px);
}

.contact-button:active {
    transform: translateY(0);
}

input[data-autocompleted] {
    background-color: transparent !important;
}

input:-webkit-autofill,
input:-webkit-autofill:focus {
    transition: background-color 0s 0s, color 0s 0s;
    transition-delay: calc(infinity * 1s);
}

/* transistions */
#navbar {
    transition: all 0.3s ease-in-out;
}

#navpage {
    transition: all 0.3s ease-in-out;
}

.nav-page-links {
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
}

.nav-page-links.slide {
    transform: translateX(0);
}

.nav-open {
   background-color: #000 !important;
   padding-bottom: 0;
   margin: 0 !important;
   display: flex;
}

body:has(.nav-open) {
   overflow: hidden;
}

.fade-in {
    opacity: 0;
    scale: 0.5;
    transition: all 1s;
}

.show {
    opacity: 1;
    scale: 1;
}

.slide-in-right-name {
    right: 15%;
    transition: all 1s;
}

.slide-right {
    right: 0;
}

.name-icon {
    transform: translateX(-100%);
}

.name-icon-slide-right {
    transform: translateX(0%);
}

.name-icon:nth-child(1) {
    transition: all 1s;
}

.name-icon:nth-child(2) {
    transition: all 0.7s;
}

.submit-success {
    background-color: #5CE65C;
    transition: all 1s;
}

.submit-fail {
    background-color: red;
    transition: all 1s;
}

/* remove selection */
::selection {
    background-color: transparent;
}

:root,
[data-bs-theme=light] {
  --bs-purple: #6f42c1;
  --bs-white-rgb: 255, 255, 255;
  --bs-black-rgb: 0, 0, 0;
  --bs-body-color: #212529;
  --bs-body-color-rgb: 33, 37, 41;
  --bs-body-bg: #fff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-emphasis-color: #000;
  --bs-emphasis-color-rgb: 0, 0, 0;
  --bs-secondary-color: rgba(33, 37, 41, 0.75);
  --bs-secondary-color-rgb: 33, 37, 41;
  --bs-secondary-bg: #e9ecef;
  --bs-secondary-bg-rgb: 233, 236, 239;
  --bs-tertiary-color: rgba(33, 37, 41, 0.5);
  --bs-tertiary-color-rgb: 33, 37, 41;
  --bs-tertiary-bg: #f8f9fa;
  --bs-tertiary-bg-rgb: 248, 249, 250;
  --bs-heading-color: inherit;
  --bs-link-color: #650dfd;
  --bs-link-color-rgb: 13, 110, 253;
  --bs-link-decoration: underline;
  --bs-link-hover-color: #650dfd;
}

.nav-page-links:hover {
    transform: translateY(-5px);
}

@media (hover: hover) {
    .navbar .navbar-brand:hover, .nav-link:hover, .navbar-button:hover {
        color: var(--bs-purple) !important;
    }
}

@media (hover: none) {
    .navbar .navbar-brand:active, .nav-link:active, .navbar-button:active {
        color: var(--bs-purple) !important;
    }
}

@media (max-width: 576px) {
    :root {
        --container-padding: 0.75rem;
    }

    .aboutme-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-content: center;
    }

    .aboutlist {
        grid-template-columns: 1fr;
        justify-items: center;
    }    

    .para {
        text-align: center;
    }
    
    .projects-desc, .experience {
        right: 15px;
    }

    .skillslist {
        grid-template-columns: repeat(2, 1fr);
    }

    .projectslist {
        grid-template-columns: 1fr;
    }

    h1 {
        left: 2%;
        top: 10vh;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .aboutme-container {
        grid-template-columns: 1fr 2fr;
        align-items: start;
    }

    .skillslist {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) {
    .aboutme-container {
        grid-template-columns: 1fr 2fr;
        align-items: center;
    }

    .aboutme-descriptions {
        grid-template-columns: repeat(2, 1fr);
    }

    .skillslist {
        grid-template-columns: repeat(4, 1fr);
    }

    .projectslist {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (min-width: 1200px) {
    :root {
        --container-padding: 2rem;
    }
}

@media (prefers-reduced-motion) {
    .fade-in {
        transition: none;
    }

    .slide-in-left {
        transition: none;
    }
}

.container-responsive {
    width: min(90%, var(--container-max-width));
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.navbar .nav-link:focus,
.project-link:focus,
button:focus {
    outline: 2px solid var(--bs-purple);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@supports (container-type: inline-size) {
    .skills-container,
    .projects-container,
    .aboutme-container {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .skillslist {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

@media (max-width: 320px) {
    :root {
        --font-size-base: 0.875rem;
        --container-padding: 0.5rem;
    }
    
    .navbar {
        padding: 0.25rem var(--container-padding);
    }
}