/* ============================================
   ASHENAFI PAWLOS — PORTFOLIO DESIGN SYSTEM
   ============================================ */

/* === CUSTOM PROPERTIES === */
:root {
    --accent-purple: #d55fde;
    --accent-blue: #61afef;
    --accent-green: #98c379;
    --accent-yellow: #e5c07b;
    --accent-red: #e06c75;
    --accent-cyan: #56b6c2;
    --accent-orange: #d19a66;
}

/* === BASE === */
body {
    transition: background-color 0.3s, color 0.3s;
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* === CODE CARD === */
.code-card {
    transition: all 0.3s ease;
}
.code-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(97, 175, 239, 0.2);
}

/* === BLINKING CURSOR === */
.cursor-blink::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

/* === KEYFRAME ANIMATIONS === */
@keyframes blink { 50% { opacity: 0; } }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}
@keyframes gradientPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes borderGlow {
    0%, 100% { border-color: rgba(97, 175, 239, 0.2); }
    50% { border-color: rgba(97, 175, 239, 0.5); }
}

/* === ANIMATION UTILITY CLASSES === */
.animate-fade-in { animation: fadeIn 0.8s ease-out; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out; }
.animate-fade-in-down { animation: fadeInDown 0.6s ease-out; }
.animate-slide-left { animation: slideInLeft 0.8s ease-out; }
.animate-slide-right { animation: slideInRight 0.8s ease-out; }
.animate-scale-in { animation: scaleIn 0.6s ease-out; }
.animate-float { animation: float 6s ease-in-out infinite; }

/* === STAGGER DELAYS === */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* === SCROLL REVEAL === */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === GRADIENT GLOW === */
.gradient-glow { animation: gradientPulse 3s ease-in-out infinite; }

/* === SOCIAL ICONS === */
.social-icon {
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0);
}
.social-icon.show {
    opacity: 1;
    transform: scale(1);
}
.social-icon:hover {
    transform: scale(1.15) rotate(5deg);
}

/* === GRADIENT TEXT === */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-green {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === TECH BADGES === */
.tech-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    transition: all 0.2s ease;
}
.tech-badge:hover {
    transform: translateY(-1px);
}

/* === SECTION DIVIDER === */
.section-number {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-purple);
    font-size: 1.25rem;
}

/* === EXPERTISE CARD === */
.expertise-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--accent-purple), var(--accent-blue));
    transition: height 0.4s ease;
}
.expertise-card:hover::before {
    height: 100%;
}
.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(97, 175, 239, 0.15);
}

/* === PHILOSOPHY CARD === */
.philosophy-card {
    transition: all 0.3s ease;
}
.philosophy-card:hover {
    transform: translateY(-6px);
}
.philosophy-card:hover .philosophy-icon {
    transform: scale(1.1);
}
.philosophy-icon {
    transition: transform 0.3s ease;
}

/* === PROJECT CARD === */
.project-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.project-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
    transition: width 0.4s ease;
}
.project-card:hover::after {
    width: 100%;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -15px rgba(97, 175, 239, 0.15);
}

/* === STAT CARD === */
.stat-card {
    transition: all 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
}

/* === TOOL GROUP === */
.tool-group {
    transition: all 0.3s ease;
}
.tool-group:hover {
    border-color: rgba(97, 175, 239, 0.4);
}

/* === OPS CARD === */
.ops-card {
    transition: all 0.3s ease;
    position: relative;
}
.ops-card:hover {
    transform: translateY(-4px);
}

/* === ACHIEVEMENT CARD === */
.achievement-card {
    transition: all 0.3s ease;
}
.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -10px rgba(97, 175, 239, 0.15);
}

/* === CASE STUDY PAGE STYLES === */
.case-study-hero {
    position: relative;
    overflow: hidden;
}
.case-study-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(97, 175, 239, 0.03) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
}

.case-study-section {
    position: relative;
}
.case-study-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent-blue), transparent);
    opacity: 0.3;
    border-radius: 3px;
}

/* === BREADCRUMB === */
.breadcrumb a {
    transition: color 0.2s ease;
}
.breadcrumb a:hover {
    color: var(--accent-blue);
}

/* === MOBILE MENU === */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.mobile-menu.open {
    transform: translateX(0);
}

/* === CATEGORY HERO === */
.category-hero {
    position: relative;
    overflow: hidden;
}

/* === PULSE DOT === */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 40;
    pointer-events: none;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* === CASE STUDY NAV (prev/next) === */
.case-nav-btn {
    transition: all 0.3s ease;
}
.case-nav-btn:hover {
    transform: translateX(-4px);
    border-color: rgba(97, 175, 239, 0.5);
}
.case-nav-btn.next:hover {
    transform: translateX(4px);
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 768px) {
    .scroll-reveal {
        transform: translateY(20px);
    }
    .case-study-section::before {
        display: none;
    }
}
