/* Global Styles */
:root {
    /* Light Theme Variables (default) */
    --primary-gradient: linear-gradient(135deg, #6A3093, #E94057);
    --primary-dark: #4A1D6A;
    --primary-light: #E94057;
    --accent: #FFD166;
    --text-dark: #2D2A32;
    --text-medium: #5F5F5F;
    --text-light: #F8F8F8;
    --bg-light: #FCFCFC;
    --bg-medium: #F0F0F0;
    --card-bg: white;
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-border: rgba(0, 0, 0, 0.06);
    --footer-bg: #2D2A32;
    --box-shadow: rgba(0, 0, 0, 0.1);
    --input-border: #e0e0e0;

    /* Transition for theme switching */
    --theme-transition: all 0.4s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-dark: #a980ce;
    --primary-light: #ff7b8a;
    --accent: #FFD166;
    --text-dark: #F8F8F8;
    --text-medium: #CCCCCC;
    --text-light: #F8F8F8;
    --bg-light: #1A1A1A;
    --bg-medium: #2D2A32;
    --card-bg: #333333;
    --header-bg: rgba(40, 40, 40, 0.95);
    --header-border: rgba(255, 255, 255, 0.1);
    --footer-bg: #111111;
    --box-shadow: rgba(0, 0, 0, 0.3);
    --input-border: #555555;
}

/* Scroll Progress Bar */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--primary-gradient);
    z-index: 1001;
    transition: width 0.1s linear;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: var(--theme-transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Theme Toggle */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.theme-toggle {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.theme-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-track {
    width: 60px;
    height: 30px;
    background: var(--primary-gradient);
    border-radius: 30px;
    position: relative;
    transition: var(--theme-transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    transition: var(--theme-transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-toggle-input:checked + .theme-toggle-track .theme-toggle-thumb {
    transform: translateX(30px);
}

.theme-toggle-icon {
    color: var(--text-light);
    font-size: 14px;
    z-index: 1;
}

/* Language Toggle */
.language-toggle-wrapper {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.lang-btn {
    background: none;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-medium);
    transition: all 0.3s ease;
}

.lang-btn.active {
    color: var(--primary-dark);
    background-color: rgba(106, 48, 147, 0.1);
}

.lang-btn:hover {
    color: var(--primary-light);
}

.lang-divider {
    margin: 0 5px;
    color: var(--text-medium);
    opacity: 0.5;
}

/* Header Styles */
.sticky-header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--header-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--theme-transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sticky-header.scrolled {
    padding: 10px 0;
    background-color: var(--header-bg);
    box-shadow: 0 4px 15px var(--box-shadow);
}

.sticky-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    transition: padding 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s;
    letter-spacing: -0.5px;
}

.logo:hover {
    color: var(--primary-light);
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 20px;
    position: relative;
}

nav ul li a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    transition: color 0.3s;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-dark);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Mobile Nav */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
    z-index: 1000;
}

/* Section Styles */
.section {
    padding: 60px 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-dark);
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('images/hero-bg.webp');
    background-image: image-set(
        url('images/hero-bg.webp') type('image/webp'),
        url('images/hero-bg.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    overflow: hidden;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.85;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 1000px;
}

.hero-content {
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-content p {
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
    opacity: 0.85;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.hero-btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-btn.primary {
    background-color: var(--accent);
    color: var(--text-dark);
    border: 2px solid var(--accent);
}

.hero-btn.primary:hover {
    background-color: transparent;
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.hero-btn.secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.hero-btn.secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Hero Typing Animation */
#typingText {
    background: linear-gradient(135deg, #FFD166, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-cursor {
    display: inline-block;
    color: #FFD166;
    font-weight: 300;
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

#about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.about-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid transparent;
    background: var(--primary-gradient);
    background-origin: border-box;
    padding: 3px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Stats/Achievements Section */
.stats-section {
    background: var(--primary-gradient);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    color: white;
    padding: 20px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    display: inline;
    line-height: 1;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: inline;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Skills Section — Card Grid */
#skills {
    background-color: var(--bg-medium);
    padding: 80px 0;
}

.skills-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 15px var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.skill-card-icon {
    margin-bottom: 15px;
}

.skill-card-icon i {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Services Section */
#services {
    background-color: var(--bg-light);
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 5px 15px var(--box-shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(106, 48, 147, 0.15);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 1.8rem;
    color: white;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
}

/* Projects Section */
#projects {
    background-color: var(--bg-medium);
    padding: 80px 0;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-dark);
    background: transparent;
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.4s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(106, 48, 147, 0.9), rgba(233, 64, 87, 0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay p {
    color: white;
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    color: white;
    padding: 8px 18px;
    border: 2px solid white;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-link:hover {
    background-color: white;
    color: #6A3093;
}

.project-info {
    padding: 20px;
}

.project-category {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(106, 48, 147, 0.1), rgba(233, 64, 87, 0.1));
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-category-ecommerce {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(76, 175, 80, 0.1));
    color: #2E7D32;
}

.project-category-app {
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.1), rgba(66, 165, 245, 0.1));
    color: #1565C0;
}

[data-theme="dark"] .project-category-ecommerce {
    color: #81C784;
}

[data-theme="dark"] .project-category-app {
    color: #64B5F6;
}

.project-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

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

.project-tags span {
    background: linear-gradient(135deg, rgba(106, 48, 147, 0.1), rgba(233, 64, 87, 0.1));
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* Experience Timeline Section */
#experience {
    background-color: var(--bg-light);
    padding: 80px 0;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    margin-bottom: 20px;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary-gradient);
    border-radius: 50%;
    top: 30px;
    border: 3px solid var(--bg-light);
    z-index: 2;
}

.timeline-item.left .timeline-dot {
    right: -8px;
}

.timeline-item.right .timeline-dot {
    left: -8px;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.timeline-date {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Resume Section */
#resume {
    background-color: var(--bg-light);
    text-align: center;
}

.resume-container {
    max-width: 600px;
    margin: 0 auto;
}

.resume-container p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cv-button {
    display: inline-block;
    background-image: var(--primary-gradient);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(106, 48, 147, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.cv-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(233, 64, 87, 0.4);
}

.cv-button i {
    margin-right: 10px;
}

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

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 40px;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--box-shadow);
    width: calc(33% - 20px);
    min-width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-text h3 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.contact-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-medium);
}

.contact-text a {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-text a:hover {
    color: var(--primary-light);
}

/* Contact Form */
.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 15px var(--box-shadow);
}

.contact-form-container h3 {
    text-align: center;
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
    flex: 1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(106, 48, 147, 0.1);
}

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

.form-submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(106, 48, 147, 0.3);
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(233, 64, 87, 0.4);
}

.form-submit-btn i {
    margin-right: 8px;
}

.form-success {
    display: none;
    text-align: center;
    color: #2E7D32;
    font-weight: 600;
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(46, 125, 50, 0.1);
    border-radius: 8px;
}

.form-success.show {
    display: block;
}

/* Footer Styles */
footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 40px 0 30px;
    text-align: center;
}

footer h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 500;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: #fff;
    font-size: 1.8rem;
    margin: 0 15px;
    transition: all 0.3s;
    display: inline-block;
}

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

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media (max-width: 1024px) {
    .skills-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Global Responsive */
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 15px;
    }

    .section {
        padding: 50px 0;
    }

    /* Header/Nav Responsive */
    .sticky-header .container {
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 12px 15px;
        align-items: center;
    }

    .logo {
        font-size: 1.3rem;
        flex-shrink: 0;
        margin-right: auto;
    }

    nav {
        position: absolute;
        width: 0;
        height: 0;
        overflow: visible;
    }

    .mobile-nav-toggle {
        display: block;
        position: static;
        flex-shrink: 0;
    }

    nav ul {
        flex-direction: column;
        background-color: var(--card-bg);
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        padding: 80px 30px 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        align-items: flex-start;
        z-index: 99;
    }

    nav.active ul {
        right: 0;
    }

    nav ul li {
        margin: 12px 0;
    }

    nav ul li a {
        font-size: 1.05rem;
        display: block;
        padding: 5px 0;
    }

    /* Hero Responsive */
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
        padding: 0 15px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .hero-btn {
        width: 80%;
        text-align: center;
    }

    /* Stats Responsive */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Skills Responsive */
    .skills-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Services Responsive */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Projects Responsive */
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    /* Timeline Responsive */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
        text-align: left;
    }

    .timeline-item.left {
        text-align: left;
    }

    .timeline-item.right {
        left: 0;
    }

    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 12px;
        right: auto;
    }

    /* About Responsive */
    .about-content {
        padding: 0 15px;
    }

    /* Contact Responsive */
    .contact-item {
        width: 100%;
        max-width: 400px;
    }

    .contact-info {
        justify-content: center;
    }

    .contact-form-container {
        padding: 25px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Footer Responsive */
    footer {
        padding: 30px 15px;
    }

    footer h3 {
        font-size: 1.3rem;
    }

    .social-links a {
        margin: 0 10px;
    }

    .cv-button {
        padding: 12px 25px;
        width: 80%;
    }

    /* Hide toggles from header on mobile — JS moves them into nav menu */
    .language-toggle-wrapper,
    .theme-toggle-wrapper {
        display: none;
    }

    /* When inside the nav menu, show them */
    nav .nav-controls {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 25px 0 0;
        margin-top: 20px;
        border-top: 1px solid var(--input-border);
        width: 100%;
    }

    nav .nav-controls .language-toggle-wrapper,
    nav .nav-controls .theme-toggle-wrapper {
        display: flex;
    }
}

