/* index.css - Updated (no overlay or added text on hover) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #e0e0e0;
    line-height: 1.7;
    overflow-x: hidden;
    cursor: auto;
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    opacity: 0.6;
    transition: transform 0.1s ease;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem; /* Increased side padding for better text containment on wide screens */
}

h1 {
    font-size: 5.5rem; /* Slightly reduced for better proportionality on various screens */
    font-weight: 900; /* Bolder for stronger hierarchy */
    color: #ffffff;
    margin-bottom: 1rem; /* Tighter spacing below title */
    letter-spacing: -1px; /* Subtle negative tracking for modern sophistication */
    line-height: 1.1; /* Improved readability */
}

.tagline {
    font-size: 2rem;
    color: #60a5fa;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.typing-text {
    border-right: 3px solid #3b82f6;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.intro {
    font-size: 1.15rem; /* Refined for readability */
    font-weight: 400;
    color: #b0c0d0; /* Softer tone for secondary text */
    max-width: 800px; /* Consistent constrained width */
    margin: 0 auto 1.5rem; /* Reduced bottom margin for tighter grouping */
    line-height: 1.6; /* Enhanced leading for professional flow */
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(45deg, #0ea5e9, #6366f1);
    color: #ffffff;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    transition: all 0.5s ease;
    margin-top: 2rem;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.6);
}

.stats {
    padding: 6rem 0 4rem;
    display: flex;
    justify-content: center;
    gap: 6rem;
    flex-wrap: wrap;
    background: rgba(15, 15, 40, 0.4);
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #3b82f6;
    display: block;
}

.about {
    padding: 4rem 0;
    text-align: center;
    background: rgba(15, 15, 40, 0.4);
    backdrop-filter: blur(10px);
}

