/* --- Futuristic Glassmorphic Portfolio Design System --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
    /* Cyber Red Accent - Refined Deep Crimson */
    --accent: #e62e4d;
    --accent-glow: rgba(230, 46, 77, 0.08);
    --accent-hover: #ff4d6d;
    
    /* Coordinated Balance Accent - Red Accent (replacing Gold) */
    --accent-secondary: #ff4d6d;
    --accent-secondary-glow: rgba(255, 77, 109, 0.08);
    --accent-secondary-hover: #ff758f;

    --success: #00f0ff; /* Cyber Cyan */
    --success-glow: rgba(0, 240, 255, 0.15);
    --error: #f75a68;
    
    /* Default: Dark Mode Variables (Red/Black Gradients) */
    --bg: #050508;
    --bg-gradient: radial-gradient(circle at 50% 50%, #0c0204 0%, #050508 100%);
    --bg-grid: rgba(255, 255, 255, 0.006); /* Highly subtle white/neutral grid instead of bright red grid */
    --bg-card: linear-gradient(135deg, rgba(16, 8, 10, 0.35) 0%, rgba(8, 8, 12, 0.45) 100%);
    --bg-card-hover: linear-gradient(135deg, rgba(24, 10, 14, 0.45) 0%, rgba(14, 14, 20, 0.55) 100%);
    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(230, 46, 77, 0.25); /* Red hover glow */
    
    --text: #f5f5f7;
    --text-muted: #9fa0a6;
    --shadow: rgba(0, 0, 0, 0.45);
    
    /* Fonts */
    --font-sans: 'Outfit', 'Inter', 'IBM Plex Sans Arabic', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --transition: cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

/* Light Mode Theme Overrides */
[data-theme="light"] {
    --accent: #d90429;
    --accent-glow: rgba(217, 4, 41, 0.06);
    --accent-hover: #ef233c;
    
    --accent-secondary: #ef233c;
    --accent-secondary-glow: rgba(239, 35, 60, 0.06);
    --accent-secondary-hover: #d90429;
    
    --success: #0066cc; /* Deep Cobalt Blue */
    --success-glow: rgba(0, 102, 204, 0.08);
    --error: #c53030;
    
    --bg: #f5f5f7;
    --bg-gradient: radial-gradient(circle at 50% 50%, #fffbf2 0%, #f4f4f7 100%);
    --bg-grid: rgba(0, 0, 0, 0.005);
    --bg-card: linear-gradient(135deg, rgba(255, 250, 240, 0.35) 0%, rgba(255, 255, 255, 0.45) 100%);
    --bg-card-hover: linear-gradient(135deg, rgba(255, 245, 225, 0.45) 0%, rgba(255, 255, 255, 0.55) 100%);
    --border: rgba(0, 0, 0, 0.07);
    --border-hover: rgba(217, 4, 41, 0.25);
    
    --text: #1d1d1f;
    --text-muted: #6e6e73;
    --shadow: rgba(0, 0, 0, 0.06);
}

html:lang(en) {
    --font-sans: 'Outfit', 'Inter', sans-serif;
}

html:lang(ar) {
    --font-sans: 'IBM Plex Sans Arabic', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    background-image: 
        linear-gradient(var(--bg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
        var(--bg-gradient);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    background-attachment: scroll, scroll, fixed;
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

button, input, select, textarea {
    font-family: inherit;
}

input, textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Smooth Transitions for Light/Dark Mode Switching */
body, .profile-card, .hero-section, .section, .site-header, .header-container, .nav-link, .btn, .skills-col, .tag, .contact-link-item, .form-field input, .form-field textarea, .github-project-card, .project-skeleton-card, .filter-btn, .projects-controls, .projects-page-header {
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Dynamic Glowing Background Orbs */
body::before, body::after {
    content: "";
    position: fixed;
    width: 45vw;
    height: 45vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

body::before {
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -10%;
    right: -10%;
    animation: float-blob-1 25s infinite alternate ease-in-out;
    opacity: 0.07;
}

body::after {
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    bottom: -10%;
    left: -10%;
    animation: float-blob-2 20s infinite alternate ease-in-out;
    opacity: 0.05;
}

[data-theme="light"] body::before {
    opacity: 0.03;
}

[data-theme="light"] body::after {
    opacity: 0.02;
}

@keyframes float-blob-1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-8%, 12%) scale(1.15); }
    100% { transform: translate(6%, -4%) scale(0.9); }
}

@keyframes float-blob-2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12%, -8%) scale(0.85); }
    100% { transform: translate(-6%, 6%) scale(1.1); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 2px solid var(--bg);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

#main-content {
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

#main-content.fade-out {
    opacity: 0;
    transform: translateY(12px);
}

/* --- Floating Capsule Header Navigation --- */
.site-header {
    position: sticky;
    top: 20px;
    z-index: 1000;
    margin-bottom: 20px;
}

.header-container {
    background: rgba(13, 13, 17, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 99px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 10px 40px var(--shadow);
    max-width: 950px;
    margin: 0 auto;
}

[data-theme="light"] .header-container {
    background: rgba(255, 255, 255, 0.6);
}

.header-container:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .header-container:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.08);
}

.logo {
    font-weight: 800;
    font-size: 1.35rem;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    direction: ltr;
    font-family: var(--font-mono);
}

.logo-tag {
    color: var(--success);
    font-weight: 800;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.logo-class {
    color: var(--text);
    transition: color 0.35s ease;
}

.logo-dot {
    color: var(--text-muted);
}

.logo-method {
    color: var(--accent);
    transition: color 0.35s ease;
}

.logo:hover .logo-tag:first-child {
    transform: translateX(-3.5px) scale(1.15);
}

.logo:hover .logo-tag:last-child {
    transform: translateX(3.5px) scale(1.15);
}

.logo:hover .logo-method {
    color: var(--accent-hover);
}

.nav-list {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    position: relative;
    border: 1px solid transparent;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link.active {
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--accent);
    font-weight: 600;
    border: 1px solid var(--accent-glow);
}

/* Theme Switcher Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    user-select: none;
    transition: var(--transition);
}

.theme-toggle-btn svg {
    color: var(--text);
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle-btn:hover svg {
    transform: scale(1.15) rotate(15deg);
    color: var(--accent);
}

/* Mobile Toggle Menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
}

.menu-toggle span {
    width: 16px;
    height: 2px;
    background-color: var(--text);
}

/* --- Layout Grid Dashboard --- */
.main-dashboard-layout {
    padding-top: 40px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* --- SVG Vector Icons styling --- */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform 0.3s ease, stroke 0.3s ease, fill 0.3s ease;
}

.sidebar-contact-item .icon {
    margin-inline-end: 8px;
    color: var(--accent);
}

.sidebar-contact-item:hover .icon {
    transform: scale(1.1) rotate(-3deg);
    color: var(--text);
}

.monitor-header .icon {
    margin-inline-end: 8px;
    color: var(--text-muted);
}

.skills-col h4 .icon {
    margin-inline-end: 10px;
    color: var(--accent);
}

.search-box-wrapper .icon {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.github-project-card:hover .repo-icon {
    stroke: var(--accent);
    transform: scale(1.1);
}

.stat-item .icon {
    color: var(--accent);
    margin-inline-end: 6px;
}

.inline-arrow {
    margin-inline-start: 6px;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
}

html[dir="rtl"] .inline-arrow {
    transform: scaleX(-1);
}

html[dir="rtl"] .repo-link-btn:hover .inline-arrow {
    transform: scaleX(-1) translateX(4px);
}

html[dir="ltr"] .repo-link-btn:hover .inline-arrow {
    transform: translateX(4px);
}

/* --- Sticky Profile Card Sidebar --- */
.profile-sidebar {
    position: sticky;
    top: 104px;
    z-index: 10;
}

.profile-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px var(--shadow);
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 25px 60px rgba(255, 0, 68, 0.08);
}

.card-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
    transition: var(--transition);
}

.profile-card:hover .card-glow {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 0, 68, 0.08) 0%, transparent 70%);
}

