/* ===== CSS VARIABLES ===== */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --sidebar-width: 280px;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 9999; width: 0; transition: width 0.1s linear;
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed; inset: 0; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    z-index: 9998; transition: opacity 0.4s ease;
}
.preloader-content { text-align: center; }
.preloader-logo img {
    width: 80px; height: 80px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 1rem;
    border: 3px solid var(--primary);
}
.preloader-text h2 { font-size: 1.2rem; color: var(--text); margin-bottom: 0.25rem; }
.preloader-text p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
.preloader-progress {
    width: 200px; height: 3px; background: var(--border);
    border-radius: 2px; margin: 0 auto; overflow: hidden;
}
.progress-bar {
    height: 100%; width: 0; border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 1s ease;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed; top: 1.25rem; right: 1.25rem;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 1000; box-shadow: var(--shadow);
    transition: all var(--transition); color: var(--text);
}
.theme-toggle:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed; bottom: 2rem; right: 1.5rem;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    z-index: 999; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(20px);
    transition: all var(--transition); pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== SIDEBAR ===== */
.sidebar-nav {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width); background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 100; overflow-y: auto;
    transition: transform var(--transition);
    box-shadow: 2px 0 20px rgba(0,0,0,0.05);
}
.sidebar-header { padding: 2rem 1.5rem 1.5rem; border-bottom: 1px solid var(--border); }
.profile-section { text-align: center; }
.sidebar-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    object-fit: cover; margin: 0 auto 0.75rem;
    border: 3px solid var(--primary);
}
.sidebar-name { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.2rem; }
.sidebar-title { font-size: 0.75rem; color: var(--primary); font-weight: 500; margin-bottom: 0.2rem; }
.sidebar-location { font-size: 0.72rem; color: var(--text-muted); }
.sidebar-menu { padding: 1.25rem 1rem; flex: 1; }
.sidebar-menu li { margin-bottom: 0.25rem; }
.sidebar-link {
    display: flex; align-items: center; padding: 0.65rem 1rem;
    border-radius: var(--radius); color: var(--text-secondary);
    font-size: 0.875rem; font-weight: 500;
    transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.sidebar-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
.sidebar-footer .social-links { display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 0.75rem; }
.social-icon {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 0.85rem;
    transition: all var(--transition);
}
.social-icon:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.copyright { font-size: 0.7rem; color: var(--text-muted); text-align: center; }

/* ===== MOBILE NAV TOGGLE ===== */
.mobile-nav-toggle {
    display: none; position: fixed; top: 1.25rem; left: 1.25rem;
    width: 44px; height: 44px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; cursor: pointer; z-index: 200; box-shadow: var(--shadow);
}
.mobile-nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: all var(--transition);
}
.mobile-nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
    backdrop-filter: blur(4px);
}
.nav-backdrop.active { display: block; }

/* ===== MAIN CONTENT ===== */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; }

/* ===== SECTION COMMON ===== */
section { padding: 5rem 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-subtitle {
    display: inline-block; font-size: 0.8rem; font-weight: 600;
    color: var(--primary); text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800;
    color: var(--text); margin-bottom: 1rem; line-height: 1.2;
}
.section-divider {
    width: 60px; height: 4px; margin: 0 auto 1rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}
.section-description { color: var(--text-secondary); max-width: 600px; margin: 0 auto; font-size: 0.95rem; }

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600; transition: all var(--transition);
    border: 2px solid transparent;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,0.35); }
.btn-secondary {
    background: transparent; color: var(--primary);
    border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; transition: all var(--transition); }
.btn-full { width: 100%; justify-content: center; }

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh; display: flex; align-items: center;
    background: var(--bg); padding: 2rem;
    position: relative; overflow: hidden;
}

/* Subtle dot-grid background */
.hero-bg-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 50%, black 40%, transparent 100%);
}

