/* 
 * Modern Portfolio Styles (Revised)
 * Theme: Creative Professional (Blue Ombre, Clean, Unique)
 */

/* =========================================
   1. Variables & Reset
   ========================================= */
:root {
    /* Original "Blue Ombre" Palette */
    --primary-blue: #0054a4;
    /* The original core blue */
    --dark-blue: #003366;
    /* The ombre dark shade */
    --hover-blue: #0073e6;
    /* Lighter interaction color */

    --bg-body: #f4f4f4;
    /* Original off-white background */
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-white: #ffffff;

    /* Typography - Keeping the upgrade but feeling more "Academic/Pro" */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --nav-height: 70px;
    --container-width: 1200px;
    --radius: 8px;
    /* Slightly sharper than before */
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&display=swap');

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

html,
body {
    height: 100%;
    /* Important for sticky footer */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: var(--nav-height);

    /* Flex Column layout to push footer down */
    display: flex;
    flex-direction: column;
}

/* Ensure main content areas grow to fill space */
#hero,
.container,
.content-container {
    flex: 1 0 auto;
    /* Grow to fill space, allowing footer to stick to bottom */
}

/* Fix for specific containers on other pages so they don't stretch weirdly */
.container,
.content-container,
.container3 {
    width: 100%;
    /* Ensure they don't shrink */
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-blue);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   2. Components (Nav & Footer)
   ========================================= */

/* Top Navigation - Solid Blue to match original feel */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--primary-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo a {
    font-family: var(--font-heading);
    color: var(--text-white) !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.menu-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-white);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Side Navigation */
.side-nav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1100;
    top: 0;
    right: 0;
    background-color: var(--primary-blue);
    overflow-x: hidden;
    transition: 0.4s;
    padding-top: 60px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.side-nav a {
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.25rem;
    color: var(--text-white);
    display: block;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.side-nav a:hover {
    background-color: var(--hover-blue);
    border-left-color: var(--text-white);
    color: var(--text-white);
    text-decoration: none;
}

.side-nav .closebtn {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

/* Footer - Linear Gradient & Organized */
.footer-container {
    background: linear-gradient(to bottom, #333, rgba(0, 0, 0, 0.93));
    color: var(--text-white);
    padding: 2rem 5%;
    margin-top: 0;
    /* Remove top margin since flex handles spacing */
    text-align: left;
    flex-shrink: 0;
    /* Prevent footer from shrinking */
}

.footer-content {
    /* Grid layout for footer to keep it organized */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--text-white);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-section p {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-white);
    text-decoration: none;
}

.footer-section a:hover {
    color: #00b3f4;
    text-decoration: underline;
}

/* =========================================
   3. Hero Section (Blue to White Ombre)
   ========================================= */
#hero {
    position: relative;
    /* Blue to White Gradient: 2/3s Blue, then fade to white */
    background: linear-gradient(to bottom, var(--primary-blue) 0%, var(--primary-blue) 65%, #ffffff 100%);
    color: var(--text-white);
    /* Increase padding to fill more visual space nicely */
    padding: 5rem 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center vertically */
    text-align: center;
    /* Ensure it takes up enough screen real estate */
    min-height: 60vh;
}

/* About Hero needs to stay shorter */
#hero-about {
    position: relative;
    background: linear-gradient(to bottom, var(--primary-blue), var(--dark-blue));
    color: var(--text-white);
    padding: 3rem 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 25vh;
    flex: 0 0 auto;
    /* Don't grow the header on other pages */
}

#hero h1,
#hero-about h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#hero p,
#hero-about p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

/* Specific text color override for Home Hero since bottom is white */
#hero p {
    color: #f0f0f0;
    /* Keep light for top part, might need shadow if it hits white */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    /* Ensure readability against lighter gradient bottom */
}

#hero h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Profile Picture - Removed "Cheesy" heavily styled look */
.image-container img {
    width: 200px;
    /* Slightly larger like original */
    max-width: 100%;
    border-radius: 50%;
    /* Keep circular crop as it's standard */
    /* Removed heavy border and glow */
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto 1.5rem auto;
    object-fit: cover;
}

/* Typed.js text */
.typed {
    color: #38bdf8;
    /* Bright Cyan/Blue */
    font-weight: 600;
}

/* Typed.js cursor */
.typed-cursor {
    color: var(--text-white);
}

/* =========================================
   4. Layout Containers & Grid
   ========================================= */
.container,
.content-container,
.container3 {
    max-width: var(--container-width);
    margin: 2rem auto;
    /* Reduced margin */
    padding: 0 1rem;
}

/* Projects Page Box - Restored */
.container3 {
    background-color: var(--bg-card);
    border: 1px solid #ddd;
    /* Solid border */
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.container3 h3 {
    color: #000;
    margin-top: 0;
    border-bottom: 2px solid var(--primary-blue);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.container3 p,
.container3 li {
    color: #333;
    margin-bottom: 10px;
}

/* Quadrants / Cards - Creative but Tidy */
.quadrant {
    background: var(--bg-card);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    /* Crucial: Centers the quadrant header */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Creative Touch: Subtle "Lift" and "border-glow" on hover */
.quadrant:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 84, 164, 0.15);
    /* Slight blue shadow */
    border-color: var(--primary-blue);
}

.quadrant h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    display: inline-block;
}

/* Carousel Fixes */
.carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
    /* Ensure content inside doesn't align weirdly */
}

