@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;600&family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-primary: #000000;
    --bg-secondary: #141414;
    --accent: #00ff41;
    /* Terminal Green */
    --text-main: #e0e0e0;
    --text-dim: #888888;
    --border: #333333;
}

.theme-light {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --accent: #2563eb;
    --text-main: #1d1d1f;
    --text-dim: #6e6e73;
    --border: #d2d2d7;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    margin: 0;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* Animations */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--accent);
    top: 0;
    left: 0;
    opacity: 0.5;
    animation: scan 3s linear infinite;
    z-index: 50;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

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

.scroll-reveal {
    opacity: 0;
    transform: translateY(120px) rotateX(25deg) scale(0.9);
    transform-origin: top;
    filter: blur(8px);
    transition:
        opacity 0.9s ease,
        transform 1s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.9s ease;
    perspective: 1000px;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
    filter: blur(0);
}

.theme-light .education-card {
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.education-card img {
    transition: transform 0.35s ease;
}

.education-card:hover img {
    transform: scale(1.08);
}

.sgpa-shine {
    transition: .3s ease;
}

.education-card:hover .sgpa-shine {
    letter-spacing: 1px;
    font-weight: 700;
}

.gate-overlay {
    backdrop-filter: blur(20px);
    z-index: 9999;
}

.btn-primary {
    background: var(--accent);
    color: black;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.form-input {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--accent);
}

.sidebar {
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.sidebar.active {
    transform: translateX(0);
}

.skeleton {
    background: var(--bg-secondary);
    border-radius: 4px;
    height: 20px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

/* Binary Protection Tooltip */
#binary-hint {
    display: none;
}

nav {
    background: rgba(10, 10, 10, 0.5) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 4px 30px rgba(0, 255, 65, 0.05);
}

#testimonial-content {
    transition: opacity 0.4s ease;
}

#cyber-popup {
    color: #ffffff;
}

#cert-status {
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}


#cert-status:hover::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: shine 0.8s linear;
}

@keyframes shine {
    100% {
        left: 200%;
    }
}

.tab-btn {
    position: relative;
    background: transparent;
}

.tab-btn.active {
    color: var(--accent);
}

#role {
    color: #ffffff;
}

html {
    scroll-behavior: smooth;
}

#varify {
    color: #ffffff;
}

#navbar {
    color: #bebebe;
}



/* =========================
   REAL CERTIFICATE CARD
========================= */

.certificate-card {
    position: relative;
    overflow: hidden;

    width: 320px;
    min-height: 220px;

    padding: 22px;

    background: linear-gradient(180deg,
            #111111,
            #0a0a0a);

    border: 1px solid #222;
    transition: .45s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Accent Fill Animation */
.certificate-card::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 0%;

    background: var(--accent);

    transition: .45s ease;
    z-index: 0;
}

/* Shine Effect */
.certificate-card::after {
    content: "";
    position: absolute;

    top: -120%;
    left: -40%;

    width: 50%;
    height: 300%;

    background: rgba(255, 255, 255, .08);

    transform: rotate(25deg);

    transition: .8s;
    z-index: 1;
}

/* Hover */
.certificate-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
}

.certificate-card:hover::before {
    height: 100%;
}

.certificate-card:hover::after {
    left: 120%;
}

/* All Content Above Animation */
.certificate-card * {
    position: relative;
    z-index: 2;
}

/* Text Color Change */
.certificate-card:hover * {
    color: #000 !important;
}

/* =========================
   TOP SECTION
========================= */

.certificate-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.certificate-top img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.cert-status {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: var(--accent);

    border: 1px solid rgba(255, 255, 255, .08);
    padding: 4px 8px;
}

/* =========================
   TITLE
========================= */

.cert-title {
    margin-top: 20px;

    font-size: 17px;
    font-weight: 700;

    line-height: 1.4;

    color: #fff;
}

/* =========================
   COMPANY
========================= */

.cert-company {
    margin-top: 14px;

    display: inline-flex;
    align-items: center;

    width: max-content;

    padding: 4px 10px;

    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;

    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;

    color: var(--accent);

    white-space: nowrap;

    transition: .3s;
}

.cert-company::before {
    content: "◈";
    font-size: 7px;
    margin-right: 6px;
}

/* =========================
   FOOTER
========================= */

.cert-footer {
    margin-top: 25px;

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

    font-size: 10px;
    color: #888;
}

.cert-link {
    color: #4ade80;
    padding: 6px 10px;
    border: 1px solid #22c55e;
    overflow: hidden;
    position: relative;
    transition: 0.4s ease;
}

/* =========================
   WATERMARK
========================= */

.certificate-card .watermark {
    position: absolute;

    right: -20px;
    bottom: -20px;

    font-size: 90px;
    font-weight: 700;

    opacity: .03;

    pointer-events: none;
    z-index: 0;
}

.theme-light .certificate-card {
    background: #ffffff !important;
}

.theme-light .cert-title {
    color: #111111 !important;
}

