:root { 
    --bg-color: #f3d2b3; 
    --text-color: #2c2c2c; 
    --accent-color: #d15858; 
    --code-bg: rgba(44, 44, 44, 0.05); 
    --modal-overlay: rgba(44, 44, 44, 0.85); 
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: 'VT323', monospace; 
    font-size: 22px; 
    line-height: 1.6; 
    overflow-x: hidden; 
}

/* --- 3D CANVAS --- */
#canvas-container { 
    position: relative; 
    width: 100%; 
    height: 45vh; 
    overflow: hidden; 
    display: block; 
    margin-bottom: 20px; 
}

/* --- LAYOUT --- */
.container { 
    max-width: 800px; 
    margin: 0 auto; 
    position: relative; 
    z-index: 2; 
    padding: 0 20px 100px 20px; 
    text-align: center; 
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 { 
    font-family: 'Press Start 2P', cursive; 
    text-transform: uppercase; 
    line-height: 1.5; 
    margin-bottom: 25px; 
}

.typewriter { display: inline-block; }
.typewriter h1 { 
    overflow: hidden; 
    border-right: .15em solid orange; 
    white-space: nowrap; 
    margin: 0 auto; 
    letter-spacing: -2px; 
    animation: typing 3.5s steps(30, end), blink-caret .75s step-end infinite; 
    font-size: 28px; 
}

@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--text-color); } }

h2 { 
    font-size: 18px; 
    background: var(--text-color); 
    color: var(--bg-color); 
    display: inline-block; 
    padding: 10px 15px; 
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1); 
}

p { margin-bottom: 25px; max-width: 650px; margin-left: auto; margin-right: auto; }

/* --- NAVIGATION (Sticky Fix) --- */
.nav-bar { 
    position: fixed; 
    top: 25px; 
    left: 25px; 
    z-index: 9999; 
    display: flex; 
    gap: 12px; 
}

.nav-btn { 
    background: #4a4a4a; 
    color: white; 
    width: 45px; 
    height: 45px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2); 
    transition: transform 0.1s; 
    border: 2px solid var(--text-color); 
}

.nav-btn:hover { background: #2c2c2c; transform: translate(-1px, -1px); }
.nav-icon { width: 16px; height: 16px; }

/* --- UI ELEMENTS --- */
.status-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    font-family: 'Press Start 2P'; 
    font-size: 10px; 
    background: rgba(255,255,255,0.3); 
    padding: 5px 10px; 
    border-radius: 20px; 
    margin-bottom: 15px; 
    border: 1px solid var(--text-color); 
}

