:root {
    --bg-color: #030208;
    --card-bg: rgba(14, 11, 26, 0.7);
    --border-color: rgba(147, 51, 234, 0.15);
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-color: #4f46e5;      /* Tech Purple */
    --accent-light: #818cf8;
    --accent-glow: rgba(79, 70, 229, 0.4);
    --success-color: #00ff66;     /* System Active Green */
    --success-glow: rgba(0, 255, 102, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Canvas Layer */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    display: block;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(3, 2, 8, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    color: var(--accent-light);
    font-weight: 900;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

/* Live Badge Widget */
.badge {
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge.green {
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    box-shadow: 0 0 10px var(--success-glow);
}

.badge.red {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(147, 51, 234, 0.05);
    border: 1px solid var(--border-color);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(147, 51, 234, 0.1);
    border-color: var(--accent-light);
}

/* --- MAIN CONTAINER --- */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 30px 0 30px;
}

.section-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
}

/* --- HERO LAYOUT --- */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    min-height: 80vh;
    padding-bottom: 80px;
}

.hero-badge {
    background: rgba(79, 70, 229, 0.12);
    color: var(--accent-light);
    border: 1px solid rgba(79, 70, 229, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-top: 20px;
    font-weight: 800;
}

.highlight {
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 20px 0 35px 0;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.tech-stack-row p {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.tech-icons {
    display: flex;
    gap: 20px;
    font-size: 1.6rem;
    color: var(--text-muted);
}

.tech-icons i:hover {
    color: var(--accent-light);
    transform: scale(1.15);
    transition: all 0.2s ease;
}

/* --- PROFILE IMAGE & CODE CARD --- */
.hero-right {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    width: 320px;
    height: 380px;
}

.hero-circle-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: var(--accent-color);
    filter: blur(80px);
    opacity: 0.45;
    z-index: -1;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.floating-code-card {
    position: absolute;
    bottom: -30px;
    right: -40px;
    background: rgba(14, 11, 26, 0.95);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.code-header {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.code-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.floating-code-card code {
    font-size: 0.75rem;
}

.keyword { color: #f472b6; }
.string { color: #34d399; }

/* --- ABOUT & STATS --- */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 100px 0;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.about-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-light);
}

.stat-card i {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.icon-purple { color: #c084fc; }
.icon-blue { color: #60a5fa; }
.icon-green { color: #34d399; }
.icon-orange { color: #fb923c; }

.stat-card h3 {
    font-size: 2rem;
    font-weight: 800;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- SKILLS GRID --- */
.skills-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.skill-bar-wrapper {
    margin-bottom: 10px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.skill-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent-color), #a855f7);
    border-radius: 10px;
}

/* --- PROJECTS --- */
.projects-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-light);
}

.project-img-placeholder {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-project-icon {
    font-size: 2.2rem;
    color: rgba(255,255,255,0.4);
}

.project-details {
    padding: 24px;
    position: relative;
}

.proj-num {
    font-size: 0.8rem;
    color: var(--accent-light);
    font-weight: 800;
    display: block;
    margin-bottom: 5px;
}

.project-details h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.project-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    height: 60px; /* Keep heights consistent */
    overflow: hidden;
}

.view-project-link {
    text-decoration: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-project-link:hover i {
    transform: translateX(3px);
    transition: transform 0.2s ease;
}

/* --- TESTIMONIAL --- */
.testimonial-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.quote-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 800px;
    text-align: center;
    position: relative;
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent-light);
    opacity: 0.3;
    margin-bottom: 20px;
}

.quote-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 25px;
}

.client-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.client-name {
    font-weight: 700;
    text-align: left;
}

.client-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    text-align: left;
}

/* --- FOOTER --- */
.footer {
    padding: 80px 0 30px 0;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    padding-bottom: 50px;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-top: 10px;
    margin-bottom: 30px;
    font-weight: 800;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.contact-item {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.contact-item i {
    color: var(--accent-light);
    margin-right: 8px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 25px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.glow-heart {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* --- ABOUT (multi-paragraph) --- */
.about-content p + p { margin-top: -10px; }

/* --- CERTIFICATIONS --- */
.certs-section, .experience-section, .education-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}
.certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.cert-card, .edu-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.cert-card:hover, .edu-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-light);
}
.cert-card > i, .edu-card > i { font-size: 1.8rem; margin-top: 4px; }
.cert-card h3, .edu-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cert-card p, .edu-card p { color: var(--text-muted); font-size: 0.9rem; }
.cert-id {
    display: inline-block;
    margin-top: 8px;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--accent-light);
    word-break: break-all;
}

/* --- EXPERIENCE TIMELINE --- */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.timeline-item { position: relative; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -38px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-glow);
}
.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.timeline-date { color: var(--accent-light); font-weight: 700; letter-spacing: 1px; }
.timeline-item h3 { font-size: 1.3rem; margin-bottom: 12px; }
.timeline-item .company { color: var(--accent-light); font-weight: 600; }
.timeline-item ul { padding-left: 18px; color: var(--text-muted); font-size: 0.93rem; }
.timeline-item li { margin-bottom: 8px; line-height: 1.6; }

/* --- SKILL CATEGORIES --- */
.skill-cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.skill-cat {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px;
}
.skill-cat h3 { font-size: 1rem; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--text-color);
}

/* --- PROJECT GROUPS --- */
.proj-group-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 10px 0 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.proj-group-title i { color: var(--accent-light); }
.projects-grid + .proj-group-title { margin-top: 50px; }
.project-card.compact .project-details p { height: auto; margin-bottom: 0; }
.proj-num a { color: inherit; text-decoration: none; }
.proj-num a:hover { text-decoration: underline; }
.contact-item a { color: inherit; text-decoration: none; }
.contact-item a:hover { color: var(--accent-light); }

/* --- PROFESSIONAL POLISH --- */
.hero-title { font-size: 3.1rem; letter-spacing: -0.02em; }
h2, .section-title { letter-spacing: -0.01em; }
.btn i { font-size: 0.9em; }
.footer-bottom .badge { font-size: 0.65rem; vertical-align: middle; }
code, .cert-id { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.profile-card {
    width: 100%;
    max-width: 380px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 60px rgba(79, 70, 229, 0.12);
}
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.avatar {
    width: 64px; height: 64px; flex-shrink: 0;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.3rem; color: #fff;
    background: linear-gradient(135deg, var(--accent-color), #a855f7);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
}
.profile-head h3 { font-size: 1.2rem; }
.profile-head p { font-size: 0.85rem; color: var(--text-muted); }
.availability {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 600; color: var(--success-color);
    background: rgba(0, 255, 102, 0.06);
    border: 1px solid rgba(0, 255, 102, 0.2);
    padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success-color);
    box-shadow: 0 0 0 0 var(--success-glow);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 var(--success-glow); }
    70% { box-shadow: 0 0 0 8px rgba(0, 255, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 102, 0); }
}
.profile-facts { list-style: none; display: grid; gap: 10px; margin-bottom: 22px; }
.profile-facts li { font-size: 0.9rem; color: var(--text-color); display: flex; gap: 12px; align-items: center; }
.profile-facts i { width: 16px; text-align: center; color: var(--accent-light); }
.profile-links { display: flex; gap: 10px; border-top: 1px solid var(--border-color); padding-top: 18px; }
.profile-links a {
    width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center;
    color: var(--text-color); text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.profile-links a:hover { border-color: var(--accent-light); color: var(--accent-light); }
.cta-box .hero-buttons { margin-bottom: 0; flex-wrap: wrap; }

/* --- REFINEMENTS --- */
.logo-mark {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; margin-right: 8px;
    border-radius: 8px; font-size: 0.85rem; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--accent-color), #7c3aed);
}
.logo { display: flex; align-items: center; }
.hero-title { max-width: 640px; }
.stat-card i, .skill-cat h3 i, .proj-group-title i, .edu-card > i { color: var(--accent-light) !important; }
.cta-sub { color: var(--text-muted); margin: -10px 0 24px; max-width: 460px; }
.live-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--success-color); margin-right: 6px; vertical-align: middle;
}
.projects-grid { grid-template-columns: repeat(2, 1fr); }
.projects-grid > .project-card:last-child:nth-child(odd) { grid-column: span 2; }
.project-card.compact .project-details { padding: 26px 28px; }
.project-card.compact .project-details h3 { font-size: 1.15rem; }

/* --- HERO CERT BADGES --- */
.hero-certs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px;
    text-decoration: none;
}
.hero-certs span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}
.hero-certs span i { color: var(--accent-light); margin-right: 4px; }
.hero-certs:hover span { border-color: var(--accent-light); }

