/* =====================================================
   AXERA DIGITAL - CUSTOM STYLES & ANIMATIONS
   ===================================================== */

:root {
    --dark-bg: #0B0F1A;
    --accent-blue: #2563EB;
    --neon-cyan: #06B6D4;
    --text-light: #F3F4F6;
    --muted-gray: #9CA3AF;
}

/* ===== ANIMATIONS ===== */

/* Slow rotation for wireframe sphere */
@keyframes spin-slow {
    from {
        transform: rotateY(0deg) rotateX(0deg);
    }
    to {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Pulsing glow effect for gradient text */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(37, 99, 235, 0.3),
                     0 0 40px rgba(6, 182, 212, 0.2);
    }
    50% {
        opacity: 0.85;
        text-shadow: 0 0 30px rgba(37, 99, 235, 0.5),
                     0 0 60px rgba(6, 182, 212, 0.4);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Glow hover effect for cards */
@keyframes glow-border {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.4);
    }
}

.service-card:hover {
    animation: glow-border 2s ease-in-out infinite;
}

/* Fade in animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: fade-in 0.8s ease-out;
}

/* Subtle floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Grid background animation */
@keyframes grid-shift {
    0% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0.35;
    }
}

section svg[viewBox="0 0 1000 1000"] {
    animation: grid-shift 8s ease-in-out infinite;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

h1 {
    line-height: 1.2;
    font-weight: 800;
}

h2 {
    font-weight: 700;
    letter-spacing: -0.015em;
}

/* ===== BUTTONS ===== */

a[href^="mailto:"],
button,
.btn,
a.px-8 {
    position: relative;
    overflow: hidden;
}

a[href^="mailto:"]:hover,
button:hover,
.btn:hover {
    transform: translateY(-2px);
}

/* ===== FORM ELEMENTS ===== */

input, textarea, select {
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(107, 114, 128, 0.3);
    color: var(--text-light);
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    background-color: rgba(31, 41, 55, 0.7);
    border-color: var(--neon-cyan);
    outline: none;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* ===== SCROLLBAR ===== */

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

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* ===== LINKS ===== */

a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:not([class]):not([href^="mailto:"]):not([href^="#"]) {
    color: var(--neon-cyan);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.3s ease;
}

a:not([class]):not([href^="mailto:"]):not([href^="#"]):hover {
    text-decoration-color: var(--neon-cyan);
}

/* ===== SECTION SPACING ===== */

section {
    position: relative;
}

/* ===== UTILITY ANIMATIONS ===== */

.hover\:shadow-lg {
    transition: box-shadow 0.3s ease;
}

/* Smooth transitions for all interactive elements */
button,
a[href],
input,
textarea,
select {
    transition: all 0.3s ease;
}

/* ===== GRADIENT TEXT ===== */

.bg-clip-text {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Stack timeline vertically on mobile */
    .grid-cols-1 {
        --tw-cols: minmax(0, 1fr);
    }

    /* Reduce padding on mobile */
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .px-8 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */

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

/* ===== DARK MODE ENHANCEMENTS ===== */

/* Ensure consistent contrast */
body {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

/* Add subtle backdrop blur to overlays */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Use will-change sparingly for frequently animated elements */
.animate-spin-slow,
.animate-pulse-glow {
    will-change: transform;
}

/* GPU acceleration for transforms */
.service-card,
a[href],
button {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== PRINT STYLES ===== */

@media print {
    nav,
    footer,
    .service-card:hover,
    .animate-pulse-glow {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* ===== CUSTOM SCROLLBAR FOR FIREFOX ===== */

* {
    scrollbar-color: var(--accent-blue) var(--dark-bg);
    scrollbar-width: thin;
}

/* ===== ADDITIONAL POLISH ===== */

/* Smooth color transitions on hover */
.hover\:border-neon-cyan:hover,
.hover\:border-accent-blue:hover,
.hover\:bg-gray-900\/50:hover {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Shadow effects for depth */
.shadow-lg {
    transition: box-shadow 0.3s ease;
}

/* Smooth text rendering */
body, button, input, textarea, select {
    -webkit-font-smoothing: subpixel-antialiased;
}

/* ===== NEON GLOW EFFECT ===== */

.border-neon-cyan,
.text-neon-cyan {
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.border-neon-cyan:hover,
.text-neon-cyan:hover {
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* ===== GRID BACKGROUND OVERLAY ===== */

svg[viewBox="0 0 1000 1000"] {
    position: relative;
    z-index: 0;
}

/* ===== TIMELINE CONNECTOR LINES ===== */

.absolute {
    transition: background 0.3s ease;
}

/* ===== CARD ELEVATION ===== */

.bg-gray-900\/50 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-gray-900\/50:hover {
    transform: translateY(-4px);
}

/* ===== FOOTER STYLING ===== */

footer {
    backdrop-filter: blur(10px);
}

.acharya-link {
    position: relative;
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.acharya-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
    transform: scaleX(0.8);
    transform-origin: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.acharya-link:hover::after,
.acharya-link:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

/* ===== HERO SECTION SPECIFIC ===== */

.min-h-screen {
    min-height: 100vh;
}

/* Ensure SVG backgrounds don't overflow */
svg {
    overflow: visible;
}

/* ===== CONTAINER QUERIES (FALLBACK) ===== */

.max-w-7xl {
    max-width: 80rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-2xl {
    max-width: 42rem;
}

/* ===== UTILITY SPACING ===== */

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

/* ===== LOADING STATE ===== */

@keyframes loading {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== PSEUDO ELEMENTS ===== */

::selection {
    background-color: var(--accent-blue);
    color: var(--text-light);
}

::-moz-selection {
    background-color: var(--accent-blue);
    color: var(--text-light);
}
