:root {
    --bg: #040814;
    --bg-2: #081021;
    --surface: rgba(11, 18, 38, 0.58);
    --surface-2: rgba(18, 28, 56, 0.78);
    --text: #eef4ff;
    --muted: #9aa7c7;
    --border: rgba(111, 202, 255, 0.18);
    --cyan: #68e1fd;
    --violet: #8b7cff;
    --green: #37f3c1;
    --blue: #3b82f6;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    --radius: 24px;
    --max-width: 1200px;
}

body.light-theme {
    --bg: #eef6ff;
    --bg-2: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-2: rgba(255, 255, 255, 0.92);
    --text: #091224;
    --muted: #50607f;
    --border: rgba(50, 120, 255, 0.12);
    --shadow: 0 18px 50px rgba(19, 39, 84, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 15%, rgba(104, 225, 253, 0.16), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(139, 124, 255, 0.16), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(55, 243, 193, 0.10), transparent 34%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.35s ease, color 0.35s ease;
}

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

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

#particles {
    position: fixed;
    inset: 0;
    z-index: -4;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(280px 280px at var(--x, 50%) var(--y, 50%),
            rgba(104, 225, 253, 0.10),
            transparent 68%);
    z-index: -3;
}

.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.06;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.18) 0px,
            rgba(255, 255, 255, 0.18) 1px,
            transparent 2px,
            transparent 6px);
}

.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image:
        linear-gradient(rgba(104, 225, 253, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 225, 253, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 20%, transparent 90%);
}

.glass {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

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

.holo-card::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: linear-gradient(120deg,
            transparent 20%,
            rgba(104, 225, 253, 0.10) 35%,
            rgba(139, 124, 255, 0.10) 50%,
            rgba(55, 243, 193, 0.10) 65%,
            transparent 80%);
    transform: translateX(-60%) rotate(18deg);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.holo-card:hover::before {
    transform: translateX(60%) rotate(18deg);
}

.gradient-text {
    background: linear-gradient(90deg, var(--cyan), var(--violet), var(--green));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.site-header,
.section,
.site-footer {
    position: relative;
    z-index: 1;
}

.navbar {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 22px auto 0;
    padding: 14px 18px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 16px;
    z-index: 20;
}

.logo {
    width: 78px;
    height: 58px;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 0 14px rgba(104, 225, 253, 0.28));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-mark {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;
    transition: filter 0.3s ease;
}

body.light-theme .logo-mark {
    filter: invert(1) brightness(1.6);
}

.logo:hover {
    transform: translateY(-3px) rotate(-4deg);
    filter: drop-shadow(0 0 20px rgba(104, 225, 253, 0.4));
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.theme-toggle,
.menu-toggle {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-links a {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 12px;
    transition: 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(104, 225, 253, 0.08);
    box-shadow: inset 0 0 0 1px rgba(104, 225, 253, 0.14);
}

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

.menu-toggle {
    display: none;
    position: relative;
}

.menu-toggle span {
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    background: var(--text);
    border-radius: 5px;
}

.menu-toggle span {
    transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.menu-toggle span:nth-child(1) {
    top: 14px;
}

.menu-toggle span:nth-child(2) {
    top: 22px;
}

.menu-toggle span:nth-child(3) {
    top: 30px;
}

.menu-toggle.active span:nth-child(1) {
    top: 22px;
    transform: rotate(45deg);
    background: var(--cyan);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 22px;
    transform: rotate(-45deg);
    background: var(--cyan);
}

.hero {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 84px 0 42px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: center;
}

.hero-badge,
.section-label {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 14px;
    box-shadow: inset 0 0 20px rgba(104, 225, 253, 0.04);
}

.hero h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 1.04;
    margin: 18px 0 14px;
    letter-spacing: -1px;
}

.hero-description {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 720px;
}

.typewriter-line {
    margin: 18px 0 0;
    color: var(--cyan);
    font-weight: 600;
    min-height: 28px;
    text-shadow: 0 0 18px rgba(104, 225, 253, 0.18);
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 26px 0 18px;
}

.btn {
    padding: 14px 22px;
    border-radius: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.35s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -80%;
    width: 50%;
    height: 160%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: rotate(20deg);
    transition: left 0.7s ease;
}

.btn:hover::before {
    left: 130%;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.20), rgba(139, 124, 255, 0.20));
    box-shadow: 0 0 24px rgba(104, 225, 253, 0.10);
}

.btn-secondary,
.btn-outline {
    background: rgba(255, 255, 255, 0.04);
}

.hero-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-panel {
    padding: 18px;
    border-radius: 28px;
}

.hero-stats {
    display: grid;
    gap: 16px;
}

.hero-card {
    padding: 22px;
    border-radius: var(--radius);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-card:hover,
.skill-box:hover,
.about-card:hover,
.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 30px rgba(104, 225, 253, 0.10);
}

.hero-card-photo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-card-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 70%;
    flex-shrink: 0;
}

.hero-card-photo h3 {
    font-size: 1.1rem;
}

.hero-card h3 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.hero-card p {
    margin: 0;
    color: var(--muted);
}

.section {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 78px 0 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 12px 0 10px;
}

.section-heading p {
    color: var(--muted);
    max-width: 700px;
}

#contact {
    padding-top: 20px;
}

