/* ============================================================
   MUZAMMIL SHAH PORTFOLIO — 2026 Premium Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
    --bg-primary: #08090f;
    --bg-secondary: #0d0f1a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.4);

    --accent-1: #6366f1;
    /* indigo */
    --accent-2: #8b5cf6;
    /* violet */
    --accent-3: #06b6d4;
    /* cyan   */
    --accent-grd: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #475569;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

    --nav-width: 80px;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 4px;
}

/* ─── Spinner ───────────────────────────────────────────────── */
#spinner {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity .5s ease, visibility 0s linear .5s;
}

#spinner.hide {
    opacity: 0;
    visibility: hidden;
    transition-delay: .5s, .5s;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Side Navigation ────────────────────────────────────────── */
.side-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--nav-width);
    height: 100vh;
    background: rgba(8, 9, 15, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1000;
}

.side-nav .nav-logo {
    position: absolute;
    top: 24px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    background: var(--accent-grd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.side-nav .nav-item {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 16px;
    transition: all .3s ease;
    cursor: pointer;
}

.side-nav .nav-item:hover,
.side-nav .nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.side-nav .nav-item .nav-tooltip {
    position: absolute;
    left: calc(100% + 12px);
    background: rgba(13, 15, 26, 0.95);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all .2s ease;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.side-nav .nav-item:hover .nav-tooltip {
    opacity: 1;
    transform: translateX(4px);
}

.side-nav .nav-social {
    position: absolute;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Prevent sidebar overlap on small heights */
@media (max-height: 750px) {
    .side-nav {
        justify-content: flex-start;
        padding-top: 80px;
        overflow-y: auto;
    }

    .side-nav::-webkit-scrollbar {
        width: 0;
    }

    .side-nav .nav-social {
        position: relative;
        bottom: auto;
        margin-top: 32px;
        margin-bottom: 24px;
    }
}

.side-nav .nav-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    transition: all .3s ease;
}

.side-nav .nav-social a:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.1);
}

/* ─── Main Content Wrapper ───────────────────────────────────── */
.main-wrapper {
    margin-left: var(--nav-width);
    min-height: 100vh;
}

/* ─── Noise Texture Overlay ──────────────────────────────────── */
.main-wrapper::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
}

/* ─── Gradient Orbs (ambient light) ─────────────────────────── */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: .35;
}

/* ─── Section Wrapper ─────────────────────────────────────────── */
.section {
    padding: 100px 30px;
    position: relative;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent-1);
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--accent-grd);
    border-radius: 2px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

/* ─── HERO SECTION ────────────────────────────────────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 30px;
    position: relative;
    overflow: hidden;
}

#hero .orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

#hero .orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
    bottom: -100px;
    left: 200px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-1);
    margin-bottom: 28px;
    animation: fadeInUp .6s ease both;
}

.hero-badge .dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .6;
        transform: scale(.8);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    animation: fadeInUp .6s .1s ease both;
}

.hero-title .highlight {
    background: var(--accent-grd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
    animation: fadeInUp .6s .2s ease both;
    min-height: 2.2em;
}

.hero-role .typed-text {
    color: var(--accent-3);
    border-right: 2px solid var(--accent-3);
    padding-right: 4px;
    animation: blink .7s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 40px;
    animation: fadeInUp .6s .3s ease both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp .6s .4s ease both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--accent-grd);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background .3s;
}

.btn-primary:hover::before {
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .3s ease;
}

.btn-secondary:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    animation: fadeInUp .6s .5s ease both;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--accent-grd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-top: 4px;
}

.hero-img-wrap {
    position: absolute;
    right: 60px;
    top: 25%;
    transform: translateY(-50%);
    z-index: 2;
    animation: fadeInRight .8s .3s ease both;
}

.hero-img-ring {
    width: 270px;
    height: 360px;
    border-radius: 180px;
    padding: 4px;
    background: var(--accent-grd);
    position: relative;
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
}

.hero-img-inner {
    width: 100%;
    height: 100%;
    border-radius: 180px;
    background: var(--bg-secondary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img-ring::after {
    content: '';
    position: absolute;
    inset: -15px;
    border-radius: 195px;
    border: 1px dashed rgba(99, 102, 241, 0.4);
    animation: floatOval 6s ease-in-out infinite;
}

@keyframes floatOval {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ─── ABOUT SECTION ──────────────────────────────────────────── */
#about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.info-item {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all .3s ease;
}

.info-item:hover {
    border-color: var(--accent-1);
    background: var(--bg-card-hover);
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-value a {
    color: var(--accent-1);
}

.info-value a:hover {
    text-decoration: underline;
}

/* Availability badge */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 24px;
}

