/* ============================================================
   MODERN UI/UX LAYER — loaded after style.css
   Professional, dynamic, high-contrast upgrade.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
    --font-display: 'Space Grotesk', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    --bg: #05060f;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);

    --indigo: #6366f1;
    --violet: #8b5cf6;
    --cyan: #22d3ee;
    --pink: #f472b6;
    --green: #34d399;

    --grad: linear-gradient(120deg, #6366f1, #8b5cf6 45%, #22d3ee);
    --grad-soft: linear-gradient(120deg, rgba(99, 102, 241, 0.18), rgba(34, 211, 238, 0.10));
    --glow: 0 0 24px rgba(99, 102, 241, 0.35);

    --radius: 22px;
    --radius-sm: 14px;
    --ring: rgba(255, 255, 255, 0.12);
    --card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
}

.light-mode {
    --bg: #f8fafc;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --surface: rgba(15, 23, 42, 0.04);
    --surface-2: rgba(15, 23, 42, 0.07);
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(15, 23, 42, 0.18);
    --ring: rgba(15, 23, 42, 0.12);
    --card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.6));
}

/* ---------- Base ---------- */
body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    background:
        radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.16), transparent 22%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.12), transparent 20%),
        radial-gradient(circle at 30% 82%, rgba(139, 92, 246, 0.14), transparent 24%),
        radial-gradient(circle at 80% 76%, rgba(244, 114, 182, 0.08), transparent 20%);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

section > h2 {
    font-size: clamp(1.9rem, 4.2vw, 2.8rem);
    letter-spacing: -0.02em;
    color: var(--text);
}

section > h2::after {
    background: var(--grad);
    width: 72px;
    height: 4px;
    border-radius: 99px;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.6);
}

/* ---------- Navbar ---------- */
.navbar {
    margin: 14px 22px 0;
    top: 12px;
    padding: 14px 24px;
    background: rgba(10, 12, 30, 0.55);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.35);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(8, 10, 24, 0.82);
    border-color: var(--border-strong);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.navbar.nav-hidden { transform: translateY(-130%); }

.light-mode .navbar { background: rgba(255, 255, 255, 0.7); }
.light-mode .navbar.scrolled { background: rgba(255, 255, 255, 0.85); }

.logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.logo::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--grad);
    box-shadow: var(--glow);
}

.nav-links a {
    color: var(--text-2);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 4px;
    position: relative;
    transition: color 0.25s ease;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.nav-links li:hover a,
.nav-links a.active {
    color: var(--text);
}
.nav-links a.active::after,
.nav-links li:hover a::after {
    transform: scaleX(1);
}

.nav-toggle span { background: var(--text-2); }

/* ---------- Hero ---------- */
header {
    padding: 0 20px;
    background: transparent;
}

#hero-content {
    gap: 14px;
    padding: 40px 48px;
}

#hero-content > * { text-shadow: none; }

/* Profile image with rotating gradient ring */
#profileImg {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    padding: 4px;
    background: linear-gradient(135deg, #6366f1, #22d3ee, #f472b6, #8b5cf6);
    background-size: 300% 300%;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.35);
    animation: spinRing 6s linear infinite, floatY 6s ease-in-out infinite;
    transition: transform 0.4s ease;
}
#profileImg:hover { transform: scale(1.04); }

.profile-img-fallback {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.35);
}

@keyframes spinRing {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-badge {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 500;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px var(--green);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.82); }
}

