/* Modern Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light, modern color palette */
    --text-primary: #1A2B3B;  /* Deep blue-grey for text */
    --text-secondary: rgba(226, 232, 240, 0.85); /* Muted text */
    --accent-primary: #4F46E5; /* Soft indigo */
    --bg-primary: #FAFAFA; /* Very light grey, almost white */
    --bg-secondary: #F3F4F6; /* Light grey for cards/sections */
    --border-color: rgba(26, 43, 59, 0.1);
    --gradient-1: linear-gradient(135deg, #4F46E5 0%, #818CF8 100%); /* Subtle indigo gradient */
    --font-mono: 'JetBrains Mono', monospace;
}

/* Dark theme variables (for when user switches to dark mode) */
[data-theme="dark"] {
    --text-primary: #E5E7EB;
    --text-secondary: rgba(229, 231, 235, 0.75);
    --accent-primary: #818CF8; /* Lighter indigo for dark mode */
    --bg-primary: #1F2937;
    --bg-secondary: #374151;
    --border-color: rgba(229, 231, 235, 0.1);
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ultra-Modern Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px; /* Explicit height */
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.main-header nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

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

/* Striking Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 1.5rem 4rem;
    position: relative;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.hero-text {
    position: relative;
}

.name {
    font-size: 7vw;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 3rem;
}

.hero-image {
    position: relative;
    overflow: visible;
    width: 600px;
    height: 600px;
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%);
    transition: all 0.5s ease;
}

.profile-image:hover {
    filter: grayscale(0%) contrast(100%);
}


/* Modern Buttons */
.cta-buttons {
    display: flex;
    gap: 2rem;
}

.primary-button {
    padding: 1rem 2.5rem;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.primary-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.primary-button:hover::before {
    transform: translateX(0);
}

.secondary-button {
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.secondary-button:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Project Cards */
.projects-content {
    padding: 8rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

/* Project Cards - Unified Styling */
.project-item {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--accent-primary);
}

.project-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* Tech Stack - Unified Styling */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tech-stack span {
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tech-stack span:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* About Section */
.about-content {
    padding: 8rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.about-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 4rem;
    line-height: 1.8;
}

.technologies {
    margin-top: 4rem;
}

.technologies h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.tech-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tech-icon:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px rgba(0, 255, 149, 0.1);
}

.tech-icon i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tech-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-cv {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    margin: 3rem auto 0;
    width: fit-content;
    transition: all 0.3s ease;
}

.download-cv:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.download-cv span {
    margin-left: 0.5rem;
}

/* Education/Experience Section */
.experience-content {
    padding: 8rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.experience-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--gradient-1);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 3rem;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-primary);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item .date {
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.timeline-item .role {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-item .company {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-item .details {
    color: var(--text-secondary);
    line-height: 1.8;
}

.certificate-link {
    margin-top: 1rem;
}

.certificate-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.certificate-link a:hover {
    opacity: 0.8;
    transform: translateX(4px);
}

.certificate-link i {
    font-size: 1rem;
}

/* Contact Section */
.contact-content {
    padding: 8rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.contact-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 600px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.5);
    padding: 2.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Contact Form Styles */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Label styles */
.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    height: 24px;
    line-height: 24px;
}

/* Input styles */
.form-group input {
    width: 100%;
    height: 48px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0 1rem 0 3rem;
}

/* Icon styles */
.form-group i {
    position: absolute;
    left: 1rem;
    top: calc(24px + 24px - 0.5rem + 7px);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    pointer-events: none;
}

/* Textarea styles */
.form-group textarea {
    width: 100%;
    min-height: 150px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 1rem;
    resize: vertical;
}

/* Remove icon from textarea */
.form-group textarea + i {
    display: none;
}

/* Focus states */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366F1;
    background: rgba(15, 23, 42, 0.9);
}

/* Button styles */
.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    margin: 3rem auto 0;
    width: fit-content;
    transition: all 0.3s ease;
}

.send-button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}



/* Placeholder styles */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Footer */
.copyright {
    text-align: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 45px;
    }
    
    .timeline-item::before {
        left: 9px;
    }
    
    .tech-icons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1.5rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

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

/* Light theme adjustments */
[data-theme="light"] {
    --text-primary: #1A2B3B;  /* Darker text for light mode */
    --text-secondary: rgba(26, 43, 59, 0.75);
    --accent-primary: #4F46E5; /* Keep indigo accent */
    --bg-primary: #FAFAFA;
    --bg-secondary: #F3F4F6;
    --border-color: rgba(26, 43, 59, 0.1);
}

.social-links {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    margin-top: 2rem;
    margin-left: 6rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.75rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

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

/* Project Details Page */
.project-details {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.project-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.project-hero h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.project-content {
    margin-bottom: 4rem;
}

.project-content h2 {
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem;
    color: var(--accent-primary);
}

.project-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-content ul {
    list-style: none;
    margin: 1.5rem 0;
}

.project-content ul li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.project-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateX(-4px);
}

/* Video Container Styles */
.video-container {
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative;
    aspect-ratio: 16/9;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: block;
    background: var(--bg-secondary);
}

.video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: none;
    background: var(--bg-secondary);
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix for iOS Safari scrolling */
    html, body {
        position: relative;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
    }

    .container {
        position: relative;
        min-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Fix for iOS Safari video container */
    .video-container {
        height: 0;
        padding-bottom: 56.25%;
        position: relative;
        overflow: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .video-container video,
    .video-container img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Fix for iOS Safari touch targets */
    .nav-links a,
    .project-links a,
    .theme-toggle,
    .mobile-menu-toggle,
    .cta-buttons a,
    .send-button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    /* Fix for iOS Safari input zoom */
    input, textarea {
        font-size: 16px !important;
    }

    /* Fix for iOS Safari fixed header */
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--bg-primary);
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* Fix for iOS Safari section spacing */
    .section {
        padding-top: 80px;
        min-height: 100vh;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* Fix for iOS Safari hero section */
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
        display: flex;
        align-items: center;
    }
}

/* Mobile-specific fixes */
@media screen and (max-width: 768px) {
    .container {
        padding-top: 60px;
    }

    .main-header {
        height: 60px;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: 1rem;
        display: none;
        flex-direction: column;
        gap: 1rem;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .video-container {
        margin: 1rem 0;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .nav-links {
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-image {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .contact-form {
        width: 100%;
        padding: 15px;
    }
}

/* Mobile phones (portrait mode) */
@media screen and (max-width: 480px) {
    /* Fix navigation */
    .nav-links {
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        padding: 10px;
    }
    
    /* Fix profile image */
    .profile-image {
        width: 200px;
        height: 200px;
        margin: 20px auto;
        display: block;
        object-fit: cover;
        border-radius: 50%;
    }
    
    /* Adjust hero section */
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
    }
    
    /* Adjust container padding */
    .container {
        padding: 0 15px;
        margin: 0 auto;
    }
}

/* Projects Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.project-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.project-description {
    font-size: 1rem;
    line-height: 1.6;
    margin: 15px 0;
    color: var(--text-color);
}

.project-image img,
.video-container video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    margin: 15px 0;
}

.project-links {
    display: flex !important;
    flex-direction: row !important;
}

.project-link, .separator {
    display: inline !important;
}

.project-links a,
.project-links span {
    display: inline-block;
    margin: 0;
    white-space: nowrap;
}

.project-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.separator {
    color: var(--text-secondary);
}

.project-link, .separator {
    display: inline;
    margin: 0;
    padding: 0;
}

/* View All Button */
.view-all {
    text-align: center;
    margin: 40px 0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent-primary); /* Using the indigo accent color */
    color: var(--bg-primary); /* Light background color for text */
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-primary);
    font-weight: 500;
}

.btn:hover {
    background-color: transparent;
    color: var(--accent-primary);
    transform: translateY(-2px); /* Subtle lift effect */
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15); /* Soft shadow using indigo */
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media screen and (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 90%;
        text-align: center;
    }
}

/* Projects Page Styles */
.projects-intro {
    padding: 120px 0 30px;
    margin-top: 0;
    background-color: var(--bg-color);
    text-align: center;
}

.intro-text {
    max-width: 800px;
    margin: 20px auto;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 1.1rem;
}

.project-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-item:hover {
    transform: translateY(-5px);
}

.project-item h3 {
    color: var(--heading-color);
    margin-bottom: 10px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .projects-intro {
        padding: 100px 15px 30px;
    }
    
    .projects-intro h1 {
        margin-top: 0;
    }
    
    .intro-text {
        font-size: 1rem;
        padding: 0 15px;
    }
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 10px 0;
}

/* Back to Home Button */
.back-home {
    text-align: center;
    margin: 20px 0;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--accent-primary); /* Using the indigo accent color */
    color: var(--bg-primary); /* Light background color for text */
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.home-btn:hover {
    background-color: transparent;
    color: var(--accent-primary);
    transform: translateY(-2px); /* Subtle lift effect */
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15); /* Soft shadow using indigo */
}

.home-btn i {
    font-size: 0.9em;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }
}

