 :root {
    --bg-0: #05060c;
    --bg-1: #0a0d1a;
    --bg-2: #0d1224;
    --blue: #3b6ef6;
    --blue-soft: #5b8cff;
    --violet: #8b5cf6;
    --violet-soft: #a878ff;
    --ink: #eef0f6;
    --ink-dim: #9aa1b8;
    --ink-faint: #5d6380;
    --line: rgba(255, 255, 255, .08);
    --glass: rgba(255, 255, 255, .04);
    --glass-strong: rgba(255, 255, 255, .07);
    --radius: 20px;
    --radius-sm: 12px;
    --ease: cubic-bezier(.16, .8, .24, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-0);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

h1,
h2,
h3,
h4,
.display {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

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

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

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

/* ---------- Background atmosphere ---------- */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 600px at 12% -5%, rgba(59, 110, 246, .22), transparent 60%),
        radial-gradient(800px 700px at 95% 10%, rgba(139, 92, 246, .18), transparent 60%),
        radial-gradient(1000px 800px at 50% 100%, rgba(59, 110, 246, .10), transparent 60%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1) 40%, var(--bg-0));
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .035;
    mix-blend-mode: overlay;
    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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
header.site {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 0;
    transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease), padding .3s var(--ease);
    border-bottom: 1px solid transparent;
}

header.site.scrolled {
    background: rgba(6, 8, 16, .72);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-soft), var(--violet-soft));
    box-shadow: 0 0 12px rgba(139, 92, 246, .8);
}

.nav-link-custom {
    font-size: .92rem;
    color: var(--ink-dim);
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 999px;
    transition: color .25s, background .25s;
}

.nav-link-custom:hover {
    color: var(--ink);
    background: var(--glass);
}

.btn-glow {
    background: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: .92rem;
    padding: 10px 20px;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 6px 24px -6px rgba(99, 102, 241, .55);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
    white-space: nowrap;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 10px 30px -6px rgba(139, 92, 246, .7);
}

.btn-ghost {
    background: var(--glass);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    font-size: .92rem;
    padding: 10px 22px;
    border-radius: 999px;
    transition: background .25s, transform .25s, border-color .25s;
}

.btn-ghost:hover {
    background: var(--glass-strong);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .18);
}

.navbar-toggler {
    border: none;
    box-shadow: none !important;
}

.navbar-toggler i {
    color: #fff;
    font-size: 1.3rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--violet-soft);
    background: rgba(139, 92, 246, .08);
    border: 1px solid rgba(139, 92, 246, .25);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.eyebrow .pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--violet-soft);
    box-shadow: 0 0 0 0 rgba(168, 120, 255, .7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(168, 120, 255, .55);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(168, 120, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(168, 120, 255, 0);
    }
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.85rem);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 24px;
}

.hero h1 .grad {
    background: linear-gradient(100deg, var(--blue-soft) 10%, var(--violet-soft) 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead-custom {
    font-size: 1.12rem;
    color: var(--ink-dim);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 46px;
}

.btn-lg-glow {
    padding: 14px 28px;
    font-size: .98rem;
}

.btn-lg-ghost {
    padding: 14px 28px;
    font-size: .98rem;
}

/* Dashboard mockup */
.dash-wrap {
    position: relative;
    perspective: 1400px;
}

.dash-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
    border: 1px solid var(--line);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .65), 0 0 80px -20px rgba(91, 140, 255, .25);
    transform: rotateY(-8deg) rotateX(3deg);
    padding: 18px;
    transition: transform .6s var(--ease);
}

.dash-wrap:hover .dash-card {
    transform: rotateY(-3deg) rotateX(1deg);
}

.dash-topbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.dash-topbar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
}

.dash-topbar span:nth-child(1) {
    background: #ff5f57;
}

.dash-topbar span:nth-child(2) {
    background: #febc2e;
}

.dash-topbar span:nth-child(3) {
    background: #28c840;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.dash-stat {
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}

.dash-stat .num {
    font-family: 'Space Grotesk';
    font-weight: 700;
    font-size: 1.15rem;
}

.dash-stat .lbl {
    font-size: .68rem;
    color: var(--ink-faint);
    margin-top: 2px;
}

