/* Base & Variables */
:root {
    --bg-dark: #f8f9fa; /* Using light grey as background */
    --bg-glass: rgba(255, 255, 255, 0.85);
    --text-main: #333333;
    --text-muted: #666666;
    --accent-primary: #2e7d32; /* Professional green */
    --accent-secondary: #4caf50;
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

canvas#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Typography & Utilities */
h1, h2, h3, h4 {
    font-weight: 600;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

section {
    padding: 5rem 10%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.6);
}

.glass-panel, .glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 15px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 10%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.3s;
    color: var(--accent-primary);
    z-index: 1100;
}

.hamburger:hover {
    background: rgba(46, 125, 50, 0.1);
}

/* Hamburger icon rotation when open */
.hamburger.open i {
    transform: rotate(90deg);
}

.hamburger i {
    transition: transform 0.3s ease;
}

/* Mobile Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-switch button {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--text-main);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-switch button.active {
    background: var(--accent-primary);
    color: white;
}

/* Hero Section */
.hero {
    align-items: center;
    padding-top: 100px;
}

.hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 300px;
}

.hero-img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.name {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.roles {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 300;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.social-links a {
    color: var(--text-main);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* About Section */
.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 3rem;
    align-items: flex-start;
}

.about-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 250px;
}

.about-img {
    width: 100%;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

.about-content-wrapper {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.education-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--accent-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-secondary);
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.timeline-content .date {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    padding: 2rem;
    transition: transform 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-secondary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    background: rgba(46, 125, 50, 0.1);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(46, 125, 50, 0.3);
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 2rem;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-info h3 {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.project-info .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.project-details {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-muted);
}

.project-details li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Certifications Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

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

.cert-icon {
    font-size: 2.5rem;
    color: var(--accent-secondary);
}

.cert-card h3 {
    font-size: 1.1rem;
    line-height: 1.3;
}

.cert-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    padding: 4rem 10% 2rem;
    text-align: center;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.footer-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-socials {
    justify-content: center;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
    transition: transform 0.3s;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    opacity: 0;
}

.chatbot-window.open {
    transform: scale(1);
    opacity: 1;
}

.chatbot-header {
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

#chatbot-close {
    cursor: pointer;
    transition: color 0.3s;
}

#chatbot-close:hover {
    color: var(--accent-primary);
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-message {
    background: rgba(46, 125, 50, 0.2);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-message {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chatbot-input-container {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.1);
}

#chatbot-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 15px;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
}

#chatbot-input::placeholder {
    color: var(--text-muted);
}

#chatbot-send {
    background: var(--accent-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#chatbot-send:hover {
    background: var(--accent-secondary);
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-links {
        /* Hidden by default on mobile — toggled via JS */
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: auto;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 6rem 2rem 2rem;
        gap: 0;
        z-index: 1050;
        transform: translateY(-150%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-links li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 1rem 0.5rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-main);
        transition: color 0.2s, padding-left 0.2s;
    }

    .nav-links a:hover {
        color: var(--accent-primary);
        padding-left: 1rem;
    }

    .nav-overlay {
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .name {
        font-size: 2.5rem;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .chatbot-window {
        width: 300px;
    }

    /* Push lang-switch before hamburger on mobile */
    .navbar {
        padding: 1rem 5%;
    }
}

/* Music Player */
.music-player-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.music-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.7);
}

.music-btn #music-icon {
    position: absolute;
    transition: opacity 0.3s;
}

/* Ripple pulse when playing */
.music-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transform: scale(0);
    opacity: 0;
}

.music-btn.playing .music-ripple {
    animation: ripplePulse 1.5s infinite;
}

@keyframes ripplePulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Animated sound bars */
.music-bars {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}

.music-bars span {
    display: block;
    width: 4px;
    background: white;
    border-radius: 2px;
    animation: none;
}

.music-btn.playing #music-icon {
    opacity: 0;
}

.music-btn.playing .music-bars {
    display: flex;
}

.music-btn.playing .music-bars span:nth-child(1) { animation: bar 0.8s ease infinite alternate; }
.music-btn.playing .music-bars span:nth-child(2) { animation: bar 0.6s ease infinite alternate 0.15s; }
.music-btn.playing .music-bars span:nth-child(3) { animation: bar 1s ease infinite alternate 0.3s; }
.music-btn.playing .music-bars span:nth-child(4) { animation: bar 0.7s ease infinite alternate 0.45s; }

@keyframes bar {
    0% { height: 4px; }
    100% { height: 22px; }
}

.music-label {
    font-size: 0.72rem;
    background: rgba(26, 35, 126, 0.85);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.music-player-container:hover .music-label {
    opacity: 1;
    transform: translateY(0);
}