.avatar-container {
    position: relative;
    margin-bottom: 1rem;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .avatar-img {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.profile-card:hover .avatar-img {
    border-color: var(--accent);
    transform: rotate(2deg) scale(1.02);
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background-color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-dot-pulse {
    width: 12px;
    height: 12px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 var(--success); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.profile-name {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text) 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .profile-name {
    -webkit-text-fill-color: var(--text);
}

.profile-bio {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* Linux Server Stats Widget */
.server-monitor, .languages-experience {
    width: 100%;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: start;
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
}

[data-theme="light"] .server-monitor, [data-theme="light"] .languages-experience {
    background: rgba(0, 0, 0, 0.015);
    border-color: rgba(0, 0, 0, 0.03);
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.35rem;
}

[data-theme="light"] .monitor-header {
    border-color: rgba(0, 0, 0, 0.06);
}

.monitor-title {
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.monitor-status.online {
    color: var(--success);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.monitor-status.online::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: var(--success);
    border-radius: 50%;
}

.monitor-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.monitor-stat:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: var(--text-muted);
    width: 50px;
}

.stat-bar-container {
    flex-grow: 1;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 0 12px;
    overflow: hidden;
    position: relative;
}

[data-theme="light"] .stat-bar-container {
    background-color: rgba(0, 0, 0, 0.08);
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
    border-radius: 10px;
    transition: width 0.8s ease-in-out;
}

.stat-bar-fill.animate-cpu {
    animation: cpu-pulse 8s infinite alternate ease-in-out;
}

.stat-bar-fill.animate-ram {
    animation: ram-pulse 12s infinite alternate ease-in-out;
}

@keyframes cpu-pulse {
    0% { width: 14%; }
    30% { width: 18%; }
    70% { width: 28%; }
    100% { width: 12%; }
}

@keyframes ram-pulse {
    0% { width: 38%; }
    50% { width: 40%; }
    100% { width: 37%; }
}

.stat-val {
    font-family: var(--font-mono);
    color: var(--text);
    font-weight: 600;
    min-width: 32px;
    text-align: left;
}

.stat-val-text {
    font-family: var(--font-mono);
    color: var(--success);
    font-weight: 600;
}

/* Sidebar Contacts */
.sidebar-contacts {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.6rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    direction: ltr;
    justify-content: flex-start;
}

[data-theme="light"] .sidebar-contact-item {
    background: rgba(0, 0, 0, 0.02);
}

.sidebar-contact-item:hover {
    color: var(--text);
    background: rgba(255, 0, 68, 0.04);
    border-color: rgba(255, 0, 68, 0.2);
    transform: translateY(-2px);
}

/* --- Scrolling Content Canvas --- */
.content-canvas {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Floating Deck Cards */
.hero-section, .section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow);
}

.hero-section:hover, .section:hover {
    border-color: var(--border-hover);
    box-shadow: 0 25px 50px rgba(255, 0, 68, 0.05);
}

/* --- Hero Details --- */
.status-badge-wrapper {
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--success-glow);
    border: 1px solid var(--success-glow);
    color: var(--success);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge .status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    animation: status-pulse 2s infinite;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, #a8a8b3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
    -webkit-text-fill-color: var(--text);
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.8rem;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 720px;
    line-height: 1.8;
}

.hero-links {
    display: flex;
    gap: 1.2rem;
}

/* --- Typography & Headings --- */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
    border-radius: 10px;
}

.section-desc {
    color: var(--text-muted);
    margin-top: -1rem;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

p {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.8;
}

/* --- Buttons --- */
.btn {
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #a3002b 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 68, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border: 1px solid var(--border);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

/* --- Skills Layout --- */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.8rem;
}

.skills-col {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
}

[data-theme="light"] .skills-col {
    background: rgba(0, 0, 0, 0.015);
}

.skills-col:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.01);
}

[data-theme="light"] .skills-col:hover {
    background: rgba(255, 255, 255, 0.5);
}

.skills-col h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.tags-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    border-radius: 99px;
    color: var(--text-muted);
    cursor: default;
}

