/* Custom styles for Infrastructure & Cloud Portfolio */

/* Import JetBrains Mono font */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

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

/* Terminal styling */
.terminal-container {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.terminal-container pre {
    color: #10b981;
    line-height: 1.6;
}

/* Terminal cursor animation */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-cursor {
    animation: blink 1s infinite;
}

/* Project cards hover effect */
.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark .project-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Skill tags animation */
.skill-tag {
    transition: all 0.2s ease;
}

.skill-tag:hover {
    transform: scale(1.05);
}

/* Button hover effects */
.btn-terminal {
    transition: all 0.2s ease;
}

.btn-terminal:hover {
    transform: scale(1.02);
}

.btn-terminal:active {
    transform: scale(0.98);
}

/* HTMX loading states */
.htmx-request {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.htmx-request.htmx-swapping {
    opacity: 0.4;
}

/* Loading spinner */
.spinner {
    border: 2px solid #374151;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error messages */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    border: 1px solid;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* Dark mode alerts */
.dark .alert-success {
    background-color: #064e3b;
    color: #a7f3d0;
    border-color: #065f46;
}

.dark .alert-error {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #991b1b;
}

/* Custom scrollbar for dark theme */
.dark ::-webkit-scrollbar {
    width: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Form focus states */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark input:focus, .dark textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Navigation backdrop blur */
nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Area cards */
.area-card {
    transition: all 0.2s ease;
}

.area-card:hover {
    transform: translateY(-1px);
}

/* Typography improvements */
.prose h2 {
    @apply text-2xl font-bold mt-8 mb-4 text-gray-900 dark:text-white;
}

.prose h3 {
    @apply text-xl font-semibold mt-6 mb-3 text-gray-900 dark:text-white;
}

.prose p {
    @apply mb-4 text-gray-700 dark:text-gray-300 leading-relaxed;
}

/* Terminal output colors */
.terminal-output {
    color: #10b981; /* Green for success */
}

.terminal-error {
    color: #ef4444; /* Red for errors */
}

.terminal-warning {
    color: #f59e0b; /* Yellow for warnings */
}

.terminal-info {
    color: #3b82f6; /* Blue for info */
}

/* Fade in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Tag styles */
.tag {
    transition: all 0.2s ease;
}

.tag:hover {
    transform: scale(1.05);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .terminal-container {
        font-size: 12px;
    }
    
    .project-card {
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .terminal-container {
        background: #000000;
        color: #00ff00;
    }
    
    .project-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
