/* =========================================
   Global Styles & Variables
   ========================================= */
:root {
    --primary-color: #1e3c72; /* Deep Blue */
    --secondary-color: #2a5298;
    --accent-color: #e67e22; /* Warm orange for highlights & glow */
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --white: #ffffff;
    --bg-light: #f9f9f9;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

/* =========================================
   Navigation Bar
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.navbar .logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.navbar nav ul {
    list-style: none;
    display: flex;
}

.navbar nav ul li {
    margin-left: 1.5rem;
}

.navbar nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color var(--transition-speed);
}

.navbar nav ul li a:hover {
    color: var(--accent-color);
}

/* =========================================
   Hero Section & Image Slider Setup
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

.slider-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 5s linear;
    z-index: 1;
    transform: scale(1.05);
}

.slider-container img.active {
    opacity: 0.3; /* Darkened more so the text pops out */
    z-index: 2;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    color: var(--white);
    background: rgba(30, 60, 114, 0.7);
    padding: 3rem;
    border-radius: 15px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 1.5s ease forwards;
}

.hero-overlay h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-overlay p {
    font-size: 1.2rem;
    font-weight: 300;
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* =========================================
   Content Sections General
   ========================================= */
.content-section {
    padding: 5rem 0;
}

.content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 2rem;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.text-light {
    color: #ccc;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: #1a1a1a;
    color: var(--white);
}

.bg-dark h2 {
    color: var(--white);
}

/* =========================================
   NEW: Glowing Square Image Gallery
   ========================================= */
.gallery-grid {
    display: grid;
    /* Automatically creates responsive columns based on screen size */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1 / 1; /* Forces the container to be a perfect square */
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    background-color: #333; /* Placeholder color before image loads */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 2px solid transparent;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the square without stretching */
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: brightness(0.8); /* Slightly dim by default */
}

/* The Glowing Hover Effect */
.gallery-item:hover {
    transform: translateY(-8px) scale(1.05); /* Lifts and slightly enlarges */
    border-color: var(--accent-color);
    /* Creates the rich, glowing halo effect */
    box-shadow: 0 0 15px var(--accent-color), 0 0 30px rgba(230, 126, 34, 0.6); 
    z-index: 10;
}

.gallery-item:hover img {
    transform: scale(1.15); /* Zooms the image inside the square */
    filter: brightness(1.1); /* Brightens the image on hover */
}

/* =========================================
   Education Grid
   ========================================= */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.education-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.education-image {
    text-align: center;
}

.education-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform var(--transition-speed);
}

.education-image img:hover {
    transform: translateY(-10px);
}

.education-image .caption {
    margin-top: 1rem;
    font-style: italic;
    color: #555;
}

/* =========================================
   Timeline Section (Career)
   ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 4px solid var(--accent-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-date {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content {
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed);
    border-top: 4px solid var(--primary-color);
    color: var(--text-dark);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* =========================================
   Contact & Buttons
   ========================================= */
#contact {
    text-align: center;
}

.contact-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--white);
    font-weight: bold;
    font-size: 1.1rem;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.whatsapp-btn {
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.facebook-btn {
    background: linear-gradient(45deg, #1877F2, #0C5A9E);
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    color: white;
}

/* =========================================
   Footer
   ========================================= */
footer {
    background: #111;
    color: #777;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* =========================================
   Responsive Design (Mobile & Tablets)
   ========================================= */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }
    
    .navbar nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navbar nav ul li {
        margin: 0.5rem 1rem;
    }

    .hero-overlay h2 {
        font-size: 2rem;
    }

    /* Make gallery squares slightly smaller on mobile to fit 2 side-by-side */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

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

    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-item::after {
        left: 21px;
    }
    
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }
}
