/* Enhanced Mobile Responsive CSS for CV Dashboard */

/* Base Mobile Styles - Foundation */
@media screen and (max-width: 768px) {
    * {
        box-sizing: border-box;
    }

    html {
        font-size: 14px;
        scroll-behavior: smooth;
    }

    body {
        font-size: 14px;
        line-height: 1.5;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    .dashboard {
        padding: 0;
        margin: 0;
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }

    /* Enhanced Header Mobile Optimization */
    .header {
        padding: 1rem;
        min-height: auto;
        text-align: center;
    }

    .header-bg {
        display: none;
    }

    .profile-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 0;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        margin: 0 auto;
        flex-shrink: 0;
    }

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

    .change-photo-btn {
        width: 32px;
        height: 32px;
        bottom: -2px;
        right: -2px;
    }

    .profile-info {
        width: 100%;
        max-width: 400px;
    }

    .profile-info h1 {
        font-size: 1.8rem;
        margin: 0.5rem 0;
        line-height: 1.2;
        letter-spacing: -1px;
        word-break: break-word;
    }

    .profile-info .title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        letter-spacing: 1px;
    }

    .profile-info .institution {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .profile-badges {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        border-radius: 15px;
        white-space: nowrap;
    }

    .visitor-badge {
        font-size: 0.7rem;
    }

    /* Enhanced Contact Info Mobile */
    .contact-info {
        width: 100%;
        max-width: 400px;
        flex-direction: column;
        gap: 0.75rem;
        margin: 0 auto;
    }

    .contact-item {
        justify-content: center;
        font-size: 0.85rem;
        padding: 0.75rem;
        border-radius: 12px;
        min-height: 48px;
        width: 100%;
    }

    .contact-item svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .contact-item a {
        word-break: break-all;
        text-align: center;
    }

    /* Enhanced Navigation Mobile */
    .nav-tabs {
        padding: 0.5rem;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        min-width: 80px;
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
        flex-shrink: 0;
        flex-direction: column;
        gap: 0.25rem;
        border-radius: 12px;
        margin: 0 0.25rem;
        scroll-snap-align: start;
        min-height: 48px;
    }

    .tab-btn svg {
        width: 18px;
        height: 18px;
    }

    .tab-btn span {
        display: block;
        text-align: center;
        line-height: 1.2;
    }

    /* Enhanced Content Mobile */
    .content {
        padding: 1rem;
    }

    .tab-content {
        animation: fadeInUp 0.3s ease-out;
    }

    /* Enhanced Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .stat-card {
        padding: 1.25rem;
        min-height: auto;
        border-radius: 16px;
        position: relative;
    }

    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: 1rem;
    }

    .stat-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .stat-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .stat-content p {
        font-size: 0.85rem;
    }

    .stat-progress {
        margin-top: 1rem;
        height: 6px;
    }

    .card-overlay {
        border-radius: 16px;
    }

    .view-details {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        border-radius: 20px;
    }

    /* Enhanced Timeline Mobile */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline::before {
        left: 0.75rem;
        width: 2px;
    }

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

    .timeline-marker {
        left: -1.75rem;
        width: 0.75rem;
        height: 0.75rem;
        top: 1rem;
    }

    .timeline-content {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .timeline-content .institution,
    .timeline-content .university {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .year, .marks {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 15px;
    }

    /* Enhanced Experience Grid Mobile */
    .experience-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .exp-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .exp-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .exp-card .company,
    .exp-card .duration,
    .exp-card .type {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .exp-card .type {
        display: inline-block;
        margin-top: 0.75rem;
        padding: 0.4rem 0.8rem;
        border-radius: 15px;
    }

    /* Enhanced Skills Grid Mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .skill-category h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

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

    .skill-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        border-radius: 15px;
        text-align: center;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Enhanced Research Interests Mobile */
    .research-interests {
        gap: 0.75rem;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .interest-tag {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        border-radius: 20px;
        text-align: center;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        letter-spacing: 0.3px;
    }

    /* Enhanced Publications Mobile */
    .publications-list {
        gap: 1.5rem;
    }

    .pub-item {
        padding: 1.25rem;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .pub-content {
        flex: 1;
    }

    .pub-content h4 {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    .pub-content .authors {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .pub-content .journal {
        font-size: 0.8rem;
    }

    .publication-actions {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .pdf-request-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.85rem;
        border-radius: 12px;
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Enhanced Metrics Grid Mobile */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 300px;
        margin: 0 auto;
    }

    .metric {
        padding: 1.25rem;
        text-align: center;
        border-radius: 16px;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .metric-value {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

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

    /* Enhanced Gallery Mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item {
        border-radius: 16px;
    }

    .gallery-item img {
        height: 250px;
        border-radius: 16px;
    }

    /* Enhanced Category Cards Mobile */
    .category-cards,
    .categories-container {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .category-card {
        flex: 0 1 calc(50% - 0.375rem);
        min-width: 140px;
        max-width: 180px;
        padding: 1rem;
        border-radius: 12px;
        text-align: center;
        font-size: 0.8rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        word-break: break-word;
    }

    /* Very small screens */
    @media screen and (max-width: 320px) {
        .category-card {
            flex: 1 1 100%;
            max-width: none;
        }
    }

    /* Enhanced CV PDF Grid Mobile */
    .cv-pdf-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cv-pdf-item {
        padding: 1.25rem;
        border-radius: 16px;
        text-align: center;
    }

    .download-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
        border-radius: 12px;
        min-height: 48px;
    }


    .pdf-modal-header {
        padding: 0.75rem;
        border-bottom: 1px solid var(--border-color);
    }

    .pdf-modal-title {
        font-size: 1rem;
        margin: 0;
    }

    .pdf-modal-close {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
    }

    .pdf-viewer {
        height: calc(100% - 60px);
        padding: 0.5rem;
    }

    /* Enhanced Tooltip Mobile */
    .tooltip,
    .tip-window {
        position: fixed !important;
        max-width: 280px;
        padding: 0.75rem;
        font-size: 0.8rem;
        border-radius: 12px;
        z-index: 10000;
        box-shadow: 0 8px 32px rgba(0,0,0,0.3);
        backdrop-filter: blur(10px);
    }

    .tooltip-arrow {
        display: none;
    }

    /* Enhanced Form Fields Mobile */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: block;
    }

    .form-input,
    .form-textarea,
    .form-select {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        background: var(--glass-bg);
        min-height: 48px;
    }

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

    .form-button {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 12px;
        min-height: 48px;
        margin-top: 1rem;
    }

    /* Enhanced Notification Mobile */
    .notification,
    .alert {
        position: fixed;
        top: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 1rem;
        border-radius: 12px;
        font-size: 0.85rem;
        z-index: 10001;
    }

    /* Enhanced Loading States Mobile */
    .loading-spinner {
        width: 2rem;
        height: 2rem;
        margin: 2rem auto;
    }

    .loading-text {
        text-align: center;
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }

    /* Enhanced Search Mobile */
    .search-container {
        margin-bottom: 1.5rem;
    }

    .search-input {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 25px;
        border: 1px solid var(--border-color);
        background: var(--glass-bg);
        min-height: 48px;
    }

    .search-results {
        margin-top: 1rem;
    }

    .search-result-item {
        padding: 1rem;
        border-radius: 12px;
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
    }

    /* Enhanced Pagination Mobile */
    .pagination {
        justify-content: center;
        gap: 0.5rem;
        margin: 2rem 0;
        flex-wrap: wrap;
    }

    .page-btn {
        min-width: 44px;
        height: 44px;
        font-size: 0.85rem;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Enhanced Accordion Mobile */
    .accordion-item {
        margin-bottom: 0.75rem;
        border-radius: 12px;
        overflow: hidden;
    }

    .accordion-header {
        padding: 1rem;
        font-size: 0.9rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .accordion-content {
        padding: 1rem;
        font-size: 0.85rem;
        line-height: 1.6;
    }

    /* Enhanced Tabs Mobile */
    .tab-list {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    .tab-list::-webkit-scrollbar {
        display: none;
    }

    .tab-item {
        min-width: 100px;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        border-radius: 20px;
        margin-right: 0.5rem;
        flex-shrink: 0;
    }

    /* Enhanced Dropdown Mobile */
    .dropdown-menu {
        position: fixed;
        top: auto;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-height: 50vh;
        overflow-y: auto;
        border-radius: 16px;
        padding: 0.5rem;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        border-radius: 12px;
        margin-bottom: 0.25rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    /* Enhanced Progress Bars Mobile */
    .progress-container {
        margin: 1rem 0;
    }

    .progress-label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        display: flex;
        justify-content: space-between;
    }

    .progress-bar {
        height: 8px;
        border-radius: 4px;
        overflow: hidden;
    }

    /* Enhanced Card Hover Effects Mobile */
    .card:active,
    .stat-card:active,
    .exp-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* Enhanced Accessibility Mobile */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Focus styles for keyboard navigation */
    .tab-btn:focus,
    .btn:focus,
    .form-input:focus,
    .form-textarea:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Enhanced Print Styles */
    @media print {
        .nav-tabs,
        .modal-overlay,
        .tooltip {
            display: none !important;
        }
        
        .content {
            padding: 0;
        }
        
        .card {
            break-inside: avoid;
        }
    }
} margin-bottom: 0.5rem;
        display: flex;
        justify-content: space-between;
    }

    .progress-bar {
        height: 8px;
        border-radius: 4px;
        overflow: hidden;
    }

    /* Enhanced Card Hover Effects Mobile */
    .card:active,
    .stat-card:active,
    .exp-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* Enhanced Accessibility Mobile */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Focus styles for keyboard navigation */
    .tab-btn:focus,
    .btn:focus,
    .form-input:focus,
    .form-textarea:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Enhanced Print Styles */
    @media print {
        .nav-tabs,
        .modal-overlay,
        .tooltip {
            display: none !important;
        }
        
        .content {
            padding: 0;
        }
        
        .card {
            break-inside: avoid;
        }
    }
}
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .pdf-modal-header h3 {
        font-size: 1.1rem;
        margin: 0;
        padding-right: 0;
    }

    .pdf-close-btn,
    .pdf-modal-close {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }

    .pdf-viewer-container {
        padding: 0.5rem;
    }

    .pdf-viewer {
        border-radius: 8px;
    }

    /* Enhanced Form Elements Mobile */
    .pdf-form-group,
    .modal-form-group {
        margin-bottom: 1rem;
    }

    .pdf-form-group label,
    .modal-form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: block;
    }

    .pdf-form-group input,
    .pdf-form-group select,
    .pdf-form-group textarea,
    .modal-form-group input,
    .modal-form-group textarea,
    .modal-form-group select {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.75rem;
        border-radius: 12px;
        border: 2px solid var(--border-color);
        min-height: 48px;
    }

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

    .pdf-form-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .pdf-form-actions button {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 12px;
        min-height: 48px;
    }

    /* Enhanced Theme Toggle Mobile */
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        z-index: 1001;
    }

    .theme-toggle svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* Enhanced Admin Link Mobile */
    .admin-link {
        top: 1rem;
        right: 4rem;
        width: 44px;
        height: 44px;
    }

    .admin-link svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* Enhanced Footer Mobile */
    .website-request-footer {
        padding: 2rem 1rem;
        text-align: center;
    }

    .request-container {
        max-width: 400px;
        margin: 0 auto;
    }

    .request-content h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .request-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .request-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
        text-align: center;
        border-radius: 15px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    /* Enhanced Projects, Workshops, Internships Mobile */
    .projects-grid,
    .workshops-grid,
    .internships-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card,
    .workshop-card,
    .internship-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .project-card h3,
    .project-card h4,
    .workshop-card h4,
    .internship-card h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .project-description,
    .workshop-card .description,
    .internship-card .description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .project-tech,
    .workshop-card .date,
    .internship-card .date {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .workshop-card .location,
    .internship-card .location {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    /* Enhanced Empty State Mobile */
    .empty-state {
        padding: 3rem 1rem;
        text-align: center;
    }

    .empty-state-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .empty-state-text {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .empty-state-hint {
        font-size: 0.85rem;
    }

    /* Enhanced Objective Section Mobile */
    .objective-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
        border-radius: 16px;
    }

    .objective-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    .objective-section p {
        font-size: 0.9rem;
        line-height: 1.7;
        text-align: justify;
    }

    /* Enhanced Photo Upload Modal Mobile */
    .photo-upload-section {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .current-photo,
    .new-photo-preview {
        width: 100%;
    }

    .current-photo img,
    .new-photo-preview img {
        width: 120px;
        height: 120px;
        margin: 0 auto 0.5rem;
    }

    .upload-area {
        width: 100%;
    }

    .upload-label {
        padding: 1.5rem;
        border-radius: 16px;
        font-size: 0.9rem;
    }

    /* Enhanced AI Recommendations Mobile */
    .ai-recommendations-tab {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 16px;
    }

    .ai-tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .ai-tab-title {
        font-size: 1.1rem;
    }

    .ai-recommendation-item {
        padding: 1rem;
        border-radius: 12px;
        margin-bottom: 0.75rem;
    }

    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .recommendation-title {
        font-size: 0.9rem;
    }

    .recommendation-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .recommendation-tags {
        gap: 0.3rem;
    }

    .ai-tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .ai-personalization-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .ai-control-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Small Mobile Devices (320px - 480px) */
@media screen and (max-width: 480px) {
    html {
        font-size: 13px;
    }

    body {
        font-size: 13px;
    }

    .theme-toggle,
    .admin-link {
        width: 40px;
        height: 40px;
        top: 0.75rem;
    }

    .admin-link {
        right: 3.5rem;
    }

    .theme-toggle {
        right: 0.75rem;
    }

    .header {
        padding: 1rem 0.75rem;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .change-photo-btn {
        width: 28px;
        height: 28px;
    }

    .profile-info h1 {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
    }

    .profile-info .title {
        font-size: 0.9rem;
    }

    .profile-info .institution {
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .contact-item {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .contact-item svg {
        width: 16px;
        height: 16px;
    }

    .nav-tabs {
        padding: 0.25rem;
    }

    .tab-btn {
        min-width: 70px;
        padding: 0.5rem 0.6rem;
        font-size: 0.7rem;
    }

    .tab-btn svg {
        width: 16px;
        height: 16px;
    }

    .content {
        padding: 0.75rem;
    }

    .stat-card,
    .exp-card,
    .skill-category,
    .pub-item {
        padding: 1rem;
    }

    .stat-icon {
        width: 2rem;
        height: 2rem;
    }

    .stat-icon svg {
        width: 1rem;
        height: 1rem;
    }

    .stat-content h3 {
        font-size: 1rem;
    }

    .stat-content p {
        font-size: 0.8rem;
    }

    .timeline-content {
        padding: 1rem;
    }

    .timeline-content h3 {
        font-size: 1rem;
    }

    .exp-card h3 {
        font-size: 1rem;
    }

    .pub-content h4 {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .pub-content .authors,
    .pub-content .journal {
        font-size: 0.75rem;
    }

    .pdf-request-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .pdf-request-btn svg {
        width: 14px;
        height: 14px;
    }

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

    .skill-tag {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }

    .interest-tag {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    .metric-value {
        font-size: 1.8rem;
    }

    .metric-label {
        font-size: 0.8rem;
    }

    .modal-content {
        padding: 1rem;
        border-radius: 16px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .modal-close {
        width: 2rem;
        height: 2rem;
        font-size: 1.25rem;
    }

    .pdf-form-group input,
    .pdf-form-group select,
    .pdf-form-group textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .objective-section {
        padding: 1rem;
    }

    .objective-section h2 {
        font-size: 1.2rem;
    }

    .objective-section p {
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (max 320px) */
@media screen and (max-width: 320px) {
    .profile-info h1 {
        font-size: 1.4rem;
    }

    .profile-info .title {
        font-size: 0.85rem;
    }

    .tab-btn {
        min-width: 60px;
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
    }

    .tab-btn span {
        display: none;
    }

    .content {
        padding: 0.5rem;
    }

    .stat-card,
    .exp-card,
    .skill-category,
    .pub-item {
        padding: 0.75rem;
    }

    .modal-content {
        padding: 0.75rem;
    }

    .pdf-request-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* Landscape Mobile Optimization */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 1rem;
    }

    .profile-section {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 1rem;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        margin: 0;
    }

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

    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: none;
    }

    .contact-item {
        flex: 1;
        min-width: 200px;
    }

    .nav-tabs {
        padding: 0.25rem 0.5rem;
    }

    .tab-btn {
        padding: 0.4rem 0.6rem;
    }

    .content {
        padding: 0.75rem;
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .clickable-card,
    .tab-btn,
    .btn,
    .skill-tag,
    .interest-tag,
    .pdf-request-btn,
    .download-btn,
    .modal-btn {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        user-select: none;
    }

    .contact-item a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem;
        margin: -0.75rem;
        touch-action: manipulation;
    }

    .nav-tabs {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-image,
    .modal-image,
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Mobile Adjustments */
[data-theme="dark"] {
    @media screen and (max-width: 768px) {
        .stat-card,
        .exp-card,
        .skill-category,
        .pub-item,
        .timeline-content {
            background: var(--glass-heavy);
            border: 1px solid var(--glass-border-light);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        }

        .modal-content {
            background: linear-gradient(135deg, #1a202c, #2d3748);
            color: var(--text-primary);
        }

        .pdf-modal-content {
            background: #1a202c;
            color: var(--text-primary);
        }
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Mobile */
.tab-btn:focus,
.theme-toggle:focus,
.skill-tag:focus,
.interest-tag:focus,
.pdf-request-btn:focus,
.download-btn:focus,
.modal-btn:focus {
    outline: 3px solid var(--primary-gradient);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

.nav-tabs {
    scroll-behavior: smooth;
}

/* Print Styles for Mobile */
@media print {
    .theme-toggle,
    .admin-link,
    .nav-tabs {
        display: none !important;
    }

    .dashboard {
        box-shadow: none;
    }

    .tab-content {
        display: block !important;
        page-break-inside: avoid;
    }

    .stat-card,
    .exp-card,
    .pub-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}