/* Custom Styles - Proper color theory for both themes */

/* ============================================
   COLOR SYSTEM
   Light mode: Deep emerald tones (high contrast on white)
   Dark mode: Vibrant green tones (high contrast on dark)
   ============================================ */

/* Background Grid Pattern */
.bg-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.dark .bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Buttons - Proper contrast both themes */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #059669;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.dark .btn-primary {
    background: #10b981;
    color: #0a0a0a;
}

.btn-primary:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.25);
}

.dark .btn-primary:hover {
    background: #34d399;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #1f2937;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.dark .btn-secondary {
    color: #f3f4f6;
    border-color: #374151;
}

.btn-secondary:hover {
    border-color: #059669;
    color: #059669;
}

.dark .btn-secondary:hover {
    border-color: #10b981;
    color: #10b981;
}

/* Stat Card */
.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.dark .stat-card {
    background: #111827;
    border-color: #1f2937;
}

.stat-card:hover {
    border-color: #10b981;
    transform: translateY(-2px);
}

/* Experience Card */
.experience-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.dark .experience-card {
    background: #111827;
    border-color: #1f2937;
}

.experience-card:hover {
    border-color: #10b981;
}

/* Skill Badges */
.skill-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.dark .skill-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.skill-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #1f2937;
    transition: all 0.2s ease;
}

.dark .skill-tag {
    background: #111827;
    border-color: #374151;
    color: #f3f4f6;
}

.skill-tag:hover {
    border-color: #059669;
    color: #059669;
}

.dark .skill-tag:hover {
    border-color: #34d399;
    color: #34d399;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: #4b5563;
    transition: all 0.2s ease;
}

.dark .tech-tag {
    background: rgba(55, 65, 81, 0.5);
    border-color: #374151;
    color: #9ca3af;
}

.tech-tag:hover {
    border-color: #059669;
    color: #059669;
}

.dark .tech-tag:hover {
    border-color: #34d399;
    color: #34d399;
}

/* Project Card */
.project-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.dark .project-card {
    background: #111827;
    border-color: #1f2937;
}

.project-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.dark .project-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Metric Badge */
.metric-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.5rem 0.75rem;
    background: #ecfdf5;
    border-radius: 0.5rem;
    border: 1px solid #d1fae5;
}

.dark .metric-badge {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

/* Cert Card */
.cert-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.dark .cert-card {
    background: #111827;
    border-color: #1f2937;
}

.cert-card:hover {
    border-color: #10b981;
}

/* Edu Card */
.edu-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.dark .edu-card {
    background: #111827;
    border-color: #1f2937;
}

/* Contact Card */
.contact-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.dark .contact-card {
    background: #111827;
    border-color: #1f2937;
}

.contact-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

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

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #10b981;
}

/* Selection */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #0a0a0a;
}

.dark ::selection {
    background: rgba(52, 211, 153, 0.3);
    color: #fafafa;
}

/* Nav Link Active State */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .fade-in {
        transform: translateY(10px);
    }

    .metric-badge {
        align-items: center;
    }
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}