/* ==========================================================================
   MOHAMMED SWAR - CYBERSECURITY PORTFOLIO
   Mobile-First, Fully Responsive & Touch-Optimized Stylesheet (CSS3)
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
    /* Color Palette */
    --bg-primary: #0a0f1d;
    --bg-secondary: #0f172a;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(22, 33, 56, 0.9);
    --bg-terminal: #070b14;
    --bg-input: rgba(10, 15, 29, 0.9);

    /* Cyber Accents */
    --cyber-green: #00ff88;
    --cyber-green-glow: rgba(0, 255, 136, 0.35);
    --cyber-green-dim: rgba(0, 255, 136, 0.12);
    --cyber-cyan: #00d4ff;
    --cyber-cyan-glow: rgba(0, 212, 255, 0.35);
    --cyber-blue: #38bdf8;
    --cyber-amber: #fbbf24;
    --cyber-red: #f43f5e;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Borders & Outlines */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(0, 255, 136, 0.4);
    --border-cyan: rgba(0, 212, 255, 0.35);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
    --font-arabic: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows & Transitions */
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 25px var(--cyber-green-glow);
    --shadow-cyan-glow: 0 0 25px var(--cyber-cyan-glow);
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

    /* Touch & Layout Metrics (Mobile First) */
    --nav-height: 68px;
    --touch-target-min: 48px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
}

/* RTL (Arabic) Directional Adjustments */
html[dir="rtl"] {
    --font-sans: var(--font-arabic);
}

html[dir="rtl"] body {
    text-align: right;
}

/* Technical Monospace Elements */
.font-mono {
    font-family: var(--font-mono) !important;
    direction: ltr;
    display: inline-block;
}

html[dir="rtl"] .font-mono {
    direction: ltr;
    unicode-bidi: isolate;
}

/* --- Base Reset & Box Sizing --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    color-scheme: dark;
    overflow-x: clip;
    max-width: 100vw;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.7;
    overflow-x: clip;
    max-width: 100vw;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden !important;
    touch-action: none;
}

/* Ambient Background Overlays */
.cyber-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.6;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.12;
}

.orb-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, var(--cyber-green) 0%, transparent 70%);
    top: -80px;
    right: -80px;
}

.orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--cyber-cyan) 0%, transparent 70%);
    bottom: -120px;
    left: -120px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-green);
}

/* Containers */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 max(1.15rem, env(safe-area-inset-right, 0px)) 0 max(1.15rem, env(safe-area-inset-left, 0px));
    position: relative;
    z-index: 1;
}

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

ul {
    list-style: none;
}

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

/* Typography Helpers */
.glow-text {
    background: linear-gradient(135deg, #ffffff 15%, var(--cyber-green) 85%, var(--cyber-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(0, 255, 136, 0.25);
}

/* Section Structure */
.section {
    padding: 4.5rem 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3rem auto;
}

.section-badge {
    font-size: 0.8rem;
    color: var(--cyber-green);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.75rem;
    background: var(--cyber-green-dim);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.section-title {
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    line-height: 1.25;
}

.section-subtitle {
    font-size: clamp(0.92rem, 2.5vw, 1.05rem);
    color: var(--text-muted);
    line-height: 1.65;
}

/* ==========================================================================
   NAVIGATION BAR (Glassmorphism & Mobile-Friendly Top Bar)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(8, 12, 23, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(0, 255, 136, 0.2);
}

.nav-container {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 max(1rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Brand Logo */
.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    min-height: var(--touch-target-min);
    padding: 0 0.25rem;
}

.logo-bracket {
    color: var(--cyber-green);
    font-weight: 800;
}

.logo-name {
    letter-spacing: 0.5px;
}

.logo-badge {
    font-size: 0.65rem;
    background: var(--cyber-cyan-glow);
    color: var(--cyber-cyan);
    padding: 2px 5px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 212, 255, 0.3);
    margin-left: 3px;
}

html[dir="rtl"] .logo-badge {
    margin-left: 0;
    margin-right: 3px;
}

