/* Custom CSS for Prastwe's Professional Website */

/* Font */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg);
    }
    66% {
        transform: translateY(10px) rotate(-1deg);
    }
}

/* Static purple gradient text */
.animated-text {
    background: linear-gradient(45deg, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.floating-element {
    animation: float 8s ease-in-out infinite;
    position: absolute;
    pointer-events: none;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: -4s;
}

/* Navigation link hover effect */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button hover effects */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
    left: 100%;
}

/* Tool card hover effects */
.tool-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card > * {
    position: relative;
    z-index: 1;
}

/* Contact card hover effects */
.contact-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card > * {
    position: relative;
    z-index: 1;
}

/* Skill item animation */
.skill-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-item:nth-child(3) { animation-delay: 0.3s; }
.skill-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Code editor styling */
#code-editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.5;
    tab-size: 4;
}

#code-editor:focus {
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

/* Terminal styling */
#terminal-content {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.4;
}

.terminal-line {
    margin-bottom: 4px;
}

.terminal-prompt::before {
    content: '$ ';
    color: #8b5cf6;
    font-weight: bold;
}

.terminal-output {
    color: #10b981;
}

.terminal-error {
    color: #ef4444;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #4b5563;
    border-radius: 50%;
    border-top-color: #8b5cf6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Color palette grid */
.color-swatch {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #8b5cf6;
}

/* JSON formatter */
.json-key {
    color: #8b5cf6;
}

.json-string {
    color: #10b981;
}

.json-number {
    color: #f59e0b;
}

.json-boolean {
    color: #ef4444;
}

.json-null {
    color: #6b7280;
}

/* Responsive design helpers */
@media (max-width: 768px) {
    .hero-text {
        font-size: 2.5rem;
    }
    
    .tool-card {
        margin-bottom: 1rem;
    }
    
    #code-editor, #terminal-output {
        height: 250px;
    }
}

/* Custom checkbox styling */
input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #8b5cf6;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 1px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Range slider styling */
input[type="range"] {
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #374151;
    outline: none;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #7c3aed;
    transform: scale(1.1);
}

/* Table styling */
table {
    font-size: 0.875rem;
}

table th {
    font-weight: 600;
    letter-spacing: 0.05em;
}

table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

table tr:hover {
    background-color: rgba(139, 92, 246, 0.05);
}

/* Utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
}

.border-gradient {
    border: 1px solid;
    border-image: linear-gradient(135deg, #8b5cf6, #7c3aed) 1;
}

/* Animation delays for staggered effects */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

button:focus, a:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
