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

/* Tablets (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .career-timeline::before {
        left: 40px;
    }

    .career-icon {
        width: 80px;
        height: 80px;
    }

    .career-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* Tablets portrait (768px and below) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: linear-gradient(135deg, rgba(13, 21, 32, 0.98), rgba(20, 27, 40, 0.98));
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: var(--spacing-xl) var(--spacing-lg);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
        transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image:
            linear-gradient(rgba(74, 158, 255, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(74, 158, 255, 0.03) 1px, transparent 1px);
        background-size: 30px 30px;
        pointer-events: none;
        opacity: 0.5;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        max-width: 400px;
        opacity: 0;
        transform: translateX(-30px);
        animation: slideInMenu 0.4s ease forwards;
    }

    .nav-menu.active li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-menu.active li:nth-child(2) {
        animation-delay: 0.15s;
    }

    .nav-menu.active li:nth-child(3) {
        animation-delay: 0.2s;
    }

    .nav-menu.active li:nth-child(4) {
        animation-delay: 0.25s;
    }

    .nav-menu.active li:nth-child(5) {
        animation-delay: 0.3s;
    }

    .nav-menu.active li:nth-child(6) {
        animation-delay: 0.35s;
    }

    .nav-menu.active li:nth-child(7) {
        animation-delay: 0.4s;
    }

    .nav-menu.active li:nth-child(8) {
        animation-delay: 0.45s;
    }

    @keyframes slideInMenu {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .nav-link {
        display: block;
        padding: var(--spacing-md);
        width: 100%;
        text-align: center;
        font-size: 1.1rem;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        margin-bottom: var(--spacing-sm);
        background: rgba(74, 158, 255, 0.05);
        transition: all var(--transition-normal);
        position: relative;
        overflow: hidden;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), transparent);
        opacity: 0;
        transition: opacity var(--transition-normal);
    }

    .nav-link:hover::before,
    .nav-link.active::before {
        opacity: 1;
    }

    .nav-link:hover,
    .nav-link.active {
        border-color: var(--color-accent);
        box-shadow: 0 0 20px var(--glow-cyan);
        transform: translateY(-2px);
    }

    .language-switcher {
        margin-left: 0;
        margin-top: var(--spacing-lg);
        padding-top: var(--spacing-md);
        border-top: 1px solid var(--color-border);
        width: 100%;
        max-width: 400px;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .career-timeline::before {
        left: 30px;
    }

    .career-item {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .career-icon {
        width: 60px;
        height: 60px;
        align-self: flex-start;
    }

    .career-icon svg {
        width: 25px;
        height: 25px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .expertise-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero {
        min-height: 80vh;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-text {
        font-size: 0.95rem;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .about-text p,
    .teaching-content p {
        font-size: 1rem;
    }

    .career-timeline::before {
        display: none;
    }

    .career-item {
        padding-left: 0;
    }

    .career-icon {
        width: 50px;
        height: 50px;
    }

    .career-icon svg {
        width: 20px;
        height: 20px;
    }

    .service-card,
    .publication-card,
    .contact-item {
        padding: var(--spacing-sm);
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 1.5rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .lightbox-close {
        font-size: 2rem;
        top: 10px;
        right: 20px;
    }
}

/* Large screens (1440px and above) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 3rem;
    }
}