/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary: #2a9d8f; 
    --primary-light: #eaf5f3; 
    --bg-light: #f8fbfb; 
    --dark: #1a2b29; 
    --text-muted: #4a5568;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(42, 157, 143, 0.15), 0 10px 10px -5px rgba(42, 157, 143, 0.04); 
    
    --transition-snappy: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
    
    --font-body: 'Inter', system-ui, sans-serif;
    --font-heading: 'Merriweather', Georgia, serif;
}

body.dark-mode { 
    --bg-light: #121212; --white: #1e1e1e; --dark: #f0f0f0; 
    --text-muted: #a0aec0; --primary-light: #1a2b29; 
    --glass-bg: rgba(30, 30, 30, 0.85); --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.4); 
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body { 
    background-color: var(--white); color: var(--dark); line-height: 1.6; 
    overflow-x: hidden; font-family: var(--font-body); 
    transition: background-color 0.4s ease, color 0.4s ease;
}

section { padding: 5rem 10%; }

h1, h2, h3, h4, h5, h6, .logo, .bold-name, .static-text {
    font-family: var(--font-heading); letter-spacing: -0.025em; color: var(--dark);
}

h2 { text-align: center; font-size: 2.25rem; margin-bottom: 2.5rem; font-weight: 800; }
a { text-decoration: none; color: inherit; }

#about, #publications, #awards, #contact { background-color: var(--white); }
#projects, #courses, #certifications, #journey, #skills { background-color: var(--bg-light); }

/* --- Scroll Progress Bar --- */
.scroll-progress-container { width: 100%; height: 4px; background: transparent; position: fixed; top: 0; z-index: 2000; }
.scroll-progress-bar { height: 4px; background: linear-gradient(90deg, #2a9d8f, #48cae4); width: 0%; }

/* --- Infinite Tech Marquee --- */
.tech-marquee-wrapper { overflow: hidden; background: var(--dark); color: var(--white); padding: 1.5rem 0; display: flex; white-space: nowrap; position: relative; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); }
.tech-marquee { display: inline-block; animation: marqueeScroll 60s linear infinite; }
.tech-marquee:hover { animation-play-state: paused; }
.tech-marquee span { font-size: 1.1rem; font-weight: 600; margin: 0 2rem; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 10px; color: var(--primary-light); }
.tech-marquee span i { color: var(--primary); }
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =========================================
   2. NAVIGATION
   ========================================= */
nav { 
    position: fixed; top: 0; width: 100%; background: var(--glass-bg); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 1rem 10%; display: flex; justify-content: space-between; align-items: center; 
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); z-index: 1000; transition: var(--transition-smooth);
}
.logo { font-size: 1.5rem; font-weight: 900; color: var(--primary); }
nav ul { list-style: none; display: flex; gap: 1.5rem; align-items: center; }
nav ul li a { font-weight: 600; transition: var(--transition-snappy); font-size: 0.95rem; position: relative; padding-bottom: 0.25rem; }
nav ul li a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 50%; background-color: var(--primary); transition: var(--transition-snappy); transform: translateX(-50%); }
nav ul li a:hover { color: var(--primary); }
nav ul li a:hover::after { width: 100%; }

.hamburger { display: none; font-size: 1.8rem; color: var(--dark); cursor: pointer; transition: var(--transition-snappy); border: none; background: transparent; }
.hamburger:hover { color: var(--primary); }

@media (max-width: 950px) {
    .hamburger { display: block; } 
    nav ul { position: absolute; top: 70px; left: -100%; flex-direction: column; background: var(--white); width: 100%; text-align: center; padding: 30px 0; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: 0.4s ease-in-out; gap: 20px; }
    nav ul.active { left: 0; }
    .theme-switch-wrapper { justify-content: center; margin-top: 10px; }
}

/* =========================================
   3. ANIMATIONS & REUSABLE BUTTONS
   ========================================= */
