/* ==========================================================================
   Naveen Anuja - Portfolio
   Design tokens
   ========================================================================== */
:root {
    --bg: #05070d;
    --bg-soft: #080c16;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-strong: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text: #e8eef7;
    --muted: #93a3b8;
    --dim: #64748b;

    --brand-1: #38bdf8;
    --brand-2: #6366f1;
    --brand-3: #a855f7;
    --brand-glow: rgba(56, 189, 248, 0.35);

    --gradient: linear-gradient(120deg, #38bdf8 0%, #6366f1 45%, #a855f7 100%);
    --gradient-soft: linear-gradient(120deg, rgba(56, 189, 248, .16), rgba(168, 85, 247, .16));

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;

    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .28);
    --shadow: 0 18px 46px rgba(0, 0, 0, .42);
    --shadow-glow: 0 18px 46px rgba(56, 189, 248, .18);

    --ease: cubic-bezier(.22, 1, .36, 1);
    --nav-h: 74px;
}

/* ==========================================================================
   Base
   ========================================================================== */
* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

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

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

::selection {
    background: rgba(99, 102, 241, .45);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #05070d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brand-1), var(--brand-3));
    border-radius: 99px;
    border: 2px solid #05070d;
}

.text-gradient {
    background: var(--gradient);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 8s ease infinite;
}

.mono-accent {
    font-family: 'JetBrains Mono', monospace;
    color: var(--brand-1);
}

/* ==========================================================================
   Preloader
   ========================================================================== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--bg);
    transition: opacity .6s var(--ease), visibility .6s;
}

#preloader.is-done {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    text-align: center;
}

.preloader-logo {
    font-family: 'Sora', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: .12em;
    background: var(--gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite;
}

.preloader-bar {
    width: 190px;
    height: 3px;
    margin: 1.1rem auto .8rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.preloader-bar span {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: 99px;
    background: var(--gradient);
    animation: loaderSlide 1.1s var(--ease) infinite;
}

.preloader-text {
    margin: 0;
    font-size: .78rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--dim);
}

/* ==========================================================================
   Background layers
   ========================================================================== */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .55;
}

.bg-grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 72%);
    opacity: .55;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .32;
}

.bg-orb--one {
    width: 520px;
    height: 520px;
    top: -140px;
    left: -110px;
    background: #0ea5e9;
    animation: orbFloat 17s ease-in-out infinite;
}

.bg-orb--two {
    width: 460px;
    height: 460px;
    top: 38%;
    right: -140px;
    background: #7c3aed;
    animation: orbFloat 21s ease-in-out infinite reverse;
}

.bg-orb--three {
    width: 420px;
    height: 420px;
    bottom: -160px;
    left: 34%;
    background: #2563eb;
    animation: orbFloat 25s ease-in-out infinite;
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, transparent 0%, rgba(5, 7, 13, .55) 55%, var(--bg) 100%);
}

#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    height: 380px;
    margin: -190px 0 0 -190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, .12) 0%, transparent 65%);
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity .4s ease;
}

/* ==========================================================================
   Buttons / chips
   ========================================================================== */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .82rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 99px;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease, background .3s ease, color .3s ease;
}

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

.btn:active {
    transform: translateY(-1px);
}

.btn i {
    font-size: .88em;
}

.btn-sm {
    padding: .58rem 1.15rem;
    font-size: .84rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--gradient);
    background-size: 200% 200%;
    color: #fff;
    box-shadow: 0 10px 30px rgba(79, 108, 233, .32);
    animation: gradientShift 8s ease infinite;
}

.btn-primary:hover {
    box-shadow: 0 16px 40px rgba(99, 102, 241, .46);
}

.btn-outline {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--brand-1);
    color: #fff;
    box-shadow: 0 12px 30px rgba(56, 189, 248, .2);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--muted);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface);
}

.btn[disabled] {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .32rem .8rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: #c7d3e3;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .01em;
    transition: border-color .25s ease, color .25s ease, transform .25s ease, background .25s ease;
}

