/* ========== NEW FEATURES ========== */

/* Dark Mode */
html.dark-mode {
    --color-dark: #ffffff;
    --color-dark-secondary: #e0e0e0;
    --color-gray-light: #1a1a1a;
    --color-gray-medium: #333333;
    --color-gray-dark: #b0b0b0;
    --color-white: #0a0a0a;
    background-color: #0a0a0a;
    color: #ffffff;
}

html.dark-mode body {
    background-color: #0a0a0a;
    color: #ffffff;
}

html.dark-mode .navbar {
    background: rgba(26, 26, 26, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .logo,
html.dark-mode .nav-link,
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode .section-title {
    color: #ffffff;
}

html.dark-mode p,
html.dark-mode .project-description,
html.dark-mode .about-text {
    color: #b0b0b0;
}

html.dark-mode .project-card,
html.dark-mode .skill-item,
html.dark-mode .step,
html.dark-mode .testimonial-card {
    background-color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .about-section,
html.dark-mode .newsletter-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

html.dark-mode .form-group input,
html.dark-mode .form-group textarea {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.dark-mode-toggle:hover {
    transform: scale(1.2) rotate(20deg);
}

html.dark-mode .dark-mode-toggle {
    filter: brightness(1.2);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a90e2 0%, #ec4899 100%);
    width: 0%;
    transition: width 0.1s ease;
    z-index: 100;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: -50px;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a90e2 0%, #3a7bc8 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    bottom: 2rem;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

html.dark-mode .back-to-top {
    background: linear-gradient(135deg, #5a9fef 0%, #4a90e2 100%);
}

/* Testimonials Section */
.testimonials-section {
    padding: clamp(2rem, 8vw, 4rem) 2rem;
    background: linear-gradient(135deg, rgba(245, 247, 250, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(74, 144, 226, 0.3);
}

.stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 1rem;
    font-style: italic;
    color: #666666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    font-weight: 600;
    color: #0a0a0a;
    font-size: 0.95rem;
    margin: 0;
}

/* Newsletter Section */
.newsletter-section {
    padding: clamp(3rem, 8vw, 5rem) 2rem;
    background: linear-gradient(135deg, #4a90e2 0%, #3a7bc8 100%);
    text-align: center;
    color: white;
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-section h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: white;
    margin-bottom: 1.5rem;
}

.newsletter-section > p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.newsletter-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.newsletter-form input {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.newsletter-form input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.newsletter-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .newsletter-form {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .back-to-top.show {
        bottom: 1.5rem;
    }
}

/* ========== SCROLL & ANIMATION ENHANCEMENTS ========== */

/* Smooth scroll animations for elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to elements */
.section-title {
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-card:nth-child(2) {
    animation-delay: 0.1s;
}

.project-card:nth-child(3) {
    animation-delay: 0.2s;
}

.project-card:nth-child(4) {
    animation-delay: 0.3s;
}

.testimonial-card {
    animation: scaleIn 0.6s ease-out forwards;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.2s;
}

.stat {
    animation: fadeInUp 0.6s ease-out forwards;
}

.stat:nth-child(2) {
    animation-delay: 0.1s;
}

.stat:nth-child(3) {
    animation-delay: 0.2s;
}

.stat:nth-child(4) {
    animation-delay: 0.3s;
}

/* Enhanced hover effects */
.project-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.testimonial-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.2);
}

.stat {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stat:hover {
    transform: scale(1.05);
}

/* Enhanced button styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

/* Navigation social links */
.nav-social-links {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.nav-social-link {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-dark);
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--color-gray-medium);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-social-link:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

html.dark-mode .nav-social-link {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

html.dark-mode .nav-social-link:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Responsive adjustments for social links */
@media (max-width: 768px) {
    .nav-social-links {
        gap: 0.5rem;
        margin-left: 0.5rem;
    }

    .nav-social-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
}
