/* Modern Mobile-First Responsive Design */

/* Mobile-First Base Styles */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Mobile First - Base (320px and up) */
.container {
    flex-direction: column;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.profile-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.profile-img {
    width: 140px;
    height: 175px;
}

h1 {
    font-size: 1.75rem;
}

.title {
    font-size: 1rem;
}

.main-content {
    padding: 1.5rem;
    max-height: none;
}

.content-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
}

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

.competencies-grid,
.certifications-grid,
.ghl-samples,
.references {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.competencies-grid div,
.certificate-item,
.ghl-sample,
.reference {
    padding: 1rem;
}

.experience-item,
.education-item,
.achievement {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Touch-friendly interactions */
.contact-info p,
.content-section ul li,
.competencies-grid div,
.certificate-item,
.ghl-sample,
.reference,
.experience-item,
.education-item {
    cursor: pointer;
}

.contact-info p:active,
.content-section ul li:active,
.competencies-grid div:active,
.certificate-item:active,
.ghl-sample:active,
.reference:active,
.experience-item:active,
.education-item:active {
    transform: scale(0.98);
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    .container {
        flex-direction: row;
        margin: 1rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-xl);
        max-height: calc(100vh - 2rem);
    }
    
    .sidebar {
        width: 320px;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        padding: 2rem;
    }
    
    .main-content {
        padding: 2rem;
        max-height: calc(100vh - 2rem);
    }
    
    .competencies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certifications-grid,
    .ghl-samples {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .references {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    .container {
        margin: 2rem auto;
        max-width: 1280px;
    }
    
    .sidebar {
        width: 350px;
        padding: 2.5rem;
    }
    
    .main-content {
        padding: 2.5rem;
    }
    
    .competencies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certifications-grid,
    .ghl-samples {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .references {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop Styles (1200px and up) */
@media (min-width: 1200px) {
    .certifications-grid,
    .ghl-samples {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Mobile Optimizations (max-width: 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .sidebar,
    .main-content {
        padding: 1rem;
    }
    
    .profile-section {
        padding: 1rem;
    }
    
    .profile-img {
        width: 120px;
        height: 150px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
    }
    
    .experience-item h3,
    .education-item h3 {
        font-size: 1.2rem;
    }
}

/* Landscape Mobile Optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        max-height: none;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .profile-section {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
        padding: 1rem;
    }
    
    .profile-img {
        width: 100px;
        height: 125px;
        margin-bottom: 0;
    }
    
    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .contact-info p {
        font-size: 0.8rem;
    }
}

/* Smooth scrolling for iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .main-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .content-section {
        border: 2px solid var(--text-primary);
    }
    
    .competencies-grid div,
    .certificate-item,
    .ghl-sample,
    .reference {
        border: 2px solid var(--text-primary);
    }
}

/* Services Package Responsive */
.service-categories {
    grid-template-columns: 1fr;
    gap: 15px;
}

.service-item {
    padding: 25px 20px;
}

.service-item i {
    font-size: 36px;
}

.service-item h3 {
    font-size: 18px;
}

.service-item p {
    font-size: 14px;
}

.btn-primary {
    padding: 10px 20px;
    font-size: 14px;
}

/* Services Package Tablet */
@media (min-width: 768px) {
    .service-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-item {
        padding: 30px 25px;
    }
    
    .service-item i {
        font-size: 42px;
    }
}

/* Services Package Desktop */
@media (min-width: 1024px) {
    .service-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .service-item {
        padding: 35px 30px;
    }
    
    .service-item i {
        font-size: 48px;
    }
}

/* Large desktop */
@media (min-width: 1200px) {
    .service-categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print styles */
@media print {
    .container {
        flex-direction: column;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #000;
    }
    
    .content-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .service-item,
    .certificate-item {
        break-inside: avoid;
    }
}