/* --- NAV ACTIONS / HAMBURGER --- */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
    display: none;
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent-light); }
.hero-left, .about-content, .cta-box { min-width: 0; }
.tech-icons { flex-wrap: wrap; }
section[id] { scroll-margin-top: 80px; }
img, svg { max-width: 100%; }

/* ===================== MODERN UI LAYER ===================== */
::selection { background: rgba(129, 140, 248, 0.35); color: #fff; }
html { scrollbar-color: #2b2650 transparent; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #2b2650; border-radius: 10px; border: 2px solid var(--bg-color); }

/* Accessibility: visible keyboard focus + skip link */
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 6px; }
.skip-link {
    position: fixed; top: -60px; left: 16px; z-index: 200;
    background: var(--accent-color); color: #fff; padding: 10px 16px; border-radius: 8px;
    text-decoration: none; font-weight: 600; transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* Scroll progress */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 150;
    background: linear-gradient(90deg, var(--accent-color), #a855f7, #22d3ee);
    transform: scaleX(0); transform-origin: 0 50%;
}

/* Aurora background glow */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora span {
    position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.22;
    animation: drift 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 520px; height: 520px; background: #4f46e5; top: -160px; left: -120px; }
.aurora span:nth-child(2) { width: 460px; height: 460px; background: #9333ea; top: 30%; right: -160px; animation-delay: -7s; }
.aurora span:nth-child(3) { width: 380px; height: 380px; background: #0891b2; bottom: -160px; left: 30%; opacity: 0.14; animation-delay: -14s; }
@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

/* Header: transparent at top, glass when scrolled */
.navbar { transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; background: transparent; border-bottom-color: transparent; }
.navbar.scrolled {
    background: rgba(5, 4, 12, 0.78);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    padding: 10px 0;
}
.nav-links a { position: relative; }
.nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: linear-gradient(90deg, var(--accent-light), #c084fc);
    transform: scaleX(0); transition: transform 0.25s ease; border-radius: 2px;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(79, 70, 229, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-secondary:hover, .btn-outline:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

/* Cards: glass + cursor spotlight */
.cert-card, .skill-cat, .project-card, .stat-card, .profile-card, .edu-card {
    background: linear-gradient(180deg, rgba(20, 16, 38, 0.72), rgba(12, 10, 24, 0.72));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}
.cert-card:hover, .skill-cat:hover, .project-card:hover, .stat-card:hover, .edu-card:hover {
    transform: translateY(-4px);
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(129, 140, 248, 0.08);
}
.spotlight { position: relative; overflow: hidden; }
.spotlight::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(129, 140, 248, 0.14), transparent 45%);
    transition: opacity 0.3s ease;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; }
.chips span { transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.chips span:hover { background: rgba(79, 70, 229, 0.25); border-color: var(--accent-light); transform: translateY(-1px); }

/* Section headings */
.section-tag::before {
    content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 10px;
    vertical-align: middle; background: var(--accent-light); border-radius: 2px;
}
.section-title { background: linear-gradient(180deg, #fff 30%, #b9c0d8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Experience as cards on a rail */
.timeline-item {
    background: linear-gradient(180deg, rgba(20, 16, 38, 0.55), rgba(12, 10, 24, 0.55));
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px 26px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.timeline-item:hover { border-color: rgba(129, 140, 248, 0.4); }
.timeline-item::before { top: 28px; left: -39px; }
.timeline-item:first-child::before { animation: ring 2.4s infinite; }
@keyframes ring {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6); }
    80%, 100% { box-shadow: 0 0 0 12px rgba(79, 70, 229, 0); }
}

/* Copy button, toast, back-to-top */
.copy-btn {
    margin-left: 8px; width: 28px; height: 28px; border-radius: 7px;
    display: inline-grid; place-items: center; vertical-align: middle;
    border: 1px solid var(--border-color); background: transparent; color: var(--text-muted);
    cursor: pointer; transition: all 0.2s ease;
}
.copy-btn:hover { color: var(--accent-light); border-color: var(--accent-light); }
.toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 300;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    background: #15122a; color: #fff; border: 1px solid var(--border-color);
    padding: 10px 18px; border-radius: 10px; font-size: 0.9rem; font-weight: 500;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.back-to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 120;
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    color: #fff; border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.45);
    opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* Reveal on scroll (only when JS is running) */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms),
                transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0ms),
                border-color 0.35s ease, box-shadow 0.35s ease;
}
.js .reveal.in-view { opacity: 1; transform: none; }
.js .reveal.in-view:is(.cert-card, .skill-cat, .project-card, .stat-card, .edu-card):hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ===================== ENGAGEMENT LAYER ===================== */
/* Typewriter headline */
.hero-title .rotator { display: inline; }
.caret {
    display: inline-block; width: 4px; height: 0.9em; margin-left: 6px; vertical-align: -0.08em;
    background: #c084fc; border-radius: 2px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-title { min-height: 2.3em; }

/* Scroll cue */
.scroll-cue {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    margin: -40px auto 40px; width: max-content;
    color: var(--text-muted); font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; text-decoration: none;
}
.scroll-cue:hover { color: var(--accent-light); }
.mouse { width: 24px; height: 38px; border: 2px solid currentColor; border-radius: 14px; display: flex; justify-content: center; padding-top: 7px; }
.wheel { width: 3px; height: 8px; border-radius: 2px; background: currentColor; animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* Trusted-by marquee */
.trusted-section { padding: 30px 0 70px; }
.trusted-label { text-align: center; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 22px; }
.marquee {
    display: flex; overflow: hidden; gap: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; flex-shrink: 0; gap: 18px; padding-right: 18px; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    white-space: nowrap; font-weight: 600; font-size: 0.95rem; color: var(--text-color);
    padding: 12px 20px; border-radius: 12px;
    border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.02);
}
.marquee-track i { color: var(--success-color); margin-right: 6px; font-size: 0.85em; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Pipeline showcase */
.pipeline-section { padding: 90px 0; border-top: 1px solid var(--border-color); }
.section-lead { color: var(--text-muted); max-width: 680px; margin: -22px 0 44px; font-size: 1.02rem; }
.pipeline {
    position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
    margin-bottom: 28px;
}
.pipe-track { position: absolute; left: 8.33%; right: 8.33%; top: 32px; height: 3px; background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.pipe-fill { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent-color), #a855f7, #22d3ee); box-shadow: 0 0 14px rgba(129, 140, 248, 0.6); transition: width 0.6s ease; }
.pipe-stage { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.pipe-icon {
    width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; font-size: 1.5rem;
    color: var(--text-muted); background: #0d0b1c; border: 1px solid var(--border-color); margin-bottom: 10px;
    transition: all 0.35s ease;
}
.pipe-stage b { font-size: 0.95rem; }
.pipe-stage small { color: var(--text-muted); font-size: 0.78rem; }
.pipe-stage.active .pipe-icon {
    color: #fff; border-color: var(--accent-light); transform: translateY(-4px) scale(1.06);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(168, 85, 247, 0.25));
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.12), 0 12px 30px rgba(79, 70, 229, 0.45);
}
.pipe-stage.done .pipe-icon { color: var(--success-color); border-color: rgba(0, 255, 102, 0.35); }
.terminal {
    border-radius: 14px; overflow: hidden; border: 1px solid var(--border-color);
    background: rgba(6, 5, 14, 0.92); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); background: rgba(255, 255, 255, 0.02); }
.terminal-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-title { margin-left: 10px; font-size: 0.78rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.terminal-body {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.84rem; line-height: 1.75;
    padding: 18px 20px; height: 350px; overflow: hidden; white-space: pre-wrap; margin: 0;
}
.tl { display: block; }
.tl.cmd { color: #e2e8f0; }
.tl.cmd::before { content: ""; }
.tl.ok { color: #34d399; padding-left: 14px; }
.tl.final { color: #fff; font-weight: 600; margin-top: 8px; }

/* Chapter numbers */
.section-tag em { font-style: normal; color: var(--text-muted); margin-right: 6px; }

/* Side chapter dots */
.chapter-dots {
    position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 110;
    display: flex; flex-direction: column; gap: 14px;
}
.chapter-dots a {
    position: relative; width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.18); transition: all 0.25s ease;
}
.chapter-dots a.active { background: var(--accent-light); box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2); transform: scale(1.2); }
.chapter-dots a::after {
    content: attr(data-label); position: absolute; right: 22px; top: 50%; transform: translate(6px, -50%);
    white-space: nowrap; font-size: 0.75rem; font-weight: 600; color: #fff;
    background: #15122a; border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 6px;
    opacity: 0; pointer-events: none; transition: all 0.2s ease;
}
.chapter-dots a:hover::after, .chapter-dots a:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
@media (max-width: 1279px) { .chapter-dots { display: none; } }

/* ===================== RESPONSIVENESS ===================== */

/* Wide layout: use more of the screen instead of a narrow centred column */
.content-wrapper, .nav-container {
    max-width: 1480px;
    padding-left: clamp(16px, 4vw, 64px);
    padding-right: clamp(16px, 4vw, 64px);
}
.hero-subtitle { max-width: 620px; }
.hero-title { max-width: 760px; }

@media (min-width: 1280px) {
    .hero-section { grid-template-columns: 1.3fr 0.7fr; gap: 80px; }
    .about-section { gap: 100px; }
}

/* Large desktop */
@media (min-width: 1600px) {
    .content-wrapper, .nav-container { max-width: 1680px; }
    .hero-title { font-size: 3.6rem; max-width: 860px; }
    .hero-subtitle { font-size: 1.2rem; max-width: 680px; }
    .certs-grid { grid-template-columns: repeat(4, 1fr); }
    .cert-card { flex-direction: column; gap: 14px; }
    /* Balanced rows on wide screens: 4 | 3+2 | 2 */
    .projects-grid > .project-card:last-child:nth-child(odd) { grid-column: auto; }
    .grid-gov { grid-template-columns: repeat(4, 1fr); }
    .grid-corp { grid-template-columns: repeat(6, 1fr); }
    .grid-corp > .project-card { grid-column: span 2; }
    .projects-grid.grid-corp > .project-card:nth-child(n+4) { grid-column: span 3; }
    .timeline-item ul { max-width: 1100px; }
    .profile-card { max-width: 440px; }
}

/* Small laptop */
@media (max-width: 1140px) {
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 0.9rem; }
    .hero-title { font-size: 2.7rem; }
    .skill-cats { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet */
@media (max-width: 968px) {
    .content-wrapper { padding: 100px 24px 0; }
    .nav-container { padding: 0 24px; }

    /* Hamburger menu */
    .nav-toggle { display: inline-grid; place-items: center; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 24px 16px;
        background: #07060f;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    }
    .navbar.menu-open { background: #07060f !important; }
    .navbar.menu-open .nav-links { display: flex; }
    .nav-links li { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
    .nav-links li:last-child { border-bottom: none; }
    .nav-links a { display: block; padding: 14px 4px; font-size: 1rem; }

    /* Hero */
    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 30px 0 70px;
        gap: 50px;
    }
    .hero-left { text-align: center; }
    .hero-title { font-size: 2.5rem; margin-left: auto; margin-right: auto; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-buttons, .hero-certs, .tech-icons { justify-content: center; }
    .hero-right { order: 1; }
    .profile-card { margin: 0 auto; max-width: 460px; }

    /* Sections */
    .about-section { grid-template-columns: 1fr; gap: 40px; padding: 70px 0; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .stat-card { padding: 20px 12px; }
    .stat-card h3 { font-size: 1.6rem; }
    .certs-section, .experience-section, .education-section,
    .skills-section, .projects-section { padding: 70px 0; }
    .section-title { font-size: 1.75rem; margin-bottom: 30px; }
    .certs-grid, .skill-cats { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

    /* Footer */
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
}

/* Phone */
@media (max-width: 640px) {
    .content-wrapper { padding: 84px 16px 0; }
    .nav-container { padding: 0 16px; }
    .navbar { padding: 12px 0; }
    .nav-links { padding: 4px 16px 12px; }
    .logo { font-size: 1.05rem; white-space: nowrap; }
    .logo-mark { width: 30px; height: 30px; font-size: 0.75rem; }
    .nav-btn { padding: 9px 14px; font-size: 0.85rem; white-space: nowrap; }
    .nav-btn-label { display: none; }

    .hero-section { padding: 20px 0 56px; gap: 40px; }
    .hero-badge { font-size: 0.62rem; letter-spacing: 0.5px; padding: 5px 10px; display: inline-block; }
    .hero-title { font-size: 2rem; min-height: 3.5em; }
    .hero-subtitle { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: stretch; gap: 12px; }
    .hero-buttons .btn { justify-content: center; }
    .hero-certs span { font-size: 0.72rem; padding: 5px 10px; }
    .tech-icons { gap: 16px; font-size: 1.4rem; }
    .profile-card { padding: 22px; }

    .about-section { padding: 56px 0; }
    .about-content h2 { font-size: 1.6rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .certs-section, .experience-section, .education-section,
    .skills-section, .projects-section { padding: 56px 0; }
    .section-title { font-size: 1.5rem; margin-bottom: 24px; }
    .certs-grid, .skill-cats, .projects-grid { grid-template-columns: 1fr; }
    .projects-grid > .project-card:last-child:nth-child(odd) { grid-column: auto; }
    .cert-card, .edu-card, .skill-cat { padding: 18px; }
    .pipeline { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
    .pipe-track { display: none; }
    .pipe-icon { width: 54px; height: 54px; font-size: 1.25rem; border-radius: 14px; }
    .terminal-body { font-size: 0.72rem; height: 330px; padding: 14px; }
    .scroll-cue { display: none; }
    .marquee-track span { font-size: 0.85rem; padding: 10px 14px; }
    .pipeline-section { padding: 56px 0; }
    .section-lead { margin: -14px 0 30px; font-size: 0.95rem; }
    .project-card.compact .project-details { padding: 20px; }
    .proj-group-title { font-size: 1rem; }

    .timeline { padding-left: 22px; }
    .timeline-item::before { left: -30px; width: 12px; height: 12px; }
    .timeline-item h3 { font-size: 1.1rem; }
    .timeline-item ul { font-size: 0.9rem; }

    .cta-box h2 { font-size: 1.5rem; }
    .cta-box .hero-buttons { flex-direction: column; align-items: stretch; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* Very small phones */
@media (max-width: 360px) {
    .logo-text { display: none; }
    .hero-title { font-size: 1.8rem; }
}
