/* =========================================
   Jason Holt Portfolio - Custom Styles
   ========================================= */

/* Color System - Technical Palette (Charcoal + Emerald) */
:root {
    --color-dominant: #09090b;      /* zinc-950 */
    --color-supporting: #18181b;    /* zinc-900 */
    --color-surface: #27272a;       /* zinc-800 */
    --color-accent: #10b981;
    --color-accent-hover: #34d399;
    --color-accent-subtle: #059669;
    --color-accent-rgb: 16, 185, 129;  /* For rgba() usage */
    --color-text-primary: #fafafa;  /* zinc-50 */
    --color-text-secondary: #a1a1aa; /* zinc-400 */
}

/* Base Typography */
body { font-family: 'Inter', sans-serif; }
h1, h2, .font-display { font-family: 'Sora', sans-serif; }

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    height: 350px;
    max-height: 400px;
}

/* Timeline Styles */
.timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-supporting), rgba(0,0,0,0));
}

.timeline-dot {
    position: absolute;
    left: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid var(--color-dominant);
    box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-dominant); }
::-webkit-scrollbar-thumb { background: var(--color-supporting); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-subtle); }

/* Chat Widget Animations */
@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.chat-open { animation: slideIn 0.3s ease-out forwards; }

/* Pulse for AI Button */
@keyframes softPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
    50% { transform: scale(1.02); box-shadow: 0 10px 15px -3px rgba(var(--color-accent-rgb), 0.3), 0 4px 6px -2px rgba(var(--color-accent-rgb), 0.1); }
}
.animate-soft-pulse { animation: softPulse 3s infinite ease-in-out; }

/* Markdown Styles for AI Response */
.ai-response strong { color: var(--color-accent); font-weight: 600; }
.ai-response ul { list-style-type: disc; margin-left: 1.5em; margin-top: 0.5em; margin-bottom: 0.5em; }
.ai-response p { margin-bottom: 0.5em; }

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(24, 24, 27, 0.92);  /* zinc-900 */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(var(--color-accent-rgb), 0.15);
}

/* Animated Gradient Text - Continuous flow (no bounce) */
@keyframes gradient-x {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.animate-gradient-x {
    background-size: 200% 100%;
    animation: gradient-x 8s linear infinite;
}

/* Scroll Reveal Animations */
@keyframes reveal-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal-up {
    opacity: 0;
    animation: reveal-up 0.6s ease-out forwards;
}
.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }
.reveal-delay-5 { animation-delay: 0.5s; }
.reveal-delay-6 { animation-delay: 0.6s; }

/* Scroll-triggered animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced hover glow */
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(var(--color-accent-rgb), 0.15), 0 0 60px rgba(var(--color-accent-rgb), 0.1);
}

/* Tooltip slide-fade animation */
.tooltip-hover {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.group:hover .tooltip-hover {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Button press effect */
.press-effect:active {
    transform: scale(0.95);
}

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

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link styling */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent);
    color: var(--color-dominant);
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}
.skip-link:focus {
    top: 0;
}

/* Enhanced focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Floating animation for badges */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Blinking cursor for typewriter effect */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
.animate-blink {
    animation: blink 1s step-end infinite;
}

/* Expandable details animation */
.expandable-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
}
.expandable-details.expanded {
    opacity: 1;
}

/* Chevron rotation */
.expand-chevron {
    transition: transform 0.3s ease-out;
}

/* Subtle pulse for expand buttons */
@keyframes subtle-pulse {
    0%, 100% { color: rgb(136 146 176); } /* text-secondary */
    50% { color: var(--color-accent); } /* brand-400 emerald */
}
.expand-hint {
    animation: subtle-pulse 2.5s ease-in-out infinite;
}

/* Ghost Button Style - Professional/Trust */
.btn-ghost {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    transition: all 0.2s ease;
}
.btn-ghost:hover {
    background: rgba(var(--color-accent-rgb), 0.1);
    border-color: var(--color-accent-hover);
    color: var(--color-accent-hover);
}
.btn-ghost:active {
    transform: scale(0.98);
}