header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.4rem);
    letter-spacing: -0.03em;
    text-transform: none;
    font-weight: 700;
    line-height: 1.04;
    color: var(--text);
    margin: 6px 0 4px;
    text-shadow: none;
}
header h1 .name-highlight {
    background: linear-gradient(120deg, #818cf8, #a78bfa 40%, #22d3ee 75%, #f472b6);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 8s ease infinite;
}

#typing {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 500;
    color: var(--text-2);
    letter-spacing: 0.01em;
    min-height: 1.6em;
    position: relative;
}
#typing::after {
    content: "";
    display: inline-block;
    width: 3px;
    height: 1.15em;
    margin-left: 4px;
    vertical-align: text-bottom;
    background: var(--grad);
    border-radius: 2px;
    animation: blinkCaret 1s steps(1) infinite;
}
@keyframes blinkCaret {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.availability-badge {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 16px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    color: var(--text-2);
}
.availability-badge .dot {
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}
.availability-badge.busy .dot { background: #f87171; box-shadow: 0 0 10px #f87171; }
.availability-badge .status-text { color: var(--text-2); }

/* Hero buttons */
.hero-button {
    position: relative;
    overflow: hidden;
    padding: 15px 28px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: none;
    box-shadow: 0 12px 34px rgba(99, 102, 241, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.hero-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(99, 102, 241, 0.45);
    filter: brightness(1.06);
}
.hero-button:hover::after { left: 130%; }
.hero-button:active { transform: translateY(0); }

.hero-button-secondary {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: none;
}
.hero-button-secondary::after { display: none; }
.hero-button-secondary:hover {
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.3);
    border-color: rgba(129, 140, 248, 0.5);
}

/* Scroll cue */
.scroll-cue {
    opacity: 0.75;
    animation: cueBounce 2s ease-in-out infinite;
}
@keyframes cueBounce {
    0%, 100% { transform: translateY(0); opacity: 0.75; }
    50% { transform: translateY(7px); opacity: 1; }
}

/* ---------- Sections ---------- */
section {
    scroll-margin-top: 96px;
}

/* ---------- Cards base (glass + spotlight) ---------- */
.skill-card,
.contact-info-card,
.timeline-step,
.testimonial-card-body,
.video-showcase-card,
.comments-content,
.search-bar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-radius: var(--radius);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Cursor spotlight on cards */
.skill-card,
.project-card,
.contact-info-card,
.timeline-step,
.testimonial-card-body,
.stat-card {
    position: relative;
}
.skill-card::after,
.project-card::after,
.contact-info-card::after,
.timeline-step::after,
.testimonial-card-body::after,
.stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 50%), rgba(129, 140, 248, 0.14), transparent 45%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.skill-card:hover::after,
.project-card:hover::after,
.contact-info-card:hover::after,
.timeline-step:hover::after,
.testimonial-card-body:hover::after,
.stat-card:hover::after {
    opacity: 1;
}
.skill-card > *, .project-card > *, .contact-info-card > *, .timeline-step > *, .testimonial-card-body > *, .stat-card > * {
    position: relative;
    z-index: 1;
}

.skill-card:hover,
.contact-info-card:hover,
.timeline-step:hover,
.testimonial-card-body:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

/* ---------- About ---------- */
.about-text p {
    color: var(--text-2);
    font-size: 1.05rem;
    line-height: 1.75;
}
.about-highlight {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.about-highlight:hover {
    transform: translateY(-4px);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.35);
}
.about-highlight strong { color: var(--text); }
.about-highlight div { color: var(--muted); }
.about-icon {
    background: var(--grad-soft);
    border: 1px solid var(--border);
    font-size: 1.3rem;
}

/* ---------- Skills ---------- */
.skill-card h3 {
    font-size: 1.3rem;
    color: var(--text);
    letter-spacing: -0.01em;
}
.skill-card p { color: var(--muted); line-height: 1.7; }
.skill-progress span { color: var(--text-2); font-weight: 600; font-size: 0.88rem; }
.skill-progress span:last-child {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}
.skill-bar {
    height: 8px;
    background: var(--surface-2);
    border-radius: 99px;
    overflow: hidden;
}
.skill-level {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #22d3ee);
    background-size: 200% 100%;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
    transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
    animation: skillSheen 3s linear infinite;
}
@keyframes skillSheen {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* ---------- Stats ---------- */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 20px 44px rgba(2, 6, 23, 0.4);
}
.stat-number {
    font-family: var(--font-display);
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.6rem;
    font-weight: 700;
}
.stat-label { color: var(--muted); }

/* ---------- Timeline ---------- */
.timeline-step { border-radius: var(--radius); }
.timeline-step .step-num {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 12px;
}
.timeline-step h4 { color: var(--text); font-size: 1.2rem; }
.timeline-step p { color: var(--muted); }

/* ---------- Project cards ---------- */
.project-card {
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}
.project-card:hover {
    transform: translateY(-7px);
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: 0 26px 55px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.project-card h3 {
    color: var(--text);
    font-size: 1.22rem;
    letter-spacing: -0.01em;
}
.project-card p { color: var(--muted); line-height: 1.65; }
.project-tag {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.28);
    color: #c7d2fe;
    font-size: 0.72rem;
}
.project-link {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    border-radius: 12px;
    font-weight: 500;
}
.project-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.35);
}
.project-link-secondary {
    background: var(--surface);
    color: var(--muted);
}

/* Video card iframe */
.video-frame-container {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.4);
}

