/* ---------- Global Reset + Theme Variables ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: #ffffff;
    --muted-text: rgba(255, 255, 255, 0.78);
    --main-color: #00ffee;
    --gradient-main: linear-gradient(135deg, #00ffee, #2d8ab8);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --dark-card: #111111;
    --glow-soft: rgba(0, 255, 238, 0.3);
    --glow-medium: rgba(0, 255, 238, 0.45);
    --border-soft: rgba(0, 255, 238, 0.35);
}

:root.light-theme {
    --bg-color: #ffffff;
    --second-bg-color: #f0f0f0;
    --text-color: #000000;
    --muted-text: rgba(0, 0, 0, 0.7);
    --main-color: #0077cc;
    --gradient-main: linear-gradient(135deg, #0077cc, #2d8ab8);
    --glass-bg: rgba(0, 0, 0, 0.04);
    --dark-card: #ffffff;
    --glow-soft: rgba(0, 119, 204, 0.25);
    --glow-medium: rgba(0, 119, 204, 0.35);
    --border-soft: rgba(0, 119, 204, 0.32);
}

html {
    font-size: 60%;
    overflow-x: hidden;
    scroll-padding-top: 110px;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

section {
    min-height: 100vh;
    padding: 10rem 12%;
    position: relative;
    z-index: 2;
}

span {
    color: var(--main-color);
}

.heading {
    font-size: clamp(4.8rem, 6vw, 8rem);
    text-align: center;
    margin: 5rem 0;
    color: var(--text-color);
}

.heading span,
.logo span {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffee, #2d8ab8);
    border-radius: 20px;
    border: 2px solid #050505;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ffee;
}

/* ---------- Loading Screen ---------- */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 255, 238, 0.12), transparent 30%),
        linear-gradient(135deg, #050505 0%, #080808 55%, #101010 100%);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#page-loader.hide-loader {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    width: min(460px, 82vw);
    text-align: center;
    position: relative;
    z-index: 2;
}

.loader-kicker {
    color: var(--main-color);
    font-size: 1.1rem;
    letter-spacing: 0.55rem;
    margin-bottom: 1.8rem;
    opacity: 0.8;
}

.loader-content h1 {
    font-size: clamp(3.8rem, 6vw, 6.5rem);
    letter-spacing: 0.45rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px var(--glow-soft);
    margin-bottom: 2.6rem;
    animation: loaderGlow 2.5s ease-in-out infinite;
}

@keyframes loaderGlow {

    0%,
    100% {
        text-shadow: 0 0 30px var(--glow-soft);
    }

    50% {
        text-shadow: 0 0 40px var(--glow-medium);
    }
}

.loader-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10rem;
    overflow: hidden;
}

.loader-track span {
    display: block;
    width: 0%;
    height: 100%;
    background: var(--gradient-main);
    box-shadow: 0 0 22px var(--main-color);
    transition: width 0.15s linear;
}

.loader-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1.4rem;
    color: var(--text-color);
    font-size: 1.1rem;
    letter-spacing: 0.45rem;
    animation: fadeMeta 1.4s ease-in-out infinite alternate;
}

@keyframes fadeMeta {
    0% {
        opacity: 0.45;
    }

    100% {
        opacity: 0.85;
    }
}

.loader-orbit {
    position: absolute;
    width: min(440px, 82vw);
    height: min(440px, 82vw);
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 238, 0.12);
    animation: orbitSpin 9s linear infinite;
}

.loader-orbit span {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--main-color);
    box-shadow: 0 0 22px var(--main-color);
}

.loader-orbit span:first-child {
    top: 35px;
    left: 82px;
}

.loader-orbit span:last-child {
    right: 45px;
    bottom: 70px;
    opacity: 0.55;
}

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

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3.2rem 12%;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
    white-space: nowrap;
}

.logo:hover {
    transform: scale(1.06);
}

.logo span {
    text-shadow: 0 0 25px var(--main-color);
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar a {
    font-size: 1.75rem;
    color: var(--text-color);
    margin-left: 2.6rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}

#menu-icon {
    font-size: 3.8rem;
    color: var(--main-color);
    display: none;
    cursor: pointer;
}

/* ---------- Theme Dropdown ---------- */
.theme-dropdown {
    position: relative;
    display: inline-block;
}

.theme-btn {
    padding: 1rem 2.8rem;
    background: var(--main-color);
    color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.1rem;
    cursor: pointer;
    box-shadow: 0 0 25px var(--main-color);
    transition: 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px var(--main-color);
}

.theme-menu {
    position: absolute;
    top: 140%;
    right: 0;
    width: 180px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--main-color);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s ease;
    z-index: 999;
}

.theme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    padding: 1.4rem 2rem;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-option:last-child {
    border-bottom: none;
}

.theme-option:hover {
    background: var(--main-color);
    color: #000;
    padding-left: 2.5rem;
}

.theme-option.active-theme {
    background: rgba(0, 255, 255, 0.12);
    color: var(--main-color);
    font-weight: 700;
}

/* ---------- Hero ---------- */
.home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(7rem, 9vw, 15rem);
}

.home-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    justify-content: center;
    margin-top: 3rem;
    max-width: 720px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.5rem;
    margin-bottom: 1.8rem;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--glass-bg);
    color: var(--main-color);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.16rem;
    box-shadow: 0 0 22px rgba(0, 255, 238, 0.08);
}

.hero-eyebrow i {
    font-size: 1.8rem;
}

.home-content h1 {
    font-size: clamp(5.6rem, 5vw, 7rem);
    font-weight: 800;
    margin-top: 1.5rem;
    line-height: 1;
}

.home-content h3 {
    margin: 1rem 0 2rem;
    font-size: clamp(2.8rem, 3vw, 3.5rem);
}

.home-content p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
    color: var(--text-color);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.8rem;
}

.hero-btn,
.contact-btn,
.dashboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.35s ease;
}

.hero-btn {
    padding: 1.25rem 2.4rem;
    font-size: 1.55rem;
    letter-spacing: 0.05rem;
}

.hero-btn i {
    font-size: 2.1rem;
}

.primary-hero-btn {
    background: var(--main-color);
    color: #000;
    box-shadow: 0 0 22px var(--glow-soft);
}

.outline-hero-btn {
    color: var(--main-color);
    border: 2px solid var(--main-color);
    background: var(--glass-bg);
}

.hero-btn:hover,
.contact-btn:hover,
.dashboard-btn:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 0 32px var(--main-color);
}

.home-img {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    perspective: 1000px;
    isolation: isolate;
}

.home-img img {
    position: relative;
    width: clamp(310px, 32vw, 580px);
    height: clamp(310px, 32vw, 580px);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.35s ease;
}

.home-img:hover img {
    box-shadow:
        0 0 25px var(--main-color),
        0 0 55px var(--main-color),
        0 0 100px rgba(0, 255, 238, 0.45);
}

.image-ring {
    position: absolute;
    width: clamp(345px, 35vw, 630px);
    height: clamp(345px, 35vw, 630px);
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 238, 0.28);
    z-index: -1;
    animation: ringPulse 4.5s ease-in-out infinite;
}

.ring-two {
    width: clamp(385px, 39vw, 700px);
    height: clamp(385px, 39vw, 700px);
    border-style: dashed;
    opacity: 0.45;
    animation: ringRotate 18s linear infinite;
}

.home-img::before {
    content: "";
    position: absolute;
    width: clamp(420px, 42vw, 760px);
    height: clamp(420px, 42vw, 760px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 238, 0.18), transparent 65%);
    filter: blur(18px);
    z-index: -2;
}

@keyframes ringPulse {

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

    50% {
        transform: scale(1.03);
        opacity: 0.75;
    }
}

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

/* ---------- Typing Animation ---------- */
.text-animation {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.text-animation span {
    position: relative;
    color: var(--main-color);
}

#typed-role::after {
    content: "|";
    margin-left: 4px;
    color: var(--main-color);
    animation: cursorBlink 0.7s infinite;
}

@keyframes cursorBlink {
    50% {
        opacity: 0;
    }
}

/* ---------- Stats + Shared Cards ---------- */
.stats-container {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-box,
.about-card,
.skill-card,
.cert-card,
.project-card {
    background: var(--glass-bg);
    border: 2px solid var(--main-color);
    transition: 0.35s ease;
}

.stat-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 2rem 3rem;
    min-width: 180px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.13), transparent 80%);
    transform: translateX(-130%);
    transition: 0.6s ease;
}

.stat-box:hover::before {
    transform: translateX(130%);
}

.stat-box h2 {
    color: var(--main-color);
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-size: 1.25rem;
    color: var(--text-color);
    white-space: nowrap;
}

.stat-box:hover,
.about-card:hover,
.skill-card:hover,
.cert-card:hover,
.contact-btn:hover {
    transform: translateY(-9px) scale(1.03);
    box-shadow: 0 0 22px var(--main-color), 0 0 42px var(--glow-soft);
}

/* ---------- About ---------- */
.about,
.certifications {
    background: var(--second-bg-color);
}

.about-container,
.certifications-container {
    display: grid;
    gap: 2.5rem;
}

.about-container {
    grid-template-columns: repeat(3, 1fr);
}

.about-card,
.cert-card {
    border-radius: 28px;
    padding: 3rem 2.4rem;
    text-align: center;
}

.about-card i,
.cert-card i,
.skill-card i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.about-card h3,
.cert-card h3,
.skill-card h3 {
    font-size: 2.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.about-card p,
.cert-card p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* ---------- Education ---------- */
.education {
    background: var(--second-bg-color);
    padding: 10rem 12%;
}

.timeline-items {
    max-width: 1100px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    padding-bottom: 50px;
}

.timeline-items::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% - 1px);
    top: 0;
}

.timeline-item {
    margin-bottom: 40px;
    width: 100%;
    min-height: 210px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 30px);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 30px);
}

.timeline-dot {
    height: 21px;
    width: 21px;
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color), 0 0 50px var(--main-color);
    position: absolute;
    left: calc(50% - 10px);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-date {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 6px 0 15px;
}

.timeline-content {
    background-color: var(--bg-color);
    border: 3px solid var(--main-color);
    padding: 3rem 5rem;
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-color);
    cursor: pointer;
    transition: 0.3s ease-in-out;
    text-align: center;
}

.timeline-content:hover {
    transform: scale(1.04);
    box-shadow: 0 0 25px var(--main-color);
}

.timeline-content h3 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-color);
    font-size: 1.55rem;
    font-weight: 300;
    line-height: 1.55;
}

/* ---------- Skills ---------- */
.skills {
    background: var(--bg-color);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 2.4rem;
}

.skill-card {
    min-height: 205px;
    border-radius: 24px;
    padding: 2.6rem 2.2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--main-color);
    top: -65px;
    right: -65px;
    opacity: 0.1;
    transition: 0.35s ease;
}

.skill-card:hover::before {
    transform: scale(2.3);
    opacity: 0.16;
}

.skill-card i {
    margin-bottom: 1.2rem;
}

.skill-card h3 {
    margin-bottom: 1.4rem;
}

.skill-info {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
}

.skill-info span {
    color: var(--muted-text);
    font-size: 1.25rem;
    font-weight: 600;
}

.skill-info strong {
    color: var(--main-color);
    font-size: 1.35rem;
}

.skill-bar {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.skill-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient-main);
    box-shadow: 0 0 18px var(--main-color);
    transition: width 1.1s ease;
}

.skill-card.skill-visible .skill-bar span {
    width: var(--skill-level);
}

/* ---------- Certifications ---------- */
.certifications-container {
    grid-template-columns: repeat(4, 1fr);
}

.cert-card {
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--main-color);
    border-radius: 50%;
    top: -50px;
    right: -50px;
    opacity: 0.12;
    transition: 0.4s ease;
}

.cert-card:hover::before {
    transform: scale(2.5);
    opacity: 0.2;
}

.cert-card:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* ---------- Projects ---------- */
.projects {
    background: var(--bg-color);
}

.projects .heading {
    margin-bottom: 1.2rem;
}

.projects-subtitle,
.section-subtitle {
    max-width: 760px;
    margin: 0 auto 4.5rem;
    text-align: center;
    color: var(--muted-text);
    font-size: 1.6rem;
    line-height: 1.7;
}

.project-categories {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.8rem;
}

.project-category-card {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 238, 0.72);
    border-radius: 28px;
    padding: 2.8rem;
    background:
        radial-gradient(circle at top right, rgba(0, 255, 238, 0.13), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(0, 255, 238, 0.028));
    box-shadow: 0 0 18px rgba(0, 255, 238, 0.08);
    transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}

.project-category-card::after {
    content: "";
    position: absolute;
    top: -90px;
    right: -90px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(0, 255, 238, 0.11);
    pointer-events: none;
    transition: 0.45s ease;
}

.project-category-card:hover {
    transform: translateY(-6px);
    border-color: var(--main-color);
    box-shadow: 0 0 26px rgba(0, 255, 238, 0.22), 0 0 55px rgba(0, 255, 238, 0.08);
}

.project-category-card:hover::after {
    transform: scale(1.12);
    opacity: 0.85;
}

.category-header {
    position: relative;
    z-index: 2;
    text-align: center;
    cursor: default;
}

.category-header i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 0.9rem;
    filter: drop-shadow(0 0 12px rgba(0, 255, 238, 0.45));
}

.category-kicker {
    display: block;
    color: var(--main-color);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.24rem;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.category-header h3 {
    font-size: clamp(2.6rem, 3vw, 3.4rem);
    color: var(--text-color);
    margin-bottom: 0.8rem;
}

.category-header p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted-text);
    font-size: 1.45rem;
    line-height: 1.65;
}

.category-projects {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transform: translateY(22px);
    transition: max-height 0.6s ease, opacity 0.45s ease, transform 0.45s ease, margin-top 0.45s ease;
}

.project-category-card:hover .category-projects {
    max-height: 380px;
    opacity: 1;
    margin-top: 2.8rem;
    transform: translateY(0);
}

.project-category-card.active .category-projects {
    max-height: 1200px;
    opacity: 1;
    margin-top: 2.8rem;
    transform: translateY(0);
}

