/* ========================================
   CSS Variables
   ======================================== */
:root {
    /* Colors - Professional Green Theme (Light Mode) */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --accent-color: #0891b2;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #f0fdf4;
    --bg-secondary: #dcfce7;
    --bg-tertiary: #bbf7d0;
    --card-bg: #ffffff;
    --border-color: #d1fae5;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 16px 0 rgba(0, 0, 0, 0.15);
    
    /* Gradients */
    --hero-gradient: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    --card-gradient: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    --section-gradient-1: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    --section-gradient-2: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    --section-gradient-3: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    
    /* Decorative Overlays */
    --overlay-light: rgba(16, 185, 129, 0.05);
    --overlay-medium: rgba(16, 185, 129, 0.1);
    --overlay-strong: rgba(16, 185, 129, 0.15);
    
    /* Sidebar - Modern Green Gradient */
    --sidebar-width: 280px;
    --sidebar-bg: linear-gradient(135deg, #064e3b 0%, #047857 30%, #10b981 100%);
    
    /* Top Navbar */
    --navbar-height: 60px;
    
    /* Typography */
    --font-family: 'Poppins', sans-serif;
    --font-size-base: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* Colors - Professional Dark Mode */
    --primary-color: #34d399;
    --primary-dark: #10b981;
    --primary-light: #6ee7b7;
    --accent-color: #06b6d4;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --card-bg: #1e293b;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px 0 rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 4px 8px 0 rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 8px 16px 0 rgba(0, 0, 0, 0.45);
    
    /* Gradients - Dark Mode */
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --card-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --section-gradient-1: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --section-gradient-2: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --section-gradient-3: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    
    /* Decorative Overlays - Dark Mode */
    --overlay-light: rgba(52, 211, 153, 0.1);
    --overlay-medium: rgba(52, 211, 153, 0.15);
    --overlay-strong: rgba(52, 211, 153, 0.2);
    
    /* Sidebar - Dark Mode */
    --sidebar-bg: linear-gradient(135deg, #022c22 0%, #064e3b 30%, #047857 100%);
    
    /* Top Navbar - Dark Mode */
    --navbar-bg: #1e293b;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

button {
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

/* ========================================
   Sidebar (Profile & Contact)
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-content {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    position: relative;
}

/* Sidebar Close Button (Mobile Only) */
.sidebar-close {
    display: none !important; /* Force hide on desktop */
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 10;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Profile */
.sidebar-profile {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.sidebar-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.95);
}

.sidebar-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* Resume Button */
.sidebar-resume {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.sidebar-resume:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Contact Info */
.sidebar-contact {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-item i {
    margin-top: 2px;
    font-size: 0.95rem;
    min-width: 16px;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.9);
    word-break: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.contact-item a:hover {
    color: white;
    text-decoration: underline;
}

/* Social Links */
.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
}

.sidebar-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.125rem;
    transition: var(--transition-base);
}

.sidebar-social a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

/* ========================================
   Top Navigation Bar (Horizontal)
   ======================================== */
.top-navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--navbar-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 999;
    transition: var(--transition-base);
}

[data-theme="dark"] .top-navbar {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
}

.navbar-container {
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

/* Navigation Links */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: var(--transition-base);
    white-space: nowrap;
}

.nav-link i {
    font-size: 1rem;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: rotate(15deg) scale(1.1);
}

[data-theme="dark"] .theme-toggle {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none !important; /* Force hide on desktop */
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

.section {
    padding: 4rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    scroll-margin-top: calc(var(--navbar-height) + 10px);
}

.section-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    box-shadow: 0 2px 8px var(--overlay-strong);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    min-height: 100vh;
    padding: 4rem 2rem;
}

.hero-section::before {
    display: none;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

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

/* ========================================
   About Section
   ======================================== */
#about {
    background: var(--bg-secondary);
    position: relative;
}

#about::before {
    display: none;
}

.about-content {
    position: relative;
    z-index: 1;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ========================================
   Education Section (Timeline)
   ======================================== */
#education {
    background: var(--bg-primary);
}

.timeline {
    position: relative;
    padding-left: 40px;
    margin-top: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 30px;
}

.timeline-icon {
    position: absolute;
    left: -28px;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.75rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary-color);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    display: none;
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(6px);
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.timeline-date {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.timeline-content ul li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.timeline-content p strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* ========================================
   Skills Section
   ======================================== */
#skills {
    background: var(--bg-primary);
    position: relative;
}

#skills::after {
    display: none;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fixed 4 columns */
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    display: none;
}

.skill-card:hover::after {
    display: none;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition-base);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.skill-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: none;
}

.skill-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   Projects Section
   ======================================== */
#projects {
    background: var(--bg-primary);
    position: relative;
}

#projects::before {
    display: none;
}

.projects-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.project-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    display: none;
}

.project-card:hover::before {
    display: none;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.project-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   Research Section
   ======================================== */
#research {
    background: var(--bg-secondary);
}

.research-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    margin-top: 2rem;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.research-card::before {
    display: none;
}

.research-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.research-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.research-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #059669);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.research-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.research-conference {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.research-abstract {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ========================================
   Experience Section
   ======================================== */
#experience {
    background: var(--bg-primary);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.experience-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    transition: var(--transition-base);
    border-top: 3px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.experience-card::after {
    display: none;
}

.experience-card:hover::after {
    display: none;
}

.experience-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.experience-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.experience-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.375rem;
    flex-shrink: 0;
}

.experience-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.experience-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.experience-date {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.experience-details {
    list-style: disc;
    padding-left: 1.5rem;
}

.experience-details li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ========================================
   Contact Section
   ======================================== */
#contact {
    background: var(--bg-secondary);
    position: relative;
}