[data-theme="light"] .tag {
    background: rgba(0, 0, 0, 0.02);
}

.tag:hover {
    border-color: var(--accent-secondary);
    color: #fff;
    background-color: var(--accent-secondary-glow);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--accent-secondary-glow);
}

[data-theme="light"] .tag:hover {
    color: var(--accent-secondary);
    background-color: rgba(197, 155, 39, 0.05);
}

/* --- CLI Terminal Window (Static Dark Theme) --- */
.minimal-terminal {
    background: rgba(10, 10, 14, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin-top: 1rem;
}

.terminal-bar {
    background: rgba(22, 22, 30, 0.9);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #9fa0a6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    direction: ltr;
    position: relative;
}

.terminal-bar::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.terminal-directory {
    margin-left: auto;
    font-weight: 600;
}

.terminal-session-type {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.terminal-output {
    padding: 1.5rem;
    height: 280px;
    overflow-y: auto;
    font-size: 0.88rem;
    color: #e4e4e7;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    direction: ltr;
    text-align: left;
    text-shadow: 0 0 2px rgba(228, 228, 231, 0.3);
}

.term-row {
    white-space: pre-wrap;
    word-break: break-all;
}

.system-text {
    color: #6e6e80;
}

.term-prompt {
    color: var(--success);
    font-weight: 600;
    margin-inline-end: 0.5rem;
    text-shadow: 0 0 8px var(--success-glow);
}

.term-resp {
    color: #e4e4e7;
    padding-inline-start: 1rem;
    border-inline-start: 2px solid rgba(255, 255, 255, 0.08);
    margin: 0.4rem 0;
    line-height: 1.6;
}

.term-input-row {
    display: flex;
    align-items: center;
}

.input-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    position: relative;
}

#terminal-input {
    width: 100%;
    color: #e4e4e7;
    font-size: 0.88rem;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    caret-color: transparent;
}