.carousel-item {
    display: none;
    text-align: center;
    /* Center content */
    padding: 0 40px;
    /* Add padding so text doesn't hit arrows */
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Helper to actually hide non-active items, js toggles display */
.carousel-item:not(.active) {
    display: none;
}

.carousel-caption {
    width: 100%;
}

.carousel-caption h3 {
    margin: 10px 0;
    color: var(--primary-blue);
    font-size: 1.2rem;
    border: none;
    /* Remove border from inner h3 */
}

.carousel-caption p {
    font-size: 1rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    /* Explicitly center text description */
}

/* Navigation Errors */
.carousel-control {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 10px;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    user-select: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 20px;
    text-align: center;
}

.carousel-control:hover {
    background-color: var(--primary-blue);
    color: var(--text-white);
}

.carousel-control.left {
    left: 0;
}

.carousel-control.right {
    right: 0;
}

/* =========================================
   5. Forms & Utility
   ========================================= */
.contact-form-container {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 3rem auto;
    border: 1px solid #eee;
}

.contact-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.contact-form-container input,
.contact-form-container textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    /* Classic border */
    border-radius: 4px;
    font-family: var(--font-body);
}

.submit-button {
    background-color: var(--primary-blue);
    color: var(--text-white);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: background 0.3s ease;
}

.submit-button:hover {
    background-color: var(--dark-blue);
}

/* Q&A Accordion */
.qa-container {
    width: 100%;
}

