/* =====================================================================
   Brijkishor Sah — Portfolio
   Premium dark theme · Bootstrap 5.3 layer on top
   ===================================================================== */

:root {
    --bg: #0a0a12;
    --bg-alt: #0f0f1c;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.10);
    --text: #e7e7f0;
    --muted: #9aa0b5;
    --grad-1: #6c4cff;
    --grad-2: #b34cff;
    --grad-3: #2dd4ff;
    --gradient: linear-gradient(135deg, var(--grad-1) 0%, var(--grad-2) 55%, var(--grad-3) 120%);
    --shadow: 0 22px 60px -20px rgba(0, 0, 0, 0.65);
    --radius: 18px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --nav-offset: 88px;

    /* Glass design tokens */
    --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025) 45%, rgba(255, 255, 255, 0.05));
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --glass-blur: blur(18px) saturate(160%);
    --glass-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
}

* { scroll-behavior: smooth; }
html { scroll-padding-top: calc(var(--nav-offset) + 1.25rem); }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    line-height: 1.65;
}

/* ---------- Global animated background scene ---------- */
.bg-scene {
    position: fixed; inset: 0; z-index: -1;
    overflow: hidden; pointer-events: none;
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(108, 76, 255, .10), transparent 60%),
        var(--bg);
}
.bg-orb {
    position: absolute; border-radius: 50%;
    filter: blur(110px); opacity: .38;
    will-change: transform;
    animation: orb-drift 26s ease-in-out infinite alternate;
}
.bg-orb-1 { width: 560px; height: 560px; background: var(--grad-1); top: -18%; left: -12%; }
.bg-orb-2 { width: 480px; height: 480px; background: var(--grad-2); top: 30%; right: -14%; animation-delay: -7s; animation-duration: 32s; }
.bg-orb-3 { width: 440px; height: 440px; background: var(--grad-3); bottom: -20%; left: 18%; opacity: .22; animation-delay: -14s; animation-duration: 38s; }
.bg-orb-4 { width: 320px; height: 320px; background: #ff4c8b; top: 58%; left: 44%; opacity: .14; animation-delay: -20s; animation-duration: 30s; }
@keyframes orb-drift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(6vw, -4vh) scale(1.12); }
    66%  { transform: translate(-4vw, 5vh) scale(.94); }
    100% { transform: translate(3vw, -6vh) scale(1.06); }
}
.bg-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 80%);
    opacity: .3;
    animation: grid-pan 60s linear infinite;
}
@keyframes grid-pan { from { background-position: 0 0, 0 0; } to { background-position: 64px 64px, 64px 64px; } }
.bg-noise {
    position: absolute; inset: 0; opacity: .04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, .navbar-brand { font-family: "Sora", "Plus Jakarta Sans", sans-serif; }

::selection { background: var(--grad-2); color: #fff; }

.text-grad {
    background: linear-gradient(120deg, var(--grad-1), var(--grad-2), var(--grad-3), var(--grad-2), var(--grad-1));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: grad-shift 8s ease-in-out infinite;
}
@keyframes grad-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.link-grad {
    color: var(--grad-3);
    text-decoration: none;
    font-weight: 600;
    transition: opacity .2s var(--ease);
}
.link-grad:hover { opacity: .8; }

/* ---------- Scroll progress + back-to-top ---------- */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: var(--gradient); z-index: 2000; transition: width .1s linear;
}
.btn-to-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 1500;
    width: 48px; height: 48px; border: 0; border-radius: 50%;
    background: var(--gradient); color: #fff; font-size: 1.1rem;
    display: grid; place-items: center; cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(16px);
    transition: all .35s var(--ease); box-shadow: var(--shadow);
}
.btn-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.btn-to-top:hover { transform: translateY(-4px) scale(1.05); }

