/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --bg: #080812;
    --bg-alt: #0d0d1f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-h: rgba(255, 255, 255, 0.07);
    --b: rgba(255, 255, 255, 0.08);
    --b-glow: rgba(124, 58, 237, 0.35);

    --p: #7c3aed;
    --p-l: #a78bfa;
    --s: #06b6d4;
    --a: #f59e0b;

    --t1: #f1f5f9;
    --t2: #94a3b8;
    --t3: #64748b;

    --grad: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --glow: 0 0 40px rgba(124, 58, 237, .18);

    --r: 16px;
    --rs: 8px;
    --rl: 24px;

    --ease: cubic-bezier(.4, 0, .2, 1);
    --tr: .3s var(--ease);

    --nav-h: 70px;
    --container: 1180px;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--t1);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--p);
    border-radius: 3px;
}

/* ── Selection ── */
::selection {
    background: rgba(124, 58, 237, .35);
    color: var(--t1);
}

/* ── Links reset ── */
a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor,
.cursor-ring {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    top: 0;
    left: 0;
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--p);
    transition: transform .08s;
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(124, 58, 237, .55);
    transition: width .3s var(--ease), height .3s var(--ease), transform .25s var(--ease);
}

.cursor-ring.hovered {
    width: 56px;
    height: 56px;
}

/* ============================================================
   SHARED UTILITIES
   ============================================================ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 7rem 0;
    position: relative;
}

.bg-alt {
    background: var(--bg-alt);
}

.grad {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass card */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--b);
    border-radius: var(--r);
    transition: background var(--tr), border-color var(--tr),
        transform var(--tr), box-shadow var(--tr);
}

.glass:hover {
    background: var(--bg-card-h);
    border-color: var(--b-glow);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

/* ── Section header ── */
.section-head {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--s);
    margin-bottom: .6rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
}

.divider {
    width: 55px;
    height: 3px;
    background: var(--grad);
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .8rem 1.9rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform var(--tr), box-shadow var(--tr), background var(--tr);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .12);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
}

.btn:hover::after {
    transform: scaleX(1);
}

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, .38);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, .55);
}

.btn-ghost {
    background: transparent;
    color: var(--t1);
    border: 1.5px solid var(--b-glow);
}

.btn-ghost:hover {
    border-color: var(--p);
    background: rgba(124, 58, 237, .1);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ── Reveal animation base ── */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .65s var(--ease), transform .65s var(--ease);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal.in,
.reveal-left.in,
.reveal-right.in {
    opacity: 1;
    transform: translate(0);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    inset: 0 0 auto;
    height: var(--nav-h);
    z-index: 1000;
    transition: background var(--tr), border-color var(--tr), box-shadow var(--tr);
}

.navbar.scrolled {
    background: rgba(8, 8, 18, .88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--b);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    height: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.3rem;
    font-weight: 700;
}

.bracket {
    color: var(--p);
}

/* Nav links */
.nav-links {
    list-style: none;
    display: flex;
    gap: .2rem;
}

.nav-link {
    font-size: .875rem;
    font-weight: 500;
    color: var(--t2);
    padding: .45rem .95rem;
    border-radius: var(--rs);
    transition: color var(--tr);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--grad);
    border-radius: 1px;
    transition: width .3s var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--t1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 55%;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 23px;
    height: 2px;
    background: var(--t1);
    border-radius: 1px;
    transition: var(--tr);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--nav-h) 1.5rem 2rem;
}

/* Canvas */
#particle-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    animation: floatOrb 10s ease-in-out infinite;
    z-index: 1;
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: rgba(124, 58, 237, .13);
    top: -120px;
    right: -80px;
    animation-delay: 0s;
}

.orb-2 {
    width: 320px;
    height: 320px;
    background: rgba(6, 182, 212, .1);
    bottom: 0;
    left: -60px;
    animation-delay: 4s;
}

.orb-3 {
    width: 220px;
    height: 220px;
    background: rgba(245, 158, 11, .07);
    top: 42%;
    left: 35%;
    animation-delay: 7s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-28px) scale(1.06);
    }
}

/* Content */
.hero-body {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
}

.hero-greeting {
    font-family: 'Fira Code', monospace;
    font-size: .9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--s);
    margin-bottom: .9rem;
    animation: fadeUp .8s var(--ease) .15s both;
}

.hero-name {
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 900;
    line-height: 1.05;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.1rem;
    animation: fadeUp .8s var(--ease) .3s both;
}