.category-projects.two-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    position: relative;
    min-height: 210px;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    background: #0b0b0b;
    border: 1.5px solid rgba(0, 255, 238, 0.55);
    box-shadow: 0 0 16px rgba(0, 255, 238, 0.08);
    isolation: isolate;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.project-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: var(--main-color);
    box-shadow: 0 0 24px rgba(0, 255, 238, 0.28);
}

.project-preview {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(0, 255, 238, 0.12), rgba(255, 255, 255, 0.035)),
        #0d0d0d;
}

.project-preview::before {
    content: attr(data-placeholder);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--main-color);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08rem;
    opacity: 0.78;
}

.project-preview img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease, opacity 0.35s ease, filter 0.35s ease;
}

.project-preview img.missing-image {
    opacity: 0;
}

.project-card:hover .project-preview img:not(.missing-image) {
    transform: scale(1.06);
    filter: brightness(0.88) contrast(1.08);
}

.project-card::before {
    content: "Click to Explore";
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    z-index: 4;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(0, 255, 238, 0.5);
    color: var(--main-color);
    font-size: 1.1rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(-8px);
    transition: 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.project-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 3;
    padding: 1.7rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.96));
    color: white;
}

.project-overlay span {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(0, 255, 238, 0.13);
    border: 1px solid rgba(0, 255, 238, 0.45);
    color: var(--main-color);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
}

.project-overlay h3 {
    font-size: 2rem;
    color: var(--main-color);
    line-height: 1.15;
}

.project-overlay p {
    color: white;
    font-size: 1.25rem;
    margin-top: 0.35rem;
}

.project-icon {
    font-size: 3.5rem;
    background: var(--main-color);
    color: black;
    padding: 1rem;
    border-radius: 50%;
    margin-bottom: 1rem;
    transition: 0.3s ease;
}

.empty-project {
    min-height: 210px;
    border: 1.5px dashed var(--main-color);
    border-radius: 22px;
    padding: 3rem;
    text-align: center;
    color: var(--text-color);
    background: rgba(0, 255, 238, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-project i {
    font-size: 4.5rem;
    color: var(--main-color);
    margin-bottom: 1.2rem;
}

.empty-project h4 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.empty-project p {
    max-width: 520px;
    color: var(--muted-text);
    font-size: 1.4rem;
    line-height: 1.6;
}

@media (max-width: 991px) {
    .project-category-card {
        padding: 2.4rem;
    }

    .category-projects,
    .category-projects.two-projects {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .project-category-card:hover .category-projects,
    .project-category-card.active .category-projects {
        max-height: 1200px;
    }

    .project-preview {
        height: 240px;
    }
}

@media (max-width: 600px) {

    .projects-subtitle,
    .section-subtitle {
        font-size: 1.45rem;
        margin-bottom: 3rem;
    }

    .project-category-card {
        padding: 2rem;
        border-radius: 22px;
    }

    .category-header h3 {
        font-size: 2.55rem;
    }

    .category-header p {
        font-size: 1.35rem;
    }

    .project-preview {
        height: 205px;
    }

    .project-overlay h3 {
        font-size: 1.75rem;
    }
}

/* ---------- Project Modal ---------- */


.project-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    width: 100%;
    height: 100vh;
    padding: 2rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 10%, rgba(0, 255, 238, 0.13), transparent 28%),
        rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.project-modal-content {
    position: relative;

    width: min(1200px, 92vw);
    max-height: 90vh;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 3rem;

    border-radius: 2.6rem;
    border: 1px solid rgba(0, 255, 238, 0.42);

    background:
        radial-gradient(circle at top right,
            rgba(0, 255, 238, 0.08),
            transparent 34%),
        linear-gradient(135deg,
            rgba(12, 12, 12, 0.97),
            rgba(18, 18, 18, 0.98));

    box-shadow:
        0 0 42px rgba(0, 255, 238, 0.14),
        0 0 120px rgba(0, 255, 238, 0.05);

    animation: fadeIn 0.3s ease;

    scrollbar-width: thin;
    scrollbar-color: var(--main-color) transparent;

    box-sizing: border-box;

    /* THIS FIXES THE OUTSIDE SCROLLBAR */
    scrollbar-gutter: stable;
}

.project-modal-content::-webkit-scrollbar {
    width: 7px;
}

.project-modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

.project-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
            var(--main-color),
            #2d8ab8);

    border-radius: 999px;
}

.project-modal-content h2 {
    color: var(--main-color);
    font-size: clamp(2.8rem, 3vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.15;
}

.project-modal-content p,
.project-modal-content li {
    font-size: 1.55rem;
    line-height: 1.72;
}

.project-modal-content h4 {
    font-size: 1.8rem;
    color: var(--main-color);
    margin: 2rem 0 1rem;
}

.close-btn {
    position: sticky;
    top: 0;
    margin-left: auto;
    margin-bottom: -4.2rem;
    z-index: 50;
    width: 4.2rem;
    height: 4.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--main-color);
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(0, 255, 238, 0.25);
    font-size: 3rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}

.close-btn:hover {
    background: rgba(0, 255, 238, 0.12);
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 0 18px rgba(0, 255, 238, 0.4);
}

.modal-grid {
    display: grid;
    grid-template-columns: minmax(340px, 0.92fr) minmax(460px, 1.08fr);
    gap: clamp(2.4rem, 4vw, 4.2rem);
    align-items: start;
}

.modal-left {
    padding-top: 0.4rem;
}

.modal-category {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.6rem;
    background: rgba(0, 255, 238, 0.08);
    color: var(--main-color);
    border: 1px solid var(--main-color);
    border-radius: 1rem;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 2.2rem;
}

.modal-domain {
    color: var(--main-color);
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 1.6rem;
}

.modal-buttons,
.project-badges,
.contact-buttons {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.modal-buttons {
    margin: 2.3rem 0 1.8rem;
}

.dashboard-btn {
    margin-top: 0;
    padding: 1.25rem 2.3rem;
    background: var(--main-color);
    color: black;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 255, 238, 0.2);
}

.secondary-btn {
    background: transparent;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    display: inline-flex;
    align-items: center;
    gap: .8rem;
}

.secondary-btn:hover {
    background: var(--main-color);
    color: black;
}

.project-badges {
    margin: 1.6rem 0 0;
}

.project-badges span {
    display: inline-flex;
    align-items: center;
    padding: 0.78rem 1.45rem;
    border: 1.5px solid var(--main-color);
    border-radius: 999px;
    color: var(--main-color);
    background: rgba(0, 255, 238, 0.035);
    font-size: 1.25rem;
    font-weight: 700;
    transition: 0.35s ease;
}

.project-badges span:hover {
    transform: translateY(-5px) scale(1.04);
    background: var(--main-color);
    color: black;
    box-shadow: 0 0 15px var(--main-color), 0 0 35px var(--glow-soft);
}

.modal-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.6rem;
}

.modal-image-wrapper {
    width: 100%;
    min-height: 290px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(1rem, 1.5vw, 1.5rem);
    border-radius: 2.2rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 255, 238, 0.12), transparent 62%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(0, 255, 238, 0.025));
    border: 1px solid rgba(0, 255, 238, 0.28);
    box-shadow:
        inset 0 0 26px rgba(0, 255, 238, 0.04),
        0 0 26px rgba(0, 255, 238, 0.08);
}

#modalImage {
    display: block;
    width: 100%;
    max-height: 390px;
    object-fit: contain;
    border-radius: 1.5rem;
    transition: transform 0.45s ease, box-shadow 0.45s ease, filter 0.45s ease;
}

#modalImage:hover {
    transform: scale(1.012);
    filter: brightness(1.04) contrast(1.04);
    box-shadow: 0 0 35px rgba(0, 255, 238, 0.16);
}

.dashboard-overview-card {
    width: 100%;
    padding: 1.8rem 2rem;
    border-radius: 1.8rem;
    background:
        linear-gradient(135deg, rgba(0, 255, 238, 0.065), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(0, 255, 238, 0.18);
}

.dashboard-overview-card>span {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--main-color);
    margin-bottom: 0.8rem;
}

.dashboard-overview-card i {
    font-size: 2rem;
}

.image-caption {
    margin: 0;
    text-align: left;
    font-size: 1.45rem;
    line-height: 1.7;
    color: var(--muted-text);
}

.modal-details {
    margin-top: 2.6rem;
    padding: 2.3rem 2.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(0, 255, 238, 0.16);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(0, 255, 238, 0.018));
}

.modal-details ul {
    padding-left: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem 2rem;
}

.modal-details li {
    position: relative;
    margin-bottom: 0;
    padding-left: 2.2rem;
}

.modal-details li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: var(--main-color);
    font-weight: 900;
}

@media (max-width: 1050px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-image-wrapper {
        min-height: unset;
    }

    #modalImage {
        max-height: 330px;
    }

    .modal-details ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .project-modal {
        padding: 1rem;
        align-items: flex-start;
    }

    .project-modal-content {
        width: 100%;
        height: 94vh;
        padding: 1.7rem;
        border-radius: 2rem;
    }

    .close-btn {
        width: 3.8rem;
        height: 3.8rem;
        font-size: 2.6rem;
    }

    .dashboard-btn {
        width: 100%;
    }

    #modalImage {
        max-height: 250px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.project-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.project-category-card {
    border: 2px solid var(--main-color);
    border-radius: 28px;
    background: var(--glass-bg);
    padding: 3rem;
    overflow: hidden;
    transition: 0.45s ease;
}

.project-category-card:hover {
    box-shadow: 0 0 35px rgba(0, 255, 238, 0.25);
    transform: translateY(-6px);
}

.category-header {
    text-align: center;
    cursor: pointer;
}

.category-header i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.category-header h3 {
    font-size: 3rem;
    color: var(--text-color);
}

.category-header p {
    font-size: 1.5rem;
    color: var(--muted-text);
    margin-top: 0.8rem;
}

.category-projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(20px);
    transition: 0.55s ease;
}

.project-category-card:hover .category-projects {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 3rem;
}

.empty-project {
    border: 1.5px dashed var(--main-color);
    border-radius: 22px;
    padding: 3rem;
    text-align: center;
    color: var(--text-color);
    background: rgba(0, 255, 238, 0.04);
}

.empty-project i {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.empty-project h4 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.empty-project p {
    font-size: 1.4rem;
    color: var(--muted-text);
}

@media (max-width: 991px) {
    .category-projects {
        grid-template-columns: 1fr;
    }

    .project-category-card:hover .category-projects {
        max-height: 1200px;
    }
}

/* ---------- Contact + Footer ---------- */
.contact {
    background: var(--bg-color);
    text-align: center;
}

.contact-subtitle {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-top: -2rem;
    margin-bottom: 4rem;
}

.contact-buttons {
    justify-content: center;
    align-items: center;
}

.contact-btn {
    min-width: 220px;
    padding: 1.6rem 2.5rem;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    background: var(--glass-bg);
    font-size: 1.6rem;
}

.contact-btn i {
    font-size: 2.4rem;
}

.contact-btn:hover {
    background: var(--main-color);
    color: black;
}

.footer {
    position: relative;
    width: 100%;
    padding: 4rem 0;
    background-color: var(--second-bg-color);
    z-index: 2;
}

.social-icons a,
.footer .social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    border-radius: 50%;
    transition: 0.3s ease-in-out;
}

.social-icons a {
    width: 4.5rem;
    height: 4.5rem;
    font-size: 2.5rem;
    margin: 3rem 1.5rem 3rem 0;
}

.footer .social {
    text-align: center;
    padding-bottom: 25px;
}

.footer .social a {
    width: 42px;
    height: 42px;
    font-size: 25px;
    margin: 0 10px;
}

.social-icons a:hover,
.footer .social a:hover {
    color: black;
    transform: scale(1.2) translateY(-8px);
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
}

.footer ul {
    font-size: 1.8rem;
    line-height: 1.6;
    text-align: center;
}

.footer ul li {
    display: inline-block;
    padding: 0 15px;
}

.footer ul li a {
    color: var(--text-color);
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}

.footer ul li a:hover {
    border-bottom: 3px solid var(--main-color);
}

.footer .copyright {
    margin-top: 5rem;
    text-align: center;
    font-size: 1.6rem;
    color: var(--text-color);
}

/* ---------- Reveal + Entrance Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.header,
.home-content>*,
.home-img {
    opacity: 0;
}

body.site-ready .header {
    animation: headerDrop 0.85s ease forwards;
}

body.site-ready .hero-eyebrow {
    animation: revealClip 0.85s ease forwards 0.15s;
}

body.site-ready .home-content h1 {
    animation: revealClip 0.85s ease forwards 0.28s;
}

body.site-ready .home-content h3 {
    animation: revealClip 0.85s ease forwards 0.42s;
}

body.site-ready .home-content p {
    animation: revealUpSoft 0.85s ease forwards 0.58s;
}

body.site-ready .hero-actions {
    animation: revealUpSoft 0.85s ease forwards 0.72s;
}

body.site-ready .stats-container {
    animation: revealUpSoft 0.85s ease forwards 0.86s;
}

body.site-ready .social-icons {
    animation: revealUpSoft 0.85s ease forwards 1s;
}

body.site-ready .home-img {
    animation: profileEntrance 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.45s;
}

@keyframes headerDrop {
    from {
        opacity: 0;
        transform: translateY(-35px);
    }

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

@keyframes revealClip {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: translateX(-18px);
    }

    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
    }
}

@keyframes revealUpSoft {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

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

@keyframes profileEntrance {
    from {
        opacity: 0;
        transform: translateX(70px) scale(0.86) rotate(3deg);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1) rotate(0);
        filter: blur(0);
    }
}

/* ---------- Responsive Design ---------- */
@media (max-width: 1285px) {
    html {
        font-size: 55%;
    }

    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 5rem;
    }
}