.cert-card::after {
    content: "";
    position: absolute;
    top: -120%;
    left: -40%;
    width: 50%;
    height: 300%;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(25deg);
    transition: 0.8s;
}

.cert-card:hover::after {
    left: 120%;
}



.cert-link:hover::before {
    transform: scaleY(1);
}

/* Underline */
.cert-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0%;
    height: 1px;
    background: #4ade80;
    transition: 0.3s ease;
    z-index: 1;
}

.cert-link:hover::after {
    width: 100%;
}

.cert-link span,
.cert-link {
    position: relative;
    z-index: 2;
}



.nav-link {
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link::after {
    left: 50%;
    transform: translateX(-50%);

}

.nav-link:hover::after {
    width: 100%;
}

.mobile-nav-link {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.mobile-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.mobile-nav-link:hover {
    color: var(--accent);
}

.mobile-nav-link:hover::after {
    width: 100%;
}

.mobile-nav-link:hover::after {
    width: 100%;
    box-shadow: 0 0 8px var(--accent);
}

.logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
    cursor: pointer;
    color: #e5e7eb;
    /* light neutral */
    transition: opacity 0.2s ease;
}

.logo span {
    color: var(--accent);
    font-weight: 700;
}

.logo:hover {
    opacity: 0.75;
}

.stat-box {
    position: relative;
    padding: 10px 16px;
}

.stat-box::before,
.stat-box::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border: 1px solid transparent;
    transition: all 0.35s ease;
}

.stat-box::before {
    top: 0;
    left: 0;
}

.stat-box::after {
    bottom: 0;
    right: 0;
}

.stat-box:hover::before {
    width: 100%;
    height: 100%;
    border-top-color: var(--accent);
    border-left-color: var(--accent);
}

.stat-box:hover::after {
    width: 100%;
    height: 100%;
    border-bottom-color: var(--accent);
    border-right-color: var(--accent);
}

/* Default light mode */
.social-icons img {
    filter: none;
    transition: filter 0.3s ease;
}

/* Dark mode ke liye */
body.dark-theme .social-icons img {
    filter: invert(1);
}



/*  Loader */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    transition: opacity 0.4s ease;
}

/* loading animation */

/* From Uiverse.io by kennyotsu */
.card {
    /* color used to softly clip top and bottom of the .words container */
    --bg-color: #000000;
    background-color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 1.25rem;
}

.loader {
    color: rgb(124, 124, 124);
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 25px;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    height: 40px;
    padding: 10px 10px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    border-radius: 8px;
}

.words {
    overflow: hidden;
    position: relative;
}

.words::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(var(--bg-color) 10%,
            transparent 30%,
            transparent 70%,
            var(--bg-color) 90%);
    z-index: 20;
}

.word {
    display: block;
    height: 100%;
    padding-left: 6px;
    color: #97f008;
    animation: spin_4991 4s infinite;
}

@keyframes spin_4991 {
    10% {
        -webkit-transform: translateY(-102%);
        transform: translateY(-102%);
    }

    25% {
        -webkit-transform: translateY(-100%);
        transform: translateY(-100%);
    }

    35% {
        -webkit-transform: translateY(-202%);
        transform: translateY(-202%);
    }

    50% {
        -webkit-transform: translateY(-200%);
        transform: translateY(-200%);
    }

    60% {
        -webkit-transform: translateY(-302%);
        transform: translateY(-302%);
    }

    75% {
        -webkit-transform: translateY(-300%);
        transform: translateY(-300%);
    }

    85% {
        -webkit-transform: translateY(-402%);
        transform: translateY(-402%);
    }

    100% {
        -webkit-transform: translateY(-400%);
        transform: translateY(-400%);
    }
}

/* loading and */

.center-back-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.center-back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: monospace;
    font-size: 12px;
    text-decoration: none;
    transition: 0.3s;
}

.center-back-link:hover {
    background: var(--accent);
    color: black;
}

@media (max-width: 768px) {

    #experience .flex.items-center.gap-6 {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    #experience .w-20.h-20 {
        width: 56px;
        height: 56px;
    }

    #experience .font-bold.text-base {
        font-size: 14px;
    }

    #experience .text-sm {
        font-size: 12px;
        line-height: 1.6;
    }

    #experience .text-xs {
        font-size: 11px;
    }
}

/* Experience cards - light mode only */
.theme-light #experience .bg-gray-900 {
    background: #ffffff !important;
}

/* Role title - light mode only */
.theme-light #experience .font-bold.text-base {
    color: #000000 !important;
}

#experience .object-contain {
    transition: transform 0.35s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}

#experience .bg-gray-900:hover .object-contain {
    transform: scale(1.08);
}

.exp-points div {
    transition: transform .25s ease, color .25s ease;
}

.exp-points div:hover {
    transform: translateX(3px);
    color: var(--accent);
}

