/* ============================================
   JUNKE ZHAO PORTFOLIO - UNIFIED STYLESHEET
   ============================================ */

/* ============================================
   1. CSS VARIABLES & THEME SYSTEM
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-white: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #383838;
    --accent-color: #1a7a83;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-white: #1a1a1a;
    --card-bg: #1a1a1a;
    --text-primary: #e8e8e8;
    --text-secondary: #c7c7c7;
    --accent-color: #8c762f;
    --border-color: #333333;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* ============================================
   2. BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto !important;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
    /* border-bottom: 1px solid transparent; */
}

a:not([class]):hover {
    text-decoration: underline;
}


/* ============================================
   3. MOBILE HEADER
   ============================================ */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.mobile-site-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: none;
}

.mobile-site-name:hover {
    color: var(--accent-color);
    border-bottom: none;
}

/* ============================================
   4. BUTTONS - UNIFIED STYLES
   ============================================ */

/* Circle Button Base */
.btn-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-circle:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Theme Toggle */
.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: rotate(180deg);
}

.desktop-theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 58px;
    height: 58px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--accent-color);
    z-index: 1000;
    box-shadow: var(--shadow-md);
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Mobile Close Button */
.mobile-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: all 0.3s ease;
}

.mobile-close-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Floating Navigation */
.floating-nav {
    position: fixed;
    top: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1001;
}

.floating-nav .nav-float-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--accent-color);    
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-nav .nav-float-btn i {
    font-size: 1.2rem;
    line-height: 1;
}

.floating-nav .nav-float-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: rotate(360deg);
}

/* Text Buttons */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    border-bottom: 2px solid var(--accent-color);
}

.btn-outline i {
    transition: transform 0.3s ease;
}

/* Small Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-action:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    border-bottom: 1px solid var(--accent-color);
}

/* Filter Buttons */
.filter-btn {
    padding: 10px 25px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* CV Button */
.cv-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 10px;
    border-bottom: none;
}

.cv-button:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-bottom: none;
}

/* View All Buttons */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.view-all-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(5px);
    border-bottom: 2px solid var(--accent-color);
}

.view-all-btn:hover i {
    transform: translateX(3px);
}

/* ============================================
   5. LAYOUT - CONTAINER
   ============================================ */