/* ---------- Navbar ---------- */
.nav-glass {
    padding: 1rem 0;
    transition: all .4s var(--ease);
    background: transparent;
}
.nav-glass.scrolled {
    padding: .55rem 0;
    background: linear-gradient(180deg, rgba(14, 14, 26, 0.72), rgba(10, 10, 18, 0.62));
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight), 0 12px 40px -18px rgba(0, 0, 0, .6);
}
.brand-mark {
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--gradient); color: #fff;
    font-weight: 800; font-size: .95rem; letter-spacing: .5px;
}
.navbar-brand .brand-text { color: var(--text); font-size: 1.15rem; }
.navbar .nav-link {
    color: var(--muted); font-weight: 600; font-size: .95rem;
    padding: .5rem .9rem !important; border-radius: 10px;
    position: relative; transition: color .25s var(--ease);
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--text); }
.navbar .nav-link.active::after {
    content: ""; position: absolute; left: 50%; bottom: 2px;
    width: 18px; height: 2px; border-radius: 2px;
    background: var(--gradient); transform: translateX(-50%);
}
.navbar-toggler { color: var(--text); }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Buttons ---------- */
.btn-grad {
    background: var(--gradient); border: 0; color: #fff; font-weight: 700;
    border-radius: 12px; position: relative; overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(108, 76, 255, .6);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-grad::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -80%;
    width: 50%; transform: skewX(-22deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transition: left .6s var(--ease);
    pointer-events: none;
}
.btn-grad:hover::before { left: 130%; }
.btn-grad:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 40px -12px rgba(179, 76, 255, .7); }
.btn-grad:active { transform: translateY(-1px); }
.btn-outline-light {
    border-radius: 12px; font-weight: 600; border-color: var(--glass-border);
    background: rgba(255, 255, 255, .04);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: all .3s var(--ease);
}
.btn-outline-light:hover { background: var(--surface-2); color: var(--text); border-color: var(--grad-2); transform: translateY(-2px); }

/* ---------- Sections ---------- */
.section { padding: 6.5rem 0; position: relative; }
.section-alt {
    background: linear-gradient(180deg, rgba(15, 15, 28, 0), rgba(15, 15, 28, .55) 12%, rgba(15, 15, 28, .55) 88%, rgba(15, 15, 28, 0));
    border-top: 1px solid rgba(255, 255, 255, .05);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.lead-sm { font-size: 1.05rem; }

.section-heading .eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700;
    letter-spacing: 3px; text-transform: uppercase; color: var(--grad-3);
    margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 0; }
.title-underline {
    display: block; width: 64px; height: 4px; border-radius: 4px;
    background: var(--gradient); margin: 1rem auto 0;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero .container { position: relative; z-index: 1; }
.orb {
    position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
    animation: float 14s ease-in-out infinite;
}
.orb-1 { width: 460px; height: 460px; background: var(--grad-1); top: -120px; left: -80px; }
.orb-2 { width: 420px; height: 420px; background: var(--grad-2); bottom: -140px; right: -60px; animation-delay: -7s; }
.grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
    opacity: .35;
}
@keyframes float { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-30px) translateX(20px); } }

.hero-greeting { font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.wave { display: inline-block; animation: wave 2.5s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 30% { transform: rotate(14deg); } }
.hero-title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; line-height: 1.08; margin-bottom: .5rem; }
.hero-subtitle { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 700; color: var(--muted); min-height: 1.6em; }
.typed::after { content: "|"; color: var(--grad-3); animation: blink 1s step-end infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lead { color: var(--muted); font-size: 1.1rem; max-width: 540px; margin-top: 1rem; }
.hero-cta { flex-wrap: nowrap !important; }
.hero-cta .btn { flex-shrink: 0; white-space: nowrap; font-size: .95rem; }
@media (min-width: 992px) {
    .hero-cta .btn { font-size: 1rem; }
}
@media (max-width: 575.98px) {
    .hero-cta { flex-wrap: wrap !important; }
    .hero-cta .btn { width: 100%; white-space: normal; }
}

/* ---------- Legal / policy pages (editorial pro layout) ---------- */
.legal-page--pro {
    position: relative;
    padding: calc(var(--nav-offset) + 2.5rem) 0 4.5rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(108, 76, 255, .12), transparent 70%),
        var(--bg);
}
.legal-shell {
    max-width: 1140px;
    position: relative;
    z-index: 1;
}

.legal-page--pro .breadcrumb-nav { margin-bottom: 1.75rem; }
.legal-page--pro .breadcrumb-list {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem;
    list-style: none; padding: 0; margin: 0; font-size: .82rem;
    background: transparent; border: 0; border-radius: 0;
}
.legal-page--pro .breadcrumb-item a {
    color: var(--muted); font-weight: 500;
}
.legal-page--pro .breadcrumb-item a:hover { color: var(--grad-3); text-decoration: none; }
.legal-page--pro .breadcrumb-item.is-active span { color: var(--text); }