.hero-content-wrapper {
    display: flex; align-items: center; gap: 4rem;
    max-width: 1060px; margin: 0 auto; width: 100%;
    position: relative; z-index: 1;
}
.hero-text { flex: 1; }
.hero-greeting { font-size: 1rem; color: var(--primary); font-weight: 600; margin-bottom: 0.5rem; }
.hero-name {
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
    color: var(--text); line-height: 1.1; margin-bottom: 0.75rem;
}
.hero-title {
    font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-secondary);
    font-weight: 500; margin-bottom: 1rem;
}
.typing-text {
    color: var(--primary); font-weight: 700;
    border-right: 2px solid var(--primary);
    padding-right: 3px; animation: blink 0.8s step-end infinite;
}
@keyframes blink { 50% { border-color: transparent; } }
.hero-description {
    color: var(--text-secondary); font-size: 0.88rem;
    margin-bottom: 1.75rem; line-height: 1.7; max-width: 460px;
}
.hero-stats { display: flex; gap: 2rem; margin-bottom: 2rem; }
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-top: 0.2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== ORBIT VISUAL ===== */
.hero-visual {
    flex-shrink: 0;
    width: 380px; height: 380px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}

.orbit-container {
    position: relative;
    width: 340px; height: 340px;
    display: flex; align-items: center; justify-content: center;
}

/* Central core */
.orbit-core {
    position: absolute; z-index: 10;
    width: 100px; height: 100px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.core-blob {
    position: absolute; inset: 0; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    animation: blobPulse 3s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(59,130,246,0.5), 0 0 80px rgba(139,92,246,0.25);
}
@keyframes blobPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(59,130,246,0.5), 0 0 80px rgba(139,92,246,0.25); }
    50%       { transform: scale(1.1); box-shadow: 0 0 60px rgba(59,130,246,0.7), 0 0 100px rgba(139,92,246,0.4); }
}
.core-initials {
    position: relative; z-index: 1;
    font-size: 1.6rem; font-weight: 800; color: #fff;
    letter-spacing: 1px;
}

/* Orbit rings — visual only, JS handles icon positioning */
.orbit {
    position: absolute; border-radius: 50%;
    border: 1px dashed var(--border);
    top: 50%; left: 50%;
    pointer-events: none;
}
.orbit-inner {
    width: 200px; height: 200px;
    margin: -100px 0 0 -100px;
}
.orbit-outer {
    width: 320px; height: 320px;
    margin: -160px 0 0 -160px;
}

.orbit-icon i    { font-size: 1.1rem; color: var(--primary); }
.orbit-icon span { font-size: 0.5rem; font-weight: 600; color: var(--text-muted); line-height: 1; }
.orbit-icon:hover { box-shadow: 0 8px 24px rgba(59,130,246,0.3); border-color: var(--primary); }
.orbit-icon:hover i { color: var(--secondary); }