.dash-chart {
    height: 110px;
    border-radius: 12px;
    background: var(--glass);
    border: 1px solid var(--line);
    padding: 14px;
    position: relative;
    overflow: hidden;
}

.dash-chart svg {
    width: 100%;
    height: 100%;
}

.dash-rows {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass);
    border-radius: 10px;
    padding: 8px 10px;
}

.dash-row .avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-soft), var(--violet-soft));
    flex-shrink: 0;
}

.dash-row .bar {
    flex: 1;
    height: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.dash-row .bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--blue-soft), var(--violet-soft));
    border-radius: 4px;
}

.float-pill {
    position: absolute;
    background: rgba(14, 16, 28, .75);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6);
    animation: floaty 6s ease-in-out infinite;
}

.float-pill .ic {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}

.float-pill .val {
    font-family: 'Space Grotesk';
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.float-pill .cap {
    font-size: .65rem;
    color: var(--ink-faint);
}

.pill-1 {
    top: -6%;
    left: -9%;
    animation-delay: 0s;
}

.pill-1 .ic {
    background: rgba(59, 110, 246, .18);
    color: var(--blue-soft);
}

.pill-2 {
    bottom: 14%;
    right: -11%;
    animation-delay: 1.4s;
}

.pill-2 .ic {
    background: rgba(40, 200, 120, .16);
    color: #4ade80;
}

.pill-3 {
    bottom: -7%;
    left: 6%;
    animation-delay: 2.8s;
}

.pill-3 .ic {
    background: rgba(139, 92, 246, .18);
    color: var(--violet-soft);
}

@keyframes floaty {

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

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

/* ---------- Section generic ---------- */
section {
    position: relative;
    z-index: 2;
    padding: 120px 0;
}

.section-tag {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--blue-soft);
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 14px;
}

.section-sub {
    color: var(--ink-dim);
    font-size: 1.04rem;
    max-width: 600px;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

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

.reveal-stagger>* {
    transition-delay: calc(var(--i, 0) * 80ms);
}

/* ---------- Tech grid ---------- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width:767px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tech-item {
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    transition: transform .3s var(--ease), border-color .3s, background .3s;
}

.tech-item:hover {
    transform: translateY(-6px);
    border-color: rgba(91, 140, 255, .4);
    background: linear-gradient(160deg, rgba(59, 110, 246, .08), rgba(139, 92, 246, .04));
}

.tech-item i {
    font-size: 1.9rem;
    margin-bottom: 10px;
    display: block;
    color: var(--blue-soft);
}

.tech-item span {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink-dim);
}

/* ---------- Project cards ---------- */
.proj-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    backdrop-filter: blur(10px);
    transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
    display: flex;
    flex-direction: column;
}

.proj-card:hover {
    transform: translateY(-8px);
    border-color: rgba(91, 140, 255, .35);
    box-shadow: 0 30px 60px -25px rgba(59, 110, 246, .35);
}

.proj-media {
    height: 180px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-media .pm-bg {
    position: absolute;
    inset: 0;
}

.proj-media .pm-icon {
    position: relative;
    z-index: 2;
    font-size: 2.6rem;
    color: rgba(255, 255, 255, .92);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .4));
}

.pm-1 {
    background: radial-gradient(circle at 30% 20%, rgba(59, 110, 246, .5), transparent 60%), linear-gradient(160deg, #10172e, #0a0e1f);
}

.pm-2 {
    background: radial-gradient(circle at 70% 30%, rgba(139, 92, 246, .5), transparent 60%), linear-gradient(160deg, #1a1230, #0a0e1f);
}

.pm-3 {
    background: radial-gradient(circle at 30% 70%, rgba(59, 110, 246, .45), transparent 60%), linear-gradient(160deg, #0e1830, #0a0e1f);
}

.pm-4 {
    background: radial-gradient(circle at 70% 70%, rgba(168, 120, 255, .45), transparent 60%), linear-gradient(160deg, #1b1330, #0a0e1f);
}

.proj-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.proj-body h4 {
    font-size: 1.18rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.proj-body p {
    color: var(--ink-dim);
    font-size: .92rem;
    margin-bottom: 16px;
    flex: 1;
}

.tag-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tag {
    font-size: .7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(91, 140, 255, .1);
    color: var(--blue-soft);
    border: 1px solid rgba(91, 140, 255, .22);
}

.proj-link {
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    transition: gap .25s, color .25s;
}

.proj-link i {
    transition: transform .25s var(--ease);
    font-size: .75rem;
}

.proj-card:hover .proj-link i {
    transform: translateX(4px);
}

.proj-card:hover .proj-link {
    color: var(--blue-soft);
}

/* ---------- Services ---------- */
.serv-card {
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    height: 100%;
    transition: transform .35s var(--ease), border-color .35s, background .35s;
}

.serv-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, .35);
    background: linear-gradient(160deg, rgba(139, 92, 246, .07), rgba(255, 255, 255, .02));
}

.serv-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 110, 246, .18), rgba(139, 92, 246, .18));
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: 1.25rem;
    color: var(--blue-soft);
    margin-bottom: 18px;
}

