/* =========================================
   LEARNINGS.CSS - Profile, Grids, & Sliders
   ========================================= */

/* --- PAGE CONTAINER (Fixes the padding issue!) --- */
.page-content {
    /* Top padding is 120px to clear the fixed navbar. Left/Right padding is 10% to keep content away from screen edges */
    padding: 120px 10% 80px 10%; 
}

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

.section-spacing {
    margin-bottom: 100px; /* Big breathing room between sections */
}

/* --- 1. PROFILE SECTION --- */
.profile-section {
    display: flex;
    align-items: center;
    gap: 60px;
}

.profile-image-container {
    flex: 0 0 350px;
    height: 450px;
    background-color: #E0E0DB; /* Placeholder */
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.profile-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.profile-text p {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #444;
}

/* --- THE MASTER CARD STYLE (Used everywhere) --- */
.card {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-top: 4px solid transparent; /* Hidden border for a cool hover effect */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(211, 84, 0, 0.12);
    border-top: 4px solid var(--accent-color); /* Saffron line appears on top when hovering */
}

.card-date {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
}

.card-link:hover {
    color: var(--accent-color);
}

/* --- 2. DYNAMIC GRIDS (Education & Skills) --- */
.dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Cards will be at least 320px, and stretch to fill space */
    gap: 30px;
}

/* Skills specifically need smaller cards */
.skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.skill-card:hover {
    background-color: var(--accent-color);
    color: #FFF;
    transform: scale(1.05); /* Slightly zooms in instead of lifting up */
}

/* --- 3. HORIZONTAL SLIDERS (Experience & Pubs) --- */
.horizontal-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 10px 40px 10px; /* Padding allows the drop shadow to be seen without getting cut off */
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.horizontal-slider::-webkit-scrollbar {
    display: none; /* Hides scrollbar for clean UI */
}

.slider-card {
    flex: 0 0 400px; /* Forces cards to be exactly 400px wide. They will NOT shrink. */
    scroll-snap-align: start;
}

.large-slider-card {
    flex: 0 0 550px; /* Publications get wider cards */
    scroll-snap-align: start;
}


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

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

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

    .section-spacing {
        margin-bottom: 60px; /* Reduced from 100px so mobile users don't scroll through dead space */
    }

    /* --- 1. Profile Section --- */
    .profile-section {
        /* This flips the layout so the text is ON TOP and the image is ON BOTTOM */
        flex-direction: column-reverse; 
        gap: 30px;
        text-align: center;
    }

    .profile-text h1 {
        font-size: 2.5rem; /* Shrunk from 3.5rem */
        margin-bottom: 15px;
    }

    .profile-text p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .profile-image-container {
        flex: none; /* Removes the fixed 350px flex basis */
        width: 100%;
        height: 350px; /* Slightly shorter for mobile screens */
    }

    /* --- 2. Education & Dynamic Grids --- */
    .dynamic-grid {
        grid-template-columns: 1fr; /* Forces exactly one column */
        gap: 25px;
    }

    /* Centers the Education text and adds nice side padding */
    .dynamic-grid .card {
        text-align: center;
        padding: 30px 20px; 
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr); /* Puts skills in a neat 2-column grid on mobile */
        gap: 15px;
    }

    .skill-card {
        padding: 15px 10px;
        font-size: 0.9rem;
    }

    /* --- 3. Horizontal Sliders (Experience & Publications) --- */
    .horizontal-slider {
        gap: 15px; /* Brings cards slightly closer together */
        padding-bottom: 30px; /* Space for the shadow */
        
        /* This allows the cards to touch the right edge of the screen, 
           giving a better scrolling experience */
        margin-right: -7%; 
        padding-right: 7%; 
    }

    /* Makes the Experience cards narrower so the next one peeks out */
    .slider-card {
        flex: 0 0 80vw; /* Card takes up 80% of the screen width */
    }

    /* Makes the Publication cards narrower so the next one peeks out */
    .large-slider-card {
        flex: 0 0 85vw; /* Takes up 85% of the screen, showing 15% of the next card */
    }

    /* Shrink the card typography slightly for mobile */
    .card h3 {
        font-size: 1.3rem;
    }

    .card p {
        font-size: 0.95rem;
    }
}