body {
    font-family: 'Inter', sans-serif;
    background-color: #050505;
    color: #a3a3a3;
}
.font-mono {
    font-family: 'Fira Code', monospace;
}
.font-handwriting {
    font-family: 'Caveat', cursive;
}

/* Highlight text in About section */
.hl {
    background-color: #1f1f22;
    color: #d4d4d8;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
}

/* Timeline line color */
.timeline-border {
    border-color: #2e1a47;
}

/* Timeline dot */
.timeline-dot {
    border-color: #6d28d9;
    background-color: #050505;
}

/* ── Scroll-reveal animations ────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(.16,1,.3,1),
                transform 0.7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* staggered children delay */
.reveal-children > *:nth-child(1)  { transition-delay: 0ms; }
.reveal-children > *:nth-child(2)  { transition-delay: 80ms; }
.reveal-children > *:nth-child(3)  { transition-delay: 160ms; }
.reveal-children > *:nth-child(4)  { transition-delay: 240ms; }
.reveal-children > *:nth-child(5)  { transition-delay: 320ms; }
.reveal-children > *:nth-child(6)  { transition-delay: 400ms; }
.reveal-children > *:nth-child(7)  { transition-delay: 480ms; }
.reveal-children > *:nth-child(8)  { transition-delay: 560ms; }
.reveal-children > *:nth-child(9)  { transition-delay: 600ms; }
.reveal-children > *:nth-child(10) { transition-delay: 640ms; }
.reveal-children > *:nth-child(11) { transition-delay: 680ms; }
.reveal-children > *:nth-child(12) { transition-delay: 720ms; }
.reveal-children > *:nth-child(13) { transition-delay: 740ms; }
.reveal-children > *:nth-child(14) { transition-delay: 760ms; }
.reveal-children > *:nth-child(15) { transition-delay: 780ms; }
.reveal-children > *:nth-child(16) { transition-delay: 800ms; }
.reveal-children > *:nth-child(17) { transition-delay: 820ms; }
.reveal-children > *:nth-child(18) { transition-delay: 840ms; }

/* ── Header entrance ─────────────────────────────────── */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-header {
    animation: fadeInDown 0.8s cubic-bezier(.16,1,.3,1) both;
}
.animate-header-delay {
    animation: fadeInDown 0.8s 0.15s cubic-bezier(.16,1,.3,1) both;
}
.animate-header-delay-2 {
    animation: fadeInDown 0.8s 0.3s cubic-bezier(.16,1,.3,1) both;
}

/* ── Underline animation ─────────────────────────────── */
@keyframes drawLine {
    from { stroke-dashoffset: 220; }
    to   { stroke-dashoffset: 0; }
}
.underline-svg path {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: drawLine 1s 0.5s ease-out forwards;
}

/* ── Hover glow on tech cards ────────────────────────── */
.tech-card {
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.tech-card:hover {
    border-color: #6d28d9;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(109,40,217,0.15);
}

/* ── Timeline dot pulse ──────────────────────────────── */
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(109,40,217,0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(109,40,217,0); }
}
.timeline-dot-animated:hover {
    animation: dotPulse 1.5s infinite;
}

/* ── Project card subtle hover ───────────────────────── */
.project-card {
    display: block;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.project-card:hover {
    background: rgba(109,40,217,0.04);
    border-color: #1e1e24;
}

/* ── Footer gradient divider ─────────────────────────── */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #6d28d9, transparent);
    opacity: 0.3;
}

/* ── Smooth scrollbar ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #2e1a47; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6d28d9; }

/* ── Ambient glow behind header ──────────────────────── */
.ambient-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109,40,217,0.08) 0%, transparent 70%);
    top: -80px;
    left: -60px;
    pointer-events: none;
    z-index: 0;
}

/* ── Smooth scroll ────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Floating particles canvas ────────────────────────── */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
body > *:not(#particles-canvas):not(#spotlight) {
    position: relative;
    z-index: 1;
}

/* ── Mouse-following spotlight ────────────────────────── */
#spotlight {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109,40,217,0.045) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: left 0.3s ease-out, top 0.3s ease-out;
}

/* ── Typewriter cursor blink ──────────────────────────── */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #8b5cf6;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s steps(1) infinite;
}
@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ── Highlight tag shimmer on hover ───────────────────── */
.hl {
    position: relative;
    overflow: hidden;
    transition: color 0.3s, background-color 0.3s;
}
.hl::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.15), transparent);
    transition: left 0.5s ease;
}
.hl:hover::after {
    left: 100%;
}
.hl:hover {
    background-color: #2a1a3e;
    color: #c4b5fd;
}

/* ── Section heading emoji bounce ─────────────────────── */
@keyframes emojiBounce {
    0%, 100% { transform: translateY(0); }
    40%      { transform: translateY(-6px); }
    60%      { transform: translateY(-3px); }
}
.emoji-bounce {
    display: inline-block;
    transition: transform 0.3s;
}
h2:hover .emoji-bounce {
    animation: emojiBounce 0.6s ease;
}

/* ── Animated gradient timeline border ────────────────── */
@keyframes timelineGradient {
    0%   { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
}
.timeline-animated {
    border-left: 2px solid transparent;
    background-image: linear-gradient(#050505, #050505),
                      linear-gradient(180deg, #6d28d9, #2e1a47, #6d28d9);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 100% 200%;
    animation: timelineGradient 4s linear infinite alternate;
}

/* ── Project card arrow ───────────────────────────────── */
.project-card .project-arrow {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s, transform 0.3s;
}
.project-card:hover .project-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Back-to-top button ───────────────────────────────── */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1e;
    border: 1px solid #2e1a47;
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, background 0.3s, border-color 0.3s;
    z-index: 50;
    pointer-events: none;
}
#back-to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#back-to-top:hover {
    background: #6d28d9;
    border-color: #8b5cf6;
    color: white;
}