@media (max-width: 1100px) {
    .header {
        padding: 2.6rem 6%;
    }

    section {
        padding: 10rem 6%;
    }

    .home {
        gap: 6rem;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 4%;
    }

    section {
        padding: 9rem 4% 4rem;
    }

    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: min(320px, 70vw);
        padding: 1rem 3%;
        background: rgba(0, 0, 0, 0.86);
        backdrop-filter: blur(20px);
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
        border-bottom-left-radius: 2rem;
        display: none;
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar.active {
        display: flex;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 1.7rem 0;
        color: white;
    }

    .theme-btn {
        padding: 0.95rem 2.2rem;
    }

    .home {
        min-height: auto;
        flex-direction: column-reverse;
        align-items: center;
        justify-content: flex-start;
        gap: 4rem;
        padding-top: 14rem;
        text-align: center;
    }

    .home-content {
        align-items: center;
        text-align: center;
        margin-top: 0;
        max-width: 720px;
    }

    .home-content p {
        max-width: 640px;
        margin: 0 auto;
    }

    .hero-actions,
    .stats-container,
    .social-icons {
        justify-content: center;
    }

    .home-img {
        margin-top: 1rem;
        padding-bottom: 18rem;
    }

    .home-img img {
        width: min(58vw, 360px);
        height: min(58vw, 360px);
    }

    .image-ring {
        width: min(64vw, 400px);
        height: min(64vw, 400px);
    }

    .ring-two {
        width: min(72vw, 450px);
        height: min(72vw, 450px);
    }

    .home-img::before {
        width: min(78vw, 500px);
        height: min(78vw, 500px);
    }

    .timeline-items::before {
        left: 7px;
    }

    .timeline-item {
        min-height: auto;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 37px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-dot {
        left: 0;
    }

    .about-container,
    .certifications-container {
        grid-template-columns: 1fr 1fr;
    }

    .projects-container {
        grid-template-columns: 1fr;
        margin: 0;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 52%;
    }

    .header {
        padding: 1.8rem 3.5%;
    }

    .logo {
        font-size: 2.55rem;
    }

    .theme-btn {
        padding: 0.9rem 1.8rem;
        font-size: 1.45rem;
    }

    .home {
        padding-top: 13rem;
        gap: 3.2rem;
    }

    .home-content h1 {
        font-size: clamp(4.7rem, 12vw, 6rem);
    }

    .home-content h3,
    .text-animation {
        font-size: 2.65rem;
        min-width: 240px;
    }

    .home-content p {
        font-size: 1.45rem;
        line-height: 1.7;
    }

    .home-img img {
        width: min(64vw, 330px);
        height: min(64vw, 330px);
    }

    .image-ring {
        width: min(72vw, 370px);
        height: min(72vw, 370px);
    }

    .ring-two {
        width: min(82vw, 420px);
        height: min(82vw, 420px);
    }

    .hero-actions,
    .stats-container,
    .contact-buttons {
        width: 100%;
    }

    .hero-btn,
    .contact-btn {
        width: 100%;
        max-width: 320px;
    }

    .stat-box {
        width: 100%;
        max-width: 320px;
    }

    .about-container,
    .certifications-container {
        grid-template-columns: 1fr;
    }

    .timeline-content {
        padding: 2.4rem;
        border-radius: 2.6rem;
    }

    .skill-card {
        min-height: 190px;
    }

    .footer ul li {
        padding: 0 8px;
    }

    .project-modal-content {
        padding: 2.8rem 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }

    #page-loader {
        display: none;
    }

    .header,
    .home-content>*,
    .home-img {
        opacity: 1;
    }

    body.loading {
        overflow: auto;
    }
}


/* =========================================================
   PREMIUM INTERACTION UPGRADE LAYER
   ========================================================= */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 238, 0.16), transparent 62%);
    filter: blur(18px);
    pointer-events: none;
    opacity: 0;
    z-index: 9998;
    transition: opacity 0.35s ease, width 0.25s ease, height 0.25s ease;
    mix-blend-mode: screen;
}

.cursor-glow.cursor-active {
    opacity: 1;
}

.cursor-glow.cursor-strong {
    width: 320px;
    height: 320px;
    opacity: 0.85;
}

.analytics-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.45;
}

.analytics-ambient::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 238, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 238, 0.035) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at 50% 20%, black, transparent 70%);
}

.analytics-ambient span {
    position: absolute;
    width: 380px;
    height: 160px;
    border-left: 1px solid rgba(0, 255, 238, 0.15);
    border-bottom: 1px solid rgba(0, 255, 238, 0.15);
    border-radius: 0 0 0 18px;
    opacity: 0.35;
    animation: ambientFloat 9s ease-in-out infinite;
}

.analytics-ambient span:nth-child(1) {
    right: 6%;
    top: 20%;
}

.analytics-ambient span:nth-child(2) {
    left: 8%;
    bottom: 18%;
    transform: scale(0.75);
    animation-delay: 1.5s;
}

.analytics-ambient span:nth-child(3) {
    right: 25%;
    bottom: 8%;
    transform: scale(0.55);
    animation-delay: 3s;
}

.analytics-ambient span::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: 38px;
    height: 4px;
    background: var(--gradient-main);
    clip-path: polygon(0 85%, 18% 60%, 34% 70%, 52% 35%, 70% 50%, 100% 12%, 100% 28%, 70% 66%, 52% 50%, 34% 86%, 18% 76%, 0 100%);
    box-shadow: 0 0 16px rgba(0, 255, 238, 0.35);
}

@keyframes ambientFloat {

    0%,
    100% {
        translate: 0 0;
        opacity: 0.22;
    }

    50% {
        translate: 0 -18px;
        opacity: 0.42;
    }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        radial-gradient(circle at 18% 22%, rgba(0, 255, 238, 0.10), transparent 28%),
        radial-gradient(circle at 85% 72%, rgba(45, 138, 184, 0.12), transparent 32%);
}

.about-card,
.skill-card,
.cert-card,
.stat-box,
.project-card,
.assistant-card,
.story-step,
.project-modal-content {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
    border-color: rgba(0, 255, 238, 0.32);
}

.magnetic {
    will-change: transform;
}

.counter {
    font-variant-numeric: tabular-nums;
}

.project-card {
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform 0.18s ease, box-shadow 0.35s ease;
}

.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255, 255, 255, 0.28), transparent 30%);
    transition: opacity 0.3s ease;
}

.project-card:hover::after {
    opacity: 1;
}

.project-overlay {
    transform: translateY(8px);
    transition: transform 0.35s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-preview-pill {
    display: inline-flex;
    margin-top: 1rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid rgba(0, 255, 238, 0.45);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--main-color);
    font-size: 1.15rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    transition: 0.35s ease;
}

.project-card:hover .project-preview-pill {
    opacity: 1;
    transform: translateY(0);
}


.project-story,
.assistant-section {
    background: var(--second-bg-color);
}

.story-container {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.2rem;
    position: relative;
}

.story-container::before {
    content: "";
    position: absolute;
    top: 42px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--main-color), transparent);
    opacity: 0.45;
}

.story-step {
    position: relative;
    z-index: 2;
    min-height: 220px;
    border: 1.5px solid rgba(0, 255, 238, 0.35);
    border-radius: 28px;
    padding: 2.6rem;
    transition: 0.35s ease;
}

.story-step:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 28px var(--glow-soft);
}

.story-step>span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--main-color);
    color: #000;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 2rem;
    box-shadow: 0 0 24px var(--glow-soft);
}

.story-step h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.story-step p {
    color: var(--muted-text);
    font-size: 1.45rem;
    line-height: 1.65;
}

.assistant-card {
    max-width: 820px;
    margin: 0 auto;
    border: 1.5px solid rgba(0, 255, 238, 0.35);
    border-radius: 30px;
    padding: 2.8rem;
    box-shadow: 0 0 30px rgba(0, 255, 238, 0.08);
}

.assistant-header {
    display: flex;
    gap: 1.6rem;
    align-items: center;
    margin-bottom: 2rem;
}

.assistant-header i {
    font-size: 4.2rem;
    color: var(--main-color);
}

.assistant-header h3 {
    font-size: 2.4rem;
}

.assistant-header p {
    font-size: 1.45rem;
    color: var(--muted-text);
}

.assistant-messages {
    min-height: 150px;
    max-height: 230px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.bot-message,
.user-message {
    max-width: 82%;
    padding: 1.2rem 1.5rem;
    border-radius: 18px;
    font-size: 1.45rem;
    line-height: 1.55;
}

.bot-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(0, 255, 238, 0.16);
}

.user-message {
    align-self: flex-end;
    background: var(--main-color);
    color: #000;
    font-weight: 700;
}

.assistant-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.assistant-quick-actions button {
    padding: 1rem 1.6rem;
    border-radius: 999px;
    background: rgba(0, 255, 238, 0.10);
    border: 1px solid rgba(0, 255, 238, 0.35);
    color: var(--main-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}

.assistant-quick-actions button:hover {
    background: var(--main-color);
    color: #000;
    transform: translateY(-4px);
}

.reveal>* {
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.reveal.active .about-card,
.reveal.active .skill-card,
.reveal.active .cert-card,
.reveal.active .project-card,
.reveal.active .story-step {
    animation: staggerRise 0.8s ease both;
}

.reveal.active .about-card:nth-child(2),
.reveal.active .skill-card:nth-child(2),
.reveal.active .cert-card:nth-child(2),
.reveal.active .project-card:nth-child(2),
.reveal.active .story-step:nth-child(2) {
    animation-delay: 0.08s;
}

.reveal.active .about-card:nth-child(3),
.reveal.active .skill-card:nth-child(3),
.reveal.active .cert-card:nth-child(3),
.reveal.active .project-card:nth-child(3),
.reveal.active .story-step:nth-child(3) {
    animation-delay: 0.16s;
}

.reveal.active .skill-card:nth-child(n+4),
.reveal.active .story-step:nth-child(4) {
    animation-delay: 0.22s;
}

@keyframes staggerRise {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }

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

body.analytics-mode::after {
    content: "ANALYTICS MODE ACTIVATED";
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100000;
    padding: 2rem 3rem;
    border: 1px solid var(--main-color);
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.82);
    color: var(--main-color);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.2rem;
    box-shadow: 0 0 45px var(--glow-medium);
    animation: analyticsFlash 2.4s ease both;
}

@keyframes analyticsFlash {
    0% {
        opacity: 0;
        filter: blur(8px);
        scale: 0.85;
    }

    15%,
    75% {
        opacity: 1;
        filter: blur(0);
        scale: 1;
    }

    100% {
        opacity: 0;
        filter: blur(8px);
        scale: 1.08;
    }
}

@media (max-width: 991px) {

    .cursor-glow,
    .analytics-ambient {
        display: none;
    }

    .story-container {
        grid-template-columns: 1fr 1fr;
    }

    .story-container::before {
        display: none;
    }
}

@media (max-width: 600px) {
    .story-container {
        grid-template-columns: 1fr;
    }

    .assistant-header {
        align-items: flex-start;
    }

    .bot-message,
    .user-message {
        max-width: 96%;
    }
}


.cert-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cert-modal-content {
    position: relative;
    width: min(1100px, 96vw);
    height: 88vh;
    background: var(--dark-card);
    border: 2px solid var(--main-color);
    border-radius: 24px;
    box-shadow: 0 0 40px rgba(0, 255, 238, 0.28);
    padding: 3rem;
    animation: fadeIn 0.35s ease;
}

.cert-modal-content h2 {
    color: var(--main-color);
    font-size: 2.6rem;
    margin-bottom: 1.5rem;
}

.cert-modal-content iframe {
    width: 100%;
    height: calc(100% - 5rem);
    border-radius: 16px;
    background: white;
}


/* =========================================================
   Command Center Upgrade Pack
   Added for cinematic BI portfolio experience
   ========================================================= */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 255, 238, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 238, 0.045) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(circle at 50% 10%, black 0%, transparent 70%);
    animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
    from {
        background-position: 0 0, 0 0;
    }

    to {
        background-position: 58px 58px, 58px 58px;
    }
}

.home {
    justify-content: space-between;
    gap: clamp(3rem, 5vw, 8rem);
}

.home-content {
    max-width: 760px;
}