/* ─── EXPERIENCE SECTION ─────────────────────────────────────── */
#experience {
    position: relative;
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-2), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding: 0 0 48px 36px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-1);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.6);
}

.timeline-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 8px;
}

.timeline-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all .3s ease;
}

.timeline-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow);
    transform: translateX(4px);
}

.timeline-role {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-3);
    margin-bottom: 16px;
}

.timeline-desc {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-desc li {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.timeline-desc li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-1);
    font-size: 12px;
}

/* ─── SKILLS SECTION ──────────────────────────────────────────── */
#skills {
    background: var(--bg-secondary);
}

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

.skill-category {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all .3s ease;
}

.skill-category:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.skill-category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    font-size: 22px;
    margin-bottom: 16px;
}

.skill-category-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all .2s ease;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-1);
    color: var(--accent-1);
}

/* ─── PROJECTS SECTION ───────────────────────────────────────── */

.projects-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
}

.filter-btn.active,
.filter-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 24px;
}

.project-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all .35s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-grd);
    transform: scaleX(0);
    transition: transform .3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-6px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    font-size: 20px;
}

.project-links {
    display: flex;
    gap: 8px;
}

.project-link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    transition: all .2s ease;
}

.project-link:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.1);
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 20px;
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tag {
    padding: 3px 10px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-3);
    letter-spacing: .03em;
}

/* ─── EDUCATION SECTION ────────────────────────────────────────── */
#education {
    background: var(--bg-secondary);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.education-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.education-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.education-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.edu-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.edu-degree {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.edu-institution {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-1);
    margin-bottom: 8px;
}

.edu-period {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.edu-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 12px;
}

/* ─── CERTIFICATIONS SECTION ────────────────────────────────────── */

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

.cert-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all .3s ease;
}

.cert-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.cert-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    font-size: 22px;
    flex-shrink: 0;
}

.cert-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cert-issuer {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── CONTACT SECTION ────────────────────────────────────────────── */
#contact {
    background: var(--bg-secondary);
}

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

.contact-info-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all .3s ease;
}

.contact-info-item:hover {
    border-color: var(--accent-1);
    background: var(--bg-card-hover);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    font-size: 20px;
    color: var(--accent-1);
    flex-shrink: 0;
}

.contact-item-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 4px;
}

.contact-item-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Contact Form */
.contact-form {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.form-heading {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
}

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

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    transition: all .3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-1);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

/* ─── FOOTER ────────────────────────────────────────────────────── */
footer {
    padding: 40px 60px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--accent-grd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.footer-socials a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 15px;
    transition: all .3s ease;
}

.footer-socials a:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.1);
}

/* ─── Back to Top ───────────────────────────────────────────────── */
.back-to-top {
    display: none !important;
}

.back-to-top.show {
    display: none !important;
}

.back-to-top:hover {
    display: none !important;
}

/* ─── Animations ───────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ─── RESPONSIVE ───────────────────────────────────────────────── */