/* Top Navbar Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* System Status Pill (Desktop only to conserve mobile space) */
.system-status-pill {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(0, 255, 136, 0.25);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.status-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--cyber-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyber-green);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* Language Switcher Button (Always on Top Bar for Mobile & Desktop) */
.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(0, 255, 136, 0.25);
    color: var(--cyber-green);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    padding: 0 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.lang-toggle-btn:hover,
.lang-toggle-btn:active {
    background: var(--cyber-green-dim);
    border-color: var(--cyber-green);
    color: #ffffff;
    box-shadow: 0 0 14px var(--cyber-green-glow);
    transform: scale(0.98);
}

.lang-toggle-btn i {
    font-size: 1rem;
}

/* Hamburger Toggle Button (Mobile Touch Target >= 48x48px) */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    z-index: 1010;
    transition: var(--transition-fast);
}

.hamburger-btn:active {
    transform: scale(0.95);
    border-color: var(--cyber-green);
}

.hamburger-btn .bar {
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--cyber-green);
}
.hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--cyber-green);
}

/* Mobile Drawer Backdrop Overlay */
.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Navigation Drawer (Mobile-First) */
.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 15, 29, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(0, 255, 136, 0.2);
    padding: 1.25rem 1.25rem 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1005;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

html[dir="rtl"] .nav-menu {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid rgba(0, 255, 136, 0.2);
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
}

.nav-menu.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
    font-size: 0.85rem;
    color: var(--cyber-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drawer-close-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.drawer-close-btn:hover,
.drawer-close-btn:active {
    color: var(--cyber-red);
    background: rgba(244, 63, 94, 0.1);
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: var(--touch-target-min);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.nav-link i {
    font-size: 1.1rem;
    color: var(--cyber-green);
    width: 24px;
    text-align: center;
}

.nav-link:active,
.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.2);
}

.drawer-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.drawer-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   BUTTONS (Touch Friendly - Min 48px Height)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: var(--touch-target-min);
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    font-family: var(--font-sans);
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00b35f 100%);
    color: #070b14;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.45);
}

.btn-secondary {
    background: rgba(17, 24, 39, 0.85);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-secondary:hover,
.btn-secondary:active {
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
    background: rgba(30, 41, 59, 0.9);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline:hover,
.btn-outline:active {
    border-color: var(--cyber-green);
    color: var(--cyber-green);
    background: var(--cyber-green-dim);
}

.btn-sm {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px) + 1.25rem);
    padding-bottom: 3.5rem;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.terminal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-subtle);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 2.7vw, 0.78rem);
    color: var(--cyber-green);
    margin-bottom: 1.25rem;
    max-width: 100%;
    flex-wrap: wrap;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.terminal-dot.green {
    background-color: var(--cyber-green);
    box-shadow: 0 0 8px var(--cyber-green);
}

