/* Custom CSS for Rafael Delwart Portfolio Website */

/* ===== MODERN DESIGN VARIABLES ===== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --background-light: #ecf0f1;
    --background-dark: #34495e;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== STICKY HEADER FOR SCROLL HIDE FUNCTIONALITY ===== */
#header {
    /* Remove fixed/absolute positioning and background */
    position: static !important;
    top: unset;
    left: unset;
    right: unset;
    width: 100%;
    z-index: 1000;
    background: none !important;
    backdrop-filter: none;
    border-bottom: none;
    padding: 0 !important;
    box-shadow: none;
    transition: none;
    margin-bottom: 0;
    height: auto;
    min-height: 0;
}

/* Remove extra padding from body since header is not fixed */
body {
    padding-top: 100px !important;
}

/* Add spacing above #nav to keep tabs at the top with room */
#nav {
    margin-top: 32px !important;
}

/* ===== BASIC TAB FUNCTIONALITY ===== */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== NAVIGATION IMPROVEMENTS ===== */
#nav {
    padding: 20px 0;
    margin: 0 auto;
    max-width: 1200px;
}

#nav ul {
    background: #FAF0DC !important;
    border-radius: 35px;
    padding: 20px 40px;
    /* Remove box-shadow and border */
    border: none !important;
    box-shadow: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

/* Remove or override any previous background gradients if present */
#nav ul {
    background: #FAF0DC !important;
    border-radius: 35px;
    padding: 20px 40px;
    box-shadow: var(--shadow-heavy);
    border: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

#nav ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

#nav ul li {
    margin: 0 8px;
    list-style: none;
}

#nav ul li a {
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    padding: 18px 35px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.2em; /* reduced from 1.8em */
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    background: none !important;
}

/* Active tab bubble */
#nav ul li a.active {
    background: #A9B494 !important;
    color: var(--primary-color) !important;
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
    text-shadow: none;
}

#nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: var(--transition);
    z-index: -1;
}

#nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: #397553; /* changed from blue gradient to solid dark green */
    border-radius: 2px;
    transition: transform 0.3s ease;
}

#nav ul li a:hover,
#nav ul li a:focus {
    background: #A9B494 !important;
    color: #fff !important;
    box-shadow: var(--shadow-medium);
    transform: translateY(-3px);
    text-shadow: none;
}

#nav ul li a:hover::after,
#nav ul li a:focus::after {
    transform: translateX(-50%) scaleX(1);
    background: #397553;
}

/* Add icons to navigation items */
#nav ul li a[onclick*="home"]::before {
    content: '🏠';
    margin-right: 8px;
}

#nav ul li a[onclick*="cv"]::before {
    content: '📄';
    margin-right: 8px;
}

#nav ul li a[onclick*="projects"]::before {
    content: '💼';
    margin-right: 8px;
}

/* ===== ENHANCED HEADER STYLING ===== */
#header {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(52, 152, 219, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ===== CONTACT SECTION STYLING ===== */
#contact {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 0;
    box-shadow: var(--shadow-medium);
    max-width: none;
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
    display: block;
}

#contact::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}

#contact h2 {
    font-size: 2.2em;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

#contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #397553; /* dark green to match other lines */
    border-radius: 2px;
}

.contact-info {
    list-style: none;
    padding-left: 0;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.contact-info li {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin: 10px 20px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.contact-info li:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-light);
    background: rgba(255, 255, 255, 0.95);
}

.contact-info li i {
    margin-right: 15px;
    color: var(--secondary-color);
    font-size: 1.5em;
    width: 30px;
    text-align: center;
}

.contact-info li a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

.contact-info li a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Email wrapper improvements */
.email-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.email {
    font-size: 0.9em;
    padding: 5px 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 15px;
    transition: var(--transition);
}

.email:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.05);
}

.separator {
    margin: 0 8px;
    color: var(--text-light);
    font-weight: bold;
}

