/* ==========================================================================
    CORE VARIABLES & DESIGN SYSTEM
    ========================================================================== */
:root {
    /* Light Theme Colors */
    --bg-main: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --accent: #06b6d4;
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.3);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-main: #060b18;
    --bg-secondary: #0c1222;
    --bg-card: rgba(20, 28, 48, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #22d3ee;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(10, 15, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(6, 11, 24, 0.85);
    --card-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-main);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-hover); }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header { text-align: center; margin-bottom: 4rem; position: relative; z-index: 2; }
.section-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.section-header h2 { font-size: 2.5rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

/* Layout */
section { padding: 6rem 5%; position: relative; }
.container { max-width: 1200px; margin: 0 auto; }

/* ==========================================================================
    PARTICLES & PROGRESS
    ========================================================================== */
#particles-js {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    pointer-events: none;
}

#scroll-top-btn{
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(15,23,42,.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .35s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

#scroll-top-btn.show{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scroll-top-btn:hover{
    transform: translateY(-5px) scale(1.05);
}

#scroll-percent{
    position: absolute;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.progress-ring{
    position:absolute;
    inset:0;
    transform: rotate(-90deg);
}

.progress-ring-bg{
    fill:none;
    stroke:rgba(255,255,255,.08);
    stroke-width:3;
}

.progress-ring-fill{
    fill:none;
    stroke:var(--primary);
    stroke-width:3;
    stroke-linecap:round;
    stroke-dasharray:170;
    stroke-dashoffset:170;
    transition:stroke-dashoffset .2s linear;
}
/* ==========================================================================
    NAVIGATION
    ========================================================================== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 1.5rem 5%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar.scrolled {
    padding: 1rem 5%; background: var(--nav-bg);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}
.nav-container {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { display: flex; align-items: center; gap: 1rem; }
.nav-logo img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.nav-logo-text h1 { font-size: 1.2rem; margin: 0; letter-spacing: 1px; }
.nav-logo-text p { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

.nav-menu { display: flex; gap: 2rem; align-items: center; }
.nav-menu a {
    font-size: 0.95rem; font-weight: 500; color: var(--text-main);
    position: relative; padding: 0.5rem 0; transition: color 0.3s;
}
.nav-menu a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0%; height: 2px; background: var(--primary);
    transition: width 0.3s ease; border-radius: 2px;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
#theme-toggle {
    background: none; border: none; color: var(--text-main);
    font-size: 1.2rem; cursor: pointer; transition: color 0.3s, transform 0.3s;
}
#theme-toggle:hover { color: var(--primary); transform: rotate(15deg); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff !important; padding: 0.7rem 1.8rem; border-radius: 50px;
    font-weight: 600; transition: all 0.3s ease; display: inline-flex;
    align-items: center; gap: 0.5rem; border: none; cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px var(--primary-glow); }

.btn-secondary {
    background: transparent; color: var(--text-main); padding: 0.7rem 1.8rem;
    border-radius: 50px; font-weight: 600; border: 1px solid var(--border-color);
    transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: rgba(59, 130, 246, 0.05); transform: translateY(-3px); }

#mobile-toggle { display: none; background: none; border: none; cursor: pointer; width: 30px; height: 24px; position: relative; z-index: 1001; }
#mobile-toggle span { display: block; width: 100%; height: 2px; background: var(--text-main); position: absolute; transition: 0.3s ease; }
#mobile-toggle span:nth-child(1) { top: 0; }
#mobile-toggle span:nth-child(2) { top: 11px; }
#mobile-toggle span:nth-child(3) { top: 22px; }
#mobile-toggle.active span:nth-child(1) { top: 11px; transform: rotate(45deg); }
#mobile-toggle.active span:nth-child(2) { opacity: 0; }
#mobile-toggle.active span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* ==========================================================================
    HERO SECTION
    ========================================================================== */
#home { min-height: 100vh; display: flex; align-items: center; padding-top: 100px; }
.hero-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; max-width: 1200px; margin: 0 auto;
}