/* Comments */
.comments-toggle { color: var(--text-2); font-weight: 600; }
.comment-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
}
.comment-item strong { color: #a5b4fc; }
.comment-item p { color: var(--text-2); margin-top: 2px; }
.comment-name, .comment-text {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 9px 12px;
    font-family: var(--font-body);
}
.comment-submit {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.comment-submit:hover { box-shadow: 0 12px 26px rgba(99, 102, 241, 0.4); transform: translateY(-2px); }

/* Delete buttons (admin) */
.delete-project-btn, .delete-video-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}
.delete-project-btn:hover, .delete-video-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

/* ---------- Category filters ---------- */
.cat-filter {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: 999px;
    padding: 9px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.cat-filter:hover {
    border-color: rgba(129, 140, 248, 0.45);
    color: var(--text);
    transform: translateY(-2px);
}
.cat-filter.active {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35);
}

/* ---------- Search ---------- */
.search-bar {
    max-width: 560px;
    margin: 0 auto 28px;
}
.search-bar svg { color: var(--muted); }
.search-bar input { color: var(--text); font-family: var(--font-body); }
.search-bar input::placeholder { color: var(--muted); }

/* ---------- Testimonials ---------- */
.testimonial-quote {
    color: var(--text-2);
    font-size: 1.05rem;
    line-height: 1.7;
    border-left-color: rgba(129, 140, 248, 0.5);
}
.testimonial-author { color: var(--muted); }
.testimonial-author strong { color: var(--text); }
.testimonial-author span { color: #a5b4fc; }
.test-carousel-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.test-carousel-btn:hover {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.35);
}
.test-dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    transition: all 0.3s ease;
    cursor: pointer;
}
.test-dot.active {
    width: 26px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
}

/* ---------- Contact ---------- */
.contact-info-item strong { color: var(--text); }
.contact-info-item a, .contact-info-item span { color: var(--text-2); }
.contact-icon {
    background: var(--grad-soft);
    border: 1px solid var(--border);
    color: #a5b4fc;
}
.contact-social .social-link {
    color: var(--text-2);
    background: var(--surface-2);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}
.contact-social .social-link:hover {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.35);
}

.contact-form .input-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-form .input-group:focus-within {
    border-color: rgba(129, 140, 248, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.contact-form input,
.contact-form textarea {
    color: var(--text);
    font-family: var(--font-body);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }
.contact-icon svg { color: #a5b4fc; }

.contact-submit-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1, #7c3aed, #8b5cf6);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 15px 28px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: btnShift 5s ease infinite;
}
.contact-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.45);
}
@keyframes btnShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: rgba(6, 8, 20, 0.6);
    border-top: 1px solid var(--border);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.site-footer h3 { color: var(--text); }
.site-footer p { color: var(--muted); }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: #a5b4fc; }
.light-mode .site-footer { background: rgba(255, 255, 255, 0.7); }

.meta-button, .mute-button, .email-button, .whatsapp-button {
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--text-2);
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.meta-button:hover, .mute-button:hover, .email-button:hover, .whatsapp-button:hover {
    border-color: rgba(129, 140, 248, 0.5);
    color: var(--text);
    transform: translateY(-2px);
}

/* ---------- Floating UI ---------- */
.scroll-progress {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #22d3ee);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.7);
}

.back-to-top {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border: none;
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.55);
}

.cursor-dot {
    background: #818cf8;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.8);
}
.cursor-ring {
    border-color: rgba(129, 140, 248, 0.45);
}
.cursor-ring.hover {
    background: rgba(129, 140, 248, 0.12);
    border-color: rgba(129, 140, 248, 0.8);
}

.project-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 90px rgba(2, 6, 23, 0.6);
}
.project-modal h2 { color: var(--text); }
.project-modal .modal-desc { color: var(--text-2); }
.project-modal .modal-link {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border-radius: 12px;
    padding: 12px 22px;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
}

