/* --- GLOBAL RESETS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #050005;
    background-image: radial-gradient(circle at 80% 20%, #240046, #000000 50%);
    background-attachment: fixed;
    color: white;
    overflow-x: hidden;
    position: relative;
}

/* --- ANIMATED BACKGROUND CANVAS --- */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: rgba(5, 0, 5, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a1a1a;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 15px 8%;
    box-shadow: 0 5px 30px rgba(213, 0, 249, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 101;
}

.logo span {
    color: #d500f9;
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d500f9;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: white;
}

.social-nav a {
    color: white;
    margin-left: 15px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-nav a:hover {
    color: #d500f9;
    transform: translateY(-3px) scale(1.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #d500f9;
    transition: all 0.3s ease;
}

/* --- HERO SECTION --- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    height: 90vh;
    position: relative;
    z-index: 1;
}

/* UPDATED: Increased width to fit longer text */
.content {
    max-width: 700px;
    animation: fadeInLeft 1s ease;
}

.greeting {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 10px;
}

/* UPDATED: Force single line on desktop */
h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
    min-height: 70px;
    white-space: nowrap;
    /* Prevents wrapping */
}

.cursor {
    color: #d500f9;
    animation: blink 1s infinite;
    font-weight: 100;
}

.subtitle {
    font-size: 1rem;
    color: #888;
    margin-bottom: 30px;
}

.btn-download {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #d500f9;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #d500f9;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-download:hover::before {
    left: 0;
}

.btn-download:hover {
    color: #000;
    box-shadow: 0 0 25px rgba(213, 0, 249, 0.8);
    transform: translateY(-3px);
}

.social-links-bottom {
    margin-top: 40px;
}

.social-links-bottom a {
    margin-right: 20px;
    font-size: 1.5rem;
    color: #666;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links-bottom a:hover {
    color: #d500f9;
    transform: translateY(-5px) rotate(5deg);
}

/* --- HERO VISUALS & FLOATING ICONS --- */
.visuals {
    position: relative;
    width: 450px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease;
}

.avatar-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 3px solid #d500f9;
    box-shadow: 0 0 30px rgba(213, 0, 249, 0.5);
    animation: pulse 3s ease-in-out infinite;
}

/* Find this section in your style.css */
.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 10;
}

.avatar-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(213, 0, 249, 0.3) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