.btn-outline { 
    display: inline-flex; justify-content: center; align-items: center; padding: 0.875rem 2rem; background: transparent; color: var(--primary); 
    border: 2px solid var(--primary); border-radius: 9999px; font-size: 0.875rem; letter-spacing: 0.05em; font-weight: 700; transition: var(--transition-snappy); cursor: pointer;
}
.btn-outline:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Theme-Colored Centered Back Button */
.back-btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background-color: var(--primary-light); color: var(--primary); 
    padding: 12px 25px; border-radius: 50px; font-weight: 700; font-size: 0.95rem;
    letter-spacing: 0.5px; transition: var(--transition-smooth); 
    border: 1px solid rgba(42, 157, 143, 0.2);
    margin: 0 auto 30px auto; 
}
.back-btn:hover { 
    background-color: var(--primary); color: var(--white); 
    transform: translateY(-3px) translateX(-5px); 
    box-shadow: 0 10px 20px rgba(42, 157, 143, 0.2); 
}
body.dark-mode .back-btn { background-color: rgba(42, 157, 143, 0.15); }
body.dark-mode .back-btn:hover { background-color: var(--primary); color: var(--white); }

.fade-up { opacity: 0; transform: translateY(30px) scale(0.98); transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1); visibility: hidden; }
.fade-up.show { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }

/* =========================================
   4. HERO SECTION
   ========================================= */
#hero { position: relative; min-height: 100vh; display: flex; align-items: center; background: var(--white); padding-top: 80px; overflow: hidden; }
.hero-bg-theme { position: absolute; top: 0; right: 0; width: 35%; height: 85%; background: var(--primary); z-index: 1; border-bottom-left-radius: 40px; }
.hero-container { display: flex; align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 5%; position: relative; z-index: 2; gap: 50px; }
.hero-text-area { flex: 1; position: relative; z-index: 4; padding-right: 30px; }
.hero-image-area { flex: 1.2; position: relative; z-index: 3; margin-left: 0; }
.hello-name { font-size: 1.5rem; color: var(--text-muted); margin-bottom: 15px; font-weight: 500; }
.bold-name { font-weight: 900; color: var(--dark); font-size: 1.8rem; }
.wave { display: inline-block; animation: wave-animation 2.5s infinite; transform-origin: 70% 70%; }
@keyframes wave-animation { 0%, 60%, 100% { transform: rotate(0.0deg) } 10%, 30% { transform: rotate(14.0deg) } 20%, 40% { transform: rotate(-8.0deg) } 50% { transform: rotate(10.0deg) } }

.static-text { font-size: 4.5rem; font-weight: 900; color: var(--dark); line-height: 1.1; margin-bottom: 40px; letter-spacing: -1.5px; }
.text-slider { position: relative; height: 1.2em; display: block; }
.dynamic-text { position: absolute; top: 0; left: 0; color: var(--primary); }

.phd-status { display: inline-flex; align-items: center; gap: 12px; margin-top: 40px; padding: 10px 22px; background: var(--white); border: 1px solid rgba(0,0,0,0.05); border-radius: 50px; font-size: 0.95rem; color: var(--text-muted); font-weight: 600; box-shadow: var(--shadow-soft); width: fit-content; }
.green-dot { width: 12px; height: 12px; background-color: var(--primary); border-radius: 50%; display: inline-block; animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0%, 100% { box-shadow: 0 0 0 0 rgba(42, 157, 143, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(42, 157, 143, 0); } }

.hero-image-area { flex: 1.4; position: relative; z-index: 3; margin-left: -8%; }
.image-slider { position: relative; width: 100%; max-width: 1200px; height: 80vh; min-height: 600px; border-radius: 16px; overflow: hidden; filter: drop-shadow(0 0 30px rgba(42, 157, 143, 0.3)); box-shadow: 0 25px 50px rgba(0,0,0,0.15); }
.slide-img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.slide1-el, .slide2-el { opacity: 0; transition: opacity 1s ease-in-out; }
.slide1-el.active, .slide2-el.active { opacity: 1; }
body.dark-mode .hero-image-area::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.3; filter: blur(100px); background: radial-gradient(circle, var(--primary) 0%, rgba(42, 157, 143, 0) 80%); z-index: -1; }

@media (max-width: 900px) { .hero-container { flex-direction: column; text-align: center; } .hero-bg-theme { width: 100%; height: 40%; border-bottom-left-radius: 0; } .hero-image-area { margin-left: 0; width: 100%; position: relative; margin-top: 40px; } .text-slider { display: flex; justify-content: center; } .dynamic-text { position: relative; } }

/* =========================================
   5. ABOUT & CARDS
   ========================================= */
