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

body {
    background-color: #0b0f17;
    font-family: 'Courier New', Courier, monospace;
    color: #e2e8f0;
    min-height: 100vh;
}

/* Wrapper sets the high-vertical alignment */
.page-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding-top: 6vh; 
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 60px;
}

/* --- Tiling Master Grid Layout (Home Page) --- */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1.1fr; /* Pure multi-column layout proportions */
    gap: 20px;
    max-width: 1350px; 
    width: 100%;
    align-items: stretch; /* Forces all primary column tracks to match heights */
}

/* Vertical window stacks */
.center-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.center-column {
    height: 100%; /* Spans the full height of the grid track */
}

.center-column .panel:last-child { 
    flex-grow: 1; /* Forces the 'Current Project' panel to expand vertically */
}

/* Profile column inherits auto-height grid stretching */
.profile-col {
    height: 100%;
}

/* --- Dynamic Column Tiling Span Modifiers --- */
.span-two {
    grid-column: span 2; /* Stretches across columns 1 & 2 */
}

.span-one {
    grid-column: span 1; /* Snaps cleanly underneath the right column */
}

/* --- Panel Aesthetics --- */
.panel {
    background-color: #0f1622;
    border: 1px solid #1e2d42;
    border-radius: 4px; /* Sharper tiling WM style corners */
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
    border-color: #00f2fe;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.12);
}

/* Flex-aligned utility panel variant for right-aligned link layout elements */
.text-panel-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Typography --- */
.panel-title {
    color: #ffd54f;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    border-bottom: 1px dashed #1e2d42;
    padding-bottom: 6px;
}

/* --- High-Contrast Terminal Bold Text --- */
.tree-list li strong, .panel p strong {
    color: #ffffff;               /* Crisp, full-white to pop from muted text */
    font-weight: bold;
    border-bottom: 1px solid #1e2d42; /* Low-contrast baseline track */
    padding-bottom: 1px;
    letter-spacing: 0.5px;
}

/* Splits header text and timestamps to opposite edges */
.header-with-timestamp {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Styled inline commit-style comment metadata tag */
.header-with-timestamp .timestamp {
    color: #00f2fe; /* Elevated to Cyan accent for high legibility */
    font-size: 0.82rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

/* --- Tree Directory Hierarchy --- */
.tree-list, .tree-list ul {
    list-style-type: none;
}

.tree-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #94a3b8;
}

.tree-list li:last-child {
    margin-bottom: 0;
}

.tree-label {
    color: #e2e8f0;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 2px;
}

/* Terminal Tree Lines: Level 1 -> Level 2 */
.tree-list ul {
    margin-top: 4px;
}

.tree-list ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: -6px;
    width: 10px;
    height: 16px;
    border-left: 1px solid #334155;
    border-bottom: 1px solid #334155;
}

/* Terminal Tree Lines: Level 2 -> Level 3 (Sub-nest) */
.tree-list ul ul {
    margin-top: 4px;
    padding-left: 12px; /* Shifts sub-nest inward */
}

.tree-list ul ul li::before {
    content: "";
    position: absolute;
    left: -6px; /* Re-aligns the connector to meet parent branch */
    top: -6px;
    width: 10px;
    height: 16px;
    border-left: 1px solid #334155;
    border-bottom: 1px solid #334155;
}

/* --- Navigation & Links --- */
.links-list li {
    padding-left: 0;
}

.links-list a {
    color: #00f2fe;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: color 0.2s ease;
}

.links-list a:hover {
    color: #38bdf8;
}

.links-list span {
    font-size: 0.85rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

.links-list a:hover span {
    transform: translateX(4px);
}

/* Right-aligned bottom link node action item */
.panel-exit-node {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 8px;
}

.panel-exit-node a {
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    background-color: rgba(0, 242, 254, 0.03);
    border: 1px dashed #1e2d42;
    padding: 4px 10px;
    border-radius: 2px;
}

.panel-exit-node a:hover {
    border-color: #00f2fe;
    background-color: rgba(0, 242, 254, 0.08);
}

/* Left-aligned inline system path tree link fallback alternative */
.tree-branch-link {
    margin-top: 14px !important;
}

.tree-branch-link:hover::before {
    border-left-color: #00f2fe;
    border-bottom-color: #00f2fe;
}

.tree-branch-link a {
    font-size: 0.88rem;
    letter-spacing: 0.5px;
}

/* OPTION 1: Inline Paragraph Links (Terminal Brackets)
   Targets content links within lists and text blocks without altering structural layout menus
*/
.tree-list li a, .panel p a {
    color: #00f2fe;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.tree-list li a::before, .panel p a::before {
    content: "[";
    color: #475569; /* Muted slate gray brackets */
    margin-right: 3px;
    font-weight: normal;
    transition: color 0.2s ease;
}

.tree-list li a::after, .panel p a::after {
    content: "]";
    color: #475569;
    margin-left: 3px;
    font-weight: normal;
    transition: color 0.2s ease;
}

/* Hover State: The text shifts to a brighter cyan sky variant, and brackets activate */
.tree-list li a:hover, .panel p a:hover {
    color: #38bdf8;
}

.tree-list li a:hover::before, .tree-list li a:hover::after,
.panel p a:hover::before, .panel p a:hover::after {
    color: #00f2fe;
}


/* --- Utility Specific Designators --- */
.status-online {
    color: #00f2fe;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.status-online::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #00f2fe;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #00f2fe;
}

.audio-track {
    color: #38bdf8;
    font-weight: bold;
}

/* --- Responsive Home Page Media Rules --- */
@media (max-width: 1100px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
    .right-column, .span-two, .span-one {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .center-column, .right-column, .span-two, .span-one {
        grid-column: span 1;
    }
    .page-wrapper {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 4vh;
    }
}

/* ==========================================================================
   Subpage / Dashboard Specific Namespace (Does not affect the Home Page)
   ========================================================================== */

/* 2-Column layout setup optimized for normal scale displays */
.subpage-layout .grid-container {
    display: grid;
    grid-template-columns: 280px 1fr; 
    gap: 20px;
    max-width: 1200px; 
    width: 100%;
}

.subpage-layout .nav-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subpage-layout .content-stream {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: auto; 
}

.subpage-layout .inner-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.subpage-layout .nav-meta-tag {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: -6px;
}

/* --- Subpage Layout Mobile Breakpoints --- */
@media (max-width: 900px) {
    .subpage-layout .grid-container {
        grid-template-columns: 1fr; 
    }
    .subpage-layout .inner-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header-with-timestamp {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
/* Identity home link styling */
a.panel-title {
    display: inline-flex !important; /* Prevents full-width block hover */
    align-items: center;
    transition: color 0.2s ease;
}

/* Prepend a terminal path symbol */
a.panel-title::before {
    content: "~/";
    color: #475569; /* Muted slate gray */
    margin-right: 6px;
    font-weight: normal;
    transition: color 0.2s ease;
}

/* Hover effects */
a.panel-title:hover {
    color: #fff275; /* Slightly brighter yellow */
}

a.panel-title:hover::before {
    color: #00f2fe; /* Path lights up cyan on hover */
}
