/* Base Styles */
:root {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-primary: #4CAF50; /* Debugging green */
    --color-primary-light: rgba(76, 175, 80, 0.15);
    --color-border: #334155;
    --font-mono: 'Fira Code', monospace;
    --font-sans: 'Inter', sans-serif;
    --logo-gradient: linear-gradient(135deg, #4CAF50 0%, #A5D6A7 100%);
    --bg-color: #ffffff;
    --text-color: #1a202c;
    --border-color: #e5e7eb;
}

/* Typography */
body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* Logo */
.text-logo-gradient {
    background-image: var(--logo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

code, pre, .font-mono {
    font-family: var(--font-mono);
}

/* Custom Glow Effect */
.hover\:shadow-glow:hover {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.15);
}

/* Background Grid Pattern */
.bg-grid-pattern {
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* Code Syntax Highlighting Effects */
.code-block {
    background-color: var(--color-bg-alt);
    border-left: 3px solid var(--color-primary);
    padding: 1rem;
    border-radius: 0.25rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin: 1.5rem 0;
}

.syntax-keyword {
    color: #E06C75;
}

.syntax-function {
    color: #61AFEF;
}

.syntax-string {
    color: #98C379;
}

.syntax-comment {
    color: #7F848E;
    font-style: italic;
}

.syntax-number {
    color: #D19A66;
}

/* Terminal Effect */
.terminal {
    background-color: #1a1a1a;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: var(--font-mono);
    color: #dcdcdc;
}

.terminal-prompt::before {
    content: "$ ";
    color: var(--color-primary);
}

/* Progress Bar Animation */
@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.progress-animate {
    animation: progress 2.5s ease-in-out forwards;
}

/* Typing Animation */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--color-primary); }
}

.typing-animation {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid transparent;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret .75s step-end infinite;
}

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

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Card hover effect */
.card-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-5px);
}

/* Prose styling for content areas */
.prose {
    color: var(--color-text-muted);
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose a {
    color: var(--color-primary);
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
}

.prose strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Mobile menu transitions */
.mobile-menu-transition {
    transition: height 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu styles */
#mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-color, #ffffff); /* Use CSS variable with fallback */
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background-color: rgba(17, 24, 39, 0.95); /* Dark background with slight transparency */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu a {
    color: var(--text-color);
    display: block;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

#mobile-menu a:hover {
    background-color: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

/* Mobile menu button hover effect */
#mobile-menu-button {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    color: var(--color-text); /* Add this to ensure visibility */
    z-index: 50; /* Ensure it's above other elements */
}

#mobile-menu-button:hover {
    background-color: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Backdrop filter for browsers that support it */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-supported {
        backdrop-filter: blur(10px);
        background-color: rgba(15, 23, 42, 0.8);
    }
}

.dark {
    --bg-color: #1a202c;
    --text-color: #f7fafc;
    --border-color: #2d3748;
}

.dark body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.dark .bg-white {
    background-color: var(--card-bg);
}

.dark .border-gray-200 {
    border-color: var(--border-color);
}

.dark .text-gray-600,
.dark .text-gray-800,
.dark .text-gray-900 {
    color: var(--text-color);
}

/* Add more specific overrides as needed */