.hero-signature {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-signature span {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.25rem;
    border: 1px solid rgba(0, 255, 238, 0.35);
    border-radius: 999px;
    background: rgba(0, 255, 238, 0.07);
    color: var(--text-color);
    font-size: 1.18rem;
    font-weight: 700;
}

.hero-signature i {
    color: var(--main-color);
    font-size: 1.65rem;
}

.hero-command-center {
    width: min(320px, 28vw);
    min-width: 260px;
    border: 1px solid rgba(0, 255, 238, 0.45);
    border-radius: 28px;
    padding: 1.7rem;
    background:
        radial-gradient(circle at top right, rgba(0, 255, 238, 0.20), transparent 35%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(0, 255, 238, 0.03));
    box-shadow: 0 0 35px rgba(0, 255, 238, 0.16), inset 0 0 28px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(14px);
    transform: translateY(3rem);
    animation: commandFloat 5s ease-in-out infinite;
    position: relative;
}

.hero-command-center::before,
.hero-command-center::after {
    content: "";
    position: absolute;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: var(--main-color);
    filter: blur(60px);
    opacity: 0.18;
    z-index: -1;
}

.hero-command-center::before {
    top: -25px;
    right: -15px;
}

.hero-command-center::after {
    bottom: -25px;
    left: -15px;
}

.command-topline {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
    color: var(--main-color);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.13rem;
    text-transform: uppercase;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
    animation: pulseDot 1.2s ease-in-out infinite;
}

.command-screen {
    border-radius: 22px;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.command-row,
.command-metrics {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.command-row div,
.command-metrics span {
    color: var(--muted-text);
    font-size: 1.1rem;
    font-weight: 700;
}

.command-row strong,
.command-metrics strong {
    color: var(--main-color);
    font-size: 1.25rem;
}

.mini-bars {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    margin: 1.7rem 0;
}

.mini-bars span {
    flex: 1;
    height: var(--h);
    border-radius: 999px 999px 0 0;
    background: var(--gradient-main);
    box-shadow: 0 0 16px rgba(0, 255, 238, 0.35);
    animation: barBreathe 2.4s ease-in-out infinite;
    animation-delay: calc(var(--h) * -0.02);
}

.command-metrics {
    display: grid;
    grid-template-columns: 1fr;
}

.command-metrics div {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes commandFloat {

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

    50% {
        transform: translateY(1.6rem);
    }
}

@keyframes pulseDot {

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

    50% {
        transform: scale(1.25);
        opacity: 1;
    }
}

@keyframes barBreathe {

    0%,
    100% {
        transform: scaleY(0.86);
        opacity: 0.72;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.cert-card {
    min-height: 245px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    isolation: isolate;
}

.cert-card::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--cert-angle, 0deg), transparent 0 18%, var(--main-color), transparent 36% 100%);
    opacity: 0;
    z-index: -1;
    animation: certSpin 5s linear infinite;
    transition: opacity 0.35s ease;
}

.cert-card:hover::after {
    opacity: 0.55;
}

.cert-chip {
    width: fit-content;
    margin: 1.6rem auto 0;
    padding: 0.75rem 1.3rem;
    border-radius: 999px;
    background: rgba(0, 255, 238, 0.11);
    border: 1px solid rgba(0, 255, 238, 0.42);
    color: var(--main-color);
    font-weight: 900;
    font-size: 1.15rem;
}

@keyframes certSpin {
    to {
        --cert-angle: 360deg;
    }
}

@property --cert-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}


@media (max-width: 1200px) {
    .hero-command-center {
        display: none;
    }

    .home {
        justify-content: center;
    }
}

@media (max-width: 991px) {
    .hero-signature span {
        font-size: 1.08rem;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-details ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-signature {
        gap: 0.75rem;
    }

    .hero-signature span {
        width: 100%;
        justify-content: center;
    }

    .project-modal-content {
        padding: 2.4rem 1.6rem;
    }
}

/* =========================================================
   FINAL POLISH — ANALYTICS COMMAND PORTFOLIO UPGRADE
   Keeps the hero stable, upgrades skill cards, and improves
   the overall premium BI command-center feeling.
========================================================= */

/* ---------- Stable hero typing line ---------- */
.text-animation {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    flex-wrap: nowrap;
    min-height: 4.6rem;
    margin-bottom: 2.4rem;
    line-height: 1.15;
}

.text-animation .role-prefix {
    flex: 0 0 auto;
    color: var(--text-color);
}

#typed-role {
    display: inline-block;
    min-width: 28rem;
    white-space: nowrap;
    color: var(--main-color);
    overflow: hidden;
    vertical-align: bottom;
}

#typed-role::after {
    display: inline-block;
    transform: translateY(-1px);
}

.home-content p {
    max-width: 58rem;
}

.hero-signature {
    margin-top: 1.8rem;
}

.hero-signature span {
    white-space: nowrap;
}

/* ---------- Stronger hero depth ---------- */
.home::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 255, 238, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 238, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 50% 45%, black 0%, transparent 72%);
    pointer-events: none;
    z-index: -1;
}

.home-content h1 span {
    filter: drop-shadow(0 0 22px rgba(0, 255, 238, 0.38));
}


/* ---------- Skills section: premium analytics cards ---------- */
.skills-subtitle {
    margin-top: -2.2rem;
    margin-bottom: 4.6rem;
}

.premium-skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
    gap: 2.2rem;
}

.premium-skill {
    min-height: 222px;
    padding: 2.4rem;
    border: 1px solid rgba(0, 255, 238, 0.34);
    background:
        radial-gradient(circle at top right, rgba(0, 255, 238, 0.16), transparent 36%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        0 0 24px rgba(0, 255, 238, 0.055);
    isolation: isolate;
}

.premium-skill::before {
    width: 150px;
    height: 150px;
    top: -85px;
    right: -85px;
    opacity: 0.13;
}

.premium-skill::after {
    content: attr(data-stack);
    position: absolute;
    top: 1.8rem;
    right: 1.8rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    color: var(--main-color);
    background: rgba(0, 255, 238, 0.08);
    border: 1px solid rgba(0, 255, 238, 0.26);
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
}

.premium-skill i {
    width: 5.8rem;
    height: 5.8rem;
    display: grid;
    place-items: center;
    border-radius: 1.8rem;
    margin-bottom: 1.7rem;
    background:
        linear-gradient(135deg, rgba(0, 255, 238, 0.22), rgba(45, 138, 184, 0.08));
    border: 1px solid rgba(0, 255, 238, 0.32);
    box-shadow: 0 0 24px rgba(0, 255, 238, 0.12);
    font-size: 3.6rem;
}

.premium-skill h3 {
    font-size: 2.05rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02rem;
}

.premium-skill .skill-info span {
    font-size: 1.23rem;
    color: rgba(255, 255, 255, 0.68);
}

.premium-skill .skill-info strong {
    font-size: 1.42rem;
    text-shadow: 0 0 16px rgba(0, 255, 238, 0.35);
}

.premium-skill .skill-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.045);
}

.premium-skill:hover {
    transform: translateY(-10px) scale(1.025);
    border-color: rgba(0, 255, 238, 0.72);
    box-shadow:
        0 0 26px rgba(0, 255, 238, 0.18),
        0 0 70px rgba(0, 255, 238, 0.07);
}

.premium-skill:hover i {
    transform: rotate(-3deg) scale(1.08);
}

/* ---------- Cleaner project modal gallery image ---------- */
.modal-image-wrapper {
    min-height: 280px;
}

#modalImage {
    background: rgba(0, 0, 0, 0.18);
}

/* ---------- Responsive stability ---------- */
@media (max-width: 1200px) {
    .text-animation {
        min-height: 4.4rem;
    }

    #typed-role {
        min-width: 23rem;
    }
}

@media (max-width: 768px) {
    .text-animation {
        display: block;
        min-height: 8.6rem;
    }

    .text-animation .role-prefix,
    #typed-role {
        display: inline;
        min-width: 0;
        white-space: normal;
    }

    .premium-skills-grid {
        grid-template-columns: 1fr;
    }

    .premium-skill::after {
        font-size: 0.95rem;
    }
}

/* =========================================================
   FINAL MODAL FIX — INNER SCROLLBAR + CLEAN STRUCTURE
   This section intentionally overrides earlier modal rules.
========================================================= */
.project-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100%;
    height: 100vh;
    padding: clamp(1rem, 2vw, 2rem);
    overflow: hidden;
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(circle at 85% 10%, rgba(0, 255, 238, 0.13), transparent 28%),
        rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.project-modal-content {
    position: relative;
    width: min(1220px, 92vw);
    height: min(88vh, 860px);
    padding: clamp(1.6rem, 2vw, 2.4rem);
    overflow: hidden !important;
    border-radius: 2.6rem;
    border: 1px solid rgba(0, 255, 238, 0.42);
    background:
        radial-gradient(circle at top right, rgba(0, 255, 238, 0.08), transparent 34%),
        linear-gradient(135deg, rgba(12, 12, 12, 0.97), rgba(18, 18, 18, 0.98));
    box-shadow:
        0 0 42px rgba(0, 255, 238, 0.14),
        0 0 120px rgba(0, 255, 238, 0.05);
    animation: fadeIn 0.3s ease;
    box-sizing: border-box;
}

.project-modal-content::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.modal-body {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1.4rem;
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 7px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--main-color), #2d8ab8);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(0, 255, 238, 0.35);
}

.close-btn {
    position: absolute !important;
    top: 1.8rem;
    right: 2rem;
    z-index: 60;
    width: 4.2rem;
    height: 4.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    border-radius: 50%;
    color: var(--main-color);
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(0, 255, 238, 0.28);
    font-size: 3rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}

.close-btn:hover {
    background: rgba(0, 255, 238, 0.12);
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 0 18px rgba(0, 255, 238, 0.4);
}

.modal-grid {
    padding-top: 0.2rem;
    padding-right: 3.8rem;
}

.modal-details {
    margin-right: 3.8rem;
}

.text-animation {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.8rem;
    min-height: 8.2rem;
    overflow-wrap: anywhere;
}

#typed-role {
    display: inline-block;
    max-width: 100%;
    line-height: 1.35;
}

@media (max-width: 1050px) {
    .project-modal-content {
        width: min(94vw, 900px);
        height: 90vh;
    }

    .modal-grid,
    .modal-details {
        padding-right: 0;
        margin-right: 0;
    }
}

@media (max-width: 600px) {
    .project-modal {
        align-items: center;
        padding: 1rem;
    }

    .project-modal-content {
        width: 100%;
        height: 92vh;
        padding: 1.4rem;
        border-radius: 2rem;
    }

    .modal-body {
        padding-right: 0.8rem;
    }

    .close-btn {
        top: 1.2rem;
        right: 1.2rem;
        width: 3.8rem;
        height: 3.8rem;
        font-size: 2.6rem;
    }

    .modal-grid {
        padding-top: 3.8rem;
    }
}

/* =========================================================
   INSANE PROJECT SECTION UPGRADE
   Cinematic BI Hub: glow tracking, KPI chips, perspective layers
   ========================================================= */
.projects {
    overflow: hidden;
}

.projects::before {
    content: "";
    position: absolute;
    inset: 8rem 0 auto 0;
    height: 520px;
    pointer-events: none;
    background:
        linear-gradient(rgba(0, 255, 238, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 238, 0.055) 1px, transparent 1px),
        radial-gradient(circle at 50% 20%, rgba(45, 138, 184, 0.16), transparent 45%);
    background-size: 42px 42px, 42px 42px, 100% 100%;
    mask-image: linear-gradient(to bottom, transparent, black 16%, black 72%, transparent);
    opacity: 0.7;
}

.projects-subtitle {
    position: relative;
    z-index: 2;
}

.project-categories {
    perspective: 1400px;
}

.project-category-card {
    isolation: isolate;
    transform-style: preserve-3d;
}

.project-category-card::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.08) 34%, transparent 52%),
        radial-gradient(circle at 18% 0%, rgba(0, 255, 238, 0.12), transparent 32%);
    opacity: 0.45;
}

.project-category-card:hover {
    transform: translateY(-8px) scale(1.005);
}

.category-header,
.category-projects {
    transform: translateZ(28px);
}

.category-projects {
    align-items: stretch;
}

.project-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
    min-height: 255px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 255, 238, 0.08), transparent 44%),
        linear-gradient(145deg, rgba(14, 14, 14, 0.96), rgba(5, 5, 5, 0.98));
    border: 1px solid rgba(0, 255, 238, 0.36);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform-style: preserve-3d;
    transform: perspective(1050px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(var(--lift, 0px));
    transition: transform 0.18s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    will-change: transform;
}

.project-card:hover {
    --lift: -8px;
    border-color: rgba(0, 255, 238, 0.78);
    box-shadow:
        0 32px 75px rgba(0, 0, 0, 0.58),
        0 0 38px rgba(0, 255, 238, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.project-glow,
.project-shine,
.project-noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
}

.project-glow {
    z-index: 1;
    opacity: 0;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(0, 255, 238, 0.28), rgba(45, 138, 184, 0.10) 22%, transparent 46%);
    transition: opacity 0.25s ease;
}

.project-shine {
    z-index: 5;
    opacity: 0;
    background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.16) 45%, transparent 58%);
    transform: translateX(-85%);
    transition: opacity 0.25s ease, transform 0.72s ease;
    mix-blend-mode: screen;
}

.project-noise {
    z-index: 6;
    opacity: 0.18;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 0.7px, transparent 0.7px);
    background-size: 5px 5px;
    mix-blend-mode: soft-light;
}

.project-card:hover .project-glow {
    opacity: 1;
}

.project-card:hover .project-shine {
    opacity: 1;
    transform: translateX(85%);
}

.project-preview {
    height: 255px;
    transform: translateZ(28px);
    border-bottom: 1px solid rgba(0, 255, 238, 0.16);
}

.project-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--mouse-x) var(--mouse-y), transparent 0%, transparent 30%, rgba(0, 0, 0, 0.22) 100%),
        linear-gradient(to bottom, transparent 35%, rgba(0, 0, 0, 0.72) 100%);
}

.project-preview img {
    transform: scale(1.015) translateZ(20px);
    filter: saturate(1.08) contrast(1.04) brightness(0.88);
}

.project-card:hover .project-preview img:not(.missing-image) {
    transform: scale(1.11) translateY(-4px) translateZ(36px);
    filter: saturate(1.15) contrast(1.1) brightness(0.96);
}

.dashboard-stack {
    position: absolute;
    inset: auto 1.4rem 1.35rem auto;
    width: 106px;
    height: 72px;
    z-index: 4;
    transform-style: preserve-3d;
    opacity: 0.82;
    pointer-events: none;
}

.stack-panel {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 238, 0.4);
    background:
        linear-gradient(135deg, rgba(0, 255, 238, 0.13), rgba(255, 255, 255, 0.035)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 4px, transparent 4px 13px);
    box-shadow: 0 0 16px rgba(0, 255, 238, 0.16);
}

.stack-one {
    transform: translate3d(-14px, 12px, -28px) rotate(-8deg);
    opacity: 0.35;
}

.stack-two {
    transform: translate3d(-7px, 6px, -14px) rotate(-4deg);
    opacity: 0.55;
}

.stack-three {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0.86;
}

.project-card:hover .dashboard-stack {
    animation: stackFloat 2.8s ease-in-out infinite;
}

@keyframes stackFloat {

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

    50% {
        transform: translateY(-7px) rotateX(7deg);
    }
}

.project-overlay {
    z-index: 7;
    padding: 1.8rem;
    transform: translateZ(55px) translateY(10px);
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.68) 20%, rgba(0, 0, 0, 0.97) 100%);
}

.project-card:hover .project-overlay {
    transform: translateZ(70px) translateY(0);
}

.project-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1rem;
    transform: translateY(10px);
    opacity: 0;
    transition: 0.32s ease;
}

.project-card:hover .project-kpis {
    opacity: 1;
    transform: translateY(0);
}

.project-kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 255, 238, 0.34);
    box-shadow: inset 0 0 18px rgba(0, 255, 238, 0.06);
}

