/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #FF9500; /* The main "Safety Orange" */
    --bg-color: #000000;      /* Pure Black */
    --text-color: #FFFFFF;    /* White */
    --border-color: #FFFFFF;  /* White borders */
    --bg-terminal: rgba(10, 10, 10, 0.8); /* Semi-transparent terminal */
}

body, html {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    scroll-behavior: smooth;
}

/* =========================================
   2. BACKGROUND & NAVIGATION
   ========================================= */
#vanta-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
}

nav {
    padding: 10px;
    text-align: center;
    position: fixed;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
    z-index: 100;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

/* =========================================
   3. MAIN TERMINAL INTERFACE
   ========================================= */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding-top: 60px;
}

.terminal {
    width: 90%;
    max-width: 700px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-terminal);
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10;
    position: relative;
}

.terminal-header {
    background-color: var(--border-color);
    padding: 5px;
    color: var(--bg-color);
    font-weight: bold;
}

.terminal-body {
    padding: 20px;
    height: 300px;
    color: var(--primary-color);
    overflow-y: auto;
    font-size: 1rem;
    position: relative;
}

.terminal-body p {
    margin: 5px 0;
    word-break: break-all;
}

/* === SKIP BUTTON === */
#skip-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 5px;
    opacity: 0.7;
    z-index: 20;
}

#skip-btn:hover {
    background: var(--primary-color);
    color: #000;
    opacity: 1;
}

/* === LOADING BAR === */
#loading-bar p {
    color: var(--text-color);
}

.loading-square {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #333;
    margin: 0 1px;
}

.loading-square.filled {
    background-color: var(--primary-color);
}

/* === INPUT PROMPT === */
.prompt-line {
    padding: 0px 20px 10px 20px;
    display: flex;
}

.prompt-user {
    color: var(--text-color);
    margin-right: 10px;
    font-size: 1.1rem;
}

#terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--primary-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    width: 85%;
}

/* =========================================
   4. POPUP CAD VIEWER (MODAL)
   ========================================= */
#cad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dim background */
    backdrop-filter: blur(5px);
    z-index: 999; /* Sit on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
}

#cad-window {
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background-color: rgba(10, 20, 30, 0.95);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
}

#cad-controls {
    padding: 15px;
    border-bottom: 1px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 149, 0, 0.1);
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: bold;
    z-index: 10;
}

.cad-buttons {
    display: flex;
    gap: 10px;
}

#cad-controls button {
    background: var(--primary-color);
    border: none;
    color: #000;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    padding: 5px 10px;
    font-weight: bold;
}

#cad-controls button:hover {
    background-color: #fff;
}

#cad-canvas-container {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    cursor: grab;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

#cad-canvas-container:active {
    cursor: grabbing;
}

/* =========================================
   5. SCI-FI HUD OVERLAY (CAD UI)
   ========================================= */
#cad-overlay-ui {
    position: absolute;
    top: 50px; /* Below header */
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 5;
}

.hud-crosshair-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 2rem;
}

/* HUD Corners */
.hud-corner-tl {
    position: absolute; top: 20px; left: 20px;
    width: 30px; height: 30px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
}
.hud-corner-tr {
    position: absolute; top: 20px; right: 20px;
    width: 30px; height: 30px;
    border-top: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
}
.hud-corner-bl {
    position: absolute; bottom: 20px; left: 20px;
    width: 30px; height: 30px;
    border-bottom: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
}
.hud-corner-br {
    position: absolute; bottom: 20px; right: 20px;
    width: 30px; height: 30px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
}

.hud-text-l {
    position: absolute;
    bottom: 20px;
    left: 60px;
    color: var(--primary-color);
    font-size: 0.8rem;
    line-height: 1.4;
}

.hud-grid-lines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 149, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 149, 0, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* =========================================
   6. SECTIONS & MODULES
   ========================================= */
section {
    padding: 100px 10%;
    min-height: 80vh;
    position: relative;
    z-index: 10;
}

section h2 {
    font-size: 3rem;
    text-transform: uppercase;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.module-container {
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    margin-top: 40px;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--border-color);
    padding: 8px 15px;
    color: var(--bg-color);
    font-weight: bold;
}

.module-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.project-image {
    width: 100%;
    max-width: 450px;
    border: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.module-content blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
    margin: 0 0 25px 0;
    font-style: italic;
    color: #ccc;
    text-align: left;
    width: 100%;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.project-details {
    text-align: left;
    width: 100%;
    margin-top: 25px;
    color: #ccc;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* About Me Text Color Fix */
#about .module-content p {
    color: var(--text-color);
    width: 100%;
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    padding: 20px 10%;
    text-align: center;
    border-top: 2px solid var(--border-color);
    background-color: var(--bg-color);
    z-index: 10;
    position: relative;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

footer span {
    color: var(--border-color);
    opacity: 0.5;
}

/* =========================================
   8. SNAKE GAME & TERMINAL IMAGES
   ========================================= */
#snake-board {
    width: 300px;
    height: 300px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color);
    display: grid;
    grid-template-rows: repeat(20, 1fr);
    grid-template-columns: repeat(20, 1fr);
    margin: 10px 0;
}

.snake-cell {
    width: 100%;
    height: 100%;
}

.snake-body {
    background-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

.snake-food {
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #fff;
}

.terminal-image {
    width: 90%;
    max-width: 300px;
    margin-top: 10px;
    border: 2px solid var(--border-color);
}
/* === GLITCH TEXT EFFECT === */
.hacker-text {
    font-family: 'Share Tech Mono', monospace;
    cursor: crosshair; /* Adds a targeting feel */
}

/* Optional: Make it glow while scrambling */
.hacker-text:hover {
    color: #fff;
    text-shadow: 0 0 5px #fff;
}
