/* Responsive Design */

/* Large Devices (992px - 1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .image-container {
        width: 350px;
        height: 350px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Medium Devices (768px - 991px) */
/* Medium Devices (768px - 991px) */
@media (max-width: 991px) {
    /* HERO SECTION FIXES */
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content {
        max-width: 100%;
    }

    /* Moves Hero Image to top on mobile */
    .hero-image {
        order: -1; 
        margin-bottom: 30px;
        display: flex;
        justify-content: center;
    }

    /* --- ABOUT SECTION FIXES (New Code) --- */
    
    /* 1. Stack the layout: Text on top, Image on bottom */
    .about-content {
        display: flex;
        flex-direction: column-reverse; /* Puts image on top, text below */
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    /* 2. Reset text width so it doesn't look squashed */
    .about-text {
        width: 100%;
        padding-right: 0;
    }

    /* 3. Style the 'Highlight Card' to pop */
    .about-highlight {
        background-color: #f8fafc;
        border-left: 4px solid #7c3aed; /* Purple accent */
        padding: 20px;
        margin: 25px 0;
        border-radius: 8px;
        text-align: left; /* Keep the quote readable */
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    /* 4. Fix the About Image size */
    .about-image .image-container {
        width: 280px !important;  /* Force smaller size */
        height: 280px !important;
        margin: 0 auto;
    }
    /* ------------------------------------- */

    /* OTHER MOBILE ADJUSTMENTS */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Global Image Container Fix */
    .image-container {
        width: 320px;
        height: 320px;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Timeline adjustments */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-marker {
        left: 20px !important;
        right: auto !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        left: -10px;
        right: auto;
        border-right: 10px solid var(--card-bg);
        border-left: none;
    }


/* Small Devices (576px - 767px) */
@media (max-width: 767px) {
    .hero {
        padding-top: 120px;
        padding-bottom: 80px;
    }
    
    section {
        padding: 80px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat h3 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .image-container {
        width: 280px;
        height: 280px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        justify-content: center;
        padding: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-info p {
        margin: 0 auto 20px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links h4::after, .footer-contact h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .research-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-info-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Extra Small Devices (up to 575px) */
@media (max-width: 575px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat {
        min-width: 100px;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .floating-badge {
        width: 90%;            /* Make it fit nicely */
        bottom: -30px;         /* Move it further down below the image */
        left: 50%;             /* Center it horizontally */
        transform: translateX(-50%); /* Ensure perfect centering */
        padding: 10px 15px;    /* Smaller padding */
        font-size: 0.8rem;     /* Smaller text size */
        white-space: nowrap;   /* Keep text on one line if possible, or let it wrap naturally */
    }
    .floating-badge i {
        font-size: 1.2rem;     /* Make the icon smaller too */
    }
    .skill-card, .contact-info-card, .contact-actions-card {
        padding: 25px;
    }
    
    .research-card {
        padding: 25px;
    }
    
    .research-title {
        font-size: 1.6rem;
    }
}
}