.hero-title {
    font-size: clamp(1.8rem, 6.2vw, 3.25rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 1rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.greeting-sub {
    display: block;
    font-size: clamp(0.95rem, 3.2vw, 1.2rem);
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    font-family: var(--font-mono);
}

.author-name {
    display: inline;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Typing Container (Zero clipping on 19.5:9 narrow screens) */
.typing-container {
    font-family: var(--font-mono);
    font-size: clamp(0.92rem, 3.6vw, 1.25rem);
    font-weight: 500;
    color: var(--cyber-cyan);
    margin-bottom: 1.5rem;
    min-height: 3.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

html[dir="rtl"] .typing-container {
    direction: rtl;
    justify-content: flex-start;
    text-align: right;
}

.typing-prefix {
    color: var(--cyber-green);
    flex-shrink: 0;
}

.typing-text {
    word-break: break-word;
    overflow-wrap: anywhere;
    display: inline;
}

.typing-cursor {
    color: var(--cyber-green);
    animation: blinkCursor 0.9s infinite;
    font-weight: 700;
    display: inline-block;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-bio {
    font-size: clamp(0.95rem, 2.7vw, 1.05rem);
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 640px;
}

/* CTA Actions: Wrap cleanly on small phones */
.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 480px) {
    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Hero Specs Bar */
.hero-specs-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.spec-item i {
    font-size: 1.25rem;
    color: var(--cyber-green);
    background: var(--cyber-green-dim);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 255, 136, 0.2);
    flex-shrink: 0;
}

.spec-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.spec-val {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Terminal Visual Card */
.cyber-terminal-card {
    background: var(--bg-terminal);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.card-top-bar {
    background: #0d1322;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.close { background: #ff5f56; }
.dot.minimize { background: #ffbd2e; }
.dot.maximize { background: #27c93f; }

.card-top-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-status-chip {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--cyber-green);
    background: var(--cyber-green-dim);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.terminal-body {
    padding: 1.15rem;
    font-size: 0.8rem;
    line-height: 1.7;
    direction: ltr !important;
    text-align: left !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.t-line {
    margin-bottom: 0.35rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.t-accent { color: var(--cyber-green); font-weight: 600; }
.t-dim { color: var(--text-dim); }
.t-info { color: var(--cyber-blue); }
.t-success { color: var(--cyber-green); }
.t-cyan { color: var(--cyber-cyan); }
.t-glow {
    color: var(--cyber-green);
    background: var(--cyber-green-dim);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    margin: 0.75rem 0;
    border-left: 3px solid var(--cyber-green);
    white-space: normal;
}

.t-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.75rem 0;
}

.system-health-block {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.health-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.health-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    min-width: 95px;
}

.health-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.health-bar .fill {
    height: 100%;
    border-radius: 3px;
}

.health-bar .fill-high { width: 98%; background: var(--cyber-green); }
.health-bar .fill-mid { width: 85%; background: var(--cyber-cyan); }

.health-pct {
    font-size: 0.72rem;
    color: var(--cyber-green);
    font-weight: 700;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.4rem;
    position: relative;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
}

.about-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px var(--cyber-green-glow);
    transform: translateY(-3px);
}

.about-icon-wrapper {
    width: 50px;
    height: 50px;
    background: var(--cyber-green-dim);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyber-green);
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.about-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.about-card-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ==========================================================================
   EDUCATION & TIMELINE (Streamlined for Mobile)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    height: 100%;
    width: 2px;
    background: linear-gradient(180deg, var(--cyber-green) 0%, var(--cyber-cyan) 60%, rgba(255, 255, 255, 0.05) 100%);
}

html[dir="rtl"] .timeline::before {
    left: auto;
    right: 18px;
}

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

html[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid var(--cyber-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyber-green);
    font-size: 0.85rem;
    z-index: 2;
    box-shadow: 0 0 12px var(--cyber-green-glow);
}

html[dir="rtl"] .timeline-dot {
    left: auto;
    right: 2px;
}

.timeline-item.in-progress .timeline-dot {
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
    box-shadow: 0 0 12px var(--cyber-cyan-glow);
}

.radar-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--cyber-cyan);
    animation: radarPing 2s infinite;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.25rem;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.timeline-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.timeline-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.timeline-tag.in-progress-tag {
    background: rgba(0, 212, 255, 0.12);
    color: var(--cyber-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.timeline-date {
    font-size: 0.82rem;
    color: var(--cyber-green);
}

.timeline-item.in-progress .timeline-date {
    color: var(--cyber-cyan);
}

.timeline-role {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.timeline-org {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.timeline-description {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.15rem;
}

.timeline-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.highlight-pill {
    font-size: 0.78rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.highlight-pill i {
    color: var(--cyber-green);
    font-size: 0.72rem;
}

/* ==========================================================================
   CERTIFICATIONS & PRACTICAL LABS
   ========================================================================== */
.certs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.cert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.cert-icon-box {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--cyber-green-dim);
    border: 1px solid rgba(0, 255, 136, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyber-green);
    font-size: 1.3rem;
}

.cert-icon-box.thm-icon {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.3);
    color: #f43f5e;
}

.cert-status-badge {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cert-status-badge.verified {
    background: var(--cyber-green-dim);
    color: var(--cyber-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.cert-status-badge.active-lab {
    background: rgba(0, 212, 255, 0.12);
    color: var(--cyber-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.cert-issuer {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.cert-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.cert-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.pathway-progress-wrapper {
    background: rgba(10, 15, 29, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem;
    margin-bottom: 1.25rem;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    margin-bottom: 0.45rem;
    color: var(--text-secondary);
}

.progress-val {
    color: var(--cyber-cyan);
    font-weight: 700;
}

.progress-track {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-green));
    border-radius: 4px;
}

.cert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.tag-badge {
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-sm);
}

.cert-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.btn-verify {
    background: var(--cyber-green-dim);
    color: var(--cyber-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
    width: 100%;
    justify-content: center;
}

.lab-verification-note {
    font-size: 0.75rem;
    color: var(--cyber-cyan);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* ==========================================================================
   TECHNICAL SKILLS
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.4rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.skill-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.skill-icon-bubble {
    width: 44px;
    height: 44px;
    background: var(--cyber-green-dim);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyber-green);
    font-size: 1.25rem;
}

.skill-category-number {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.skill-group-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.skill-group-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.badges-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.65rem;
}

.badge-item {
    display: flex;
    flex-direction: column;
    background: rgba(10, 15, 29, 0.85);
    border: 1px solid var(--border-subtle);
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    min-height: var(--touch-target-min);
    justify-content: center;
}

.badge-item i {
    font-size: 1rem;
    color: var(--cyber-green);
    margin-bottom: 0.25rem;
}

.badge-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.badge-item small {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.badge-item.highlight-badge i {
    color: var(--cyber-cyan);
}

/* ==========================================================================
   ACADEMIC & PRACTICAL PROJECTS (Terminal Cards)
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

.terminal-project-card {
    background: var(--bg-terminal);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: #0d1322;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-title-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-action-status {
    font-size: 0.68rem;
    color: var(--cyber-green);
    background: var(--cyber-green-dim);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 255, 136, 0.25);
}

.terminal-content {
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-headline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.project-tag {
    font-size: 0.7rem;
    color: var(--cyber-cyan);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
}

.project-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.feature-item i {
    color: var(--cyber-green);
    margin-top: 3px;
    font-size: 0.75rem;
}

html[dir="rtl"] .feature-item i {
    transform: rotate(180deg);
}

/* Touch-scrollable Code Snippet Box */
.code-snippet-box {
    background: #03060c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem;
    margin-bottom: 1.25rem;
    direction: ltr !important;
    text-align: left !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.snippet-header {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.2rem;
}

.code-snippet-box code {
    font-size: 0.76rem;
    color: var(--cyber-green);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: block;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

.tech-pill {
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.4rem;
    backdrop-filter: blur(10px);
}

.contact-channel-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.contact-channel-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.contact-links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(10, 15, 29, 0.85);
    border: 1px solid var(--border-subtle);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    min-height: var(--touch-target-min);
}

.link-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--cyber-green-dim);
    color: var(--cyber-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.link-details {
    flex: 1;
    overflow: hidden;
}

.link-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.link-value {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
}

.copy-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.copy-btn:active {
    color: var(--cyber-green);
    background: rgba(255, 255, 255, 0.08);
}

.pgp-notice {
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

/* Contact Form Card */
.contact-form-card {
    background: var(--bg-terminal);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.contact-form {
    padding: 1.75rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.prompt-symbol {
    color: var(--cyber-green);
}

.form-input {
    width: 100%;
    min-height: var(--touch-target-min);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--cyber-green);
    box-shadow: 0 0 10px var(--cyber-green-glow);
}

.form-input::placeholder {
    color: var(--text-dim);
    font-size: 0.85rem;
}

textarea.form-input {
    min-height: 110px;
    resize: vertical;
}

.form-status-msg {
    font-size: 0.8rem;
    text-align: center;
    min-height: 1.4rem;
}

.form-status-msg.success { color: var(--cyber-green); }
.form-status-msg.error { color: var(--cyber-red); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: #070b14;
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)) 0;
    position: relative;
    z-index: 1;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-bio {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    max-width: 380px;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-subtext {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-socials a {
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.footer-socials a:active {
    color: var(--cyber-green);
    border-color: var(--cyber-green);
    background: var(--cyber-green-dim);
}

/* ==========================================================================
   BACK TO TOP & TOAST
   ========================================================================== */
.back-to-top-btn {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--cyber-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

html[dir="rtl"] .back-to-top-btn {
    right: auto;
    left: calc(20px + env(safe-area-inset-left, 0px));
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.toast-notification {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    border: 1px solid var(--cyber-green);
    color: var(--cyber-green);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px var(--cyber-green-glow);
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    opacity: 0;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Scroll Reveal */
.reveal-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   DESKTOP & TABLET MEDIA QUERIES (Min-Width Progression)
   ========================================================================== */

/* Tablet & Up (>= 768px) */
@media (min-width: 768px) {
    :root {
        --nav-height: 74px;
    }

    .container {
        padding: 0 2rem;
    }

    .section {
        padding: 6rem 0;
    }

    .hero-specs-bar {
        grid-template-columns: repeat(3, 1fr);
    }

    .system-status-pill {
        display: flex;
    }

    .timeline::before {
        left: 28px;
    }
    html[dir="rtl"] .timeline::before {
        right: 28px;
        left: auto;
    }

    .timeline-dot {
        left: 10px;
        width: 38px;
        height: 38px;
    }
    html[dir="rtl"] .timeline-dot {
        right: 10px;
        left: auto;
    }

    .timeline-item {
        padding-left: 70px;
    }
    html[dir="rtl"] .timeline-item {
        padding-right: 70px;
        padding-left: 0;
    }

    .timeline-content {
        padding: 2rem;
    }

    .about-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .certs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    html[dir="rtl"] .footer-container {
        text-align: right;
    }

    .footer-brand {
        align-items: flex-start;
    }

    html[dir="rtl"] .footer-brand {
        align-items: flex-start;
    }
}

/* Desktop & Large Screens (>= 1024px) */
@media (min-width: 1024px) {
    .hero-container {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 3.5rem;
    }

    /* Hide Hamburger on Desktop */
    .hamburger-btn {
        display: none;
    }

    .nav-backdrop {
        display: none !important;
    }

    /* Transform nav-menu back into horizontal navbar */
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        padding: 0;
        display: block;
        transform: none !important;
        box-shadow: none;
        overflow-y: visible;
    }

    .drawer-header,
    .drawer-footer {
        display: none;
    }

    .nav-list {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.92rem;
        min-height: auto;
        padding: 0.4rem 0.2rem;
        border-radius: 0;
        position: relative;
    }

    .nav-link:hover,
    .nav-link.active {
        background: transparent;
        border-color: transparent;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0%;
        height: 2px;
        background: linear-gradient(90deg, var(--cyber-green), var(--cyber-cyan));
        transition: width var(--transition-fast);
    }

    html[dir="rtl"] .nav-link::after {
        left: auto;
        right: 0;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    }
}

/* ==========================================================================
   TALL & NARROW SCREEN OPTIMIZATIONS (19.5:9, 20:9, Modern Smartphones)
   ========================================================================== */
@media screen and (max-width: 480px) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }
    
    .hero-title {
        font-size: clamp(1.7rem, 5.8vw, 2.25rem);
    }
    
    .typing-container {
        font-size: clamp(0.88rem, 3.4vw, 1.1rem);
        min-height: 3.6rem;
    }

    .hero-bio {
        font-size: 0.92rem;
        line-height: 1.7;
    }

    .section-title {
        font-size: clamp(1.45rem, 5.2vw, 1.95rem);
    }
    
    .timeline-item {
        padding-left: 44px;
    }

    html[dir="rtl"] .timeline-item {
        padding-right: 44px;
        padding-left: 0;
    }

    .badges-container {
        grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    }

    .badge-item {
        padding: 0.55rem 0.65rem;
    }

    .badge-item span {
        font-size: 0.82rem;
        word-break: break-word;
    }
}
