/* ==========================================
   AHMED MUBARAK - PORTFOLIO DESIGN SYSTEM
   ========================================== */

/* 1. CSS VARIABLES / THEMES */
:root {
    /* Theme - Dark Mode (Default) */
    --bg-main: #111827;
    --bg-surface: #1A1B26;
    --bg-card: #222534;
    --bg-card-hover: #2A2E42;
    --bg-glass: rgba(26, 27, 38, 0.75);
    
    /* Accents */
    --primary: #36ADB5;
    --primary-hover: #2E9CA6;
    --secondary: #81E1D4;
    --gold: #E5DA8A;
    --gold-dark: #B17C4D;
    --purple-accent: #3B1E37;
    --steel-blue: #356377;
    --desert-gray: #88A38E;
    
    /* Typography */
    --text-main: #F8FAFC;
    --text-muted: #B8C2CC;
    --text-dim: #718096;
    
    /* UI Decor */
    --border-color: rgba(54, 173, 181, 0.25);
    --border-gold: rgba(229, 218, 138, 0.3);
    --shadow-glow: 0 0 25px rgba(54, 173, 181, 0.25);
    --shadow-gold: 0 0 25px rgba(177, 124, 77, 0.25);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
    
    /* Fonts */
    --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Layout */
    --navbar-height: 80px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-main: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-card: #EEF4F7;
    --bg-card-hover: #E2ECF1;
    --bg-glass: rgba(255, 255, 255, 0.85);
    
    --primary: #2E9CA6;
    --primary-hover: #227B83;
    --secondary: #36ADB5;
    --gold: #C48A3D;
    --gold-dark: #966629;
    
    --text-main: #1E293B;
    --text-muted: #475569;
    --text-dim: #64748B;
    
    --border-color: #D7E2E8;
    --border-gold: rgba(196, 138, 61, 0.35);
    --shadow-glow: 0 0 20px rgba(46, 156, 166, 0.15);
    --shadow-gold: 0 0 20px rgba(196, 138, 61, 0.2);
    --shadow-card: 0 10px 25px rgba(148, 163, 184, 0.15);
}