.hero-role {
    font-size: clamp(1.1rem, 3vw, 1.55rem);
    color: var(--t2);
    margin-bottom: 1.4rem;
    animation: fadeUp .8s var(--ease) .45s both;
    min-height: 2.2rem;
}

#typed {
    color: var(--t1);
    font-weight: 600;
}

.type-cursor {
    color: var(--p);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-sub {
    font-size: 1rem;
    color: var(--t2);
    max-width: 520px;
    margin: 0 auto 2.2rem;
    line-height: 1.9;
    animation: fadeUp .8s var(--ease) .6s both;
}

.hero-actions {
    display: flex;
    gap: .9rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.4rem;
    animation: fadeUp .8s var(--ease) .75s both;
}

.hero-socials {
    display: flex;
    gap: .85rem;
    justify-content: center;
    animation: fadeUp .8s var(--ease) .9s both;
}

.s-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t2);
    font-size: 1rem;
    transition: var(--tr);
}

.s-icon:hover {
    border-color: var(--p);
    color: var(--p);
    background: rgba(124, 58, 237, .15);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, .28);
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    animation: fadeIn 1s var(--ease) 1.4s both;
}

.scroll-hint span {
    font-family: 'Fira Code', monospace;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--t3);
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--t3);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.scroll-dot {
    width: 4px;
    height: 7px;
    background: var(--p);
    border-radius: 2px;
    animation: scrollDot 2s ease infinite;
}

@keyframes scrollDot {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* Base fade animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 5rem;
    align-items: center;
}

/* Visual side */
.about-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.avatar-wrap {
    position: relative;
    width: 280px;
    height: 280px;
}

.avatar-box {
    width: 100%;
    height: 100%;
    border-radius: var(--rl);
    background: linear-gradient(135deg, rgba(124, 58, 237, .28), rgba(6, 182, 212, .22));
    border: 2px solid var(--b-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7rem;
    color: rgba(255, 255, 255, .22);
    position: relative;
    overflow: hidden;
}

.avatar-icon {
    filter: drop-shadow(0 0 18px rgba(124, 58, 237, .5));
}

.avatar-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, .05), transparent);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.exp-badge {
    position: absolute;
    bottom: -18px;
    right: -22px;
    background: var(--grad);
    border-radius: var(--r);
    padding: .9rem 1.15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 28px rgba(124, 58, 237, .4);
}

.exp-num {
    font-size: 1.65rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.exp-num sup {
    font-size: .9rem;
}

.exp-lbl {
    font-size: .66rem;
    color: rgba(255, 255, 255, .85);
    text-align: center;
    line-height: 1.4;
    margin-top: 2px;
}

.v-ring {
    position: absolute;
    border-radius: 50%;
    background: var(--grad);
    opacity: .08;
    animation: floatOrb 7s ease-in-out infinite;
}

.ring-1 {
    width: 210px;
    height: 210px;
    top: -40px;
    right: -40px;
    animation-delay: 0s;
}

.ring-2 {
    width: 130px;
    height: 130px;
    bottom: 10px;
    left: -15px;
    animation-delay: 3.5s;
}

/* Info side */
.about-info p {
    color: var(--t2);
    font-size: .97rem;
    margin-bottom: 1rem;
}

.about-role {
    font-size: 1.22rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    color: var(--p-l);
    margin-bottom: 1.1rem;
}

.about-meta {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
    margin: 1.5rem 0;
}

.about-meta li {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    font-size: .88rem;
}

.about-meta i {
    color: var(--p);
    margin-top: 3px;
    width: 16px;
    flex-shrink: 0;
}

.about-meta li>* {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.meta-k {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--t3);
    font-family: 'Fira Code', monospace;
}

.avail {
    color: #22c55e;
    font-weight: 600;
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    background: var(--bg-card);
    border: 1px solid var(--b);
    border-radius: var(--r);
    padding: 1.5rem 1rem;
    margin: 1.8rem 0;
}

.stat {
    text-align: center;
}

.stat-n {
    font-size: 1.9rem;
    font-weight: 900;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat sup {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat small {
    display: block;
    font-size: .68rem;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
}

.skill-cat-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--t1);
    margin-bottom: 2rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--b);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.skill-cat-title::before {
    content: '';
    width: 14px;
    height: 14px;
    background: var(--grad);
    border-radius: 4px;
    display: inline-block;
}

.skill-item {
    margin-bottom: 1.6rem;
}

.skill-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.skill-row span:first-child {
    font-size: .9rem;
    font-weight: 600;
    color: var(--t1);
}

.skill-row span:last-child {
    font-family: 'Fira Code', monospace;
    font-size: .78rem;
    color: var(--s);
    font-weight: 600;
}

.skill-track {
    height: 5px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--b);
}

