:root {
    --primary: #3498db;
    --secondary: #e67e22; /* Maker Orange */
    --warning: #f1c40f;
    --bg: #121212;
    --card: #1e1e1e;
    --text: #eeeeee;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

.navbar {
    width: 100%;
    padding: 25px 20px;
    background: #111;
    border-bottom: 1px solid #333;
    text-align: center;
    box-sizing: border-box;
}

/* THE GLOWING TITLE */
.navbar h1 { 
    margin: 0; 
    color: var(--primary); 
    font-size: 2.2rem; 
    letter-spacing: 3px; 
    text-transform: uppercase; 
    text-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
}

/* THE TECHNICAL SUBTITLE */
.navbar-subtitle {
    margin: 8px 0 0 0;
    font-family: monospace;
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* NEW TOP SPLIT LAYOUT */
.top-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    max-width: 1100px;
    width: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
}

.bio-section {
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center; /* Centers the avatar and heading */
}

/* THE GLOWING AVATAR FRAME */
.bio-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
    object-fit: cover;
    margin: 0 auto 10px auto;
    display: block;
}

.bio-section h2 { color: var(--primary); margin: 0; font-size: 1.5rem; }
.bio-section p { color: #aaa; line-height: 1.6; margin: 0; font-size: 0.95rem; text-align: left; }

/* BOTTOM GRID FOR OTHER TOOLS */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1100px;
    width: 100%;
    padding: 0 20px 50px 20px;
    box-sizing: border-box;
}

.tool-card {
    background: var(--card);
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border-color: #444;
}

/* Feature Card (RF Mapper) Layout Updates */
.featured-card {
    border: 1px solid var(--primary);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
    height: 100%;
}

/* NEW WRAPPER APPROACH FOR IMAGES */
.card-image-wrapper {
    padding: 25px 25px 0 25px; /* Applies the 25px uniform gap */
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0; /* Prevents the flex container from squishing the space */
}

.card-image {
    width: 100%; /* Expands to cleanly fill the wrapper */
    height: 250px;
    object-fit: cover; /* Prevents aspect ratio stretching */
    border-radius: 8px; /* Softens the corners */
    border: 1px solid #333; /* Frames the photo */
    display: block; /* Strips out inline whitespace rendering bugs */
    box-sizing: border-box;
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 { margin: 0 0 10px 0; font-size: 1.4rem; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.card-content p { color: #aaa; line-height: 1.6; margin: 0 0 20px 0; flex-grow: 1; font-size: 0.95rem; text-align: left; }

.version-badge { background: #333; color: var(--primary); font-size: 0.75rem; padding: 4px 10px; border-radius: 12px; border: 1px solid var(--primary); font-family: monospace; font-weight: bold;}
.badge-wip { color: var(--secondary); border-color: var(--secondary); background: rgba(230, 126, 34, 0.1); }
.badge-dev { color: var(--warning); border-color: var(--warning); background: rgba(241, 196, 15, 0.1); }

.btn-launch { background: var(--primary); color: white; padding: 12px 24px; text-decoration: none; border-radius: 6px; font-weight: bold; text-align: center; transition: filter 0.2s; }
.btn-launch:hover { filter: brightness(1.15); }

.btn-download { background: transparent; border: 1px solid var(--secondary); color: var(--secondary); font-size: 0.95rem; padding: 12px 20px;}
.btn-download:hover { background: var(--secondary); color: #fff; transform: scale(1.02); }

.print-shoutout { margin-top: 15px; font-size: 0.8rem; color: #888; text-align: center; padding-top: 15px; border-top: 1px dashed #333;}
.print-shoutout a { color: var(--secondary); text-decoration: none;}
.print-shoutout a:hover { text-decoration: underline;}

/* 3D Viewer Container */
.viewer-container { width: 100%; height: 250px; background: #0a0a0a; position: relative; border-bottom: 1px solid #333; cursor: grab; }
.viewer-container:active { cursor: grabbing; }
.viewer-hint { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.6); color: #888; font-size: 0.75rem; padding: 4px 10px; border-radius: 12px; border: 1px solid #333; pointer-events: none;}

.footer { width: 100%; text-align: center; padding: 30px 20px; background: #0a0a0a; border-top: 1px solid #222; color: #555; font-size: 0.85rem; box-sizing: border-box; margin-top: auto;}
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* RESPONSIVE UPDATES */
@media (max-width: 900px) {
    .top-split { grid-template-columns: 1fr; padding: 20px; gap: 20px;}
    .card-image { height: 200px; }
}