/* Masthead */
.legal-masthead {
    margin-bottom: 2.25rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.legal-masthead-grid {
    display: flex; flex-wrap: wrap; align-items: flex-end;
    justify-content: space-between; gap: 1.5rem 2rem;
    margin-bottom: 1.35rem;
}
.legal-brand-lockup {
    display: flex; align-items: center; gap: 1.15rem;
}
.legal-app-mark {
    width: 64px; height: 64px; border-radius: 18px;
    display: grid; place-items: center; font-size: 1.45rem; color: #fff;
    background: #12121f;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 40px -24px rgba(0, 0, 0, .8);
}
.legal-app-mark i { color: var(--grad-3); }
.legal-doc-kicker {
    margin: 0 0 .35rem; font-size: .72rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--grad-3);
}
.legal-doc-title {
    margin: 0; font-family: "Sora", sans-serif;
    font-size: clamp(2rem, 5vw, 3rem); font-weight: 800;
    line-height: 1.05; letter-spacing: -.02em;
}
.legal-doc-subtitle {
    margin: .4rem 0 0; font-size: 1.05rem; font-weight: 500; color: var(--muted);
}
.legal-meta-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: .55rem;
}
.legal-meta-list li {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .84rem; font-weight: 500; color: var(--muted);
}
.legal-meta-list i { color: rgba(45, 212, 255, .85); font-size: .95rem; }

.legal-lede {
    max-width: 720px; margin: 0 0 1.35rem;
    font-size: 1.08rem; line-height: 1.75; color: #b4b9cb;
}
.legal-pill-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.legal-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .45rem .9rem; border-radius: 999px;
    font-size: .78rem; font-weight: 600; color: var(--text);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .09);
}
.legal-pill i { color: var(--grad-3); font-size: .85rem; }

/* Document frame */
.legal-doc-frame {
    display: grid; grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    background: rgba(12, 12, 20, .72);
    box-shadow: 0 40px 100px -60px rgba(0, 0, 0, .9);
    overflow: hidden;
}