.about-content p { font-size: 1.15rem; text-align: center; max-width: 800px; margin: 0 auto; color: var(--text-muted); line-height: 1.8; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; max-width: 1200px; margin: 0 auto; }
.card { background: var(--white); border-radius: 1rem; box-shadow: var(--shadow-soft); overflow: hidden; transition: var(--transition-smooth); border: 1px solid rgba(0,0,0,0.05); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: rgba(42, 157, 143, 0.3); }

.card-link-wrapper { display: flex; flex-direction: column; height: 100%; }
.card-img { height: 220px; background: var(--primary-light); display: grid; place-items: center; color: var(--primary); font-weight: bold; }
.card-info { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-info h3 { margin-bottom: 0.5rem; font-size: 1.25rem; color: var(--dark); line-height: 1.3; font-weight: 700; }
.card-info p { color: var(--text-muted); font-size: 0.95rem; flex-grow: 1; }
.read-more { margin-top: 1.25rem; color: var(--primary); font-weight: 700; font-size: 0.875rem; }

.pub-card { padding: 40px 30px; text-align: center; justify-content: center; align-items: center; }
.status-badge { display: inline-block; margin-top: 1rem; padding: 0.35rem 1rem; background: var(--primary); color: #fff; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.status-badge.pending { background: #e76f51; }

/* --- Project Card Status Highlights --- */
.status-wrapper { flex-grow: 1; margin-top: 0.5rem; }
.project-status-highlight { display: inline-block; padding: 0.35rem 0.85rem; border-radius: 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; }
.project-status-highlight.pending-highlight { background-color: #fff0eb; color: #e76f51; border: 1px solid rgba(231, 111, 81, 0.2); }
.project-status-highlight.completed-highlight { background-color: var(--primary-light); color: var(--primary); border: 1px solid rgba(42, 157, 143, 0.2); }
body.dark-mode .project-status-highlight.pending-highlight { background-color: rgba(231, 111, 81, 0.15); }
body.dark-mode .project-status-highlight.completed-highlight { background-color: rgba(42, 157, 143, 0.15); }

/* =========================================
   6. HOMEPAGE COURSES
   ========================================= */
.homepage-courses-wrapper { display: flex; gap: 40px; max-width: 1100px; margin: 0 auto; }
.course-column { flex: 1; background: var(--white); padding: 35px; border-radius: 16px; box-shadow: var(--shadow-soft); border: 1px solid rgba(0,0,0,0.03); transition: var(--transition-smooth); }
.course-column:hover { box-shadow: var(--shadow-hover); border-color: rgba(42, 157, 143, 0.3); }
.column-title { color: var(--primary); font-size: 1.3rem; margin-bottom: 25px; padding-bottom: 12px; border-bottom: 2px solid var(--bg-light); }
.mini-course-row { display: flex; align-items: center; gap: 18px; text-decoration: none; color: var(--dark); padding: 16px; border-radius: 12px; transition: var(--transition-snappy); margin-bottom: 15px; background: var(--bg-light); border: 1px solid rgba(0,0,0,0.02); }
.mini-course-row:hover { transform: translateX(8px); background: var(--primary-light); border-color: var(--primary); }
.mini-course-row i { font-size: 1.8rem; color: var(--primary); width: 45px; text-align: center; }
.mini-course-row h4 { font-size: 1.05rem; margin-bottom: 4px; color: var(--dark); }
.mini-course-row p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

@media (max-width: 850px) { .homepage-courses-wrapper { flex-direction: column; gap: 30px; } }

/* =========================================
   7. AWARDS & CERTIFICATIONS (Flexbox Layout)
   ========================================= */
.awards-canvas { max-width: 1100px; margin: 0 auto; background: linear-gradient(to bottom, var(--primary-light) 0%, var(--primary-light) 50%, rgba(42, 157, 143, 0.1) 50%, rgba(42, 157, 143, 0.1) 100%); border-radius: 30px; padding: 80px 60px; display: flex; flex-direction: column; box-shadow: inset 0 0 50px rgba(0,0,0,0.02); }
.award-card { background: var(--white); width: 55%; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.08); overflow: hidden; transition: var(--transition-smooth); cursor: pointer; }
.award-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: rgba(42, 157, 143, 0.3); }
.corner-left { align-self: flex-start; z-index: 1; }
.corner-right { align-self: flex-end; margin-top: -80px; z-index: 2; cursor: default; } 
.award-img { width: 100%; height: 350px; object-fit: cover; display: block; }
.award-text { padding: 35px; }
.award-text h3 { font-size: 1.5rem; margin-bottom: 8px; color: var(--dark); }
.award-date { color: var(--primary); font-weight: 700; margin-bottom: 15px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }

.pending-award-img { width: 100%; height: 350px; background: linear-gradient(135deg, var(--primary), var(--dark)); display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--white); text-align: center; border-bottom: 4px solid var(--primary-light); }
.pending-award-img i { font-size: 4.5rem; margin-bottom: 20px; color: var(--white); opacity: 0.9; }
.pending-award-img p { font-size: 1.2rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--white); opacity: 0.9; margin: 0; }