/* ── Large Tablet / Small Desktop (≤ 1200px) ── */
@media (max-width: 1200px) {
    .hero-title {
        font-size: clamp(2.2rem, 5vw, 3.4rem);
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

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

/* ── Tablet Landscape / Small Desktop (≤ 1024px) ── */
@media (max-width: 1024px) {
    :root {
        --nav-width: 70px;
    }

    .hero-img-wrap {
        display: none;
    }

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

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

    .section {
        padding: 80px 40px;
    }

    #hero {
        padding: 80px 40px;
        min-height: 100vh;
    }

    .hero-stats {
        gap: 28px;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 11px;
    }

    .education-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

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

/* ── Tablet Portrait (≤ 768px) — Bottom Nav ── */
@media (max-width: 768px) {

    /* --- Side nav → bottom bar --- */
    .side-nav {
        width: 100%;
        height: 60px;
        top: auto;
        bottom: 0;
        left: 0;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        border-right: none;
        border-top: 1px solid var(--border);
        padding: 0 8px;
        gap: 0;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }

    .side-nav .nav-logo,
    .side-nav .nav-social {
        display: none;
    }

    .side-nav .nav-item {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        font-size: 15px;
    }

    .side-nav .nav-item .nav-tooltip {
        display: none;
    }

    /* --- Main wrapper --- */
    .main-wrapper {
        margin-left: 0;
        padding-bottom: 68px;
    }

    /* --- Sections --- */
    .section {
        padding: 64px 20px;
    }

    #hero {
        padding: 60px 20px 60px;
        min-height: auto;
    }

    footer {
        padding: 28px 20px;
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    /* --- Hero --- */
    .hero-title {
        font-size: clamp(2.4rem, 9vw, 3.4rem);
        letter-spacing: -0.02em;
    }

    .hero-role {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }

    .hero-desc {
        font-size: 0.98rem;
    }

    .hero-badge {
        font-size: 12px;
        padding: 6px 14px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-top: 40px;
        padding-top: 32px;
    }

    .stat-item {
        text-align: center;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 10px;
    }

    /* --- Section typography --- */
    .section-title {
        font-size: clamp(1.7rem, 6vw, 2.4rem);
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* --- About --- */
    .about-grid {
        gap: 32px;
    }

    .about-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .info-item {
        padding: 12px;
    }

    .info-value {
        font-size: 13px;
    }

    .mlsa-badge {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 14px;
    }

    /* --- Timeline --- */
    .timeline {
        padding-left: 24px;
    }

    .timeline-item {
        padding: 0 0 36px 28px;
    }

    .timeline-card {
        padding: 20px;
    }

    .timeline-role {
        font-size: 1.05rem;
    }

    .timeline-desc li {
        font-size: 13px;
    }

    /* --- Skills --- */
    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .skill-category {
        padding: 20px;
    }

    /* --- Projects --- */
    .projects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .project-card {
        padding: 20px;
    }

    .projects-filter {
        gap: 6px;
    }

    .filter-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    /* --- Education --- */
    .education-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .education-card {
        padding: 24px;
    }

    /* --- Certs --- */
    .certs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .cert-card {
        padding: 16px;
        gap: 12px;
    }

    .cert-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .cert-name {
        font-size: 13px;
    }

    .cert-issuer {
        font-size: 11px;
    }

    /* --- Contact --- */
    .contact-grid {
        gap: 32px;
    }

    .contact-form {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-info-items {
        gap: 12px;
    }

    .contact-info-item {
        padding: 16px;
    }

    /* --- Back to Top (above bottom nav) --- */
    .back-to-top {
        bottom: 76px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

/* ── Mobile (≤ 576px) ── */
@media (max-width: 576px) {
    .section {
        padding: 56px 16px;
    }

    #hero {
        padding: 70px 16px 50px;
    }

    .hero-title {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .hero-role {
        font-size: 1rem;
    }

    .hero-desc {
        font-size: 0.93rem;
        line-height: 1.7;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-top: 32px;
        padding-top: 24px;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    /* One column for skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* One column for projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* One column for certs */
    .certs-grid {
        grid-template-columns: 1fr;
    }

    /* About info 1 col */
    .about-info-grid {
        grid-template-columns: 1fr;
    }

    /* Timeline adjustments */
    .timeline::before {
        display: none;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline-item {
        padding: 0 0 28px 0;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-period {
        background: rgba(99, 102, 241, 0.08);
        border: 1px solid rgba(99, 102, 241, 0.2);
        border-radius: 8px;
        padding: 6px 12px;
        margin-bottom: 12px;
        font-size: 11px;
    }

    /* Project filter: wrap & smaller */
    .projects-filter {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* Contact form minimal padding */
    .contact-form {
        padding: 18px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    /* Footer stacked */
    footer {
        gap: 14px;
        padding: 24px 16px;
    }

    .footer-brand {
        font-size: 1.1rem;
    }

    .footer-copy {
        font-size: 12px;
    }

    /* Education */
    .education-grid {
        grid-template-columns: 1fr;
    }

    .education-card {
        padding: 20px;
    }

    .edu-degree {
        font-size: 1.05rem;
    }

    /* Side nav spacing adjustments */
    .side-nav {
        padding: 0 4px;
    }

    .side-nav .nav-item {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

/* ── Small Mobile (≤ 400px) ── */
@media (max-width: 400px) {
    .hero-title {
        font-size: clamp(1.8rem, 12vw, 2.6rem);
    }

    .hero-cta {
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .section {
        padding: 50px 14px;
    }

    .side-nav .nav-item {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .timeline-card {
        padding: 16px;
    }

    .skill-tag {
        font-size: 11px;
        padding: 4px 10px;
    }

    .tech-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ─── Featured project highlight ───────────────────────────────── */
.project-card.featured {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.05);
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-top: 12px;
}

/* ─── MLSA badge ─────────────────────────────────────────────── */
.mlsa-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 120, 212, 0.1);
    border: 1px solid rgba(0, 120, 212, 0.3);
    border-radius: 12px;
    margin-top: 20px;
}

.mlsa-badge img {
    height: 20px;
}

.mlsa-badge span {
    font-size: 13px;
    font-weight: 700;
    color: #4fc3f7;
}