.chip:hover {
    border-color: rgba(56, 189, 248, .55);
    color: #fff;
    background: rgba(56, 189, 248, .1);
    transform: translateY(-2px);
}

.chip--muted {
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: .74rem;
}

.chip--live {
    border-color: rgba(52, 211, 153, .4);
    background: rgba(16, 185, 129, .12);
    color: #6ee7b7;
    font-family: 'JetBrains Mono', monospace;
    font-size: .74rem;
    white-space: nowrap;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .42rem 1rem;
    border: 1px solid rgba(52, 211, 153, .28);
    border-radius: 99px;
    background: rgba(16, 185, 129, .08);
    color: #6ee7b7;
    font-size: .8rem;
    font-weight: 500;
}

.status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
    animation: pulseDot 2s infinite;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease, box-shadow .4s ease;
    border-bottom: 1px solid transparent;
}

#navbar.is-scrolled {
    background: rgba(6, 9, 17, .75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    gap: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

.nav-logo-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient);
    background-size: 200% 200%;
    color: #fff;
    font-size: .9rem;
    letter-spacing: .04em;
    box-shadow: 0 8px 22px rgba(99, 102, 241, .35);
    animation: gradientShift 8s ease infinite;
    transition: transform .35s var(--ease);
}

.nav-logo:hover .nav-logo-mark {
    transform: rotate(-8deg) scale(1.06);
}

.nav-logo-text {
    font-size: 1.02rem;
    letter-spacing: .01em;
}

.nav-links {
    display: none;
    align-items: center;
    gap: .2rem;
}

.nav-link {
    position: relative;
    padding: .5rem .95rem;
    border-radius: 99px;
    font-size: .92rem;
    font-weight: 500;
    color: var(--muted);
    transition: color .3s ease, background .3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
    transform: translateX(-50%);
    transition: width .35s var(--ease);
}

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

.nav-link:hover::after,
.nav-link.is-active::after {
    width: 22px;
}

.nav-link.is-active {
    color: #fff;
    background: var(--surface);
}

.nav-actions {
    display: none;
    align-items: center;
    gap: .6rem;
}

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: var(--text);
    transition: transform .35s var(--ease), opacity .25s ease, width .35s var(--ease);
}

.menu-toggle span:nth-child(2) {
    width: 70%;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#scroll-progress {
    height: 2px;
    width: 0;
    background: var(--gradient);
    background-size: 200% 200%;
    box-shadow: 0 0 12px var(--brand-glow);
    transition: width .1s linear;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: calc(var(--nav-h) + 2rem) 1.6rem 2.4rem;
    background: rgba(5, 7, 13, .96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.mobile-link {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: .85rem .4rem;
    border-bottom: 1px solid var(--border);
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    opacity: 0;
    transform: translateX(-24px);
    transition: color .3s ease, padding-left .3s var(--ease);
}

.mobile-menu.is-open .mobile-link {
    animation: menuIn .5s var(--ease) forwards;
}

.mobile-menu.is-open .mobile-link:nth-child(1) { animation-delay: .06s; }
.mobile-menu.is-open .mobile-link:nth-child(2) { animation-delay: .12s; }
.mobile-menu.is-open .mobile-link:nth-child(3) { animation-delay: .18s; }
.mobile-menu.is-open .mobile-link:nth-child(4) { animation-delay: .24s; }
.mobile-menu.is-open .mobile-link:nth-child(5) { animation-delay: .30s; }
.mobile-menu.is-open .mobile-link:nth-child(6) { animation-delay: .36s; }

.mobile-link span {
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    color: var(--brand-1);
}

.mobile-link:hover {
    padding-left: 1rem;
    color: var(--brand-1);
}

.mobile-menu-footer {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.social-row {
    display: flex;
    justify-content: center;
    gap: .8rem;
}

.social-row a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--muted);
    font-size: 1rem;
    transition: all .3s var(--ease);
}

.social-row a:hover {
    color: #fff;
    border-color: var(--brand-1);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(56, 189, 248, .22);
}

/* ==========================================================================
   Section shell
   ========================================================================== */
.section {
    position: relative;
    padding: 6rem 0;
    /* Keeps off-screen reveal transforms from creating horizontal scroll */
    overflow-x: clip;
}

.section--hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 5rem;
}