@media (max-width: 850px) { .awards-canvas { padding: 40px 20px; background: var(--primary-light); } .award-card { width: 100%; } .corner-right { margin-top: 40px; } }

/* Flexbox guarantees the 3rd odd item is perfectly centered */
.cert-modern-grid { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 40px; 
    max-width: 1200px; 
    margin: 0 auto; 
}

.cert-card { 
    width: calc(50% - 20px); 
    max-width: 550px;        
    position: relative; 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: var(--shadow-soft); 
    height: 320px; 
    background: var(--bg-light); 
    border: 1px solid rgba(0,0,0,0.05); 
    cursor: pointer; 
    transition: var(--transition-smooth); 
}

.cert-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: rgba(42, 157, 143, 0.3); }
.cert-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.cert-card:hover .cert-img { transform: scale(1.05); }

.cert-overlay { position: absolute; bottom: -10px; left: 0; right: 0; background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 25px 20px; border-top: 1px solid rgba(255, 255, 255, 0.5); transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.cert-card:hover .cert-overlay { transform: translateY(0); bottom: 0; }
.cert-text h4 { color: var(--dark); font-size: 1.25rem; margin-bottom: 5px; font-weight: 800; }
.cert-text p { color: var(--primary); font-weight: 700; font-size: 0.95rem; margin: 0; letter-spacing: 0.5px; }

@media (max-width: 850px) { 
    .cert-modern-grid { flex-direction: column; align-items: center; } 
    .cert-card { width: 100%; height: 260px; } 
    .cert-overlay { transform: translateY(0); bottom: 0; background: rgba(255, 255, 255, 0.95); } 
}

/* --- Lightbox Modal --- */
.modal-overlay { display: none; position: fixed; z-index: 2000; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show-modal { display: block; opacity: 1; }
.modal-content { margin: auto; display: block; width: 80%; max-width: 900px; border-radius: 10px; box-shadow: 0 0 30px rgba(0,0,0,0.5); animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from {transform:scale(0.9)} to {transform:scale(1)} }
.close-modal { position: absolute; top: 20px; right: 40px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: var(--primary); }
#modal-caption { margin: auto; display: block; width: 80%; max-width: 900px; text-align: center; color: #ccc; padding: 15px 0; font-size: 1.2rem; }

/* =========================================
   8. JOURNEY TIMELINE
   ========================================= */
.timeline { position: relative; max-width: 1000px; margin: 0 auto; padding: 40px 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: #e2e8f0; transform: translateX(-50%); border-radius: 10px; }
.timeline-item { position: relative; width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 60px; }
.timeline-dot { position: absolute; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; background: var(--white); border: 4px solid var(--primary); border-radius: 50%; z-index: 2; box-shadow: 0 0 0 6px var(--bg-light); }
.timeline-content { width: 42%; padding: 30px; background: var(--white); border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.03); text-align: left; transition: var(--transition-smooth); }
.timeline-content:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: rgba(42, 157, 143, 0.3); }
.timeline-date { width: 42%; font-size: 1.05rem; font-weight: 600; color: var(--text-muted); }
.timeline-item.left .timeline-date { text-align: left; padding-left: 20px; }
.timeline-item.right .timeline-date { text-align: right; padding-right: 20px; }

@media (max-width: 800px) { .timeline::before { left: 24px; transform: none; } .timeline-item { flex-direction: column !important; align-items: flex-start; padding-left: 60px; margin-bottom: 40px; } .timeline-dot { left: 12px; transform: none; top: 0; } .timeline-content, .timeline-date { width: 100%; text-align: left !important; padding: 0 !important; } .timeline-date { margin-bottom: 12px; margin-top: 0; padding-left: 0 !important; padding-right: 0 !important; } }

/* =========================================
   9. SKILLS BARS
   ========================================= */
.skills-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 35px 50px; max-width: 1000px; margin: 0 auto; }
.full-width-skill { grid-column: 1 / -1; }
.skill-box { display: flex; flex-direction: column; gap: 12px; }
.skill-info { display: flex; justify-content: space-between; align-items: center; }
.skill-name { font-size: 1.1rem; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 10px; }
.skill-name i { color: var(--primary); font-size: 1.2rem; }
.skill-percent { font-weight: 800; color: var(--primary); font-size: 1rem; }
.skill-bar { width: 100%; height: 12px; background-color: var(--white); border-radius: 20px; overflow: hidden; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.03); }
.skill-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2a9d8f, #48cae4); border-radius: 20px; transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1); }

