/* framework.css - Reusable CAD Blueprint Framework */

/* Prevent horizontal scrollbars and normalize sizing across mobile browsers */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    background-color: var(--bg-base, #0b0f17);
    min-height: 100%;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text-primary, #f8fafc);
    background-color: var(--bg-base, #0b0f17);
    margin: 0;
    padding-bottom: 80px; /* Leaves space for bottom-right title block */
    min-height: 100vh;
    min-height: 100dvh; /* 100dvh prevents dynamic browser address bars from cutting off the layout */
    position: relative;
    background-color: transparent;
}
    
/* Full-screen Blueprint CAD Grid Layer */
body::before {
    content: "";
    position: fixed;
    top: -100px;
    left: -100px;
    right: -100px;
    bottom: -100px;
    z-index: -1;
    pointer-events: none;
        
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(var(--accent-color), 0.30), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    
    background-size: 100% 100%, 30px 30px, 30px 30px, 10px 10px, 10px 10px;
}

/* CAD Drafting Block Signature (Fixed Bottom Right) */
.cad-title-block {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    
    display: inline-flex;
    gap: 16px;
    padding: 8px 14px;
    
    background: rgba(11, 15, 23, 0.9);
    border: 1px solid rgba(var(--accent-color), 0.4);
    border-radius: 4px;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    
    font-family: ui-monospace, SFMono-Regular, "Roboto Mono", Consolas, monospace;
    text-align: left;
    transition: all 0.2s ease;
}

.cad-spec {
    display: flex;
    flex-direction: column;
}

.cad-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    font-weight: 700;
}

.cad-value {
    font-size: 0.8rem;
    color: rgb(var(--accent-color));
    letter-spacing: 0.05em;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Mobile Responsiveness for Title Block */
@media (max-width: 600px) {
    .cad-title-block {
        bottom: 12px;
        right: 12px;
        gap: 10px;
        padding: 6px 10px;
    }
    
    .cad-label {
        font-size: 0.55rem;
    }
    
    .cad-value {
        font-size: 0.7rem;
    }
}