.hero-badge {
    display: inline-block; padding: 0.5rem 1.2rem; background: var(--glass-bg);
    border: 1px solid var(--border-color); border-radius: 50px;
    font-size: 0.9rem; font-weight: 500; margin-bottom: 1.5rem; backdrop-filter: blur(10px);
}
.hero-name { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.hero-title { font-size: 1.5rem; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); margin-bottom: 1.5rem; min-height: 36px; }
.hero-description { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 540px; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }

.social-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.social-link {
    width: 45px; height: 45px; border-radius: 50%; background: var(--glass-bg);
    border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center;
    color: var(--text-main); transition: all 0.3s ease; font-size: 1.1rem;
}
.social-link:hover { background: var(--primary); color: #fff; transform: translateY(-5px); border-color: var(--primary); }

.hero-image-wrapper { position: relative; z-index: 1; display: flex; justify-content: center; }
.hero-glow {
    position: absolute; width: 400px; height: 400px; background: var(--primary);
    filter: blur(150px); border-radius: 50%; opacity: 0.2; z-index: -1;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    animation: pulse-glow 4s infinite alternate;
}
@keyframes pulse-glow { 0% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.1); } }

.hero-image-container {
    position: relative; border-radius: 30px; padding: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border: 1px solid var(--border-color); backdrop-filter: blur(10px);
    transform-style: preserve-3d; transition: transform 0.1s ease;
}
.hero-image-container img { border-radius: 20px; width: 100%; max-width: 420px; object-fit: cover; }

/* ==========================================================================
    ABOUT SECTION
    ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image-wrapper { position: relative; }
.about-image-wrapper img { border-radius: 24px; z-index: 2; position: relative; box-shadow: var(--card-shadow); }
.about-image-border {
    position: absolute; top: 10px; left: 10px; width: 100%; height: 100%;
    border: 2px solid var(--primary); border-radius: 24px; z-index: 1;
    transition: all 0.3s ease;
}
.about-image-wrapper:hover .about-image-border { top: 10px; left: 10px; }

.about-content h3 { font-size: 2rem; margin-bottom: 1.5rem; }
.about-text { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }

.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--glass-border); padding: 1.5rem;
    border-radius: 16px; text-align: center; backdrop-filter: blur(10px);
    transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary); margin-bottom: 0.5rem; }
.stat-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.about-specialties { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.specialty-card {
    display: flex; align-items: center; gap: 1rem; background: var(--bg-card);
    border: 1px solid var(--glass-border); padding: 1rem 1.5rem; border-radius: 12px;
    transition: all 0.3s;
}
.specialty-card i { color: var(--primary); font-size: 1.2rem; }
.specialty-card:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--primary); transform: translateX(5px); }

/* ==========================================================================
    SKILLS SECTION
    ========================================================================== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; }
.skill-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 2rem 1rem; text-align: center;
    backdrop-filter: blur(10px); transition: all 0.3s ease;
    cursor: pointer;
}
.skill-card i { font-size: 3rem; margin-bottom: 1rem; color: var(--primary); transition: transform 0.3s; }
.skill-card h4 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--text-main); }
.skill-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 10px 25px var(--primary-glow); }
.skill-card:hover i { transform: scale(1.1); color: var(--accent); }

/* ==========================================================================
    SERVICES SECTION
    ========================================================================== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.service-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 24px; padding: 2.5rem; backdrop-filter: blur(10px);
    transition: all 0.4s ease; position: relative; overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent, rgba(59, 130, 246, 0.05)); opacity: 0; transition: opacity 0.4s;
}
.service-card:hover { transform: translateY(-10px); border-color: rgba(59, 130, 246, 0.3); box-shadow: var(--card-shadow); }
.service-card:hover::before { opacity: 1; }
.service-icon {
    width: 70px; height: 70px; border-radius: 20px; background: rgba(59, 130, 246, 0.1);
    display: flex; align-items: center; justify-content: center; font-size: 2rem;
    color: var(--primary); margin-bottom: 1.5rem; border: 1px solid rgba(59, 130, 246, 0.2);
    transition: transform 0.3s;
}
.service-card:hover .service-icon { transform: rotateY(180deg); }
.service-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================================
    PROJECTS SECTION
    ========================================================================== */