.section-header h2 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.section-line {
    display: block;
    width: 150px;
    height: 5px;
    background: linear-gradient(to right, #0ea5e9, #6366f1);
    margin: 0 auto 4rem;
}

.about-content p {
    max-width: 900px;
    margin: 0 auto 2rem;
    font-size: 1.15rem;
    color: #c0d0e0;
}

.filters {
    padding: 5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.controls-left {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#search-input, #sort-select {
    padding: 1rem 1.8rem;
    background: rgba(20, 20, 50, 0.7);
    border: 1px solid #3b82f6;
    border-radius: 60px;
    color: #ffffff;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
}

.category-filters button {
    padding: 0.9rem 2rem;
    margin: 0.5rem;
    background: rgba(20, 20, 50, 0.7);
    border: 1px solid #4c1d95;
    border-radius: 60px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.category-filters button.active, .category-filters button:hover {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

main {
    padding: 4rem 0 24rem; /* Further increased as backup */
}

.loading {
    text-align: center;
    font-size: 1.5rem;
    color: #60a5fa;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 8rem;
}

.project-card {
    display: block; /* Ensures <a> behaves as full block */
    background: rgba(20, 20, 50, 0.6);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    cursor: pointer;
    text-decoration: none; /* Removes any underline from <a> */
}

.project-card:hover {
    transform: translateY(-30px) scale(1.05);
    box-shadow: 0 30px 60px rgba(59, 130, 246, 0.5);
}

.project-thumbnail {
    width: 100%;
    height: 194px; /* Retain fixed height for consistent card layout */
    object-fit: cover; /* Changed from 'cover' to show full image */
    background-color: #111122; /* Optional: dark background for letterboxing to blend with theme */
    transition: transform 0.8s ease;
}

.project-card:hover .project-thumbnail {
    transform: scale(1.15);
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.2rem;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.project-description {
    font-size: 0.95rem;
    color: #d0e0ff;
    margin-bottom: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.4;
}

.project-links {
    display: flex;
    gap: 1.5rem;
}

.project-links a, .project-links span {
    flex: 1;
    padding: 1.1rem;
    border-radius: 60px;
    font-weight: 700;
    text-align: center;
    transition: all 0.4s ease;
}

.btn-live {
    background: linear-gradient(45deg, #0ea5e9, #06b6d4);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

.btn-live:hover {
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.7);
    transform: translateY(-5px);
}

.btn-github {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-github:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.7);
    transform: translateY(-5px);
}

.open-source-stat {
    font-size: 1.9rem; /* Significantly larger for prominence */
    font-weight: 900; /* Ultra-bold */
    color: #60a5fa;
    text-shadow: 
        0 0 10px rgba(96, 165, 250, 0.8),
        0 0 20px rgba(96, 165, 250, 0.6),
        0 0 30px rgba(96, 165, 250, 0.4); /* Multi-layer neon glow */
    letter-spacing: 2px; /* Enhanced spacing for futuristic emphasis */
    transition: text-shadow 0.4s ease;
}

.stat-item:hover .open-source-stat {
    text-shadow: 
        0 0 15px rgba(96, 165, 250, 1),
        0 0 30px rgba(96, 165, 250, 0.8),
        0 0 45px rgba(96, 165, 250, 0.6); /* Intensified glow on hover */
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 500;
    color: #c0d0e0;
    margin-top: 0.2rem;
}

/* Targets only the third (Open Source) stat item */
.stat-item:last-child {
    padding-right: 2rem; /* Shifts content slightly to the left from the right edge, creating a perceived rightward offset (adjust 1.5rem-3rem as needed) */
    padding-bottom: 1.5rem; /* Moves content slightly downward (adjust 1rem-2.5rem for fine-tuning) */
    align-self: flex-end; /* Aligns the item toward the bottom of the flex row for additional downward shift */
    transform: translateX(2rem);
}

.stats::before,
.about::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
}


/* Optional: Refine text alignment for cohesion */
.glow-text { /* Or .open-source-stat if using a different class */
    text-align: right; /* Aligns text to the right within the padded area for balanced composition */
}

#back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    border-radius: 50%;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1; /* Ensures tight vertical centering of the arrow */
    overflow: hidden; /* Prevents any potential text overflow issues */
    z-index: 1000; /* Elevated to avoid overlap interference */
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: scale(1.1);
}

footer {
    padding: 2.5rem 0; /* Reduced from 5rem for a more compact height */
    text-align: center;
    background: rgba(10, 10, 30, 0.8);
    backdrop-filter: blur(12px);
    color: #a0b0c0;
    font-size: 0.95rem; /* Optional: slightly smaller text for proportionality */
}

footer p {
    margin: 0.5rem 0; /* Reduced margin between lines for tighter spacing */
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.footer-content {
    text-align: left;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    background: rgba(20, 20, 50, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
    margin-left: auto;
    margin-right: 6rem;
}

.support-link:hover {
    background: linear-gradient(45deg, #0ea5e9, #6366f1);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.5);
    transform: translateY(-3px);
}


.contact-link {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* Slightly reduced for compactness */
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-left: auto; /* Ensures it stays right-aligned base */
    margin-right: 6rem; /* Key adjustment: pulls it left from the right edge (increase to 6rem or 8rem for more shift toward center) */
}

.contact-link:hover {
    color: #60a5fa;
    transform: translateY(-3px);
}

.contact-link img {
    width: 32px;
    height: 32px;
    filter: brightness(1.2);
    transition: transform 0.3s ease;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

.contact-link:hover img {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .contact-link {
        justify-content: center;
    }
}


/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.3s; }
.delay-2 { transition-delay: 0.6s; }
.delay-3 { transition-delay: 0.9s; }
.delay-4 { transition-delay: 1.2s; }

@media (max-width: 1024px) {
    h1 { font-size: 5rem; }
    .projects-grid { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }
}

@media (max-width: 768px) {
    h1 { font-size: 4rem; }
    .tagline { font-size: 1.6rem; }
    .stats { gap: 3rem; flex-direction: column; }
    .filters { flex-direction: column; align-items: stretch; }
    .projects-grid { grid-template-columns: 1fr; }
}