/* ========== 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;
    }

    .contact-form {
        padding: 1.5rem 1rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 1rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .testimonial-card {
        padding: 1.5rem 1rem;
    }

    .testimonial-text {
        font-size: 0.95rem;
    }

    .newsletter-container {
        padding: 0 0.5rem;
    }

    .newsletter-section h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .newsletter-section > p {
        font-size: 0.9rem;
    }
}

/* ========== 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;
    }
}

/* ========== RESUME SECTION ========== */

.resume-section {
    padding: clamp(2rem, 8vw, 4rem) 2rem;
    background: linear-gradient(135deg, rgba(245, 247, 250, 0.5) 0%, rgba(255, 255, 255, 0.3) 100%);
}

.resume-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.resume-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resume-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.3);
}

.resume-btn:active {
    transform: translateY(-1px);
}

html.dark-mode .resume-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.5) 0%, rgba(15, 15, 15, 0.3) 100%);
}

@media (max-width: 768px) {
    .resume-btn {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ========== PROJECT FILTERS ========== */

.filter-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 3rem 0;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-gray-light);
    background: transparent;
    color: var(--color-dark);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    z-index: -1;
    transition: left 0.3s ease;
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-white);
}

.filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

html.dark-mode .filter-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

html.dark-mode .filter-btn::before {
    background: var(--color-accent);
}

html.dark-mode .filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

/* ========== TOOLS & TECHNOLOGIES ========== */

.tools-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-gray-light);
}

.tools-title {
    margin-bottom: 2rem;
    color: var(--color-dark);
    font-size: 1.5rem;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.tool-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    background: rgba(74, 144, 226, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-item:hover {
    background: rgba(74, 144, 226, 0.15);
    transform: translateY(-5px);
}

.tool-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tool-item h4 {
    margin-bottom: 0.5rem;
    color: var(--color-dark);
    font-size: 1rem;
}

.tool-item p {
    color: var(--color-gray-dark);
    font-size: 0.85rem;
}

html.dark-mode .tools-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .tool-item {
    background: rgba(74, 144, 226, 0.1);
}

html.dark-mode .tool-item:hover {
    background: rgba(74, 144, 226, 0.2);
}

/* ========== ENHANCED TESTIMONIALS ========== */

.testimonial-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.3rem;
}

.testimonial-company {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
}

html.dark-mode .testimonial-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .testimonial-author {
    color: #ffffff;
}

/* ========== EXPERIENCE TIMELINE ========== */

.experience-timeline {
    padding: 3rem 1rem;
    background: rgba(74, 144, 226, 0.02);
    border-radius: 15px;
    margin-top: 4rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
}

.timeline-item {
    margin-bottom: 3rem;
    display: flex;
    gap: 2rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border: 4px solid var(--color-white);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 2rem;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 8px rgba(74, 144, 226, 0.15);
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
    transform: translateY(-5px);
}

.timeline-content h3 {
    color: var(--color-dark);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.timeline-company {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--color-gray-dark);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--color-gray-dark);
    line-height: 1.6;
    font-size: 0.95rem;
}

html.dark-mode .timeline::before {
    background: linear-gradient(to bottom, var(--color-accent), transparent);
}

html.dark-mode .timeline-dot {
    border-color: #0a0a0a;
}

html.dark-mode .timeline-content {
    background: #1a1a1a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

html.dark-mode .timeline-content:hover {
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

/* ========== METRICS GRID ========== */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.metric {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(74, 144, 226, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    transition: all 0.3s ease;
}

.metric:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15) 0%, rgba(74, 144, 226, 0.1) 100%);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.2);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.metric-description {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    line-height: 1.5;
}

html.dark-mode .metric {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15) 0%, rgba(74, 144, 226, 0.08) 100%);
    border-color: rgba(74, 144, 226, 0.3);
}

html.dark-mode .metric:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(74, 144, 226, 0.15) 100%);
}

html.dark-mode .metric-label {
    color: #ffffff;
}

/* ========== CTA BANNER ========== */

.cta-banner {
    margin-top: 2rem;
    padding: 3rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, #357abd 100%);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.cta-banner h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-banner .btn {
    background: white;
    color: var(--color-accent);
}

.cta-banner .btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

html.dark-mode .cta-banner {
    background: linear-gradient(135deg, var(--color-accent) 0%, #357abd 100%);
}

/* ========== RELATED PROJECTS ========== */

.related-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 0 1rem;
}

.related-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card a {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 2rem;
    background: rgba(74, 144, 226, 0.08);
    border: 2px solid rgba(74, 144, 226, 0.2);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-card:hover a {
    background: rgba(74, 144, 226, 0.15);
    border-color: var(--color-accent);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.2);
}

.related-card h3 {
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.related-card p {
    color: var(--color-accent);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.arrow {
    color: var(--color-accent);
    font-weight: bold;
    font-size: 1.2rem;
}

.back-to-work {
    text-align: center;
    margin-top: 2rem;
}

.back-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--color-dark);
}

html.dark-mode .related-card a {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
}

html.dark-mode .related-card:hover a {
    background: rgba(74, 144, 226, 0.2);
    border-color: var(--color-accent);
}

html.dark-mode .related-card h3 {
    color: #ffffff;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */

@media (max-width: 1024px) {
    .timeline-item {
        flex-direction: column !important;
        position: relative;
    }
    
    .timeline::before {
        left: 0;
        width: 2px;
    }
    
    .timeline-dot {
        left: 0;
        top: 0;
        position: absolute;
    }
    
    .timeline-content {
        width: 100%;
        padding-left: 3rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-banner {
        padding: 2rem;
    }
    
    .related-projects {
        grid-template-columns: 1fr;
    }
    
    .experience-timeline {
        padding: 2rem 1rem;
    }
}

