/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #1d4ed8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding-top: 80px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #fbbf24;
    color: #1f2937;
}

.btn-primary:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3);
}

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

.btn-secondary:hover {
    background: white;
    color: #1f2937;
    transform: translateY(-2px);
}

.hero-avatar {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hero-avatar i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1f2937;
}

/* About Section */
.about {
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.7;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #6b7280;
    font-weight: 500;
}

.about-avatar {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.about-avatar i {
    font-size: 6rem;
    color: white;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
    text-align: center;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.skill-item:hover {
    background: #e2e8f0;
}

.skill-item i {
    font-size: 1.5rem;
    color: #2563eb;
}

.skill-item span {
    font-weight: 500;
    color: #374151;
}

/* Projects Section */
.projects {
    background: #f8fafc;
}

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

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

a {
    text-decoration: none;
  }
  
.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 4rem;
    color: white;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.project-tech span {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.project-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #1d4ed8;
}

/* Education Section */
.education {
    background: #f8fafc;
    padding: 5rem 0;
}

.education-content {
    max-width: 800px;
    margin: 0 auto;
}

.education-timeline {
    position: relative;
    padding: 2rem 0;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    transform: translateX(-50%);
}

.education-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    position: relative;
}

.education-item:nth-child(odd) {
    flex-direction: row;
}

.education-item:nth-child(even) {
    flex-direction: row-reverse;
}

.education-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    z-index: 2;
    flex-shrink: 0;
}

.education-details {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 0 2rem;
    flex: 1;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.education-header {
    margin-bottom: 1rem;
}

.education-header h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-degree {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.education-institution,
.education-duration {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #64748b;
}

.education-institution i,
.education-duration i {
    margin-right: 0.5rem;
    color: #3b82f6;
    width: 16px;
}

.education-description {
    margin-top: 1rem;
}

.education-description p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Experience Section */
.experience {
    background: white;
    padding: 5rem 0;
}

.experience-content {
    max-width: 900px;
    margin: 0 auto;
}

.experience-timeline {
    position: relative;
    padding: 2rem 0;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #10b981, #3b82f6);
    transform: translateX(-50%);
}

.experience-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    position: relative;
}

.experience-item:nth-child(odd) {
    flex-direction: row;
}

.experience-item:nth-child(even) {
    flex-direction: row-reverse;
}

.experience-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    z-index: 2;
    flex-shrink: 0;
}

.experience-details {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 0 2rem;
    flex: 1;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #10b981;
}

.experience-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.experience-header {
    margin-bottom: 1rem;
}

.experience-header h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.experience-company {
    display: block;
    color: #10b981;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.experience-duration {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    background: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.experience-description {
    margin-top: 1rem;
}