#testimonials {
    padding-top: 20px;
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    transition: 0.3s ease;
}

.filter-count {
    display: inline-block;
    min-width: 20px;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(104, 225, 253, 0.12);
    color: var(--cyan);
}

.project-card.pop {
    animation: cardPop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes cardPop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.16), rgba(139, 124, 255, 0.16));
    box-shadow: 0 0 22px rgba(104, 225, 253, 0.08);
}

.project-grid,
.skills-grid,
.about-grid,
.contact-grid {
    display: grid;
    gap: 20px;
}

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

.project-card,
.skill-box,
.about-card,
.contact-card {
    border-radius: var(--radius);
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.35s ease, opacity 0.3s ease, box-shadow 0.35s ease;
    transform-style: preserve-3d;
    position: relative;
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    box-shadow: 0 0 38px rgba(139, 124, 255, 0.16);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.project-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    text-align: center;
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.08), rgba(139, 124, 255, 0.08));
}

.project-cta-inner {
    padding: 40px 32px;
    max-width: 360px;
}

.project-cta-inner h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.project-cta-inner p {
    margin: 0 0 22px;
    color: var(--muted);
}

.project-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    max-width: calc(100% - 28px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 0 8px rgba(104, 225, 253, 0.6);
    flex-shrink: 0;
}

/* Screenshot scrolls down the site on hover, like a live preview */
.project-image img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 3.2s cubic-bezier(0.45, 0, 0.25, 1), filter 0.5s ease;
    filter: saturate(1.05);
}

.project-card:hover .project-image img {
    transform: translateY(calc(-100% + 220px));
    filter: saturate(1.18);
}

.project-num {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: rgba(5, 10, 24, 0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.project-peek {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px;
    background: linear-gradient(to top, rgba(5, 10, 24, 0.75), transparent 55%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.project-peek span {
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #06101f;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 8px 24px rgba(104, 225, 253, 0.3);
    transform: translateY(12px);
    transition: transform 0.35s ease;
}

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

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

.project-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}

.project-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.project-chips span {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan);
    background: rgba(104, 225, 253, 0.08);
    border: 1px solid rgba(104, 225, 253, 0.22);
}

.project-content h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.project-content p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 16px;
}

.project-links a {
    color: var(--cyan);
    font-weight: 700;
}

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

.skill-box,
.about-card,
.contact-card {
    padding: 24px;
}

.skill-box {
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

.skill-box h3,
.about-card h3,
.contact-card h3 {
    margin-top: 0;
}

.skill-box ul,
.about-card ul {
    padding-left: 18px;
    margin: 0;
    color: var(--muted);
}

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

.form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

label {
    color: var(--muted);
    font-size: 0.95rem;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    outline: none;
    transition: 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: rgba(104, 225, 253, 0.45);
    box-shadow: 0 0 0 4px rgba(104, 225, 253, 0.07);
}

.site-footer {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 30px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
}

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

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

@media (max-width: 1024px) {

    .hero,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .project-cta {
        grid-column: 1 / -1;
    }
}

/* ---------- Preloader ---------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: linear-gradient(180deg, var(--bg), var(--bg-2));
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-mark {
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(104, 225, 253, 0.3));
    animation: preloaderPulse 1.8s ease-in-out infinite;
}

body.light-theme .preloader-mark {
    filter: invert(1) brightness(1.6) drop-shadow(0 0 20px rgba(104, 225, 253, 0.3));
}

@keyframes preloaderPulse {

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

    50% {
        transform: scale(1.06);
    }
}

.preloader-bar {
    width: 160px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.preloader-bar span {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    animation: preloaderSlide 1.1s ease-in-out infinite;
}

@keyframes preloaderSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(350%);
    }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    z-index: 60;
    background: linear-gradient(90deg, var(--cyan), var(--violet), var(--green));
    box-shadow: 0 0 12px rgba(104, 225, 253, 0.5);
    transition: width 0.1s linear;
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(104, 225, 253, 0.5);
    transition: opacity 0.3s ease, transform 0.18s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-ring.hovering {
    width: 52px;
    height: 52px;
    border-color: rgba(139, 124, 255, 0.7);
    background: rgba(104, 225, 253, 0.06);
}

body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring {
    opacity: 1;
}

@media (pointer: fine) {
    body.cursor-active {
        cursor: none;
    }

    body.cursor-active a,
    body.cursor-active button {
        cursor: none;
    }
}

/* ---------- Command palette trigger ---------- */
.cmdk-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.cmdk-trigger::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cmdk-trigger:hover {
    color: var(--text);
}

/* ---------- Command palette overlay ---------- */
.cmdk-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    background: rgba(2, 5, 14, 0.6);
    backdrop-filter: blur(4px);
}

.cmdk-overlay.open {
    display: flex;
}

.cmdk-panel {
    width: min(560px, calc(100% - 32px));
    border-radius: 20px;
    overflow: hidden;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
}

.cmdk-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.cmdk-icon {
    color: var(--cyan);
    font-weight: 700;
}

.cmdk-input-row input {
    flex: 1;
    border: none;
    background: none;
    padding: 0;
    box-shadow: none;
}

.cmdk-input-row input:focus {
    box-shadow: none;
}

.cmdk-esc {
    font-size: 0.75rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
}

.cmdk-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
}