.project-kpi-chip strong {
    color: var(--main-color);
    font-size: 1.15rem;
    line-height: 1;
}

.project-kpi-chip small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.project-overlay h3 {
    font-size: clamp(1.85rem, 2vw, 2.35rem);
    text-shadow: 0 0 18px rgba(0, 255, 238, 0.22);
}

.project-overlay p {
    color: rgba(255, 255, 255, 0.86);
}

.project-card::before {
    content: "Explore Case Study";
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.project-card:focus-visible {
    outline: 3px solid var(--main-color);
    outline-offset: 5px;
}

.project-card.project-visible {
    animation: projectRise 0.75s cubic-bezier(.2, .9, .2, 1) both;
    animation-delay: calc(var(--project-index, 0) * 70ms);
}

@keyframes projectRise {
    from {
        opacity: 0;
        transform: perspective(1050px) translateY(28px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: perspective(1050px) translateY(0) scale(1);
    }
}

@media (max-width: 991px) {

    .project-card,
    .project-card:hover {
        transform: none;
    }

    .project-category-card.active .category-projects,
    .project-category-card:hover .category-projects {
        max-height: 1500px;
    }

    .project-card {
        min-height: 260px;
    }

    .project-preview {
        height: 260px;
    }

    .project-kpis {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 600px) {
    .project-card {
        min-height: 235px;
        border-radius: 22px;
    }

    .project-preview {
        height: 235px;
    }

    .dashboard-stack {
        width: 84px;
        height: 56px;
    }

    .project-kpi-chip:nth-child(3) {
        display: none;
    }
}


/* ---------- Manual Project Image Gallery ---------- */
.modal-image-slider {
    position: relative;
    width: 100%;
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 238, 0.28);
    background:
        radial-gradient(circle at center, rgba(0, 255, 238, 0.08), transparent 65%),
        rgba(0, 0, 0, 0.35);
}

.modal-image-slider #modalImage {
    width: 100%;
    height: clamp(260px, 34vw, 430px);
    display: block;
    object-fit: contain;
    padding: 1.4rem;
    transition: opacity 0.16s ease, transform 0.16s ease, filter 0.16s ease;
}

.modal-image-slider #modalImage.image-switching {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(2px);
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;

    width: 4.7rem;
    height: 4.7rem;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(0, 255, 238, 0.65);
    color: var(--main-color);

    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 0 18px rgba(0, 255, 238, 0.12);
}

.gallery-btn i {
    font-size: 3.2rem;
}

.gallery-btn:hover {
    background: var(--main-color);
    color: #000;
    box-shadow: 0 0 26px rgba(0, 255, 238, 0.55);
}

.gallery-prev {
    left: 1.4rem;
}

.gallery-next {
    right: 1.4rem;
}

.gallery-counter {
    position: absolute;
    left: 50%;
    bottom: 1.2rem;
    transform: translateX(-50%);
    z-index: 12;

    padding: 0.55rem 1.1rem;
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 238, 0.45);
    color: var(--text-color);

    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.08rem;
}

/* ===== Gallery Thumbnails ===== */

.gallery-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1.4rem;
    overflow-x: auto;
    padding-bottom: .4rem;
    align-items: center;
}

.gallery-thumbnails img,
.gallery-thumb {

    width: 120px;
    height: 70px;

    object-fit: cover;

    border-radius: 1rem;

    border: 2px solid transparent;

    background: #0a0a0a;

    padding: 0;

    opacity: .72;

    cursor: pointer;

    transition: .28s ease;

    flex-shrink: 0;
}

/* SQL + Python screenshots */
.gallery-thumbnails img.sql-thumb,
.gallery-thumbnails img.python-thumb {

    object-fit: contain;

    background: #050505;

    padding: .45rem;
}

/* Active thumbnail */
.gallery-thumbnails img.active-thumb,
.gallery-thumb.active-thumb {

    border-color: var(--main-color);

    opacity: 1;

    transform: translateY(-2px);

    box-shadow: 0 0 14px rgba(0, 255, 238, .35);
}

/* Hover */
.gallery-thumbnails img:hover,
.gallery-thumb:hover {

    opacity: 1;

    transform: scale(1.03);
}

/* Light Theme */
:root.light-theme .gallery-thumbnails img,
:root.light-theme .gallery-thumb {

    background: #f4f6f8;
}


.gallery-thumb {
    position: relative;
    height: 7.4rem;
    border-radius: 1.2rem;
    overflow: hidden;
    cursor: pointer;

    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 255, 238, 0.24);
    opacity: 0.62;

    transition: 0.25s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.8);
    transition: 0.25s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: var(--main-color);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 255, 238, 0.25);
}

.gallery-thumb.active img,
.gallery-thumb:hover img {
    filter: brightness(1) contrast(1.05);
}

@media (max-width: 700px) {
    .modal-image-slider #modalImage {
        height: 240px;
        padding: 1rem;
    }

    .gallery-btn {
        width: 4rem;
        height: 4rem;
    }

    .gallery-btn i {
        font-size: 2.8rem;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-thumb {
        height: 6.2rem;
    }
}


/* ===== Premium Modal Gallery Upgrade ===== */

.modal-right {
    width: 100%;
}

.modal-gallery-wrapper {
    width: 100%;
}

.modal-image-slider {
    position: relative;
    width: 100%;
    border-radius: 2.2rem;
    overflow: hidden;
    background: #060606;
    border: 1px solid rgba(0, 255, 238, .25);
    box-shadow:
        0 0 24px rgba(0, 255, 238, .08),
        inset 0 0 30px rgba(255, 255, 255, .02);
}

.modal-image-slider img {
    width: 100%;
    height: clamp(320px, 38vw, 520px);
    object-fit: cover;
    display: block;
    transition: all .35s ease;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4.6rem;
    height: 4.6rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, .72);
    border: 1px solid rgba(0, 255, 238, .45);
    color: var(--main-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
    transition: .25s ease;
    backdrop-filter: blur(8px);
}

.gallery-btn:hover {
    background: var(--main-color);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 238, .5);
}

.gallery-btn i {
    font-size: 3rem;
}

.gallery-prev {
    left: 1.5rem;
}

.gallery-next {
    right: 1.5rem;
}

.gallery-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1.4rem;
    overflow-x: auto;
    padding-bottom: .5rem;
}

.gallery-thumbnails img {
    width: 95px;
    height: 60px;
    object-fit: cover;
    border-radius: 1rem;
    border: 2px solid transparent;
    opacity: .7;
    cursor: pointer;
    transition: .25s ease;
}

.gallery-thumbnails img.active-thumb,
.gallery-thumbnails img:hover {
    border-color: var(--main-color);
    opacity: 1;
    transform: translateY(-2px);
}

@media(max-width:768px) {
    .modal-image-slider img {
        height: 260px;
    }
}


/* =========================================================
   FINAL FIX: Modal Gallery Fit + Light Theme Polish
   ========================================================= */

.modal-right {
    width: 100%;
    min-width: 0;
}

.modal-image-wrapper,
.modal-image-slider {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    max-height: 470px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 2.2rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(0, 255, 238, 0.10), transparent 45%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(10, 22, 24, 0.96));
    border: 1px solid rgba(0, 255, 238, 0.34);
    box-shadow:
        0 0 28px rgba(0, 255, 238, 0.12),
        inset 0 0 36px rgba(255, 255, 255, 0.025);
}

.modal-image-slider #modalImage,
.modal-image-slider img#modalImage {
    width: 100%;
    height: 100%;
    padding: 0;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
    border-radius: 1.7rem;
    transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.modal-image-slider #modalImage.image-switching {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(2px);
}

.gallery-thumbnails {
    width: 100%;
    margin: 1.4rem 0 1.8rem;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 1rem;
    overflow: visible;
    padding: 0;
}

.gallery-thumb {
    width: 100%;
    height: 7rem;
    padding: 0;
    border-radius: 1.2rem;
    overflow: hidden;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(0, 255, 238, 0.22);
    opacity: 0.72;
    transition: transform 0.25s ease, opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.78) contrast(1.05);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: var(--main-color);
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(0, 255, 238, 0.24);
}

.gallery-thumb:hover img,
.gallery-thumb.active img {
    filter: brightness(1) contrast(1.08);
    transform: scale(1.04);
}

.gallery-counter {
    bottom: 1rem;
    background: rgba(0, 0, 0, 0.72);
}

.gallery-btn {
    z-index: 20;
}

/* Light theme fixes for project modal/gallery */
:root.light-theme .project-modal {
    background:
        radial-gradient(circle at 85% 10%, rgba(0, 119, 204, 0.16), transparent 30%),
        rgba(245, 249, 252, 0.88);
}

:root.light-theme .project-modal-content {
    background:
        radial-gradient(circle at top right, rgba(0, 119, 204, 0.10), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 250, 0.98));
    border-color: rgba(0, 119, 204, 0.32);
    box-shadow:
        0 20px 80px rgba(0, 0, 0, 0.15),
        0 0 50px rgba(0, 119, 204, 0.08);
}

:root.light-theme .modal-image-wrapper,
:root.light-theme .modal-image-slider {
    background:
        radial-gradient(circle at 50% 20%, rgba(0, 119, 204, 0.10), transparent 45%),
        linear-gradient(135deg, #ffffff, #edf6fb);
    border-color: rgba(0, 119, 204, 0.28);
}

:root.light-theme .gallery-thumb {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 119, 204, 0.22);
}

:root.light-theme .dashboard-overview-card,
:root.light-theme .project-details-card,
:root.light-theme .modal-category,
:root.light-theme .project-badges span {
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-color);
    border-color: rgba(0, 119, 204, 0.25);
}

:root.light-theme .modal-domain,
:root.light-theme .project-modal-content h2,
:root.light-theme .project-modal-content h4,
:root.light-theme .dashboard-overview-card span {
    color: var(--main-color);
}

:root.light-theme .project-modal-content p,
:root.light-theme .project-modal-content li {
    color: rgba(0, 0, 0, 0.78);
}

:root.light-theme .gallery-btn,
:root.light-theme .gallery-counter,
:root.light-theme .close-btn {
    background: rgba(255, 255, 255, 0.88);
    color: var(--main-color);
    border-color: rgba(0, 119, 204, 0.35);
}

:root.light-theme .gallery-btn:hover,
:root.light-theme .close-btn:hover {
    background: var(--main-color);
    color: #fff;
}

@media (max-width: 900px) {

    .modal-image-wrapper,
    .modal-image-slider {
        max-height: none;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-thumb {
        height: 6.6rem;
    }
}

@media (max-width: 520px) {

    .modal-image-wrapper,
    .modal-image-slider {
        aspect-ratio: 16 / 10;
        border-radius: 1.6rem;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-thumb {
        height: 6rem;
    }
}

/* =========================================================
   FINAL MODAL GALLERY FIXES
   - Full image visibility for Python/SQL screenshots
   - Better thumbnails
   - Light theme compatibility
   ========================================================= */

.modal-right,
.modal-gallery-wrapper {
    width: 100%;
    min-width: 0;
}

.modal-image-slider {
    position: relative;
    width: 100%;
    height: clamp(300px, 31vw, 430px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
    border-radius: 2rem;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 255, 238, 0.08), transparent 45%),
        #050505;
    border: 1px solid rgba(0, 255, 238, 0.28);
    box-shadow:
        0 0 26px rgba(0, 255, 238, 0.10),
        inset 0 0 26px rgba(255, 255, 255, 0.025);
}

.modal-image-slider img,
#modalImage {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    display: block;
    padding: 1rem;
    background: transparent !important;
    border-radius: 1.4rem;
}

.gallery-thumbnails,
#galleryThumbnails {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-top: 1.4rem;
    padding: 0.4rem 0.2rem 0.9rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) transparent;
}

.gallery-thumbnails::-webkit-scrollbar,
#galleryThumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track,
#galleryThumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb,
#galleryThumbnails::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 999px;
}

.gallery-thumbnails img,
.gallery-thumb,
#galleryThumbnails img {
    flex: 0 0 96px;
    width: 96px !important;
    height: 58px !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 0.35rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.78) !important;
    border: 1px solid rgba(0, 255, 238, 0.20);
    opacity: 0.66;
    cursor: pointer;
    transition: transform 0.25s ease, opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.gallery-thumbnails img:hover,
.gallery-thumb:hover,
#galleryThumbnails img:hover,
.gallery-thumbnails img.active-thumb,
.gallery-thumb.active-thumb,
#galleryThumbnails img.active-thumb {
    opacity: 1;
    transform: translateY(-2px);
    border-color: var(--main-color);
    box-shadow: 0 0 14px rgba(0, 255, 238, 0.35);
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 4.6rem;
    height: 4.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.68);
    border: 1px solid rgba(0, 255, 238, 0.58);
    color: var(--main-color);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: 0.25s ease;
}

.gallery-btn:hover {
    background: var(--main-color);
    color: #000;
    box-shadow: 0 0 22px var(--main-color);
}

.gallery-btn i {
    font-size: 3rem;
}

.gallery-prev {
    left: 1.2rem;
}

.gallery-next {
    right: 1.2rem;
}

:root.light-theme .project-modal {
    background:
        radial-gradient(circle at 85% 10%, rgba(0, 119, 204, 0.16), transparent 30%),
        rgba(245, 248, 252, 0.86);
}

:root.light-theme .project-modal-content {
    background:
        radial-gradient(circle at top right, rgba(0, 119, 204, 0.10), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 252, 0.98));
    border-color: rgba(0, 119, 204, 0.32);
    box-shadow:
        0 0 38px rgba(0, 119, 204, 0.18),
        0 24px 80px rgba(0, 0, 0, 0.12);
}

:root.light-theme .modal-image-slider {
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 119, 204, 0.08), transparent 45%),
        #f6f8fb;
    border-color: rgba(0, 119, 204, 0.28);
}

:root.light-theme .gallery-thumbnails img,
:root.light-theme .gallery-thumb,
:root.light-theme #galleryThumbnails img {
    background: #f7f9fc !important;
    border-color: rgba(0, 119, 204, 0.18);
}