@media (max-width: 800px) { .skills-container { grid-template-columns: 1fr; gap: 30px; } }

/* =========================================
   10. CONTACT SECTION
   ========================================= */
#contact { padding: 120px 10% 80px 10%; }
.contact-subtext { text-align: center; color: var(--text-muted); font-size: 1.1rem; max-width: 700px; margin: 0 auto 50px auto; }
.contact-container { display: flex; gap: 40px; max-width: 1100px; margin: 0 auto; align-items: stretch; }

.contact-info-box { flex: 1; background: var(--bg-light); padding: 40px; border-radius: 16px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 30px; border: 1px solid rgba(0,0,0,0.03); transition: var(--transition-smooth); }
.contact-info-box:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); border-color: rgba(42, 157, 143, 0.3); }
.info-item { display: flex; align-items: flex-start; gap: 20px; }
.info-item i { font-size: 1.2rem; color: var(--primary); background: var(--white); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: var(--transition-snappy); }
.info-item h4 { color: var(--dark); margin-bottom: 5px; font-size: 1.1rem; }
.info-item p, .info-item a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; transition: var(--transition-snappy); }
.info-item a:hover { color: var(--primary); }

.social-icons-left { display: flex; gap: 15px; margin-top: auto; padding-top: 30px; border-top: 1px solid rgba(0,0,0,0.05); }
.social-icons-left a { color: var(--dark); font-size: 1.2rem; background: var(--white); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: var(--transition-snappy); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.social-icons-left a:hover { background: var(--primary); color: #ffffff; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(42,157,143,0.3); }

.contact-form-box { flex: 1.5; background: var(--bg-light); padding: 40px; border-radius: 16px; box-shadow: var(--shadow-soft); border: 1px solid rgba(0,0,0,0.03); transition: var(--transition-smooth); }
.contact-form-box:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); border-color: rgba(42, 157, 143, 0.3); }
.contact-form-box form { display: flex; flex-direction: column; gap: 20px; }
.contact-form-box .input-group,
.contact-form-box input.full-width,
.contact-form-box textarea {
    margin-bottom: 22px !important;
}
.input-group { display: flex; gap: 20px; }
.contact-form-box input, .contact-form-box textarea { width: 100%; padding: 16px 20px; border: 1px solid rgba(0,0,0,0.08); border-radius: 8px; background: var(--white); color: var(--dark); font-size: 0.95rem; transition: var(--transition-snappy); font-family: inherit; }
.contact-form-box input:focus, .contact-form-box textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.1); }
.contact-form-box textarea { resize: vertical; }
.full-width { width: 100%; }

.btn-submit { background: var(--primary); color: #ffffff; padding: 16px 30px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition-snappy); display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: max-content; margin-top: 10px; }
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(42,157,143,0.3); }
.footer-credit { text-align: center; margin-top: 80px; font-size: 0.9rem; color: var(--text-muted); font-weight: 600; letter-spacing: 1px; }

@media (max-width: 850px) { .contact-container { flex-direction: column; } .input-group { flex-direction: column; gap: 20px; } .btn-submit { width: 100%; } }

/* =========================================
   11. DARK MODE TOGGLE & SCROLL TO TOP
   ========================================= */
