/* ============================================
   DESIGN V2 — Premium Portfolio Enhancements
   raghuramreddy.tech
   ============================================ */

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    z-index: 9999;
    border-radius: 0 2px 2px 0;
    transition: width 0.08s linear;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

/* ============================================
   CUSTOM CURSOR — Desktop only
   ============================================ */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    will-change: left, top;
    display: none;
}

/* cursor: none removed — using default browser arrow cursor */

.cursor-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    transition: transform 0.1s ease, background 0.2s ease, opacity 0.2s ease;
    z-index: 99999;
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(59, 130, 246, 0.55);
    background: transparent;
    transition: transform 0.12s ease, width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
    z-index: 99998;
}

.cursor-ring.hovered {
    width: 52px;
    height: 52px;
    border-color: rgba(139, 92, 246, 0.6);
}

.cursor-dot.hovered {
    transform: translate(-50%, -50%) scale(1.8);
    background: #8b5cf6;
}

/* ============================================
   STATUS / AVAILABILITY BADGE
   ============================================ */
.hero-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: #22c55e;
    margin-bottom: 28px;
    width: fit-content;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ============================================
   TYPEWRITER
   ============================================ */
.typewriter-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 8px;
    min-height: 2em;
}

.typewriter-static {
    margin-right: 6px;
    color: var(--text-muted);
    font-weight: 500;
}

#typewriter-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

#typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #3b82f6;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.9s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ============================================
   TECH TICKER / MARQUEE
   ============================================ */
.tech-ticker {
    overflow: hidden;
    padding: 20px 0;
    position: relative;
    mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.tech-ticker-row {
    display: flex;
    gap: 0;
    width: max-content;
}

.tech-ticker-row-1 {
    animation: tickerScroll 38s linear infinite;
}

.tech-ticker-row-2 {
    animation: tickerScrollReverse 45s linear infinite;
    margin-top: 10px;
}

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes tickerScrollReverse {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color 0.2s;
}

.ticker-item::after {
    content: '·';
    color: var(--border-color);
    font-size: 18px;
}

.ticker-item:hover {
    color: var(--text-secondary);
}

/* ============================================
   ENHANCED CARD GLOW BORDERS
   ============================================ */
.capability-card:hover {
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.35),
        0 0 40px rgba(59, 130, 246, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.25) !important;
}

.capability-card.featured:hover {
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.5),
        0 0 50px rgba(139, 92, 246, 0.18),
        0 20px 40px rgba(0, 0, 0, 0.25) !important;
}

.evidence-card:hover {
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.3),
        0 0 30px rgba(59, 130, 246, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.system-card:hover {
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.3),
        0 0 35px rgba(59, 130, 246, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

.ai-card:hover {
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.35),
        0 0 35px rgba(139, 92, 246, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.25) !important;
}

/* ============================================
   BUTTON SHINE ANIMATION
   ============================================ */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-20deg);
    transition: none;
}

.btn-primary:hover::after {
    animation: btnShine 0.6s ease forwards;
}

@keyframes btnShine {
    0%   { left: -100%; }
    100% { left: 150%; }
}

/* ============================================
   STAT NUMBER GLOW
   ============================================ */
[data-theme="dark"] .stat-number {
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5));
}

[data-theme="dark"] .hero-stats:hover .stat-number {
    filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.7));
    transition: filter 0.3s ease;
}

/* ============================================
   GRADIENT TEXT ANIMATION
   ============================================ */
.gradient-text {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

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

/* ============================================
   SECTION GRADIENT DIVIDERS
   ============================================ */
.gradient-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
    opacity: 0.2;
    border: none;
    margin: 0;
}

/* ============================================
   NOISE TEXTURE OVERLAY — Dark mode depth
   ============================================ */
[data-theme="dark"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================
   HERO SECTION UPGRADES
   ============================================ */
.hero-title-name {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
    display: block;
    margin-bottom: 12px;
}

.hero-line.line-1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}

.hero-line.line-2 {
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0;
}

.hero-line.line-3 {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--text-muted);
    letter-spacing: 0.03em;
    margin-top: 16px;
    margin-bottom: 0;
}

/* ============================================
   CARD 3D TILT (set by JS)
   ============================================ */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* ============================================
   HERO VISUAL — terminal replaces orbit
   ============================================ */
.hero-visual {
    position: relative;
    z-index: 2;
    width: min(480px, 92vw);
    height: auto !important;
    margin: 0;
    display: block;
    flex-shrink: 0;
    /* clip floating cards and prevent old orbit words from bleeding */
    overflow: visible;
}

@media (max-width: 900px) {
    .hero-visual { width: 100%; margin-top: 40px; }
}

/* ============================================
   ENHANCED ORBIT GLOW
   ============================================ */
[data-theme="dark"] .core-badge {
    box-shadow:
        0 0 40px rgba(92, 106, 196, 0.35),
        0 0 80px rgba(120, 80, 255, 0.2),
        0 24px 70px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .orb-word {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 10px rgba(59, 130, 246, 0.08);
}

/* ============================================
   IMPROVED SECTION HEADERS
   ============================================ */
.section-tag {
    letter-spacing: 2px;
    font-size: 11px;
}

.section-title {
    background: var(--accent-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
    display: inline-block;
}

/* Override: keep non-hero section titles legible */
.section-header .section-title {
    -webkit-text-fill-color: var(--text-primary);
    background: none;
    animation: none;
}

/* ============================================
   FOOTER ENHANCEMENTS
   ============================================ */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3), transparent);
}

/* ============================================
   MOBILE — disable cursor, keep all else
   ============================================ */
@media (max-width: 768px) {
    .cursor-dot, .cursor-ring { display: none !important; }
    .hero-line.line-1 { font-size: clamp(2.2rem, 8vw, 3.5rem); }
    .tech-ticker { display: none; }
}