/* Floating Icons */
.tech-icon {
    position: absolute;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    z-index: 3;
    animation: float 4s ease-in-out infinite;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-icon:hover {
    transform: scale(1.2) translateY(-10px);
    box-shadow: 0 0 30px rgba(213, 0, 249, 0.6);
}

.icon-1 {
    top: 0%;
    right: 30%;
    animation-delay: 0s;
}

.icon-2 {
    top: 35%;
    right: -5%;
    animation-delay: 1.5s;
}

.icon-3 {
    bottom: 10%;
    right: 10%;
    animation-delay: 0.5s;
}

.icon-4 {
    bottom: 10%;
    left: 10%;
    animation-delay: 2.5s;
}

.icon-5 {
    top: 40%;
    left: -5%;
    animation-delay: 1s;
}

.icon-6 {
    top: 5%;
    left: 20%;
    animation-delay: 3s;
}

.icon-7 {
    top: 20%;
    left: 10%;
    width: 35px;
    height: 35px;
    font-size: 1rem;
    opacity: 0.9;
    animation-delay: 1.2s;
}

.icon-8 {
    bottom: 30%;
    right: 15%;
    width: 35px;
    height: 35px;
    font-size: 1rem;
    opacity: 0.9;
    animation-delay: 2.2s;
}

.icon-9 {
    bottom: -5%;
    left: 45%;
    animation-delay: 0.8s;
    font-size: 1.8rem;
}

/* --- GENERAL SECTIONS --- */
.section-padding {
    padding: 100px 8%;
    border-top: 1px solid #111;
    background-color: rgba(5, 0, 5, 0.8);
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: white;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.section-title.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

.section-title span {
    color: #d500f9;
    text-shadow: 0 0 10px rgba(213, 0, 249, 0.4);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* --- ABOUT SECTION --- */
.about-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.about-text h3 {
    margin: 20px 0 15px;
    color: white;
    font-size: 1.4rem;
}

.skill-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.skill-tags span {
    background: rgba(213, 0, 249, 0.1);
    border: 1px solid #d500f9;
    color: #fff;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-tags span:hover {
    background: #d500f9;
    box-shadow: 0 0 15px #d500f9;
    transform: translateY(-3px);
}

/* Code Window */
.code-window {
    flex: 1;
    min-width: 300px;
    background: #0d0d0d;
    border-radius: 10px;
    border: 1px solid #333;
    box-shadow: 0 0 25px rgba(213, 0, 249, 0.15);
    transition: all 0.3s ease;
}

.code-window:hover {
    box-shadow: 0 0 40px rgba(213, 0, 249, 0.3);
    transform: translateY(-5px);
}

.window-header {
    background: #1a1a1a;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dot:hover {
    transform: scale(1.2);
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.filename {
    margin-left: 10px;
    color: #888;
    font-family: monospace;
    font-size: 0.85rem;
}

.code-content {
    padding: 25px;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #fff;
}

.keyword {
    color: #ff79c6;
}

.class-name {
    color: #8be9fd;
    font-style: italic;
}

.string {
    color: #f1fa8c;
}

.type {
    color: #d500f9;
}

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

#studies .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.project-card {
    background: #111;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #222;
    transition: all 0.4s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: #d500f9;
    box-shadow: 0 10px 40px rgba(213, 0, 249, 0.3);
}

.card-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

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

.card-info {
    padding: 25px;
}

.card-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff;
    transition: color 0.3s ease;
}

.project-card:hover .card-info h3 {
    color: #d500f9;
}

.card-info p {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 20px;
}

.card-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.card-tags span {
    background: #222;
    color: #d500f9;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.card-tags span:hover {
    background: #d500f9;
    color: #000;
}

.card-links {
    display: flex;
    gap: 15px;
}

.btn-sm {
    padding: 8px 20px;
    background: #d500f9;
    color: white;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-sm::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

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

.btn-sm.outline {
    background: transparent;
    border: 1px solid #d500f9;
    color: #d500f9;
}

.btn-sm:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(213, 0, 249, 0.4);
}

/* --- CONTACT SECTION --- */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    color: #ccc;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.info-item:hover {
    color: #fff;
    transform: translateX(10px);
}

.info-item i {
    color: #d500f9;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.info-item:hover i {
    transform: scale(1.2) rotate(10deg);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: #111;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #222;
    transition: all 0.3s ease;
}

.contact-form:hover {
    box-shadow: 0 0 30px rgba(213, 0, 249, 0.2);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: #050505;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #d500f9;
    box-shadow: 0 0 15px rgba(213, 0, 249, 0.3);
    transform: translateY(-2px);
}

/* --- FOOTER --- */
footer {
    padding: 30px;
    text-align: center;
    background: #000;
    border-top: 1px solid #222;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    color: #888;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: #d500f9;
    transform: translateY(-5px) rotate(15deg);
}

/* --- ANIMATIONS --- */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes float {

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

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

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(213, 0, 249, 0.5);
    }

    50% {
        box-shadow: 0 0 50px rgba(213, 0, 249, 0.8);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(5, 0, 5, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .social-nav {
        display: none;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        justify-content: center;
        height: auto;
        padding: 100px 5% 50px;
    }

    /* UPDATED: Reset for mobile so text can wrap */
    .content {
        max-width: 100%;
    }

    /* UPDATED: Allow wrap and smaller size on mobile */
    h1 {
        font-size: 2.5rem;
        white-space: normal;
    }

    .visuals {
        width: 300px;
        height: 300px;
        margin-bottom: 30px;
    }

    .avatar-container {
        width: 150px;
        height: 150px;
    }

    .section-padding {
        padding: 60px 5%;
    }

    .about-container,
    .contact-container {
        flex-direction: column;
    }

    .code-window {
        width: 100%;
    }

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