/* ===== BUTTON IMPROVEMENTS ===== */
.button,
.button.alt {
    display: inline-block;
    padding: 12px 24px;
    background: #000 !important;
    color: #fff !important;
    text-decoration: none;
    border-radius: 20px;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.button:hover,
.button.alt:hover {
    background: #397553 !important; /* darker green */
    color: #fff !important;
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

/* Remove old .button.alt gradient and before pseudo-element */
.button.alt::before {
    display: none !important;
}



.project-card {
    width: 100%;
    min-width: 340px;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    border: none;
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    background: white;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #397553; /* changed from gradient to solid dark green */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.project-card img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px; /* fixed typo: was '15' */
    transition: var(--transition);
    margin-bottom: 40px; /* add spacing below image */
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

.project-card p {
    margin: 15px 0;
    font-size: 1.2em;       /* larger, scales with base font */
    color: #222 !important; /* softer dark gray */
    line-height: 1.85;      /* more space between lines */
    font-weight: 600;
    letter-spacing: 0.01em;
}
.button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: var(--shadow-light);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, #2980b9, var(--accent-color));
}

/* ===== PROJECT DETAIL IMAGES ===== */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.responsive-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.responsive-img-smaller {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.responsive-img-smaller:hover {
    transform: scale(1.03);
}

/* ===== VIDEO CONTAINER ===== */
.video-container-autonmous-bot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.video-container-autonmous-bot video {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    max-width: 100%;
    height: auto;
}

/* ===== LAB REPORT STYLING ===== */
.lab-report-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    text-align: center; /* Center all content including the button */
}

.lab-report-box {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    text-align: center;
    margin-bottom: 30px;
    transition: var(--transition);
}

.lab-report-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.lab-report-thumbnail {
    max-width: 100%;
    height: auto;
    margin-bottom: 25px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.lab-report-thumbnail:hover {
    transform: scale(1.05) rotateZ(1deg);
    box-shadow: var(--shadow-heavy);
}

.lab-report-button.alt {
    display: inline-block;
    padding: 12px 25px;
    background: #397553 !important; /* Dark green color */
    color: white;
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow-light);
    text-align: center;
}

.lab-report-button.alt:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: #2d5a3f !important; /* Slightly darker on hover */
}

/* ===== GIF STYLING ===== */
.gif-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border: 3px solid var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
}

.gif-image:hover {
    transform: scale(1.02);
    border-color: var(--accent-color);
}

/* ===== COURSE LIST STYLING ===== */
.course-list {
    list-style: none;
    padding-left: 0;
}

.course-list li {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border-left: 4px solid #A9B494;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    color: #222 !important;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition), box-shadow 0.2s;
    position: relative;
}

.course-list li:hover {
    transform: translateX(10px);
    border-left-color: #397553;
    box-shadow: 0 4px 24px rgba(52,152,219,0.10), var(--shadow-medium);
    background: #f5f7fa;
}

.course-list li a {
    text-decoration: none;
    color: #A9B494;
    font-weight: 600;
    transition: var(--transition);
    pointer-events: none; /* Prevent double navigation, li handles click */
}

/* Optional: show pointer on the whole li, not just the link */
.course-list li * {
    cursor: pointer;
}

/* ===== BOX STYLING ===== */
.box h3 {
    border-bottom: 3px solid #397553; /* changed from var(--secondary-color) to dark green */
    padding-bottom: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
}

.box h3 i {
    margin-right: 15px;
    color: var(--secondary-color);
    font-size: 1.3em;
}

.icon {
    font-size: 1.2em;
}

.box {
    padding: 30px;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

/* ===== PDF PREVIEW IMPROVEMENTS ===== */
.pdf-preview {
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

#pdf-canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: none;
}

#pdf-fallback {
    width: 100%;
    height: 800px;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: none;
}

#pdf-loading {
    padding: 50px;
    color: #666;
}

#pdf-error {
    padding: 50px;
    color: #d32f2f;
    display: none;
}

#pdf-error a {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ===== BANNER IMPROVEMENTS ===== */
#banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 40px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

#banner h2 {
    font-size: 3em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#banner p {
    font-size: 1.3em;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 768px) {
    /* Navigation responsive adjustments */
    #nav {
        padding: 15px 10px;
    }
    
    #nav ul {
        padding: 15px 20px;
        border-radius: 25px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    #nav ul li a {
        padding: 12px 20px;
        font-size: 0.95em;
        min-width: 100px;
    }
    
    .contact-info li {
        margin: 10px 5px;
        padding: 12px;
    }
    
    .email-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    #banner h2 {
        font-size: 2.2em;
    }
    
    .box {
        padding: 20px;
    }
    
    .course-list li:hover {
        transform: translateX(5px);
    }
}

@media (max-width: 480px) {
    #nav ul {
        padding: 10px 15px;
        gap: 5px;
    }
    
    #nav ul li a {
        padding: 10px 15px;
        font-size: 0.9em;
        min-width: 80px;
        letter-spacing: 0.3px;
    }
    
    #nav ul li a[onclick*="home"]::before,
    #nav ul li a[onclick*="cv"]::before,
    #nav ul li a[onclick*="projects"]::before {
        margin-right: 4px;
    }
}