:root.light-theme .modal-overview,
:root.light-theme .project-details-box,
:root.light-theme .modal-card,
:root.light-theme .project-detail-card {
    background: rgba(255, 255, 255, 0.78) !important;
    border-color: rgba(0, 119, 204, 0.22) !important;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .modal-image-slider {
        height: 260px !important;
    }

    .gallery-thumbnails img,
    .gallery-thumb,
    #galleryThumbnails img {
        flex-basis: 82px;
        width: 82px !important;
        height: 52px !important;
    }
}


/* =========================================================
   FINAL PORTFOLIO GALLERY LOCK
   Big image + thumbnails fixed for Power BI, Python, SQL
   ========================================================= */

.modal-right,
.modal-gallery-wrapper {
    width: 100%;
    min-width: 0;
}

/* Main image frame */
.modal-image-slider {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 300px;
    max-height: none !important;
    aspect-ratio: 16 / 9;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 0 !important;
    border-radius: 2rem !important;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 255, 238, 0.08), transparent 45%),
        linear-gradient(135deg, #030303, #080f10) !important;
    border: 1px solid rgba(0, 255, 238, 0.32) !important;
    box-shadow:
        0 0 26px rgba(0, 255, 238, 0.12),
        inset 0 0 30px rgba(255, 255, 255, 0.025) !important;
}

/* Main image itself */
.modal-image-slider #modalImage,
.modal-image-slider img#modalImage {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    padding: 0.9rem !important;
    border-radius: 1.5rem !important;
    background: transparent !important;
}

/* Smooth image switch */
.modal-image-slider #modalImage.image-switching,
.modal-image-slider img#modalImage.image-switching {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(2px);
}

/* Thumbnail rail */
#galleryThumbnails,
.gallery-thumbnails {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1rem !important;
    margin: 1.4rem 0 1.7rem !important;
    padding: 0.4rem 0.2rem 0.9rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) transparent;
}

#galleryThumbnails::-webkit-scrollbar,
.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

#galleryThumbnails::-webkit-scrollbar-track,
.gallery-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

#galleryThumbnails::-webkit-scrollbar-thumb,
.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 999px;
}

/* Thumbnail button */
#galleryThumbnails .gallery-thumb,
.gallery-thumbnails .gallery-thumb {
    flex: 0 0 112px !important;
    width: 112px !important;
    height: 68px !important;
    min-width: 112px !important;
    min-height: 68px !important;
    max-width: 112px !important;
    max-height: 68px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 1.1rem !important;
    background:
        linear-gradient(135deg, rgba(0, 255, 238, 0.07), rgba(255, 255, 255, 0.03)),
        #050505 !important;
    border: 1px solid rgba(0, 255, 238, 0.22) !important;
    opacity: 0.7 !important;
    cursor: pointer !important;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease !important;
}

/* Thumbnail image */
#galleryThumbnails .gallery-thumb img,
.gallery-thumbnails .gallery-thumb img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-position: center center !important;
    object-fit: contain !important;
    padding: 0.35rem !important;
    border-radius: 0.9rem !important;
    background: transparent !important;
    filter: brightness(0.78) contrast(1.06);
    transition: transform 0.25s ease, filter 0.25s ease;
}

/* Keep dashboard-style thumbnails visually rich but not cropped too aggressively */
#galleryThumbnails .gallery-thumb:not(.sql-thumb):not(.python-thumb) img,
.gallery-thumbnails .gallery-thumb:not(.sql-thumb):not(.python-thumb) img {
    object-fit: cover !important;
    padding: 0 !important;
}

/* SQL + Python thumbnails must show the whole screenshot/code image */
#galleryThumbnails .gallery-thumb.sql-thumb img,
#galleryThumbnails .gallery-thumb.python-thumb img,
.gallery-thumbnails .gallery-thumb.sql-thumb img,
.gallery-thumbnails .gallery-thumb.python-thumb img {
    object-fit: contain !important;
    padding: 0.45rem !important;
}

/* Active + hover state */
#galleryThumbnails .gallery-thumb:hover,
#galleryThumbnails .gallery-thumb.active,
.gallery-thumbnails .gallery-thumb:hover,
.gallery-thumbnails .gallery-thumb.active {
    opacity: 1 !important;
    transform: translateY(-3px) scale(1.02) !important;
    border-color: var(--main-color) !important;
    box-shadow:
        0 0 16px rgba(0, 255, 238, 0.38),
        inset 0 0 18px rgba(0, 255, 238, 0.06) !important;
}

#galleryThumbnails .gallery-thumb:hover img,
#galleryThumbnails .gallery-thumb.active img,
.gallery-thumbnails .gallery-thumb:hover img,
.gallery-thumbnails .gallery-thumb.active img {
    filter: brightness(1) contrast(1.08);
}

/* Arrows remain centered on main image */
.gallery-btn {
    z-index: 20 !important;
}

.gallery-prev {
    left: 1.2rem !important;
}

.gallery-next {
    right: 1.2rem !important;
}

/* Light theme gallery polish */
:root.light-theme .modal-image-slider {
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 119, 204, 0.08), transparent 45%),
        linear-gradient(135deg, #ffffff, #eef6fb) !important;
    border-color: rgba(0, 119, 204, 0.30) !important;
    box-shadow:
        0 16px 46px rgba(0, 0, 0, 0.10),
        inset 0 0 24px rgba(0, 119, 204, 0.04) !important;
}

:root.light-theme #galleryThumbnails .gallery-thumb,
:root.light-theme .gallery-thumbnails .gallery-thumb {
    background:
        linear-gradient(135deg, rgba(0, 119, 204, 0.06), rgba(255, 255, 255, 0.90)),
        #f7f9fc !important;
    border-color: rgba(0, 119, 204, 0.22) !important;
}

:root.light-theme #galleryThumbnails .gallery-thumb:hover,
:root.light-theme #galleryThumbnails .gallery-thumb.active,
:root.light-theme .gallery-thumbnails .gallery-thumb:hover,
:root.light-theme .gallery-thumbnails .gallery-thumb.active {
    border-color: var(--main-color) !important;
    box-shadow:
        0 0 14px rgba(0, 119, 204, 0.25),
        inset 0 0 14px rgba(0, 119, 204, 0.04) !important;
}

/* Responsive modal image and thumbnails */
@media (max-width: 900px) {
    .modal-image-slider {
        min-height: 260px !important;
        aspect-ratio: 16 / 10 !important;
    }

    #galleryThumbnails .gallery-thumb,
    .gallery-thumbnails .gallery-thumb {
        flex-basis: 96px !important;
        width: 96px !important;
        min-width: 96px !important;
        max-width: 96px !important;
        height: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
    }
}

@media (max-width: 520px) {
    .modal-image-slider {
        min-height: 220px !important;
        border-radius: 1.5rem !important;
    }

    .modal-image-slider #modalImage,
    .modal-image-slider img#modalImage {
        padding: 0.55rem !important;
    }

    #galleryThumbnails .gallery-thumb,
    .gallery-thumbnails .gallery-thumb {
        flex-basis: 84px !important;
        width: 84px !important;
        min-width: 84px !important;
        max-width: 84px !important;
        height: 54px !important;
        min-height: 54px !important;
        max-height: 54px !important;
    }
}


/* =========================================================
   FINAL UPGRADE: Header Robot Portfolio Chatbot
   ========================================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.ai-nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.7rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(0, 255, 238, 0.98), rgba(45, 138, 184, 0.95));
    color: #001112;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.03rem;
    cursor: pointer;
    box-shadow:
        0 0 24px rgba(0, 255, 238, 0.45),
        inset 0 0 14px rgba(255, 255, 255, 0.20);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.ai-nav-btn::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.55), transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.ai-nav-btn:hover::before {
    transform: translateX(120%);
}

.ai-nav-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow:
        0 0 34px rgba(0, 255, 238, 0.65),
        0 0 70px rgba(45, 138, 184, 0.18);
}

.ai-nav-btn i,
.ai-nav-btn span {
    position: relative;
    z-index: 2;
}

.ai-nav-btn i {
    font-size: 2.15rem;
}

.portfolio-chatbot {
    position: fixed;
    top: 9.6rem;
    right: 3.2rem;
    z-index: 9998;
    width: min(420px, calc(100vw - 3rem));
    pointer-events: none;
    opacity: 0;
    transform: translateY(-18px) scale(0.96);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.portfolio-chatbot.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.chatbot-panel {
    position: relative;
    overflow: hidden;
    border-radius: 2.4rem;
    border: 1px solid rgba(0, 255, 238, 0.38);
    background:
        radial-gradient(circle at top right, rgba(0, 255, 238, 0.15), transparent 34%),
        linear-gradient(145deg, rgba(10, 10, 10, 0.98), rgba(18, 18, 18, 0.96));
    box-shadow:
        0 0 38px rgba(0, 255, 238, 0.20),
        0 24px 80px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.chatbot-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 238, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 238, 0.035) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(circle at 70% 10%, black, transparent 72%);
    pointer-events: none;
}

.chatbot-top {
    position: relative;
    z-index: 2;
    padding: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 255, 238, 0.18);
}

.chatbot-identity {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.chatbot-avatar {
    position: relative;
    width: 4.7rem;
    height: 4.7rem;
    border-radius: 1.5rem;
    display: grid;
    place-items: center;
    color: #001112;
    background: var(--gradient-main);
    box-shadow: 0 0 22px rgba(0, 255, 238, 0.38);
}

.chatbot-avatar i {
    font-size: 2.7rem;
}

.bot-pulse {
    position: absolute;
    right: -0.3rem;
    bottom: -0.3rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #28ff9f;
    box-shadow: 0 0 16px #28ff9f;
    animation: botPulse 1.4s ease-in-out infinite;
}

@keyframes botPulse {

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

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.chatbot-kicker {
    color: var(--main-color);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
}

.chatbot-top h3 {
    color: var(--text-color);
    font-size: 1.8rem;
    line-height: 1.2;
}

.chatbot-close {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--main-color);
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(0, 255, 238, 0.28);
    transition: 0.25s ease;
}

.chatbot-close i {
    font-size: 2.4rem;
}

.chatbot-close:hover {
    background: rgba(0, 255, 238, 0.12);
    transform: rotate(90deg);
}

.chatbot-messages {
    position: relative;
    z-index: 2;
    height: 300px;
    padding: 1.7rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) transparent;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 999px;
}

.chatbot-messages .bot-message,
.chatbot-messages .user-message {
    max-width: 88%;
    padding: 1.1rem 1.3rem;
    border-radius: 1.5rem;
    font-size: 1.35rem;
    line-height: 1.55;
}

.chatbot-messages .bot-message {
    align-self: flex-start;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 255, 238, 0.18);
}

.chatbot-messages .user-message {
    align-self: flex-end;
    color: #001112;
    background: var(--main-color);
    font-weight: 700;
}

.chatbot-quick-actions {
    position: relative;
    z-index: 2;
    padding: 0 1.7rem 1.2rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.chatbot-quick-actions button {
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    color: var(--main-color);
    background: rgba(0, 255, 238, 0.08);
    border: 1px solid rgba(0, 255, 238, 0.28);
    font-size: 1.15rem;
    font-weight: 800;
    transition: 0.25s ease;
}

.chatbot-quick-actions button:hover {
    background: var(--main-color);
    color: #001112;
    transform: translateY(-2px);
}

.chatbot-input-row {
    position: relative;
    z-index: 2;
    padding: 1.4rem;
    display: flex;
    gap: 0.9rem;
    border-top: 1px solid rgba(0, 255, 238, 0.16);
}

.chatbot-input-row input {
    flex: 1;
    min-width: 0;
    height: 4.4rem;
    padding: 0 1.4rem;
    border-radius: 999px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(0, 255, 238, 0.22);
    font-size: 1.3rem;
}

.chatbot-input-row input::placeholder {
    color: var(--muted-text);
}

.chatbot-input-row button {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: var(--main-color);
    color: #001112;
    box-shadow: 0 0 18px rgba(0, 255, 238, 0.36);
}

.chatbot-input-row button i {
    font-size: 2.2rem;
}

:root.light-theme .chatbot-panel {
    background:
        radial-gradient(circle at top right, rgba(0, 119, 204, 0.11), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 252, 0.96));
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.16),
        0 0 32px rgba(0, 119, 204, 0.14);
}

:root.light-theme .chatbot-close {
    background: rgba(0, 119, 204, 0.08);
}

:root.light-theme .chatbot-messages .bot-message {
    background: rgba(0, 119, 204, 0.07);
    border-color: rgba(0, 119, 204, 0.18);
}

:root.light-theme .chatbot-input-row input {
    background: #ffffff;
    border-color: rgba(0, 119, 204, 0.22);
}

@media (max-width: 1200px) {
    .ai-nav-btn span {
        display: none;
    }

    .ai-nav-btn {
        width: 4.6rem;
        height: 4.6rem;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-actions {
        gap: 0.8rem;
    }

    .portfolio-chatbot {
        top: 8.4rem;
        right: 1.5rem;
        left: 1.5rem;
        width: auto;
    }

    .chatbot-messages {
        height: 270px;
    }
}


/* =========================================================
   FINAL POLISH: Mobile Navigation + Hero Text + Premium Finish
   ========================================================= */

/* Keep header actions aligned and prevent ugly wrapping */
.header {
    gap: 2rem;
}

.header-actions {
    flex-shrink: 0;
}

.logo {
    line-height: 1;
}

.text-animation,
.home-content h3 {
    white-space: nowrap;
}

#typed-role {
    display: inline-block;
    white-space: nowrap;
}

/* Subtle final depth for main sections */
.home::after,
.projects::after,
.skills::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 22%, rgba(0, 255, 238, 0.075), transparent 30%),
        radial-gradient(circle at 86% 18%, rgba(45, 138, 184, 0.08), transparent 32%);
    z-index: -1;
}

.project-category-card,
.skill-card,
.cert-card,
.about-card,
.timeline-content,
.contact-card {
    box-shadow:
        0 0 22px rgba(0, 255, 238, 0.07),
        inset 0 0 24px rgba(255, 255, 255, 0.018);
}