.cmdk-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--muted);
    cursor: pointer;
    transition: 0.2s ease;
}

.cmdk-list li kbd {
    font-size: 0.75rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
}

.cmdk-list li:hover,
.cmdk-list li.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.14), rgba(139, 124, 255, 0.14));
}

.cmdk-list li.hidden {
    display: none;
}

/* ---------- Tech marquee ---------- */
.marquee-band {
    width: 100%;
    overflow: hidden;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 14px;
    animation: marqueeScroll 26s linear infinite;
}

.marquee-track span {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-band:hover .marquee-track {
    animation-play-state: paused;
}

/* ---------- Stats section ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    padding: 26px 20px;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 30px rgba(104, 225, 253, 0.1);
}

.stat-card h3 {
    margin: 0 0 6px;
    font-size: 2.2rem;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
}

/* ---------- Testimonials ---------- */
.testimonial-carousel {
    position: relative;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
}

.testimonial-card {
    flex: 0 0 100%;
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.testimonial-stars {
    color: var(--green);
    letter-spacing: 4px;
    margin: 0 0 14px;
}

.testimonial-quote {
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0 0 18px;
}

.testimonial-author {
    color: var(--cyan);
    font-weight: 700;
}

.testimonial-author span {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 0.9rem;
    margin-top: 2px;
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 22px;
}

.testimonial-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
}

.testimonial-dots {
    display: flex;
    gap: 8px;
}

.testimonial-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: 0.3s ease;
}

.testimonial-dots span.active {
    background: var(--cyan);
    width: 22px;
    border-radius: 999px;
}

