/* ==========================================================================
   Moaz Alsabouh - Modern Personal CV & Portfolio Stylesheet
   Supports Dark/Light Theme, Bilingual RTL/LTR, and A4 Print/PDF Export
   ========================================================================== */

:root,
[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.72);
    --bg-card-hover: rgba(31, 41, 55, 0.85);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --accent-emerald: #10b981;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #10b981 100%);
    --border-color: rgba(255, 255, 255, 0.09);
    --border-hover: rgba(59, 130, 246, 0.45);
    --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);
    --code-bg: #070a12;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #2563eb;
    --accent-secondary: #0891b2;
    --accent-emerald: #059669;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #0891b2 55%, #059669 100%);
    --border-color: rgba(15, 23, 42, 0.09);
    --border-hover: rgba(37, 99, 235, 0.4);
    --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
    --code-bg: #1e293b;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Cairo', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

html[dir="ltr"] body {
    font-family: 'Plus Jakarta Sans', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

ul {
    list-style: none;
}

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

.icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* Ambient Background Glows */
.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.22;
}

[data-theme="light"] .glow {
    opacity: 0.12;
}

.glow-1 {
    width: 480px;
    height: 480px;
    background: var(--accent-primary);
    top: -120px;
    right: -100px;
}

.glow-2 {
    width: 420px;
    height: 420px;
    background: var(--accent-secondary);
    bottom: 5%;
    left: -120px;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.55;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background-color 0.28s ease;
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.85);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
    gap: 1rem;
}

.brand {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    letter-spacing: -0.02em;
}

.brand-code {
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.25s ease;
    border-radius: 2px;
}

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

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

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 2.4rem;
    padding: 0 0.75rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

