/* ============================================
   Mohamed Khaled — AI Engineer Portfolio
   Premium AI Engineer Light Editorial Design System
   Pixel-perfect match to hero photo.png reference
   ============================================ */

/* ============ DESIGN TOKENS ============ */
:root {
    --bg:              #EEF3F9;
    --bg-hero:         #E8EEF6;
    --surface:         #FFFFFF;
    --surface-elevated:#F8FAFD;
    --text:            #07152F;
    --text-secondary:  #1E3A5F;
    --text-muted:      #4A6480;
    --border:          rgba(22, 119, 255, 0.12);
    --border-accent:   rgba(22, 119, 255, 0.32);
    --accent:          #1677FF;
    --accent-hover:    #0958D9;
    --accent-glow:     rgba(22, 119, 255, 0.22);
    --accent-soft:     rgba(22, 119, 255, 0.07);
    --navy-btn:        #07152F;
    --navy-btn-hover:  #1677FF;
    --radius-lg:       20px;
    --radius-md:       12px;
    --radius-sm:       8px;
    --transition:      0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font:            'Outfit', sans-serif;
    --card-shadow:     0 12px 36px rgba(7, 21, 47, 0.06);
    --card-shadow-hover: 0 18px 44px rgba(22, 119, 255, 0.12);
}

/* ============ RESET ============ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ============ UTILITY ============ */
.accent      { color: var(--accent); }
.accent-dot  { color: var(--accent); opacity: 0.65; margin: 0 4px; }
.accent-text { color: var(--accent); }

/* ============ PARTICLES ============ */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============ SCROLL REVEAL ============ */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============ 3D TILT CARDS ============ */
.tilt-card { transform-style: preserve-3d; transition: transform 0.3s ease; }
.tilt-card .sg-feature-icon,
.tilt-card h3,
.tilt-card h4,
.tilt-card p { transform: translateZ(18px); }

/* ============================================================
   NAVBAR — exact match: transparent frosted, navy CTA pill
   ============================================================ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 6%;
    background: rgba(238, 243, 249, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(22, 119, 255, 0.06);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 24px rgba(7, 21, 47, 0.07);
    padding: 14px 6%;
}

/* MK Logo */
.logo-mk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
    flex-shrink: 0;
}
.logo-mk:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 4px 12px rgba(22, 119, 255, 0.35));
}
.logo-mk-img {
    height: 46px;
    width: auto;
    display: block;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;
    padding: 7px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 20px; }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-links a.active::after { width: 24px; }

/* Nav Right: CTA pill */
.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 24px;
    border-radius: 50px;
    background: var(--navy-btn);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(7, 21, 47, 0.18);
}
.nav-cta-btn:hover {
    background: var(--accent);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.35);
    transform: translateY(-1px);
    color: #fff;
}
.nav-cta-btn .live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: indicatorPulse 1.8s infinite;
}

@keyframes indicatorPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.35); opacity: 0.6; }
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 1001;
}
.hamburger span {
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
    display: block;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 50px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transition: left 0.5s;
}
.btn:hover::before { left: 100%; }

.primary-btn {
    background: var(--navy-btn);
    color: #ffffff;
    border: 1px solid var(--navy-btn);
    box-shadow: 0 4px 18px rgba(7, 21, 47, 0.15);
}
.primary-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 6px 24px var(--accent-glow);
    transform: translateY(-2px);
}

.outline-btn {
    background: #ffffff;
    color: var(--text);
    border: 1px solid rgba(22, 119, 255, 0.28);
    box-shadow: 0 2px 10px rgba(7, 21, 47, 0.04);
}
.outline-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.12);
}

.btn-sm { padding: 7px 16px; font-size: 0.82rem; }

/* =================================================================
   HERO SECTION — pixel-perfect match to hero photo.png reference
   Layout: 3-column grid (left text | center portrait | right panel)
   Background: very light blue-grey gradient
   =================================================================*/
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
    /* exact background from reference — very light cool white */
    background: linear-gradient(
        160deg,
        #F0F5FB 0%,
        #E8EEF6 35%,
        #EBF1F9 70%,
        #F2F6FB 100%
    );
    z-index: 1;
}