/* ---------- Toast notifications ---------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 18px;
    border-radius: 14px;
    color: var(--text);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    color: var(--green);
    font-weight: 700;
}

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text);
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top span {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

.back-to-top-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.back-to-top-ring circle {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: var(--progress, 100);
    transition: stroke-dashoffset 0.1s linear;
}

.whatsapp-btn {
    position: fixed;
    left: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--green);
    box-shadow: var(--shadow), 0 0 0 1px rgba(55, 243, 193, 0.25) inset, 0 0 26px rgba(55, 243, 193, 0.35);
    z-index: 50;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.whatsapp-btn svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(55, 243, 193, 0.6));
}

.whatsapp-btn-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--green);
    animation: whatsappPing 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes whatsappPing {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }

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

.whatsapp-btn:hover {
    color: #04140f;
    background: var(--green);
    transform: translateY(-4px);
    box-shadow: 0 12px 34px rgba(55, 243, 193, 0.5), 0 0 40px rgba(55, 243, 193, 0.45);
}

.whatsapp-btn:hover svg {
    filter: none;
}

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

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 74px;
        right: 0;
        left: 0;
        margin: 0 16px;
        padding: 10px;
        border-radius: 18px;
        flex-direction: column;
        gap: 0;
        background: rgba(6, 10, 24, 0.96);
        border: 1px solid var(--border);
        backdrop-filter: blur(14px);
        box-shadow: var(--shadow), 0 0 40px rgba(104, 225, 253, 0.08);
        overflow: hidden;
    }

    body.light-theme .nav-links {
        background: rgba(255, 255, 255, 0.95);
    }

    .nav-links.open {
        display: flex;
        animation: navDropdownIn 0.35s ease;
    }

    @keyframes navDropdownIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .nav-links a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 15px 12px;
        border-radius: 12px;
        border-bottom: 1px solid var(--border);
        position: relative;
        opacity: 0;
        animation: navLinkIn 0.4s ease forwards;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a:nth-child(1) { animation-delay: 0.05s; }
    .nav-links a:nth-child(2) { animation-delay: 0.1s; }
    .nav-links a:nth-child(3) { animation-delay: 0.15s; }
    .nav-links a:nth-child(4) { animation-delay: 0.2s; }
    .nav-links a:nth-child(5) { animation-delay: 0.25s; }

    @keyframes navLinkIn {
        from {
            opacity: 0;
            transform: translateX(-8px);
        }

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

    .nav-links a::before {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        bottom: 8px;
        width: 3px;
        border-radius: 999px;
        background: var(--cyan);
        transform: scaleY(0);
        transition: transform 0.25s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(104, 225, 253, 0.08);
        box-shadow: none;
        padding-left: 18px;
    }

    .nav-links a:hover::before,
    .nav-links a.active::before {
        transform: scaleY(1);
    }

    .nav-link-index {
        display: inline-block;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        color: var(--cyan);
        opacity: 0.7;
    }

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

    .hero {
        padding-top: 50px;
    }

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

    .cmdk-trigger span {
        display: none;
    }

    .cmdk-trigger {
        width: 46px;
        padding: 0;
        justify-content: center;
    }

    .testimonial-card {
        padding: 24px 20px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
    }

    .whatsapp-btn {
        left: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
    }

    .site-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding-bottom: 90px;
    }
}
/* ---------- GitHub projects ---------- */
.gh-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.gh-card {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.gh-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--cyan), transparent 40%, transparent 60%, var(--violet));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gh-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(104, 225, 253, 0.14);
}

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

/* Screenshot framed as an app window */
.gh-media {
    padding: 18px 18px 0;
}

.gh-window {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0b1222;
}

.gh-window-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--border);
}

.gh-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.gh-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
}

.gh-dots i:nth-child(2) { background: #febc2e; }
.gh-dots i:nth-child(3) { background: #28c840; }

.gh-path {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.75rem;
    color: #9aa7c7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-window img {
    height: 190px;
    object-fit: cover;
    object-position: top;
    transition: transform 0.65s ease;
}

.gh-card:hover .gh-window img {
    transform: scale(1.04);
}

/* Card body */
.gh-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}

.gh-body h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.gh-body > p {
    margin: 0 0 14px;
    color: var(--muted);
}

.gh-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 12px;
    font-size: 0.82rem;
}

.gh-lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 600;
}

.gh-lang i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lang);
}

.gh-topic,
.gh-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
}

.gh-topic {
    color: var(--cyan);
    background: rgba(104, 225, 253, 0.1);
    border: 1px solid rgba(104, 225, 253, 0.25);
}

.gh-badge {
    color: #04101c;
    background: linear-gradient(135deg, var(--cyan), var(--green));
}

.gh-features {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
}

.gh-features li {
    position: relative;
    padding-left: 24px;
}

.gh-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 1px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--green);
    background: rgba(55, 243, 193, 0.12);
}

.gh-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.gh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.gh-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.gh-btn:hover {
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.gh-btn-primary {
    color: #04101c;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
}

.gh-btn-primary:hover {
    border-color: transparent;
    box-shadow: 0 0 22px rgba(104, 225, 253, 0.35);
}

/* Featured card: side-by-side, full width */
.gh-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
}

.gh-featured .gh-media {
    padding: 22px 0 22px 22px;
}

.gh-featured .gh-window,
.gh-featured .gh-window img {
    height: 100%;
}

.gh-featured .gh-window {
    display: flex;
    flex-direction: column;
}

.gh-featured .gh-window img {
    min-height: 280px;
    flex: 1;
}

.gh-featured .gh-body {
    padding: 28px 30px;
    justify-content: center;
}

.gh-featured .gh-body h3 {
    font-size: 1.6rem;
}

/* Wide bento card: spans two columns, screenshot beside the details */
.gh-wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: stretch;
}

.gh-wide .gh-media {
    padding: 18px 0 18px 18px;
}

.gh-wide .gh-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gh-wide .gh-window img {
    flex: 1;
    height: 100%;
    min-height: 260px;
    object-position: left top;
}

.gh-wide .gh-body {
    justify-content: center;
}

.gh-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(104, 225, 253, 0.05);
    border: 1px dashed rgba(104, 225, 253, 0.3);
}