.section-head {
    max-width: 720px;
    margin: 0 auto 3.2rem;
    text-align: center;
}

.section-head--sub {
    margin-top: 5rem;
}

.section-eyebrow {
    display: inline-block;
    margin-bottom: .9rem;
    padding: .3rem .9rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    font-family: 'JetBrains Mono', monospace;
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand-1);
}

.section-title {
    margin: 0 0 .8rem;
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.02em;
}

.section-title--sm {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}

.section-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.glass-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    transition: transform .45s var(--ease), border-color .45s ease, box-shadow .45s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(56, 189, 248, .45), transparent 42%, transparent 62%, rgba(168, 85, 247, .38));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

.about-heading {
    margin: 0 0 1.1rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-copy>* {
    max-width: 42rem;
}

.hero-hello {
    margin: 1.4rem 0 .2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: .95rem;
    color: var(--brand-1);
}

.hero-name {
    margin: 0 0 .35rem;
    font-family: 'Sora', sans-serif;
    font-size: clamp(2.4rem, 8vw, 4.4rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.035em;
}

.hero-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .1rem .6rem;
    margin: 0 0 .9rem;
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.05rem, 3.2vw, 1.72rem);
    font-weight: 700;
    letter-spacing: .012em;
    text-transform: uppercase;
}

.hero-title-divider {
    color: var(--dim);
    font-weight: 300;
}

.hero-typed-line {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 1.8rem;
    margin: 0 0 1.2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(.82rem, 2.4vw, .98rem);
    color: #cbd5e1;
}

.type-caret {
    display: inline-block;
    width: 9px;
    height: 1.05em;
    background: var(--brand-1);
    animation: caretBlink 1s steps(2, start) infinite;
}

.hero-summary {
    margin: 0 0 1.9rem;
    color: var(--muted);
    font-size: 1.02rem;
}

.hero-summary strong {
    color: #dbe6f5;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-bottom: 1.8rem;
}

.hero-socials {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.social-btn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    color: var(--muted);
    font-size: 1.02rem;
    transition: all .35s var(--ease);
}

.social-btn:hover {
    color: #fff;
    border-color: transparent;
    background: var(--gradient);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 14px 30px rgba(99, 102, 241, .35);
}

/* Avatar */
.hero-visual {
    display: flex;
    justify-content: center;
}

.avatar-wrap {
    position: relative;
    width: clamp(230px, 62vw, 340px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.avatar-img {
    position: relative;
    z-index: 2;
    width: 78%;
    height: 78%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .14);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    animation: floatY 6s ease-in-out infinite;
}

.avatar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(56, 189, 248, .35);
    animation: spin 26s linear infinite;
}

.avatar-ring--alt {
    inset: 9%;
    border: 1px solid rgba(168, 85, 247, .28);
    border-top-color: rgba(56, 189, 248, .85);
    border-right-color: transparent;
    animation: spin 12s linear infinite reverse;
}

.avatar-glow {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .45), transparent 68%);
    filter: blur(28px);
    animation: pulseGlow 5s ease-in-out infinite;
}

.float-chip {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .8rem;
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    background: rgba(10, 14, 23, .82);
    backdrop-filter: blur(10px);
    font-size: .76rem;
    font-weight: 500;
    color: #dbe6f5;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.float-chip i {
    color: var(--brand-1);
}

.float-chip--1 {
    top: 4%;
    left: -6%;
    animation: floatY 5s ease-in-out infinite;
}

.float-chip--2 {
    top: 32%;
    right: -10%;
    animation: floatY 6.4s ease-in-out infinite .4s;
}

.float-chip--3 {
    bottom: 16%;
    left: -12%;
    animation: floatY 5.8s ease-in-out infinite .8s;
}

