/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* --- DARK THEME (DEFAULT) --- */
    --bg-color: #050505;
    --nav-bg: rgba(15, 15, 15, 0.7);
    --surface-color: rgba(255, 255, 255, 0.05);
    
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --heading-color: #ffffff;
    
    --primary-color: #8A2BE2; /* Purple */
    --secondary-color: #00d4ff; /* Cyan */
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(138, 43, 226, 0.3);
}

/* --- LIGHT THEME OVERRIDES --- */
body.light-theme {
    --bg-color: #f0f2f5;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --surface-color: #ffffff;
    
    --text-color: #333333;
    --text-muted: #555555;
    --heading-color: #000000;
    
    --glass-border: 1px solid rgba(0, 0, 0, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --glow: 0 0 15px rgba(138, 43, 226, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. REUSABLE COMPONENTS
   ========================================= */

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* Glass Utility Class */
.glass {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.5);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Section Titles */
.section-title { 
    text-align: center; 
    margin-bottom: 4rem; 
}

.section-title h2 { 
    font-size: 2.8rem; 
    margin-bottom: 0.5rem; 
    font-weight: 700; 
    color: var(--heading-color);
}

.section-title span { 
    background: var(--gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.section-title p { 
    color: var(--text-muted); 
    font-size: 1.1rem; 
}

/* =========================================
   3. FLOATING GLASS NAVBAR
   ========================================= */

header {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    height: 70px;
    padding: 0 30px;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    border: var(--glass-border);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--heading-color); 
}
.logo span { color: var(--primary-color); }

.nav-links { display: flex; gap: 30px; }

.nav-links a { 
    font-weight: 500; 
    font-size: 0.95rem; 
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.nav-links a i { font-size: 0.9rem; transition: 0.3s; }

.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }
.nav-links a:hover i { transform: translateY(-2px); }

/* Nav Controls */
.nav-controls { display: flex; align-items: center; gap: 15px; }

#theme-toggle { 
    background: none; 
    border: none; 
    color: var(--text-color); 
    font-size: 1.2rem; 
    cursor: pointer; 
    transition: 0.3s; 
}

#theme-toggle:hover { transform: rotate(15deg); color: var(--primary-color); }

.hamburger { display: none; cursor: pointer; }

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero { 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    padding-top: 100px; 
}

.hero-container { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    align-items: center; 
    gap: 3rem; 
}

.badge {
    display: inline-block; 
    padding: 8px 20px; 
    background: rgba(138, 43, 226, 0.1);
    color: var(--primary-color); 
    border-radius: 30px; 
    font-size: 0.9rem; 
    margin-bottom: 1.5rem;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.hero-text h1 { 
    font-size: 4rem; 
    line-height: 1.1; 
    margin-bottom: 15px; 
    font-weight: 800; 
    color: var(--heading-color);
}

/* TYPED WRAPPER FIX (Prevents Vibration) */
.typed-wrapper {
    min-height: 3.5rem; /* Space reserved */
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.hero-text h2 { 
    font-size: 2rem; 
    margin: 0; 
    color: var(--text-muted); 
}

.gradient-text { 
    background: var(--gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.hero p { 
    color: var(--text-muted); 
    font-size: 1.1rem; 
    line-height: 1.7; 
    max-width: 500px; 
    margin-bottom: 30px; 
}

.btn-group { display: flex; gap: 15px; }

.social-icons { margin-top: 35px; display: flex; gap: 20px; }

.social-icons a {
    width: 45px; height: 45px; 
    border-radius: 50%; 
    border: 1px solid rgba(255,255,255,0.2);
    display: flex; justify-content: center; align-items: center; 
    color: var(--text-color); 
    transition: 0.3s;
}

.light-theme .social-icons a { border-color: rgba(0,0,0,0.2); }

.social-icons a:hover { 
    background: var(--primary-color); 
    border-color: var(--primary-color); 
    color: #fff; 
    transform: translateY(-5px); 
}

/* Hero Image */
.hero-img { position: relative; display: flex; justify-content: center; }

.img-border {
    width: 400px; height: 400px; 
    border-radius: 50%; 
    overflow: hidden;
    border: 5px solid var(--primary-color); 
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.4);
    animation: float 6s ease-in-out infinite;
}

.img-border img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: top center; /* Fix Face Position */
}

@keyframes float { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-20px); } 
}

/* Floating Stats */
.floating-stat {
    position: absolute; 
    background: var(--surface-color); 
    backdrop-filter: blur(10px);
    padding: 12px 25px; 
    border-radius: 15px; 
    border: var(--glass-border);
    display: flex; align-items: center; gap: 15px; 
    animation: float 5s infinite;
    color: var(--text-color);
}

.stat-1 { top: 15%; left: 0; animation-delay: 1s; }
.stat-2 { bottom: 15%; right: 0; animation-delay: 2s; }

.floating-stat i { color: var(--primary-color); font-size: 1.8rem; }
.floating-stat span { font-weight: 600; font-size: 1rem; }

/* =========================================
   5. ABOUT SECTION
   ========================================= */
.about { padding: 100px 0; }
.about-content { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: center; }

.about-main-img { 
    width: 100%; max-width: 400px; 
    border-radius: 20px; 
    box-shadow: 20px 20px 0 var(--primary-color);
    border: 1px solid var(--primary-color);
}

.about-right h3 { color: var(--heading-color); font-size: 1.8rem; margin-bottom: 15px; }
.about-right p { color: var(--text-muted); line-height: 1.6; }

.timeline { margin-top: 2rem; padding-left: 20px; border-left: 3px solid var(--primary-color); }
.timeline-item { position: relative; margin-bottom: 2.5rem; padding-left: 20px; }

.timeline-item::before {
    content: ''; position: absolute; left: -29px; top: 5px;
    width: 15px; height: 15px; 
    background: var(--bg-color); 
    border: 3px solid var(--primary-color); 
    border-radius: 50%;
}

.timeline-item .date { color: var(--primary-color); font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.timeline-item h4 { font-size: 1.2rem; margin: 5px 0; color: var(--heading-color); }
.timeline-item p { margin: 0; font-size: 0.95rem; }

/* =========================================
   6. PORTFOLIO SECTION (UPDATED)
   ========================================= */
.portfolio { padding: 100px 0; }

.tabs { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 3rem; flex-wrap: wrap; }

.tab-btn {
    background: transparent; 
    border: 1px solid var(--text-muted); 
    color: var(--text-muted);
    padding: 10px 25px; 
    border-radius: 30px; 
    cursor: pointer; 
    transition: 0.3s; 
    font-size: 1rem;
}

.tab-btn.active, .tab-btn:hover { 
    background: var(--primary-color); 
    color: #fff; 
    border-color: var(--primary-color); 
    transform: translateY(-3px); 
}

.tab-content { display: none; animation: fadeIn 0.6s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- PROJECT CARDS (SHINE EFFECT ANIMATION) --- */
.project-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2.5rem; 
}

.project-card { 
    border-radius: 20px;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    height: 100%;
    border: var(--glass-border);
    background: var(--surface-color);
    position: relative; /* Essential for Shine Effect */
    z-index: 1;
    transition: all 0.4s ease;
}

.light-theme .project-card { background: #fff; }

/* Shine Effect Element */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start outside left */
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: none; /* Reset transition on mouse out */
    z-index: 2;
    pointer-events: none;
}

/* Mouse Hover Animation */
.project-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.15); /* Purple Glow */
}

/* Trigger Shine */
.project-card:hover::before {
    left: 100%; /* Move across to right */
    transition: 0.5s;
}

/* Media/Video */
.media-container { 
    height: 200px; 
    overflow: hidden; 
    position: relative;
    border-bottom: var(--glass-border);
}

.media-container video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.project-card:hover video { transform: scale(1.05); }

.media-container .overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

.project-card:hover .media-container .overlay { background: rgba(0, 0, 0, 0); }

/* Card Content */
.card-body { 
    padding: 25px; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-body h3 { 
    font-size: 1.3rem; 
    margin-bottom: 10px; 
    color: var(--heading-color); 
    font-weight: 700;
}

.card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Tech Stack Icons */
.tech-stack {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-top: 15px;
    border-top: var(--glass-border);
}

.tech-stack i {
    font-size: 1.8rem;
    transition: transform 0.3s;
    filter: none; 
}

.project-card:hover .tech-stack i { transform: scale(1.1); }

/* Buttons Layout */
.links { 
    display: grid; 
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto; 
}

.link-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 5px;
    border-radius: 50px; 
    font-size: 0.85rem; 
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap; 
    width: 100%;
}

.link-btn.details {
    grid-column: span 2; 
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    background: transparent;
}

.link-btn.details:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}
.light-theme .link-btn.details:hover {
    background: #eee;
    color: #000;
    border-color: #000;
}

.link-btn.live { 
    background: var(--gradient); 
    color: #fff; 
    border: none;
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.3);
}