/* Left rail navigation */
.legal-rail {
    position: relative;
    padding: 1.65rem 1.25rem 1.65rem 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .02);
}
.legal-rail-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: 1rem;
}
.legal-rail-label {
    margin: 0; font-size: .72rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.legal-rail-toggle {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .75rem; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font-size: .8rem; font-weight: 600; cursor: pointer;
}
.legal-rail-progress {
    height: 2px; border-radius: 2px; margin-bottom: 1.15rem;
    background: rgba(255, 255, 255, .08); overflow: hidden;
}
.legal-rail-progress-bar {
    display: block; height: 100%; width: 0;
    background: var(--grad-3);
    transition: width .15s linear;
}
.legal-rail-nav.collapse { transition: none; }
@media (min-width: 992px) {
    .legal-rail { position: sticky; top: calc(var(--nav-offset) + 1.5rem); align-self: start; }
    .legal-rail-nav.collapse {
        display: block !important; height: auto !important; visibility: visible !important;
    }
}
.legal-rail-list {
    list-style: none; margin: 0; padding: 0;
    max-height: calc(100vh - var(--nav-offset) - 8rem);
    overflow-y: auto; scrollbar-width: thin;
    scrollbar-color: rgba(45, 212, 255, .35) transparent;
}
.legal-rail-list li + li { margin-top: .15rem; }
.legal-rail-link {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .55rem .65rem .55rem .5rem;
    border-radius: 10px; text-decoration: none;
    color: var(--muted); font-size: .84rem; font-weight: 500; line-height: 1.4;
    border-left: 2px solid transparent;
    transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
    cursor: pointer;
}
.legal-rail-index {
    flex-shrink: 0; width: 1.65rem;
    font-family: "Sora", sans-serif; font-size: .7rem; font-weight: 700;
    color: rgba(154, 160, 181, .65); padding-top: .1rem;
    transition: color .2s var(--ease);
}
.legal-rail-text { flex: 1; }
.legal-rail-link:hover {
    color: var(--text); background: rgba(255, 255, 255, .04);
}
.legal-rail-link.is-active {
    color: #fff; background: rgba(45, 212, 255, .08);
    border-left-color: var(--grad-3);
}
.legal-rail-link.is-active .legal-rail-index { color: var(--grad-3); }

/* Article content */
.legal-article {
    padding: 2rem 2.25rem 1.5rem;
    min-width: 0;
}
.legal-block {
    padding: 1.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    scroll-margin-top: calc(var(--nav-offset) + 1.5rem);
}
.legal-block--last { border-bottom: 0; }
.legal-block-header {
    display: grid; grid-template-columns: auto 1fr; gap: 1rem;
    align-items: baseline; margin-bottom: 1rem;
}
.legal-block-index {
    font-family: "Sora", sans-serif; font-size: .78rem; font-weight: 800;
    letter-spacing: .08em; color: rgba(45, 212, 255, .75);
    padding-top: .25rem;
}
.legal-block h2 {
    margin: 0; font-family: "Sora", sans-serif;
    font-size: 1.35rem; font-weight: 700; line-height: 1.3;
    letter-spacing: -.01em;
}
.legal-block-body p {
    margin: 0 0 1rem; padding-left: 2.65rem;
    color: #a8afc2; font-size: .97rem; line-height: 1.82;
}
.legal-block-body p:last-child { margin-bottom: 0; }
.legal-block-body ul {
    margin: 0 0 1rem; padding: 0 0 0 2.65rem;
    list-style: none; display: grid; gap: .45rem;
}
.legal-block-body li {
    position: relative; padding-left: 1.1rem;
    color: #a8afc2; font-size: .95rem; line-height: 1.7;
}
.legal-block-body li::before {
    content: ""; position: absolute; left: 0; top: .62rem;
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(45, 212, 255, .75);
}
.legal-outlink {
    display: inline-flex; align-items: center; gap: .35rem;
    color: var(--grad-3); font-weight: 600; text-decoration: none;
    border-bottom: 1px solid rgba(45, 212, 255, .35);
    transition: color .2s var(--ease), border-color .2s var(--ease);
}
.legal-outlink:hover { color: #fff; border-bottom-color: #fff; }
.legal-outlink i { font-size: .75rem; }

.legal-contact-grid {
    margin: .25rem 0 0 2.65rem; padding: 1.1rem 1.2rem;
    border-radius: 14px; background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    display: grid; gap: .85rem;
}
.legal-contact-row {
    display: grid; grid-template-columns: 110px 1fr; gap: .75rem;
    align-items: baseline;
}
.legal-contact-row dt {
    margin: 0; font-size: .74rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.legal-contact-row dd {
    margin: 0; font-size: .95rem; font-weight: 600; color: var(--text);
}
.legal-contact-row dd a {
    color: var(--text); text-decoration: none;
    border-bottom: 1px solid rgba(45, 212, 255, .3);
}
.legal-contact-row dd a:hover { color: var(--grad-3); }

.legal-article-foot {
    display: flex; align-items: flex-start; gap: .75rem;
    margin-top: 1.5rem; padding: 1rem 1.1rem;
    border-radius: 12px; font-size: .86rem; line-height: 1.6; color: var(--muted);
    background: rgba(45, 212, 255, .05); border: 1px solid rgba(45, 212, 255, .14);
}
.legal-article-foot i {
    flex-shrink: 0; margin-top: .15rem; color: var(--grad-3);
}

@media (max-width: 991.98px) {
    .legal-page--pro { padding: calc(var(--nav-offset) + 1.75rem) 0 3rem; }
    .legal-doc-frame {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }
    .legal-rail {
        padding: 1.15rem 1.1rem; border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }
    .legal-rail-list { max-height: none; }
    .legal-article { padding: 1.35rem 1.15rem 1rem; }
    .legal-block-body p,
    .legal-block-body ul,
    .legal-contact-grid { padding-left: 0; margin-left: 0; }
    .legal-block-header { gap: .65rem; }
    .legal-contact-row { grid-template-columns: 1fr; gap: .2rem; }
}

@media (max-width: 575.98px) {
    .legal-masthead-grid { flex-direction: column; align-items: flex-start; }
    .legal-brand-lockup { align-items: flex-start; }
    .legal-doc-title { font-size: 1.85rem; }
    .legal-block h2 { font-size: 1.15rem; }
}

/* ---------- CalcSuite standalone page ---------- */
.calcsuite-standalone {
    --nav-offset: 64px;
    background: var(--bg);
}
.cs-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
    background: rgba(10, 10, 18, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cs-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .85rem 0;
}
.cs-brand { display: flex; align-items: center; gap: .75rem; }
.cs-brand-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.1rem;
    color: var(--grad-3); background: rgba(45, 212, 255, .1);
    border: 1px solid rgba(45, 212, 255, .22);
}
.cs-brand-name {
    margin: 0; font-family: "Sora", sans-serif;
    font-size: 1rem; font-weight: 700; line-height: 1.2;
}
.cs-brand-tag {
    margin: .1rem 0 0; font-size: .74rem; font-weight: 500; color: var(--muted);
}
.cs-header-doc {
    margin: 0; font-size: .78rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--grad-3);
}
.cs-footer {
    margin-top: 2rem;
    padding: 1.5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .02);
}
.cs-footer-inner {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: .5rem 1.5rem;
}
.cs-footer-copy,
.cs-footer-dev {
    margin: 0; font-size: .82rem; color: var(--muted);
}
.cs-footer-dev { font-weight: 600; }
.legal-page--standalone {
    padding: calc(var(--nav-offset) + 1.75rem) 0 2rem;
}
.calcsuite-standalone .cs-to-top { right: 20px; bottom: 20px; }