/* Responsive navigation for small screens */
@media (max-width: 800px) {
    #nav ul {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 10px 5px;
        gap: 4px;
        max-width: 100vw;
        border-radius: 18px;
        /* Remove box-shadow and border for mobile as well */
        border: none !important;
        box-shadow: none !important;
    }
    #nav ul li {
        flex: 0 0 auto;
        margin: 0 2px;
    }
    #nav ul li a {
        min-width: 80px;
        font-size: 0.95em;
        padding: 10px 12px;
    }
    .project-card, #projects-container .col-4 {
        min-width: 0 !important;
    }
}

/* Remove min-width for project cards on very small screens */
@media (max-width: 480px) {
    #nav ul {
        padding: 6px 2px;
        gap: 2px;
    }
    #nav ul li a {
        min-width: 60px;
        font-size: 0.85em;
        padding: 8px 8px;
    }
    .project-card, #projects-container .col-4 {
        min-width: 0 !important;
    }
}

/* Remove flex row for projects grid */
#projects-container.row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(340px, 1fr));
    gap: 32px 24px;
    width: 100%;
    justify-content: center;
    justify-items: stretch;
    align-items: stretch;
}

/* Remove flex from .row for projects grid only */
#projects-container.row > .col-4 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 340px !important;
    flex: unset !important;
    display: block !important;
}

/* Remove flex from .row for projects grid only */
#projects-container.row > * {
    flex: unset !important;
    display: block !important;
}

/* Featured Projects Header */
.featured-header {
    text-align: center;
    margin-bottom: 40px;
}

.featured-header h2 {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.featured-desc {
    color: #222 !important;
    font-weight: 500;

    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto;
}

/* View All Projects Button */
.view-all-projects {
    text-align: center;
    margin-top: 40px;
}

.view-all-projects .button {
    padding: 15px 30px;
    font-size: 1.1em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    background: #000 !important;
    color: #fff !important;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-all-projects .button:hover {
    background: #397553 !important;
    color: #fff !important;
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

/* Contact Section Wrapper */
.contact-section-wrapper {
    width: 100%;
    min-width: 0;
    margin: 30px 0 0 0;
    position: relative;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    /* Remove forced 100vw and negative margins */
}

/* Contact box: Responsive max-width and padding */
#contact.box {
    width: 100%;
    max-width: 400px;
    min-width: 0;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
    padding: 40px 24px;
}

@media (min-width: 600px) {
    #contact.box {
        max-width: 600px;
        padding: 40px 32px;
    }
}
@media (min-width: 900px) {
    #contact.box {
        max-width: 900px;
        padding: 40px 48px;
    }
}
@media (min-width: 1200px) {
    #contact.box {
        max-width: 1200px;
        padding: 40px 64px;
    }
}

/* Ensure contact-info and email-wrapper never overflow */
#contact .contact-info,
#contact .email-wrapper {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Make the green box around the Course list and CV slightly larger */
#contact.box,
#cv .container,
#cv .box,
#courses .container,
#courses .box {
    max-width: 1100px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-top: 12px !important;
    padding-bottom: 24px !important;
    border-radius: 24px !important;
}

/* ===== SCROLL ANIMATIONS ===== */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.box, .project-card, .lab-report-box {
    animation: slideInFromBottom 0.6s ease-out;
}

/* Optionally override col-4 width for project cards in grid */
#projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px 24px;
    width: 100%;
    justify-content: center;
    justify-items: stretch;
}

.project-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
}

#projects-container .col-4 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

@media (max-width: 1200px) {
    #projects-container {
        grid-template-columns: repeat(2, minmax(340px, 1fr));
    }
}

@media (max-width: 800px) {
  #projects-container { grid-template-columns: 1fr; }
  .project-card, #projects-container .col-4 { min-width: 0 !important; }
}

/* Prevent Home tab from being highlighted blue even if active */
#nav ul li:first-child a.active,
#nav > ul > li:first-child > a.active {
    background: none !important;
    color: var(--primary-color) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    /* Remove border if any */
    border: none !important;
    text-shadow: none !important;
    transform: none !important;
    /* Remove border if any */
    border: none !important;
}

.container > header > p,
.container header > p {
    color: #222 !important;
    font-weight: 500;
}


/* Prevent background scroll when menu is open */
body.navPanel-visible { overflow: hidden; }

/* Dim the page when the panel is open */
#navOverlay {
  position: fixed; inset: 0; display: none;
  background: rgba(0,0,0,0.25); z-index: 2500;
}
body.navPanel-visible #navOverlay { display: block; }