.status-dot { 
    width: 8px; 
    height: 8px; 
    background: #00ff00; 
    border-radius: 50%; 
    box-shadow: 0 0 5px #00ff00; 
    animation: pulse 2s infinite; 
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.separator { margin: 40px 0; letter-spacing: 3px; opacity: 0.4; font-family: monospace; }

.tag-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin: 25px 0; }
.tag { border: 2px dotted var(--text-color); padding: 6px 10px; font-family: 'Press Start 2P', cursive; font-size: 10px; text-transform: uppercase; color: var(--text-color); text-decoration: none; }
.tag.filled { background: var(--text-color); color: var(--bg-color); border: 2px solid var(--text-color); }
.tag.action-btn { background: var(--accent-color); color: #fff; border: 2px solid #2c2c2c; }
.tag.cv-btn { background: #4a4a4a; color: #fff; display: inline-flex; align-items: center; border: 2px solid #222; }
.tag.cv-btn:hover { background: #2c2c2c; box-shadow: 4px 4px 0 rgba(0,0,0,0.3); transform: translateY(-2px); }

/* --- SKILLS GRID --- */
.skill-split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; text-align: left; margin-bottom: 60px; }
.skill-col { background: var(--code-bg); padding: 20px; border: 2px solid var(--text-color); position: relative; }
.skill-col h3 { font-size: 16px; border-bottom: 2px dotted var(--text-color); display: inline-block; margin-bottom: 15px; }
.skill-list { list-style: none; font-size: 18px; }
.skill-list li { margin-bottom: 8px; position: relative; cursor: help; }
.skill-list li::before { content: "> "; color: var(--accent-color); font-weight: bold; }
.skill-list li:hover::after { 
    content: attr(data-tooltip); 
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); 
    background: #2c2c2c; color: #f3d2b3; padding: 5px 10px; 
    font-size: 14px; font-family: 'VT323'; white-space: nowrap; 
    border: 1px solid #f3d2b3; z-index: 10; box-shadow: 4px 4px 0 rgba(0,0,0,0.2); 
}

/* --- PROJECT CARD (Fixed Gap & Size) --- */
.project-card { 
    margin-bottom: 60px; text-align: left; 
    border-left: 4px solid var(--text-color); 
    padding-left: 20px; /* Reduced padding left to give image more room */
    padding-right: 0;
    background: rgba(255,255,255,0.1); 
}

/* This fixes the "Charlie Oven2024" spacing issue */
.project-header { 
    display: flex; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 20px; /* Force space between title and date */
    margin-bottom: 15px; 
}

.project-title { 
    background: var(--text-color); color: var(--bg-color); 
    padding: 8px 12px; font-family: 'Press Start 2P'; font-size: 14px; 
}

.year-label { font-family: 'Press Start 2P'; font-size: 10px; opacity: 0.8; }

.project-image { 
    width: 100%; /* Forces image to take full width */
    height: auto; 
    display: block; 
    border: 2px solid var(--text-color); 
    margin: 20px 0; 
    box-shadow: 6px 6px 0px rgba(0,0,0,0.1); 
    filter: grayscale(100%); /* Start Black & White */
    transition: filter 0.3s; 
}

.project-image:hover { filter: grayscale(0%); /* Color on Hover */ }

.project-links a { 
    display: inline-block; margin-right: 20px; text-decoration: none; 
    color: var(--text-color); border-bottom: 2px solid var(--text-color); font-weight: bold; 
}

/* --- AUTOMATION GRID --- */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; text-align: left; }
.integration-item { background: rgba(255,255,255,0.4); border: 2px solid var(--text-color); padding: 15px; display: flex; align-items: center; gap: 15px; transition: transform 0.2s; cursor: pointer; }
.integration-item:hover { transform: translateY(-2px); background: #fff; box-shadow: 4px 4px 0px rgba(0,0,0,0.1); }
.app-icons { display: flex; align-items: center; gap: 10px; min-width: 100px; }
.app-icon { width: 36px; height: 36px; background: #fff; border-radius: 6px; padding: 4px; object-fit: contain; border: 1px solid #333; }
.arrow { font-family: 'Press Start 2P'; font-size: 10px; color: var(--accent-color); }
.integration-info h4 { font-family: 'Press Start 2P'; font-size: 12px; margin-bottom: 5px; }
.integration-info span { font-size: 16px; opacity: 0.8; display: block; line-height: 1.3; }

/* --- MODAL --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--modal-overlay); z-index: 9999; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-overlay.active { display: flex; }
.modal-content { background: #f3d2b3; color: #2c2c2c; width: 90%; max-width: 600px; border: 4px solid #2c2c2c; padding: 30px; position: relative; box-shadow: 10px 10px 0px #000; text-align: left; }
.close-btn { position: absolute; top: 15px; right: 15px; background: #d15858; color: white; border: 2px solid #2c2c2c; width: 30px; height: 30px; font-family: 'Press Start 2P'; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* --- SIMULATORS --- */
.demo-container { background: rgba(255,255,255,0.5); border: 2px dashed var(--text-color); padding: 15px; margin-top: 20px; }
.demo-label { font-size: 12px; font-weight: bold; margin-bottom: 8px; display: block; font-family: monospace; }
.demo-input { width: 100%; background: #fff; border: 2px solid var(--text-color); padding: 10px; font-family: 'VT323', monospace; font-size: 18px; color: #000; margin-bottom: 10px; }
.demo-btn { background: var(--text-color); color: var(--bg-color); border: none; padding: 10px; font-family: 'Press Start 2P'; font-size: 10px; cursor: pointer; width: 100%; }
.demo-btn:hover { background: var(--accent-color); color: #fff; }
.demo-result { margin-top: 20px; display: none; animation: slideDown 0.3s ease-out; }
.xero-card, .shipping-label, .notion-card, .slack-msg { background: #fff; border: 1px solid #ccc; padding: 15px; border-radius: 4px; font-family: sans-serif; color: #333; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.notion-tag { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 12px; font-weight: 500; margin-right: 5px; }
.tag-red { background: #ffe2dd; color: #d44c47; }
.tag-blue { background: #e3e2e0; color: #37352f; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- FOOTER & MISC --- */
footer { margin-top: 100px; padding-bottom: 40px; font-family: 'Press Start 2P'; font-size: 10px; opacity: 0.6; text-align: center; }
.system-status { font-family: 'Press Start 2P', monospace; font-size: 10px; opacity: 0.5; margin-top: 10px; letter-spacing: 1px; }
.scroll-top-btn { position: fixed; bottom: 30px; right: 30px; background: #2c2c2c; color: #f3d2b3; width: 50px; height: 50px; border: none; font-family: 'Press Start 2P'; font-size: 20px; cursor: pointer; box-shadow: 6px 6px 0px rgba(0,0,0,0.1); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 99; }
.scroll-top-btn.visible { opacity: 1; pointer-events: all; }
.scroll-top-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0px rgba(0,0,0,0.1); }
.copy-email-btn { background: #2c2c2c; color: #f3d2b3; border: none; font-family: 'Press Start 2P'; font-size: 10px; padding: 8px 12px; cursor: pointer; margin-left: 10px; }

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 700px) { 
    .skill-split, .integration-grid { grid-template-columns: 1fr; } 
    .typewriter h1 { font-size: 18px; white-space: normal; animation: none; border: none; } 
    #canvas-container { height: 35vh; } 
    /* Fix Mobile Menu: Sticky and wrap if needed */
    .nav-bar { top: 15px; left: 15px; flex-wrap: wrap; }
}

/* --- PRINT --- */
@media print { 
    body { background: #fff; color: #000; } 
    .nav-bar, #canvas-container, .scroll-top-btn, .copy-email-btn, .status-badge { display: none !important; } 
    .container { max-width: 100%; padding: 0; text-align: left; } 
    .project-card, .integration-grid { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; background: #fff; } 
    h1, h2 { color: #000; border-bottom: 1px solid #000; } 
    a { text-decoration: none; color: #000; } 
    .typewriter h1 { border: none; animation: none; font-size: 24pt; } 
    .tag { border: 1px solid #000; } 
    .skill-list li:hover::after { display: none; } 
}
