@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Global Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b366ff;
    --secondary-color: #38bdf8;
    --bg-color: #0d021f;
    --header-color: #1A0B2E;
    --text-light: #bbb;
    --text-white: #fff;
    --card-bg: rgba(255, 255, 255, 0.05);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0d021f;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

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

h2 {
    font-size: xx-large;
}

/* Header & Navigation */
header {
    background-color: #1A0B2E;
    text-align: center;
    min-height: 50px;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-left: 30px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 18px var(--primary-color));
    transition: filter 0.3s ease;
}

.logo img:hover {
    filter: drop-shadow(0 0 15px var(--primary-color)) drop-shadow(0 0 25px var(--primary-color));
}
svg{
    padding-top: 30px;
}

@media (max-width: 600px) {
    nav {
        padding: 15px 25px;
    }

    nav ul li a {
        font-size: 0;
    }

    nav ul li a i {
        font-size: 1rem;
        margin: 0;
    }
}

/* 3. Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.hero .intro-avatar{
    display: flex;
    align-items: flex-start;
}

.hero .avatar-wrapper img {
    width: 150px;
    border-radius: 50%;
    display: block;
}

/* 3. Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.hero .avatar-wrapper img {
    width: 150px;
    border-radius: 50%;
    display: block;
}

/* Hero Section - Corrected Grid Layout */
.intro-section {
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-rows: auto 1fr; /* Changed to auto and 1fr */
    gap: 50px 20px; /* Row and column gap */
    align-items: center;
    min-height: 60vh; /* Adjusted height */
    padding: 40px 0;
}

.intro-section .avatar-wrapper {
    grid-row: 1 / 3;
    grid-column: 1;
    width: fit-content;
    height: fit-content;
    display: inline-block;
    padding: 8px;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.6), transparent 70%);
    animation: pulse 5s infinite ease-in-out;
    transition: transform 0.3s ease-out; /* For parallax */
}

.intro-section .intro-arrow {
    grid-row: 1;
    grid-column: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align to the left */
    text-align: left;
    font-size: 1rem;
    color: #bbb;
    margin-left: 10px; /* Small offset */
}

.intro-section .intro-arrow span {
    width: max-content;
    padding: 10px;
    padding-left: 5px;
}

.intro-section .intro-arrow strong {
    color: var(--primary-color);
}

.hero-dynamic-content {
    grid-row: 2;
    grid-column: 1;
    text-align: left;
    margin-left: 90px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center; /* Vertically center content */
    transition: transform 0.3s ease-out; /* For parallax */
}

.hero-dynamic-content h1 {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.hero-dynamic-content h1 #typed-text {
    background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typed-cursor {
    font-weight: 500;
    font-size: 2.8rem;
    color: var(--secondary-color);
}

.hero-dynamic-content .tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin: 0;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.btn {
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-white);
    transform: translateY(-3px);
}

.intro-section .avatar-wrapper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #38bdf8);
    filter: blur(25px);
    z-index: -1;
    animation: glow 5s infinite alternate;
}

/* pulses animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(168, 85, 247, 1);
    }
}

/* glow animation */
@keyframes glow {
    0% {
        opacity: 1;
        transform: rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: rotate(360deg);
    }
}

.floating-logo-container {
    position: absolute;
    top: 100px;
    right: 100px;
    opacity: 0.05;
    z-index: 0;
}

.floating-logo-container img {
    width: 200px;
    transition: transform 0.3s ease-out; /* For parallax */
}

/* ----- Media Queries for Responsiveness ----- */
@media (max-width: 1024px) {
    .container {
        margin-left: 8vw;
        margin-right: 8vw;
    }
}

@media (max-width: 768px) {
    .intro-section {
        min-height: auto; /* Let content define height */
        padding: 60px 0;
    }
    .hero-dynamic-content {
        margin-left: 50px;
        max-width: 100%;
    }
    .hero-dynamic-content h1, .typed-cursor {
        font-size: 1.2rem;
    }
    .hero-dynamic-content .tagline {
        font-size: 1rem;
    }
    .container {
        margin-left: 4vw;
        margin-right: 4vw;
    }

    .hero .avatar-wrapper img {
        width: 120px;
    }

    svg {
        width: 60px;
        height: 60px;
    }

    .intro-section .intro-arrow span {
        font-size: 0.8rem;
        width: 100%;
    }
    
    .floating-logo-container {
        display: none; /* Hide floating logo on smaller screens */
    }
}