/* Remove border and outline from the mobile menu toggle button */
#titleBar .toggle {
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* Style the mobile menu (hamburger) dropdown options */
#navPanel {
    background: #A9B494 !important;
    /* Optional: add a subtle shadow for separation */
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

#navPanelList li a {
    font-family: 'Segoe UI', 'Arial', sans-serif !important;
    font-size: 1.15em !important;
    color: #2c3e50 !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    padding: 18px 30px !important;
    border-radius: 18px;
    margin: 8px 0;
    background: none !important;
    transition: background 0.2s, color 0.2s;
    display: block;
    text-transform: uppercase;
}

#navPanelList li a:hover,
#navPanelList li a.active,
#navPanelList li a:focus {
    background: #397553 !important;
    color: #fff !important;
}

#contact .contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  #contact .contact-grid { grid-template-columns: 1fr; }
  #contact .button, #contact .button.alt { width: 100%; }
}


/* Keep the CV button below the contact list (spans both columns) */
#contact .contact-cta {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 8px;
}
#contact .contact-cta .button {
  width: 100%;
  max-width: 260px;
}

/* Project Detail Pane Improvements */
#project-detail .container {
    max-width: 1100px;
    padding: 40px 24px;
    border-radius: 24px;
    background: #A9B494 !important;
    margin: 0 auto;
}

#project-detail .return-to-projects {
    margin-bottom: 1.5rem;
    display: inline-block;
}

#project-detail-content .responsive-img,
#project-detail-content img.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: var(--border-radius, 12px);
    box-shadow: var(--shadow-medium, 0 4px 20px rgba(0,0,0,0.15));
}

#project-detail-content .box.post {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius, 12px);
    box-shadow: var(--shadow-medium, 0 4px 20px rgba(0,0,0,0.15));
    padding: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    #project-detail .container {
        padding: 20px 8px;
    }
    #project-detail-content .box.post {
        padding: 16px;
    }
}

/* Style paragraphs inside .box.post for better readability */
.box.post p {
    font-size: 1.2em;   
    font-weight: 500;   
    color: #222;       
    line-height: 1.7;   
}
/* Style figure captions */
.project-detail-content figcaption {
    font-size: 1.3em;         
    font-weight: 600;       
    color: #2c3e50;         
    text-align: center;     
    margin-top: 8px;        
    font-style: normal;     
}
/* Style the project title header */
.project-detail-header h1 {
    font-size: 2.5em;   
    font-weight: 700;   
    text-align: center; 
    color: #2c3e50;    
}
/* Style lists inside .box.post for better readability */
.box.post ul li {
    color: #111 !important; 
    font-size: 1.05em;       
    font-weight: 500;        
    line-height: 1.6;        
}
/* Style strong text inside list items for emphasis */
.box.post ul li strong {
    color: #111;       /* darker than default #222/#333 */
    font-weight: 700;  /* stronger boldness */
}

/* Prevent double rendering of project detail due to hashchange */
#project-detail-content {
    display: contents !important;
}

/* Hide original project detail container */
#project-detail {
    display: none !important;
}

/* Style the lab-report-container to center the button */
.lab-report-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    text-align: center; /* Center all content including the button */
}

/* Style the View Full Screen button to match green theme */
.lab-report-button.alt {
    display: inline-block;
    padding: 12px 25px;
    background: #397553 !important; /* Dark green color */
    color: white;
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow-light);
    text-align: center;
}

.lab-report-button.alt:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: #2d5a3f !important; /* Slightly darker on hover */
}

/* Style the Back to Projects button */
.project-navigation {
    text-align: center; /* Center the button */
    margin-top: 30px;
    margin-bottom: 20px;
}

.project-navigation .nav-back {
    display: inline-block;
    padding: 12px 24px;
    background: #397553 !important; /* Dark green color */
    color: #fff !important;
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

.project-navigation .nav-back:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: #2d5a3f !important; /* Slightly darker on hover */
}

.project-navigation .nav-back i {
    margin-right: 8px;
}

/* Ensure exactly 3 columns on larger screens but maintain responsive behavior */
#projects-container {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important; /* Force 3 equal columns */
  gap: 32px !important;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Keep existing responsive behavior */
@media (max-width: 1200px) {
  #projects-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 800px) {
  #projects-container {
    grid-template-columns: 1fr !important; /* One column on small screens */
  }
}

/* Fix project cards to ensure proper layout */
.project-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}