/* Base Styles */
:root {
    --primary-green: #4CAF50;
    --secondary-green: #45a049;
    --accent-green: #81c784;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-green);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 6rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-green) 0%, transparent 70%);
    opacity: 0.1;
    z-index: -1;
}

.hero-content {
    text-align: center;
}

.profile-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-green);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero .title {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.hero .tagline {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--primary-green);
    transform: translateY(-2px);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background: var(--darker-bg);
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-preview {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-preview img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.project-overlay .tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary-green);
}

.view-project {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-project:hover {
    background: var(--secondary-green);
    transform: scale(1.05);
}

/* Modal Styles */
.project-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--darker-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.project-modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.project-content {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.project-content .project-images {
    width: 100%;
    margin-bottom: 0;
}

.project-content .project-images > img {
    width: 100%;
    height: auto;
    display: block;
}

.project-gallery {
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.project-content .project-info {
    padding: 2rem;
}

.project-content .project-info h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-green);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.project-content .tech-stack {
    margin-bottom: 2rem;
}

.project-content .tech-stack span {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.project-links {
    display: flex;
    gap: 1.5rem;
}

.project-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.project-btn:hover {
    background: var(--primary-green);
    transform: translateY(-5px);
}

.project-btn:hover .tooltip {
    opacity: 1;
    transform: translateY(-5px);
}

.project-btn .tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--darker-bg);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.project-btn .tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--darker-bg);
}

/* Responsive Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.project-gallery img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .modal-content {
        margin: 1rem;
    }

    .project-content {
        padding: 1rem;
    }

    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--dark-bg);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.about-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.about-text h3 {
    color: var(--primary-green);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.skill-category li::before {
    content: '•';
    color: var(--primary-green);
    position: absolute;
    left: 0;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

@keyframes wiggle {
    0% { transform: rotate(0deg) scale(1); }
    20% { transform: rotate(-20deg) scale(1.1); }
    40% { transform: rotate(20deg) scale(1.1); }
    60% { transform: rotate(-15deg) scale(1.1); }
    80% { transform: rotate(15deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes slideIn {
    0% { 
        transform: translateX(120px) scale(0.5);
        opacity: 0;
    }
    100% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOut {
    0% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translateX(120px) scale(0.5);
        opacity: 0;
    }
}

.chat-notification {
    position: fixed;
    bottom: 2rem;
    right: 6.5rem;  /* Position it to the left of the icon (2rem + 60px + 0.5rem gap) */
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.8rem 1.5rem;
    color: var(--text-primary);
    display: none;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 998;
    pointer-events: none;
    will-change: transform, opacity;
    transform-origin: right center;
}

.chat-notification.show {
    display: flex;
    animation: slideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.chat-notification.hide {
    display: flex;
    animation: slideOut 0.5s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.chat-notification i {
    color: var(--primary-green);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-green);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.chat-toggle.wiggle {
    animation: wiggle 1.2s ease;
}

.chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-toggle.active {
    transform: scale(0);
    opacity: 0;
}

.chat-popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 350px;
    background: var(--dark-bg);
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0);
    opacity: 0;
    transform-origin: bottom right;
    transition: all 0.3s ease;
}

.chat-popup.active {
    transform: scale(1);
    opacity: 1;
}

.chat-header {
    background: var(--primary-green);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.close-chat:hover {
    transform: rotate(90deg);
}

.chat-body {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.chat-form .form-group {
    margin-bottom: 1rem;
}

.chat-form .form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.chat-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.chat-form input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.chat-form input::placeholder {
    color: var(--text-secondary);
}

.chat-form .error-input {
    border-color: #ff4444;
    animation: shake 0.5s linear;
}

.chat-form .error-message {
    position: absolute;
    bottom: -20px;
    left: 0;
    color: #ff4444;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.chat-form .error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.chat-form .form-group.error .error-message {
    opacity: 1;
    transform: translateY(0);
}

.chat-form .form-group.error input {
    border-color: #ff4444;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.1);
}



.chat-form .form-group.success input {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.chat-form .form-group i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.chat-form .form-group.error i.fa-exclamation-circle {
    opacity: 1;
    color: #ff4444;
}

.chat-form .form-group.success i.fa-check-circle {
    opacity: 1;
    color: var(--primary-green);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.editor-container {
    position: relative;
    width: 100%;
}

.chat-form textarea {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    padding: 0.8rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    overflow-y: auto;
    resize: none;
    cursor: text;
}

.chat-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.chat-form textarea::placeholder {
    color: var(--text-secondary);
}

.chat-form .form-group.error textarea {
    border-color: #ff4444;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.1);
}

.chat-form .form-group.success textarea {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}



.message-group {
    margin-bottom: 0;
}

.chat-footer {
    padding: 1rem;
    background: var(--card-bg);
    border-top: 1px solid var(--glass-border);
}

.send-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: var(--primary-green);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.send-btn:not(:disabled):hover {
    background: var(--secondary-green);
}

.send-btn i {
    transition: all 0.3s ease;
}

.send-btn:not(:disabled):hover i {
    transform: translateX(3px);
}

/* Button States */
.send-btn.sending {
    background: var(--secondary-green);
    cursor: wait;
}

.send-btn.success {
    background: #4CAF50;
    animation: successPulse 0.5s ease;
}

.send-btn.error {
    background: #f44336;
    animation: errorShake 0.5s ease;
}

/* Animations */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Disabled state */
.send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Message Status Styles */
.message-status {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease;
}

.message-status.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.message-status.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Disabled button state */
.send-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-item {
        flex-direction: column !important;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .contact-form {
        padding: 1.5rem;
    }
}