/* Mobile nav: clean slide panel instead of broken centered overlay */
@media (max-width: 991px) {
    .header {
        padding: 1.6rem 4.5%;
        min-height: 74px;
        gap: 1.2rem;
        border-bottom: 1px solid rgba(0, 255, 238, 0.13);
    }

    .logo {
        font-size: clamp(2.1rem, 5.2vw, 2.8rem);
        z-index: 1003;
    }

    #menu-icon {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 3;
        z-index: 1003;
        width: 4.4rem;
        height: 4.4rem;
        border-radius: 50%;
        background: rgba(0, 255, 238, 0.08);
        border: 1px solid rgba(0, 255, 238, 0.25);
        font-size: 3.2rem;
        transition: 0.25s ease;
    }

    #menu-icon.bx-x {
        background: var(--main-color);
        color: #001112;
        box-shadow: 0 0 20px rgba(0, 255, 238, 0.38);
    }

    .header-actions {
        margin-left: auto;
        order: 2;
        gap: 0.8rem;
        z-index: 1003;
    }

    .ai-nav-btn {
        width: 4.4rem;
        height: 4.4rem;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .ai-nav-btn span {
        display: none;
    }

    .theme-btn {
        padding: 1rem 1.8rem;
        font-size: 1.35rem;
        min-height: 4.4rem;
    }

    .navbar {
        position: fixed;
        top: 7.4rem;
        right: 1.2rem;
        left: auto;
        width: min(305px, calc(100vw - 2.4rem));
        height: auto;
        max-height: calc(100vh - 9rem);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1.4rem;
        border-radius: 2.2rem;
        border: 1px solid rgba(0, 255, 238, 0.32);
        background:
            radial-gradient(circle at top right, rgba(0, 255, 238, 0.16), transparent 40%),
            linear-gradient(145deg, rgba(8, 8, 8, 0.98), rgba(18, 18, 18, 0.96));
        box-shadow:
            0 0 35px rgba(0, 255, 238, 0.18),
            0 24px 80px rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-14px) scale(0.96);
        transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
        z-index: 1002;
    }

    .navbar.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .navbar::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        background-image:
            linear-gradient(rgba(0, 255, 238, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0, 255, 238, 0.035) 1px, transparent 1px);
        background-size: 26px 26px;
        mask-image: radial-gradient(circle at 50% 0%, black, transparent 80%);
    }

    .navbar a {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        width: 100%;
        margin: 0 !important;
        padding: 1.25rem 1.45rem;
        border-radius: 1.4rem;
        border: 1px solid transparent !important;
        color: var(--text-color);
        font-size: 1.6rem;
        font-weight: 800;
        background: rgba(255, 255, 255, 0.035);
        transition: 0.25s ease;
    }

    .navbar a:hover,
    .navbar a.active {
        color: #001112;
        background: var(--main-color);
        border-color: rgba(0, 255, 238, 0.4) !important;
        transform: translateX(4px);
        box-shadow: 0 0 18px rgba(0, 255, 238, 0.22);
    }

    body.nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        pointer-events: none;
    }

    .home {
        padding-top: 11rem;
        gap: 3.5rem;
    }

    .home-content {
        align-items: center;
        text-align: center;
        margin-top: 0;
    }

    .home-content h1 {
        font-size: clamp(4.2rem, 10vw, 5.8rem);
    }

    .text-animation,
    .home-content h3 {
        font-size: clamp(2.2rem, 5.7vw, 3rem);
        min-width: 0;
        max-width: 100%;
        white-space: nowrap;
    }

    .hero-signature,
    .hero-actions,
    .stats-container,
    .social-icons {
        justify-content: center;
    }
}

/* Very small mobile layout */
@media (max-width: 560px) {
    html {
        font-size: 56%;
    }

    .header {
        padding: 1.25rem 1.2rem;
        min-height: 68px;
    }

    .logo {
        font-size: 2rem;
        max-width: 38vw;
        overflow: visible;
        text-overflow: unset;
        white-space: nowrap;
    }

    .logo span {
        display: inline;
    }

    .theme-btn {
        padding: 0 1.2rem;
        height: 4rem;
        min-height: 4rem;
        font-size: 1.15rem;
    }

    .ai-nav-btn,
    #menu-icon {
        width: 4rem;
        height: 4rem;
    }

    .navbar {
        top: 7rem;
        right: 1rem;
        width: min(292px, calc(100vw - 2rem));
        border-radius: 2rem;
    }

    .home {
        padding-left: 5%;
        padding-right: 5%;
    }

    .home-img {
        margin-top: 2rem;
        opacity: 0.92;
    }

    .home-img img {
        width: clamp(230px, 62vw, 315px);
        height: clamp(230px, 62vw, 315px);
    }

    .image-ring {
        width: clamp(260px, 70vw, 355px);
        height: clamp(260px, 70vw, 355px);
    }

    .ring-two {
        width: clamp(292px, 78vw, 390px);
        height: clamp(292px, 78vw, 390px);
    }

    .home-content h1 {
        font-size: clamp(3.8rem, 11vw, 5.2rem);
        line-height: 1.06;
    }

    .text-animation,
    .home-content h3 {
        font-size: clamp(2rem, 6.2vw, 2.65rem);
    }

    .hero-eyebrow {
        max-width: 96%;
        white-space: nowrap;
    }

    .portfolio-chatbot {
        top: 7.6rem;
    }
}

/* Light theme final polish */
:root.light-theme body.nav-open::before {
    background: rgba(255, 255, 255, 0.35);
}

:root.light-theme .navbar {
    background:
        radial-gradient(circle at top right, rgba(0, 119, 204, 0.13), transparent 40%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 252, 0.96));
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.16),
        0 0 25px rgba(0, 119, 204, 0.12);
}

:root.light-theme .navbar a {
    background: rgba(0, 119, 204, 0.045);
}

/* ===== Certificate Zoom ===== */

.cert-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    cursor: zoom-in;
}

.cert-image-wrapper img {
    transition: transform 0.35s ease;
    transform-origin: center center;
}

/* Zoomed State */
.cert-image-wrapper.zoomed {
    cursor: zoom-out;
    overflow: auto;
}

.cert-image-wrapper.zoomed img {
    transform: scale(2);
}


/* =========================================================
   FINAL CERTIFICATE PDF VIEWER + LAST MOBILE FIXES
   ========================================================= */

/* Better tiny-header handling */
@media (max-width: 560px) {
    .logo {
        font-size: 2rem !important;
        max-width: 38vw !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: nowrap !important;
    }

    .logo span {
        display: inline !important;
    }

    .theme-btn {
        padding: 0 1.15rem !important;
        height: 4rem !important;
        min-height: 4rem !important;
        font-size: 1.15rem !important;
    }

    .ai-nav-btn,
    #menu-icon {
        width: 4rem !important;
        height: 4rem !important;
    }

    .home-img {
        order: initial !important;
        margin-top: 2rem !important;
    }
}

/* Certificate modal shell */
.cert-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2vw, 2rem);
    background:
        radial-gradient(circle at 80% 12%, rgba(0, 255, 238, 0.14), transparent 34%),
        rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cert-modal-content.cert-pdf-modal {
    position: relative;
    width: min(1120px, 96vw);
    height: min(90vh, 900px);
    padding: clamp(1.5rem, 2vw, 2.6rem);
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    overflow: hidden;
    border-radius: 2.4rem;
    border: 1px solid rgba(0, 255, 238, 0.48);
    background:
        radial-gradient(circle at top right, rgba(0, 255, 238, 0.11), transparent 34%),
        linear-gradient(135deg, rgba(12, 12, 12, 0.98), rgba(18, 18, 18, 0.98));
    box-shadow:
        0 0 42px rgba(0, 255, 238, 0.20),
        0 26px 80px rgba(0, 0, 0, 0.48);
    animation: fadeIn 0.28s ease;
}

.cert-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    padding-right: 4.4rem;
}

.cert-modal-kicker {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: var(--main-color);
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.22rem;
    text-transform: uppercase;
}

.cert-modal-content.cert-pdf-modal h2 {
    margin: 0;
    color: var(--main-color);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
}

.cert-close-btn {
    position: absolute !important;
    top: 1.2rem !important;
    right: 1.2rem !important;
    margin: 0 !important;
    z-index: 20 !important;
    flex-shrink: 0;
}

.cert-toolbar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cert-toolbar button,
.open-pdf-btn {
    min-height: 3.8rem;
    padding: 0.8rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    color: var(--main-color);
    background: rgba(0, 255, 238, 0.08);
    border: 1px solid rgba(0, 255, 238, 0.30);
    font-size: 1.25rem;
    font-weight: 800;
    transition: 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cert-toolbar button i {
    font-size: 2rem;
}

.cert-toolbar button:hover,
.open-pdf-btn:hover {
    color: #001112;
    background: var(--main-color);
    box-shadow: 0 0 18px rgba(0, 255, 238, 0.40);
    transform: translateY(-2px);
}

#certZoomLabel {
    min-width: 5.4rem;
    text-align: center;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 900;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 255, 238, 0.18);
}

/* PDF viewport */
.cert-pdf-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: auto;
    border-radius: 1.6rem;
    border: 1px solid rgba(0, 255, 238, 0.30);
    background:
        linear-gradient(135deg, rgba(0, 255, 238, 0.06), rgba(255, 255, 255, 0.02)),
        #050505;
    box-shadow:
        inset 0 0 32px rgba(0, 255, 238, 0.04),
        0 0 22px rgba(0, 255, 238, 0.08);
}

.cert-pdf-stage {
    width: 100%;
    height: 100%;
    min-height: 100%;
    transform-origin: top left;
    transition: transform 0.22s ease;
}

.cert-pdf-stage iframe,
.cert-modal-content.cert-pdf-modal iframe {
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: none;
    border-radius: 1.2rem;
    background: #ffffff;
    display: block;
}

.cert-mobile-note {
    display: none;
    margin: 0;
    color: var(--muted-text);
    font-size: 1.18rem;
    line-height: 1.5;
}

/* Light theme PDF modal */
:root.light-theme .cert-modal-content.cert-pdf-modal {
    background:
        radial-gradient(circle at top right, rgba(0, 119, 204, 0.10), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(243, 249, 252, 0.98));
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.16),
        0 0 32px rgba(0, 119, 204, 0.14);
}

:root.light-theme .cert-pdf-wrapper {
    background: #f7f9fc;
    border-color: rgba(0, 119, 204, 0.26);
}

:root.light-theme #certZoomLabel {
    background: rgba(0, 119, 204, 0.06);
}

/* Mobile certificate UX */
@media (max-width: 700px) {
    .cert-modal {
        padding: 1rem;
        align-items: center;
    }

    .cert-modal-content.cert-pdf-modal {
        width: 100%;
        height: 92vh;
        padding: 1.4rem;
        border-radius: 2rem;
    }

    .cert-modal-header {
        flex-direction: column;
        align-items: flex-start;
        padding-right: 4.2rem;
        gap: 1rem;
    }

    .cert-toolbar {
        width: 100%;
        justify-content: flex-start;
        gap: 0.65rem;
    }

    .cert-toolbar button,
    .open-pdf-btn {
        min-height: 3.6rem;
        padding: 0.75rem 0.95rem;
        font-size: 1.12rem;
    }

    .open-pdf-btn span {
        display: none;
    }

    #certZoomLabel {
        min-width: 5rem;
        font-size: 1.12rem;
    }

    .cert-pdf-wrapper {
        border-radius: 1.4rem;
    }

    .cert-mobile-note {
        display: block;
    }
}

@media (max-width: 991px) {
    .project-category-card.active .category-projects {
        max-height: 1400px !important;
        opacity: 1 !important;
        margin-top: 2.8rem !important;
        transform: translateY(0) !important;
    }
}


@media (max-width: 700px) {
    .project-modal-content {
        padding-bottom: 3.5rem !important;
    }

    .modal-details {
        margin-bottom: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .modal-details ul {
        padding-bottom: 1.5rem !important;
    }
}

@media (max-width: 700px) {

    .project-modal-content {
        padding-left: 1.6rem !important;
        padding-right: 1.6rem !important;
    }

    .modal-details,
    .dashboard-overview,
    .modal-left,
    .modal-right {
        padding-right: .6rem !important;
    }

    .modal-details ul {
        padding-right: 1rem !important;
    }

}

:root.light-theme .header {
    background: rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 255, 238, 0.12);
}

:root.light-theme .navbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

:root.light-theme .navbar a {
    color: #ffffff !important;
    background: transparent !important;
}

:root.light-theme .navbar a:hover,
:root.light-theme .navbar a.active {
    color: var(--main-color) !important;
    background: transparent !important;
    border-bottom: 3px solid var(--main-color) !important;
}

:root.light-theme .logo {
    color: #ffffff !important;
}




.header {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.66)) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(0, 255, 238, 0.10) !important;
}

.logo,
:root.light-theme .logo {
    color: #ffffff !important;
}

.logo span,
:root.light-theme .logo span {
    background: var(--gradient-main) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 0 25px var(--main-color) !important;
}

.navbar,
:root.light-theme .navbar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.navbar a,
:root.light-theme .navbar a {
    color: #ffffff !important;
    background: transparent !important;
    border-bottom: 3px solid transparent !important;
}

.navbar a:hover,
.navbar a.active,
:root.light-theme .navbar a:hover,
:root.light-theme .navbar a.active {
    color: var(--main-color) !important;
    background: transparent !important;
    border-bottom: 3px solid var(--main-color) !important;
}

:root.light-theme .ai-nav-btn {
    color: #001112 !important;
    background:
        radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #00ffee, #2d8ab8) !important;
    box-shadow:
        0 0 24px rgba(0, 255, 238, 0.42),
        inset 0 0 14px rgba(255, 255, 255, 0.20) !important;
}

:root.light-theme .theme-btn {
    color: #001112 !important;
    background: var(--main-color) !important;
    box-shadow: 0 0 25px var(--main-color) !important;
}