#contact::before {
    display: none;
}

.contact-section .container {
    max-width: 1000px;
}

.center-title {
    text-align: center;
}

.center-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

/* Left Side - Contact Info */
.contact-info-side h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-details {
    margin-bottom: 1.75rem;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.contact-detail-item i {
    color: var(--primary-color);
    font-size: 1.125rem;
    width: 20px;
}

.contact-detail-item a {
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.contact-detail-item a:hover {
    color: var(--primary-color);
}

.contact-detail-item span {
    color: var(--text-secondary);
}

.contact-social-icons {
    display: flex;
    gap: 0.75rem;
}

.contact-social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1.125rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.contact-social-icons a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Right Side - Contact Form */
.contact-form-side {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.contact-form-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group-modern {
    position: relative;
}

.form-group-modern input,
.form-group-modern textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.form-group-modern input::placeholder,
.form-group-modern textarea::placeholder {
    color: var(--text-light);
}

.form-group-modern input:focus,
.form-group-modern textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

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

.btn-send-message {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    margin-top: 0.5rem;
}

.btn-send-message:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    opacity: 0.85;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    opacity: 1;
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.scroll-to-top:active {
    transform: translateY(-3px);
}

/* Contact Section Responsive */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info-side h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .contact-form-side {
        padding: 1.5rem;
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px var(--overlay-strong);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--overlay-strong);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
}

.view-certificate-btn {
    margin-top: 1rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 4rem 2rem 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
}

/* Footer About Section */
.footer-about p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 1.125rem;
    transition: var(--transition-base);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Footer Links Section */
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

.footer-links ul li {
    margin-bottom: 0;
}

.footer-links ul li a {
    color: #94a3b8;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    display: inline-block;
}

.footer-links ul li a:hover {
    color: white;
    transform: translateX(3px);
}

/* Footer Contact Section */
.footer-contact-item {
    margin-bottom: 1.25rem;
}

.footer-contact-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.25rem;
}

.footer-contact-item p,
.footer-contact-item a {
    font-size: 0.95rem;
    color: white;
    line-height: 1.6;
}

.footer-contact-item a:hover {
    color: var(--primary-color);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981 !important;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Footer Bottom */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 0.5rem;
    padding: 1rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #64748b;
}

/* Footer Responsive */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 1.5rem 0;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-about {
        grid-column: 1;
    }
    
    .footer-bottom {
        text-align: center;
    }
}

/* ========================================
   Certificate Modal
   ======================================== */
.certificate-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.certificate-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.certificate-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: var(--shadow-xl);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-modal-content img {
    max-width: 100%;
    max-height: calc(90vh - 1.5rem);
    width: auto;
    height: auto;
    display: block;
    border-radius: 0.25rem;
    object-fit: scale-down;
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
}

/* ========================================
   Mobile Menu Toggle
   ======================================== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    /* Hide sidebar by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition-base);
        z-index: 1001;
        width: 85vw;
        max-width: 320px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex !important; /* Override desktop hide */
        align-items: center;
        justify-content: center;
    }
    
    /* Hide top navbar on mobile - sidebar has navigation */
    .top-navbar {
        display: none;
    }
    
    /* Remove margins and ensure full width */
    .main-content {
        margin-left: 0;
        padding-top: 0;
        width: 100%;
        max-width: 100%;
    }

    /* All sections full width */
    .section {
        padding: 3rem 1rem;
        width: 100%;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    /* Show mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex !important; /* Override desktop hide */
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 999;
        background: var(--primary-color);
        color: white;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: none;
        font-size: 1.25rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        transition: var(--transition-base);
    }

    .mobile-menu-toggle:hover {
        background: var(--primary-dark);
        transform: scale(1.05);
    }
    
    /* Theme toggle on mobile */
    .theme-toggle {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 999;
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .section {
        padding: 3rem 1.5rem;
        min-height: auto;
    }
    
    .hero-greeting {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Keep 4 columns on tablet/desktop - only change on mobile */
    
    .experience-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar-content {
        padding: 1.5rem 1rem;
    }
    
    .sidebar-avatar {
        width: 100px;
        height: 100px;
    }
    
    .sidebar-name {
        font-size: 1.25rem;
    }
    
    .hero-greeting {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .timeline {
        padding-left: 30px;
    }
    
    .timeline-item {
        padding-left: 20px;
    }
    
    .timeline-icon {
        width: 32px;
        height: 32px;
        left: -24px;
        font-size: 0.75rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .project-header h3 {
        font-size: 1.5rem;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-links .btn {
        width: 100%;
        justify-content: center;
    }
    
    .research-header {
        flex-direction: column;
    }
    
    .research-header h3 {
        font-size: 1.25rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .certificate-modal-content {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2rem 1rem;
    }
    
    .hero-greeting {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .timeline-content,
    .project-card,
    .research-card,
    .experience-card {
        padding: 1.5rem;
    }
}

/* ========================================
   Smooth Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ========================================
   Utilities
   ======================================== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ========================================
   Theme Toggle Button
   ======================================== */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--card-gradient);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--shadow-xl);
}

.theme-toggle i {
    font-size: 1.25rem;
    color: var(--primary-color);
    transition: var(--transition-base);
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

/* Hide sun icon in light mode, moon in dark mode */
[data-theme="light"] .theme-toggle .fa-moon {
    display: block;
}

[data-theme="light"] .theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

@media (max-width: 992px) {
    .theme-toggle {
        top: 1.5rem;
        right: 5rem;
        width: 45px;
        height: 45px;
    }
}