.question {
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.question summary {
    font-weight: 600;
    cursor: pointer;
    padding: 1rem;
    background: #f8fafc;
    color: var(--primary-blue);
    list-style: none;
    /* Remove default triangle */
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Add custom triangle/plus */
.question summary::after {
    content: '+';
    float: right;
    font-weight: bold;
}

.question[open] summary::after {
    content: '-';
}

.question p {
    padding: 1rem;
    background: #fff;
    border-left: 3px solid var(--primary-blue);
    margin: 0;
}

.section-heading h3 {
    color: var(--primary-blue);
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Responsive */
/* =========================================
   6. Bento Grid Layout (About Me)
   ========================================= */
.bento-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 3rem;
    max-width: 1200px;
    margin: 2rem auto;
}

.bento-row {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.bento-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    transition: transform 0.2sease, box-shadow 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.bento-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --- Hero Card --- */
.hero-card {
    flex: 2;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    display: flex;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

.accent-text {
    color: var(--primary-blue);
    background: linear-gradient(120deg, transparent 0%, transparent 100%);
    position: relative;
    display: inline-block;
}

.hero-bio {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 90%;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(0, 84, 164, 0.1);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Education Card --- */
.edu-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    border-top: 4px solid var(--primary-blue);
}

.edu-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.edu-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.edu-header i {
    font-size: 1.5rem;
}

.edu-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #2d3748;
}

.degree {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.grad-date {
    display: block;
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 1rem;
}

.minors-list {
    list-style: none;
    padding: 0;
}

.minors-list li {
    font-size: 0.9rem;
    color: #4a5568;
}

/* --- Gantt Timeline --- */
.timeline-card {
    width: 100%;
    padding: 1.5rem 2rem;
}

.timeline-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #2d3748;
}

.timeline-legend {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.school {
    background: #3182ce;
}

.dot.work {
    background: #38a169;
}

.dot.civic {
    background: #805ad5;
}

.dot.clubs {
    background: #dd6b20;
}

.gantt-container {
    position: relative;
    width: 100%;
    /* overflow-x: auto; - Removed to prevent tooltip clipping. If x-scroll needed, we need a different approach for tooltips */
}

.timeline-axis {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #718096;
}

.timeline-bars-area {
    position: relative;
    height: 220px;
    /* Increased height slightly */
    background: repeating-linear-gradient(90deg, transparent 0, transparent calc(14.28% - 1px), #f7fafc calc(14.28% - 1px), #f7fafc 14.28%);
}

.timeline-bar {
    position: absolute;
    height: 38px;
    /* Increased height */
    border-radius: 6px;
    display: flex;
    align-items: center;
    /* Vertically center content */
    padding: 0 0.75rem;
    color: white;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, z-index 0s;
    opacity: 0;
    animation: slideInBar 0.8s forwards;
    line-height: 1.1;
    /* Tighter line height */
}

.timeline-bar:hover {
    transform: scaleY(1.05) scaleX(1.02);
    /* Subtle scale */
    z-index: 100 !important;
    /* Ensure it pops over everything */
}

@keyframes slideInBar {
    from {
        opacity: 0;
        width: 0;
    }

    to {
        opacity: 1;
    }
}

/* Update positioning to account for taller bars */
.category-education {
    background: #3182ce;
    top: 10px;
}

.category-professional {
    top: 60px;
}

/* Moved down */
.category-civic {
    top: 110px;
}

/* Moved down */
.category-clubs {
    top: 160px;
}

/* Moved down */

/* Dynamic shades handled in JS now, base colors here */
.category-professional {
    background: #38a169;
}

.category-civic {
    background: #805ad5;
}

.category-clubs {
    background: #dd6b20;
}

.timeline-info {
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 2px 0;
    /* Minimal padding */
}

.timeline-info .role {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.timeline-info .detail {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0;
}

/* Timeline Tooltip - Fixed Z-Index Context */
.timeline-tooltip {
    position: absolute;
    bottom: 110%;
    /* Sit clearly above */
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    width: 250px;
    font-size: 0.85rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 1000;
    /* High z-index */
    white-space: normal;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.timeline-bar:hover .timeline-tooltip {
    visibility: visible;
    opacity: 1;
    bottom: 110%;
}

/* --- Skills Cards --- */
.skills-card-container {
    flex: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2x2 Grid */
    gap: 1rem;
    margin-top: 1rem;
}

.skill-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    cursor: default;
    transition: all 0.3s ease;
    height: 100px;
    overflow: hidden;
    position: relative;
}

.skill-card:hover {
    height: auto;
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 5;
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.skill-header i {
    font-size: 1.25rem;
}

.skill-header h3 {
    font-size: 1rem;
    margin: 0;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-list {
    opacity: 1;
    transform: translateY(0);
}

.skill-list span {
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* --- Hobbies Grid --- */
.hobbies-card-container {
    flex: 1;
}

/* --- Q&A Card --- */
.qa-card {
    width: 100%;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.hobby-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s ease;
    position: relative;
}

.hobby-card i {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.hobby-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
}

/* Tooltip style description for hobbies */
.hobby-desc {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #2d3748;
    color: #fff;
    padding: 0.75rem;
    border-radius: 6px;
    width: 200px;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hobby-card:hover {
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hobby-card:hover .hobby-desc {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .bento-row {
        flex-direction: column;
    }

    .hero-card,
    .edu-card {
        width: 100%;
    }

    .timeline-bars-area {
        height: auto;
        min-height: 300px;
    }

    .timeline-bar {
        position: relative;
        left: 0 !important;
        width: 100% !important;
        top: 0 !important;
        margin-bottom: 0.5rem;
    }

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

/* --- Project Modal Extensions --- */

/* Tech Stack Badges */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
}

.tech-badge i {
    color: var(--primary-blue);
}

/* Media Gallery */
.project-gallery {
    margin: 20px 0;
}

.gallery-main {
    width: 100%;
    height: 350px;
    background: #000;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img,
.gallery-main video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    object-fit: cover;
    border: 2px solid transparent;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: var(--primary-blue);
}

/* Before/After Slider */
.before-after-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 8px;
    cursor: ew-resize;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.before-after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.after-img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    /* Initial state */
    height: 100%;
    overflow: hidden;
    border-right: 2px solid white;
    z-index: 2;
}

.slider-handle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 3;
    color: var(--primary-blue);
}

.slider-label {
    position: absolute;
    top: 20px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.8rem;
    border-radius: 4px;
    pointer-events: none;
    z-index: 4;
}

.label-before {
    right: 20px;
}

.label-after {
    left: 20px;
}
/* Education Card Layout */
.edu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.edu-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.edu-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* =========================================
   7. Mobile Responsiveness / Media Queries
   ========================================= */
@media screen and (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }

    body {
        padding-top: var(--nav-height);
    }

    /* Typography Scaling */
    html {
        font-size: 15px; 
    }

    #hero h1, #hero-about h1 {
        font-size: 2rem;
    }

    /* Layout */
    .container, .content-container {
        padding: 0 1.5rem;
        margin: 1rem auto;
        width: 100%;
    }

    /* Navigation */
    .top-nav {
        padding: 0 1.5rem;
    }
    
    /* Ensure Side Nav works on mobile */
    .side-nav {
        padding-top: 80px;
    }
    
    .side-nav a {
        font-size: 1.1rem;
        padding: 10px 20px;
    }

    /* Hero Sections */
    #hero, #hero-about {
        padding: 3rem 1.5rem;
        min-height: auto;
    }

    /* Bento Grid Mobile Override */
    .bento-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-card, .edu-card {
        flex: 1 1 auto;
        width: 100%;
    }

    .hero-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    
    .image-container {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .hero-bio {
        max-width: 100%;
        margin: 0 auto 1.5rem auto;
    }
    
    .hero-badges {
        justify-content: center;
    }

    /* Education Card Mobile */
    .edu-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .edu-logo {
        height: 30px;
    }

    /* Timeline Stacked View */
    .timeline-legend {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .timeline-bars-area {
        height: auto;
        padding: 10px 0;
        background: none; /* Remove grid lines on mobile for cleaner look */
    }

    .timeline-bar {
        position: relative !important;
        width: 100% !important;
        left: 0 !important;
        top: auto !important;
        margin-bottom: 10px;
        transform: none !important;
        animation: none;
        opacity: 1;
    }
    
    .timeline-axis {
        display: none; /* Hide dates on mobile stacked view */
    }

    /* Skills & Hobbies */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .hobbies-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cols for hobbies on mobile */
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-section h3 {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .footer-section > div {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .hobbies-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-container {
        height: 300px; /* Smaller carousel on phones */
    }
}

/* Side Navigation Open Styles */
.side-nav.open {
    width: 250px;
}

@media screen and (max-width: 768px) {
    .side-nav.open {
        width: 100%;
    }
}
