/* Base Variables & Reset */
:root {
    --bg-main: #0a0a0f;
    --bg-secondary: #12121c;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    
    --accent-primary: #6b21a8; /* Deep Purple */
    --accent-secondary: #00d4ff; /* Neon Cyan */
    --accent-tertiary: #ff007f; /* Neon Pink */
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* subtle background grid for tech feel */
    background-image: linear-gradient(var(--glass-border) 1px, transparent 1px),
                      linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

/* Custom Cursor */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(107, 33, 168, 0.15) 0%, rgba(0, 212, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: transform 0.1s ease-out;
}

/* Glassmorphism Utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-secondary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title h2 {
    font-size: 2.5rem;
}
.section-title span {
    color: var(--accent-secondary);
}



/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary-outline {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    color: var(--accent-secondary);
    text-decoration: none;
    border: 1px solid var(--accent-secondary);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-primary-outline:hover {
    background: var(--accent-secondary);
    color: var(--bg-main);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease;
}
.navbar.scrolled {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 0;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}
.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span {
    color: var(--accent-secondary);
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a:not(.btn-primary-outline) {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover:not(.btn-primary-outline) {
    color: white;
}

.nav-actions-mobile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sections Base */
section {
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}
.hero-content {
    flex: 1;
}
/* Profile Image */
.profile-img-container {
    margin-bottom: 1.5rem;
}
.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-secondary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    padding: 3px;
    background: var(--bg-secondary);
    transition: transform 0.3s ease;
}
.profile-img:hover {
    transform: scale(1.05);
}
.subtitle {
    color: var(--accent-secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Decorative Hero Graphics */
.hero-graphic {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}
.orbit-1 {
    width: 250px;
    height: 250px;
    background: var(--accent-primary);
    top: 50px;
    right: 50px;
    animation: drift 10s infinite alternate ease-in-out;
}
.orbit-2 {
    width: 200px;
    height: 200px;
    background: var(--accent-tertiary);
    bottom: 0;
    left: 50px;
    animation: drift 12s infinite alternate-reverse ease-in-out;
}
.decor-card {
    padding: 1.5rem;
    width: 280px;
    transform: rotate(5deg) translateY(-20px);
    animation: float 6s infinite ease-in-out;
}
.decor-card p {
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent-secondary);
    margin-top: 1rem;
}
.dots-row {
    display: flex;
    gap: 6px;
}
.dots-row span {
    width: 10px;
    height: 10px;
    background: var(--text-secondary);
    border-radius: 50%;
}
.dots-row span:nth-child(1) { background: #ff5f56; }
.dots-row span:nth-child(2) { background: #ffbd2e; }
.dots-row span:nth-child(3) { background: #27c93f; }

/* About Section */
.about-container {
    display: flex;
    gap: 2rem;
}
.about-text {
    flex: 2;
    padding: 2.5rem;
}
.about-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.skill-pill {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--accent-secondary);
}
.about-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.stat-box {
    padding: 2rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-box h3 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.stat-box p {
    color: var(--text-secondary);
}

/* Apps Section */
.apps {
    padding-top: 6rem;
}

.section-title p {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 1rem auto 0;
    font-size: 1.05rem;
}

.apps-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.55rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.4), rgba(0, 212, 255, 0.2));
    border-color: var(--accent-secondary);
    color: var(--text-primary);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 480px;
    margin: 0 auto;
}

.app-card {
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    border-color: rgba(0, 212, 255, 0.25);
}

.app-card-header {
    position: relative;
    padding: 2rem 2rem 1.5rem;
    min-height: 140px;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    overflow: hidden;
}

.app-card-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--app-accent, var(--accent-primary)), transparent 70%);
    opacity: 0.35;
}

.app-icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.app-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(39, 201, 63, 0.15);
    color: #5ee87a;
    border: 1px solid rgba(39, 201, 63, 0.3);
}

.app-status.demo {
    background: rgba(0, 212, 255, 0.12);
    color: var(--accent-secondary);
    border-color: rgba(0, 212, 255, 0.3);
}

.app-body {
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.app-body h3 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
}

.app-body > p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex: 1;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.app-tags span {
    font-size: 0.78rem;
    padding: 0.25rem 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-secondary);
}

.app-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.app-btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.app-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.25);
}

.app-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.app-btn-secondary:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.app-btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.app-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.app-card.is-hidden {
    display: none;
}

/* Projects Section (legacy) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.project-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.2);
}
.project-img-placeholder {
    height: 200px;
    background: rgba(255,255,255,0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
}
.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}
.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}
.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.project-tags span {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #ccc;
}
.project-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    align-self: flex-start;
}
.project-link:hover {
    color: var(--accent-tertiary);
}

/* Contact Section */
.contact {
    position: relative;
    z-index: 10;
}
.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2.5rem;
}
.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}
.contact-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.contact-btn-gmail:hover {
    border-color: #EA4335;
    color: #EA4335;
}

.contact-btn-whatsapp:hover {
    border-color: #25D366;
    color: #25D366;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}
.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px) rotate(5deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(5deg); }
}
@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 40px); }
}

/* Reveal Classes (For JS) */
.hidden-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.hidden-slide {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s ease-out;
}
.hidden-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s ease-out;
}
.hidden-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s ease-out;
}
.hidden-slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: translate(0) !important;
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 101;
}
.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 3px;
}
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    .nav-links.active {
        right: 0;
    }
    .hero { flex-direction: column; text-align: center; justify-content: center; padding-top: 10rem;}
    .hero-actions { justify-content: center; }
    .title { font-size: 3.5rem; }
    .about-container { flex-direction: column; }
    .hero-graphic { display: none; }
    .apps-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn-primary,
    .hero-actions .btn-primary-outline { width: 100%; max-width: 280px; text-align: center; }
}