.theme-switch-wrapper { display: flex; align-items: center; margin-left: 10px; }
.theme-switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.theme-switch input { display: none; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; border: 2px solid #ffcc00; border-radius: 34px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 3px; background-color: #ffaa00; border-radius: 50%; transition: .4s; }
input:checked + .slider { border-color: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); background-color: var(--primary); }

#scrollToTopBtn { position: fixed; bottom: 30px; right: 30px; z-index: 999; width: 50px; height: 50px; border-radius: 50%; background-color: var(--primary); color: #ffffff; border: none; font-size: 1.2rem; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(20px); transition: var(--transition-smooth); }
#scrollToTopBtn.show-btn { opacity: 1; visibility: visible; transform: translateY(0); }
#scrollToTopBtn:hover { background-color: var(--dark); transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

/* =========================================
   12. PRINT OPTIMIZATION (For Academic Committees)
   ========================================= */
@media print {
    body { background: #fff; color: #000; font-size: 11pt; }
    nav, #scrollToTopBtn, .theme-switch-wrapper, .btn-outline, .tech-marquee-wrapper, .contact-form-box, .scroll-progress-container { 
        display: none !important; 
    }
    section { padding: 2rem 0; page-break-inside: avoid; }
    h2 { font-size: 16pt; margin-bottom: 1rem; text-align: left; border-bottom: 1px solid #000; }
    .card, .award-card, .cert-card, .timeline-content, .course-block { 
        box-shadow: none; border: 1px solid #ccc; background: #fff; transform: none !important; page-break-inside: avoid;
    }
    .skill-fill { background: #000 !important; }
    a { text-decoration: none; color: #000; }
    a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* =========================================
   13. MODERN COURSE GRID & GLOW EFFECTS
   ========================================= */
.course-modern-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 35px; width: 100%; }

.course-block {
    display: flex; flex-direction: column; gap: 15px; background: var(--bg-light); padding: 40px; 
    border-radius: 20px; box-shadow: var(--shadow-soft); border: 1px solid rgba(0,0,0,0.03); 
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; z-index: 1;
    scroll-margin-top: 130px; 
}

.course-block:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 30px rgba(42, 157, 143, 0.3), 0 20px 40px rgba(42, 157, 143, 0.15);
    border-color: var(--primary); z-index: 10;
}

.course-block .course-icon {
    width: 60px; height: 60px; background: var(--white); display: flex; align-items: center; 
    justify-content: center; border-radius: 50%; font-size: 1.8rem; color: var(--primary); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); margin-bottom: 10px;
}

.featured-active {
    grid-column: 1 / -1; display: flex; flex-direction: row; align-items: center;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
    border: 2px solid var(--primary) !important; box-shadow: 0 20px 50px rgba(42, 157, 143, 0.2) !important;
    animation: slideDownFade 0.8s cubic-bezier(0.25, 1, 0.2, 1) forwards;
    scroll-margin-top: 130px; 
}

@media (max-width: 800px) { .featured-active { flex-direction: column; text-align: center; } .featured-active .course-icon { margin: 0 auto 15px auto; } }

/* =========================================
   14. INTERACTIVE PHOTO ILLUMINATION
   ========================================= */
.image-slider img.slide-img { transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer; }
.image-slider img.slide-img:hover {
    box-shadow: 0 0 35px rgba(42, 157, 143, 0.7); transform: translateY(-8px) scale(1.02);
    filter: drop-shadow(0 0 15px rgba(42, 157, 143, 0.5)) brightness(1.03);
}

.project-detail-section .project-images img { transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important; cursor: pointer; }
.project-detail-section .project-images img:hover {
    box-shadow: 0 0 35px rgba(42, 157, 143, 0.7); transform: translateY(-8px) scale(1.02) !important;
    filter: drop-shadow(0 0 15px rgba(42, 157, 143, 0.5)) brightness(1.03);
}

body.dark-mode .image-slider img.slide-img:hover,
body.dark-mode .project-detail-section .project-images img:hover {
    box-shadow: 0 0 40px rgba(42, 157, 143, 0.6); filter: drop-shadow(0 0 15px rgba(42, 157, 143, 0.4)) brightness(1.05);
}

/* =========================================
   15. NEXT PROJECT BANNER & PROJECT GRID
   ========================================= */
.project-navigation { margin-top: 80px; padding-top: 0; border-top: none; }
.next-project-banner {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, var(--bg-light), var(--primary-light)); padding: 40px 50px;
    border-radius: 20px; text-decoration: none; color: var(--dark); border: 1px solid rgba(42, 157, 143, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: var(--shadow-soft);
}
.next-project-banner:hover {
    transform: translateY(-8px); box-shadow: 0 0 30px rgba(42, 157, 143, 0.3), 0 20px 40px rgba(42, 157, 143, 0.15); border-color: var(--primary);
}
.next-banner-text span { display: block; color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; margin-bottom: 8px; }
.next-banner-text h3 { font-size: 1.8rem; margin: 0; font-family: var(--font-heading); }
.next-banner-icon { width: 60px; height: 60px; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.5rem; transition: transform 0.4s ease; }
.next-project-banner:hover .next-banner-icon { transform: translateX(10px); }

@media (max-width: 700px) {
    .next-project-banner { flex-direction: column; text-align: center; gap: 20px; padding: 30px; }
    .next-project-banner:hover .next-banner-icon { transform: translateY(10px) translateX(0); }
}

/* --- Modern 2x2 Project Image Grid --- */
.project-images { 
    flex: 1; 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 0px; 
    align-content: start;
    margin-top: 25px; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow-soft);
}

