@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;500;700;800&display=swap');

:root {
    /* Dark Mode Variables (Default) */
    --bg-body: #050505;
    --bg-card: rgba(30, 30, 30, 0.5); /* Glass-like cards */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --primary: #3b82f6; /* Blue Accent */
    --accent: #8b5cf6; /* Purple Accent */
    --border: rgba(255, 255, 255, 0.08);
    --glow: rgba(59, 130, 246, 0.5); /* Glowing for AI theme */
}

[data-theme="light"] {
    /* Light Mode Variables */
    --bg-body: #f3f4f6;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #111827;
    --text-muted: #4b5563;
    --primary: #2563eb;
    --accent: #7c3aed;
    --border: rgba(0, 0, 0, 0.1);
    --glow: rgba(37, 99, 235, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; transition: background-color 0.3s, color 0.3s; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* subtle background pattern for depth */
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 50%);
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.theme-toggle:hover { transform: rotate(15deg) scale(1.1); }

/* --- Header & Animation --- */
.hero-header {
    text-align: center;
    padding: 100px 20px 40px;
    opacity: 0;
    animation: fadeInSlideDown 1s ease-out forwards; /* subtle fade-in and slide-down */
}

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

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.brand-logo {
    width: 170px; /* logo size updated */
    height: 170px;
    border-radius: 50%;
    border: 4px solid var(--border);
    object-fit: cover;
    /* glowing blue circle for AI */
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.15); 
    transition: box-shadow 0.3s;
}

.brand-logo:hover {
    box-shadow: 0 0 70px rgba(59, 130, 246, 0.3);
}

.brand-name {
    font-size: 3.8rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #60a5fa 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Grid & Projects --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex-grow: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
}

/* --- Card & Animation --- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(15px); /* strong glass effect */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInSlideUp 0.6s ease-out forwards;
}

@keyframes fadeInSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.project-name {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.repo-stats {
    background: rgba(128, 128, 128, 0.08);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
}

.description {
    color: #b1b1b1;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
}

.card-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: white;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.card-action-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* --- Footer & "Pro" styles --- */
footer {
    text-align: center;
    padding: 70px 20px;
    border-top: 1px solid var(--border);
    margin-top: 50px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.contact-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.contact-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 800; /* bolder text weight */
    margin-bottom: 12px;
}

.footer-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.github-btn {
    background-color: #24292e;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.github-btn:hover {
    background-color: #ffffff;
    color: #24292e;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.1);
}

/* updated email button with ghost style */
.email-btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    padding: 14px 28px;
    border-radius: 50px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.email-btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

.copyright {
    margin-top: 35px;
    font-size: 0.82rem;
    color: #444;
}

.loading, .empty-state {
    text-align: center;
    grid-column: 1 / -1;
    padding: 60px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .brand-name { font-size: 2.8rem; }
    .brand-logo { width: 130px; height: 130px; }
    .grid { grid-template-columns: 1fr; }
}

/* Members Floating Button */
.member-toggle {
    position: fixed;
    top: 80px; /* Theme toggle එකට යටින් තියෙන්න */
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color, #ffffff);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.member-toggle:hover {
    background: #007bff; /* කැමති පාටක් දෙන්න - Syntiox blue එක වගේ */
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.member-toggle i {
    font-size: 1.2rem;
}

/* Mobile වලදී පොඩ්ඩක් වෙනස් කරන්න ඕනේ නම් */
@media (max-width: 768px) {
    .member-toggle {
        top: auto;
        bottom: 20px; /* Mobile වලදී පහළට දැම්මා ලේසි වෙන්න */
        right: 20px;
    }
}