@media (max-width: 575.98px) {
    .cs-header-inner { align-items: flex-start; flex-direction: column; }
    .cs-header-doc { align-self: flex-start; }
}

.hero-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-card {
    flex: 1 1 0; min-width: 150px;
    display: flex; align-items: center; gap: .85rem;
    padding: 1rem 1.15rem; border-radius: 16px;
    background: linear-gradient(150deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
    border: 1px solid var(--border); backdrop-filter: blur(12px);
    position: relative; overflow: hidden;
    transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.stat-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gradient); transform: scaleX(0); transform-origin: left;
    transition: transform .5s var(--ease);
}
.stat-card:hover { transform: translateY(-5px); border-color: rgba(179,76,255,.45); box-shadow: 0 18px 40px -22px rgba(108,76,255,.7); }
.stat-card:hover::before { transform: scaleX(1); }
.stat-ic {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 1.15rem; color: var(--grad-3);
    background: rgba(108,76,255,.14); border: 1px solid rgba(108,76,255,.28);
}
.stat-meta { display: flex; flex-direction: column; line-height: 1.1; }
.stat-value { display: flex; align-items: baseline; }
.stat-num, .stat-plus { font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.9rem; line-height: 1; }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 600; margin-top: .25rem; letter-spacing: .2px; }

.hero-photo-wrap { position: relative; display: inline-block; }
.photo-ring {
    position: absolute; inset: -14px; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--grad-1), var(--grad-2), var(--grad-3), var(--grad-1));
    animation: spin 8s linear infinite; filter: blur(2px); opacity: .85;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-photo {
    position: relative; width: min(340px, 78vw); aspect-ratio: 1; border-radius: 50%;
    object-fit: cover; border: 6px solid var(--bg); background: var(--bg-alt);
    box-shadow: var(--shadow);
}
.floating-badge {
    position: absolute; z-index: 2; background: rgba(15,15,28,.55);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--glass-border); padding: .45rem .8rem; border-radius: 12px;
    font-size: .82rem; font-weight: 600; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--shadow);
    animation: float 6s ease-in-out infinite;
}
.floating-badge i { color: var(--grad-3); }

/* 8 badges distributed around the circular photo */
.badge-1 { top: -5%;  left: 50%; animation: floatX 6s ease-in-out infinite; animation-delay: -0.5s; }
.badge-2 { top: 12%;  left: -12%; animation-delay: -1s; }
.badge-3 { top: 12%;  right: -12%; animation-delay: -1.5s; }
.badge-4 { top: 46%;  left: -20%; animation-delay: -2s; }
.badge-5 { top: 46%;  right: -16%; animation-delay: -2.5s; }
.badge-6 { bottom: 12%; left: -14%; animation-delay: -3s; }
.badge-7 { bottom: 12%; right: -10%; animation-delay: -3.5s; }
.badge-8 { bottom: -5%; left: 50%; animation: floatX 6s ease-in-out infinite; animation-delay: -4s; }

