/* style.css - Interactive Upgrade */

:root {
    --primary-color: #2c3e50;
    --accent-color: #1abc9c;
    /* Updated to a multi-stop gradient for animation */
    --bg-gradient: linear-gradient(-45deg, #f5f7fa, #c3cfe2, #e0eafc, #cfdef3);
}

/* 1. Animated Background */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite; /* Slow, breathing background */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Page Load Animation */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    background: var(--primary-color);
    color: white;
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    width: 100%;
    animation: slideUpFade 0.8s ease-out;
}

/* Profile Image Glow on Hover */
.profile-img {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

.profile-img:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 0 25px rgba(26, 188, 156, 0.6);
}

.header-text h1 { margin: 0; font-size: 2.8rem; }

.header-actions { margin-top: 20px; }

/* Interactive Button */
.cta-button {
    background: var(--accent-color);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: all 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-5px);
    background: #16a085;
    box-shadow: 0 8px 25px rgba(26, 188, 156, 0.5);
}

.cta-button:hover::before { left: 100%; } /* Shine effect */

/* Animated Navigation Underlines */
nav {
    background: #34495e;
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

nav a { 
    color: white; 
    margin: 0 15px; 
    text-decoration: none; 
    font-weight: bold; 
    padding: 5px 10px;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover, nav a.active { color: var(--accent-color); }
nav a:hover::after, nav a.active::after { width: 100%; }

main { flex: 1; }

section {
    padding: 2.5rem;
    max-width: 1000px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    animation: slideUpFade 1s ease-out backwards;
    animation-delay: 0.2s;
}

h2 { 
    border-bottom: 3px solid var(--accent-color); 
    padding-bottom: 10px; 
    color: var(--primary-color); 
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.cert-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.cert-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

/* The card physically lifts off the page */
.cert-box:hover { 
    transform: translateY(-12px); 
    box-shadow: 0 15px 35px rgba(26, 188, 156, 0.2); 
    border-color: var(--accent-color);
}

.cert-box img { 
    width: 100%; 
    height: 220px;
    object-fit: cover;
    border-bottom: 3px solid var(--accent-color);
    transition: transform 0.6s ease;
}

/* The image zooms smoothly inside the card */
.cert-box:hover img {
    transform: scale(1.08);
}

.cert-info { 
    padding: 20px; 
    text-align: center; 
    background: #fafafa;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2; /* Keeps text above zoomed image */
    transition: background 0.4s ease;
}

.cert-box:hover .cert-info { background: #fff; }

.cert-info h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.cert-box:hover .cert-info h3 { color: var(--accent-color); }

.cert-info p { margin: 0; font-size: 0.95rem; color: #666; }

/* Footer Animation */
footer { 
    text-align: center; 
    padding: 2rem; 
    background: var(--primary-color); 
    color: #bdc3c7; 
    margin-top: auto;
}

footer a { 
    color: var(--accent-color); 
    transition: all 0.3s ease; 
    display: inline-block;
}

footer a:hover { 
    color: white; 
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .header-container { flex-direction: column; text-align: center; }
    nav a { display: block; margin: 15px 0; }
    nav a::after { display: none; } /* Hide underline animation on mobile */
}

.showcase-card {
            background: white;
            border-radius: 12px;
            padding: 30px;
            margin-bottom: 40px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            border-left: 6px solid var(--accent-color);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .showcase-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 15px 30px rgba(26, 188, 156, 0.15);
        }

        /* Grid Layout: Logos on Left, Content on Right */
        .showcase-layout {
            display: grid;
            grid-template-columns: 120px 1fr;
            gap: 30px;
            align-items: stretch;
        }

        /* Tech Logos Column */
        .tech-logos {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
            background: #f8f9fa;
            padding: 20px 10px;
            border-radius: 8px;
            border: 1px solid #eee;
            box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
        }

        .logo-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            text-align: center;
        }

        .logo-item i {
            font-size: 3rem;
            transition: transform 0.3s ease;
        }

        .logo-item:hover i {
            transform: scale(1.15);
        }

        .logo-item span {
            font-size: 0.75rem;
            font-weight: bold;
            color: #555;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Project Content Column */
        .project-content h3 {
            margin: 0 0 5px 0;
            color: var(--primary-color);
            font-size: 1.6rem;
        }

        .project-content .subtitle {
            color: var(--accent-color);
            font-weight: bold;
            font-size: 0.95rem;
            margin-bottom: 15px;
            display: inline-block;
        }

        .hardware-list {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin-top: 15px;
            font-size: 0.9rem;
            border: 1px dashed #bdc3c7;
        }

        /* Scrollable Image Gallery */
        .project-gallery {
            display: flex;
            gap: 15px;
            overflow-x: auto;
            padding: 15px 0 10px 0;
            margin-top: 20px;
            scroll-behavior: smooth;
            /* Custom Scrollbar for the gallery */
            scrollbar-width: thin;
            scrollbar-color: var(--accent-color) #f0f0f0;
        }

        .project-gallery::-webkit-scrollbar { height: 8px; }
        .project-gallery::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 10px; }
        .project-gallery::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 10px; }

        .project-gallery img {
            height: 200px; /* Fixed height to keep them aligned */
            min-width: 300px; /* Forces images to line up horizontally */
            object-fit: cover;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
            cursor: pointer;
        }

        .project-gallery img:hover {
            transform: scale(1.03);
            box-shadow: 0 6px 15px rgba(26, 188, 156, 0.3);
        }

        /* Mobile Responsiveness */
       @media (max-width: 768px) {
    .showcase-layout {
        grid-template-columns: 1fr;
    }
    .tech-logos {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px;
    }
}  /* ← THIS WAS MISSING */

            /* ------------------------------------- */
/* CONTACT PAGE STYLES                   */
/* ------------------------------------- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    margin-top: 20px;
}

/* Left Side: Contact Information Cards */
.contact-info-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.info-card:hover {
    transform: translateX(5px);
    background: white;
    box-shadow: 0 8px 20px rgba(26, 188, 156, 0.15);
}

.info-card i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.info-details h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.info-details p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Right Side: The Contact Form */
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #fdfdfd;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensures padding doesn't break width */
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Interactive Input Focus State */
.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.2);
}

.submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.4);
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr; /* Stacks the info cards and form on mobile */
    }
}

