/* --- General Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0f172a;
    color: #f8fafc;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Modern Floating Navbar --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 8%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 20px;
    left: 5%;
    right: 5%;
    width: 90%;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: all 0.4s ease;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #38bdf8;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #38bdf8;
}

nav ul li a:hover {
    color: #fff;
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-icon {
    display: none;
    font-size: 1.8rem;
    color: #38bdf8;
    cursor: pointer;
}



@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.highlight { color: #38bdf8; }

/* --- Sections General Styling --- */
section {
    padding: 100px 10%;
    text-align: center;
}

h2 {
    margin-bottom: 50px;
    font-size: 2.5rem;
}

/* --- Skills Grid --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    transition: 0.3s;
    text-align: left;
    backdrop-filter: blur(10px);
}

.skill-category:hover {
    border-color: #38bdf8;
    transform: translateY(-5px);
    background: rgba(56, 189, 248, 0.05);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: 0.3s;
}

.skill-item:hover {
    background: #38bdf8;
    color: #0f172a;
}

/* --- Project Cards (Glassmorphism) --- */
.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.4s ease;
    backdrop-filter: blur(10px);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: #38bdf8;
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.15);
}

.card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    opacity: 0.8;
    transition: 0.4s;
}

.glass-card:hover .card-image img {
    transform: scale(1.1);
    opacity: 1;
}




/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    nav {
        padding: 10px 25px;
        width: 94%;
        left: 3%;
    }

    nav ul {
        display: none; /* Mobile menu handles this */
    }

    .menu-icon {
        display: block;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-image img {
        width: 220px;
        height: 220px;
    }

    .contact-box-container {
        flex-direction: column;
    }
    
    .section-padding {
        padding: 60px 5%;
    }
}/* =========================================
   1. General Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #0f172a;
    color: #f8fafc;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

section {
    padding: 100px 10%;
    text-align: center;
}

/* =========================================
   2. Modern Floating Navigation
   ========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 8%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 20px;
    left: 5%;
    right: 5%;
    width: 90%;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: all 0.4s ease;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #fff;
}

/* Underline Animation */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #38bdf8;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #38bdf8;
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-icon {
    display: none;
    font-size: 1.8rem;
    color: #38bdf8;
    cursor: pointer;
    z-index: 2001;
}

/* =========================================
   3. Hero Section
   ========================================= */
/* බොත්තම් දෙක පිහිටන ආකාරය */
/* Hero Buttons Container - මැදට ගැනීමට */
.hero-btns {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center; /* මෙයයි වැදගත්ම කොටස */
    align-items: center;
}

/* බොත්තම් වලට අමතර අලංකරණයක් (කැමති නම්) */
.contact-card-btn, .btn-outline {
    border: 2px solid #38bdf8;
    color: #38bdf8;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}



/* View Work (Outline) බොත්තම */
.btn-outline {
    border: 2px solid #38bdf8;
    color: #38bdf8;
   border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-card-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.4);
    filter: brightness(1.1);
}

.btn-outline:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-5px);
}

/* Mobile වලදී බොත්තම් මැදට ගැනීමට */
@media (max-width: 768px) {
    .hero-btns {
        justify-content: center;
        flex-wrap: wrap;
    }
}
.hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #38bdf8;
    color: #000000;
    text-decoration: none;
    border-radius: 5px;
    transition: 0.3s;
    font-weight: 500;
}

.btn:hover {
    background: #0ea5e9;
    transform: translateY(-3px);
}

/* =========================================
   4. Skills Section
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    text-align: left;
    backdrop-filter: blur(10px);
}

.skill-category:hover {
    border-color: #38bdf8;
    transform: translateY(-5px);
    background: rgba(56, 189, 248, 0.05);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.category-header i {
    font-size: 1.8rem;
    color: #38bdf8;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: 0.3s;
}

.skill-item:hover {
    background: #38bdf8;
    color: #0f172a;
}

/* =========================================
   5. Project Section (Glass Cards)
   ========================================= */
/* 1. Project Container - පේළියකට 2ක් එන ලෙස සකසා ඇත */
.project-container {
    display: grid;
    /* 45% ක් අවම පළල දීමෙන් පේළියකට 2ක් ලැබෙන බව තහවුරු කරයි */
    grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr));
    gap: 30px;
    margin-top: 40px;
    width: 100%;
}