.gh-flow span {
    padding: 5px 10px;
    border-radius: 8px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.gh-flow b {
    color: var(--cyan);
}

/* "See more" profile banner */
.gh-profile {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    background: linear-gradient(135deg, rgba(104, 225, 253, 0.1), rgba(139, 124, 255, 0.1));
}

.gh-profile-mark {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    fill: var(--text);
}

.gh-profile h3 {
    margin: 0 0 2px;
    font-size: 1.15rem;
}

.gh-profile p {
    margin: 0;
    color: var(--muted);
}

.gh-profile-link {
    margin-left: auto;
    font-weight: 700;
    color: var(--cyan);
    white-space: nowrap;
}

.gh-profile-link span {
    display: inline-block;
    transition: transform 0.25s ease;
}

.gh-profile:hover .gh-profile-link span {
    transform: translateX(4px);
}

body.light-theme .project-chips span {
    color: #1769c2;
    background: rgba(50, 120, 255, 0.07);
    border-color: rgba(50, 120, 255, 0.2);
}

body.light-theme .gh-btn {
    background: rgba(255, 255, 255, 0.6);
}

body.light-theme .gh-features li::before {
    color: #0b9b74;
}

@media (max-width: 1024px) {
    .gh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Two columns: only the first wide card stays wide so rows stay full */
    .gh-wide:not(:first-child) {
        grid-column: auto;
        display: flex;
    }

    .gh-wide:not(:first-child) .gh-media {
        padding: 18px 18px 0;
    }

    .gh-wide:not(:first-child) .gh-window img {
        min-height: 0;
        height: 190px;
    }
}

@media (max-width: 760px) {
    .gh-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gh-featured,
    .gh-wide {
        grid-column: auto;
        grid-template-columns: minmax(0, 1fr);
    }

    .gh-wide .gh-media {
        padding: 18px 18px 0;
    }

    .gh-wide .gh-window img {
        min-height: 0;
        height: 190px;
    }

    .gh-featured .gh-media {
        padding: 18px 18px 0;
    }

    .gh-featured .gh-window img {
        min-height: 0;
        height: 200px;
    }

    .gh-featured .gh-body {
        padding: 20px 22px 22px;
    }

    .gh-profile {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gh-profile-link {
        margin-left: 0;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gh-card,
    .gh-card:hover,
    .gh-window img,
    .gh-card:hover .gh-window img {
        transition: none;
        transform: none;
    }

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

    .project-card.pop {
        animation: none;
    }
}

/* ==========================================================
   UX refresh — clearer buttons, layout and contact options
   ========================================================== */

/* Buttons: readable text and one clear primary action */
.btn {
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    color: #04101c;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 8px 28px rgba(104, 225, 253, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 10px 34px rgba(104, 225, 253, 0.38);
}

.btn-secondary:hover,
.btn-outline:hover {
    border-color: rgba(104, 225, 253, 0.45);
    background: rgba(104, 225, 253, 0.08);
}

button.btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

/* Nav: logo | links | actions, with a Hire Me button */
.nav-cta {
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 0.95rem;
}

@media (min-width: 769px) {
    .navbar {
        gap: 16px;
    }

    .logo {
        order: 1;
    }

    .nav-links {
        order: 2;
        margin-left: auto;
    }

    .nav-actions {
        order: 3;
    }
}

@media (max-width: 1100px) and (min-width: 769px) {
    .nav-links a {
        padding: 10px 10px;
    }

    .cmdk-trigger span {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-cta {
        display: none;
    }
}

/* Projects: show full descriptions, CTA as a full-width banner */
.project-content p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.project-cta {
    grid-column: 1 / -1;
    min-height: 0;
    text-align: left;
}

.project-cta-inner {
    max-width: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    flex-wrap: wrap;
}

.project-cta-inner h3 {
    flex-basis: 100%;
    margin-bottom: -12px;
    font-size: 1.6rem;
}

.project-cta-inner p {
    flex: 1 1 420px;
    margin: 0;
    max-width: 640px;
}

/* Contact: clear, clickable options */
.contact-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--muted);
}

.status-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(55, 243, 193, 0.15);
}

.contact-list {
    display: grid;
    gap: 10px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
    min-width: 0;
}

a.contact-row:hover {
    border-color: rgba(104, 225, 253, 0.45);
    background: rgba(104, 225, 253, 0.07);
    transform: translateX(4px);
}

.contact-row > span:last-child {
    display: grid;
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.contact-row small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.contact-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cyan);
    background: rgba(104, 225, 253, 0.10);
}

/* Footer alignment */
.site-footer {
    align-items: center;
}

.site-footer p {
    margin: 0;
}

.site-footer a:hover {
    color: var(--cyan);
}
