/* =========================================
   INTERESTS.CSS - Editorial Layouts & Grids
   ========================================= */

.page-content {
    padding: 120px 10% 80px 10%; 
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 80px;
    max-width: 600px;
    line-height: 1.6;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 50px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 10px;
}

/* --- 1. RESEARCH INTERESTS (Zig-Zag Layout) --- */

.research-container {
    display: flex;
    flex-direction: column;
    gap: 100px; /* Massive breathing room between topics */
    margin-bottom: 120px;
}

.research-block {
    display: flex;
    align-items: center;
    gap: 60px;
}

/* The Magic: This automatically reverses every second row! */
.research-block:nth-child(even) {
    flex-direction: row-reverse;
}

.research-image {
    flex: 1;
    height: 400px;
    background-color: #EAEAE6;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    font-family: var(--font-heading);
}

/* Subtle image zoom on hover for a premium feel */
.research-image::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-radius: 20px;
    transition: all 0.4s ease;
}

.research-block:hover .research-image::after {
    border-color: var(--accent-color);
    transform: scale(0.95);
}

.research-text {
    flex: 1;
}

.research-text h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

.research-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* --- 2. ONGOING PROJECTS (Massive Slider) --- */
.projects-section {
    margin-bottom: 120px;
}

.projects-slider {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 10px 50px 10px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    
    /* THE GLOBAL KILL SWITCH: Stops all cards from stretching globally */
    align-items: flex-start; 
}

.projects-slider::-webkit-scrollbar {
    display: none;
}

.project-card {
    flex: 0 0 600px; 
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    scroll-snap-align: start;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-left: 5px solid var(--accent-color); 
    
    /* Forces the box to completely ignore the page size and ONLY hug the text */
    height: max-content; 
    max-height: max-content;
}

/* Restored: The Hover Effect */
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(211, 84, 0, 0.1);
}

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.project-status {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(211, 84, 0, 0.1);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 30px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- 3. CO-CURRICULAR & EXTRA-CURRICULAR GRIDS --- */
.hobbies-section {
    margin-bottom: 100px;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.hobby-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.4s ease;
    text-align: center;
}

.hobby-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.hobby-image {
    height: 200px;
    background-color: #EAEAE6;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    overflow: hidden; /* CRITICAL: This ensures nothing spills outside the box */
}

/* Add this magic rule specifically for the images */
.hobby-image img {
    width: 60%;
    height: 100%;
    object-fit: cover; /* THE SILVER BULLET: This perfectly crops the image to fill the box without squishing it */
    object-position: center; /* Keeps the most important part of the image centered */
}

.hobby-text {
    padding: 25px;
}

.hobby-text h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.hobby-text p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* =========================================
   MOBILE RESPONSIVENESS (INTERESTS PAGE)
   ========================================= */

@media (max-width: 768px) {
    /* --- General Page Spacing --- */
    .page-content {
        padding: 100px 7% 60px 7%; 
    }

    .page-title {
        font-size: 2.5rem; 
        margin-bottom: 15px;
    }

    .page-subtitle {
        font-size: 1rem;
        margin-bottom: 50px; 
    }

    .section-heading {
        font-size: 1.8rem; 
        margin-bottom: 30px;
    }

    /* --- 1. Research Interests (Fixing the Zig-Zag) --- */
    .research-container {
        gap: 60px; 
        margin-bottom: 80px;
    }

    .research-block {
        flex-direction: column; 
        gap: 25px;
    }

    .research-block:nth-child(even) {
        flex-direction: column; 
    }

    .research-image {
        width: 100%;
        height: 250px; 
    }

    .research-text h3 {
        font-size: 1.5rem; 
        margin-bottom: 15px;
    }

    .research-text p {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* --- 2. Ongoing Projects (The Peek Effect Slider) --- */
    .projects-section {
        margin-bottom: 80px;
    }

    .projects-slider {
        gap: 50px;
        padding-bottom: 0px; 
        margin-right: -7%;
        padding-right: 7%;
        align-items: flex-start !important; 
    }

    .project-card {
        flex: 0 0 85vw; 
        padding: 25px 20px 20px 20px;  
        
        /* THE SILVER BULLET: This forces the individual card to collapse 
           to its content height and absolutely refuses to stretch vertically */
        align-self: flex-start;
        height: max-content !important; 
    }

    .project-status {
        font-size: 0.75rem;
        margin-bottom: 12px;
        padding: 5px 10px;
        display: inline-block;
    }

    .project-card h3 {
        font-size: 1.3rem; 
        line-height: 1.4;
        margin-bottom: 0 !important; /* Removes invisible space under the title */
    }

    /* --- 3. Co-Curricular & Extra-Curricular Grids --- */
    .hobbies-section {
        margin-bottom: 60px;
    }

    .hobbies-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    .hobby-image {
        height: 180px; 
    }

    .hobby-text {
        padding: 20px;
    }

    .hobby-text h4 {
        font-size: 1.2rem;
    }

    .hobby-text p {
        font-size: 0.95rem;
        margin-bottom: 0;
    }
}