@media (max-width: 480px) {
    /* Global Responsive - Small Mobile */
    .section {
        padding: 40px 0;
    }

    /* Hero Responsive */
    .hero {
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        padding: 0 10px;
    }

    .hero-content h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 30px;
        line-height: 1.5;
    }

    .hero-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    /* Section Heads */
    .section h2 {
        font-size: 1.8rem;
    }

    /* Stats */
    .stats-section {
        padding: 40px 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Skills */
    .skills-card-grid {
        grid-template-columns: 1fr;
    }

    .skill-card {
        padding: 20px 15px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* About Section */
    .about-photo {
        width: 150px;
        height: 150px;
    }

    /* Projects Section */
    .project-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    /* Footer */
    .social-links a {
        font-size: 1.5rem;
        margin: 0 10px;
    }

    .copyright {
        font-size: 0.8rem;
    }

    .logo {
        font-size: 1.1rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 48, 147, 0.4);
}

.back-to-top i {
    font-size: 1.1rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float i {
    color: white;
    font-size: 2rem;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }

    .back-to-top i {
        font-size: 0.95rem;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float i {
        font-size: 1.6rem;
    }
}

/* ==========================================
   PROJECT DETAIL PAGES
   ========================================== */

/* Project Page Header */
.project-page-header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--header-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--theme-transition);
}