/* Keeps horizontally-centered badges centered while floating */
@keyframes floatX {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -22px); }
}

/* ---------- Cards & shared ---------- */
/* Shared glassy surface for every card type */
.glass-card, .work-card, .project-card, .strength-card,
.academic-card, .edu-card, .hire-service, .stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-highlight), var(--glass-shadow);
    position: relative;
}
/* Mouse-tracking spotlight (coords set from JS via --mx / --my) */
.glass-card::after, .work-card::after, .project-card::after, .strength-card::after,
.academic-card::after, .edu-card::after, .hire-service::after, .stat-card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .08), transparent 65%);
    opacity: 0; transition: opacity .4s var(--ease);
    pointer-events: none; z-index: 0;
}
.glass-card:hover::after, .work-card:hover::after, .project-card:hover::after, .strength-card:hover::after,
.academic-card:hover::after, .edu-card:hover::after, .hire-service:hover::after, .stat-card:hover::after {
    opacity: 1;
}
.glass-card > *, .work-card > *, .strength-card > *,
.academic-card > *, .edu-card > *, .hire-service > *, .stat-card > * {
    position: relative; z-index: 1;
}

.glass-card {
    border-radius: var(--radius); padding: 1.75rem;
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.glass-card:hover {
    transform: translateY(-4px); border-color: rgba(179,76,255,.4);
    box-shadow: var(--glass-highlight), 0 28px 70px -30px rgba(108,76,255,.5);
}

.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    padding: .4rem .85rem; border-radius: 50px; font-size: .85rem; color: var(--text);
    transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { transform: translateY(-2px); border-color: rgba(45,212,255,.4); }
.chip i { color: var(--grad-3); }
.tech-tag {
    background: rgba(108,76,255,.12); border: 1px solid rgba(108,76,255,.3);
    color: #cbb8ff; padding: .25rem .7rem; border-radius: 8px; font-size: .78rem; font-weight: 600;
}

/* ---------- Strengths ---------- */
.strength-card {
    border-radius: 14px; padding: 1.2rem;
    transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.strength-card:hover {
    border-color: rgba(45,212,255,.4); transform: translateY(-4px);
    box-shadow: var(--glass-highlight), 0 20px 50px -26px rgba(45,212,255,.45);
}
.strength-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--gradient); color: #fff; font-size: 1.2rem;
}

/* ---------- Skills ---------- */
.skill-bar { height: 8px; background: var(--surface-2); border-radius: 50px; overflow: hidden; }
.skill-bar .progress-bar { background: var(--gradient); border-radius: 50px; transition: width 1.2s var(--ease); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2.2rem; max-width: 860px; margin: 0 auto; }
.timeline::before {
    content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
    background: linear-gradient(var(--grad-1), var(--grad-3));
}
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute; left: -2.2rem; top: 8px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--bg); border: 3px solid var(--grad-2); box-shadow: 0 0 0 4px rgba(179,76,255,.15);
}
.period-badge {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 50px; padding: .3rem .8rem; font-size: .8rem; color: var(--muted); white-space: nowrap;
}
.meta-label {
    font-size: .7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
}
.domain-badge {
    display: inline-flex; align-items: center; font-size: .8rem; font-weight: 600;
    padding: .35rem .8rem; border-radius: 10px;
    color: #cbb8ff; background: linear-gradient(135deg, rgba(108,76,255,.18), rgba(45,212,255,.1));
    border: 1px solid rgba(179,76,255,.35);
}
.domain-badge i { color: var(--grad-3); }

/* ---------- Subsection titles ---------- */
.subsection-title {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 1.4rem;
    display: flex; align-items: center;
}
.subsection-title::after {
    content: ""; flex: 1; height: 1px; margin-left: 1rem;
    background: linear-gradient(90deg, var(--border), transparent);
}

