/* ===================================
   Portfolio Custom Styles - New Design
   Navy & Sky Blue Color Scheme
   No GSAP Dependencies
   =================================== */

/* Root Variables */
:root {
    --navy-900: #0F172A;
    --navy-800: #1E293B;
    --sky-400: #38BDF8;
    --amber-500: #F59E0B;
    --slate-200: #E2E8F0;
    --slate-400: #94A3B8;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Body Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--navy-900);
    color: var(--slate-200);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--navy-900);
    border-left: 1px solid rgba(56, 189, 248, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--sky-400), var(--amber-500));
    border-radius: 6px;
    border: 2px solid var(--navy-900);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--amber-500), var(--sky-400));
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--sky-400) var(--navy-900);
}

/* Selection Color */
::selection {
    background-color: var(--sky-400);
    color: var(--navy-900);
}

::-moz-selection {
    background-color: var(--sky-400);
    color: var(--navy-900);
}

/* ===================================
   Animations & Keyframes
   =================================== */

/* Gradient Animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 1s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* Bounce Slow Animation */
@keyframes bounceSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounceSlow 2s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Typewriter Effect
   =================================== */

.typewriter-text {
    display: inline-block;
    border-right: 0.15em solid var(--sky-400);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--sky-400);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

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

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--sky-400);
    }
}

/* ===================================
   Back to Top Button
   =================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--sky-400), var(--amber-500));
    color: var(--navy-900);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ===================================
   Avatar Styles
   =================================== */

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-image {
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
}

.avatar-container:hover .avatar-image {
    transform: scale(1.05) rotate(2deg);
}

/* ===================================
   Utility Classes
   =================================== */

/* Smooth Transitions */
.transition-smooth {
    transition: all 0.3s ease;
}

/* Glass Effect */
.glass-effect {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Glow Effect */
.glow-sky {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.glow-sky:hover {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.5);
}

.glow-amber {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.glow-amber:hover {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .typewriter-text {
        font-size: 0.9em;
    }
}

/* ===================================
   Loading States
   =================================== */

.loading {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(50%);
}

/* ===================================
   Focus States for Accessibility
   =================================== */

a:focus,
button:focus {
    outline: 2px solid var(--sky-400);
    outline-offset: 2px;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .back-to-top,
    #scroll-progress,
    header {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===================================
   Reduced Motion
   =================================== */

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