/* 2. Glass Card - වීදුරු ගතිය (Glass Effect) සමඟ */
.glass-card {
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Hover Effect */
.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(56, 189, 248, 0.5); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 3. Card Image - උස 180px ලෙස පවත්වාගෙන ඇත */
.card-image {
    width: 100%;
    height: 180px; 
    background: #1e293b;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: 0.5s ease;
}

.glass-card:hover .card-image img {
    transform: scale(1.1);
    opacity: 1;
}

/* 4. Card Content */
.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* 5. Tech Stack & Links */
.tech-stack {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tech-stack span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-radius: 5px;
}

.card-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Mobile Devices - ෆෝන් එකේදී ලස්සනට එක යට එක වැටීමට */
@media (max-width: 950px) {
    .project-container {
        grid-template-columns: 1fr;
    }
}
/* Base Style for All Buttons */
.link-btn {
    flex: 1;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* GitHub Button - Dark Glass Style */
.link-btn.github {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.link-btn.github:hover {
    background: #ffffff;
    color: #0f172a;
    transform: translateY(-3px);
}

/* Live Demo & View Button - Blue Glow Style */
.link-btn.demo {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

.link-btn.demo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
    filter: brightness(1.1);
}

/* Button Icon Animation */
.link-btn i {
    transition: transform 0.3s ease;
}

.link-btn:hover i {
    transform: scale(1.2) rotate(-5deg);
}

/* Ripple effect animation (Optional) */
.link-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.link-btn:hover::after {
    left: 100%;
}

/* =========================================
   6. Contact Section
   ========================================= */
.contact-box-container {
    display: flex;
    max-width: 1050px;
    margin: 40px auto 0;
    background: #1e293b;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.contact-left {
    flex: 1;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 15px;
    transition: 0.3s;
}

.info-item:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateX(10px);
}

.modern-form {
    flex: 1.4;
    padding: 50px;
    background: #111827;
}

.modern-form input, 
.modern-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    color: #fff;
    margin-bottom: 20px;
    transition: 0.3s;
}

.modern-form input:focus, 
.modern-form textarea:focus {
    border-color: #38bdf8;
    outline: none;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    color: #0f172a;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.4s;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4);
}

/* =========================================
   7. Footer
   ========================================= */
footer {
    padding: 30px;
    text-align: center;
    background: #020617;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* =========================================
   8. Responsive Design (Mobile)
   ========================================= */
@media (max-width: 768px) {
    nav {
        top: 10px;
        padding: 10px 25px;
    }

    .menu-icon {
        display: block;
    }

    nav ul {
        display: none; 
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        justify-content: center;
        align-items: center;
        gap: 30px;
    }

    nav ul.active {
        display: flex;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        text-align: center;
    }

    .contact-box-container {
        flex-direction: column;
    }

    .hero-image img {
        width: 220px;
        height: 220px;
    }
}
/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .contact-box-container {
        flex-direction: column; 
        margin: 20px 15px;      
        border-radius: 16px;
    }

    .contact-left, 
    .modern-form {
        flex: none;
        width: 100%;          
        padding: 30px 20px;    
    }

    .info-item:hover {
        transform: none;       
    }

    .contact-left {
        text-align: center;   
    }

    .info-item {
        justify-content: center;
    }
}
/* Container settings */
.contact-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Base button style */
.btn-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white;
}

/* LinkedIn specific color */
.linkedin {
    background-color: #0077b5;
}

/* GitHub specific color */
.github {
    background-color: #333;
}


/* Icon size */
.btn-icon i {
    font-size: 1.5rem;
}

/* Hover effects */
.btn-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* Active effect when clicking */
.btn-icon:active {
    transform: translateY(0);
}

#bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* අන්තර්ගතයට යටින් තැබීමට */
    background: #0f172a; /* ඔබේ දැනට තියෙන background color එක */
    pointer-events: none;
}

body {
    cursor: none; /* සාමාන්‍ය මවුස් එක ඉවත් කරයි */
}

/* මැද කුඩා තිත */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #38bdf8;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

/* වටේ තියෙන විශාල රවුම */
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s ease-out; /* රවුම මවුස් එක පස්සෙන් එන smooth ගතිය */
}
body {
    cursor: none;
}



/* WhatsApp Button Style */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
     transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* මවුස් එක Hover වන විට රවුම ලොකු වෙන්න */
.cursor-hover {
    width: 70px;
    height: 70px;
    background-color: rgba(56, 189, 248, 0.1);
    border-color: #38bdf8;
}


#backToTop {
    display: none; 
    position: fixed;
    bottom: 30px; 
    right: 30px;
    width: 50px;
    height: 50px;
    
    /* 1. සම්පූර්ණ රවුමක් කිරීම */
    border-radius: 50%; 
    
    /* 2. Transparent Background (වීදුරුවක් වැනි පෙනුම) */
    background: rgba(255, 255, 255, 0.1); /* ඉතා අඩු සුදු පැහැයක් */
    backdrop-filter: blur(10px); /* පිටුපස ඇති දේවල් බොඳ කර පෙන්වීමට */
    
    /* 3. Border එකක් එක් කිරීම (බොත්තම පෙනෙන්නට) */
    border: 2px solid rgba(56, 189, 248, 0.5); 
    
    color: #38bdf8; /* අයිකනයේ වර්ණය Sky Blue */
    z-index: 999;
    cursor: pointer;
    
    /* අයිකනය මැදට ගැනීමට */
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Hover කළ විට පෙනුම */
#backToTop:hover {
    background: rgba(56, 189, 248, 0.2); /* මඳක් නිල් පාට විනිවිද පෙනෙන ස්වභාවය */
    border-color: #38bdf8;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
    color: #ffffff; /* Hover කළ විට ඊතලය සුදු වේ */
}