.link-btn.code { 
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.link-btn:hover { transform: translateY(-3px); }
.link-btn.code:hover { 
    background: var(--surface-color); 
    color: var(--text-color); 
    border-color: var(--text-color);
}

/* Tech Grid & Certificates */
.skills-wrapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; font-size: 4rem; padding: 20px; }
.skills-wrapper i { transition: 0.3s; }
.skills-wrapper i:hover { transform: scale(1.1); }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.cert-card img { width: 100%; border-radius: 15px; border: var(--glass-border); transition: 0.4s; }
.cert-card:hover img { transform: scale(1.02); box-shadow: var(--shadow); }

/* =========================================
   7. SERVICES SECTION
   ========================================= */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }

.service-card { 
    padding: 3rem 2rem; 
    text-align: center; 
    transition: 0.4s; 
    position: relative; 
    overflow: hidden;
    background: var(--surface-color);
}

.light-theme .service-card { background: #fff; }

.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; 
    background: var(--gradient); transform: scaleX(0); transition: 0.4s; transform-origin: left;
}

.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); }

.icon-box { 
    width: 70px; height: 70px; margin: 0 auto 20px; border-radius: 50%; 
    background: rgba(138,43,226,0.1); 
    display: flex; justify-content: center; align-items: center; 
    color: var(--primary-color); font-size: 2rem; transition: 0.4s;
}