/* Subtle grid overlay matching reference */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(22,119,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22,119,255,0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    display: grid;
    /* Match reference: left text takes ~40%, portrait ~38%, right panel ~22% */
    grid-template-columns: 2fr 1.8fr 1.1fr;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 80px 5% 0;
    height: 100%;
    position: relative;
    z-index: 4;
    gap: 0;
}

/* ---- LEFT COLUMN: Identity & CTA ---- */
.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 4;
    padding-right: 20px;
    animation: heroFadeInLeft 0.9s ease forwards;
}

@keyframes heroFadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* AI ENGINEER label with right line — exact from reference */
.hero-tag-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.hero-tag {
    font-size: 0.76rem;
    letter-spacing: 3.5px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
}

.hero-tag-line {
    flex: 1;
    max-width: 100px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(22,119,255,0.6), rgba(22,119,255,0.08));
}

/* Big headline: MOHAMED / KHALED_ */
.hero-headline {
    font-size: clamp(3.2rem, 5.5vw, 5.6rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 20px;
    color: var(--text);
}

.headline-part {
    display: block;
}

/* KHALED stays dark navy — same as MOHAMED in the reference */
.headline-part.accent-text {
    color: var(--text);
}

.hero-underscore {
    color: var(--accent);
    display: inline-block;
    animation: cursorBlink 1.1s infinite;
    margin-left: 2px;
}

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

/* Specialties row: AI & ML • COMPUTER VISION • DATA ANALYSIS • DATA SCIENCE */
.hero-specialties {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.spec-dot {
    color: var(--accent);
    font-size: 0.72rem;
    opacity: 0.7;
}

/* Subtitle bio */
.hero-bio {
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 30px;
}

/* CTA buttons */
.hero-cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* "View My Projects →" — dark filled pill */
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: 50px;
    background: var(--navy-btn);
    color: #ffffff;
    font-size: 0.91rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 18px rgba(7, 21, 47, 0.22);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}
.btn-hero-primary:hover {
    background: var(--accent);
    box-shadow: 0 6px 24px var(--accent-glow);
    transform: translateY(-2px);
    color: #fff;
}

/* "Let's Connect" — outlined pill */
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border-radius: 50px;
    background: transparent;
    color: var(--text);
    font-size: 0.91rem;
    font-weight: 600;
    border: 1.5px solid rgba(7, 21, 47, 0.25);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}
.btn-hero-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(22, 119, 255, 0.05);
    transform: translateY(-2px);
}

/* CV Download Button */
.btn-hero-cv {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 50px;
    background: transparent;
    color: var(--text);
    font-size: 0.91rem;
    font-weight: 600;
    border: 1.5px dashed rgba(7, 21, 47, 0.35);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}
.btn-hero-cv i { font-size: 0.85rem; }
.btn-hero-cv:hover {
    border-color: #16a34a;
    color: #16a34a;
    background: rgba(22, 163, 74, 0.06);
    transform: translateY(-2px);
}


/* Scroll cue bottom-left */
.hero-scroll-cue {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 40px;
    gap: 6px;
    pointer-events: none;
    opacity: 0.8;
}
.scroll-stem-line {
    width: 1.5px;
    height: 20px;
    background: rgba(22, 119, 255, 0.5);
    margin-left: 10px;
}
.scroll-cue-body {
    display: flex;
    align-items: center;
    gap: 12px;
}
.scroll-mouse-icon {
    width: 20px;
    height: 32px;
    border: 1.5px solid rgba(22, 119, 255, 0.55);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}