.skill-bar {
    height: 100%;
    width: 0;
    background: var(--grad);
    border-radius: 3px;
    transition: width 1.6s cubic-bezier(.25, .46, .45, .94);
}

/* Tech badges */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .9rem;
}

.tbadge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: 1.15rem .85rem;
    border-radius: var(--rs);
    background: var(--bg-card);
    border: 1px solid var(--b);
    cursor: default;
    transition: var(--tr);
}

.tbadge:hover {
    border-color: var(--b-glow);
    background: rgba(124, 58, 237, .1);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

.tbadge i {
    font-size: 1.65rem;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tbadge span {
    font-size: .72rem;
    font-weight: 600;
    color: var(--t2);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ============================================================
   RESUME / TIMELINE
   ============================================================ */
.resume-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.tl-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--t1);
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 2.4rem;
}

.tl-title i {
    color: var(--p);
    font-size: .95rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--p), transparent);
    border-radius: 1px;
}

.tl-item {
    position: relative;
    margin-bottom: 1.8rem;
}

.tl-dot {
    position: absolute;
    left: -2.45rem;
    top: 1.2rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--grad);
    border: 3px solid var(--bg-alt);
    box-shadow: 0 0 10px var(--p);
}

.tl-card {
    padding: 1.4rem;
}

.tl-period {
    font-family: 'Fira Code', monospace;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--s);
    display: block;
    margin-bottom: .4rem;
}

.tl-card h4 {
    font-size: .98rem;
    font-weight: 700;
    color: var(--t1);
    margin-bottom: .2rem;
}

.tl-org {
    font-size: .82rem;
    font-weight: 600;
    color: var(--p-l);
    display: block;
    margin-bottom: .7rem;
}

.tl-card p {
    font-size: .85rem;
    color: var(--t2);
    line-height: 1.75;
    margin-bottom: .9rem;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.tl-tags span {
    font-size: .68rem;
    font-family: 'Fira Code', monospace;
    padding: .18rem .55rem;
    border-radius: 4px;
    background: rgba(124, 58, 237, .18);
    border: 1px solid rgba(124, 58, 237, .3);
    color: var(--p-l);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.filter-row {
    display: flex;
    gap: .65rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.8rem;
}

.filter-btn {
    padding: .45rem 1.15rem;
    border-radius: 50px;
    border: 1.5px solid var(--b);
    background: transparent;
    color: var(--t2);
    font-family: 'Inter', sans-serif;
    font-size: .84rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tr);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--p);
    background: rgba(124, 58, 237, .14);
    color: var(--p-l);
}

.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

.proj-card {
    padding: 1.65rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.proj-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.proj-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .28), rgba(6, 182, 212, .22));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--p-l);
}

.proj-links {
    display: flex;
    gap: .65rem;
}

.proj-links a {
    color: var(--t3);
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: .2rem;
    transition: color var(--tr);
}

.proj-links a:hover {
    color: var(--p);
}

.proj-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--t1);
}

.proj-card p {
    font-size: .85rem;
    color: var(--t2);
    line-height: 1.75;
    flex: 1;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: auto;
}

.proj-tags span {
    font-size: .68rem;
    font-family: 'Fira Code', monospace;
    padding: .18rem .55rem;
    border-radius: 4px;
    background: rgba(6, 182, 212, .1);
    border: 1px solid rgba(6, 182, 212, .22);
    color: var(--s);
}

/* Hidden project cards during filter */
.proj-card.hidden {
    display: none;
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

.blog-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-cat {
    padding: .45rem 1rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #fff;
    text-align: center;
    background: var(--grad);
}

.cat-cloud {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.cat-ai {
    background: linear-gradient(135deg, #d946ef, #ec4899);
}

.blog-body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.blog-date {
    font-size: .75rem;
    color: var(--t3);
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.blog-body h4 {
    font-size: .97rem;
    font-weight: 700;
    color: var(--t1);
    line-height: 1.5;
}

.blog-body p {
    font-size: .84rem;
    color: var(--t2);
    line-height: 1.78;
    flex: 1;
}

.blog-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: .9rem;
    border-top: 1px solid var(--b);
    margin-top: auto;
}

.blog-time {
    font-size: .74rem;
    color: var(--t3);
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.read-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--p);
    display: flex;
    align-items: center;
    gap: .35rem;
    transition: gap var(--tr), color var(--tr);
}

.read-link:hover {
    gap: .6rem;
    color: var(--s);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-lead {
    font-size: .97rem;
    color: var(--t2);
    line-height: 1.85;
    margin-bottom: 1.8rem;
}

.c-cards {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    margin-bottom: 1.8rem;
}

.c-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
}

.c-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .28), rgba(6, 182, 212, .22));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-l);
    font-size: .95rem;
}