@media (max-width: 480px) {

    .container {
        margin-left: 1vw;
        margin-right: 1vw;
        padding: 0 10px;
    }

    .hero .avatar-wrapper img {
        width: 100px; /* Slightly larger for focus */
    }
}

/* About Summary Section */
.about-summary {
    text-align: left;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.about-summary::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 5%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: fadePulse 6s infinite ease-in-out;
    z-index: -1;
}
@keyframes fadePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

.about-summary h2 {
    font-size: 2.3rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.about-summary h2 span {
    background-image: linear-gradient(50deg, #a855f7, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-summary p {
    padding-left: 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 10px;
    max-width: 400px;
    position: relative;
    padding-left: 20px;
}

.about-summary p::before {
    content: '‣';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    top: 0;
}

.about-summary p:last-of-type {
    margin-top: 40px;
}

.about-summary p strong {
    color: var(--primary-color);
}

.about-summary p em {
    color: var(--secondary-color);
}

@media (max-width: 480px) {
    .about-summary h2 {
        font-size: 1.8rem;
    }
}

.decorative-line {
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, transparent, var(--primary-color), var(--secondary-color), transparent);
    margin: 50px 0;
    opacity: 0.4;
    position: relative;
    overflow: hidden;
}

.decorative-line::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: lineFlow 5s infinite linear;
}

.decorative-line.reverse::before {
    animation-direction: reverse;
}

@keyframes lineFlow {
    0% {
        left: -50%;
    }
    100% {
        left: 100%;
    }
}

/* --- Experience Section Styles --- */
#experience {
    padding-top: 50px;
    padding-bottom: 80px;
}

#experience h2 {
    text-align: center;
}

#experience h2 span {
    background-image: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.experience-item {
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 15px 0 0 15px;
}

.experience-item h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.experience-item h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.experience-item .duration {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.experience-item ul {
    list-style-type: none;
    padding-left: 0;
}

.experience-item li {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.experience-item li::before {
    content: '•';
    color: var(--secondary-color);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
}

/* Projects Section */
#projects {
    padding-top: 50px;
    padding-bottom: 80px;
    text-align: center;
}

#projects h2 span {
    background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projects-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 50px;
}

.project-card {
    position: relative;
    width: 320px;
    height: fit-content;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out, filter 0.4s ease-in-out;
}

.project-card:hover {
    transform: perspective(1000px) rotateY(5deg) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 0 20px rgba(179, 102, 255, 0.6));
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.project-content p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.tags {
    margin-top: 20px;
}

.tags span {
    display: inline-block;
    background-color: rgba(179, 102, 255, 0.2);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-top: 8px;
    font-weight: 500;
}

.project-links a {
    margin-top: 15px;
    display: inline-block;
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 600px) {
    .projects-grid {
        flex-direction: column;
        align-items: center;
    }

    .project-card {
        width: 90%;
        margin-bottom: 20px;
    }
}

/* Skills Section */
#skills {
    padding-top: 50px;
    position: relative;
    overflow: hidden;
    padding-bottom: 80px;
    text-align: center;
}

#skills h2 span {
    background-image: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skills-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 50px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    border-radius: 15px; 
    padding: 25px;
    width: 140px; 
    height: 120px;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.skill-item:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: rgba(179, 102, 255, 0.2);
    box-shadow: 0 0 25px rgba(179, 102, 255, 0.5);
}

.skill-item i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.skill-item:hover i {
    transform: scale(1.2);
}

.skill-item span {
    font-weight: 500;
    font-size: 0.8rem;
}

/* Contact Section */
#contact {
    padding-top: 50px;
    text-align: center;
    padding-bottom: 80px;
}

#contact h2 span {
    background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 40px auto;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.contact-form button {
    background-color: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
}

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

.social-icon {
    font-size: 2.5rem;
    color: var(--text-light);
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    color: var(--secondary-color);
    transform: scale(1.2) rotate(10deg);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}