/* ============================================
   EMERALD & GOLD GLASS PORTFOLIO THEME
   (Fully Optimized for Mobile)
============================================ */
:root {
    /* Primary Colors */
    --emerald: #059669;
    --emerald-light: #34d399;
    --gold: #d4a574;
    --text-primary: #f5f5f4;
    --text-muted: rgba(245, 245, 244, 0.7);
    
    /* Backgrounds */
    --bg-dark: #0a0f0d;
    --bg-gradient: linear-gradient(135deg, #0d1a14 0%, #132419 50%, #1a2e23 100%);
    
    /* Glass Effect Variables */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    /* Font */
    --font-main: 'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-main); }

html, body {
    width: 100%;
    overflow-x: hidden; /* CRITICAL: Stops the page from moving left/right */
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- BACKGROUND ORBS --- */
.background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
    background: var(--bg-gradient);
}
.orb {
    position: fixed; border-radius: 50%; filter: blur(100px); z-index: -1; opacity: 0.4;
    animation: float 20s infinite ease-in-out;
    pointer-events: none; /* Prevents clicking or scrolling issues */
}
.orb-1 { width: 400px; height: 400px; background: var(--emerald); top: -10%; left: -10%; }
.orb-2 { width: 300px; height: 300px; background: var(--gold); bottom: 10%; right: -5%; animation-delay: -5s; }
.orb-3 { width: 250px; height: 250px; background: #e07a5f; bottom: -10%; left: 30%; animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

/* --- GLASS CARD UTILITY --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 30px;
    transition: 0.3s;
    width: 100%; /* Ensures card fits container */
}
.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

/* --- NAVIGATION --- */
.glass-nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(10, 15, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }

.logo { font-size: 1.8rem; font-weight: 700; color: var(--text-primary); }
.dot { color: var(--emerald-light); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-primary); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--emerald-light); }

.btn-nav {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: #fff !important; padding: 8px 20px; border-radius: 50px;
    font-weight: 600 !important; display: flex; gap: 8px; align-items: center;
}
.btn-nav:hover { box-shadow: 0 0 15px rgba(5, 150, 105, 0.5); }
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; color: #fff; }

/* --- HERO SECTION --- */
header { padding: 100px 0; position: relative; }
.hero-container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; }

.badge {
    background: rgba(5, 150, 105, 0.2); color: var(--emerald-light);
    padding: 5px 15px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 20px; display: inline-block; border: 1px solid rgba(5, 150, 105, 0.3);
}

.hero-text h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; }
.text-gradient {
    background: linear-gradient(90deg, var(--emerald-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 30px; }

.hero-btns { display: flex; gap: 15px; }
.btn { padding: 12px 30px; border-radius: 12px; font-weight: 600; cursor: pointer; border: none; transition: 0.3s; }
.btn-primary { background: linear-gradient(135deg, var(--emerald), var(--emerald-light)); color: white; }
.btn-primary:hover { box-shadow: 0 0 20px rgba(5, 150, 105, 0.4); transform: translateY(-3px); }
.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--text-primary); }
.btn-outline:hover { background: var(--glass-hover); border-color: var(--gold); }

/* Hero Visual Card */
.hero-card {
    height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.branch-icon { font-size: 5rem; color: var(--gold); opacity: 0.8; margin-bottom: 20px; }
.code-lines { text-align: center; width: 100%; opacity: 0.6; }
.line { height: 4px; background: var(--emerald); margin: 10px auto; border-radius: 2px; }

/* --- SECTIONS --- */
.section { padding: 80px 0; }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 50px; position: relative; }