.term-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--accent);
    animation: term-blink 1s step-end infinite;
    position: absolute;
    left: 0;
    box-shadow: 0 0 8px var(--accent);
}

@keyframes term-blink {
    from, to { background-color: transparent; box-shadow: none; }
    50% { background-color: var(--accent); box-shadow: 0 0 8px var(--accent); }
}

.inline-code {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    color: var(--success);
}

/* --- Contact Section --- */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.contact-link-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    font-size: 0.95rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

[data-theme="light"] .contact-link-item {
    background: rgba(0, 0, 0, 0.015);
}

.contact-link-item:hover {
    background: rgba(255, 0, 68, 0.04);
    border-color: rgba(255, 0, 68, 0.2);
    transform: translateY(-2px);
}

.link-label {
    color: var(--text-muted);
    font-weight: 500;
}

.link-val {
    color: var(--text);
    font-weight: 600;
}

.contact-link-item:hover .link-val {
    color: var(--accent);
}

.simple-contact-form {
    border-top: 1px dashed var(--border);
    padding-top: 2.5rem;
    margin-top: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.form-field input, .form-field textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.2rem;
    font-size: 0.92rem;
    color: var(--text);
    font-family: inherit;
    width: 100%;
}

[data-theme="light"] .form-field input, [data-theme="light"] .form-field textarea {
    background: rgba(255, 255, 255, 0.6);
}

.form-field input:focus, .form-field textarea:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.15);
    outline: none;
}

[data-theme="light"] .form-field input:focus, [data-theme="light"] .form-field textarea:focus {
    background: #fff;
}

.error-msg {
    color: var(--error);
    font-size: 0.8rem;
    min-height: 1.2rem;
    margin-top: 0.25rem;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.feedback-box {
    margin-top: 1rem;
    font-size: 0.92rem;
}

.feedback-success {
    color: var(--success);
    background-color: var(--success-glow);
    border: 1px solid var(--success);
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-md);
}

.feedback-error {
    color: var(--error);
    background-color: rgba(247, 90, 104, 0.08);
    border: 1px solid rgba(247, 90, 104, 0.2);
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-md);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 100px;
    background: rgba(13, 13, 17, 0.4);
    backdrop-filter: blur(20px);
}

[data-theme="light"] .site-footer {
    background: rgba(255, 255, 255, 0.6);
}

.footer-container p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* --- Projects Page Styling --- */
.page-content {
    padding-top: 40px;
    padding-bottom: 80px;
}

.projects-page-header {
    text-align: center;
    margin-bottom: 4rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    box-shadow: 0 20px 40px var(--shadow);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .page-title {
    -webkit-text-fill-color: var(--text);
}

.page-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Search & Filters */
.projects-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 15px 35px var(--shadow);
}

.search-box-wrapper {
    position: relative;
    width: 350px;
    max-width: 100%;
}

#repo-search {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding-inline-start: 1rem;
    padding-inline-end: 2.5rem;
    padding-block: 0.85rem;
    font-size: 0.92rem;
    color: var(--text);
}

[data-theme="light"] #repo-search {
    background-color: rgba(255, 255, 255, 0.6);
}

#repo-search:focus {
    border-color: var(--accent);
    background-color: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.15);
    outline: none;
}

[data-theme="light"] #repo-search:focus {
    background-color: #fff;
}

.projects-filter-wrapper {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

[data-theme="light"] .filter-btn {
    background-color: rgba(0, 0, 0, 0.015);
}

.filter-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .filter-btn:hover {
    border-color: rgba(0, 0, 0, 0.15);
    background-color: rgba(0, 0, 0, 0.04);
}

.filter-btn.active {
    background: linear-gradient(135deg, #1f0409 0%, #08080c 100%);
    color: var(--accent-hover);
    border-color: rgba(230, 46, 77, 0.5);
    box-shadow: 0 4px 12px rgba(230, 46, 77, 0.15);
    text-shadow: 0 0 1px rgba(230, 46, 77, 0.2);
}

[data-theme="light"] .filter-btn.active {
    background: linear-gradient(135deg, #fff2f5 0%, #f5f5f7 100%);
    color: #d90429;
    border-color: rgba(217, 4, 41, 0.35);
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.08);
    text-shadow: none;
}

/* GitHub Grid & Cards Redesign */
.github-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.github-project-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 15px 35px var(--shadow);
}

.github-project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 25px 50px rgba(255, 0, 68, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
}

.repo-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.repo-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.github-project-card:hover .repo-icon {
    stroke: var(--accent);
    transform: scale(1.1);
}

.repo-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    word-break: break-all;
}

