/* -------------------------------------------------------------
 * Custom Premium CSS Stylesheet for Abhirath V. Raner Portfolio
 * ------------------------------------------------------------- */

/* 1. Reset & Global Properties */
html {
    scroll-behavior: initial; /* Lenis handles smooth scroll */
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Base Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0A0A0C;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8B5CF6, #06B6D4);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa, #22d3ee);
}

/* 2. Magnetic Custom Cursor Stylings */
#custom-cursor {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s, transform 0.1s ease-out;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: white;
}

#custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: #06B6D4;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.05s ease-out;
}

/* Custom Cursor Hover States */
#custom-cursor.hovered {
    width: 72px;
    height: 72px;
    background-color: rgba(139, 92, 246, 0.1);
    border-color: #8B5CF6;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* 3. Glassmorphic Templates & Cyber Cards */
.cyber-glass {
    background: rgba(13, 13, 18, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.cyber-card {
    background: rgba(17, 17, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.cyber-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.cyber-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.15);
}

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

/* Glow Borders */
.glow-border {
    position: relative;
}
.glow-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(90deg, #8B5CF6, #06B6D4, #F59E0B, #8B5CF6);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderGlow 4s linear infinite;
}
.glow-border:hover::after {
    opacity: 1;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 4. Immersive Orbiting Skill Galaxy */
.galaxy-container {
    position: relative;
    width: 100%;
    height: 600px;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.galaxy-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #c084fc 0%, #8b5cf6 60%, transparent 100%);
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.8), 0 0 100px rgba(139, 92, 246, 0.4);
    z-index: 10;
}

.galaxy-orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-60%, -60%) rotateX(180deg);
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
    transform-style: preserve-3d;
}

.galaxy-skill-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.galaxy-skill-bubble {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 75%;
    background: rgba(17, 17, 21, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.galaxy-skill-node:hover .galaxy-skill-bubble {
    background: rgba(139, 92, 246, 0.15);
    border-color: #8B5CF6;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    transform: scale(1.15);
}

/* 5. Experience Timeline Laser Tracking */
.timeline-laser-container {
    position: relative;
}

.timeline-laser-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-laser-tracker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, #8B5CF6, #06B6D4);
    box-shadow: 0 0 10px #06B6D4, 0 0 20px #8B5CF6;
    transition: height 0.1s ease-out;
}

/* 6. Typography Glow Keys & Parallax Elements */
.glow-text-cyan {
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.glow-text-purple {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.bg-radial-universe {
    background: radial-gradient(circle at 50% 30%, #151125 0%, #0A0A0C 70%);
}

.card-perspective {
    perspective: 1000px;
}

.card-tilt {
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.card-tilt-inner {
    transform: translateZ(50px);
}

/* Interactive Mockups */
.macbook-mockup {
    border: 12px solid #27272a;
    border-bottom: 24px solid #27272a;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
}

.macbook-keyboard {
    height: 8px;
    background: #18181b;
    border-radius: 0 0 12px 12px;
}

/* 7. Image Hover and Gallery Zoom */
.gallery-zoom {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.gallery-card:hover .gallery-zoom {
    transform: scale(1.08);
}

/* Base Light Theme Modifiers */
html.light {
    --tw-bg-opacity: 1;
    background-color: #F3F4F6 !important; /* Tailwind gray-100 */
    color: #1F2937 !important; /* Tailwind gray-800 */
}

html.light .cyber-glass {
    background: rgba(243, 244, 246, 0.75);
    border-color: rgba(0, 0, 0, 0.05);
}

html.light .cyber-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.04);
}

html.light .galaxy-skill-bubble {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

html.light #custom-cursor {
    border-color: rgba(139, 92, 246, 0.6);
}

html.light ::-webkit-scrollbar-track {
    background: #F3F4F6;
}