/* ------------------------------------- */
/* BLOG PAGE STYLES                      */
/* ------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-top: 30px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(26, 188, 156, 0.15);
    border-color: rgba(26, 188, 156, 0.3);
}

.blog-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image-container img {
    transform: scale(1.08); /* Slow zoom effect on hover */
}

/* Category Badge overlaying the image */
.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 2;
}

.blog-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-meta i {
    color: var(--accent-color);
}

.blog-title {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.4rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

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

.blog-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes the read-more button to the bottom */
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--accent-color);
}

.read-more:hover i {
    transform: translateX(5px); /* Arrow shoots to the right on hover */
}

/* ========================================= */
/* JAVASCRIPT DRIVEN STYLES                  */
/* ========================================= */

/* 1. Global Dark Mode Variables & Overrides */
body.dark-mode {
    --primary-color: #1a252f;
    --bg-gradient: linear-gradient(-45deg, #121212, #1e1e1e, #2c3e50, #1a1a1a);
    color: #e0e0e0;
}

body.dark-mode section, 
body.dark-mode .cert-box,
body.dark-mode .showcase-card,
body.dark-mode .blog-card,
body.dark-mode .contact-form,
body.dark-mode .info-card {
    background: #1e272e;
    border-color: #2f3640;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

body.dark-mode h2, 
body.dark-mode .cert-info h3, 
body.dark-mode .showcase-title h3, 
body.dark-mode .blog-title {
    color: #ecf0f1;
}

body.dark-mode .cert-info,
body.dark-mode .tech-logos,
body.dark-mode .hardware-list,
body.dark-mode .input-group input, 
body.dark-mode .input-group textarea,
body.dark-mode .blog-content {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #34495e;
}

/* Floating Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.theme-toggle-btn:hover { 
    transform: scale(1.1) rotate(15deg); 
    background: #16a085;
}

/* 2. Image Lightbox (Fullscreen Image Viewer) */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

/* ... existing styles ... */

/* ------------------------------------- */
/* Lightbox Overlay Styles (Certificates)*/
/* ------------------------------------- */

/* This is the standard "zoomed out" image, now clickable */
.cert-image {
    cursor: zoom-in; /* Change cursor to a magnifying glass */
}

/* The fixed overlay, hidden by default */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* Sit on top of everything, including navigation */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if the image is too big */
    background-color: rgba(0,0,0,0.9); /* Black w/ high opacity */
}

/* The actual enlarged image inside the overlay */
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
    border: 5px solid white; /* Adds a clean white border for a premium feel */
}

/* The Close Button (the cross) */
.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Simple animation for a nice "pop-in" effect */
.lightbox-content {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

/* ------------------------------------- */
/* EDUCATION GRID & CARD STYLES          */
/* ------------------------------------- */

/* Parent Grid Container */
.education-grid {
    display: grid;
    /* Responsive grid: fits as many 300px+ cards as it can, then wraps */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; /* Space between the cards */
    margin-top: 30px;
}

/* Individual Education Card */
.education-card {
    background: white; /* Card background color */
    border: 2px solid #2c3e50; /* A dark green/navy border like your reference */
    border-radius: 12px; /* Rounded corners */
    padding: 30px; /* Internal spacing */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center all items horizontally */
    text-align: center; /* Center text align */
    transition: all 0.3s ease; /* Smooth hover transition */
    position: relative;
    overflow: hidden;
}

/* Add a subtle hover effect: card lifts off the page */
.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* School Logo Spacing */
.school-logo {
    max-width: 80px; /* Limit logo size */
    height: auto;
    margin-bottom: 20px; /* Space below the logo */
}

/* Card Content Typography */
.education-card h3 {
    margin: 0 0 5px 0;
    color: #2c3e50; /* Dark color for institution name */
    font-size: 1.4rem;
}

.education-card .location {
    margin: 0 0 20px 0;
    color: #7f8c8d; /* Muted gray for location */
    font-size: 0.95rem;
}

.education-card h4 {
    margin: 0 0 5px 0;
    color: var(--accent-color); /* Reusing your teal accent color for the degree */
    font-size: 1.1rem;
}

.education-card .date {
    margin: 0;
    color: #7f8c8d; /* Muted gray for date */
    font-size: 1rem;
}
        
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}