/* Skills */
.skills-wrapper { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.skill-box {
    display: flex; flex-direction: column; align-items: center;
    width: 130px; padding: 25px; text-align: center;
}
.skill-box i { font-size: 2.5rem; color: var(--emerald-light); margin-bottom: 10px; }
.skill-box:hover i { color: var(--gold); }

/* Services */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { text-align: left; }
.icon-box {
    width: 50px; height: 50px; background: rgba(212, 165, 116, 0.1);
    color: var(--gold); display: flex; align-items: center; justify-content: center;
    border-radius: 12px; margin-bottom: 20px; font-size: 1.5rem;
}
.service-card h3 { margin-bottom: 10px; color: var(--text-primary); }
.service-card p { color: var(--text-muted); }

/* --- TIMELINE (DESKTOP DEFAULT) --- */
.timeline { max-width: 800px; margin: 0 auto; position: relative; }
.timeline::after {
    content: ''; position: absolute; width: 2px; background: var(--glass-border);
    top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
}
.timeline-item { padding: 20px; width: 50%; position: relative; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-dot {
    width: 16px; height: 16px; background: var(--gold); border-radius: 50%;
    position: absolute; top: 40px; right: -8px; z-index: 2;
    box-shadow: 0 0 10px var(--gold);
}
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }
.step-num { font-size: 3rem; font-weight: 700; color: rgba(255,255,255,0.05); position: absolute; top: 10px; right: 20px; }
.timeline-content h3 { color: var(--emerald-light); margin-bottom: 5px; }

/* Projects */
.project-showcase { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 50px; 
    align-items: center;
    padding: 40px;
}
.project-content { display: flex; flex-direction: column; justify-content: center; }
.project-desc { margin-bottom: 20px; font-size: 0.95rem; color: var(--text-muted); }
.tech-tags span {
    background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 20px;
    font-size: 0.8rem; color: var(--gold); margin-right: 5px; display: inline-block; margin-bottom: 5px;
}
.check-list li { margin-bottom: 8px; color: var(--text-muted); }
.check-list i { color: var(--emerald); margin-right: 10px; }

/* Slider */
.project-image { width: 100%; overflow: hidden; border-radius: 12px; height: 100%; min-height: 300px; }
.slider-track { display: flex; width: 200%; height: 100%; animation: slideShow 8s infinite ease-in-out; }
.slider-track img { width: 50%; height: 100%; object-fit: cover; border-radius: 12px; }
@keyframes slideShow {
    0%, 45% { transform: translateX(0); }
    50%, 95% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Contact */
.contact-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; }
.info-item { display: flex; gap: 15px; margin-bottom: 20px; font-size: 1.1rem; align-items: center; }
.info-item i { color: var(--emerald); width: 25px; text-align: center; }
.info-item a { color: var(--text-muted); word-break: break-all; } /* Prevents link overflow */
.info-item a:hover { color: var(--emerald-light); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border); border-radius: 10px;
    color: white; outline: none; transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--emerald); box-shadow: 0 0 10px rgba(5,150,105,0.3); }

/* Footer & WhatsApp */
footer { text-align: center; padding: 30px; color: var(--text-muted); border-top: 1px solid var(--glass-border); }
.whatsapp-btn {
    position: fixed; bottom: 30px; right: 30px;
    background: #25D366; width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 35px; box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
    z-index: 100;
}

/* ============================================
   MOBILE RESPONSIVE DESIGN (CRITICAL FIXES)
============================================ */
@media (max-width: 768px) {
    
    /* 1. Reset Global Spacing */
    .container { padding: 0 15px; }
    .section { padding: 60px 0; }
    .section-title { font-size: 2rem; }

    /* 2. Mobile Navigation */
    .hamburger { display: block; z-index: 1002; }
    .nav-links {
        display: none; position: fixed; top: 70px; left: 0; width: 100%; height: calc(100vh - 70px);
        background: #0a0f0d; /* Solid color to block background text */
        flex-direction: column; align-items: center; gap: 30px; padding: 40px 0;
        overflow-y: auto; z-index: 1000;
    }
    .nav-links.active { display: flex; }

    /* 3. Hero Section Stack */
    .hero-container { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-btns { flex-direction: column; gap: 15px; }
    .btn { width: 100%; } /* Big clickable buttons */
    .hero-card { height: 280px; }

    /* 4. Skills Grid (2 Columns) */
    .skills-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
    .skill-box { width: 100%; }

    /* 5. Services Stack */
    .grid-3 { grid-template-columns: 1fr; gap: 20px; }

    /* 6. Timeline Fix (Straight Line on Left) */
    .timeline::after { left: 20px; transform: none; }
    .timeline-item { width: 100%; padding-left: 60px; padding-right: 0; text-align: left !important; }
    .timeline-item:nth-child(odd) { left: 0; }
    .timeline-item:nth-child(even) { left: 0; }
    
    /* Force dots to align with the line on the left */
    .timeline-dot { left: 12px !important; right: auto !important; }
    
    /* 7. Projects & Contact Stack */
    .project-showcase { grid-template-columns: 1fr; padding: 20px; }
    .contact-container { grid-template-columns: 1fr; }
    
    /* 8. Input Zoom Fix for iPhone */
    input, textarea { font-size: 16px !important; }
    
    /* 9. WhatsApp Button Position */
    .whatsapp-btn { width: 50px; height: 50px; font-size: 28px; bottom: 20px; right: 20px; }
    
    /* 10. Hide heavy blur on mobile for performance */
    .orb { opacity: 0.15; }
}