.mouse-scroll-wheel {
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: var(--accent);
    animation: scrollWheel 1.8s infinite;
}
@keyframes scrollWheel {
    0%   { transform: translateY(0); opacity: 1; }
    50%  { transform: translateY(8px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}
.scroll-cue-text {
    font-size: 0.76rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ---- CENTER COLUMN: Portrait ---- */
.hero-center {
    display: flex;
    justify-content: center;
    align-items: stretch;
    position: relative;
    height: 100%;
    /* portrait column needs overflow visible for the full-height image */
    overflow: visible;
}

.hero-portrait-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    width: 100%;
    min-height: 100vh;
    overflow: visible;
}

/* The portrait image — fills viewport height from bottom, no cropping, no fade */
.hero-main-portrait {
    height: 100vh;
    width: auto;
    max-width: none;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    filter: drop-shadow(0 -2px 32px rgba(7, 21, 47, 0.05));
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* HUD face brackets — wrap the face area of the portrait
   Portrait is 100vh tall. Face occupies top ~5%–58% vertically.
   We place the frame: top 4%, height 52%, centered on portrait x-axis */
.face-hud-frame {
    position: absolute;
    top: 4%;
    left: 50%;
    transform: translateX(-45%);
    width: 52%;
    height: 52%;
    pointer-events: none;
    z-index: 10;
}

/* Corner bracket pieces — L-shaped */
.hud-bracket {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: rgba(22, 119, 255, 0.9);
    border-style: solid;
    transition: box-shadow 0.3s ease;
}
.hud-bracket.tl { top: 0; left: 0;    border-width: 2.5px 0 0 2.5px; }
.hud-bracket.tr { top: 0; right: 0;   border-width: 2.5px 2.5px 0 0; }
.hud-bracket.bl { bottom: 0; left: 0; border-width: 0 0 2.5px 2.5px; }
.hud-bracket.br { bottom: 0; right: 0;border-width: 0 2.5px 2.5px 0; }

/* "● AI ENGINEER" cyber angled leader line matching reference */
.hud-pointer-callout {
    position: absolute;
    top: 6%;
    right: -130px;
    display: flex;
    align-items: flex-start;
    pointer-events: none;
    z-index: 15;
}

.hud-callout-svg {
    position: absolute;
    top: -8px;
    left: -38px;
    width: 160px;
    height: 70px;
    overflow: visible;
    pointer-events: none;
}

.hud-callout-text-group {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 42px;
    margin-top: -38px;
}

.hud-callout-dot {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    background: #1677FF;
    box-shadow: 0 0 10px rgba(22, 119, 255, 0.9);
    animation: hudDotPulse 2s infinite;
    flex-shrink: 0;
}

.hud-callout-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.8px;
    color: #1677FF;
    text-transform: uppercase;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    border-bottom: 1.5px solid #1677FF;
    padding-bottom: 2px;
}

@keyframes hudDotPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(22,119,255,0.8); }
    50%      { box-shadow: 0 0 14px rgba(22,119,255,1), 0 0 28px rgba(22,119,255,0.4); }
}

/* ---- RIGHT COLUMN: Technical AI Engineer Panel ---- */
.hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    z-index: 4;
    padding-left: 20px;
    margin-top: -90px;
    animation: heroFadeInRight 0.9s 0.2s ease forwards;
    opacity: 0;
    min-width: 170px;
}

@keyframes heroFadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* The bordered card with corner brackets — matches reference exactly */
.hero-tech-card {
    position: relative;
    width: 100%;
    max-width: 195px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(22, 119, 255, 0.2);
    border-radius: 4px;
    padding: 26px 18px 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 36px rgba(7, 21, 47, 0.06);
}

/* Corner brackets on the card — thin L-shapes */
.card-bracket {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: rgba(22, 119, 255, 0.7);
    border-style: solid;
    pointer-events: none;
}
.card-bracket.tl { top: -1px;    left: -1px;  border-width: 2px 0 0 2px; }
.card-bracket.tr { top: -1px;    right: -1px; border-width: 2px 2px 0 0; }
.card-bracket.bl { bottom: -1px; left: -1px;  border-width: 0 0 2px 2px; }
.card-bracket.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* Flow list: Build → Train → Analyze → Solve */
.tech-flow-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