.serv-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.serv-card p {
    color: var(--ink-dim);
    font-size: .88rem;
    margin-bottom: 0;
    line-height: 1.55;
}

/* ---------- About ---------- */
.about-avatar {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1/1;
    border-radius: 28px;
    margin: 0 auto;
    background: linear-gradient(160deg, rgba(59, 110, 246, .25), rgba(139, 92, 246, .18));
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(59, 110, 246, .3);
}

.about-avatar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .12), transparent 50%);
}

.about-avatar i {
    font-size: 6rem;
    color: rgba(255, 255, 255, .85);
    position: relative;
    z-index: 2;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.about-stats .st {
    min-width: 90px;
}

.about-stats .st .n {
    font-family: 'Space Grotesk';
    font-weight: 700;
    font-size: 1.7rem;
}

.about-stats .st .l {
    font-size: .78rem;
    color: var(--ink-faint);
}

/* ---------- CTA ---------- */
.cta-block {
    border-radius: 28px;
    padding: 70px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(59, 110, 246, .18), rgba(139, 92, 246, .16));
    border: 1px solid rgba(255, 255, 255, .1);
}

.cta-block::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 300px at 20% 0%, rgba(91, 140, 255, .35), transparent 60%),
        radial-gradient(500px 300px at 80% 100%, rgba(168, 120, 255, .3), transparent 60%);
}

.cta-block h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

.cta-block p {
    color: var(--ink-dim);
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.cta-block .btn-glow {
    position: relative;
    z-index: 2;
    padding: 15px 34px;
    font-size: 1rem;
}

/* ---------- Contact ---------- */
.contact-form .form-control {
    background: var(--glass);
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: .94rem;
}

.contact-form .form-control:focus {
    background: var(--glass-strong);
    border-color: var(--blue-soft);
    box-shadow: 0 0 0 3px rgba(59, 110, 246, .18);
    color: var(--ink);
}

.contact-form label {
    font-size: .84rem;
    color: var(--ink-dim);
    margin-bottom: 6px;
    font-weight: 500;
}

.contact-form textarea {
    resize: none;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 14px;
    transition: transform .3s var(--ease), border-color .3s, background .3s;
}

.social-card:hover {
    transform: translateX(6px);
    border-color: rgba(91, 140, 255, .35);
    background: var(--glass-strong);
}

.social-card .ic {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    font-size: 1.1rem;
    flex-shrink: 0;
}

.social-card .tt {
    font-weight: 600;
    font-size: .92rem;
}

.social-card .sb {
    font-size: .76rem;
    color: var(--ink-faint);
}

/* ---------- Footer ---------- */
footer.site {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    position: relative;
    z-index: 2;
}

footer.site p {
    color: var(--ink-faint);
    font-size: .85rem;
    margin: 0;
}

/* ---------- Focus / a11y ---------- */
a:focus-visible,
button:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--blue-soft);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--blue);
    color: #fff;
    padding: 10px 16px;
    z-index: 200;
    border-radius: 8px;
}

.skip-link:focus {
    left: 14px;
    top: 14px;
}

@media (max-width:991px) {
    .dash-wrap {
        margin-top: 60px;
    }

    .float-pill {
        position: static;
        display: inline-flex;
        margin: 6px 6px 0 0;
        animation: none;
    }
}