.service-card:hover .icon-box { background: var(--primary-color); color: #fff; box-shadow: 0 0 20px rgba(138,43,226,0.5); }
.service-card h3 { color: var(--heading-color); margin-bottom: 10px; font-size: 1.3rem; }
.service-card p { color: var(--text-muted); }

/* =========================================
   8. TESTIMONIALS
   ========================================= */
.review-card { padding: 2.5rem; text-align: center; margin: 15px; background: var(--surface-color); }
.light-theme .review-card { background: #fff; }

.quote-icon { font-size: 2rem; color: var(--primary-color); margin-bottom: 1rem; opacity: 0.5; }
.review-card p { font-style: italic; font-size: 1.1rem; line-height: 1.6; color: var(--text-color); }

.user { margin-top: 2rem; display: flex; align-items: center; justify-content: center; gap: 15px; }
.user img { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--primary-color); }
.user h4 { color: var(--heading-color); margin-bottom: 0; }
.user small { color: var(--text-muted); }

/* =========================================
   9. CONTACT SECTION (MODERN)
   ========================================= */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; }

/* Social Buttons */
.contact-socials { display: flex; flex-direction: column; gap: 20px; }
.contact-socials h3 { font-size: 1.8rem; margin-bottom: 10px; color: var(--heading-color); }