/* ---------- Client / professional work cards ---------- */
.work-card {
    display: flex; flex-direction: column;
    border-radius: var(--radius); padding: 1.5rem;
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.work-card:hover {
    transform: translateY(-6px); border-color: rgba(45,212,255,.45);
    box-shadow: var(--glass-highlight), 0 22px 50px -28px rgba(45,212,255,.6);
}
.work-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.work-icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--gradient); color: #fff; font-size: 1.4rem;
}
.work-subtitle { color: var(--grad-3); font-size: .82rem; font-weight: 600; margin-bottom: .75rem; }
.status-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 50px;
    text-transform: uppercase; letter-spacing: .4px;
}
.status-badge .status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-badge.is-live { background: rgba(52,211,153,.14); border: 1px solid rgba(52,211,153,.35); color: #34d399; }
.status-badge.is-live .status-dot { background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 1.8s infinite; }
.status-badge.is-amc { background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.35); color: #fbbf24; }
.status-badge.is-amc .status-dot { background: #fbbf24; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* ---------- Projects ---------- */
.project-card {
    border-radius: var(--radius);
    padding: 1.6rem; transition: all .35s var(--ease); position: relative; overflow: hidden;
}
.project-card::before {
    content: ""; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius);
    background: var(--gradient); -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 .35s var(--ease);
    pointer-events: none;
}
.project-body { position: relative; z-index: 1; }
.project-card:hover { transform: translateY(-6px); }
.project-card:hover::before { opacity: 1; }
.project-icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--gradient); color: #fff; font-size: 1.4rem; margin-bottom: 1rem;
}
.project-featured {
    background: linear-gradient(135deg, rgba(108,76,255,.14), rgba(45,212,255,.06));
    display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap;
}
.project-featured .project-icon { width: 72px; height: 72px; font-size: 2rem; margin: 0; }
.project-featured .project-body { flex: 1; min-width: 220px; }

/* ---------- Academic / college project cards ---------- */
.academic-card {
    display: flex; flex-direction: column;
    border-radius: var(--radius); padding: 1.35rem;
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.academic-card:hover { transform: translateY(-5px); border-color: rgba(108,76,255,.45); }
.academic-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.academic-icon {
    width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(108,76,255,.14); border: 1px solid rgba(108,76,255,.28);
    color: var(--grad-3); font-size: 1.2rem;
}
.level-badge {
    display: inline-flex; align-items: center; font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
    padding: .3rem .6rem; border-radius: 50px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.academic-card .tech-tag { align-self: flex-start; }

/* ---------- Education ---------- */
.edu-card {
    border-radius: var(--radius);
    padding: 1.6rem; position: relative; transition: all .35s var(--ease); overflow: hidden;
}
.edu-card:hover { transform: translateY(-5px); border-color: rgba(45,212,255,.4); }
.edu-year {
    position: absolute; top: 1rem; right: 1rem; font-family: "Sora", sans-serif;
    font-weight: 800; font-size: 1.6rem; color: rgba(255,255,255,.06);
}
.edu-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--grad-3); font-size: 1.3rem; }
.result-badge { display: inline-flex; align-items: center; background: rgba(45,212,255,.12); border: 1px solid rgba(45,212,255,.3); color: var(--grad-3); padding: .3rem .8rem; border-radius: 50px; font-size: .82rem; font-weight: 600; }

/* ---------- Hire / services CTA ---------- */
.hire-panel {
    position: relative; overflow: hidden; border-radius: calc(var(--radius) + 4px);
    padding: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(145deg, rgba(108,76,255,.12), rgba(45,212,255,.05));
    border: 1px solid rgba(179,76,255,.35);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-highlight), 0 28px 70px -35px rgba(108,76,255,.55);
}
.hire-panel-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hire-panel-bg .orb { opacity: .35; filter: blur(70px); }
.hire-panel-bg .orb-1 { width: 280px; height: 280px; top: -80px; right: -40px; }
.hire-panel-bg .orb-2 { width: 220px; height: 220px; bottom: -60px; left: -30px; animation-delay: -5s; }
.hire-title { font-size: clamp(1.6rem, 4vw, 2.35rem); font-weight: 800; line-height: 1.15; }
.hire-perks li {
    color: var(--muted); font-size: .92rem; font-weight: 500;
    margin-bottom: .55rem; display: flex; align-items: flex-start;
}
.hire-perks li:last-child { margin-bottom: 0; }
.hire-service {
    border-radius: 16px; padding: 1.25rem;
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.hire-service:hover {
    transform: translateY(-5px); border-color: rgba(45,212,255,.45);
    box-shadow: var(--glass-highlight), 0 16px 40px -24px rgba(45,212,255,.5);
}
.hire-service-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--gradient); color: #fff; font-size: 1.15rem; margin-bottom: .85rem;
}
.hire-cta {
    width: 100%; margin-top: .5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.hire-cta .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 575.98px) {
    .hire-cta { flex-direction: column; align-items: stretch !important; }
    .hire-cta .btn { width: 100%; white-space: normal; }
}

