/* ====================================================
   Dursun Katar Portfolio — Custom CSS
   Glassmorphism utilities + dark theme overrides
   Phase 4: Animations & Visual Effects
   ==================================================== */

/* --- Base Reset & Defaults --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: #22d3ee #030712;
}

body {
    background-color: #030712;
    color: #f9fafb;
    font-family: 'JetBrains Mono', monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====================================================
   KEYFRAME ANIMATIONS
   ==================================================== */

/* Hero text fade in from below */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card slide in from right */
@keyframes slideInRight {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* Pulsing cyan glow for accent elements */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(34, 211, 238, 0.3), 0 0 20px rgba(34, 211, 238, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.6), 0 0 40px rgba(34, 211, 238, 0.2);
    }
}

/* Cursor blink for terminal */
@keyframes blink {
    0%, 49%  { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Gentle floating for background orbs */
@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    33%       { transform: translateY(-20px) scale(1.02); }
    66%       { transform: translateY(10px) scale(0.98); }
}

/* Staggered fade for tech badge grid */
@keyframes stagger-fade {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Legacy pulse for orbs */
@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%       { opacity: 0.7; transform: scale(1.05); }
}

/* ====================================================
   ANIMATION UTILITY CLASSES
   ==================================================== */

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

.animate-stagger-fade {
    opacity: 0;
    animation: stagger-fade 0.5s ease-out forwards;
}

/* ====================================================
   TRANSITION UTILITIES
   ==================================================== */

.transition-all-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* ====================================================
   PAGE TRANSITIONS
   ==================================================== */

.page-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-enter {
    opacity: 0;
    transform: translateY(10px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-exit {
    opacity: 0;
    transition: opacity 0.15s ease-in;
}

.page-leave-active {
    opacity: 0;
    transition: opacity 0.15s ease-in;
}

.page-content {
    transition: opacity 0.3s ease;
}

/* ====================================================
   GLASSMORPHISM CARDS
   ==================================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(34, 211, 238, 0.30);
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(34, 211, 238, 0.08);
}

/* ====================================================
   PROJECT & INTEGRATION CARDS
   ==================================================== */

.project-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(34, 211, 238, 0.3);
    border-color: rgba(34, 211, 238, 0.4) !important;
}

.integration-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.integration-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.4) !important;
}

/* ====================================================
   NAVIGATION LINK HOVER
   ==================================================== */

.nav-link-animated {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #22d3ee, #a855f7);
    transition: width 0.25s ease;
    border-radius: 1px;
}

.nav-link-animated:hover::after,
.nav-link-animated.active::after {
    width: 100%;
}

/* ====================================================
   GRADIENT TEXT
   ==================================================== */

.text-gradient {
    background: linear-gradient(135deg, #22d3ee, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====================================================
   GLOW EFFECTS
   ==================================================== */

.glow-cyan {
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.glow-purple {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.glow-cyan-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.3);
}

/* ====================================================
   SCROLL REVEAL
   ==================================================== */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================================
   BACKGROUND ORBS
   ==================================================== */

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.orb-fixed {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.orb-cyan {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.20) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.orb-purple {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.20) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite;
    animation-delay: -3s;
}

.orb-blue {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: float 7s ease-in-out infinite;
    animation-delay: -5s;
}

/* ====================================================
   TERMINAL
   ==================================================== */

.terminal-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-line-input {
    color: #22d3ee;
}

.terminal-line-output {
    color: #e5e7eb;
    white-space: pre-wrap;
}

.terminal-line-system {
    color: #6b7280;
    font-style: italic;
}

.terminal-line-error {
    color: #f87171;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background-color: #22d3ee;
    animation: blink 1s step-start infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

/* ====================================================
   TOAST NOTIFICATIONS
   ==================================================== */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    min-width: 280px;
    max-width: 380px;
}

.toast-success { border-left: 3px solid #10b981; }
.toast-error   { border-left: 3px solid #ef4444; }
.toast-info    { border-left: 3px solid #3b82f6; }
.toast-warning { border-left: 3px solid #f59e0b; }

/* ====================================================
   SKILL BADGES
   ==================================================== */

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #d1d5db;
    transition: all 0.2s ease;
}

.skill-badge:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.3);
    color: #22d3ee;
    transform: translateY(-2px);
}

/* --- Depth Badges --- */
.depth-built       { color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.depth-integrated  { color: #22d3ee; border-color: rgba(34, 211, 238, 0.3); }
.depth-maintained  { color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }

/* ====================================================
   ANIMATED COUNTER
   ==================================================== */

.animated-counter {
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

/* ====================================================
   SCROLLBAR — Dark theme with cyan accent
   ==================================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #030712;
}

::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.25);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.5);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.3) #030712;
}

/* ====================================================
   FOCUS RING (accessibility)
   ==================================================== */

:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ====================================================
   BLAZOR ERROR UI
   ==================================================== */

#blazor-error-ui {
    background: #1a1a24;
    border-top: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.75rem 1.25rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
}

#blazor-error-ui .reload {
    color: #22d3ee;
    text-decoration: underline;
    margin-left: 0.5rem;
    cursor: pointer;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
    font-size: 1.25rem;
    line-height: 1;
    color: #6b7280;
}