.tech-flow-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text);
    padding: 8px 0;
}

.tech-flow-item .flow-icon {
    color: var(--accent);
    font-size: 1.1rem;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tech-flow-item .flow-name {
    letter-spacing: 0.3px;
}

/* Down-arrow separators */
.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
    color: rgba(22, 119, 255, 0.5);
    font-size: 0.7rem;
    margin: 0;
}

/* Bottom tag: "BUILDING INTELLIGENT SYSTEMS" with left line */
.hero-bottom-tag {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 105px;
    max-width: 220px;
}

.bottom-tag-line {
    width: 40px;
    height: 1.5px;
    background: rgba(22, 119, 255, 0.5);
    flex-shrink: 0;
}

.bottom-tag-text {
    font-size: 0.68rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    line-height: 1.4;
}

/* ============ GLASS PANELS ============ */
.glass-panel {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 52px 58px;
    margin: 32px 8%;
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 1;
}

/* ============ SECTION HEADER ============ */
.section-header { margin-bottom: 42px; }

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    display: inline-block;
    position: relative;
    color: var(--text);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 44px; height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ============ ABOUT ============ */
.about-grid {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 16px;
    line-height: 1.85;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stat-box {
    background: #F0F5FB;
    border: 1px solid var(--border);
    padding: 22px 18px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2.5px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.stat-box:hover::before { transform: scaleX(1); }
.stat-box:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(22, 119, 255, 0.12);
}

.stat-box h3 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-box p {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* ============ SECTION EYEBROW ============ */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.8px;
    text-transform: uppercase;
    color: var(--accent);
    padding: 6px 16px;
    background: rgba(22, 119, 255, 0.06);
    border: 1px solid rgba(22, 119, 255, 0.22);
    border-radius: 50px;
    margin-bottom: 12px;
}

.section-subtext {
    color: var(--text-muted);
    font-size: 0.98rem;
    max-width: 680px;
    margin-top: 12px;
    line-height: 1.68;
}

/* ============ NEURAL NETWORK SKILLS ============ */
.skills-nn-wrapper {
    position: relative;
    width: 100%;
    margin-top: 36px;
    padding: 24px 10px 10px;
    min-height: 480px;
}

#skills-nn-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

.nn-layers-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 460px;
}

.nn-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.nn-layer-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: center;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
    width: 100%;
    margin-bottom: 8px;
}

.nn-nodes-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nn-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(22, 119, 255, 0.15);
    box-shadow: 0 4px 16px rgba(7, 21, 47, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    width: 100%;
    min-width: 110px;
    max-width: 150px;
}

.nn-node:hover,
.nn-node.nn-highlighted {
    border-color: var(--accent);
    box-shadow: 0 6px 20px var(--accent-glow), 0 0 0 2px rgba(22, 119, 255, 0.15);
    transform: translateY(-3px) scale(1.03);
    background: #fff;
    z-index: 5;
}

.nn-node.nn-dimmed {
    opacity: 0.28;
    filter: grayscale(0.5);
    transform: none;
}

.featured-node {
    border-color: rgba(22, 119, 255, 0.28);
    background: rgba(22, 119, 255, 0.04);
}

.node-glow {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: radial-gradient(ellipse at center, rgba(22,119,255,0.08) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nn-node:hover .node-glow { opacity: 1; }

.node-icon {
    font-size: 1.4rem;
    color: var(--accent);
}

.node-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.nn-footer-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(22, 119, 255, 0.06);
    border: 1px solid rgba(22, 119, 255, 0.18);
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.lang-pill i { color: var(--accent); font-size: 0.85rem; }

/* ============ SERVICES ============ */
.services-section {
    padding: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 8px;
}

.service-card {
    background: #fff;
    border: 1px solid rgba(22, 119, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    transition: all var(--transition);
    cursor: default;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(22, 119, 255, 0.12);
}

.service-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.service-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: rgba(22, 119, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent);
}

.service-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    padding: 4px 10px;
    background: rgba(22, 119, 255, 0.06);
    border: 1px solid rgba(22, 119, 255, 0.22);
    border-radius: 50px;
}

.service-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.service-tags span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: rgba(22, 119, 255, 0.05);
    border: 1px solid rgba(22, 119, 255, 0.15);
    border-radius: 50px;
}

