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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s, color 0.5s;
}

body.dark-mode {
    background-color: #000000;
    color: #ffffff;
}

body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: rgb(167, 13, 115);
    letter-spacing: 1px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: rgb(167, 13, 115);
    margin: 10px auto 0;
}

:root {
    --accent: rgb(167, 13, 115);
    --card-bg: rgba(255, 255, 255, 0.05);
    --gray: #cccccc;
}

body.light-mode {
    --card-bg: rgba(0, 0, 0, 0.05);
    --gray: #333333;
}

@keyframes gammaPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(167, 13, 115, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(167, 13, 115, 0.8);
    }
}

@keyframes gammaFlash {
    0% {
        text-shadow: 0 0 0 rgba(167, 13, 115, 0);
    }

    50% {
        text-shadow: 0 0 15px rgba(167, 13, 115, 0.8);
    }

    100% {
        text-shadow: 0 0 0 rgba(167, 13, 115, 0);
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.8);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

body.dark-mode .nav-links a {
    color: #ffffff;
}

body.light-mode .nav-links a {
    color: #000000;
}

.nav-links a.active::after,
.nav-links a:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--accent);
}

.mode-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
}

.mode-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.mode-toggle.pulse::after {
    animation: pulseRing 0.5s ease-out;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

body.dark-mode .menu-toggle {
    color: #ffffff;
}

body.light-mode .menu-toggle {
    color: #000000;
}

#home {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.atom-core {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nucleus {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(5px);
    animation: gammaPulse 2s infinite;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(167, 13, 115, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
}

.p1 {
    animation: orbit1 3s linear infinite;
}

.p2 {
    animation: orbit2 4s linear infinite;
}

.p3 {
    animation: orbit3 3.5s linear infinite;
}

.p4 {
    animation: orbit4 4.5s linear infinite;
}

@keyframes orbit1 {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(60px) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(60px) rotate(-360deg);
    }
}

@keyframes orbit2 {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(80px) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-360deg) translateX(80px) rotate(360deg);
    }
}

@keyframes orbit3 {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(70px) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(70px) rotate(-360deg);
    }
}

@keyframes orbit4 {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(90px) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(-360deg) translateX(90px) rotate(360deg);
    }
}

.hero h1,
.hero p {
    opacity: 0;
    transform: translateY(20px);
    font-weight: 600;
    background: linear-gradient(45deg, rgb(167, 13, 115), rgb(200, 50, 150));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 5px rgba(167, 13, 115, 0.5);
}

.hero h1.visible,
.hero p.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    transition: opacity 0.5s, transform 0.5s;
}

.hero p {
    font-size: 1.8rem;
    margin-bottom: 15px;
    transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
}

.cta-buttons .btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 10px;
    background: transparent;
    border: 2px solid var(--accent);
    text-decoration: none;
    border-radius: 30px;
    position: relative;
    animation: gammaPulse 2s infinite;
    transition: transform 0.3s, box-shadow 0.3s, background 0.1s, color 0.1s;
}

body.dark-mode .cta-buttons .btn {
    color: #ffffff;
}

body.light-mode .cta-buttons .btn {
    color: #000000;
}

.cta-buttons .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent);
}

.cta-buttons .btn:active {
    background: var(--accent);
    color: #ffffff;
}

#about .about-content {
    display: flex;
    align-items: center;
    gap: 120px;
}

.about-img img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-img img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--accent);
}

.about-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.5;
    padding: 15px;
    max-width: 600px;
    font-weight: 500;
    text-shadow: 0 0 5px rgba(167, 13, 115, 0.3);
    transition: transform 0.3s;
}

.about-text p:hover {
    transform: translateY(-5px);
    text-shadow: 0 0 10px rgba(167, 13, 115, 0.5);
}

#skills .skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.skill-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    border: 2px solid var(--accent);
    transition: opacity 0.5s, transform 0.5s, box-shadow 0.3s;
}

.skill-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-card:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
    animation: gammaPulse 1s infinite;
}

.skill-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--accent);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s, transform 0.8s, box-shadow 0.3s;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    box-shadow: 0 0 20px var(--accent);
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-card:hover .project-text p {
    transform: translateY(-5px);
}

.project-image {
    height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s;
}

.project-image:nth-child(1) {
    background-image: url('/assets/noteapp.jpg');
}

.project-image:nth-child(2) {
    background-image: url('/assets/netflix.jpg');
}

.project-image:nth-child(3) {
    background-image: url('/assets/coffee.jpg');
}

.project-text {
    padding: 20px;
    text-align: left;
}

