* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: rgb(0, 0, 40);
    color: white;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(148, 54, 236, 0.3);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(148, 54, 236, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(100, 30, 180, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(148, 54, 236, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: floatBackground 20s ease-in-out infinite;
}

@keyframes floatBackground {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

main,
header,
footer {
    position: relative;
    z-index: 1;
}

a {
    text-decoration: none;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 80px;
    background-color: rgba(13, 13, 60, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(148, 54, 236, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
}

nav ul li {
    list-style: none;
    margin: 0 23px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    padding: 8px 12px;
    display: inline-block;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: rgb(148, 54, 236);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover {
    color: rgb(148, 54, 236);
}

nav ul li a:hover::after {
    width: 100%;
}

main hr {
    border: 0;
    background: linear-gradient(90deg, transparent, rgb(148, 54, 236), transparent);
    height: 1.5px;
    margin: 40px 84px;
    box-shadow: 0 0 10px rgba(148, 54, 236, 0.5);
}

footer {
    background-color: rgb(12, 4, 27);
    box-shadow: 0 -4px 20px rgba(148, 54, 236, 0.1);
}

.left {
    font-size: 1.5rem;
    background: linear-gradient(135deg, white, rgb(148, 54, 236));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.firstSection {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
    position: relative;
}

.firstSection>div {
    width: 45%;
}

.leftSection {
    font-size: 2rem;
    margin: 100px 30px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leftSection .buttons {
    padding: 50px 0;
}

.leftSection .btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgb(36, 14, 59), rgb(60, 20, 100));
    color: white;
    border: 2px solid rgb(148, 54, 236);
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-right: 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.leftSection .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(148, 54, 236, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.leftSection .btn:hover::before {
    width: 300px;
    height: 300px;
}

.leftSection .btn:hover {
    background: rgb(148, 54, 236);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(148, 54, 236, 0.4);
}

.leftSection .btn span {
    position: relative;
    z-index: 1;
}

.rightSection {
    position: relative;
}

.rightSection img {
    width: 90%;
    margin: 30px 0;
    filter: drop-shadow(0 0 30px rgba(148, 54, 236, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

    50% {
        transform: translateY(-20px);
    }
}

.purple {
    color: rgb(148, 54, 236);
    text-shadow: 0 0 20px rgba(148, 54, 236, 0.5);
}

#element {
    color: rgb(148, 54, 236);
    text-shadow: 0 0 20px rgba(148, 54, 236, 0.5);
}

.secondSection {
    max-width: 80vw;
    margin: auto;
    display: flex;
    padding: 40px 0;
}

.aboutLeft img {
    width: 255px;
    margin: 35px 0;
    border-radius: 50%;
    border: 3px solid rgb(148, 54, 236);
    box-shadow: 0 0 30px rgba(148, 54, 236, 0.5);
    transition: all 0.3s ease;
}

.aboutLeft img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(148, 54, 236, 0.8);
}

.aboutRight {
    margin: 1px 80px;
}

.aboutRight p{
    color: gray;
}

.aboutRight h1 {
    margin-bottom: 15px;
    background: linear-gradient(135deg, white, rgb(148, 54, 236));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.thirdSection {
    margin: auto;
    max-width: 80vw;
    padding: 40px 0;
}

.thirdSection p{
    color: gray;
}

.thirdSection h1 {
    margin-bottom: 30px;
    background: linear-gradient(135deg, white, rgb(148, 54, 236));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline {
    border-left: 2px solid rgb(148, 54, 236);
    padding-left: 30px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgb(148, 54, 236), transparent);
}

.timelineItem {
    margin-bottom: 30px;
    position: relative;
    justify-content: space-between;
    align-items: center;
    display: flex;
    padding: 20px;
    background: rgba(148, 54, 236, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.timelineItem:hover {
    background: rgba(148, 54, 236, 0.1);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(148, 54, 236, 0.2);
}

.timelineText {
    max-width: 75%;
}

.timelineItem::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 35px;
    width: 12px;
    height: 12px;
    background-color: rgb(148, 54, 236);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(148, 54, 236, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(148, 54, 236, 0.8);
    }

    50% {
        box-shadow: 0 0 25px rgba(148, 54, 236, 1);
    }
}

.timelineYear {
    font-size: 0.9rem;
    color: rgb(148, 54, 236);
    font-weight: 600;
}

.timelineContent h3 {
    margin: 5px 0;
}

.edu-logo {
    width: 100px;
    height: auto;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.edu-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

.fourthSection {
    margin: auto;
    max-width: 80vw;
    padding: 40px 0;
}

.fourthSection h1 {
    margin-bottom: 30px;
    background: linear-gradient(135deg, white, rgb(148, 54, 236));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fourthSection>p {
    margin-bottom: 40px;
    color: #aaa;
    line-height: 1.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.project-box {
    background: linear-gradient(135deg, rgba(20, 20, 60, 0.6) 0%, rgba(13, 13, 50, 0.6) 100%);
    border: 2px solid rgb(50, 50, 100);
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.project-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(148, 54, 236, 0.2) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(148, 54, 236, 0.1) 0%, rgba(100, 30, 180, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-box:hover::before {
    opacity: 1;
}

.project-box:hover::after {
    opacity: 1;
}

.project-box:hover {
    transform: translateY(-10px);
    border-color: rgb(148, 54, 236);
    box-shadow: 0 15px 40px rgba(148, 54, 236, 0.4);
}

.project-box h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: rgb(148, 54, 236);
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(148, 54, 236, 0.3);
}

.project-box .short-desc {
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.project-box .click-hint {
    margin-top: 15px;
    color: rgb(148, 54, 236);
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    display: inline-block;
    transition: transform 0.3s ease;
}

.project-box:hover .click-hint {
    transform: translateX(5px);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0 10px 0;
    position: relative;
    z-index: 1;
}

.tech-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(148, 54, 236, 0.2), rgba(100, 30, 180, 0.2));
    border: 1px solid rgba(148, 54, 236, 0.4);
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgb(200, 180, 255);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tech-badge:hover {
    background: linear-gradient(135deg, rgba(148, 54, 236, 0.4), rgba(100, 30, 180, 0.4));
    border-color: rgb(148, 54, 236);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(148, 54, 236, 0.3);
}

.tech-stack-modal {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 25px 0;
}

.tech-stack-modal .tech-badge {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: linear-gradient(135deg, rgba(148, 54, 236, 0.25), rgba(100, 30, 180, 0.25));
    border: 1px solid rgba(148, 54, 236, 0.5);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 60, 0.95) 0%, rgba(13, 13, 50, 0.95) 100%);
    border: 2px solid rgb(148, 54, 236);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    margin: 20px;
    position: relative;
    animation: slideIn 0.4s ease;
    box-shadow: 0 20px 60px rgba(148, 54, 236, 0.4);
    backdrop-filter: blur(20px);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: rgb(148, 54, 236);
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #fff;
    background: rgba(148, 54, 236, 0.2);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: rgb(148, 54, 236);
    font-size: 2rem;
    margin-bottom: 20px;
    padding-right: 40px;
    text-shadow: 0 0 20px rgba(148, 54, 236, 0.5);
}

.modal-content p {
    color: #ddd;
    line-height: 1.8;
    margin-bottom: 20px;
}

.modal-content .detail-item {
    margin: 15px 0;
    padding: 15px;
    background: rgba(148, 54, 236, 0.15);
    border-left: 3px solid rgb(148, 54, 236);
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-content .detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(148, 54, 236, 0.1);
    transition: width 0.3s ease;
}

.modal-content .detail-item:hover::before {
    width: 100%;
}

.modal-content .detail-item:hover {
    background: rgba(148, 54, 236, 0.2);
    transform: translateX(5px);
}

.modal-content .detail-item b {
    color: rgb(148, 54, 236);
    position: relative;
    z-index: 1;
}

.fifthSection {
    margin: auto;
    max-width: 80vw;
    padding: 40px 0;
}

.fifthSection h1 {
    margin-bottom: 30px;
    background: linear-gradient(135deg, white, rgb(148, 54, 236));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fifthSection p {
    margin-bottom: 40px;
    color: gray;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(148, 54, 236, 0.1), rgba(100, 30, 180, 0.1));
    border: 2px solid rgba(148, 54, 236, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(148, 54, 236, 0.4), transparent);
    transform: scale(0);
    transition: transform 0.4s ease;
}

.contact-icon:hover::before {
    transform: scale(1);
}

.contact-icon svg {
    width: 35px;
    height: 35px;
    color: rgb(148, 54, 236);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.contact-icon:hover {
    transform: translateY(-10px) scale(1.1);
    border-color: rgb(148, 54, 236);
    box-shadow: 0 15px 40px rgba(148, 54, 236, 0.6);
    background: linear-gradient(135deg, rgba(148, 54, 236, 0.3), rgba(100, 30, 180, 0.3));
}

.contact-icon:hover svg {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 10px rgba(148, 54, 236, 1));
}

@media (max-width: 768px) {
    .contact-icons {
        gap: 30px;
    }

    .contact-icon {
        width: 60px;
        height: 60px;
    }

    .contact-icon svg {
        width: 30px;
        height: 30px;
    }
}

.footer {
    display: flex;
    padding: 23px 122px;
    justify-content: space-evenly;
}

.footer ul {
    list-style: none;
}

.footer>div {
    width: 123px;
}

footer .footer-rights {
    text-align: center;
    color: grey;
    padding: 12px 0;
}

footer a {
    color: white;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

footer a svg {
    transition: all 0.3s ease;
}

footer a:hover {
    color: rgb(148, 54, 236);
    text-shadow: 0 0 10px rgba(148, 54, 236, 0.5);
}

footer a:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(148, 54, 236, 0.8));
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .left {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    main hr {
        margin: 30px 20px;
    }

    .firstSection {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .firstSection>div {
        width: 90%;
    }

    .leftSection {
        font-size: 1.5rem;
        margin: 50px 20px;
    }

    .leftSection .buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 30px 0;
    }

    .leftSection .btn {
        width: 100%;
        margin: 0;
    }

    .rightSection img {
        width: 70%;
        margin: 20px auto;
    }

    .secondSection {
        flex-direction: column;
        max-width: 90vw;
        text-align: center;
    }

    .aboutLeft {
        display: flex;
        justify-content: center;
    }

    .aboutLeft img {
        width: 200px;
        margin: 20px 0;
    }

    .aboutRight {
        margin: 20px 0;
    }

    .aboutRight h1 {
        font-size: 1.8rem;
    }

    .thirdSection {
        max-width: 90vw;
    }

    .thirdSection h1 {
        font-size: 1.8rem;
    }

    .timeline {
        padding-left: 20px;
    }

    .timelineItem {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .timelineText {
        max-width: 100%;
        margin-bottom: 15px;
    }

    .timelineItem::before {
        left: -27px;
        top: 20px;
    }

    .edu-logo {
        width: 80px;
        align-self: center;
    }

    .fourthSection {
        max-width: 90vw;
    }

    .fourthSection h1 {
        font-size: 1.8rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-box {
        padding: 25px;
    }

    .project-box h3 {
        font-size: 1.1rem;
    }

    .tech-stack {
        gap: 6px;
    }

    .tech-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .tech-stack-modal .tech-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .modal-content {
        padding: 30px 20px;
        width: 95%;
        margin: 10px;
    }

    .modal-content h2 {
        font-size: 1.3rem;
        padding-right: 30px;
    }

    .modal-content p {
        font-size: 0.95rem;
    }

    .modal-content .detail-item {
        padding: 12px;
        font-size: 0.9rem;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
    }

    .fifthSection {
        max-width: 90vw;
    }

    .fifthSection h1 {
        font-size: 1.8rem;
    }

    .fifthSection p {
        font-size: 0.95rem;
    }

    .contact-icons {
        gap: 30px;
    }

    .contact-icon {
        width: 60px;
        height: 60px;
    }

    .contact-icon svg {
        width: 30px;
        height: 30px;
    }

    .footer {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        text-align: center;
    }

    .footer>div {
        width: 100%;
    }

    .footer ul {
        padding: 0;
    }

    .footer ul li {
        margin: 10px 0;
    }

    footer .footer-rights {
        font-size: 0.85rem;
        padding: 15px 10px;
    }
}

@media (max-width: 480px) {
    .leftSection {
        font-size: 1.3rem;
        margin: 30px 15px;
    }

    .leftSection .btn {
        font-size: 16px;
        padding: 10px 20px;
    }

    .aboutLeft img {
        width: 150px;
    }

    .timelineContent h3 {
        font-size: 1rem;
    }

    .timelineContent p {
        font-size: 0.9rem;
    }

    .project-box {
        padding: 20px;
    }

    .contact-icon {
        width: 55px;
        height: 55px;
    }

    .contact-icon svg {
        width: 28px;
        height: 28px;
    }

    .contact-icons {
        gap: 25px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .leftSection {
        margin: 30px 20px;
    }

    .rightSection img {
        width: 50%;
    }

    nav {
        padding: 10px 0;
    }
}