:root.light-theme .theme-menu {
    background: rgba(20, 20, 20, 0.96) !important;
    border: 1px solid var(--main-color) !important;
}

:root.light-theme .theme-option {
    color: #ffffff !important;
}

:root.light-theme .theme-option:hover,
:root.light-theme .theme-option.active-theme {
    color: #001112 !important;
    background: var(--main-color) !important;
}



@media (max-width: 991px) {

    .header,
    :root.light-theme .header {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.76)) !important;
        border-bottom: 1px solid rgba(0, 255, 238, 0.14) !important;
    }

    #menu-icon,
    :root.light-theme #menu-icon {
        color: var(--main-color) !important;
        background: rgba(0, 255, 238, 0.08) !important;
        border: 1px solid rgba(0, 255, 238, 0.28) !important;
    }

    #menu-icon.bx-x,
    :root.light-theme #menu-icon.bx-x {
        color: #001112 !important;
        background: var(--main-color) !important;
    }

    .navbar,
    :root.light-theme .navbar {
        background:
            radial-gradient(circle at top right, rgba(0, 255, 238, 0.16), transparent 40%),
            linear-gradient(145deg, rgba(8, 8, 8, 0.98), rgba(18, 18, 18, 0.96)) !important;
        border: 1px solid rgba(0, 255, 238, 0.32) !important;
        box-shadow:
            0 0 35px rgba(0, 255, 238, 0.18),
            0 24px 80px rgba(0, 0, 0, 0.55) !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
    }

    .navbar a,
    :root.light-theme .navbar a {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.035) !important;
        border: 1px solid transparent !important;
        border-bottom: 1px solid transparent !important;
    }

    .navbar a:hover,
    .navbar a.active,
    :root.light-theme .navbar a:hover,
    :root.light-theme .navbar a.active {
        color: #001112 !important;
        background: var(--main-color) !important;
        border-color: rgba(0, 255, 238, 0.42) !important;
        border-bottom: 1px solid rgba(0, 255, 238, 0.42) !important;
    }
}



@media (max-width: 560px) {

    .logo,
    :root.light-theme .logo {
        font-size: 2rem !important;
        max-width: 38vw !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: nowrap !important;
    }

    .theme-btn {
        padding: 0 1.15rem !important;
        height: 4rem !important;
        min-height: 4rem !important;
        font-size: 1.15rem !important;
    }

    .ai-nav-btn,
    #menu-icon {
        width: 4rem !important;
        height: 4rem !important;
    }

    .home-img {
        order: initial !important;
        margin-top: 2rem !important;
    }
}

@media (max-width: 700px) {
    .project-modal-content {
        padding-left: 1.6rem !important;
        padding-right: 1.6rem !important;
        padding-bottom: 3.5rem !important;
    }

    .modal-details {
        margin-bottom: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .modal-details ul {
        padding-right: 1rem !important;
        padding-bottom: 1.5rem !important;
    }
}



.github-btn {
    border-color: rgba(255, 255, 255, 0.55);
}

.github-btn i {
    font-size: 2rem;
}

.demo-tooltip {
    position: relative;
}

.demo-tooltip::after {
    content: "App may take 20-40 seconds to wake up on first launch";

    position: absolute;
    top: -5.5rem;
    left: 0;

    background: rgba(10, 10, 10, .96);
    color: #fff;

    padding: .9rem 1.3rem;
    border-radius: 1rem;

    font-size: 1.15rem;
    white-space: nowrap;

    border: 1px solid rgba(0, 255, 238, .35);

    opacity: 0;
    visibility: hidden;

    transition: .3s ease;

    z-index: 999;
    pointer-events: none;

    box-shadow: 0 0 18px rgba(0, 255, 238, .15);
}

.demo-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}



@media (min-width: 992px) and (max-width: 1560px) {
    html {
        font-size: 56%;
    }

    .header {
        padding: 2.1rem clamp(3rem, 5vw, 7rem) !important;
        gap: 1.2rem !important;
    }

    .logo {
        font-size: clamp(2.45rem, 2.15vw, 3rem) !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }

    .navbar {
        flex: 1 1 auto !important;
        justify-content: center !important;
        min-width: 0 !important;
        gap: clamp(1.15rem, 1.3vw, 2rem) !important;
    }

    .navbar a {
        margin-left: 0 !important;
        font-size: clamp(1.42rem, 1.08vw, 1.65rem) !important;
        white-space: nowrap !important;
    }

    .header-actions {
        flex: 0 0 auto !important;
        gap: 1.1rem !important;
    }

    .ai-nav-btn {
        padding: 1rem 1.45rem !important;
        min-width: auto !important;
    }

    .ai-nav-btn span {
        font-size: 1.18rem !important;
        white-space: nowrap !important;
    }

    .theme-btn {
        padding: 1rem 2rem !important;
        font-size: 1.42rem !important;
        white-space: nowrap !important;
    }
}

@media (min-width: 992px) and (max-width: 1380px) {
    .header {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }

    .navbar {
        gap: 1.05rem !important;
    }

    .ai-nav-btn {
        width: 4.6rem !important;
        height: 4.6rem !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
    }

    .ai-nav-btn span {
        display: none !important;
    }
}


@media (min-width: 992px) and (max-width: 1560px) {
    .contact {
        min-height: 92vh !important;
        padding-top: 10rem !important;
        padding-bottom: 8rem !important;
    }

    .contact-buttons {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1.25rem !important;
        width: 100% !important;
        max-width: 1180px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .contact-btn {
        min-width: 0 !important;
        width: 20% !important;
        max-width: 210px !important;
        padding: 1.35rem 1.35rem !important;
        font-size: 1.45rem !important;
        white-space: nowrap !important;
        flex: 1 1 0 !important;
    }

    .contact-btn i {
        font-size: 2.1rem !important;
    }
}


@media (max-width: 991px) {
    .hero-command-center {
        display: none !important;
    }

    body.site-ready .home-img {
        animation-delay: 0.1s !important;
        animation-duration: 0.55s !important;
    }

    .home-img {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .home-img img {
        will-change: auto !important;
    }
}

@media (max-width: 600px) {
    .loader-orbit {
        width: 310px;
        height: 310px;
    }

    .loader-orbit span:first-child {
        top: -7px;
        left: 50%;
        transform: translateX(-50%);
    }

    .loader-orbit span:last-child {
        bottom: -7px;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 600px) {
    .loader-orbit {
        width: 310px !important;
        height: 310px !important;
    }

    .loader-orbit span:first-child {
        top: -7px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .loader-orbit span:last-child {
        right: auto !important;
        bottom: -7px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}


@media (min-width: 1100px) and (max-width: 1560px) {
    .header {
        padding: 2.25rem 4.2% !important;
    }

    .logo {
        font-size: 2.85rem !important;
    }

    .navbar a {
        margin-left: 2rem !important;
        font-size: 1.62rem !important;
    }

    .header-actions {
        gap: 1.1rem !important;
    }

    .ai-nav-btn,
    .theme-btn {
        padding: 1rem 2rem !important;
        font-size: 1.45rem !important;
    }

    .home {
        position: relative !important;
        display: grid !important;
        grid-template-columns: minmax(470px, 44%) minmax(560px, 56%) !important;
        grid-template-areas: "content image" !important;
        align-items: center !important;
        justify-content: center !important;
        column-gap: 2.8rem !important;
        min-height: 100vh !important;
        padding: 12.2rem 5.5% 6rem !important;
        overflow: visible !important;
    }

    .home-content {
        grid-area: content !important;
        width: 100% !important;
        max-width: 540px !important;
        margin-top: 0 !important;
        justify-self: start !important;
        align-self: center !important;
        align-items: flex-start !important;
        text-align: left !important;
        z-index: 12 !important;
    }

    .hero-eyebrow {
        margin-bottom: 1.3rem !important;
    }

    .home-content h1 {
        font-size: clamp(5.6rem, 4.55vw, 6.75rem) !important;
        line-height: 0.96 !important;
        margin-top: 0.7rem !important;
    }

    .home-content h3,
    .text-animation {
        font-size: clamp(2.8rem, 2.35vw, 3.45rem) !important;
        line-height: 1.2 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .home-content p {
        max-width: 510px !important;
        font-size: 1.48rem !important;
        line-height: 1.65 !important;
    }

    .hero-signature {
        max-width: 510px !important;
    }

    .hero-actions,
    .stats-container,
    .social-icons {
        justify-content: flex-start !important;
    }

    .hero-actions {
        margin-top: 2.3rem !important;
    }

    .stats-container {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(165px, 1fr)) !important;
        max-width: 430px !important;
        gap: 1.45rem !important;
        margin-top: 2rem !important;
    }

    .stat-box {
        min-width: 0 !important;
        width: 100% !important;
        padding: 1.8rem 1.65rem !important;
    }

    .stats-container .stat-box:nth-child(3) {
        grid-column: 1 / -1 !important;
        max-width: 215px !important;
        justify-self: start !important;
    }

    .social-icons {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 1.2rem !important;
        margin-top: 2rem !important;
        width: fit-content !important;
    }

    .social-icons a {
        margin: 0 !important;
        flex: 0 0 auto !important;
    }

    .home-img {
        grid-area: image !important;
        position: relative !important;
        justify-self: end !important;
        align-self: center !important;
        width: fit-content !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 8 !important;
        display: grid !important;
        place-items: center !important;
        isolation: isolate !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    .home-img img {
        width: clamp(520px, 38vw, 610px) !important;
        height: clamp(520px, 38vw, 610px) !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        will-change: transform, box-shadow !important;
        transition: transform 0.25s ease, box-shadow 0.35s ease, filter 0.35s ease !important;
    }

    .home-img:hover img {
        box-shadow:
            0 0 30px var(--main-color),
            0 0 70px rgba(0, 255, 238, 0.58),
            0 0 120px rgba(0, 255, 238, 0.35) !important;
        filter: brightness(1.04) contrast(1.02) !important;
    }

    .image-ring {
        width: clamp(570px, 42vw, 670px) !important;
        height: clamp(570px, 42vw, 670px) !important;
        pointer-events: none !important;
    }

    .ring-two {
        width: clamp(630px, 47vw, 745px) !important;
        height: clamp(630px, 47vw, 745px) !important;
        pointer-events: none !important;
    }

    .home-img::before {
        width: clamp(660px, 50vw, 790px) !important;
        height: clamp(660px, 50vw, 790px) !important;
        pointer-events: none !important;
    }

    .hero-command-center {
        display: block !important;
        position: absolute !important;
        width: 295px !important;
        min-width: 0 !important;
        padding: 1.45rem !important;
        left: clamp(465px, 35vw, 560px) !important;
        top: clamp(520px, 64vh, 640px) !important;
        right: auto !important;
        bottom: auto !important;
        inset: auto auto auto clamp(465px, 35vw, 560px) !important;
        transform: translateY(-50%) scale(0.86) !important;
        transform-origin: left center !important;
        z-index: 14 !important;
        margin: 0 !important;
        pointer-events: auto !important;
        animation: commandFloat 5s ease-in-out infinite !important;
    }

    .command-screen {
        padding: 1.25rem !important;
    }

    .mini-bars {
        height: 78px !important;
        margin: 1.1rem 0 !important;
    }
}


@media (min-width: 1100px) and (max-width: 1560px) and (max-height: 850px) {
    .home {
        padding-top: 10.8rem !important;
        padding-bottom: 4rem !important;
    }

    .home-content h1 {
        font-size: clamp(5.2rem, 4.15vw, 6.1rem) !important;
    }

    .home-content h3,
    .text-animation {
        font-size: clamp(2.55rem, 2.1vw, 3.1rem) !important;
    }

    .home-content p {
        line-height: 1.55 !important;
        margin-top: 0.3rem !important;
    }

    .hero-signature {
        margin-top: 1rem !important;
    }

    .hero-actions {
        margin-top: 1.7rem !important;
    }

    .stats-container {
        margin-top: 1.55rem !important;
    }

    .social-icons {
        margin-top: 1.5rem !important;
    }

    .home-img img {
        width: clamp(490px, 35vw, 560px) !important;
        height: clamp(490px, 35vw, 560px) !important;
    }

    .image-ring {
        width: clamp(540px, 39vw, 625px) !important;
        height: clamp(540px, 39vw, 625px) !important;
    }

    .ring-two {
        width: clamp(595px, 43vw, 690px) !important;
        height: clamp(595px, 43vw, 690px) !important;
    }

    .hero-command-center {
        width: 280px !important;
        top: clamp(485px, 66vh, 590px) !important;
        transform: translateY(-50%) scale(0.82) !important;
    }

    .mini-bars {
        height: 68px !important;
    }
}

@media (min-width: 992px) and (max-width: 1560px) {
    .contact-buttons {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1.15rem !important;
        width: 100% !important;
        max-width: 1180px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .contact-btn {
        min-width: 0 !important;
        width: 20% !important;
        max-width: 210px !important;
        padding: 1.35rem 1.25rem !important;
        font-size: 1.42rem !important;
        white-space: nowrap !important;
        flex: 1 1 0 !important;
    }

    .contact-btn i {
        font-size: 2.05rem !important;
    }
}

/* Mobile stays simple and fast */
@media (max-width: 991px) {
    .hero-command-center {
        display: none !important;
    }

    body.site-ready .home-img {
        animation-delay: 0.1s !important;
        animation-duration: 0.55s !important;
    }

    .home-img {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .home-img img {
        will-change: auto !important;
    }
}


@media (min-width: 992px) {
    .home-img {
        perspective: 1000px !important;
        transform-style: preserve-3d !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    .home-img img {
        transform-style: preserve-3d !important;
        transform-origin: center center !important;
        transition: transform 0.12s ease-out, box-shadow 0.35s ease, filter 0.35s ease !important;
        will-change: transform, box-shadow, filter !important;
        pointer-events: auto !important;
    }

    .home-img:hover img {
        box-shadow:
            0 0 30px var(--main-color),
            0 0 70px rgba(0, 255, 238, 0.58),
            0 0 120px rgba(0, 255, 238, 0.35) !important;
        filter: brightness(1.04) contrast(1.02) !important;
    }
}
