/* Custom styles that extend Tailwind */

body { 
    background-color: #07110D; 
    color: #d9e5de; 
}

/* Glass panel for floating elements */
.glass-panel {
    background: rgba(16, 34, 24, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #244034;
}

/* Tech chip base style */
.tech-chip { 
    background-color: #132B1F; 
    border: 1px solid #244034; 
    color: #86EFAC; 
    transition: border-color 0.2s;
}
.tech-chip:hover { 
    border-color: #22C55E; 
}

/* Subtle float animation */
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.floating-element { 
    animation: float 6s ease-in-out infinite; 
}

/* Subtle grid background */
.bg-grid-pattern {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(36, 64, 52, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(36, 64, 52, 0.1) 1px, transparent 1px);
}

/* Active nav link (set by JS on scroll) */
.nav-link-active {
    color: #4be277 !important;
    border-bottom: 2px solid #4be277;
    padding-bottom: 4px;
}

/* Scroll-to-top button */
#scroll-top-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1rem;
    z-index: 999;
    width: 40px;
    height: 40px;
    background: #132B1F;
    border: 1px solid #244034;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, border-color 0.3s;
    color: #4be277;
}
#scroll-top-btn.visible {
    opacity: 1;
    pointer-events: all;
}
#scroll-top-btn:hover {
    border-color: #22C55E;
}
@media (min-width: 768px) {
    #scroll-top-btn {
        bottom: 2rem;
        right: 2rem;
        width: 44px;
        height: 44px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0B1711; }
::-webkit-scrollbar-thumb { background: #244034; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #22c55e; }

/* ── Mobile-specific overrides ────────────────────────────────────────── */

/* Keep the floating hero card from overflowing the viewport */
@media (max-width: 639px) {
    .floating-element {
        left: 8px !important;
        right: auto;
        bottom: -12px !important;
        max-width: calc(100% - 16px);
        font-size: 10px;
    }
    /* Constrain about-section image height on small screens */
    .about-image-wrap {
        max-height: 320px;
        overflow: hidden;
    }
    /* Reduce card padding on mobile */
    .project-card-inner {
        padding: 1.25rem;
    }
}

/* Prevent long code snippets from breaking layout */
code {
    word-break: break-all;
    white-space: normal;
}

/* Ensure full-width buttons stack neatly on tiny screens */
@media (max-width: 400px) {
    .hero-cta-wrap {
        flex-direction: column;
        width: 100%;
    }
    .hero-cta-wrap a {
        width: 100%;
        justify-content: center;
    }
}