/* 2. BASE & RESET */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Selection */
::selection {
    background: var(--primary);
    color: #111827;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

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

ul {
    list-style: none;
}

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

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title .subtitle {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.8rem;
    background: rgba(54, 173, 181, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.section-title h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 3. BUTTONS & BADGES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    max-width: 100%;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #0F172A;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(54, 173, 181, 0.4);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #111827;
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(229, 218, 138, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(54, 173, 181, 0.08);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    background: rgba(54, 173, 181, 0.12);
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.badge-gold {
    background: rgba(229, 218, 138, 0.15);
    color: var(--gold);
    border-color: var(--border-gold);
}

/* 4. FLOATING GLASS NAVBAR */
.navbar-wrapper {
    position: fixed;
    top: 1.25rem;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.navbar {
    width: 100%;
    max-width: 1050px;
    height: var(--navbar-height);
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    min-width: 0;
    flex-shrink: 1;
}
.brand-avatar{
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(54,173,181,.4);
    flex-shrink: 0;
}
.nav-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 0 12px rgba(54, 173, 181, 0.4);
}

.nav-brand span {
    background: linear-gradient(90deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    max-width: 100%;
    min-width: 0;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    padding: 0.4rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(54, 173, 181, 0.1);
    border: 1px solid var(--border-color);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.05);
    background: rgba(54, 173, 181, 0.2);
    box-shadow: var(--shadow-glow);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* 5. HERO SECTION */
.hero {
    min-height: 100vh;
    padding-top: calc(var(--navbar-height) + 3rem);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Glowing background blur elements */
.hero-bg-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}
.hero-bg-glow.cyan {
    top: -100px;
    right: -100px;
    background: var(--primary);
}
.hero-bg-glow.gold {
    bottom: -100px;
    left: -100px;
    background: var(--gold);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    background: rgba(229, 218, 138, 0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

.hero-content h1 {
    font-size: 3.8rem;
    letter-spacing: -1px;
    margin-bottom: 0.8rem;
}

.hero-content h1 .gold-text {
    background: linear-gradient(135deg, var(--gold), #D4AF37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-container {
    font-size: 1.6rem;
    font-family: var(--font-mono);
    color: var(--primary);
    margin-bottom: 1.5rem;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.4em;
    background-color: var(--gold);
    margin-left: 4px;
    animation: blink 0.8s infinite;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 620px;
}

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

.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.hero-avatar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-frame {
    position: relative;
    width: 340px;
    height: 340px;
    flex-shrink: 0;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, var(--primary), var(--gold-dark));
    padding: 6px;
    animation: morph 8s ease-in-out infinite alternate;
    box-shadow: var(--shadow-glow);
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 50% 50% 30% 70% / 30% 60% 40% 70%; }
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    background-color: var(--bg-surface);
}

.hero-badge-float {
    position: absolute;
    padding: 0.6rem 1.2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    max-width: min(100%, 220px);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.hero-badge-float.top-right {
    top: 10px;
    right: -20px;
    border-color: var(--border-gold);
}
.hero-badge-float.bottom-left {
    bottom: 20px;
    left: -20px;
}

/* 6. STATS / ABOUT QUICK SECTION */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: -2rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 7. SKILLS SECTION */
.skills-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: #0F172A;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

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

.skill-card:hover::before {
    opacity: 1;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.skill-header > div:last-child {
    min-width: 0;
    flex: 1;
}

.skill-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(54, 173, 181, 0.1);
    border: 1px solid var(--border-color);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skill-card.gold-icon .skill-icon-wrapper {
    background: rgba(229, 218, 138, 0.1);
    border-color: var(--border-gold);
    color: var(--gold);
}

.skill-name {
    font-size: 1.1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.skill-category-tag {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.skill-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 0;
}

.skill-footer > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.skill-footer .badge {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 8. PROJECTS SECTION */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

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

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

.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: var(--bg-surface);
    overflow: hidden;
}

.project-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.75) 0%, rgba(17, 24, 39, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img {
    transform: scale(1.06);
}

.project-category-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 3;
    background: rgba(17, 24, 39, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color) !important;
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.4rem 0.9rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
}

.project-category-badge.badge-gold {
    border-color: var(--gold) !important;
    color: var(--gold) !important;
    background: rgba(17, 24, 39, 0.94) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.project-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
    transition: var(--transition);
}

.project-card:hover .project-title {
    color: var(--primary);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.project-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tool-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-actions {
    display: flex;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-actions .btn {
    flex: 1;
    min-width: 0;
}

.certificate-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
    max-width: 720px;
    width: min(100%, 720px);
    margin: 0 auto;
    box-shadow: var(--shadow-card);
}

.certificate-panel h3 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.certificate-panel p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.certificate-panel .btn {
    width: auto;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 9. INTERACTIVE TERMINAL (EASTER EGG) */
.terminal-section {
    margin-top: 2rem;
}

.terminal-window {
    background: #0B0F19;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    font-family: var(--font-mono);
}

.terminal-header {
    background: #151C2C;
    padding: 0.75rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.terminal-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
}

.terminal-body {
    padding: 1.5rem;
    min-height: 280px;
    max-height: 400px;
    overflow-y: auto;
    color: #81E1D4;
    font-size: 0.9rem;
    line-height: 1.7;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.prompt-user { color: var(--gold); }
.prompt-host { color: var(--primary); }
.prompt-dir { color: #A78BFA; }

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #F8FAFC;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    width: 100%;
}

/* 10. CONTACT SECTION */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateX(6px);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(54, 173, 181, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.contact-details label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-details p {
    font-weight: 600;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(54, 173, 181, 0.15);
}

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

/* 11. FOOTER */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer .gold-accent {
    color: var(--gold);
    font-weight: 600;
}

/* 12. MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
}

/* 13. RESPONSIVE BREAKPOINTS & MOBILE OPTIMIZATIONS */

/* Filter Horizontal Scroll on Mobile */
.skills-filter, .projects-filter {
    display: flex;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
    margin-bottom: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .skills-filter, .projects-filter {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .skills-filter::-webkit-scrollbar, 
    .projects-filter::-webkit-scrollbar {
        display: none;
    }
    .filter-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Laptops & Tablets (Max 992px) */
@media (max-width: 992px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--navbar-height) + 2rem);
        padding-bottom: 4rem;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    .hero-content h1 {
        font-size: clamp(2.2rem, 6vw, 3.2rem);
    }
    .hero-buttons {
        justify-content: center;
    }
    .social-links {
        justify-content: center;
    }
    .hero-avatar-wrapper {
        margin-top: 1rem;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Mobile & Small Tablets (Max 768px) */
@media (max-width: 768px) {
    :root {
        --navbar-height: 62px;
    }
    .container {
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .hero-bg-glow {
        width: 180px !important;
        height: 180px !important;
        filter: blur(60px) !important;
        right: 0 !important;
        left: 0 !important;
        margin: 0 auto !important;
        opacity: 0.1 !important;
    }
    .navbar-wrapper {
        top: 0.5rem !important;
        padding: 0 0.5rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    .navbar {
        padding: 0 0.85rem !important;
        height: var(--navbar-height) !important;
        width: 100% !important;
        min-width: 0 !important;
        position: relative;
        box-sizing: border-box !important;
    }
    .nav-brand {
        font-size: 1rem !important;
        gap: 0.4rem !important;
        max-width: calc(100% - 88px);
    }
    .brand-avatar {
        width: 32px !important;
        height: 32px !important;
    }
    .nav-links {
        display: flex;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: var(--bg-surface);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 1.25rem;
        flex-direction: column;
        gap: 0.8rem;
        box-shadow: 0 15px 35px rgba(0,0,0,0.4);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.6rem 0;
        font-size: 1rem;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50%;
        background: rgba(54, 173, 181, 0.1);
        border: 1px solid var(--border-color);
    }
    .hero-tag {
        font-size: 0.78rem !important;
        padding: 0.35rem 0.75rem !important;
        max-width: 100% !important;
        white-space: normal !important;
        text-align: center !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }
    .hero-content h1 {
        font-size: clamp(2.1rem, 9vw, 3rem) !important;
        line-height: 1.1 !important;
    }
    .hero-description {
        font-size: clamp(0.98rem, 3.8vw, 1.05rem) !important;
    }
    .hero-buttons {
        width: 100%;
    }
    .hero-buttons .btn,
    .hero-buttons a.btn {
        width: 100%;
        white-space: normal !important;
        max-width: 100%;
    }
    .social-links {
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        width: 100% !important;
    }
    .social-link {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }
    .section {
        padding: 3.5rem 0 !important;
    }
    .section-title {
        margin-bottom: 2rem !important;
    }
    .section-title h2 {
        font-size: 1.75rem !important;
    }
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .skills-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .skill-card {
        padding: 1rem !important;
    }
    .skill-header {
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .skill-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    .skill-footer .badge {
        width: auto !important;
    }
    .hero-avatar-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        width: 100% !important;
        max-width: 260px !important;
        margin: 2rem auto 0 auto !important;
    }
    .avatar-frame {
        width: 200px !important;
        height: 200px !important;
        flex-shrink: 0 !important;
        margin: 0 auto !important;
    }
    .hero-badge-float {
        position: absolute !important;
        z-index: 10 !important;
        padding: 0.4rem 0.75rem !important;
        font-size: 0.72rem !important;
        white-space: normal !important;
        max-width: 140px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.5) !important;
    }
    .hero-badge-float.top-right {
        top: -12px !important;
        right: -5px !important;
        left: auto !important;
        bottom: auto !important;
    }
    .hero-badge-float.bottom-left {
        bottom: -12px !important;
        left: -5px !important;
        right: auto !important;
        top: auto !important;
    }
    .terminal-window {
        border-radius: var(--radius-md) !important;
    }
    .terminal-header {
        padding: 0.6rem 1rem !important;
    }
    .terminal-body {
        padding: 1rem !important;
        font-size: 0.82rem !important;
        max-height: 280px !important;
        word-break: break-word !important;
    }
    .terminal-input-line {
        font-size: 0.82rem !important;
    }
    .modal-container {
        padding: 1.25rem !important;
        width: 95% !important;
        max-height: 85vh !important;
        border-radius: var(--radius-md) !important;
    }
    .contact-card {
        padding: 1rem 1rem !important;
    }
    .contact-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 1rem !important;
    }
    .certificate-panel {
        padding: 1.5rem 1rem !important;
    }
    .certificate-panel .btn {
        width: 100% !important;
        display: inline-flex !important;
    }
}

/* Extra Small Phones (Max 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .hero-content h1 {
        font-size: clamp(1.8rem, 8vw, 2.25rem);
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .stats-strip {
        grid-template-columns: 1fr;
    }
    .contact-info-cards {
        grid-template-columns: 1fr;
    }
    .contact-form {
        padding: 1.25rem;
    }
    .project-actions {
        flex-direction: column;
    }
    .project-actions .btn {
        width: 100%;
    }
}

/* 14. TOAST NOTIFICATIONS SYSTEM */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    font-size: 0.925rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    max-width: 420px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-success {
    border-color: var(--border-color);
    background: var(--bg-card);
}
.toast-success i {
    color: var(--primary);
    font-size: 1.15rem;
}

.toast-warning {
    border-color: var(--border-gold);
    background: var(--bg-card);
}
.toast-warning i {
    color: var(--gold);
    font-size: 1.15rem;
}

@media (max-width: 480px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .toast {
        max-width: 100%;
    }
}