/* ---------- Contact ---------- */
.contact-list li { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.3rem; }
.contact-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gradient); color: #fff; font-size: 1.2rem; flex-shrink: 0; }
.contact-list a { color: var(--text); text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--grad-3); }

.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-control {
    background: rgba(255, 255, 255, .04); border: 1px solid var(--glass-border); color: var(--text);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 12px; padding: .75rem 1rem; transition: all .25s var(--ease);
}
.form-control::placeholder { color: #5a5f73; }
.form-control:focus {
    background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--grad-2);
    box-shadow: 0 0 0 .2rem rgba(179,76,255,.18), inset 0 1px 0 rgba(255,255,255,.08);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
/* Hide the floating reCAPTCHA badge (allowed since the notice is shown below). */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { font-size: .75rem; }
.recaptcha-note a { color: var(--grad-3); text-decoration: none; }
.recaptcha-note a:hover { text-decoration: underline; }
.btn-spinner { display: none; }
.btn-grad.loading .btn-label { visibility: hidden; }
.btn-grad.loading .btn-spinner { display: inline-block; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.form-feedback { font-size: .9rem; font-weight: 600; }
.form-feedback.ok { color: #34d399; }
.form-feedback.err { color: #fb7185; }
.social-dot {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-border); color: var(--text);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    font-size: 1.1rem; text-decoration: none; transition: all .3s var(--ease);
}
.social-dot:hover { background: var(--gradient); color: #fff; transform: translateY(-3px); border-color: transparent; }

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(180deg, rgba(15, 15, 28, .5), rgba(10, 10, 18, .8));
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight);
    padding: 3.5rem 0 2rem;
}
.footer-brand { text-decoration: none; color: var(--text); }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 500; transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--grad-3); }
.footer-divider { border-color: var(--border); margin: 2rem 0 1.5rem; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
    opacity: 0; transform: translateY(34px) scale(.985);
    filter: blur(6px);
    transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
}
[data-reveal].revealed { opacity: 1; transform: none; filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    [data-reveal] { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 991.98px) {
    .nav-glass {
        background: rgba(10,10,18,.8);
        -webkit-backdrop-filter: var(--glass-blur);
        backdrop-filter: var(--glass-blur);
    }
    .navbar-collapse {
        margin-top: 1rem; padding: 1rem;
        background: rgba(14, 14, 26, .85);
        -webkit-backdrop-filter: var(--glass-blur);
        backdrop-filter: var(--glass-blur);
        border: 1px solid var(--glass-border); border-radius: 14px;
        box-shadow: var(--glass-highlight), var(--glass-shadow);
    }
    .section { padding: 4.5rem 0; }
    .hero-stats { gap: 1.5rem; }

    /* Stop the hero photo/badges from sliding under the fixed navbar */
    .hero .min-vh-100 { min-height: auto !important; padding-top: 7rem !important; }
    .hero-photo-wrap { margin-top: 1rem; }

    /* In the stacked mobile menu the centered underline looks misplaced —
       use a filled, left-accented highlight for the active item instead. */
    .navbar .nav-link { padding: .6rem .9rem !important; border-radius: 10px; }
    .navbar .nav-link.active::after { display: none; }
    .navbar .nav-link.active {
        color: var(--text);
        background: rgba(108,76,255,.16);
        border-left: 3px solid var(--grad-2);
    }
}

@media (max-width: 575.98px) {
    /* Lighter blur on small screens for smoother scrolling */
    :root { --glass-blur: blur(12px) saturate(140%); }
    .bg-orb { filter: blur(80px); }

    .floating-badge { font-size: .68rem; padding: .3rem .55rem; }
    .badge-2, .badge-6 { left: -2%; }
    .badge-3, .badge-7 { right: -2%; }
    /* Keep all 8 badges visible — tuck the side ones inward so they fit */
    .badge-4 { left: -2%; }
    .badge-5 { right: -2%; }
}