/* ===== ABOUT SECTION ===== */
.about { background: var(--bg-secondary); }
.about-wrapper {
    display: grid; grid-template-columns: 260px 1fr;
    gap: 3.5rem; align-items: start; margin-bottom: 3rem;
}
.about-image-container {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-img { width: 100%; height: 320px; object-fit: cover; object-position: top center; display: block; }
.experience-badge {
    position: absolute; bottom: 1rem; right: -0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius);
    text-align: center; box-shadow: var(--shadow);
}
.badge-number { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1; }
.badge-text { font-size: 0.65rem; font-weight: 600; opacity: 0.9; }
.about-name { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.about-role { color: var(--primary); font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; }
.about-bio { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.75rem; }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.25rem 0; }
.about-card {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 0.75rem; text-align: center;
    transition: all var(--transition);
}
.about-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.about-card i { font-size: 1.25rem; color: var(--primary); margin-bottom: 0.5rem; }
.about-card h4 { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.about-card p { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.4; }
.about-skills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.skill-tag {
    padding: 0.3rem 0.75rem; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: 20px;
    font-size: 0.75rem; font-weight: 500; color: var(--text-secondary);
    transition: all var(--transition);
}
.skill-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.about-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.about-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem; margin-top: 1rem;
}
.stat-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; text-align: center;
    box-shadow: var(--shadow); transition: all var(--transition);
}
.stat-box:hover { border-color: var(--primary); transform: translateY(-3px); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-text { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.4rem; font-weight: 500; }

/* ===== EXPERIENCE / TIMELINE ===== */
.experience { background: var(--bg); }
.timeline-container { max-width: 800px; margin: 0 auto; }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-marker {
    position: absolute; left: -2.75rem; top: 0.25rem;
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.85rem; box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.timeline-content {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.5rem;
    box-shadow: var(--shadow); transition: all var(--transition);
}
.timeline-content:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.timeline-header { margin-bottom: 0.75rem; }
.timeline-header h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.timeline-date { font-size: 0.78rem; color: var(--text-muted); margin-right: 0.5rem; }
.timeline-type {
    display: inline-block; font-size: 0.7rem; font-weight: 600;
    padding: 0.2rem 0.6rem; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
}
.timeline-type.research { background: rgba(139,92,246,0.1); color: var(--secondary); }
.timeline-type.internship { background: rgba(16,185,129,0.1); color: #10b981; }
.timeline-type.education { background: rgba(59,130,246,0.1); color: var(--primary); }
.timeline-description p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.timeline-achievements { padding-left: 1rem; margin-bottom: 0.75rem; }
.timeline-achievements li { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.3rem; position: relative; }
.timeline-achievements li::before { content: '▸'; position: absolute; left: -1rem; color: var(--primary); }
.timeline-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tech-tag {
    padding: 0.2rem 0.6rem; background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2); border-radius: 20px;
    font-size: 0.72rem; font-weight: 500; color: var(--primary);
}

/* ===== PROJECTS ===== */
.projects { background: var(--bg-secondary); }
.project-filter { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.5rem; }
.filter-btn {
    padding: 0.5rem 1.25rem; border-radius: 25px;
    border: 1.5px solid var(--border); background: var(--bg-card);
    color: var(--text-secondary); font-size: 0.82rem; font-weight: 500;
    transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border-color: transparent;
}
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.project-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow); transition: all var(--transition);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.project-image {
    height: 160px; background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.project-image-placeholder { font-size: 3rem; color: var(--primary); opacity: 0.6; }
.project-overlay {
    position: absolute; inset: 0; background: rgba(15,23,42,0.7);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-links { display: flex; gap: 0.75rem; }
.project-link {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.9rem; transition: all var(--transition);
    backdrop-filter: blur(4px);
}
.project-link:hover { background: var(--primary); border-color: var(--primary); }
.project-content { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.project-category { font-size: 0.72rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.4rem; }
.project-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.6rem; }
.project-description { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.75rem; flex: 1; }
.project-features { margin-bottom: 0.75rem; }
.feature-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.feature-item i { color: #10b981; font-size: 0.7rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.projects-cta { text-align: center; margin-bottom: 2.5rem; }
.projects-cta p { color: var(--text-secondary); margin-bottom: 1rem; }

/* Live Demos */
.live-demos-section { margin-top: 1rem; }
.live-demos-section h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; text-align: center; }
.demos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.demo-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; text-align: center;
    transition: all var(--transition);
}
.demo-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.demo-icon { font-size: 1.75rem; color: var(--primary); margin-bottom: 0.6rem; }
.demo-card h4 { font-size: 0.875rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.demo-card p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.demo-link {
    display: inline-block; padding: 0.35rem 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
    transition: all var(--transition);
}
.demo-link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }

/* ===== SKILLS ===== */
.skills { background: var(--bg); }
.skills-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.skill-category {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.5rem;
    box-shadow: var(--shadow); transition: all var(--transition);
}
.skill-category:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.category-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.category-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.9rem; flex-shrink: 0;
}
.category-header h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.skill-item { margin-bottom: 0.9rem; }
.skill-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.skill-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.skill-level { font-size: 0.72rem; color: var(--text-muted); }
.skill-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.skill-progress {
    height: 100%; width: 0; border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.8s ease;
}

/* ===== CONTACT ===== */
.contact { background: var(--bg-secondary); }
.contact-content { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; align-items: start; }
.contact-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem;
    box-shadow: var(--shadow);
}
.contact-header { margin-bottom: 1.5rem; }
.contact-header h3 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.contact-header p { font-size: 0.85rem; color: var(--text-secondary); }
.contact-methods { margin-bottom: 1.5rem; }
.contact-method { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.method-icon {
    width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.9rem;
}
.method-content h4 { font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 0.15rem; }
.method-content p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.2rem; }
.method-link { font-size: 0.75rem; color: var(--primary); font-weight: 600; transition: color var(--transition); }
.method-link:hover { color: var(--primary-dark); }
.contact-card .social-links { display: flex; gap: 0.75rem; }
.social-link {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 0.9rem;
    transition: all var(--transition);
}
.social-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Contact Form */
.contact-form-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem;
    box-shadow: var(--shadow);
}
.form-header { margin-bottom: 1.5rem; }
.form-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.form-header p { font-size: 0.82rem; color: var(--text-secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.7rem 1rem;
    background: var(--bg-secondary); border: 1.5px solid var(--border);
    border-radius: var(--radius); color: var(--text); font-size: 0.875rem;
    font-family: inherit; transition: all var(--transition); outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-group input.error, .form-group textarea.error, .form-group select.error {
    border-color: #ef4444;
}
.field-error { font-size: 0.75rem; color: #ef4444; margin-top: 0.3rem; }
.form-group textarea { resize: vertical; min-height: 120px; }
.contact-form .btn-primary { width: 100%; justify-content: center; padding: 0.85rem; font-size: 0.95rem; border: none; }

/* ===== FOOTER ===== */
.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; }
.footer-content { width: 100%; }
.footer-main { display: flex; gap: 3rem; margin-bottom: 2rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.footer-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.brand-content h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.brand-content p { font-size: 0.78rem; color: var(--text-secondary); }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; flex: 1; }
.footer-section h4 { font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-section ul li { margin-bottom: 0.4rem; }
.footer-section ul li a, .footer-section ul li { font-size: 0.8rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-section ul li a:hover { color: var(--primary); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 1.5rem; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 1rem;
}
.footer-copyright p { font-size: 0.78rem; color: var(--text-muted); }
.footer-social { display: flex; gap: 0.5rem; }

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 1024px) {
    :root { --sidebar-width: 260px; }
    .hero-content-wrapper { gap: 2.5rem; }
    .hero-visual { width: 300px; height: 300px; }
    .orbit-container { width: 280px; height: 280px; }
    .about-wrapper { grid-template-columns: 220px 1fr; gap: 2.5rem; }
    .contact-content { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
    :root { --sidebar-width: 280px; }

    .sidebar-nav {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar-nav.active { transform: translateX(0); }
    .mobile-nav-toggle { display: flex; }
    .main-content { margin-left: 0; }
    .theme-toggle { right: 1rem; top: 1rem; }

    /* Hero */
    .hero-section { padding: 5rem 1.25rem 3rem; }
    .hero-content-wrapper { flex-direction: column; gap: 2rem; text-align: center; }
    .hero-visual { width: 260px; height: 260px; order: -1; }
    .orbit-container { width: 240px; height: 240px; }
    .hero-description { margin: 0 auto 1.5rem; }
    .hero-stats { justify-content: center; gap: 1.5rem; }
    .hero-actions { justify-content: center; }

    /* About */
    .about-wrapper { grid-template-columns: 1fr; gap: 2rem; }
    .about-image-container { max-width: 260px; margin: 0 auto; }
    .about-img { height: 280px; }
    .about-cards { grid-template-columns: repeat(3, 1fr); }
    .about-stats { grid-template-columns: repeat(2, 1fr); }

    /* Timeline */
    .timeline { padding-left: 1.5rem; }
    .timeline-marker { left: -2.25rem; width: 34px; height: 34px; font-size: 0.75rem; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; }
    .demos-grid { grid-template-columns: repeat(2, 1fr); }

    /* Skills */
    .skills-container { grid-template-columns: 1fr; }

    /* Contact */
    .form-row { grid-template-columns: 1fr; }

    /* Footer */
    .footer-main { flex-direction: column; gap: 1.5rem; }
    .footer-links { gap: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }

    /* Section */
    section { padding: 3.5rem 0; }
    .container { padding: 0 1.25rem; }
    .section-title { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .about-cards { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: repeat(2, 1fr); }
    .demos-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 1rem; }
    .stat-number { font-size: 1.5rem; }
    .project-filter { gap: 0.35rem; }
    .filter-btn { padding: 0.4rem 0.9rem; font-size: 0.78rem; }
}

/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] .hero-section::before {
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
}
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: var(--bg); color: var(--text);
}
[data-theme="dark"] .form-group select option { background: var(--bg-secondary); }

/* ===== PRINT ===== */
@media print {
    .sidebar-nav, .mobile-nav-toggle, .theme-toggle, .back-to-top,
    .scroll-progress, #preloader, .hero-actions { display: none !important; }
    .main-content { margin-left: 0; }
    section { padding: 1.5rem 0; break-inside: avoid; }
}