.experience-description p,
.experience-description span {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
.contact {
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.contact-info p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-method i {
    color: #2563eb;
    font-size: 1.25rem;
}

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

.social-link {
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
}

/* Contact Form Styles */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

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

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
}
/* Loading and disabled states for form */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.fa-spinner {
    margin-right: 8px;
}

/* Form validation styles */
.form-group input:invalid,
.form-group textarea:invalid {
    border-color: #ef4444;
}

.form-group input:focus:invalid,
.form-group textarea:focus:invalid {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Responsive Design */
/* Large Tablets and Small Laptops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-avatar {
        width: 250px;
        height: 250px;
    }
    
    .hero-avatar i {
        font-size: 6rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .about-avatar {
        width: 200px;
        height: 200px;
    }
    
    .about-avatar i {
        font-size: 5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
        .education-timeline::before {
        left: 30px;
    }

    .education-item {
        flex-direction: row !important;
    }

    .education-details {
        margin-left: 3rem;
        margin-right: 0;
    }

    .experience-timeline::before {
        left: 30px;
    }

    .experience-item {
        flex-direction: row !important;
    }

    .experience-details {
        margin-left: 3rem;
        margin-right: 0;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

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

    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        display: block;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-avatar {
        width: 200px;
        height: 200px;
        order: -1;
    }

    .hero-avatar i {
        font-size: 5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .about-avatar {
        width: 180px;
        height: 180px;
        order: -1;
    }

    .about-avatar i {
        font-size: 4rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
        .education-timeline::before {
        left: 20px;
    }

    .education-item {
        flex-direction: row !important;
    }

    .education-details {
        margin-left: 2.5rem;
        margin-right: 0;
        padding: 1.5rem;
    }

    .education-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .experience-timeline::before {
        left: 20px;
    }

    .experience-item {
        flex-direction: row !important;
    }

    .experience-details {
        margin-left: 2.5rem;
        margin-right: 0;
        padding: 1.5rem;
    }

    .experience-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .skill-items {
        grid-template-columns: 1fr;
    }

    .project-card {
        margin: 0 auto;
        max-width: 500px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 20px;
    }
}

/* whatsapp chat icon */
.whatsapp-float {
    position: fixed;
    bottom: 20px;     /* distance from bottom */
    left: 20px;       /* distance from left */
    z-index: 1000;
}

.whatsapp-float img {
    border-radius: 50%;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.whatsapp-float img:hover {
    transform: scale(1.1);
}

/* Large Mobile Devices */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-avatar {
        width: 180px;
        height: 180px;
    }

    .hero-avatar i {
        font-size: 4rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat {
        padding: 1rem;
    }

    .stat h3 {
        font-size: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .project-content {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .social-links {
        justify-content: center;
    }
    
        .education-timeline::before {
        left: 15px;
    }

    .education-details {
        margin-left: 2rem;
        padding: 1.25rem;
    }

    .education-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .experience-timeline::before {
        left: 15px;
    }

    .experience-details {
        margin-left: 2rem;
        padding: 1.25rem;
    }

    .experience-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .education-header h3 {
        font-size: 1.3rem;
    }

    .experience-timeline::before {
        left: 15px;
    }

    .experience-details {
        margin-left: 2rem;
        padding: 1.25rem;
    }

    .experience-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .experience-header h3 {
        font-size: 1.3rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero-container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
        padding: 14px 20px;
    }

    .hero-avatar {
        width: 150px;
        height: 150px;
    }

    .hero-avatar i {
        font-size: 3rem;
    }

    .about-avatar {
        width: 150px;
        height: 150px;
    }

    .about-avatar i {
        font-size: 3rem;
    }

    .skill-category {
        padding: 1rem;
    }

    .skill-category h3 {
        font-size: 1.3rem;
    }

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

    .project-content {
        padding: 1rem;
    }

    .contact-form {
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .contact-method {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    section {
        padding: 2rem 0;
    }
    
        .education-timeline::before {
        left: 10px;
    }

    .education-details {
        margin-left: 1.5rem;
        padding: 1rem;
    }

    .education-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .education-header h3 {
        font-size: 1.2rem;
    }

    .education-degree {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    .experience-timeline::before {
        left: 10px;
    }

    .experience-details {
        margin-left: 1.5rem;
        padding: 1rem;
    }

    .experience-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .experience-header h3 {
        font-size: 1.2rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .hero-avatar {
        width: 120px;
        height: 120px;
    }

    .hero-avatar i {
        font-size: 2.5rem;
    }

    .about-avatar {
        width: 120px;
        height: 120px;
    }

    .about-avatar i {
        font-size: 2.5rem;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 10px;
    }

    .nav-container {
        padding: 0 10px;
    }

    .hero-container {
        padding: 0 10px;
    }
    
        .education-timeline::before {
        left: 8px;
    }

    .education-details {
        margin-left: 1.25rem;
        padding: 0.75rem;
    }

    .education-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .education-header h3 {
        font-size: 1.1rem;
    }

    .education-degree {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }

    .experience-timeline::before {
        left: 8px;
    }

    .experience-details {
        margin-left: 1.25rem;
        padding: 0.75rem;
    }

    .experience-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .experience-header h3 {
        font-size: 1.1rem;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-container {
        gap: 2rem;
    }

    .hero-avatar {
        width: 120px;
        height: 120px;
    }

    .hero-avatar i {
        font-size: 3rem;
    }

    .about-avatar {
        width: 120px;
        height: 120px;
    }

    .about-avatar i {
        font-size: 3rem;
    }

    section {
        padding: 2rem 0;
    }
    
    .education-timeline::before {
        left: 15px;
    }
    
    .education-details {
        margin-left: 2rem;
        padding: 1.25rem;
    }
    
    .education-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-avatar,
    .about-avatar {
        border-width: 1px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    .contact-form,
    .social-links,
    .hamburger {
        display: none !important;
    }

    .hero {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 1rem 0;
    }

    .section-title {
        color: black !important;
    }

    .about,
    .skills,
    .education,
    .experience,
    .projects,
    .contact {
        background: white !important;
    }

    .project-card,
    .skill-category {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 768px) {
    /* Improve touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .skill-item {
        min-height: 44px;
    }
    
    .project-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better mobile form experience */
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Improve mobile navigation */
    .hamburger {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .bar {
        transition: 0.3s;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Better mobile spacing */
    .hero {
        padding-top: 70px;
    }
    
    .hero-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Improve mobile project cards */
    .project-card {
        margin-bottom: 1.5rem;
    }
    
    .project-image {
        height: 150px;
    }
    
    .project-image i {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    /* Even better mobile spacing */
    .hero-container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .hero-title {
        margin-bottom: 0.8rem;
    }
    
    .hero-subtitle {
        margin-bottom: 0.8rem;
    }
    
    .hero-description {
        margin-bottom: 1.5rem;
    }
    
    /* Improve mobile buttons */
    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 6px;
    }
    
    /* Better mobile form */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
        border-radius: 6px;
    }
    
    /* Improve mobile contact methods */
    .contact-method {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .contact-method i {
        font-size: 1.1rem;
    }
    
    /* Better mobile social links */
    .social-links {
        gap: 0.8rem;
    }
    
    .social-link {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .skill-item:hover {
        background: #f8fafc;
    }
    
    .project-card:hover {
        transform: none;
    }
    
    .stat:hover {
        transform: none;
    }
    
    .social-link:hover {
        transform: none;
    }
    
    .scroll-to-top:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #1f2937;
    }
    
    .btn-secondary {
        border: 2px solid white;
    }
    
    .skill-item {
        border: 1px solid #e5e7eb;
    }
    
    .project-card {
        border: 1px solid #e5e7eb;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
    }
    
    .hero-avatar,
    .about-avatar {
        animation: none;
    }
}