.success-message,
.error-message {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    text-align: center;
}

.success-message {
    background-color: rgba(0, 255, 149, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.error-message {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    border: 1px solid #ff4444;
}

/* Fix viewport sizing issues */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding-top: 80px; /* Same as header height */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Update hero section for mobile */
@media screen and (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr; /* Stack content vertically */
        gap: 2rem;
        padding: 0 1rem;
    }

    .name {
        font-size: 2.5rem; /* Reduce font size on mobile */
        white-space: normal; /* Allow text to wrap */
    }

    .social-links {
        margin-left: 0; /* Remove left margin on mobile */
        justify-content: center;
    }
}

/* Fix projects grid on mobile */
@media screen and (max-width: 768px) {
    .projects-list {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .project-item {
        margin: 0 1rem 20px;
        width: auto;
    }
}

/* Fix form on mobile */
@media screen and (max-width: 768px) {
    .contact-form {
        margin: 0 1rem;
        padding: 1.5rem;
    }
}

/* General mobile fixes */
@media screen and (max-width: 480px) {
    body {
        overflow-x: hidden;
    }

    .section {
        padding: 4rem 1rem;
    }

    .tech-icons {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .tech-icon {
        padding: 1rem;
    }

    .timeline-item {
        padding-left: 2rem;
    }
}

/* Add responsive sizing for mobile */
@media screen and (max-width: 768px) {
    .profile-image {
        width: 300px;
        height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .profile-image {
        width: 200px;
        height: 200px;
    }
}

/* Add responsive sizing */
@media screen and (max-width: 768px) {
    .hero-image {
        width: 300px;
        height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .hero-image {
        width: 200px;
        height: 200px;
    }
}

/* Section styling with combined neat elements */
.section {
    position: relative;
    padding: 8rem 1.5rem;
    margin: 2rem auto;
    max-width: 1400px;
}

/* Subtle background alternation */
.section:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
}

/* Modern heading style */
.section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

/* Elegant underline for headings */
.section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Hover effect on heading */
.section h2:hover::after {
    width: 100%;
}

/* Subtle vertical spacing */
.section > * + * {
    margin-top: 2rem;
}

/* Add fade effect between sections */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-primary),
        transparent
    );
    opacity: 0.2;
}

/* Remove top fade from first section */
.hero-section::before {
    display: none;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .section {
        padding: 4rem 1rem;
        margin: 1rem auto;
    }

    .section h2 {
        font-size: 2rem;
    }
}

/* Experience Section Specific Styles */
.experience-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.experience-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.experience-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* Update timeline styles for both education and experience */
.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 3rem;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-primary);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item .date {
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.timeline-item .role {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-item .company {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-item .details {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Hover effect */
.timeline-item:hover::before {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-item .role {
        font-size: 1.25rem;
    }

    .timeline-item .company {
        font-size: 1rem;
    }
}

/* 404 Error Page Styles */
.error-page {
    min-height: calc(100vh - 80px); /* Subtract header height */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px; /* Add margin for header */
    background: var(--bg-primary);
}

.error-content {
    text-align: center;
    padding: 2rem;
}

.error-title {
    font-size: 8rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 0;
    line-height: 1;
}

.glitch-text {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 1rem 0;
    font-weight: 500;
}

.error-description {
    color: var(--text-secondary);
    margin: 2rem 0;
    font-size: 1.2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--accent-primary);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Ensure header stays on top */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .error-title {
        font-size: 6rem;
    }

    .glitch-text {
        font-size: 1.5rem;
    }

    .error-description {
        font-size: 1rem;
    }
}

/* Ensure the body and html take full height */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Add focus styles */
a:focus, button:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Improve mobile styles */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
        margin: 20px auto;
    }
    
    .title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin: 10px 0;
    }
    
    .project-item {
        padding: 15px;
    }
    
    .video-container {
        margin: 15px -15px;
        border-radius: 0;
    }
    
    .video-container video {
        max-height: 200px;
        object-fit: cover;
    }
    
    /* Optimize font sizes for mobile */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    p { font-size: 1rem; }
    
    /* Improve touch targets */
    .nav-links a,
    .project-links a,
    .theme-toggle {
        padding: 12px;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix for iOS Safari 100vh issue */
    .hero-section {
        min-height: -webkit-fill-available;
    }

    /* Fix for iOS Safari video container */
    .video-container {
        height: 0;
        padding-bottom: 56.25%;
        position: relative;
        overflow: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .video-container video,
    .video-container img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Fix for iOS Safari profile image */
    .profile-image {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    /* Fix for iOS Safari scrolling */
    body {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }

    /* Fix for iOS Safari input zoom */
    input, textarea {
        font-size: 16px !important;
    }
}

/* Mobile-specific fixes */
@media screen and (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .hero-image {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    .video-container {
        margin: 1rem 0;
    }

    .video-container video,
    .video-container img {
        max-height: 200px;
    }

    .project-item {
        margin: 1rem 0;
    }

    .tech-stack {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tech-stack span {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Fix for iOS Safari input zoom */
@media screen and (max-width: 480px) {
    input, textarea {
        font-size: 16px !important;
    }

    .hero-image {
        width: 200px;
        height: 200px;
    }

    .video-container {
        margin: 0.5rem 0;
    }

    .video-container video,
    .video-container img {
        max-height: 180px;
    }
}

/* Fix for iOS Safari video autoplay */
.video-container video {
    -webkit-playsinline: true;
    playsinline: true;
    -webkit-tap-highlight-color: transparent;
}

/* Fix for iOS Safari touch events */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