/* Updated Contact Buttons with Color Fill Animation */
.social-btn {
    display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: 15px;
    background: var(--surface-color); border: var(--glass-border); 
    transition: all 0.4s ease; cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.light-theme .social-btn { background: #fff; }

/* Fill Effect */
.social-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background: var(--primary-color);
    transition: 0.4s ease;
    z-index: -1;
    border-radius: 15px;
}

.social-btn .icon { 
    width: 60px; height: 60px; border-radius: 12px; display: flex; justify-content: center; align-items: center; 
    font-size: 2rem; color: #fff; transition: 0.3s;
}

.social-btn .text h4 { font-size: 1.2rem; margin-bottom: 0; color: var(--heading-color); transition: 0.3s; }
.social-btn .text span { font-size: 0.9rem; color: var(--text-muted); transition: 0.3s; }

/* Specific Colors for Icons */
.whatsapp .icon { background: #25D366; }
.gmail .icon { background: #EA4335; }
.github .icon { background: #333; }

/* Hover Effects */
.social-btn:hover { 
    transform: translateX(10px); 
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.social-btn:hover::before { width: 100%; }

.social-btn:hover .text h4, 
.social-btn:hover .text span { color: #fff; }

.social-btn:hover .icon { 
    background: #fff; 
    color: var(--primary-color); 
    transform: scale(1.1) rotate(5deg);
}

/* Form (Simple Animation) */
.contact-form { 
    padding: 3rem; 
    background: var(--surface-color);
    border-radius: 20px;
    border: var(--glass-border);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.light-theme .contact-form { background: #fff; }

/* Hover Effect: Glow Only */
.contact-form:hover { 
    transform: none; /* හෙලවෙන්නෙ නෑ */
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.15); /* Soft Glow */
}

.contact-form h3 { color: var(--heading-color); margin-bottom: 20px; }

.input-box { position: relative; margin-bottom: 30px; }
.input-box input, .input-box textarea {
    width: 100%; padding: 15px; 
    background: rgba(0,0,0,0.2); 
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; color: var(--text-color); 
    outline: none; font-size: 1rem;
}

.light-theme .input-box input, 
.light-theme .input-box textarea { 
    background: #f9f9f9; 
    border-color: #ccc; 
    color: #333;
}

.input-box textarea { height: 150px; resize: none; }

.input-box label {
    position: absolute; left: 15px; top: 15px; color: var(--text-muted); 
    pointer-events: none; transition: 0.3s;
    background: transparent; padding: 0 5px;
}

.input-box input:focus ~ label, .input-box input:valid ~ label,
.input-box textarea:focus ~ label, .input-box textarea:valid ~ label {
    top: -10px; font-size: 0.85rem; color: var(--primary-color); background: var(--bg-color);
}
.light-theme .input-box input:focus ~ label,
.light-theme .input-box input:valid ~ label { background: #fff; }

#form-status { margin-top: 15px; font-weight: bold; color: #00ff88; }
.light-theme #form-status { color: #008000; }

/* =========================================
   10. FOOTER
   ========================================= */
footer { 
    background: #000; 
    padding: 60px 0 20px; 
    margin-top: 80px; 
    text-align: center; 
    border-top: 1px solid #222; 
    color: #ccc;
}

.footer-logo { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: var(--primary-color); }

.footer-socials { display: flex; justify-content: center; gap: 20px; margin: 30px 0; }
.footer-socials a { 
    width: 45px; height: 45px; border-radius: 50%; background: #1a1a1a; color: #fff; 
    display: flex; justify-content: center; align-items: center; transition: 0.3s;
}
.footer-socials a:hover { background: var(--primary-color); transform: translateY(-5px); }

.copyright { border-top: 1px solid #222; padding-top: 20px; color: #666; font-size: 0.9rem; }

/* =========================================
   11. RESPONSIVE DESIGN (MENU FIX)
   ========================================= */
@media (max-width: 992px) {
    
    .hero-container, .about-content, .contact-wrapper { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    
    .hero-img { order: -1; margin-bottom: 40px; }
    .about-main-img { margin: 0 auto; }
    .timeline { text-align: left; }
    
    /* Navbar Styles */
    header { top: 10px; padding: 0 10px; }
    
    .glass-nav { 
        width: 100%; 
        height: 70px; 
        padding: 0 20px;
        background: rgba(10, 10, 10, 0.95); 
        backdrop-filter: blur(20px);
        justify-content: space-between; 
        transition: background 0.3s ease;
    }

    /* --- මෙන්න විසඳුම: Light Mode එකේදී Navbar එක සුදු පාට කිරීම --- */
    body.light-theme .glass-nav {
        background: rgba(255, 255, 255, 0.95); /* සුදු පාට */
        border: 1px solid rgba(0, 0, 0, 0.1); /* සියුම් බෝඩර් එකක් */
    }

    /* Controls Wrapper */
    .nav-controls {
        display: flex !important;
        align-items: center;
        gap: 20px;
        position: relative;
        z-index: 1002;
    }

    /* HAMBURGER ICON STYLES */
    .hamburger { 
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px; 
        height: 20px; 
        cursor: pointer; 
        background: transparent;
        border: none;
    }
    
    /* Hamburger Lines (Default White) */
    .hamburger .line { 
        display: block !important;
        width: 100%; 
        height: 3px; 
        background-color: #ffffff !important; 
        border-radius: 5px;
        transition: all 0.3s ease;
    }

    /* Hamburger Lines (Light Mode - Black) */
    body.light-theme .hamburger .line {
        background-color: #000000 !important;
    }

    /* Active Animation */
    .hamburger.toggle .line:nth-child(1) { 
        transform: rotate(45deg) translate(5px, 6px); 
        background-color: var(--primary-color) !important;
    }
    .hamburger.toggle .line:nth-child(2) { 
        opacity: 0; 
    }
    .hamburger.toggle .line:nth-child(3) { 
        transform: rotate(-45deg) translate(5px, -6px); 
        background-color: var(--primary-color) !important;
    }

    /* DROPDOWN MENU */
    .nav-links {
        position: absolute;
        top: 80px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: 90%;
        background: rgba(20, 20, 20, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 30px;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.6);
        
        /* Hidden by Default */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .nav-links.active { 
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: translateX(-50%) translateY(0);
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 10px;
        color: #fff;
    }
    
    /* Light Mode Menu Colors */
    body.light-theme .nav-links {
        background: #ffffff;
        border: 1px solid #ddd;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    }
    body.light-theme .nav-links a { color: #333; }
}

@media (max-width: 600px) {
    .hero-text h1 { font-size: 2.5rem; }
    .img-border { width: 280px; height: 280px; }
    .btn-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
}

/* =========================================
   12. PROJECT MODAL STYLES (GLASS WHITE)
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.85); /* ඩාර්ක් මෝඩ් පසුබිම */
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Light Mode: පිටුපස පසුබිම ටිකක් එළිය කරන්න */
body.light-theme .modal {
    background-color: rgba(255, 255, 255, 0.4);
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    /* DARK MODE (DEFAULT) GLASS */
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.2);
    
    width: 90%;
    max-width: 700px;
    border-radius: 25px;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* --- LIGHT MODE GLASS FIX --- */
body.light-theme .modal-content {
    background: rgba(255, 255, 255, 0.9); /* සුදු වීදුරු පෙනුම */
    border: 1px solid rgba(0, 0, 0, 0.1); /* බෝඩර් එක අළු පාට */
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 35px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    line-height: 1;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Light Mode Close Button */
body.light-theme .close-modal {
    background: rgba(255, 255, 255, 0.8);
    color: #333; /* අයිකන් එක කළු පාට */
}

.close-modal:hover { 
    background: var(--primary-color);
    color: #fff;
    transform: rotate(90deg); 
}

/* Video Header */
.modal-header {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient Overlay on Video (Dark Mode) */
.header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(20, 20, 20, 0.9), transparent);
}

/* Gradient Overlay on Video (Light Mode) */
/* මේකෙන් තමයි වීඩියෝ එකේ යට කොටස සුදු පාටට Fade වෙන්නේ */
body.light-theme .header-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 1), transparent);
}

/* Body Content */
.modal-body { 
    padding: 30px; 
    text-align: center;
}

.modal-body h2 { 
    color: var(--heading-color); 
    font-size: 2.2rem; 
    margin-bottom: 15px; 
    font-weight: 700;
}

.divider {
    height: 3px;
    width: 60px;
    background: var(--gradient);
    margin: 0 auto 25px;
    border-radius: 2px;
}

.modal-description p {
    color: var(--text-color); /* Light mode එකේදි ඔටෝ කළු පාට වෙයි */
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer & Button */
.modal-footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

body.light-theme .modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
}

.large-btn {
    padding: 12px 40px;
    font-size: 1.1rem;
    width: auto;
    min-width: 200px;
    background: var(--gradient);
    border: none;
    color: #fff; /* Button text always white */
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
}

.large-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.6);
}

/* Scrollbar for Modal */
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.modal-content::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .modal-content { width: 95%; margin: 10px; }
    .modal-header { height: 200px; }
    .modal-body h2 { font-size: 1.8rem; }
    .modal-description p { text-align: left; }
}

/* --- SCROLL PROGRESS BAR --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient);
    z-index: 10000;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--primary-color);
}
/* --- TOAST NOTIFICATION --- */
#toast-box {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    z-index: 5000;
}

.toast {
    width: 350px;
    height: 80px;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
    font-weight: 500;
    margin: 15px 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    border-radius: 10px;
    position: relative;
    transform: translateX(100%);
    animation: moveleft 0.5s linear forwards;
}

@keyframes moveleft {
    100% { transform: translateX(0); }
}

.toast i {
    margin: 0 20px;
    font-size: 35px;
    color: #00ff88;
}

.toast.error i { color: #ff0033; }
.toast.invalid i { color: #ffcc00; }

.toast::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    background: #00ff88;
    animation: anim 5s linear forwards;
}

.toast.error::after { background: #ff0033; }
.toast.invalid::after { background: #ffcc00; }

@keyframes anim {
    100% { width: 0; }
}
/* --- PROFESSIONAL MOBILE TYPING FIX --- */
@media (max-width: 768px) {
    .hero-text h2 {
        /* උස ස්ථාවරව තැබීම */
        min-height: 5rem; 
        
        /* අකුරු මැදට ගැනීම සහ පේළි දෙකකට කැඩීම */
        display: flex;
        flex-direction: column; /* මෙය දැම්මම 'I am' උඩටත්, Type වෙන එක යටටත් එයි */
        justify-content: center;
        align-items: center;
        
        /* පේළි පරතරය */
        line-height: 0.5;
        gap: 3px; 
        
        margin-bottom: 40px;
    }

    /* "I am" කොටස */
    .static-txt {
        display: block;
        font-size: 1.2rem;
        color: var(--text-muted);
        font-weight: 500;
    }

    /* Type වෙන කොටස ලස්සනට පෙන්වීම */
    #typed-text {
        color: var(--primary-color); /* පාට වෙනස් කළා කැපී පෙනෙන්න */
        font-weight: 700;
        font-size: 1.5rem;
    }
    /* --- REMOVE TYPING CURSOR --- */
.typed-cursor {
    display: none !important;
}
}
/* =========================================
   COMING SOON MODAL STYLES
   ========================================= */

.coming-soon-content {
    max-width: 450px;
    text-align: center;
    padding: 40px 30px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.3);
}

.coming-soon-body h2 {
    font-size: 1.8rem;
    margin: 20px 0 10px;
    color: var(--heading-color);
}

.coming-soon-body p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Rocket Icon Animation */
.icon-glow {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    animation: rocketFloat 3s ease-in-out infinite;
    text-shadow: 0 0 20px var(--secondary-color);
}

@keyframes rocketFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Progress Bar Animation */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 50%;
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    position: absolute;
    left: -50%;
    animation: loading 2s infinite linear;
}

@keyframes loading {
    0% { left: -50%; }
    100% { left: 100%; }
}

/* Close Button Specific */
.close-coming-soon {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-color);
    font-size: 30px;
    cursor: pointer;
    transition: 0.3s;
}
.close-coming-soon:hover { color: var(--primary-color); }

/* --- CURSOR --- */
.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; }
.cursor-dot { width: 8px; height: 8px; background-color: var(--primary-color); }
.cursor-outline { width: 40px; height: 40px; border: 2px solid var(--primary-color); transition: width 0.2s, height 0.2s, background-color 0.2s; }
body.hovering .cursor-outline { width: 60px; height: 60px; background-color: rgba(138, 43, 226, 0.1); border-color: transparent; }
@media (max-width: 992px) { .cursor-dot, .cursor-outline { display: none; } }
/* --- CALENDLY BUTTON STYLE --- */
.calendly:hover {
    box-shadow: 0 10px 30px rgba(255, 165, 0, 0.2); /* Orange Shadow */
    border-color: #FFA500;
}

.calendly:hover .icon {
    background: #FFA500; /* Orange Background */
    box-shadow: 0 0 20px #FFA500;
    transform: scale(1.1) rotate(-10deg);
}

/* Light Mode Support */
body.light-theme .calendly:hover {
    border-color: #FFA500;
}
