:root {
    --secondary-color: #49b9a6;
    --text-primary-color: #fff;
    --education-text-color: #F0F0F0;
    --education-title-color: #00D3F3;
    --education-span-color: #00D3F3;
    --contact-text-color: #364153;
    --card-bg: #343A48;
    --footer-bg: #292F3E;
}

.secondary-color {
    color: var(--secondary-color);
}

body {
    margin: 0;
    color: var(--text-primary-color);
    font-family: "Roboto", sans-serif;
}

#loader {
    position: fixed;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    z-index: 10000;
    background-color: #1B1B1B;
}

@media (hover: hover) and (pointer: fine) {
    body,
    a,
    button,
    input,
    textarea {
        cursor: none;
    }
}

img {
    max-width: 100%;
    height: auto;
}

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 10002;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(3px);
}

.section-title {
    color: var(--secondary-color);
    text-align: center;
    font-size: 2rem;
}

#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #1B1B1B;
}

header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 9999;
}

.menu-toggle {
    display: none;
    width: 52px;
    height: 52px;
    margin: 16px;
    border: none;
    border-radius: 16px;
    background: rgba(41, 47, 62, 0.9);
    backdrop-filter: blur(8px);
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-primary-color);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

header.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

header.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

header.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

main {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.socials {
    display: flex;
    flex-direction: column;
    gap: 128px;
}

.socials-item img {
    width: 40px;
}

main h1 {
    margin: 0;
}

.links {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.links a {
    color: var(--text-primary-color);
    text-decoration: none;
    position: relative;
}

.links-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: right;
    border-radius: 20px;
    background-color: var(--secondary-color);
    transition: transform 0.3s ease-out;
}

.links-item:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.text-container {
    font-size: 1.8rem;
    width: min(100%, 900px);
    margin: 0 auto;
}

#typewriter {
    min-height: 1.5em;
}

.divider {
    height: 500px;
}

.divider-small {
    height: 200px;
}

section {
    padding: 0 16px;
    box-sizing: border-box;
}

.about-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.5rem;
    width: min(100%, 1000px);
    margin: 0 auto;
}

.about-text {
    width: min(50%, 900px);
    text-align: center;
    margin: 0 auto;
}

#education {
    display: flex;
    justify-content: center;
    align-items: center;
}

.education-container {
    background-color: var(--card-bg);
    color: var(--education-text-color);
    width: min(60%, 900px);
    border-radius: 20px;
    padding: 32px 42px;
    box-sizing: border-box;
    margin: 0 auto;
}

.education-item span {
    color: var(--education-span-color);
}

.education-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.education-item {
    border-left: 4px solid var(--education-span-color);
    padding-left: 18px;
}

#backtotop {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: auto;
    left: auto;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

#backtotop svg {
    animation: backtotop 1.4s infinite ease-out;
}

@keyframes backtotop {
    0% {
        transform: translateY(0);
    }

    15% {
        transform: translateY(-6px);
    }

    30% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(-4px);
    }

    60% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(0);
    }
}

#projects {
    display: flex;
    justify-content: center;
    align-items: center;
}

.projects-container {
    width: min(100%, 1100px);
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 32px;
    justify-items: center;
}

.projects-card {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 500px;
    height: 600px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    box-sizing: border-box;
}

.projects-card p {
    padding-top: 32px;
    text-align: center;
}

.badges-container {
    display: flex;
    justify-content: space-between;
    width: 80%;
    padding: 32px;
}

.tech-badge {
    padding: 8px 16px;
    border-radius: 50px;
}

.html {
    background-color: #E34F26;
}

.css {
    background-color: #1672B6;
}

.js {
    background-color: #e7cc00;
}

.react {
    background-color: #60DAFB;
}

.ts {
    background-color: #3178C6;
}

.wp {
    background-color: #20759B;
}

.gsap {
    background-color: #0BE449;
}

.hb {
    background-color: #937EDB;
}

.api {
    background-color: #be7fbb;
}

#contact {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-container {
    background-color: var(--card-bg);
    color: var(--education-text-color);
    width: min(50%, 1000px);
    border-radius: 20px;
    padding: 50px;
    box-sizing: border-box;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-container {
    width: 45%;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 211, 243, .5);
    margin-top: 2%;
}

textarea {
    resize: none;
}

.contact-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
}

.info-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    width: 45%;
}

.info-container span,
.info-container a {
    color: var(--education-text-color);
}

.info-container a {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mail-container {
    display: flex;
    gap: 4px;
}

.socials-list {
    display: flex;
    gap: 32px;
}

.socials-item {
    color: var(--education-span-color);
    display: flex;
    align-items: center;
}

footer {
    height: 100px;
    background-color: var(--footer-bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

footer span {
    text-align: center;
}

footer span a {
    color: var(--text-primary-color);
}

.shadow {
    box-shadow: 6px 12px 10px rgba(0, 0, 0, 0.3);
}

#submitBtn {
    background-color: var(--education-span-color);
    color: #fff;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 107%;
}

.project-media {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 20px;
}

.project-img {
    display: block;
    width: 100%;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.project-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + 24px), -50%);
    display: flex;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.35s ease;
}

.project-overlay a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
}

.project-media:hover .project-img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.project-media:hover .project-overlay {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.cursor-hover .cursor-ring {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(0);
}

@media (max-width: 1024px) {
    .about-text,
    .education-container,
    .contact-container {
        width: min(90%, 900px);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        justify-items: center;
    }

    .contact-wrapper {
        flex-direction: column;
        gap: 32px;
    }

    .form-container,
    .info-container {
        width: 100%;
    }

    .info-container {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    header {
        justify-content: flex-end;
        padding: 0 8px;
        box-sizing: border-box;
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 10001;
    }

    .links {
        position: absolute;
        top: calc(100% + 8px);
        right: 16px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        min-width: 220px;
        padding: 24px;
        border-radius: 24px;
        background: rgba(41, 47, 62, 0.96);
        backdrop-filter: blur(12px);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    header.menu-open .links {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .text-container {
        font-size: 1.2rem;
        padding: 0 24px;
        text-align: center;
    }

    .links-item::after {
        bottom: -6px;
    }

    .about-wrapper {
        font-size: 1.2rem;
    }

    .about-text,
    .education-container,
    .contact-container {
        width: 100%;
    }

    .education-container,
    .contact-container {
        padding: 24px;
    }

    .projects-card {
        height: auto;
        padding: 16px;
    }

    .badges-container {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding: 24px 0 0;
    }

    .divider {
        height: 160px;
    }

    .divider-small {
        height: 120px;
    }

    .project-overlay a {
        width: 44px;
        height: 44px;
    }

    .mail-container,
    .socials-list {
        flex-wrap: wrap;
    }

    #submitBtn {
        width: 100%;
    }
}
