/* ===== TABLET STYLES ===== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
        --section-padding-sm: 50px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: clamp(2.5rem, 6vw, 4rem);
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        letter-spacing: 2px;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    /* Featured Section */
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    /* About Preview */
    .about-content {
        gap: 3rem;
    }
    
    .about-image::before {
        top: 15px;
        left: 15px;
        right: -15px;
        bottom: -15px;
    }
    
    /* Biography */
    .bio-content {
        gap: 3rem;
    }
    
    .bio-image {
        position: static;
    }
    
    /* Timeline */
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-item:nth-child(odd) {
        flex-direction: row !important;
    }
    
    .timeline-year {
        position: absolute;
        left: 0;
        margin: 0;
    }
    
    .timeline-content {
        margin-left: 0;
    }
    
    /* Portfolio */
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    /* Blog */
    .featured-article {
        gap: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    /* Contact */
    .contact-content {
        gap: 3rem;
    }
    
    .form-row {
        gap: 0.75rem;
    }
    
    .newsletter-form {
        max-width: 350px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

/* ===== MOBILE LANDSCAPE ===== */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --section-padding-sm: 40px 0;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition-smooth);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .nav-link {
        padding: 1rem 0;
        font-size: 1.2rem;
        border-bottom: 1px solid var(--border-color);
        width: 90%;
        text-align: center;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero-content {
        padding: 0 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    /* Featured Section */
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* About Preview */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-image {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-image::before {
        top: 10px;
        left: 10px;
        right: -10px;
        bottom: -10px;
    }
    
    /* News Preview */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Biography */
    .bio-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .bio-image {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* Philosophy */
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Awards */
    .awards-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    /* Portfolio */
    .filter-tabs {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Blog */
    .featured-article {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-content {
        order: 2;
    }
    
    .featured-image {
        order: 1;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        max-width: 100%;
        gap: 1rem;
    }
    
    .newsletter-form .btn {
        max-width: none;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        order: -1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ===== MOBILE PORTRAIT ===== */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
        --section-padding-sm: 30px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* Navigation */
    .nav-container {
        padding: 1rem 10px;
    }
    
    .nav-logo h2 {
        font-size: 1.25rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 120px 0 80px 0;
    }
    
    .page-header h1 {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Cards and Items */
    .featured-item,
    .portfolio-item {
        aspect-ratio: 16/10;
    }
    
    .featured-overlay,
    .portfolio-overlay {
        padding: 1.5rem;
    }
    
    .news-card,
    .post-card,
    .contact-card,
    .philosophy-item,
    .award-item,
    .category-card,
    .faq-item {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Timeline */
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 25px;
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 6px 15px;
        font-size: 0.75rem;
    }
    
    /* Form Elements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .checkbox-label {
        font-size: 0.9rem;
    }
    
    /* Social Links */
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    /* Spacing Adjustments */
    .section-header {
        margin-bottom: 2rem;
    }
    
    .philosophy-content h2,
    .awards .section-title,
    .blog-categories .section-title,
    .faq-section .section-title {
        margin-bottom: 2rem;
    }
    
    /* Text Sizes */
    h3 {
        font-size: clamp(1.25rem, 3vw, 1.5rem);
    }
    
    h4 {
        font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    }
    
    .bio-text p,
    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .featured-content p,
    .post-content p {
        font-size: 0.95rem;
    }
}

/* ===== EXTRA SMALL DEVICES ===== */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .hero-content {
        padding: 0 8px;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }
    
    .featured-overlay,
    .portfolio-overlay {
        padding: 1rem;
    }
    
    .news-card,
    .post-card,
    .contact-card,
    .philosophy-item,
    .award-item,
    .category-card,
    .faq-item,
    .contact-form {
        padding: 1.25rem;
    }
    
    .timeline-content {
        padding: 1.25rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
    }
    
    .contact-icon i {
        font-size: 1.1rem;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    .scroll-indicator {
        bottom: 20px;
        font-size: 1.25rem;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp rendering on high DPI displays */
    .hero-image,
    .featured-image img,
    .about-image img,
    .bio-image img,
    .news-image img,
    .post-image img,
    .portfolio-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== REDUCED MOTION ===== */
@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;
    }
    
    .hero-title .title-line,
    .hero-subtitle,
    .hero-description,
    .hero-buttons {
        opacity: 1;
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .hero-buttons,
    .btn,
    .social-links,
    .scroll-indicator,
    .nav-toggle,
    .portfolio-links,
    .newsletter,
    .contact-form {
        display: none !important;
    }
    
    .hero {
        height: auto;
        page-break-after: always;
    }
    
    .hero-content {
        padding: 2rem 0;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .timeline-item,
    .featured-item,
    .portfolio-item,
    .news-card,
    .post-card {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
    
    .footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        border-top: 1px solid #ccc;
        padding: 1rem 0;
    }
}
