/* Complete Enhanced Portfolio CSS */

/* Base Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #f8f9fa;
    --border-color: #eaeaea;
    --header-color: #222;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --text-light: #666;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.15);
    --section-padding: 80px 0;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.dark-theme {
    --primary-color: #61dafb;
    --secondary-color: #4ecca3;
    --text-color: #f0f0f0;
    --text-light: #b0b0b0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --header-color: #fff;
    --accent-color: #ff6b6b;
    --success-color: #51cf66;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: var(--section-padding);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--header-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: var(--transition);
}

.loader:after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content.loaded {
    opacity: 1;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-icon {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.nav-icon:hover {
    background-color: var(--card-bg);
    transform: translateY(-2px);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: var(--shadow);
}

.nav-mobile a {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-mobile a:last-child {
    border-bottom: none;
}

/* Hero Section Enhanced */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.hero-badge {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-effect {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--header-color);
    margin-bottom: 1.5rem;
    min-height: 40px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: white;
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Live Applications Section */
#live-apps {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    padding: var(--section-padding);
}

.section-heading {
    text-align: center;
    position: relative;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.section-heading:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: -1rem;
    margin-bottom: 3rem;
}

.live-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.live-app-card {
    background: var(--bg-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.live-app-card.featured {
    background: linear-gradient(135deg, var(--bg-color), rgba(52, 152, 219, 0.05));
}

.live-app-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.app-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    padding-left: 20px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.status-badge.live {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.status-badge.live::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse-live 2s ease-in-out infinite;
}

.status-badge.beta {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.users-count {
    color: var(--text-light);
    font-size: 0.85rem;
}

.app-screenshot {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.live-app-card:hover .app-overlay {
    opacity: 1;
}

.live-app-card:hover .app-screenshot img {
    transform: scale(1.1);
}

.app-content {
    padding: 1.5rem;
}

.app-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--header-color);
}

.app-tagline {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.app-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.feature-item svg {
    color: var(--success-color);
}

.app-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.app-links {
    display: flex;
    gap: 1rem;
}

.app-link {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
    flex: 1;
}

.app-link.primary {
    background: var(--gradient);
    color: white;
}

.app-link:not(.primary) {
    border: 2px solid var(--border-color);
    color: var(--text-color);
}

.app-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Projects Section */
#projects {
    background-color: var(--bg-color);
}

.projects-slider-container {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.projects-slider {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.project-card {
    position: relative;
    flex: 0 0 calc(33.333% - 20px);
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    min-width: 300px;
}

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

.project-impact {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-content {
    padding: 20px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.project-content p strong {
    color: var(--header-color);
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.tag {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.slider-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    font-weight: bold;
}

.slider-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

/* Skills Section */
#skills {
    background-color: var(--card-bg);
}

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

.skill-category {
    margin-bottom: 30px;
}

.skill-category h3 {
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.skill-category h3:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    width: 100%;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
}

.skill-demo {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 400;
}

.skill-demo:hover {
    text-decoration: underline;
}

.skill-bar {
    height: 10px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 5px;
    width: 0;
    transition: width 1s ease;
}

/* About Section */
#about {
    background-color: var(--bg-color);
}

.about {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.about-img {
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.availability-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    color: var(--success-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

.about-content h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.about-content p {
    margin-bottom: 15px;
}

.about-highlights {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.highlight-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.highlight-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.cta-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Contact Section */
#contact {
    background-color: var(--card-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.availability-info {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.availability-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

.availability-item svg {
    color: var(--success-color);
}

.contact-details {
    margin: 30px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.contact-item svg {
    color: var(--primary-color);
}

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

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-color);
    border-radius: 25px;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.contact-form {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer .social-links {
    justify-content: center;
    margin-bottom: 20px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: none;
    z-index: 99;
    box-shadow: var(--shadow);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Media Queries */
@media screen and (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .live-apps-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about {
        grid-template-columns: 1fr;
    }
    
    .about-img {
        margin-bottom: 30px;
    }
    
    .project-card {
        flex: 0 0 calc(50% - 20px);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .cta-group {
        flex-direction: column;
    }
    
    .app-links {
        flex-direction: column;
    }
    
    .project-card {
        flex: 0 0 calc(100% - 20px);
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 576px) {
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-heading {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
}