.container {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    max-width: 100%;
    margin: 0;
    position: relative;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   6. SIDEBAR
   ============================================ */
.sidebar {
    background: var(--bg-secondary);
    padding: 40px 40px;
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Profile Section */
.profile-section {
    display: flex;
    flex-direction: column;
}

.profile-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid var(--accent-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.role {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    border-bottom: none;
}

.contact-item:hover {
    color: var(--accent-color);
    border-bottom: none;
}

.contact-item i {
    width: 20px;
    text-align: center;
    color: var(--accent-color);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.nav-link {
    padding: 10px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
    border-bottom: none;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--accent-color);
    padding-left: 20px;
    border-bottom: none;
}

.nav-link.active {
    background: var(--bg-tertiary);
    color: var(--accent-color);
    padding-left: 20px;
}

/* ============================================
   7. MAIN CONTENT
   ============================================ */
.main-content {
    padding: 60px 80px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Section Styles */
.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
}

/* Section Header with Button */
.section-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
}

.section-header-with-button .section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex-grow: 1;
}

/* View All Bottom */
.view-all-bottom {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.view-all-btn-bottom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-all-btn-bottom:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.view-all-btn-bottom:hover i {
    transform: translateX(5px);
}

/* ============================================
   8. ABOUT SECTION
   ============================================ */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.about-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.research-directions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.direction-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.direction-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.direction-card h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.direction-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.status-banner {
    background: var(--accent-color);
    padding: 20px;
    border-radius: 12px;
    color: white;
    margin-top: 20px;
}

.status-banner p {
    color: white;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   9. PROJECT CARDS - UNIFIED STYLES
   ============================================ */

/* Project List Layout */
.project-list,
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Project Item / Card Base */
.project-item,
.project-card {
    display: flex;
    gap: 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.project-item:hover,
.project-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* Project Image */
.project-image,
.project-img {
    flex-shrink: 0;
    width: 320px;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.project-image img,
.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Project Info / Body */
.project-info,
.project-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.project-venue {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.project-title,
.project-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.project-authors {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

.project-description,
.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Project Links / Actions */
.project-links,
.project-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-btn,
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-btn:hover,
.btn-link:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Project Meta / Badges */
.project-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pub-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    border: 1.1px solid var(--text-secondary);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

/* ============================================
   10. TIMELINE
   ============================================ */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 29px;
    top: 70px;
    width: 2px;
    height: calc(100% + 20px);
    background: var(--border-color);
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.timeline-icon i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

[data-theme="dark"] .timeline-icon {
    background: var(--bg-tertiary);
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.position {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 10px;
}

/* ============================================
   11. FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer p {
    margin: 5px 0;
}

/* ============================================
   12. ALL-PROJECTS PAGE
   ============================================ */
.all-projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 30px;
}

.all-projects-header {
    text-align: center;
    margin-bottom: 50px;
}

.all-projects-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.all-projects-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.filter-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.project-section {
    margin-bottom: 60px;
}

.project-section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
    color: var(--text-primary);
}

.all-projects-footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   13. FUN STUFF GRID
   ============================================ */
.fun-stuff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.fun-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.fun-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.fun-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.fun-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fun-card:hover .fun-img img {
    transform: scale(1.08);
}

.fun-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.fun-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.fun-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   14. PROJECT PAGE NAVIGATION
   ============================================ */
.project-page-nav {
    margin: 40px 0 48px;
}

.page-nav-inner {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.nav-btn {
    padding: 10px 18px;
    border-radius: 999px;
    border: 2px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

.nav-btn.secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.nav-btn.secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--accent-color);
    color: white;
}

.back-button:hover i {
    transform: translateX(-3px);
}

/* Mobile Header Navigation for Project Pages */
.mobile-header-nav {
    display: none;
    align-items: center;
    gap: 12px;
}

.mobile-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.mobile-nav-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* ============================================
   15. RESPONSIVE DESIGN
   ============================================ */

/* Large Desktop */
@media (min-width: 1025px) {
    .mobile-header {
        display: none !important;
    }
    
    .desktop-theme-toggle {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
}

/* Narrow Desktop */
@media (max-width: 1400px) and (min-width: 1025px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
        margin-bottom: 0;
    }
    
    .profile-info h1 {
        font-size: 1.35rem;
        margin-bottom: 5px;
    }
    
    .role {
        font-size: 0.8rem;
    }
}

/* Very Narrow Desktop */
@media (max-width: 1200px) and (min-width: 1025px) {
    .sidebar {
        padding: 30px 20px;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .profile-info h1 {
        font-size: 1.05rem;
    }
    
    .role {
        font-size: 0.8rem;
    }
    
    .project-image,
    .project-img {
        width: 220px;
        height: 160px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }
    
    .desktop-theme-toggle {
        display: none !important;
    }
    
    .container {
        grid-template-columns: 1fr;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        border-right: 1px solid var(--border-color);
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .mobile-close-btn {
        display: flex;
    }
    
    .main-content {
        padding: 90px 30px 40px;
    }
    
    .research-directions {
        grid-template-columns: 1fr;
    }
    
    .project-image,
    .project-img {
        width: 200px;
        height: 150px;
    }
    
    .floating-nav {
        top: 86px;
        left: 30px;
    }
    
    .floating-nav .nav-float-btn {
        width: 52px;
        height: 52px;
    }
    
    .floating-nav .nav-float-btn i {
        font-size: 1.15rem;
    }
    
    .all-projects-container {
        padding-top: 90px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .theme-toggle {
        width: 45px;
        height: 45px;
    }
    
    .mobile-menu-toggle {
        width: 45px;
        height: 45px;
    }
    
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        padding: 90px 20px 30px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .project-item,
    .project-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .project-image,
    .project-img {
        width: 100%;
        height: 200px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-item {
        grid-template-columns: 50px 1fr;
    }
    
    .timeline-icon {
        width: 50px;
        height: 50px;
    }
    
    .timeline-item:not(:last-child)::before {
        left: 24px;
        top: 60px;
    }
    
    .all-projects-container {
        padding: 90px 20px 40px;
    }
    
    .all-projects-title {
        font-size: 2rem;
    }
    
    .project-section-title {
        font-size: 1.5rem;
    }
    
    .filter-section {
        justify-content: flex-start;
    }
    
    .fun-stuff-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fun-img {
        height: 180px;
    }
    
    .page-nav-inner {
        flex-direction: column;
        align-items: center;
    }
    
    .mobile-header-nav {
        display: flex;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .sidebar {
        width: 260px;
        padding: 20px 15px;
    }
    
    .main-content {
        padding: 90px 15px 20px;
    }
    
    .project-image,
    .project-img {
        height: 180px;
    }
    
    .project-links,
    .project-actions {
        width: 100%;
    }
    
    .project-btn,
    .btn-link {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
    
    .section {
        margin-bottom: 50px;
    }
    
    .mobile-menu-toggle,
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .mobile-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
}

/* Fun Grid Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .fun-stuff-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Fun Grid Desktop */
@media (min-width: 1025px) {
    .fun-stuff-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   16. UTILITY CLASSES
   ============================================ */
.img {
    width: 100%;
    height: auto;
    display: block;
}

.caption {
    margin-top: 12px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.card-frame {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.list {
    margin: 10px 0 0 18px;
}

.list li {
    margin: 6px 0;
}

/* ============================================
   17. LIFE / FUN FACTS SECTION
   ============================================ */
.fun-facts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.fun-fact-item {
    display: flex;
    gap: 25px;
    background: transparent;
    padding: 20px;
    transition: all 0.3s ease;
}


.fun-fact-image {
    flex-shrink: 0;
    width: 272px;
    height: 187px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.fun-fact-image img {
    width: 100%;
    height: 100%;
    object-fit:cover;
    transition: transform 0.3s ease;
}

.fun-fact-item:hover .fun-fact-image img {
    transform: scale(1.05);
}

.fun-fact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 20px;
}

.fun-fact-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    line-height: 1.4;
}

.fun-fact-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Fun Facts Responsive */
@media (max-width: 1200px) and (min-width: 1025px) {
    .fun-fact-image {
        width: 220px;
        height: 160px;
    }
}

@media (max-width: 1024px) {
    .fun-fact-image {
        width: 200px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .fun-fact-item {
        flex-direction: column;
        padding: 20px;
    }
    
    .fun-fact-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .fun-fact-image {
        height: 180px;
    }
}

/* Life Section Container */
.life-section {
    margin-bottom: 60px;
}