/* Experience Section - Desktop Cards */
@media (min-width: 1024px) {

    /* 3 Cards in one row */
    #experience .max-w-4xl {
        max-width: 1500px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    #experience .max-w-4xl>div {
        margin: 0 !important;
        height: 100%;
    }

    /* Card layout */
    #experience .max-w-4xl>div {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Logo on top */
    #experience .exp-logo {
        width: 70px;
        height: 70px;
        margin-bottom: -18px;
        flex-shrink: 0;
    }

    /* Content full width */
    #experience .flex-1 {
        width: 100%;
    }

    /* Equal height for points */
    #experience .exp-points {
        min-height: 105px;
    }

    /* Skills at bottom */
    #experience .tech-badge {
        white-space: nowrap;
    }
}

/* =========================
   LEETCODE HERO RIBBON
========================= */

.hero-ribbon {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    width: 100%;
    margin: 20px 0 28px;

    overflow: hidden;
}

.ribbon-line {
    flex: 1;
    min-width: 20px;
    height: 1px;

    background: linear-gradient(to right,
            transparent,
            var(--accent),
            transparent);

    opacity: 1.4;
}

.hero-ribbon-link {
    flex-shrink: 0;
    white-space: nowrap;

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

    gap: 10px;

    padding: 10px 18px;

    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);

    text-decoration: none;

    color: var(--text-dim);

    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: .5px;

    backdrop-filter: blur(10px);

    transition:
        transform .3s ease,
        border-color .3s ease,
        color .3s ease,
        box-shadow .3s ease;
}

.hero-ribbon-link:hover {
    color: var(--accent);
    border-color: var(--accent);


    box-shadow:
        0 0 20px rgba(255, 161, 22, .08),
        0 0 40px rgba(255, 161, 22, .03);
}

.hero-ribbon-logo {
    width: 20px;
    height: 20px;

    object-fit: contain;
    flex-shrink: 0;
}

.hero-ribbon-arrow {
    font-size: 11px;
    transition: transform .3s ease;
}

.hero-ribbon-link:hover .hero-ribbon-arrow {
    transform: translate(2px, -2px);
}


/* --------------------------------- MOBILE --------------------------------- */


@media (max-width:768px) {

    .hero-ribbon {
        gap: 10px;
        margin: 18px 0 24px;
    }

    .hero-ribbon-link {
        padding: 8px 14px;
        font-size: 11px;
        gap: 8px;
    }

    .hero-ribbon-logo {
        width: 18px;
        height: 18px;
    }
}

@media (max-width:480px) {

    .hero-ribbon {
        gap: 6px;
    }

    .hero-ribbon-link {
        padding: 7px 10px;
        font-size: 10px;
        gap: 6px;
    }

    .hero-ribbon-logo {
        width: 16px;
        height: 16px;
    }

    .hero-ribbon-arrow {
        font-size: 10px;
    }
}

.tech-badge {
    padding: 4px 10px;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;

    border: 1px solid var(--border);

    color: var(--text-dim);
    background: var(--bg-primary);

    transition: .3s;
}

.tech-badge::before {
    content: "◈";
    margin-right: 6px;
    color: var(--accent);
    opacity: .7;
}

.tech-badge:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}


/* ---------------------------- dark mode slider toggle ---------------------------- */

.switch {
    display: block;
    --width-of-switch: 3.5em;
    --height-of-switch: 2em;
    /* size of sliding icon -- sun and moon */
    --size-of-icon: 1.4em;
    /* it is like a inline-padding of switch */
    --slider-offset: 0.3em;
    position: relative;
    width: var(--width-of-switch);
    height: var(--height-of-switch);
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f4f4f5;
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: var(--size-of-icon, 1.4em);
    width: var(--size-of-icon, 1.4em);
    border-radius: 20px;
    left: var(--slider-offset, 0.3em);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(40deg, #ff0080, #ff8c00 70%);
    ;
    transition: .4s;
}

input:checked+.slider {
    background-color: #303136;
}

input:checked+.slider:before {
    left: calc(100% - (var(--size-of-icon, 1.4em) + var(--slider-offset, 0.3em)));
    background: #303136;
    /* change the value of second inset in box-shadow to change the angle and direction of the moon  */
    box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}

/* ------------------------------ .hero-avatar ------------------------------ */
.hero-avatar {
    width: clamp(160px, 85vw, 430px);
    height: clamp(160px, 85vw, 430px);

    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #111;

    margin: 32px 0;

    transform-style: preserve-3d;
    transition: transform 0.22s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transform: translateZ(20px) scale(1.02);
    transition: transform 0.22s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}


/* ---------------------------- scroll-indicator --------------------------- */
.scroll-indicator {
    margin-top: 0px;
    display: flex;
    justify-content: center;
}

.scroll-indicator span {
    width: 1px;
    height: 50px;
    background: var(--border);
    position: relative;
}

.scroll-indicator span::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 5px;
    height: 12px;
    border-radius: 10px;
    background: var(--accent);
    transform: translateX(-50%);
    animation: scrollLine 1.8s infinite;
}

@keyframes scrollLine {
    0% {
        bottom: 0;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        bottom: 38px;
        opacity: 0;
    }
}