/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', sans-serif;
    color: #fff;
    overflow-x: hidden;
    scroll-behavior: smooth;
    height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

/* === Custom Scrollbar Styling === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7b2ff7, #f107a3);
    border-radius: 10px;
    border: 2px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8c42f7, #f735b3);
}

/* Background Effects */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #0d0d0d, #1a1a1a, #0d0d0d);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    z-index: -2;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 0; /* ADDED: Start invisible */
    transform: translateY(100vh); /* ADDED: Start at the bottom */
    animation: float 20s linear infinite;
}

@keyframes float {
    from { transform: translateY(100vh) scale(0.5); opacity: 0; }
    to { transform: translateY(-10vh) scale(1); opacity: 1; }
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
}

.back-button {
    font-weight: bold;
    transition: transform 0.3s ease;
}

.back-button:hover {
    transform: translateX(-5px);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #7b2ff7, #f107a3, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientFlow 6s ease infinite;
    margin-left: auto; /* Pushes logo to the right */
}

/* Main Content Sections */
main {
    max-width: 1000px;
    margin: auto;
}

section.about-section {
    padding: 8rem 2rem;
}

section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3.5rem;
    position: relative;
}

section h2::after {
    content: "";
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #7b2ff7, #f107a3);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-align: center; /* Centered for project page */
}

/* Animated Text & Links */
.animated-text {
    background: linear-gradient(90deg, #7b2ff7, #f107a3, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientFlow 6s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.read-more {
    display: inline-block;
    color: #7b2ff7;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.read-more:hover {
    transform: translateX(5px);
}

/* Feature Cards */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    line-height: 1.6;
}

.skill-card strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #f107a3; /* Highlight color for feature names */
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    font-size: 0.9rem;
    color: #aaa;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1s ease-out, transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    section.about-section {
        padding: 6rem 1.5rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .skills-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }
}