/* Simple, Subtle Enhancements - No blinking, no parallax issues */

/* Smooth all transitions globally */
* {
    transition: all 0.3s ease;
}

/* Better typography spacing */
h1, h2, h3 {
    text-wrap: balance;
}

/* Subtle hover on images - just scale, no shadows */
.service__image img:hover {
    transform: scale(1.02);
}

.biography__image img:hover {
    transform: scale(1.01);
}

/* Simple link hover - color change only */
a {
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

/* Slightly animate the accent bars under titles */
.services__title::after,
.biography__title::after,
.testimonials__title::after {
    transition: width 0.3s ease;
}

.services__title:hover::after,
.biography__title:hover::after,
.testimonials__title:hover::after {
    width: 80px;
}

/* Simple header background on scroll */
.site-header {
    transition: background-color 0.3s ease;
}

.site-header.scrolled {
    background-color: rgba(255, 247, 244, 0.98);
}

/* Smooth scroll for the whole page */
html {
    scroll-behavior: smooth;
}

/* Simple fade animation for elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Twinkle animation for stars */
@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Star field for dark sections */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 4s infinite;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), #f9e4a1);
    z-index: 100;
    transition: width 0.2s ease;
}

/* Custom Cursor Styles */
body {
    cursor: none;
}

a, button, .hoverable {
    cursor: none;
}

.custom-cursor {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

/* Inner cursor with blend mode for visibility */
.cursor__inner {
    position: fixed;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: transform 0.15s ease-out;
    z-index: 10001;
}

.cursor__inner svg circle {
    fill: #fff;
}

/* Outer glow that changes based on background */
.cursor__outer {
    position: fixed;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: all 0.3s ease-out;
    z-index: 10000;
    opacity: 0;
}

/* Light background state (default) - MORE DRAMATIC */
.cursor__outer.light-bg {
    background: radial-gradient(circle,
        rgba(244, 208, 111, 0.8) 0%,
        rgba(255, 215, 0, 0.5) 20%,
        rgba(244, 208, 111, 0.3) 40%,
        rgba(244, 208, 111, 0) 100%);
    opacity: 1;
    box-shadow: 0 0 20px rgba(244, 208, 111, 0.6),
                0 0 40px rgba(244, 208, 111, 0.3);
}

/* Dark background state - MORE DRAMATIC */
.cursor__outer.dark-bg {
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 247, 244, 0.4) 20%,
        rgba(255, 247, 244, 0.2) 40%,
        rgba(255, 247, 244, 0) 100%);
    opacity: 1;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
                0 0 40px rgba(255, 247, 244, 0.3);
}

/* Hover state - expands glow DRAMATICALLY */
.cursor__outer.hover {
    transform: translate(-50%, -50%) scale(2);
}

.cursor__outer.light-bg.hover {
    box-shadow: 0 0 30px rgba(244, 208, 111, 0.9),
                0 0 60px rgba(255, 215, 0, 0.6);
}

.cursor__outer.dark-bg.hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8),
                0 0 60px rgba(255, 247, 244, 0.5);
}

.cursor__inner.hover {
    transform: translate(-50%, -50%) scale(1.5);
}

/* Pulse animation for outer glow - MORE DRAMATIC */
@keyframes cursorPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        filter: brightness(1.2);
    }
}

.cursor__outer:not(.hover) {
    animation: cursorPulse 3s ease-in-out infinite;
}

/* Particle container */
.cursor__particles {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

/* Individual particle style - MORE SPARKLY */
.cursor__particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor__particle.light-bg {
    background: radial-gradient(circle,
        rgba(255, 215, 0, 1) 0%,
        rgba(244, 208, 111, 0.8) 100%);
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.8),
                0 0 12px rgba(244, 208, 111, 0.5);
}

.cursor__particle.dark-bg {
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 247, 244, 0.8) 100%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8),
                0 0 12px rgba(255, 247, 244, 0.5);
}

/* Sparkle animation */
@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

.cursor__sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    pointer-events: none;
}

.cursor__sparkle::before,
.cursor__sparkle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 215, 0, 1) 50%,
        transparent 100%);
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.cursor__sparkle::after {
    transform: translateY(-50%) rotate(90deg);
}

.cursor__sparkle.light-bg::before,
.cursor__sparkle.light-bg::after {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 215, 0, 1) 50%,
        transparent 100%);
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.8);
}

.cursor__sparkle.dark-bg::before,
.cursor__sparkle.dark-bg::after {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 1) 50%,
        transparent 100%);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.cursor__sparkle.active {
    animation: sparkle 0.6s ease-out forwards;
}

/* Hide cursor on mobile/touch devices */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none;
    }

    body, a, button, .hoverable {
        cursor: auto;
    }
}

/* Accessibility - hide custom cursor if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .custom-cursor {
        display: none;
    }

    body, a, button, .hoverable {
        cursor: auto;
    }

    .cursor__outer {
        animation: none;
    }
}

/* Apply fade-in to sections on load */
.introduction,
.service,
.biography__content,
.testimonials {
    animation: fadeIn 0.8s ease;
}

/* Stagger service cards */
.service:nth-child(2) { animation-delay: 0.1s; }
.service:nth-child(3) { animation-delay: 0.2s; }
.service:nth-child(4) { animation-delay: 0.3s; }

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Disable hover effects on mobile */
    .service__image img:hover,
    .biography__image img:hover {
        transform: none;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}