:root {
    /* Dark Theme Variables */
    --bg-primary: #101010;
    --bg-secondary: #1A1A1A;
    --text-color: #F5F5F5;
    --accent-gray: #AAAAAA;
    --hover-light: #555555;
    --accent-blue: #3B82F6;
    --accent-green: #10B981;
}

.light-mode {
    /* Light Theme Variables */
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --text-color: #374151;
    --accent-gray: #6b7280;
    --hover-light: #e5e7eb;
    --accent-blue: #2563eb;
    --accent-green: #059669;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Tailwind class mapping using CSS variables */
.bg-primary-black { background-color: var(--bg-primary); }
.bg-secondary-black { background-color: var(--bg-secondary); }
.text-text-light { color: var(--text-color); }
.text-accent-gray { color: var(--accent-gray); }
.hover\:bg-hover-light:hover { background-color: var(--hover-light); }
.hover\:text-accent-gray:hover { color: var(--accent-gray); }
.text-accent-blue { color: var(--accent-blue); }
.text-accent-green { color: var(--accent-green); }
.bg-accent-blue { background-color: var(--accent-blue); }
.bg-accent-green { background-color: var(--accent-green); }
.text-primary-black { color: var(--bg-primary); }

.section-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-background {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)), url('../img/hero-bg.webp');
    background-size: cover;
    background-position: center;
}

.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.header-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* New classes for hero section to keep dark mode colors */
.hero-title-text {
    color: #F5F5F5;
}
.hero-accent-text {
    color: #10B981;
}
.hero-gray-text {
    color: #AAAAAA;
}
.hero-button {
    background-color: #3B82F6;
    color: #101010;
}

/* Optimization for smooth transitions on skill icons */
.skill-icon-transition {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    will-change: transform;
}

/* Modal improvements */
#project-modal {
    background-color: rgba(0,0,0,0.55); /* slightly darker overlay */
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    padding: 1.25rem; /* keep tailwind p-8 fallback */
    border-radius: 1rem; /* keep rounded-2xl look */
    box-shadow: 0 10px 30px rgba(2,6,23,0.6);
    overflow: hidden;
}

.modal-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-card p {
    color: var(--accent-gray);
}

.badge-style {
    background-color: var(--bg-secondary);
    color: var(--text-color);
    border: 1.5px solid var(--accent-blue);
    padding: 0.275rem 0.675rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.badge-style:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

/* Tech-specific outline colors matching their brand colors */
.badge-php { border-color: #777BB4; }
.badge-php:hover { background-color: rgba(119, 123, 180, 0.05); }

.badge-javascript { border-color: #F7DF1E; }
.badge-javascript:hover { background-color: rgba(247, 223, 30, 0.05); }

.badge-python { border-color: #3776AB; }
.badge-python:hover { background-color: rgba(55, 118, 171, 0.05); }

.badge-html { border-color: #E34F26; }
.badge-html:hover { background-color: rgba(227, 79, 38, 0.05); }

.badge-css { border-color: #1572B6; }
.badge-css:hover { background-color: rgba(21, 114, 182, 0.05); }

.badge-laravel { border-color: #FF2D20; }
.badge-laravel:hover { background-color: rgba(255, 45, 32, 0.05); }

.badge-livewire { border-color: #FB70A9; }
.badge-livewire:hover { background-color: rgba(251, 112, 169, 0.05); }

.badge-django { border-color: #092E20; }
.badge-django:hover { background-color: rgba(9, 46, 32, 0.05); }

.badge-bootstrap { border-color: #7952B3; }
.badge-bootstrap:hover { background-color: rgba(121, 82, 179, 0.05); }

.badge-postgresql { border-color: #336791; }
.badge-postgresql:hover { background-color: rgba(51, 103, 145, 0.05); }

.badge-mysql { border-color: #4479A1; }
.badge-mysql:hover { background-color: rgba(68, 121, 161, 0.05); }

.badge-redis { border-color: #DC382D; }
.badge-redis:hover { background-color: rgba(220, 56, 45, 0.05); }

.badge-git { border-color: #F05032; }
.badge-git:hover { background-color: rgba(240, 80, 50, 0.05); }

.badge-github { border-color: #181717; }
.badge-github:hover { background-color: rgba(24, 23, 23, 0.05); }

.badge-gitlab { border-color: #FCA326; }
.badge-gitlab:hover { background-color: rgba(252, 163, 38, 0.05); }

.badge-nginx { border-color: #009639; }
.badge-nginx:hover { background-color: rgba(0, 150, 57, 0.05); }

.badge-apache { border-color: #D22128; }
.badge-apache:hover { background-color: rgba(210, 33, 40, 0.05); }

.badge-digitalocean { border-color: #0080FF; }
.badge-digitalocean:hover { background-color: rgba(0, 128, 255, 0.05); }

.badge-heroku { border-color: #430098; }
.badge-heroku:hover { background-color: rgba(67, 0, 152, 0.05); }

.badge-googlecloud { border-color: #4285F4; }
.badge-googlecloud:hover { background-color: rgba(66, 133, 244, 0.05); }

.close-btn-custom {
    background: transparent;
    border: none;
    color: var(--text-color);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.close-btn-custom:hover {
    background-color: rgba(255,255,255,0.04);
    transform: rotate(90deg);
}

/* entrance tweak to make scale a bit smoother */
.modal-card.scale-100 {
    transform: scale(1);
}
.modal-card.scale-95 {
    transform: scale(.98);
}

@media (max-width: 640px) {
    .modal-card { padding: 1rem; border-radius: 0.75rem; }
}