.share-toast {
    background: rgba(10, 12, 30, 0.9);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    color: var(--text);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.lightbox {
    background: rgba(2, 6, 23, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* ---------- Marquee strip ---------- */
.marquee {
    position: relative;
    overflow: hidden;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
    display: flex;
    gap: 0;
    width: max-content;
    animation: marqueeScroll 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    margin: 0 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
}
.marquee-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--grad);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
}

/* ---------- Hero intro animation ---------- */
body.site-loaded #hero-content > * {
    opacity: 0;
    animation: heroUp 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
body.site-loaded #hero-content > *:nth-child(1) { animation-delay: 0.05s; }
body.site-loaded #hero-content > *:nth-child(2) { animation-delay: 0.15s; }
body.site-loaded #hero-content > *:nth-child(3) { animation-delay: 0.25s; }
body.site-loaded #hero-content > *:nth-child(4) { animation-delay: 0.35s; }
body.site-loaded #hero-content > *:nth-child(5) { animation-delay: 0.45s; }
body.site-loaded #hero-content > *:nth-child(6) { animation-delay: 0.55s; }
body.site-loaded #hero-content > *:nth-child(7) { animation-delay: 0.65s; }
@keyframes heroUp {
    from { opacity: 0; transform: translateY(26px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ---------- Scroll reveal (enhanced) ---------- */
.animate-in { opacity: 0; transform: translateY(34px); filter: blur(3px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.7s ease; }
.animate-in-left { opacity: 0; transform: translateX(-40px); filter: blur(3px); transition: all 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.animate-in-right { opacity: 0; transform: translateX(40px); filter: blur(3px); transition: all 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.animate-in-scale { opacity: 0; transform: scale(0.92); filter: blur(3px); transition: all 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.animate-in.visible,
.animate-in-left.visible,
.animate-in-right.visible,
.animate-in-scale.visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

/* ---------- Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12), rgba(255,255,255,0.05));
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 14px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- Light mode refinements ---------- */
.light-mode body::before {
    background:
        radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.12), transparent 22%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.10), transparent 20%),
        radial-gradient(circle at 30% 82%, rgba(139, 92, 246, 0.10), transparent 24%);
}
.light-mode .hero-button-secondary { color: #1e293b; }
.light-mode .about-highlight,
.light-mode .comment-item,
.light-mode .comment-name,
.light-mode .comment-text,
.light-mode .contact-form .input-group {
    background: rgba(255, 255, 255, 0.7);
}
.light-mode .about-icon,
.light-mode .contact-icon {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}
.light-mode .contact-icon svg { color: #6366f1; }
.light-mode .project-tag { color: #4f46e5; background: rgba(99, 102, 241, 0.12); }
.light-mode .comment-item strong { color: #4f46e5; }
.light-mode .skill-progress span:last-child {
    -webkit-background-clip: text;
    background-clip: text;
}
.light-mode .timeline-step .step-num { color: #4f46e5; background: rgba(99, 102, 241, 0.1); }
.light-mode .marquee { background: rgba(15, 23, 42, 0.02); }
.light-mode .stat-number {
    background: linear-gradient(120deg, #4f46e5, #7c3aed, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    body.site-loaded #hero-content > * { opacity: 1 !important; animation: none !important; transform: none !important; filter: none !important; }
    .animate-in, .animate-in-left, .animate-in-right, .animate-in-scale { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
    .marquee-track { animation: none !important; }
    #profileImg { animation: none !important; }
    .contact-submit-btn { animation: none !important; }
}

/* ---------- Spacing rhythm pass ---------- */
/* Sections: generous, consistent vertical rhythm */
section {
    padding: 96px 24px 104px;
}

/* Section headings: breathe before content */
section > h2 {
    margin-bottom: 42px;
}
section > h2::after {
    margin-top: 16px;
}

/* Hero: balanced vertical rhythm */
#hero-content {
    gap: 16px;
    padding: 52px 48px 44px;
}
#profileImg {
    margin-bottom: 8px;
}
header h1 {
    margin: 6px 0 6px;
}
#typing {
    margin-bottom: 2px;
}
.hero-actions {
    gap: 14px;
    margin-top: 26px;
}
.scroll-cue {
    margin-top: 52px;
}

/* Grids: unified rhythm across page */
.project-grid { gap: 26px; margin-top: 38px; }
.skills-grid { gap: 22px; }
.stats-grid { gap: 18px; margin-top: 28px; }
.timeline { gap: 22px; margin-top: 32px; }
.about-grid { gap: 28px; }
.search-bar { margin-bottom: 32px; }

/* Cards: consistent inner padding */
.project-card { padding: 26px; }
.skill-card { padding: 26px; }
.stat-card { padding: 28px 18px; }
.timeline-step { padding: 28px 22px; }
.contact-info-card { padding: 30px 26px; }
.testimonial-card-body { padding: 30px; }

/* Footer breathing room */
.site-footer { padding: 40px 24px 28px; }

/* Responsive tighten for small screens */
@media (max-width: 940px) {
    section { padding: 72px 18px 80px; }
    #hero-content { padding: 44px 22px 36px; }
    .hero-actions { gap: 12px; margin-top: 22px; }
    .scroll-cue { margin-top: 40px; }
}