.c-card strong {
    display: block;
    font-size: .73rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--t3);
    font-family: 'Fira Code', monospace;
    margin-bottom: 2px;
}

.c-card span {
    font-size: .88rem;
    color: var(--t1);
    font-weight: 500;
}

.c-socials {
    display: flex;
    gap: .7rem;
}

.c-social {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1.5px solid var(--b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t2);
    font-size: .95rem;
    transition: var(--tr);
}

.c-social:hover {
    border-color: var(--p);
    background: rgba(124, 58, 237, .14);
    color: var(--p);
    transform: translateY(-3px);
}

/* Form */
.contact-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-bottom: 1.2rem;
}

.field label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--t2);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-family: 'Fira Code', monospace;
}

.field input,
.field textarea {
    width: 100%;
    padding: .85rem 1.1rem;
    background: rgba(255, 255, 255, .04);
    border: 1.5px solid var(--b);
    border-radius: var(--rs);
    color: var(--t1);
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    outline: none;
    transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
    resize: vertical;
}

.field input:hover,
.field textarea:hover {
    border-color: rgba(124, 58, 237, .3);
}

.field input:focus,
.field textarea:focus {
    border-color: var(--p);
    background: rgba(124, 58, 237, .05);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--t3);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--b);
    padding: 3rem 0;
    text-align: center;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
}

.footer-logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.35rem;
    font-weight: 700;
}

.footer-quote {
    font-style: italic;
    color: var(--t3);
    font-size: .88rem;
}

.footer-socials {
    display: flex;
    gap: .9rem;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t3);
    font-size: .85rem;
    transition: var(--tr);
}

.footer-socials a:hover {
    border-color: var(--p);
    color: var(--p);
    transform: translateY(-2px);
}

.footer-copy {
    font-size: .82rem;
    color: var(--t3);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.btt {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--grad);
    border: none;
    color: #fff;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity var(--tr), visibility var(--tr), transform var(--tr), box-shadow var(--tr);
    box-shadow: 0 4px 20px rgba(124, 58, 237, .38);
    z-index: 999;
}

.btt.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btt:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(124, 58, 237, .55);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        text-align: center;
    }

    .about-meta {
        grid-template-columns: 1fr 1fr;
    }

    .about-meta li {
        justify-content: center;
    }

    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .resume-cols {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .proj-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.8rem;
    }

    .about-visual {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-h: 64px;
    }

    .nav-links {
        position: fixed;
        inset: var(--nav-h) 0 auto;
        background: rgba(8, 8, 18, .95);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        flex-direction: column;
        padding: 1.25rem;
        border-bottom: 1px solid var(--b);
        transform: translateY(-110%);
        opacity: 0;
        transition: transform .35s var(--ease), opacity .35s var(--ease);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
    }

    .hamburger {
        display: flex;
    }

    .proj-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-meta {
        grid-template-columns: 1fr;
    }

    .about-meta li {
        justify-content: flex-start;
    }

    .cursor,
    .cursor-ring {
        display: none;
    }

    .badge-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .section {
        padding: 5rem 0;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .avatar-wrap {
        width: 230px;
        height: 230px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   NOISE OVERLAY — subtle film-grain texture
   ============================================================ */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    opacity: .038;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* ============================================================
   SPOTLIGHT — radial cursor glow
   ============================================================ */
#spotlight {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(600px circle at var(--sx, -200%) var(--sy, -200%),
            rgba(124, 58, 237, .07),
            transparent 65%);
}

/* ============================================================
   HERO — SPLIT LAYOUT
   ============================================================ */
.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5rem;
    align-items: center;
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-text {
    max-width: 620px;
    animation: fadeUp .9s var(--ease) both;
}

.hero-photo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 4.5rem 3rem 2rem;
    animation: fadeInPhoto 1.1s var(--ease) .25s both;
}

@keyframes fadeInPhoto {
    from {
        opacity: 0;
        transform: scale(.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* — Availability badge — */
.avail-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .38rem .95rem;
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .32);
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    color: #4ade80;
    margin-bottom: 1.4rem;
    letter-spacing: .3px;
}

.avail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: pulseGreen 2s ease infinite;
}