.project-text h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.project-text h3.gamma-flash:hover {
    animation: gammaFlash 0.5s;
}

.project-text p {
    color: var(--gray);
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.project-text span {
    display: block;
    margin-bottom: 15px;
    color: var(--accent);
}

.project-text .btn {
    display: inline-block;
    padding: 10px 20px;
    transition: transform 0.3s, box-shadow 0.3s, background 0.1s, color 0.1s;
}

.project-text .btn:active {
    background: var(--accent);
    color: #ffffff;
}

#timeline .timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.timeline-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    width: 45%;
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
}

.timeline-item:nth-child(odd) {
    left: 0;
    transform: translateX(-20px);
}

.timeline-item:nth-child(even) {
    left: 55%;
    transform: translateX(20px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: gammaPulse 2s infinite;
}

.timeline-item:nth-child(odd)::before {
    right: -9px;
}

.timeline-item:nth-child(even)::before {
    left: -9px;
}

.languages-list {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.language-chip {
    padding: 10px 20px;
    border: 2px solid var(--accent);
    border-radius: 20px;
    animation: gammaPulse 2s infinite;
    transition: transform 0.3s;
}

.language-chip:hover {
    transform: scale(1.05);
}

#contact form {
    max-width: 600px;
    margin: 0 auto 30px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-label {
    position: absolute;
    top: -10px;
    left: 12px;
    background: var(--card-bg);
    padding: 0 5px;
    color: var(--accent);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

input:focus~.form-label,
textarea:focus~.form-label,
input:not(:placeholder-shown)~.form-label,
textarea:not(:placeholder-shown)~.form-label {
    opacity: 1;
    transform: translateY(0);
}

input,
textarea {
    width: 100%;
    padding: 12px;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 10px;
    transition: box-shadow 0.3s, transform 0.3s;
}

body.dark-mode input,
body.dark-mode textarea {
    color: #ffffff;
}

body.light-mode input,
body.light-mode textarea {
    color: #000000;
}

input:focus,
textarea:focus {
    box-shadow: 0 0 20px var(--accent);
    transform: scale(1.02);
    outline: none;
}

button.btn {
    width: 100%;
    padding: 12px;
    animation: gammaPulse 2s infinite;
    transition: transform 0.3s, box-shadow 0.3s, background 0.1s, color 0.1s;
}

button.btn:active {
    background: var(--accent);
    color: #ffffff;
}

.social-icons {
    text-align: center;
    margin-top: 20px;
}

.social-icon {
    color: inherit;
    font-size: 2rem;
    margin: 0 15px;
    transition: transform 0.3s, text-shadow 0.3s;
}

.social-icon:hover {
    transform: rotate(10deg);
    text-shadow: 0 0 10px var(--accent);
}

footer {
    text-align: center;
    padding: 20px;
    border-top: 2px solid var(--accent);
}

.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: transparent;
    border: 2px solid var(--accent);
    padding: 10px;
    border-radius: 50%;
    display: none;
    cursor: pointer;
    animation: gammaPulse 2s infinite;
    transition: transform 0.3s, box-shadow 0.3s, background 0.1s, color 0.1s;
}

body.dark-mode .scroll-top {
    color: #ffffff;
}

body.light-mode .scroll-top {
    color: #000000;
}

.scroll-top.show {
    display: block;
}

.scroll-top:hover {
    background: var(--accent);
    color: #ffffff;
}

.scroll-top:active {
    background: var(--accent);
    color: #ffffff;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.btn.magnetic {
    position: relative;
    transition: transform 0.1s;
}

@media (prefers-reduced-motion: reduce) {

    .gamma-pulse,
    .gamma-flash,
    .btn,
    .language-chip,
    .scroll-top,
    .project-card,
    .timeline-item::before,
    .nucleus {
        animation: none;
    }

    .project-card,
    section,
    .skill-card,
    .timeline-item {
        transition: none;
    }

    .project-image,
    .btn.magnetic,
    .about-img img,
    .social-icon {
        transform: none !important;
    }
}

@media (max-width: 1024px) {
    #projects .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 20px 0;
    }

    body.dark-mode .nav-links {
        background: #000000;
    }

    body.light-mode .nav-links {
        background: #ffffff;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    .mode-toggle {
        position: absolute;
        right: 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        transform: translateX(0);
    }

    .timeline-item::before {
        left: 11px !important;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        gap: 60px;
    }

    .about-img img {
        width: 200px;
        height: 200px;
    }

    .atom-core {
        transform: translate(-50%, -50%) scale(0.7);
    }

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

@media (min-width: 769px) and (max-width: 1024px) {
    #skills .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}