/* ======================
   Responsive Design
   ====================== */

/* Large Tablets and Small Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .achievement-card.featured {
        grid-column: span 1;
    }
    
    .leadership-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }
    
    html {
        font-size: 15px;
    }
    
    .navbar .container {
        position: relative;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: left var(--transition-normal);
        border-right: 1px solid var(--border-color);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .nav-link {
        padding: 0.75rem;
        border-radius: 0.5rem;
    }
    
    .nav-link:hover {
        background: var(--bg-secondary);
    }
    
    .theme-toggle {
        margin-top: 1rem;
    }
    
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-tagline {
        font-size: 1.125rem;
        flex-wrap: wrap;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .leadership-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -2rem;
        width: 12px;
        height: 12px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-date {
        align-self: flex-start;
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
    }
    
    .credential-card {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px;
        --container-padding: 15px;
    }
    
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand .brand-name {
        font-size: 1.25rem;
    }
    
    .hero {
        padding: 80px 0 50px;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .greeting {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-social {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
    
    .section-label {
        font-size: 0.75rem;
        padding: 0.375rem 0.875rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .about-highlights {
        gap: 1rem;
    }
    
    .highlight-item {
        padding: 1rem;
    }
    
    .achievements-grid {
        gap: 1rem;
    }
    
    .achievement-card {
        padding: 1.5rem;
    }
    
    .achievement-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .achievement-title {
        font-size: 1.125rem;
    }
    
    .achievement-impact {
        font-size: 1.25rem;
    }
    
    .leadership-grid {
        gap: 1rem;
    }
    
    .leadership-card {
        padding: 1.5rem;
    }
    
    .leadership-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .expertise-category {
        padding: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
    
    .skill-item {
        padding: 0.75rem;
    }
    
    .skill-item i {
        font-size: 1.5rem;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
        width: 10px;
        height: 10px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-header h3 {
        font-size: 1.125rem;
    }
    
    .timeline-header h4 {
        font-size: 1rem;
    }
    
    .credentials-grid {
        gap: 1.5rem;
    }
    
    .credential-card {
        padding: 1.25rem;
    }
    
    .credential-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .contact-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
    
    .cta-card {
        padding: 2rem;
    }
    
    .cta-card h3 {
        font-size: 1.5rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* Small Mobile Phones (max-width: 375px) */
@media (max-width: 375px) {
    .name {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .achievements-grid,
    .leadership-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-cta,
    .hero-social,
    .scroll-indicator,
    .theme-toggle,
    .back-to-top,
    .footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 30px 0;
    }
    
    .achievement-card,
    .leadership-card,
    .timeline-content,
    .credential-card {
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
    
    .hero {
        min-height: auto;
        padding: 50px 0;
    }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
    }
    
    .btn,
    .achievement-card,
    .leadership-card,
    .timeline-content,
    .credential-card,
    .contact-card {
        border-width: 2px;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}