.float-chip--4 {
    bottom: 1%;
    right: -2%;
    animation: floatY 7s ease-in-out infinite .2s;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    margin-top: 3.6rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: 1.15rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(10px);
    text-align: center;
    transition: transform .35s var(--ease), border-color .35s ease, background .35s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, .4);
    background: var(--surface-strong);
}

.stat-value {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.6rem, 4.6vw, 2.15rem);
    font-weight: 800;
    background: var(--gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 8s ease infinite;
}

.stat-label {
    font-size: .78rem;
    color: var(--muted);
    letter-spacing: .02em;
}

/* Scroll cue */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 1.6rem;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    color: var(--dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    transition: color .3s ease;
}

.scroll-cue:hover {
    color: var(--brand-1);
}

.scroll-mouse {
    display: block;
    width: 24px;
    height: 38px;
    border: 1.5px solid currentColor;
    border-radius: 14px;
    position: relative;
}

.scroll-mouse span {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--brand-1);
    animation: scrollDot 1.8s ease-in-out infinite;
}

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee {
    position: relative;
    overflow: hidden;
    padding: 1.05rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    width: max-content;
    animation: marquee 42s linear infinite;
}

.marquee-track span {
    font-family: 'Sora', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(203, 213, 225, .55);
    white-space: nowrap;
}

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

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
}

.about-main {
    padding: 1.8rem 1.5rem;
}

.about-main p {
    margin: 0 0 1rem;
    color: var(--muted);
}

.about-main strong {
    color: #dbe6f5;
    font-weight: 600;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: .9rem;
    margin-top: 1.6rem;
}

.about-highlight {
    display: flex;
    gap: .95rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .022);
    transition: transform .35s var(--ease), border-color .35s ease, background .35s ease;
}

.about-highlight:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, .35);
    background: rgba(56, 189, 248, .05);
}

.about-highlight>i {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    color: var(--brand-1);
    font-size: 1rem;
}

.about-highlight h4 {
    margin: 0 0 .15rem;
    font-family: 'Sora', sans-serif;
    font-size: .96rem;
    font-weight: 600;
}

.about-highlight p {
    margin: 0;
    font-size: .86rem;
    color: var(--muted);
    line-height: 1.6;
}

.about-side {
    display: grid;
    gap: 1.4rem;
    align-content: start;
}

.info-card {
    padding: 1.6rem 1.4rem;
}

.info-list {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}

.info-list i {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    color: var(--brand-1);
    font-size: .9rem;
}

.info-list span {
    display: flex;
    flex-direction: column;
    font-size: .9rem;
    color: #d7e1ee;
    word-break: break-word;
}

.info-list b {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}

.info-list a:hover {
    color: var(--brand-1);
}

.edu-item {
    display: flex;
    gap: 1rem;
}

.edu-icon {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    color: var(--brand-3);
    font-size: 1.05rem;
}

.edu-item h4 {
    margin: 0 0 .25rem;
    font-family: 'Sora', sans-serif;
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.4;
}

.edu-item p {
    margin: 0 0 .55rem;
    font-size: .86rem;
    color: var(--muted);
}

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline {
    position: relative;
    display: grid;
    gap: 1.6rem;
    padding-left: 2.1rem;
}

.timeline-line {
    position: absolute;
    top: .6rem;
    bottom: .6rem;
    left: 13px;
    width: 2px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
}

.timeline-progress {
    display: block;
    width: 100%;
    height: 0;
    background: var(--gradient);
    box-shadow: 0 0 14px var(--brand-glow);
    transition: height .25s linear;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    top: 1.35rem;
    left: -2.1rem;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: #0a0e17;
    color: var(--brand-1);
    font-size: .68rem;
    z-index: 2;
    transition: transform .4s var(--ease), box-shadow .4s ease, color .4s ease;
}

.timeline-item.is-visible .timeline-dot {
    color: #fff;
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 0 0 5px rgba(56, 189, 248, .1);
}

.timeline-card {
    padding: 1.5rem 1.35rem;
}

.timeline-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, .32);
    box-shadow: var(--shadow-glow);
}

.timeline-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: 1rem;
}

.timeline-role {
    margin: 0 0 .2rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
}

