/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

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

.nav-menu a {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #3b82f6;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #f8fafc 100%);
    color: #1e40af;
    padding: 0 2rem;
}

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

.hero-content {
    text-align: left;
}

.hero-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 6px solid #3b82f6;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.profile-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: #f8fafc;
    border: 3px dashed #3b82f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.profile-placeholder:hover {
    background: #f1f5f9;
    border-color: #1d4ed8;
}

.profile-placeholder span {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-placeholder p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

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

.highlight {
    color: #1d4ed8;
}

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

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

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

.btn {
    display: inline-flex; /* Changed to inline-flex for better centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center; /* Ensure text is centered */
}

.btn-primary {
    background: #1d4ed8;
    color: white;
    border-color: #1d4ed8;
}

.btn-primary:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #1d4ed8;
    border-color: #1d4ed8;
}

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

/* Section styles */
section {
    padding: 4rem 0;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #3b82f6 50%, transparent 100%);
    opacity: 0.3;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #1d4ed8;
    border-radius: 2px;
}

/* About section */
.about {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 1rem;
}

.about-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.2);
    border: 2px solid #3b82f6;
    transition: transform 0.3s ease;
}

.about-image:hover {
    transform: scale(1.05);
}

.about-text {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.8rem;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    border: 1px solid #e0f2fe;
    text-align: left;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: #374151;
}

/* Experience section */
.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    width: 2px;
    background: #3b82f6;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 1rem;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.timeline-content-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.job-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 0.5rem;
}

.job-dates {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.job-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.achievement-list {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.achievement-list li {
    margin-bottom: 0.5rem;
    color: #4b5563;
    line-height: 1.5;
}

.skills-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skill-oval {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
}

/* Education section */
.education {
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
}

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

.education-item {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
    border: 1px solid #dbeafe;
    text-align: center;
}

.education-info {
    text-align: left;
}

.university-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.uconn-logo {
    max-width: 240px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.1);
}

.education-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e40af;
}

.education-item h4 {
    font-size: 1.125rem;
    color: #1d4ed8;
    margin-bottom: 1rem;
    font-weight: 500;
}

.education-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.education-details span {
    color: #6b7280;
    font-weight: 500;
}

.skills-subheading {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e40af;
    margin: 2rem 0 1rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e0f2fe;
    text-align: center;
}

.skills-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.skill-category-compact {
    text-align: center;
}

.skill-category-compact h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e40af;
}

.skill-category-compact:nth-child(1) .skill-tags,
.skill-category-compact:nth-child(2) .skill-tags {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}

.skill-category-compact:nth-child(3) .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

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

.skill-category {
    text-align: center;
}

.skill-category h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e40af;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: #1d4ed8;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Work Projects section */
.work-projects {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    min-height: 100vh;
    padding-top: 120px;
}

/* Experience Page */
.experience-page {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    min-height: 100vh;
    padding-top: 120px;
}

/* Projects Page */
.projects-page {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    min-height: 100vh;
    padding-top: 120px;
}

/* Contact Page */
.contact-page {
    background: white;
    min-height: 100vh;
    padding-top: 120px;
}

.resume-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #4a90a4;
}

.resume-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.resume-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-download {
    background: #4a90a4;
    color: white;
    border-color: #4a90a4;
}

.btn-download:hover {
    background: #3a7a8a;
    border-color: #3a7a8a;
    transform: translateY(-2px);
}

.btn-open {
    background: white;
    color: #4a90a4;
    border-color: #4a90a4;
}

.btn-open:hover {
    background: #4a90a4;
    color: white;
    transform: translateY(-2px);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(74, 144, 164, 0.1);
    border: 1px solid #e0f2fe;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(74, 144, 164, 0.15);
}

.contact-icon {
    font-size: 2.5rem;
    background: #4a90a4;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.contact-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a90a4;
    margin-bottom: 0.75rem;
}

.contact-box a {
    color: #4b5563;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contact-box a:hover {
    color: #4a90a4;
    text-decoration: underline;
}

.pdf-section {
    display: flex;
    flex-direction: column;
}

.pdf-viewer {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: #f5f5f5;
}

/* ABSOLUTELY NO ZOOM CONTROLS ON DESKTOP */
.pdf-zoom-controls {
    display: none !important;
}