.repo-title:hover {
    color: var(--accent);
}

.repo-lang-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
}

[data-theme="light"] .repo-lang-badge {
    background: rgba(0, 0, 0, 0.03);
}

.lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.repo-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    line-height: 1.7;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    font-size: 0.85rem;
}

.repo-stats {
    display: flex;
    gap: 1.2rem;
    color: var(--text-muted);
    direction: ltr;
}

.stat-count {
    font-family: var(--font-mono);
    font-weight: 600;
}

.repo-link-btn {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
}

.repo-link-btn:hover {
    color: var(--accent-hover);
}

/* Skeleton Loading Redesign */
.project-skeleton-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skel-title {
    width: 150px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
}

[data-theme="light"] .skel-title {
    background-color: rgba(0, 0, 0, 0.05);
}

.skel-badge {
    width: 70px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
}

[data-theme="light"] .skel-badge {
    background-color: rgba(0, 0, 0, 0.05);
}

.skel-desc {
    width: 100%;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    margin-top: 1.2rem;
    animation: pulse 1.5s infinite ease-in-out;
}

[data-theme="light"] .skel-desc {
    background-color: rgba(0, 0, 0, 0.04);
}

.skel-desc.short {
    width: 65%;
    margin-top: 0.5rem;
    margin-bottom: auto;
}

.skel-footer {
    width: 100%;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    margin-top: 1.5rem;
    animation: pulse 1.5s infinite ease-in-out;
}

[data-theme="light"] .skel-footer {
    background-color: rgba(0, 0, 0, 0.04);
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 0.2; }
    100% { opacity: 0.5; }
}

.no-projects-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

/* --- Media Queries & Responsiveness --- */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .profile-sidebar {
        position: static;
        width: 100%;
    }
    
    .profile-card {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .site-header {
        top: 10px;
        padding: 0 0.5rem;
    }
    
    .header-container {
        border-radius: 20px;
        height: 58px;
        padding: 0 1.25rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(3px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        transform: translateY(-3px) rotate(-45deg);
    }

    .site-nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 100px);
        background: rgba(13, 13, 17, 0.95);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 3rem 2rem;
        box-shadow: -10px 10px 40px rgba(0, 0, 0, 0.6);
        z-index: 999;
    }
    
    [data-theme="light"] .site-nav {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: -10px 10px 40px rgba(0, 0, 0, 0.15);
    }
    
    .site-nav.active {
        right: 20px;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        padding: 0.6rem 1.2rem;
    }
    
    .hero-section, .section {
        padding: 1.75rem 1.25rem;
        border-radius: 24px;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .hero-lead {
        font-size: 1rem;
    }
    
    .skills-col {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .github-projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .github-project-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-links {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }
    
    .hero-links .btn {
        width: 100%;
    }
    
    .projects-controls {
        padding: 1rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Prevent sticky header overlap on scroll landing */
section, .hero-section {
    scroll-margin-top: 120px;
}

/* SPA Loading Progress Bar */
#spa-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
    box-shadow: 0 0 10px var(--accent), 0 0 5px var(--accent-secondary);
    z-index: 99999;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

/* Programming Skills Widget Layout */
.skills-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-stat-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.skill-stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
}

.skill-label {
    color: var(--text-muted);
}

.skill-val {
    color: var(--accent-hover);
    font-weight: 600;
}

.skill-bar-container {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

[data-theme="light"] .skill-bar-container {
    background-color: rgba(0, 0, 0, 0.08);
}

/* Individual Programming Language Skill Bar Colors */
.skill-bar-fill-php {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%) !important;
}

.skill-bar-fill-js {
    background: linear-gradient(90deg, var(--success) 0%, #00d8ff 100%) !important;
}

.skill-bar-fill-bash {
    background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%) !important;
}

.skill-bar-fill-linux {
    background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%) !important;
}

.skill-bar-fill-db {
    background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%) !important;
}

.skill-bar-fill-marketing {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%) !important;
}

.skill-bar-fill-design {
    background: linear-gradient(90deg, var(--success) 0%, #00d8ff 100%) !important;
}

