@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #0c0d18;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.04);
    --primary: #a855f7;
    /* Purple */
    --secondary: #22d3ee;
    /* Cyan */
    --text-main: #f8f9fa;
    --text-muted: #94a3b8;
    --card-glow: rgba(168, 85, 247, 0.12);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0c0d18;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--secondary), var(--primary));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(34, 211, 238, 0.08) 0px, transparent 50%);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: -1;
    pointer-events: none;
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--text-main);
    text-shadow: 0 0 10px var(--primary);
}

/* Section Common */
#hero,
#about,
#projects,
#stats,
#skills,
#contact {
    padding: 6rem 5% 4rem;
    min-height: 50vh;
}


/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 0;
}

#hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

#hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.btn {
    padding: 0.8rem 2.2rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #0b0c10;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-text {
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.timeline {
    position: relative;
    border-left: 2px solid var(--glass-border);
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: calc(-2rem - 6px);
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.timeline-content {
    padding: 1.2rem;
    position: relative;
}

.timeline-content h3 {
    color: #fff;
    font-size: 1.15rem;
}

.timeline-content span {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    padding: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 12px 30px var(--card-glow);
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(45deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.2rem;
    font-size: 0.85rem;
}

.lang-tag {
    background: rgba(34, 211, 238, 0.08);
    color: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.stats-card {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.stats-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    /* Optional: filter to blend with background if cards are transparent */
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-badge {
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.skill-badge:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 auto 3.5rem auto;
    display: block !important;
    width: fit-content;
    background: linear-gradient(45deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer */
footer {
    padding: 3rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
    }

    #hero h1 {
        font-size: 3rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(12, 13, 24, 0.95);
        -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--glass-border);
        padding: 1rem 0;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem 2rem;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    }
}

/* Topics Tags */
.topics-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.topic-tag {
    font-size: 0.75rem;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.15);
    color: var(--secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-card:hover .topic-tag {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--primary);
}

/* Scroll Progress Tracker */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    z-index: 9999;
    transition: width 0.1s ease;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-5px);
    color: var(--secondary);
    border-color: rgba(34, 211, 238, 0.3);
}

/* Project Status Indicators */
.project-status {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.45) !important;
    padding: 5px 10px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.project-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.project-status.active span {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.project-status.maintenance span {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.project-status.offline span,
.project-status.outdated span {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* Search Box Styles */
.search-box {
    margin-bottom: 25px;
    position: relative;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    z-index: 10;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 45px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.search-box input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-box input:focus+i {
    color: var(--primary);
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0c0d18 !important;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.03);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Typewriter Cursor */
#typewriter {
    min-height: 1.5em;
}

#typewriter::after {
    content: '|';
    animation: blink 0.7s infinite;
    color: var(--secondary);
    margin-left: 2px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Glitch Title Micro-interaction style */
.glitch-title {
    cursor: default;
    transition: color 0.3s ease;
    display: inline-block; /* Ensure proper word wrapping without breaking innerText */
}

.glitch-title:hover {
    color: var(--secondary) !important;
}

/* Contact Section Buttons */
.contact-btn {
    text-decoration: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--secondary) !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
    transform: translateY(-3px);
}
/* Stats Dashboard Overhaul Extras */
.stats-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem !important;
}

.stats-header img {
    max-width: 900px !important;
    width: 100%;
}

@media (max-width: 1100px) {
    .stats-header img {
        max-width: 100% !important;
    }
}

/* Decoder Module Styling */
.decoder-container {
    text-align: center;
    width: 100%;
}

.decoder-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

#decoded-text {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.decoder-row, .joke-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem !important;
}