@keyframes pulseGreen {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(74, 222, 128, 0);
    }
}

/* — Spinning conic-gradient photo frame — */
.photo-frame {
    position: relative;
    width: 320px;
    height: 320px;
}

.photo-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            #7c3aed,
            #06b6d4,
            #f59e0b,
            #ec4899,
            #22c55e,
            #7c3aed);
    animation: rotateBorder 4s linear infinite;
}

.photo-ring::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--bg);
}

.photo-inner {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(124, 58, 237, .35), rgba(6, 182, 212, .25));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.photo-initials {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--p-l);
    user-select: none;
    letter-spacing: -3px;
}

@keyframes rotateBorder {
    to {
        transform: rotate(360deg);
    }
}

/* — Floating tech badge pills — */
.float-badge {
    position: absolute;
    background: rgba(8, 8, 18, .9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--b-glow);
    border-radius: 40px;
    padding: .44rem 1.05rem;
    font-size: .79rem;
    font-weight: 600;
    color: var(--t1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .42rem;
    box-shadow: 0 4px 20px rgba(124, 58, 237, .25);
}

.float-badge i {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fb-1 {
    top: 8px;
    right: -10px;
    animation: floatBadge 3.8s ease-in-out infinite;
}

.fb-2 {
    bottom: 28px;
    right: -22px;
    animation: floatBadge 4.2s ease-in-out .9s infinite;
}

.fb-3 {
    top: 42%;
    left: -50px;
    animation: floatBadge 4.0s ease-in-out 1.7s infinite;
}

.fb-4 {
    bottom: -4px;
    left: 12px;
    animation: floatBadge 3.6s ease-in-out 2.5s infinite;
}

@keyframes floatBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ============================================================
   ABOUT — Photo portrait
   ============================================================ */
.about-photo-wrap {
    position: relative;
    width: 290px;
    height: 350px;
    border-radius: 1.6rem;
    border: 2px solid var(--b-glow);
    box-shadow: 0 24px 64px rgba(124, 58, 237, .22),
        inset 0 0 40px rgba(124, 58, 237, .06);
}

.about-photo,
.about-photo-fallback {
    border-radius: 1.5rem;
    overflow: hidden;
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.about-photo-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(124, 58, 237, .28), rgba(6, 182, 212, .2));
    font-size: 5rem;
    font-weight: 900;
    color: var(--p-l);
    user-select: none;
    letter-spacing: -3px;
}

/* ============================================================
   BENTO STATS GRID
   ============================================================ */
.bento-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .85rem;
    margin: 2rem 0 2.4rem;
}

.bento-card {
    padding: 1.3rem 1.4rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    border-radius: var(--rs);
    transition: transform var(--tr), box-shadow var(--tr);
}

.bento-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow);
}

.bc-primary {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(6, 182, 212, .1));
    border-color: rgba(124, 58, 237, .4) !important;
}

.bc-text {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.bc-icon-lg {
    font-size: 3.5rem;
    color: rgba(124, 58, 237, .18);
    flex-shrink: 0;
}

.bc-main {
    display: flex;
    align-items: baseline;
    gap: .05rem;
}

.bc-num {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bc-sup {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bc-primary .bc-num {
    font-size: 3rem;
}

.bc-label {
    font-size: .72rem;
    color: var(--t2);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-family: 'Fira Code', monospace;
}

.bc-icon {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: rgba(124, 58, 237, .1);
    pointer-events: none;
}

.bc-em {
    font-size: 2rem;
    line-height: 1;
}

/* ============================================================
   PROJECT / BLOG CARDS — 3-D tilt support (transform via JS)
   ============================================================ */
.proj-card,
.blog-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ============================================================
   RESPONSIVE — new components
   ============================================================ */
@media (max-width: 1100px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-photo {
        order: -1;
        padding: 2.5rem 5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
    }

    .avail-badge {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .photo-frame {
        width: 250px;
        height: 250px;
    }

    .photo-initials {
        font-size: 3.5rem;
    }

    .fb-1,
    .fb-2,
    .fb-3,
    .fb-4 {
        display: none;
    }

    .about-photo-wrap {
        width: 230px;
        height: 280px;
    }

    .bento-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .photo-frame {
        width: 210px;
        height: 210px;
    }

    .photo-initials {
        font-size: 3rem;
    }

    .about-photo-wrap {
        width: 200px;
        height: 245px;
    }

    .bento-stats {
        grid-template-columns: 1fr 1fr;
    }
}