.timeline-company {
    margin: 0;
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    color: var(--brand-1);
    font-weight: 500;
}

.timeline-points {
    display: grid;
    gap: .6rem;
    margin: 0 0 1.1rem;
    padding: 0;
    list-style: none;
}

.timeline-points li {
    position: relative;
    padding-left: 1.35rem;
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.65;
}

.timeline-points li::before {
    content: '';
    position: absolute;
    top: .62rem;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--gradient);
    transform: rotate(45deg);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
}

.featured-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.featured-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, .38);
    box-shadow: var(--shadow);
}

.featured-visual {
    position: relative;
    display: grid;
    place-items: center;
    padding: 1.6rem 1.2rem;
    min-height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.featured-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 120%, rgba(56, 189, 248, .22), transparent 60%);
    pointer-events: none;
}

.featured-visual--web {
    background: linear-gradient(140deg, #0b1220, #131a33 60%, #1b1436);
}

.featured-visual--mobile {
    background: linear-gradient(140deg, #0b1220, #101c30 55%, #10233a);
}

.featured-body {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1.6rem 1.35rem;
}

.featured-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.featured-top h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.featured-tagline {
    margin: -.5rem 0 0;
    font-size: .9rem;
    color: var(--brand-1);
    font-weight: 500;
}

.featured-body .btn {
    align-self: flex-start;
    margin-top: .2rem;
}

.featured-img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: 280px;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .5);
    animation: floatY 7s ease-in-out infinite;
    transition: transform .45s var(--ease);
}

.featured-card:hover .featured-img {
    transform: scale(1.02);
}

.featured-img--mobile {
    max-width: 160px;
    max-height: 340px;
}

/* Browser mockup */
.mock-browser {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(6, 10, 20, .9);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .5);
    overflow: hidden;
    animation: floatY 7s ease-in-out infinite;
}

.mock-bar {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .7rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
}

.mock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
}

.mock-dot:nth-child(1) { background: #f87171; }
.mock-dot:nth-child(2) { background: #fbbf24; }
.mock-dot:nth-child(3) { background: #34d399; }

.mock-url {
    margin-left: .5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: .66rem;
    font-style: normal;
    color: var(--muted);
}

.mock-body {
    display: flex;
    gap: .6rem;
    padding: .7rem;
    height: 150px;
}

.mock-sidebar {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 0 0 42px;
}

.mock-sidebar span {
    height: 9px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .1);
}

.mock-sidebar span:first-child {
    background: var(--gradient);
    opacity: .8;
}

.mock-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.mock-tiles {
    display: flex;
    gap: .4rem;
}

.mock-tiles i {
    flex: 1;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .07);
    position: relative;
    overflow: hidden;
}

.mock-tiles i::after,
.mock-lines b::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
    animation: shimmer 2.6s infinite;
}

.mock-chart {
    display: flex;
    align-items: flex-end;
    gap: .3rem;
    height: 58px;
    padding: .3rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, .04);
}

.mock-chart span {
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: var(--gradient);
    opacity: .75;
    animation: barGrow 3.2s ease-in-out infinite alternate;
}

.mock-chart span:nth-child(2) { animation-delay: .2s; }
.mock-chart span:nth-child(3) { animation-delay: .4s; }
.mock-chart span:nth-child(4) { animation-delay: .6s; }
.mock-chart span:nth-child(5) { animation-delay: .8s; }
.mock-chart span:nth-child(6) { animation-delay: 1s; }

.mock-lines {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.mock-lines b {
    position: relative;
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.mock-lines b:nth-child(2) { width: 78%; }
.mock-lines b:nth-child(3) { width: 55%; }

/* Phone mockup */
.mock-phone {
    position: relative;
    z-index: 1;
    width: 168px;
    height: 300px;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 26px;
    background: rgba(6, 10, 20, .92);
    box-shadow: 0 24px 55px rgba(0, 0, 0, .55);
    animation: floatY 6.4s ease-in-out infinite;
}

.mock-notch {
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .16);
}

.mock-screen {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    height: 100%;
    padding: 1.1rem .55rem .6rem;
    border-radius: 20px;
    background: linear-gradient(170deg, rgba(56, 189, 248, .09), rgba(168, 85, 247, .07));
}

.mock-pos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mock-pos-head b {
    width: 46%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .18);
}