.project-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn {
    background: var(--bg-card); border: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem; border-radius: 50px; color: var(--text-main);
    font-weight: 500; cursor: pointer; transition: all 0.3s;
}
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-btn[data-filter="live"].active,
.filter-btn[data-filter="live"]:hover {
    background: linear-gradient(135deg, #10b981, #059669); border-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* React icon spin on hover */
.skill-card:hover .fa-react { animation: react-spin 1.5s linear infinite !important; }
@keyframes react-spin { from { transform: scale(1.1) rotate(0deg); } to { transform: scale(1.1) rotate(360deg); } }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2.5rem; }
.project-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 20px; overflow: hidden; backdrop-filter: blur(10px);
    transition: all 0.4s ease; display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-10px); border-color: rgba(59, 130, 246, 0.3); box-shadow: var(--card-shadow); }
.project-image { position: relative; height: 220px; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-image img { transform: scale(1.1); }
.project-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(6, 11, 24, 0.8); display: flex; align-items: center; justify-content: center;
    gap: 1.5rem; opacity: 0; transition: all 0.4s ease;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-overlay a {
    width: 50px; height: 50px; border-radius: 50%; background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; transform: translateY(20px); transition: all 0.4s ease;
}
.project-card:hover .project-overlay a { transform: translateY(0); }
.project-overlay a:hover { background: var(--primary-hover); transform: translateY(-5px) !important; }

.project-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-info h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.project-info p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-tech span {
    font-size: 0.8rem; font-weight: 500; color: var(--accent);
    background: rgba(6, 182, 212, 0.1); padding: 0.3rem 0.8rem; border-radius: 50px;
}

/* Live Badge */
.live-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.75rem; font-weight: 700; color: #10b981;
    background: rgba(16, 185, 129, 0.12); padding: 0.25rem 0.75rem;
    border-radius: 50px; border: 1px solid rgba(16, 185, 129, 0.3);
    animation: live-pulse 2s infinite;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.live-badge .fa-circle { animation: live-blink 1.2s infinite; }
@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Project Live Link */
.project-live-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-top: 1rem; font-size: 0.85rem; font-weight: 600;
    color: var(--primary); transition: all 0.3s ease;
    border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.project-live-link:hover {
    color: var(--accent); border-bottom-color: var(--accent);
    transform: translateX(4px);
}

/* Skill icon color overrides */
.fa-node-js { color: #68A063 !important; }
.fa-react { color: #61DAFB !important; }
.fa-python { color: #FFD43B !important; }
.fa-figma { color: #a259ff !important; }
.fa-linux { color: #f0c000 !important; }
.skill-jquery-icon {
    display: block; font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem; font-weight: 700; color: #0769AD;
    margin-bottom: 1rem; transition: color 0.3s;
    line-height: 1;
}
.skill-card:hover .fa-node-js,
.skill-card:hover .fa-react,
.skill-card:hover .fa-python,
.skill-card:hover .fa-figma,
.skill-card:hover .fa-linux,
.skill-card:hover .skill-jquery-icon { color: var(--accent) !important; }

/* ==========================================================================
    CERTIFICATES & GALLERY
    ========================================================================== */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.cert-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 16px; overflow: hidden; backdrop-filter: blur(10px);
    cursor: pointer; transition: all 0.3s;
}
.cert-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.cert-thumb {
    height: 200px; background: var(--bg-secondary); position: relative;
    display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--text-muted);
}

/* Cert brand themes */
.cert-cisco  { background: linear-gradient(135deg, #0c1a2e, #003087); color: #1ba0e2 !important; }
.cert-cisco i { color: #1ba0e2; }
.cert-ibm   { background: linear-gradient(135deg, #0c1a2e, #002d9c); color: #4589ff !important; }
.cert-ibm i { color: #4589ff; }
.cert-meta  { background: linear-gradient(135deg, #0c1a2e, #2d1b5e); color: #a78bfa !important; }
.cert-meta i { color: #a78bfa; }
.cert-udemy { background: linear-gradient(135deg, #0c1a2e, #3d0a6e); color: #ec5252 !important; }
.cert-udemy i { color: #ec5252; }
.cert-google { background: linear-gradient(135deg, #0c1a2e, #1a3a1a); color: #34d399 !important; }
.cert-google i { color: #34d399; }
.cert-openai { background: linear-gradient(135deg, #0c1a2e, #0d2d2d); color: #2dd4bf !important; }
.cert-openai i { color: #2dd4bf; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cert-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(59, 130, 246, 0.2); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s; color: #fff; font-size: 2rem;
}
.cert-card:hover .cert-overlay { opacity: 1; }
.cert-info { padding: 1.5rem; }
.cert-info h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.cert-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.cert-category-badge {
    display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.6rem;
    background: rgba(59, 130, 246, 0.1); color: var(--primary); border-radius: 4px;
}

/* Lightbox */
#lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); z-index: 9999; display: flex;
    align-items: center; justify-content: center; opacity: 0; visibility: hidden;
    transition: all 0.3s ease; backdrop-filter: blur(10px);
}
#lightbox.active { opacity: 1; visibility: visible; }
#lightbox-content { width: 90%; max-width: 900px; max-height: 90vh; position: relative; }
#lightbox-content iframe, #lightbox-content img { width: 100%; height: 80vh; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
#lightbox-close {
    position: absolute; top: 20px; right: 30px; background: none; border: none;
    color: #fff; font-size: 2rem; cursor: pointer; transition: color 0.3s;
}
#lightbox-close:hover { color: var(--primary); }

/* ==========================================================================
    TIMELINE (Experience & Education)
    ========================================================================== */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 0; top: 0; width: 2px; height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
}
.timeline-item { position: relative; margin-bottom: 3rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute; left: -2rem; top: 0; width: 20px; height: 20px; border-radius: 50%;
    background: var(--bg-main); border: 4px solid var(--primary); transform: translateX(-50%);
    box-shadow: 0 0 10px var(--primary-glow);
}
.timeline-content {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 2rem; backdrop-filter: blur(10px);
    transition: transform 0.3s;
}
.timeline-content:hover { transform: translateX(10px); border-color: rgba(59, 130, 246, 0.3); }
.timeline-date {
    display: inline-block; padding: 0.3rem 1rem; background: rgba(59, 130, 246, 0.1);
    color: var(--primary); border-radius: 50px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem;
}
.timeline-content h3 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.timeline-content h4 { font-size: 1rem; color: var(--text-muted); font-weight: 500; margin-bottom: 1rem; }
.timeline-content p { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================================
    CONTACT SECTION
    ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; max-width: 1000px; margin: 0 auto; }
.contact-info-card {
    display: flex; align-items: flex-start; gap: 1.5rem; background: var(--bg-card);
    border: 1px solid var(--glass-border); padding: 1.5rem; border-radius: 16px;
    margin-bottom: 1.5rem; backdrop-filter: blur(10px); transition: transform 0.3s;
}
.contact-info-card:hover { transform: translateX(10px); border-color: rgba(59, 130, 246, 0.3); }
.contact-info-card .icon {
    width: 50px; height: 50px; border-radius: 12px; background: rgba(59, 130, 246, 0.1);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--primary);
}
.contact-info-card h4 { margin-bottom: 0.3rem; font-size: 1.1rem; }
.contact-info-card p { color: var(--text-muted); font-size: 0.95rem; }

.contact-form {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    padding: 2.5rem; border-radius: 24px; backdrop-filter: blur(10px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group textarea {
    width: 100%; padding: 1rem 1.2rem; background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color); border-radius: 12px; color: var(--text-main);
    font-family: inherit; font-size: 1rem; transition: all 0.3s;
}
[data-theme="dark"] .form-group input, [data-theme="dark"] .form-group textarea {
    background: rgba(255, 255, 255, 0.02);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); background: transparent;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.form-group textarea { height: 150px; resize: vertical; }

.contact-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-status {
    min-height: 1.5rem;
    margin: 0 0 1rem;
    color: var(--accent);
    font-weight: 600;
}

.contact-status.is-error {
    color: #ef4444;
}

#contact-form button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* ==========================================================================
    FOOTER
    ========================================================================== */
footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border-color);
    padding: 5rem 5% 2rem; position: relative; z-index: 10;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem;
    max-width: 1200px; margin: 0 auto 4rem;
}
.footer-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-brand h3 { font-size: 1.5rem; margin: 0; }
.footer-about p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; max-width: 400px; }
.footer-links h4 { font-size: 1.1rem; margin-bottom: 1.5rem; }
.footer-links ul li { margin-bottom: 0.8rem; }
.footer-links ul a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.3s; }
.footer-links ul a:hover { color: var(--primary); padding-left: 5px; }
.footer-bottom {
    text-align: center; padding-top: 2rem; border-top: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 0.9rem;
}
.footer-bottom span { color: var(--primary); font-weight: 600; }

.footer-brand img {
    width: 60px;
    height: 40px;
}

/* ==========================================================================
    RESPONSIVE MEDIA QUERIES
    ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid, .about-grid { gap: 2rem; }
    .hero-name { font-size: 3rem; }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--bg-card); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center;
        transition: 0.4s ease; border-left: 1px solid var(--glass-border);
    }
    .nav-menu.active { right: 0; }
    #mobile-toggle { display: block; }
    .hero-grid, .about-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content { order: 2; }
    .hero-image-wrapper { order: 1; }
    .hero-buttons { justify-content: center; }
    .social-grid { justify-content: center; }
    .about-image-wrapper { margin: 0 auto; max-width: 400px; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hero-name { font-size: 2.5rem; }
    .hero-title { font-size: 1.2rem; }
    section { padding: 4rem 5%; }
}

/* Visual polish and responsive refinements */
:root {
    --card-shadow: 0 18px 45px -24px rgba(15, 23, 42, 0.28);
}

[data-theme="dark"] {
    --card-shadow: 0 22px 55px -28px rgba(0, 0, 0, 0.85);
}

html {
    scroll-padding-top: 88px;
    overflow-x: clip;
}

body {
    background-image:
        radial-gradient(ellipse at 12% 8%, rgba(59, 130, 246, 0.07), transparent 34%),
        radial-gradient(ellipse at 88% 34%, rgba(6, 182, 212, 0.05), transparent 32%);
}

.navbar,
.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-menu {
    gap: clamp(0.8rem, 1.5vw, 1.5rem);
}

.nav-menu a {
    font-size: 0.9rem;
}

.nav-logo img {
    box-shadow: 0 5px 18px var(--primary-glow);
}

section {
    padding-top: clamp(4.5rem, 8vw, 7rem);
    padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

.section-header {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.04em;
}

.section-header p {
    max-width: 620px;
    margin: 0 auto;
}

#home {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

#home::before {
    content: "";
    position: absolute;
    width: min(58vw, 680px);
    aspect-ratio: 1;
    right: -16%;
    top: 5%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.13), rgba(6, 182, 212, 0.04) 48%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    width: 100%;
}

.hero-name {
    font-size: clamp(2.8rem, 5.5vw, 4.7rem);
    letter-spacing: -0.055em;
}

.hero-title {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.hero-image-container {
    box-shadow: var(--card-shadow);
}

.hero-image-container img {
    max-height: min(62vh, 620px);
    object-position: center top;
}

.hero-badge {
    color: var(--primary);
    font-weight: 600;
}

.btn-primary,
.btn-secondary {
    min-height: 48px;
    justify-content: center;
}

.skill-card,
.service-card,
.project-card,
.cert-card,
.stat-card,
.timeline-content,
.contact-info-card,
.contact-form {
    box-shadow: var(--card-shadow);
}

.skill-card,
.service-card,
.project-card,
.cert-card,
.stat-card,
.timeline-content,
.contact-info-card,
.contact-form {
    border-color: var(--border-color);
}

.skill-card:hover,
.service-card:hover,
.project-card:hover,
.cert-card:hover,
.stat-card:hover,
.timeline-content:hover,
.contact-info-card:hover {
    box-shadow: 0 22px 48px -24px var(--primary-glow);
}

.skill-card,
.service-card,
.project-card,
.cert-card {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.project-card {
    height: 100%;
}

.project-image {
    flex: 0 0 220px;
}

.project-live-link {
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.cert-info h3,
.project-info h3,
.timeline-content h3 {
    letter-spacing: -0.02em;
}

.contact-form {
    border: 1px solid var(--border-color);
    border-radius: 24px;
}

:where(a, button, input, textarea, .cert-card):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

@media (max-width: 1100px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1000;
        width: min(360px, 86vw);
        height: 100vh;
        height: 100dvh;
        padding: 6rem 2rem 2rem;
        background: var(--bg-main);
        border-left: 1px solid var(--border-color);
        box-shadow: -24px 0 60px rgba(15, 23, 42, 0.18);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0.25rem;
        overflow-y: auto;
        transform: translateX(105%);
        visibility: hidden;
        transition: transform 0.35s ease, visibility 0.35s ease;
    }

    .nav-menu.active {
        right: 0;
        transform: translateX(0);
        visibility: visible;
    }

    .nav-menu li a {
        display: block;
        padding: 0.9rem 1rem;
        border-radius: 12px;
        font-size: 1rem;
    }

    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: rgba(59, 130, 246, 0.1);
    }

    .nav-menu a::after {
        display: none;
    }

    #mobile-toggle {
        display: block;
        flex: 0 0 30px;
    }

    .nav-actions {
        gap: 1rem;
    }

    .hero-grid {
        gap: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: 1.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    }

    .certs-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    }
}

@media (max-width: 768px) {
    .navbar,
    .navbar.scrolled {
        padding: 0.75rem 5%;
    }

    .nav-logo {
        gap: 0.65rem;
    }

    .nav-logo img {
        width: 40px;
        height: 40px;
    }

    .nav-logo-text h1 {
        font-size: 1rem;
    }

    .nav-logo-text p {
        font-size: 0.68rem;
    }

    .nav-actions > .btn-primary {
        display: none;
    }

    #theme-toggle {
        width: 40px;
        height: 40px;
    }

    #home {
        min-height: auto;
        padding-top: 110px;
    }

    .hero-grid,
    .about-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .hero-content {
        order: 2;
    }

    .hero-image-wrapper {
        order: 1;
    }

    .hero-image-container {
        width: min(78vw, 390px);
    }

    .hero-image-container img {
        max-height: 48vh;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .about-image-wrapper {
        width: calc(100% - 12px);
    }

    .about-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .stat-number {
        font-size: clamp(1.7rem, 6vw, 2.3rem);
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .services-grid,
    .projects-grid,
    .certs-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-image {
        flex-basis: 200px;
    }

    .project-overlay {
        display: none;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-dot {
        left: -1.5rem;
    }

    .timeline-content,
    .service-card {
        padding: 1.5rem;
    }

    .contact-grid {
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    section {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .hero-name {
        font-size: clamp(2.35rem, 11vw, 3rem);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons a {
        width: 100%;
    }

    .social-grid {
        gap: 0.7rem;
    }

    .about-specialties {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-filters {
        gap: 0.6rem;
    }

    .filter-btn {
        padding: 0.55rem 1rem;
        font-size: 0.9rem;
    }

    .contact-info-card {
        gap: 1rem;
        padding: 1rem;
    }

    .contact-form {
        padding: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-about {
        grid-column: auto;
    }

    #scroll-top-btn {
        width: 48px;
        height: 48px;
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}