/* ============ PROJECTS INTRO ============ */
.projects-intro-wrapper {
    padding: 52px 8% 24px;
    position: relative;
    z-index: 1;
}

.projects-intro-text {
    color: var(--text-muted);
    font-size: 0.98rem;
    max-width: 680px;
    margin-top: 12px;
    line-height: 1.68;
}

.project-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.project-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(22, 119, 255, 0.18);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}
.project-pill:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(22, 119, 255, 0.28);
}
.project-pill.flagship-pill {
    background: var(--navy-btn);
    color: #fff;
    border-color: var(--navy-btn);
}
.project-pill.flagship-pill:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* ============ PROJECTS: FLAGSHIP SMART GLASSES ============ */
.flagship-section {
    max-width: 1200px;
    margin: 30px auto 48px auto;
    padding: 0 4%;
}

.flagship-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1.5px solid rgba(22, 119, 255, 0.22);
    border-radius: 24px;
    padding: 38px 42px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(7, 21, 47, 0.08);
}

.flagship-text {
    display: flex;
    flex-direction: column;
}

.flagship-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 2.2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.flagship-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.flagship-desc {
    font-size: 0.96rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.flagship-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.flagship-pills span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    background: #F0F5FB;
    border: 1px solid rgba(22, 119, 255, 0.15);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
}

.flagship-pills span i {
    color: var(--accent);
}

.flagship-cta {
    display: flex;
    gap: 12px;
}

.flagship-img-wrap {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: 320px;
    border: 1.5px solid rgba(22, 119, 255, 0.2);
    box-shadow: 0 14px 40px rgba(7, 21, 47, 0.12);
    background: #07152F;
}

.flagship-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.flagship-inner:hover .flagship-img {
    transform: scale(1.04);
}

.flagship-img-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--navy-btn);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(7, 21, 47, 0.3);
}

.flagship-img-badge i {
    color: #F59E0B;
}

/* ============ PROJECTS: MORE PROJECTS GRID ============ */
.other-projects-section {
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 4%;
}

.other-projects-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

.other-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.proj-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(22, 119, 255, 0.16);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(7, 21, 47, 0.06);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj-card:hover {
    transform: translateY(-6px);
    border-color: rgba(22, 119, 255, 0.4);
    box-shadow: 0 18px 45px rgba(22, 119, 255, 0.16);
}

.proj-card-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #0A192F;
}

.proj-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.proj-card:hover .proj-card-img {
    transform: scale(1.05);
}

.proj-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.proj-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.proj-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.proj-card-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 18px;
    flex: 1;
}

.proj-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.proj-card-tags span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: #F0F5FB;
    border: 1px solid rgba(22, 119, 255, 0.12);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text);
}

.proj-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: auto;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 50px;
}


/* ============ CERTIFICATES ============ */
.certificates-section { padding: 0; }

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.cert-card {
    background: #F8FAFD;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all var(--transition);
    cursor: default;
    text-decoration: none;
    color: inherit;
}

.cert-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(22, 119, 255, 0.1);
}

.cert-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: rgba(22, 119, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--accent);
}