.mock-pos-head i {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--gradient);
    opacity: .85;
}

.mock-pos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .35rem;
}

.mock-pos-grid span {
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    animation: tileFade 3s ease-in-out infinite;
}

.mock-pos-grid span:nth-child(2) { animation-delay: .2s; }
.mock-pos-grid span:nth-child(3) { animation-delay: .4s; }
.mock-pos-grid span:nth-child(4) { animation-delay: .6s; }
.mock-pos-grid span:nth-child(5) { animation-delay: .8s; }
.mock-pos-grid span:nth-child(6) { animation-delay: 1s; }

.mock-pos-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px dashed rgba(255, 255, 255, .14);
}

.mock-pos-total b {
    width: 40%;
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .16);
}

.mock-pos-total i {
    width: 26%;
    height: 9px;
    border-radius: 4px;
    background: rgba(52, 211, 153, .6);
}

.mock-pos-btn {
    height: 26px;
    border-radius: 99px;
    background: var(--gradient);
    opacity: .9;
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .55rem;
    margin-bottom: 2.4rem;
}

.filter-btn {
    padding: .5rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--muted);
    font-size: .86rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s var(--ease);
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.filter-btn.is-active {
    color: #fff;
    border-color: transparent;
    background: var(--gradient);
    box-shadow: 0 10px 24px rgba(99, 102, 241, .3);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, .35);
    box-shadow: var(--shadow-glow);
}

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

.project-cover {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(140deg, #0b1220, #16203a);
    border-bottom: 1px solid var(--border);
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease), filter .5s ease;
    filter: saturate(.85) brightness(.82);
}

.project-card:hover .project-cover img {
    transform: scale(1.08);
    filter: saturate(1.05) brightness(1);
}

.project-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(5, 7, 13, .75));
    pointer-events: none;
}

.project-cover-tag {
    position: absolute;
    z-index: 2;
    top: .8rem;
    left: .8rem;
    padding: .25rem .7rem;
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    background: rgba(5, 7, 13, .7);
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    color: #cbd5e1;
}

.project-body {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1.3rem 1.25rem 1.45rem;
    flex: 1;
}

.project-body h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
}

.project-tagline {
    margin: -.35rem 0 0;
    font-size: .82rem;
    font-weight: 500;
    color: var(--brand-1);
}

.project-desc {
    margin: 0;
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.65;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: auto;
    padding-top: .6rem;
    font-size: .86rem;
    font-weight: 600;
    color: var(--brand-1);
    transition: gap .3s var(--ease), color .3s ease;
}

.project-link:hover {
    gap: .85rem;
    color: #fff;
}

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    align-items: start;
}

.proficiency-card {
    padding: 1.7rem 1.4rem;
    display: flex;
    flex-direction: column;
}

.proficiency-list {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.proficiency-list .skill-item + .skill-item {
    margin-top: 0;
}

.skill-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .45rem;
    font-size: .88rem;
    color: #d7e1ee;
}

.skill-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    color: var(--brand-1);
}

.progress-bar {
    position: relative;
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.progress-fill {
    position: relative;
    width: 0;
    height: 100%;
    border-radius: 99px;
    background: var(--gradient);
    background-size: 200% 200%;
    box-shadow: 0 0 14px var(--brand-glow);
    transition: width 1.4s var(--ease);
    animation: gradientShift 6s ease infinite;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
    animation: shimmer 2.4s infinite;
}

.skills-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

.skill-card {
    padding: 1.35rem 1.25rem;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, .32);
    box-shadow: var(--shadow-glow);
}

.skill-head {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1rem;
}

.skill-head i {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    color: var(--brand-1);
    font-size: .98rem;
}

.skill-head h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.4rem;
    align-items: start;
}

.contact-info {
    display: grid;
    gap: .9rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.15rem;
    border-radius: var(--radius);
}