/* Theme Icon Visibility */
[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

.mobile-menu-btn {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.45rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    height: 2.4rem;
    border-radius: 0.65rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.5);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

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

/* Hero Section */
.hero {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.95rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.15); }
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.hero-name {
    font-size: clamp(2.25rem, 4.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(1.25rem, 2.3vw, 1.65rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-bio {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 620px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.meta-item .icon {
    color: var(--accent-primary);
}

.meta-link:hover {
    color: var(--accent-primary);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.social-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 0.65rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.social-pill:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Profile Card Visual */
.profile-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.profile-img-wrapper {
    position: relative;
    width: 135px;
    height: 135px;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.35);
}

.verified-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-primary);
}

.verified-badge svg {
    width: 16px;
    height: 16px;
}

.code-window {
    background: var(--code-bg);
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.code-filename {
    margin-left: auto;
    color: #9ca3af;
    font-size: 0.75rem;
}

.code-body {
    padding: 1rem;
    color: #e5e7eb;
    line-height: 1.65;
    overflow-x: auto;
}

.code-body .kw { color: #c084fc; }
.code-body .cls { color: #38bdf8; }
.code-body .str { color: #34d399; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.stat-box {
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    padding: 0.85rem;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Section Headers */
.section-header {
    margin-bottom: 2.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.section-title {
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.25;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.4rem;
}

/* About Section */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.about-text-card strong {
    color: var(--text-primary);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.pillar-card {
    padding: 1.6rem;
}

.pillar-icon {
    width: 46px;
    height: 46px;
    border-radius: 0.85rem;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.pillar-icon svg {
    width: 24px;
    height: 24px;
}

.pillar-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pillar-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-category {
    padding: 1.75rem;
}

.category-header {
    margin-bottom: 1.35rem;
}

.category-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 0.25rem;
}

.category-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    font-size: 0.88rem;
    font-weight: 600;
    direction: ltr;
}

[data-theme="light"] .skill-tag {
    background: rgba(15, 23, 42, 0.03);
}

.dot-accent {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    padding: 1.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-4px);
}

.featured-highlight {
    border-color: rgba(59, 130, 246, 0.32);
}

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

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.16);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-accent {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-tech {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.project-links a {
    width: 36px;
    height: 36px;
    border-radius: 0.6rem;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.project-links a:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.08);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
}

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

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

.project-Stack li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.09);
    padding: 0.2rem 0.6rem;
    border-radius: 0.45rem;
}

.more-projects {
    margin-top: 2.25rem;
    text-align: center;
}

/* Education & Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    position: relative;
}

.timeline-item {
    padding: 1.85rem;
    position: relative;
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.timeline-type {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.2rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 800;
}

.timeline-org {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.timeline-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.timeline-badge.badge-current {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    border-color: rgba(59, 130, 246, 0.3);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.96rem;
}

/* Contact Section */
.contact-banner {
    padding: 2.75rem;
}

.contact-desc {
    color: var(--text-secondary);
    max-width: 680px;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.02rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.15rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 1.1rem 1.25rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

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

.contact-link-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}

.contact-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.contact-value {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Footer */
.footer {
    padding: 2.25rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content,
    .hero-visual {
        min-width: 0;
    }

    .pillars-grid,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .hero {
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .nav-container {
        height: 4rem;
        gap: 0.5rem;
    }

    .brand {
        font-size: 1.05rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-actions {
        gap: 0.35rem;
        flex-shrink: 0;
    }

    .action-btn {
        height: 2.2rem;
        padding: 0 0.55rem;
        font-size: 0.8rem;
    }

    .btn-sm.print-btn {
        height: 2.2rem;
        padding: 0 0.6rem;
    }

    .print-btn span {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 4rem;
        left: 0.75rem;
        right: 0.75rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 1rem;
        padding: 1.25rem;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.5rem;
        box-shadow: var(--shadow-card);
        display: none;
        z-index: 200;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        padding: 0.65rem;
        border-radius: 0.5rem;
    }

    .nav-link:hover {
        background: rgba(59, 130, 246, 0.1);
    }

    .nav-link::after {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .status-badge {
        font-size: 0.78rem;
        padding: 0.3rem 0.75rem;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.15rem;
    }

    .hero-bio {
        font-size: 0.96rem;
    }

    .hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        font-size: 0.9rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .social-strip {
        gap: 0.5rem;
    }

    .social-pill {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0.45rem 0.65rem;
        font-size: 0.82rem;
    }

    .profile-card {
        padding: 1.25rem;
    }

    .code-body {
        padding: 0.75rem;
        font-size: 0.72rem;
    }

    .code-body pre,
    .code-body code {
        white-space: pre-wrap;
        word-break: break-word;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .about-text-card,
    .pillar-card,
    .skill-category,
    .project-card,
    .timeline-item {
        padding: 1.3rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .contact-banner {
        padding: 1.35rem;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }

    .contact-item {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.75rem;
    }

    .contact-info {
        width: calc(100% - 60px);
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
        padding: 0.55rem;
        margin-top: 0.25rem;
    }
}

@media (max-width: 400px) {
    .brand {
        font-size: 0.92rem;
    }

    .action-btn {
        padding: 0 0.45rem;
    }
}

/* ==========================================================================
   Print / Save as PDF Stylesheet (Clean A4 CV Layout)
   ========================================================================== */
@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #ffffff !important;
        color: #111827 !important;
        font-size: 10.5pt;
        line-height: 1.45;
    }

    .ambient-bg,
    .navbar,
    .hero-cta,
    .code-window,
    .more-projects,
    .copy-btn,
    .footer {
        display: none !important;
    }

    .section {
        padding: 0.7rem 0 !important;
        page-break-inside: avoid;
    }

    .glass-card {
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        box-shadow: none !important;
        border-radius: 8px !important;
        padding: 0.9rem !important;
    }

    .hero-grid {
        grid-template-columns: 1fr auto !important;
        gap: 1rem !important;
    }

    .profile-img-wrapper {
        width: 85px !important;
        height: 85px !important;
    }

    .gradient-text {
        color: #1d4ed8 !important;
        -webkit-text-fill-color: #1d4ed8 !important;
    }

    .projects-grid,
    .skills-grid,
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
    }
}
