/* ===== Mobile Responsive Styles ===== */

@media screen and (max-width: 992px) {
    /* Header & Navigation */
    .header-home .container {
        position: relative;
        padding: 10px 12px;
        gap: 10px;
    }

    .header-home .home-logo-left img,
    .header-home .home-logo-right img {
        height: 44px;
    }

    .header-home .home-site-title {
        min-width: 0;
    }

    .header-home .home-site-title h1 {
        font-size: 1.18rem;
    }

    .header-home .home-site-title p {
        display: none;
    }

    .header-home .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        box-shadow: var(--shadow);
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        z-index: 1200;
    }

    .header-home .main-nav.active,
    .header-home .main-nav.is-open {
        display: block;
    }

    .header-home .main-nav ul {
        flex-direction: column;
        padding: 10px 12px 14px;
        gap: 4px;
    }

    .header-home .main-nav a {
        padding: 12px 14px;
        border-radius: 8px;
    }

    .header-home .mobile-menu-btn {
        display: inline-flex;
        margin-left: auto;
    }

    /* Hero Section */
    .hero {
        min-height: 430px;
    }

    .hero-content {
        padding: 95px 20px 70px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .carousel-track,
    .carousel-slide img {
        height: 380px;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Page Header */
    .page-header h1 {
        font-size: 2rem;
    }

    /* Sections */
    .section {
        padding: 36px 0 60px;
    }

    .main-content {
        padding: 60px 0 80px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Content Layout */
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        justify-content: stretch;
    }

    /* Contact Page */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Person Detail */
    .person-detail-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .person-photo {
        max-width: 250px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    .header-home .home-logo-right {
        display: none;
    }

    .header-home .home-logo-left img {
        height: 40px;
    }

    .header-home .home-site-title h1 {
        font-size: 1.04rem;
    }

    /* Typography */
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Hero */
    .hero {
        min-height: 360px;
    }

    .hero-content {
        padding: 90px 20px 60px;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .carousel-track,
    .carousel-slide img {
        height: 300px;
    }

    .positions-grid {
        grid-template-columns: 1fr;
    }

    /* Grid Layouts */
    .research-showcase {
        gap: 14px;
    }

    .research-nav {
        align-items: flex-end;
        justify-content: flex-start;
        gap: 18px;
    }

    .research-nav-item {
        padding: 6px 8px 8px;
        font-size: 0.95rem;
    }

    .research-display {
        min-height: 340px;
    }

    .research-panel-media {
        flex-basis: 44%;
        min-height: 100%;
    }

    .research-panel-body {
        padding: 20px 22px;
    }

    .people-grid {
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .person-card {
        padding: 9px 10px;
        gap: 10px;
        min-height: 96px;
    }

    .person-card-photo {
        flex-basis: 66px;
    }

    .person-card img {
        width: 66px;
        height: 88px;
    }

    /* News & Publications */
    .news-item {
        flex-direction: column;
        gap: 15px;
    }

    .news-item--highlight,
    .news-article--highlight {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .home-news-regular-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-news-nav.prev {
        left: -10px;
    }

    .home-news-nav.next {
        right: -10px;
    }

    .news-media-arrow.prev,
    .research-media-arrow.prev {
        left: -10px;
    }

    .news-media-arrow.next,
    .research-media-arrow.next {
        right: -10px;
    }

    .news-item--highlight .news-highlight-content h3,
    .news-article--highlight h3 {
        font-size: 1.4rem;
    }

    .home-news-regular-grid {
        grid-template-columns: 1fr;
    }

    .home-news-nav {
        width: 36px;
        height: 36px;
    }

    .home-news-highlight-slide {
        transform: translateX(24px);
    }

    .news-item--highlight .news-highlight-content p,
    .news-article--highlight p {
        font-size: 1rem;
    }

    .news-list-pagination {
        justify-content: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .news-page-summary {
        width: 100%;
        margin-left: 0;
        text-align: right;
    }

    .pub-item {
        flex-direction: column;
        gap: 15px;
    }

    .pub-filters {
        justify-content: center;
    }

    .publications-list .pub-year-grid {
        grid-template-columns: 1fr;
    }

    .publications-list .pub-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .pub-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pub-detail-actions .btn {
        width: 100%;
    }

    /* Research List */
    .research-list-item {
        flex-direction: column;
        padding: 18px;
    }

    .research-list-media {
        flex: 1 1 auto;
    }

    .research-list-body .btn {
        width: 100%;
        text-align: center;
    }

    .research-intro-layout {
        grid-template-columns: 1fr;
    }

    /* News Detail */
    .news-detail-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

@media screen and (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    .header .container {
        padding: 15px;
    }

    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo img {
        height: 50px;
    }

    .site-title h1 {
        font-size: 1.25rem;
    }

    .site-title p {
        font-size: 0.8rem;
    }

    /* Hero */
    .hero {
        min-height: 300px;
    }

    .hero-content {
        padding: 80px 15px 50px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .carousel-track,
    .carousel-slide img {
        height: 220px;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .research-display {
        min-height: 430px;
    }

    .research-nav {
        gap: 10px;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .research-nav-item {
        flex: 0 0 auto;
        padding: 6px 6px 8px;
        font-size: 0.9rem;
    }

    .research-panel {
        flex-direction: column;
    }

    .research-panel-media {
        flex-basis: 48%;
        min-height: 180px;
    }

    .research-panel-body {
        padding: 16px;
        gap: 10px;
    }

    /* Sections */
    .section {
        padding: 26px 0 40px;
    }

    .main-content {
        padding: 48px 0 64px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    /* Page Header */
    .page-header {
        padding: 40px 15px;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    /* Cards */
    .research-card,
    .person-card,
    .news-article,
    .pub-item {
        padding: 20px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        gap: 25px;
    }

    .social-links {
        flex-direction: column;
    }

    .social-icon {
        text-align: center;
    }

    /* Detail Pages */
    .person-detail-header,
    .pub-detail-header {
        padding: 25px;
    }

    .news-media-arrow,
    .research-media-arrow {
        width: 30px;
        height: 30px;
    }

    .detail-section {
        margin-bottom: 30px;
    }

    /* Forms */
    .contact-form input,
    .contact-form textarea {
        padding: 10px;
        font-size: 0.9rem;
    }

    /* Publications */
    .pub-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .pub-link {
        display: block;
        text-align: center;
    }

    .news-page-btn {
        min-width: 34px;
        height: 32px;
        padding: 0 10px;
        font-size: 0.86rem;
    }

    .news-page-btn--nav {
        min-width: 58px;
    }

    /* Keywords */
    .keyword {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

/* ===== Tablet Specific ===== */
@media screen and (min-width: 769px) and (max-width: 992px) {
    .research-nav {
        justify-content: flex-start;
    }
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .footer,
    .mobile-menu-btn,
    .btn,
    .pub-links,
    .news-share {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    .section {
        padding: 20px 0;
    }

    .pub-item,
    .news-item,
    .person-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #0000ff;
        --text-color: #000000;
        --border-color: #000000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Dark Mode Support (Optional) ===== */
@media (prefers-color-scheme: dark) {
    /* Uncomment and customize if you want dark mode support */
    /*
    :root {
        --primary-color: #4da6ff;
        --secondary-color: #80bfff;
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --bg-light: #1a1a2e;
        --bg-white: #16213e;
        --border-color: #404040;
    }
    */
}