.cert-info h4 {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.cert-info p {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* ============ CONTACT ============ */
.contact-section { padding: 0; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 48px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.75;
    margin-bottom: 28px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.contact-link i {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(22, 119, 255, 0.07);
    border: 1px solid rgba(22, 119, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.contact-link:hover i {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid rgba(22, 119, 255, 0.18);
    background: #F8FAFD;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
    background: #fff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-status {
    font-size: 0.88rem;
    font-weight: 600;
    min-height: 24px;
    transition: all 0.3s ease;
}

.form-status.success { color: #059669; }
.form-status.error   { color: #dc2626; }

/* ============ FOOTER ============ */
.footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 28px 8%;
    font-size: 0.84rem;
    position: relative;
    z-index: 2;
}

.footer a {
    color: var(--accent);
    transition: color 0.2s;
}
.footer a:hover { color: #fff; }

/* ============ CERTIFICATES SECTION ============ */
.certificates-section { padding: 0; }

.cert-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: #F8FAFD;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.cert-item:hover {
    border-color: var(--border-accent);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.09);
}

.cert-number {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--accent);
    opacity: 0.5;
    min-width: 28px;
}

.cert-item .cert-icon {
    color: var(--accent);
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 119, 255, 0.08);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cert-details h4 {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.cert-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cert-download {
    text-align: center;
    margin-top: 24px;
}

/* ============ CONTACT SECTION ============ */
.contact-section {
    padding: 64px 8%;
    position: relative;
    z-index: 1;
}

.contact-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 48px;
}

.contact-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.8px;
    text-transform: uppercase;
    color: var(--accent);
    padding: 6px 16px;
    background: rgba(22, 119, 255, 0.06);
    border: 1px solid rgba(22, 119, 255, 0.22);
    border-radius: 50px;
    margin-bottom: 14px;
}

.contact-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.contact-intro {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-col-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.contact-col-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Contact form box */
.contact-form-col {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--card-shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid rgba(22, 119, 255, 0.18);
    background: #F8FAFD;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
    background: #fff;
}

.submit-btn {
    width: 100%;
    justify-content: center;
}

/* Platform links right column */
.contact-platforms-col {
    display: flex;
    flex-direction: column;
}

.platform-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
}

.platform-row:hover {
    border-color: var(--accent);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.1);
}

.platform-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(22, 119, 255, 0.08);
    border: 1px solid rgba(22, 119, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--accent);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.platform-row:hover .platform-icon {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.platform-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.platform-name {
    font-size: 0.91rem;
    font-weight: 700;
    color: var(--text);
}

.platform-handle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.platform-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.25s ease, color 0.25s ease;
}

.platform-row:hover .platform-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* ============ CHATBOT WIDGET ============ */
.chatbot-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 100000;
}

.chatbot-button,
#chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--navy-btn);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 8px 24px rgba(7, 21, 47, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.chatbot-button:hover,
#chatbot-toggle:hover {
    background: var(--accent);
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(22, 119, 255, 0.45);
}

#chatbot-window,
.chatbot-window {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 36px);
    height: 490px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border: 1px solid rgba(7, 21, 47, 0.12);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(7, 21, 47, 0.25), 0 0 0 1px rgba(22, 119, 255, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100001;
}

#chatbot-window.active,
#chatbot-window.open,
.chatbot-window.active,
.chatbot-window.open {
    display: flex !important;
    animation: chatSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--navy-btn);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.chatbot-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #fff;
    line-height: 1.2;
}

.chatbot-status {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chatbot-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff8c;
    display: inline-block;
    box-shadow: 0 0 6px #00ff8c;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fbfcfe;
}

.message {
    max-width: 86%;
}

.message-content {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
    word-break: break-word;
}

.message.assistant .message-content {
    background: #F0F5FB;
    color: var(--text);
    border: 1px solid rgba(22, 119, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.message.user {
    margin-left: auto;
}

.message.user .message-content {
    background: var(--navy-btn);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid var(--border);
}

.chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 50px;
    border: 1.5px solid rgba(22, 119, 255, 0.18);
    background: #F8FAFD;
    font-family: var(--font);
    font-size: 0.86rem;
    outline: none;
    color: var(--text);
    transition: border-color 0.2s ease;
}

.chatbot-input input:focus {
    border-color: var(--accent);
    background: #fff;
}

.chatbot-input button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.chatbot-input button:hover {
    background: var(--navy-btn);
    transform: scale(1.08);
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    #chatbot-window,
    .chatbot-window {
        width: calc(100vw - 40px);
        right: 0;
        bottom: 64px;
        height: 70vh;
    }
}

/* ============ FOOTER ============ */
.footer {
    background: var(--text);
    padding: 32px 8%;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.65);
    font-size: 1rem;
    transition: all 0.25s ease;
}
.social-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* ============ EXPERIENCE SECTION ============ */
.experience-section { padding: 0; }