.project-page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.project-page-header .header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-decoration: none;
}

.back-link:hover {
    color: var(--primary-light);
}

/* Project Hero */
.project-hero {
    padding: 120px 0 60px;
    background-color: var(--bg-light);
}

.project-hero-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.project-hero-image {
    flex: 0 0 400px;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--box-shadow);
    background-color: var(--bg-medium);
}

.project-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    padding: 20px;
}

.project-hero-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.project-hero-info .project-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.project-hero-info .tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.project-hero-info .tech-tags span {
    background: linear-gradient(135deg, rgba(106, 48, 147, 0.1), rgba(233, 64, 87, 0.1));
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Project Overview */
.project-overview {
    padding: 60px 0;
    background-color: var(--bg-medium);
}

.project-overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.project-overview-text h2 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: left;
}

.project-overview-text h2::after {
    left: 0;
    transform: none;
}

.project-overview-text p {
    font-size: 1.05rem;
    color: var(--text-medium);
    line-height: 1.8;
}

.project-info-sidebar {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--box-shadow);
}

.project-info-sidebar h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(106, 48, 147, 0.1);
}

.info-item {
    margin-bottom: 18px;
}

.info-item .info-label {
    font-size: 0.85rem;
    color: var(--text-medium);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item .info-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.info-item .info-value a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.info-item .info-value a:hover {
    color: var(--primary-light);
}

/* Key Features */
.project-features {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.project-features h2 {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 40px;
    position: relative;
}

.project-features h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.feature-card-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.feature-card-icon i {
    font-size: 1.3rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Project CTA */
.project-cta {
    padding: 60px 0;
    background: var(--primary-gradient);
    text-align: center;
    color: white;
}

.project-cta h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: white;
}

.project-cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.project-cta .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.project-cta .cta-btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-cta .cta-btn.primary {
    background-color: white;
    color: #6A3093;
}

.project-cta .cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.project-cta .cta-btn.secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.project-cta .cta-btn.secondary:hover {
    background-color: white;
    color: #6A3093;
    transform: translateY(-3px);
}

/* Project Detail Responsive */
@media (max-width: 768px) {
    .project-hero {
        padding: 100px 0 40px;
    }

    .project-hero-content {
        flex-direction: column;
        gap: 30px;
    }

    .project-hero-image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .project-hero-info h1 {
        font-size: 2rem;
    }

    .project-overview-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .project-page-header .header-controls {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .project-hero-info h1 {
        font-size: 1.6rem;
    }

    .project-cta h2 {
        font-size: 1.5rem;
    }

    .project-cta .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .project-cta .cta-btn {
        width: 80%;
        text-align: center;
    }
}

/* Global Theme Transition */
.theme-transition,
.theme-transition *,
.theme-transition *:before,
.theme-transition *:after {
    transition: all 0.4s ease !important;
}