.contact-item:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, .35);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    color: var(--brand-1);
    font-size: 1.05rem;
}

.contact-item h4 {
    margin: 0;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}

.contact-item p {
    margin: 0;
    font-size: .92rem;
    color: #dbe6f5;
    word-break: break-word;
}

.social-row--contact {
    justify-content: flex-start;
    margin-top: .4rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
    padding: 1.7rem 1.4rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.field {
    display: grid;
    gap: .4rem;
}

.field label {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dim);
}

.field input,
.field textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    color: var(--text);
    font-family: inherit;
    font-size: .94rem;
    outline: none;
    transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.field textarea {
    resize: vertical;
    min-height: 130px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #55627a;
}

.field input:focus,
.field textarea:focus {
    border-color: rgba(56, 189, 248, .6);
    background: rgba(255, 255, 255, .055);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, .12);
}

.field input.has-error,
.field textarea.has-error {
    border-color: rgba(248, 113, 113, .7);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, .1);
}

/* ==========================================================================
   Footer / back to top
   ========================================================================== */
.site-footer {
    position: relative;
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border);
    background: rgba(5, 7, 13, .6);
    backdrop-filter: blur(10px);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    align-items: center;
    text-align: center;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--border);
}

.footer-brand p {
    margin: .5rem 0 0;
    font-size: .84rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--dim);
}

.footer-brand .nav-logo {
    justify-content: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem 1.4rem;
    font-size: .9rem;
    color: var(--muted);
}

.footer-links a {
    transition: color .3s ease;
}

.footer-links a:hover {
    color: var(--brand-1);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    align-items: center;
    padding-top: 1.4rem;
    text-align: center;
    font-size: .82rem;
    color: var(--dim);
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom i {
    color: #f472b6;
    animation: heartBeat 1.8s ease-in-out infinite;
}

.back-to-top {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: rgba(10, 14, 23, .85);
    backdrop-filter: blur(10px);
    color: var(--text);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all .4s var(--ease);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 28px rgba(99, 102, 241, .4);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
[data-animate] {
    opacity: 0;
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    will-change: opacity, transform;
}

[data-animate="fade-up"] { transform: translateY(38px); }
[data-animate="fade-right"] { transform: translateX(-42px); }
[data-animate="fade-left"] { transform: translateX(42px); }
[data-animate="zoom-in"] { transform: scale(.9); }

[data-animate].is-visible {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes loaderSlide {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(360%); }
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 25px) scale(.95); }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: .55; transform: scale(1); }
    50% { opacity: .9; transform: scale(1.06); }
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
    70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes caretBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes scrollDot {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}

@keyframes barGrow {
    from { transform: scaleY(.72); transform-origin: bottom; }
    to { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes tileFade {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}

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

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.2); }
    60% { transform: scale(1.05); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 520px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .about-highlights { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
    .section { padding: 7rem 0; }
    .about-main { padding: 2.2rem 2rem; }
    .info-card { padding: 1.9rem 1.7rem; }
    .timeline-card { padding: 1.9rem 1.8rem; }
    .featured-body { padding: 2rem 1.9rem; }
    .contact-form { padding: 2.1rem 1.9rem; }
    .proficiency-card { padding: 2rem 1.8rem; }
    .skill-card { padding: 1.6rem 1.5rem; }
    .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
    .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skills-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-visual { min-height: 260px; }
    .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
    .footer-brand .nav-logo { justify-content: flex-start; }
    .footer-bottom { flex-direction: row; justify-content: space-between; }
    .back-to-top { right: 1.8rem; bottom: 1.8rem; }
    .scroll-cue { display: flex; }
}

@media (min-width: 1024px) {
    :root { --nav-h: 84px; }
    .nav-links { display: flex; }
    .nav-actions { display: flex; }
    .menu-toggle { display: none; }
    .mobile-menu { display: none; }

    .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; }
    .hero-copy { padding-right: 1rem; }
    .about-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
    .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skills-layout { grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); }
    .contact-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1.8rem; }
    .timeline { padding-left: 2.6rem; }
    .timeline-line { left: 15px; }
    .timeline-dot { left: -2.6rem; width: 32px; height: 32px; font-size: .76rem; }
}