.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    padding-left: 28px;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), rgba(22,119,255,0.1));
    border-radius: 2px;
}

.exp-item {
    position: relative;
    background: #F8FAFD;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    transition: all var(--transition);
}

.exp-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2.5px solid var(--bg);
    box-shadow: 0 0 10px rgba(22, 119, 255, 0.5);
}

.exp-item:hover {
    border-color: var(--border-accent);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(22, 119, 255, 0.1);
}

.exp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.exp-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.exp-company {
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 3px;
}

.exp-date {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    background: rgba(22, 119, 255, 0.06);
    border: 1px solid rgba(22, 119, 255, 0.15);
    border-radius: 50px;
    white-space: nowrap;
}

.exp-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.72;
    margin-bottom: 12px;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.exp-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: rgba(22, 119, 255, 0.05);
    border: 1px solid rgba(22, 119, 255, 0.15);
    border-radius: 50px;
}

/* NN node active/connected classes used in script.js */
.nn-node.active-hover {
    border-color: var(--accent) !important;
    box-shadow: 0 6px 20px var(--accent-glow), 0 0 0 2px rgba(22, 119, 255, 0.2) !important;
    transform: translateY(-4px) scale(1.05) !important;
    background: #fff !important;
    z-index: 6;
}

.nn-node.connected-highlight {
    border-color: rgba(22, 119, 255, 0.5) !important;
    box-shadow: 0 4px 14px rgba(22, 119, 255, 0.18) !important;
    transform: translateY(-2px) !important;
    background: rgba(22, 119, 255, 0.04) !important;
}

.nn-node.dimmed {
    opacity: 0.28;
    filter: grayscale(0.5);
    transform: none !important;
}

/* Project pill active state */
.project-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .hero-container {
        grid-template-columns: 1.8fr 1.6fr 1fr;
        padding: 80px 4% 0;
    }
    .hero-headline { font-size: clamp(2.8rem, 5vw, 4.5rem); }
}