@media screen and (min-width: 769px) {
    .pdf-zoom-controls,
    .pdf-zoom-controls *,
    div.pdf-zoom-controls {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        opacity: 0 !important;
        z-index: -9999 !important;
    }
}

.pdf-viewer object,
.pdf-viewer iframe {
    display: block;
    border: none;
    width: 100%;
}

.mobile-pdf-message,
.mobile-pdf-buttons {
    display: none;
}

@media (max-width: 768px) {
    .mobile-pdf-message,
    .mobile-pdf-buttons {
        display: none;
    }

    /* Show zoom controls on mobile only */
    .pdf-zoom-controls {
        display: flex !important;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .zoom-btn {
        background: #4a90a4;
        color: white;
        border: none;
        padding: 0.425rem 0.85rem; /* 15% smaller padding */
        border-radius: 5px; /* Slightly smaller border radius */
        cursor: pointer;
        font-weight: 500;
        font-size: 0.765rem; /* 15% smaller font size */
        transition: all 0.3s ease;
    }

    .zoom-btn:hover {
        background: #3a7a8a;
        transform: translateY(-1px);
    }

    .zoom-btn:disabled {
        background: #9ca3af;
        cursor: not-allowed;
        transform: none;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .contact-page {
        padding-top: 80px; /* Further reduce top padding */
    }

    .container {
        padding: 0 1rem; /* Reduce container padding */
    }

    .resume-title {
        font-size: 2rem; /* Smaller title for mobile */
        margin-bottom: 0.25rem; /* Minimal bottom margin */
    }

    .resume-subtitle {
        margin-bottom: 0.5rem; /* Further reduce bottom margin */
        font-size: 1rem; /* Smaller subtitle */
    }

    .resume-buttons {
        flex-direction: column;
        align-items: center;
        margin-bottom: 1.5rem; /* More spacing below Open in New Tab button */
        gap: 1rem; /* Better gap between buttons */
    }

    .btn {
        width: 200px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 0.5rem; /* Minimal gap between sections */
        margin: 0.5rem 1rem; /* Minimal top/bottom margin */
    }

    .contact-sidebar {
        order: 2;
    }

    .pdf-section {
        order: 1;
    }

    .pdf-viewer {
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        background: #f5f5f5;
        position: relative;
        overflow: auto; /* Enable both horizontal and vertical scrolling */
        height: 65vh; /* Use more viewport height to fill space better */
        min-height: 400px; /* Increase minimum height to fill more space */
        max-height: none; /* Remove max height restriction */
    }

    .pdf-viewer object,
    .pdf-viewer iframe {
        display: block;
        width: 100%; /* Start at normal scale for better readability */
        height: 100%; /* Fill container height */
        border: none;
        transform-origin: top left;
        transform: scale(1); /* Remove any existing transforms */
    }

    .mobile-pdf-message {
        color: #1e40af;
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 1rem;
    }

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

    .mobile-pdf-buttons .btn {
        width: 250px;
        text-align: center;
    }

    .contact-box {
        padding: 1.5rem;
    }

    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1e40af;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #1d4ed8;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 2rem;
    text-align: center;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.nav-menu a.active {
    color: #1d4ed8;
    font-weight: 600;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #3b82f6;
    color: #1d4ed8;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.tab-btn:hover {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.2);
}

.tab-btn.active {
    background: #1d4ed8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(29, 78, 216, 0.3);
}

.tab-btn.active:hover {
    background: #1e3a8a;
}

/* Tab Content */
.tab-content {
    position: relative;
    min-height: 400px;
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.project-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
    border: 1px solid #e0f2fe;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 500px;
}

/* ROV Project Section - Centered and Longer */
.rov-section {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.rov-project {
    max-width: 580px !important;
    width: 100%;
    padding: 1.5rem 2rem !important;
}

.rov-project .project-img-top {
    width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e40af;
}

.project-card p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-image {
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    text-align: left;
}

.project-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    display: block;
}

.project-img:hover {
    opacity: 1;
}

.project-image-top {
    width: 100%;
    margin-bottom: 1.5rem;
}

.project-img-top {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px 8px 0 0;
    opacity: 1.0;
    transition: opacity 0.3s ease;
    display: block !important;
    object-fit: contain !important;
}

.project-img-top:hover {
    opacity: 1;
}

.project-details {
    margin-top: 1rem;
}

.project-details p {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.project-achievements {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.project-achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4b5563;
    line-height: 1.5;
}

.project-achievements li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #1d4ed8;
    font-weight: bold;
}

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

.project-link {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

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

.tech-tag {
    background: #e5e7eb;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Contact section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: #4b5563;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
    padding: 1rem 2rem;
    border: 2px solid #1d4ed8;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: #1d4ed8;
    color: white;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: #1e40af;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 4px;
    background: #1f2937;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
    display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -7px);
}

/* Responsive design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-container {
        height: 70px;
        padding: 0 1rem;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        list-style: none;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        text-align: center;
        margin: 0.5rem 0;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        color: #1f2937;
        text-decoration: none;
        border-bottom: 1px solid #f3f4f6;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-menu a:hover {
        background-color: #f8fafc;
        color: #3b82f6;
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }

    .hero {
        padding-top: 120px;
    }

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

    .hero-content {
        text-align: center;
        order: 2;
    }

    .hero-photo {
        order: 1;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .profile-placeholder {
        width: 250px;
        height: 250px;
    }

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

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

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

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

    .about-text {
        text-align: left;
        order: 2;
        margin-top: 0;
    }

    .about-photo {
        order: 1;
        margin-top: 0;
    }

    .about-image {
        max-width: 320px;
    }

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

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

    .timeline-item {
        flex-direction: column;
        padding-left: 50px;
    }

    .timeline-item:nth-child(odd) {
        flex-direction: column;
    }

    .timeline-content {
        margin: 1rem 0;
    }

    .timeline-content::before {
        left: -35px;
    }

    .timeline-item:nth-child(odd) .timeline-content::before {
        left: -35px;
    }

    .timeline-date {
        text-align: left;
        margin-bottom: 1rem;
        flex: none;
        width: auto;
        max-width: none;
    }

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

    .btn {
        width: 200px;
    }

    .education-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

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

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

/* Medium tablets and smaller */
@media (max-width: 640px) {
    .hero-title {
        font-size: 1.5rem;
    }
}

/* Very small phones - target phones with width around 360-375px */
@media (max-width: 400px) {
    .container {
        padding: 0 0.25rem; /* Absolute minimal padding */
    }

    .contact-page {
        padding-top: 60px; /* Minimal top padding */
    }

    .resume-title {
        font-size: 1.5rem;
        margin-bottom: 0.1rem; /* Almost no margin */
    }

    .resume-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.1rem; /* Almost no margin */
    }

    .resume-buttons {
        margin-bottom: 1rem; /* More spacing below Open in New Tab button */
        gap: 0.75rem; /* Increase gap between buttons */
    }

    .btn {
        width: 180px; /* Smaller buttons */
        padding: 0.75rem 1rem; /* Better padding for text centering */
    }

    .contact-layout {
        gap: 0.1rem; /* Almost no gap */
        margin: 0.1rem 0.25rem; /* Absolute minimal margins */
    }

    .pdf-viewer {
        height: calc(100vh - 200px); /* Calculate remaining screen height minus header/content */
        min-height: 500px; /* Force taller height */
        max-height: calc(100vh - 150px); /* Maximum to fill most of screen */
        border-radius: 4px; /* Smaller border radius to save space */
    }

    .contact-box {
        padding: 1rem; /* Reduce contact box padding */
        margin-bottom: 0.25rem; /* Minimal bottom margin */
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem; /* Even less padding for small screens */
    }

    .nav-container {
        padding: 0 1rem;
    }

    section {
        padding: 2rem 0; /* Reduce section padding */
    }

    .contact-page {
        padding-top: 70px; /* Less top padding for small screens */
    }

    .resume-title {
        font-size: 1.75rem; /* Smaller title */
        margin-bottom: 0.25rem;
    }

    .resume-subtitle {
        font-size: 0.9rem; /* Even smaller subtitle */
        margin-bottom: 0.25rem;
    }

    .resume-buttons {
        margin-bottom: 0.25rem; /* Minimal margin */
    }

    .contact-layout {
        gap: 0.25rem; /* Minimal gap */
        margin: 0.25rem 0.5rem; /* Very minimal margins */
    }

    .pdf-viewer {
        height: 70vh; /* Use more screen height on small phones */
        min-height: 450px; /* Taller minimum to fill screen better */
    }

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

    .hero-content {
        padding: 0 1rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .education-item {
        padding: 1.5rem;
    }
}