@media (min-width: 1024px) {
    .skills-layout {
        align-items: stretch;
    }

    .proficiency-card {
        height: 100%;
    }

    .proficiency-list {
        flex: 1;
        justify-content: space-between;
        gap: 0;
    }
}

@media (min-width: 1280px) {
    .skills-layout {
        grid-template-columns: minmax(0, .95fr) minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        gap: 1.1rem;
    }

    .proficiency-card {
        grid-column: 1;
        grid-row: 1 / 4;
    }

    .skills-cards {
        display: contents;
    }

    .skills-cards .skill-card:nth-child(1) { grid-column: 2; grid-row: 1; }
    .skills-cards .skill-card:nth-child(2) { grid-column: 3; grid-row: 1; }
    .skills-cards .skill-card:nth-child(3) { grid-column: 2; grid-row: 2; }
    .skills-cards .skill-card:nth-child(4) { grid-column: 3; grid-row: 2; }
    .skills-cards .skill-card:nth-child(5) { grid-column: 2; grid-row: 3; }
}

@media (min-width: 1280px) {
    .projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
    .hero-visual { order: -1; }
    .avatar-wrap { width: clamp(190px, 54vw, 270px); }
    .hero-grid { gap: 1.6rem; }
    .hero-hello { margin-top: 0; }
}

/* Small phones */
@media (max-width: 400px) {
    .float-chip { font-size: .68rem; padding: .3rem .6rem; }
    .btn { padding: .75rem 1.15rem; font-size: .86rem; }
    .hero-actions .btn { flex: 1 1 100%; }
}

/* Devices without hover (mobile): disable transform-heavy hovers */
@media (hover: none) {
    .glass-card:hover,
    .project-card:hover,
    .timeline-card:hover,
    .contact-item:hover,
    .skill-card:hover,
    .featured-card:hover,
    .stat-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Toast notifications
   ========================================================================== */
.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1rem 1rem 1.1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    overflow: hidden;
    pointer-events: auto;
    transform: translateX(110%);
    opacity: 0;
    animation: toastIn .5s var(--ease) forwards;
}

.toast.is-leaving {
    animation: toastOut .35s var(--ease) forwards;
}

.toast::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(56, 189, 248, .35), transparent 55%, rgba(168, 85, 247, .28));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.toast__icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 12px;
    font-size: .95rem;
}

.toast--success .toast__icon {
    background: rgba(52, 211, 153, .14);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, .28);
}

.toast--error .toast__icon {
    background: rgba(248, 113, 113, .12);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, .28);
}

.toast--warning .toast__icon {
    background: rgba(251, 191, 36, .12);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, .28);
}

.toast--info .toast__icon {
    background: var(--gradient-soft);
    color: var(--brand-1);
    border: 1px solid var(--border);
}

.toast__body {
    flex: 1;
    min-width: 0;
    padding-right: 1.4rem;
}

.toast__title {
    margin: 0 0 .2rem;
    font-family: 'Sora', sans-serif;
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.toast__message {
    margin: 0;
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.55;
}

.toast__close {
    position: absolute;
    top: .65rem;
    right: .65rem;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--dim);
    font-size: .78rem;
    cursor: pointer;
    transition: color .25s ease, background .25s ease;
}

.toast__close:hover {
    color: var(--text);
    background: var(--surface);
}

.toast__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    transform-origin: left;
    background: var(--gradient);
    animation: toastProgress linear forwards;
}

.toast--success .toast__progress { background: linear-gradient(90deg, #34d399, #6ee7b7); }
.toast--error .toast__progress { background: linear-gradient(90deg, #f87171, #fca5a5); }
.toast--warning .toast__progress { background: linear-gradient(90deg, #f59e0b, #fcd34d); }

@keyframes toastIn {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (min-width: 768px) {
    .toast-stack {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .toast-stack {
        left: 1rem;
        right: 1rem;
        width: auto;
    }
}