@media (max-width: 900px) {

    /* ---- HERO: compact single-column ---- */
    .hero-section {
        height: auto !important;
        min-height: unset;
        overflow-x: hidden;
        padding-bottom: 40px;
    }

    .hero-container {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto;
        padding: 90px 6% 40px;
        gap: 28px;
        align-items: start;
    }

    /* Text block */
    .hero-left {
        order: 1;
        padding-right: 0;
        text-align: center;
        align-items: center;
    }
    .hero-tag-row    { justify-content: center; }
    .hero-bio        { text-align: center; max-width: 100%; margin: 0 auto 24px; }
    .hero-cta-group  { justify-content: center; flex-wrap: wrap; gap: 10px; }
    .hero-scroll-cue { display: none; }  /* hide scroll cue on mobile */

    /* Portrait — full-width hero card */
    .hero-center {
        order: 2;
        height: auto !important;
        min-height: unset !important;
        width: calc(100% + 12%) !important;  /* bleed outside padding */
        margin-left: -6%;
        margin-right: -6%;
        margin-top: 28px;
        display: block;
        overflow: hidden !important;
        border-radius: 24px;
        position: relative;
    }
    .hero-portrait-stage {
        position: relative !important;
        width: 100%;
        height: 380px !important;
        min-height: unset !important;
        display: block;
        overflow: hidden !important;
    }
    /* Subtle gradient fade at bottom to blend into page */
    .hero-portrait-stage::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: linear-gradient(to bottom, transparent, #EEF3F9 90%);
        z-index: 3;
        pointer-events: none;
    }
    .hero-main-portrait {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        height: 100% !important;
        width: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
        object-position: top center !important;
        display: block;
        margin: 0;
        filter: none;
    }

    /* Hide the tech card panel — saves space on mobile */
    .hero-right { display: none !important; }
    .face-hud-frame { display: none !important; }

    /* ---- NAVBAR ---- */
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-cta-btn { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        padding: 24px 8%;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 32px rgba(7, 21, 47, 0.12);
        z-index: 999;
        gap: 12px;
    }

    /* ---- ABOUT ---- */
    .about-grid { grid-template-columns: 1fr; }
    .about-stats { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .stat-box { flex: 1; min-width: 90px; }

    /* ---- SKILLS: horizontal scroll strip ---- */
    /* Allow the glass-panel to overflow for the scroll to work */
    #skills { overflow: visible; }
    .skills-nn-wrapper {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding: 12px 0 16px;
        min-height: unset;
        /* scroll indicator hint */
        background:
            linear-gradient(to right, white 0%, transparent 5%),
            linear-gradient(to left,  white 0%, transparent 5%);
        background-attachment: local, local;
    }
    .nn-layers-container {
        position: relative;
        z-index: 2;
        width: max-content;   /* shrink-to-content then scroll */
        min-width: 100%;
        min-height: unset;
        gap: 10px;
        padding: 0 12px 8px;
    }
    .nn-node {
        min-width: 80px;
        max-width: 110px;
        padding: 10px 7px;
    }
    .node-icon      { font-size: 1rem; }
    .node-title     { font-size: 0.6rem; }
    .nn-layer-badge { font-size: 0.52rem; letter-spacing: 0.8px; }
    .nn-footer-languages { flex-direction: column; align-items: center; gap: 8px; }
    /* Canvas stays visible — resize() uses scrollWidth so lines cover full scroll area */

    /* ---- SERVICES ---- */
    .services-grid { grid-template-columns: 1fr; }

    /* ---- PROJECTS ---- */
    .flagship-inner {
        grid-template-columns: 1fr;
        padding: 24px 20px;
        gap: 24px;
    }
    .flagship-img-wrap {
        height: 200px;
        border-radius: 12px;
        overflow: hidden;
    }
    .other-projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* ---- CONTACT ---- */
    .contact-grid { grid-template-columns: 1fr; }
    .form-row     { grid-template-columns: 1fr; }

    /* ---- MISC ---- */
    .glass-panel    { padding: 36px 18px; margin: 14px 3%; }
    .section-header { margin-bottom: 28px; }
    .chatbot-container { bottom: 16px; right: 16px; }
}

@media (max-width: 600px) {

    /* ---- HERO ---- */
    .hero-container {
        padding: 90px 5% 50px;
    }

    .hero-headline {
        font-size: clamp(2.4rem, 11vw, 3rem);
        letter-spacing: -1.5px;
    }

    .hero-specialties {
        font-size: 0.68rem;
        justify-content: center;
        gap: 5px;
    }

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

    /* Buttons: full-width stack */
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .hero-cta-group .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .hero-center {
        height: 65vw;
        min-height: 220px;
        margin-top: 24px;
    }

    /* ---- PROJECTS ---- */
    .flagship-title        { font-size: 1.6rem; }
    .other-projects-title  { font-size: 1.4rem; }
    .proj-card-img-wrap    { height: 160px; }

    /* ---- ABOUT stats ---- */
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .stat-box { padding: 16px 10px; }
    .stat-box h3 { font-size: 1.5rem; }

    /* ---- SECTION headings ---- */
    .section-header h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); }

    /* ---- GLASS PANEL ---- */
    .glass-panel { padding: 30px 16px; margin: 12px 2%; }
}

@media (max-width: 400px) {
    .hero-headline { font-size: 2.1rem; letter-spacing: -1px; }
    .hero-center   { height: 60vw; }
    .hero-tech-card { max-width: 200px; }
    .about-stats   { grid-template-columns: 1fr; }
}