/* ===== Responsive Design ===== */

/* Large Tablets (1024px and below) */
@media (max-width: 1024px) {
    :root {
        --container-width: 960px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

    .research-card.full-width {
        grid-column: 1;
    }

    .tech-card.core-tech {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tech-card.core-tech .tech-visual {
        order: -1;
    }

    .tech-card:not(.core-tech) {
        grid-template-columns: 1fr;
    }

    .tech-image {
        min-height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--bg-gray);
    }

    .tech-image img {
        padding: 1.5rem;
    }

    .tech-card-content {
        padding: 2rem;
    }

    .ecosystem-grid {
        grid-template-columns: 1fr;
    }

    .positions-grid {
        grid-template-columns: 1fr;
    }

    .leader-content {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr 2fr;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    :root {
        --container-width: 100%;
        --section-padding: 60px 0;
    }

    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
    }

    .nav-link {
        display: block;
        padding: 0.5rem 0;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-tagline-zh {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }

    /* Sections */
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .tech-card:not(.core-tech) {
        grid-template-columns: 1fr;
    }

    .tech-image {
        min-height: 280px;
        border-right: none;
        border-bottom: 1px solid var(--bg-gray);
    }

    .tech-image img {
        padding: 1.2rem;
    }

    .tech-card-content {
        padding: 1.8rem;
    }

    /* Research & Tech Cards */
    .research-card,
    .eco-card,
    .position-card {
        padding: 2rem 1.5rem;
    }

    .research-card h3,
    .eco-card h3,
    .position-card h3 {
        font-size: 1.3rem;
    }

    .tech-card-content h3 {
        font-size: 1.3rem;
    }

    /* Leader Section */
    .leader-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .leader-image {
        max-width: 300px;
        margin: 0 auto;
    }

    .leader-name {
        font-size: 1.6rem;
        text-align: center;
    }

    .leader-title,
    .leader-title-zh {
        text-align: center;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-logo {
        display: flex;
        justify-content: center;
    }
}

/* Mobile Phones (480px and below) */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }

    .container {
        padding: 0 15px;
    }

    /* Hero */
    .hero {
        min-height: 100vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-tagline-zh {
        font-size: 0.9rem;
    }

    /* Sections */
    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .about-sections {
        margin-top: 2rem;
        gap: 2rem;
    }

    .about-section {
        padding: 1.5rem;
    }

    .about-section h3 {
        font-size: 1.2rem;
    }

    .field-tags {
        gap: 0.8rem;
    }

    .field-tag {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Cards */
    .research-card,
    .tech-card,
    .eco-card,
    .position-card {
        padding: 1.5rem;
    }

    .tech-card:not(.core-tech) {
        grid-template-columns: 1fr;
    }

    .tech-image {
        min-height: 250px;
        border-right: none;
        border-bottom: 1px solid var(--bg-gray);
    }

    .tech-image img {
        padding: 1rem;
    }

    .tech-card-content {
        padding: 1.5rem;
    }

    .card-icon,
    .tech-icon {
        width: 50px;
        height: 50px;
    }

    .eco-icon {
        font-size: 2.5rem;
    }

    .tech-card-content h3 {
        font-size: 1.1rem;
    }

    /* Quotes */
    .quote {
        padding: 1.5rem;
        font-size: 1rem;
    }

    .quote::before {
        font-size: 3rem;
        top: -5px;
    }

    /* Mission Highlight */
    .mission-highlight {
        padding: 1.5rem;
    }

    /* Join Section */
    .contact-cta {
        padding: 2rem 1.5rem;
    }

    .contact-cta h3 {
        font-size: 1.5rem;
    }

    .cta-button.large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    /* Navigation */
    .nav-logo img {
        height: 40px;
    }

    .nav-menu {
        top: 60px;
    }
}

/* Extra Small Devices (320px and below) */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .research-card h3,
    .tech-card h3,
    .eco-card h3,
    .position-card h3 {
        font-size: 1.1rem;
    }

    .research-card p,
    .tech-card p,
    .eco-card p,
    .position-card p {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .scroll-indicator,
    .footer,
    .contact-cta {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }

    .research-card,
    .tech-card,
    .eco-card {
        break-inside: avoid;
    }
}

/* Large Screens (1440px and above) */
@media (min-width: 1440px) {
    :root {
        --container-width: 1320px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .nav-logo img,
    .footer-logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-indicator span {
        animation: none;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Note: We're keeping light theme as default, but this is prepared for future dark mode */
}

/* Landscape Orientation on Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }
}