.project-images img { 
    width: 100%; 
    height: 250px; 
    border-radius: 0px; 
    box-shadow: none; 
    object-fit: cover; 
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    cursor: pointer;
}

/* Hover Illumination */
.project-images img:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    transform: scale(1.05) !important;
    z-index: 10;
    position: relative; 
    border-radius: 8px;
}

/* --- Center the 3rd image if there are exactly 3 images --- */
.project-images img:nth-child(3):last-child {
    grid-column: 1 / -1; 
    width: 50%;          
    margin: 0 auto;      
}

/* Mobile: Stack images in a single column if the screen is small */
@media (max-width: 600px) {
    .project-images { grid-template-columns: 1fr; }
    .project-images img:nth-child(3):last-child {
        width: 100%; 
    }
}

/* =========================================
   16. MOBILE PERFECTION (Professional & Academic)
   ========================================= */
@media (max-width: 768px) {
    section { padding: 4rem 5%; }
    .static-text { font-size: 2.8rem; line-height: 1.2; margin-bottom: 30px; }
    h2 { font-size: 2rem; }
    .hero-text-area { text-align: center; display: flex; flex-direction: column; align-items: center; }
    
    .course-modern-grid, .card-grid { 
        grid-template-columns: 1fr; 
        gap: 25px;
    }
    
    .image-slider { min-height: 400px; height: 50vh; margin-top: 30px; }
    
    .contact-info-box { align-items: center; text-align: center; }
    .info-item { flex-direction: column; gap: 10px; align-items: center; }
    .social-icons-left { justify-content: center; width: 100%; border-top: none; padding-top: 10px; }
    
    .timeline::before { left: 20px; }
    .timeline-item { padding-left: 50px !important; margin-bottom: 40px; }
    .timeline-dot { left: 8px !important; }
    
    .btn-outline, .back-btn { width: 100%; max-width: 300px; justify-content: center; }
}

/* =========================================
   17. NAVBAR LOGO ICON ALIGNMENT
   ========================================= */
.logo {
    display: flex;
    align-items: center;
    gap: 12px; 
    text-decoration: none; 
}

.nav-logo-icon {
    width: 32px; 
    height: 32px;
    object-fit: cover;
    border-radius: 6px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    transition: transform 0.3s ease;
}

.logo:hover .nav-logo-icon {
    transform: rotate(-5deg) scale(1.1); 
}

/* =========================================
   MOBILE FIX: CAMOUFLAGE COLOR OVERRIDE
   ========================================= */
@media (max-width: 850px) {
    /* 1. Make Biologist & Zoologist visible */
    .hero-text-area .dynamic-text {
        color: #ffffff !important; /* Changes text to white on mobile */
    }

    /* 2. Make the CV Button visible */
    .hero-text-area .btn-outline {
        color: #ffffff !important; /* Button text color */
        border-color: #ffffff !important; /* Button outline color */
        background-color: transparent !important;
    }
    
    /* (Optional) How the button looks when tapped on mobile */
    .hero-text-area .btn-outline:active {
        background-color: #ffffff !important;
        color: #000000 !important; /* Changes text to black when tapped */
    }
}
