/* ==========================================================================
   TOPAZ TERMINAL CORE STYLESHEET
   ========================================================================== */

/* --- 1. System Variables (Theme Colors & Fonts) --- */
:root {
    --bg-color: #1a110b;          /* Deep terminal midnight */
    --text-color: #ebdbb2;        /* Crisp, readable off-white */
    --accent-color: #ff9f1a;      /* Warp Topaz Amber/Gold */
    --border-color: #3c2a1e;      /* Subtle grid framing */
    --code-color: #66b2ff;        /* Cybernetic cobalt blue */
    --font-stack: 'Courier New', Courier, monospace; /* Monospace baseline */
    --reading-font: 'Georgia', serif; /* Optional soft serif for long chapters */
}

/* --- 2. Base Reset & Structure --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    line-height: 1.6;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    position: relative; /* Crucial: This anchors our overlay screen */
}

body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 4px, 6px 100%;
    pointer-events: none; /* Allows you to still click links through the overlay */
}


/* --- 3. Layout Containment --- */
.terminal-container {
    max-width: 800px;
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 2rem;
    background-color: #241910; /* Slightly raised container background */
    box-shadow: 0 4px 30px rgba(0,0,0,0.7);
}

/* --- 4. Typography --- */
h1, h2, h3 {
    color: var(--accent-color);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.subtitle {
    color: #8b949e;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

hr {
    border: 0;
    border-top: 1px dashed var(--border-color);
    margin: 1.5rem 0;
}

/* --- 5. Navigation / Portal Boxes --- */
.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.portal-box {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.2s ease-in-out;
}

/* Interactive Hover States */
.portal-box:hover {
    border-color: var(--accent-color);
    background-color: rgba(255, 180, 84, 0.03);
    transform: translateX(4px);
}

.portal-box p {
    font-size: 0.9rem;
    color: #8b949e;
    margin-top: 0.5rem;
}

/* --- 6. Footer --- */
.terminal-footer {
    font-size: 0.8rem;
    color: #484f58;
    text-align: right;
}

/* --- 7. Diary & Navigation Utilities --- */
.back-link {
    color: var(--code-color);
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 0.5rem;
}

.back-link:hover {
    text-decoration: underline;
}

.log-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.log-entry-preview h2 a {
    color: var(--accent-color);
    text-decoration: none;
}

.log-entry-preview h2 a:hover {
    text-decoration: underline;
}

.log-meta {
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 0.25rem;
    display: flex;
    gap: 1rem;
}

.log-tag {
    color: var(--code-color);
}