:root {
    /* THEME: ARC'TERYX / BOULDERER */
    --carbon-bg: #1c1c1c;      
    --magma-orange: #ff4d00;   
    --granite-grey: #2b2b2b;   
    --text-white: #eeeeee;     
    --text-muted: #888888;     
    --border-line: rgba(255, 255, 255, 0.1); 
    
    /* Mapped Variables */
    --shadow-slate: var(--carbon-bg);
    --foliage-orange: var(--magma-orange);
    --foliage-gold: var(--magma-orange);
    --rock-grey: var(--text-muted);
    --sky-blue: #a0a0a0;
    --slate-text: #333333;
    --snow-white: #ffffff;
    --ice-blue: #e5e5e5;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--slate-text);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    line-height: 1.5;
    background-color: var(--carbon-bg);
}

/* --- LEFT COLUMN --- */
.left-col {
    width: 35%;
    min-height: 100vh;
    height: auto;
    background-color: var(--carbon-bg);
    color: var(--text-white);
    border-right: 2px solid var(--magma-orange);
    display: flex;
    flex-direction: column;
}

.basecamp-content {
    padding: 60px 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.profile-section { flex-shrink: 0; }

.blog-header h1 { font-weight: 800; font-size: 2.5rem; letter-spacing: -1px; line-height: 1; margin-bottom: 15px; color: #fff; }
.location-sub { font-family: 'JetBrains Mono', monospace; color: var(--rock-grey); font-size: 0.9rem; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; padding-left: 2px; }
.loc-icon { filter: grayscale(1); font-size: 1rem; }
.bio-blurb { margin-bottom: 35px; border-left: 2px solid var(--magma-orange); padding-left: 15px; }
.bio-blurb p { font-size: 0.95rem; color: #ccc; line-height: 1.6; font-weight: 300; }

.cert-badge { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 35px; padding-bottom: 25px; border-bottom: 1px solid var(--border-line); }
.cert-top { display: flex; align-items: center; gap: 12px; }
.cert-bottom { padding-left: 4px; }
.cisco-svg { width: 48px; height: 24px; stroke: #3498db; fill: none; }
.cert-title { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: 0.5px; }
.cert-status { font-size: 0.75rem; color: var(--magma-orange); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }

/* COMMS ARRAY */
.technical-links { margin-top: 10px; }
.links-header { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; text-transform: uppercase; color: var(--rock-grey); margin-bottom: 10px; letter-spacing: 1px; opacity: 0.8; }
.comm-grid { display: flex; flex-direction: column; gap: 12px; }

.comm-row { 
    display: flex; 
    align-items: center; 
    width: 100%; 
    padding: 10px 12px; 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--border-line); 
    border-radius: 2px; 
    text-decoration: none; 
    transition: all 0.2s ease; 
    gap: 15px; /* Spacing between Label and Data */
}

.comm-row:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--magma-orange); transform: translateX(4px); }

/* Left Side: Label */
.comm-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--magma-orange);
    letter-spacing: 0.5px;
    width: 110px; /* Fixed width */
    flex-shrink: 0;
    border-right: 1px solid var(--border-line); /* Internal divider */
    padding-right: 10px;
}

/* Right Side: Data Group (FIX: Flex Shrink & Wrapping) */
.comm-data {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    min-width: 0; /* Allows shrinking past content */
}

.comm-icon { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

.comm-text { 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 0.8rem; 
    color: #ecf0f1; 
    flex-grow: 1; 
    /* Force wrapping */
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.comm-arrow { font-size: 0.8rem; color: var(--rock-grey); opacity: 0; transform: translateX(-5px); transition: all 0.2s ease; }
.comm-row:hover .comm-arrow { opacity: 1; transform: translateX(0); }
.comm-row:hover .comm-icon { color: #fff; }

/* RECENT LOGS SIDEBAR */
.sidebar-recent-posts { 
    margin-top: 35px; 
    padding-top: 20px; 
    border-top: 1px solid var(--border-line); 
    margin-bottom: 0px; 
}

.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-container { display: flex; flex-direction: column; gap: 12px; }
.recent-entry { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.recent-marker { width: 6px; height: 6px; background-color: var(--magma-orange); display: inline-block; flex-shrink: 0; margin-top: 7px; }
.recent-link { color: var(--text-muted); text-decoration: none; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; line-height: 1.4; transition: color 0.2s; }
.recent-link:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--magma-orange); }

/* SPACER BLOCK */
.spacer-block {
    height: 40px;
    width: 100%;
    border-bottom: 1px solid var(--border-line); 
}

/* INFRASTRUCTURE GRID */
.system-architecture { margin-top: 25px; margin-bottom: 30px; }
.arch-top-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 15px; }
.arch-header { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; text-transform: uppercase; color: var(--rock-grey); letter-spacing: 1px; margin: 0; }

.infra-grid { background: rgba(0,0,0,0.2); border-radius: 2px; border: 1px solid var(--border-line); padding: 5px 12px; margin-top: 15px; }
.infra-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-line); }
.border-none { border-bottom: none; }
.infra-service-group { display: flex; align-items: center; gap: 12px; }
.infra-icon { width: 20px; height: 20px; color: #aab7b8; flex-shrink: 0; }
.infra-text { display: flex; flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.svc-name { font-size: 0.8rem; color: #fff; font-weight: 500; }
.svc-detail { font-size: 0.65rem; color: var(--rock-grey); font-family: 'JetBrains Mono', monospace; }

/* CRAG CARD */
.crag-card { width: 100%; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; border: 1px solid var(--border-line); margin-top: auto; margin-bottom: 0px; flex-shrink: 0; z-index: 2; position: relative; }
.crag-header { padding: 8px 12px; display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--rock-grey); background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--border-line); }
.crag-image-container { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; overflow: hidden; }
.crag-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; opacity: 0.9; }
.crag-card:hover .crag-img { transform: scale(1.05); opacity: 1; }
.crag-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 8px 12px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); display: flex; flex-direction: column; }
.crag-name { font-weight: 700; font-size: 0.95rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
.crag-loc { font-size: 0.75rem; color: var(--magma-orange); }
.crag-footer { font-size: 0.6rem; color: #666; padding: 4px 12px; text-align: right; background: #0f1316; }

/* DESCENT SCHEMATIC */
.descent-schematic { display: flex; flex-direction: column; align-items: center; flex-grow: 1; position: relative; padding-bottom: 30px; margin-top: 0; }
.rappel-line { width: 2px; background-color: var(--magma-orange); flex-grow: 1; min-height: 40px; }
.terminal-node { margin-bottom: 0; z-index: 2; background: var(--carbon-bg); padding: 2px 0; }
.knot-svg { width: 30px; height: 30px; }
.ground-line { width: 100%; max-width: 120px; height: 2px; background: var(--text-muted); margin-top: 5px; position: relative; }
.ground-line::after { content: ''; position: absolute; width: 100%; height: 4px; background: repeating-linear-gradient(45deg, var(--text-muted) 0, var(--text-muted) 1px, transparent 1px, transparent 6px); bottom: -4px; }
.ground-status { display: flex; flex-direction: column; align-items: center; margin-top: 15px; font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--text-muted); letter-spacing: 1px; gap: 4px; }
.ground-status span:first-child { color: var(--magma-orange); font-weight: 700; }

/* RIGHT COLUMN */
.right-col { width: 65%; min-height: 100vh; height: auto; background-color: var(--snow-white); padding: 0; background-image: radial-gradient(#bdc3c7 1px, transparent 1px); background-size: 20px 20px; }

/* RESUME CONTAINER */
.resume-container { 
    max-width: 1200px; /* WAS 850px - This widens the page */
    width: 95%;        /* Ensures it looks good on smaller laptops too */
    margin: 0 auto; 
    padding: 70px; 
    background: white; 
    min-height: auto; 
    margin-bottom: 50px;
    box-shadow: -10px 0 20px rgba(0,0,0,0.02); 
}

/* TOP BAR & ALTIMETER */
.top-bar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; border-bottom: 2px solid var(--ice-blue); padding-bottom: 15px; }
.nav-tabs { display: flex; gap: 20px; }
.tab-btn { background: none; border: none; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: #555; text-transform: uppercase; cursor: pointer; padding-bottom: 5px; border-bottom: 3px solid transparent; transition: all 0.2s; }
.tab-btn:hover { color: var(--slate-text); }
.tab-btn.active { color: var(--magma-orange); border-bottom: 3px solid var(--magma-orange); font-weight: 700; }

.altimeter-wrapper { display: flex; flex-direction: column; align-items: flex-end; cursor: pointer; }
.altimeter-wrapper:hover .alt-helper { opacity: 1; }
.altimeter-wrapper:hover .altimeter-widget { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); border-color: var(--magma-orange); }

.alt-helper { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--magma-orange); margin-bottom: 5px; transition: opacity 0.2s; text-decoration: underline; opacity: 0.3; }
.alt-helper:hover { opacity: 1; }

.altimeter-widget.interactive { 
    position: relative; 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: flex; 
    flex-direction: row !important; /* FORCE ROW */
    align-items: flex-end; 
    gap: 15px; 
    background: #fafafa; 
    border: 1px solid var(--ice-blue); 
    border-radius: 2px; 
    padding: 10px 15px; 
    min-width: 250px; 
}

.graph-container { width: 140px; height: 35px; display: flex; align-items: flex-end; }
.elevation-graph { width: 100%; height: 100%; }
.altimeter-data { text-align: right; font-family: 'JetBrains Mono', monospace; }
.alt-label { display: block; font-size: 0.65rem; color: var(--sky-blue); letter-spacing: 0.5px; margin-bottom: 2px; }
.alt-value-group { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.alt-icon { font-size: 0.8rem; color: var(--magma-orange); }
#counter-display { font-size: 1.4rem; font-weight: 700; color: var(--slate-text); line-height: 1; }

/* MODAL */
.modal-backdrop { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px);
    transition: all 0.4s ease;
}

.modal-backdrop.show { opacity: 1; visibility: visible; pointer-events: auto; }

.modal-content { 
    background: #fff; width: 90%; max-width: 500px; border-radius: 2px; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); overflow: hidden; 
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show .modal-content { transform: translateY(0) scale(1); }

.modal-header { background: var(--carbon-bg); color: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; text-transform: uppercase; margin: 0; }
.close-btn { background: none; border: none; color: var(--magma-orange); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-body { padding: 25px; color: var(--slate-text); }
.modal-intro { font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }
.modal-diagram { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

/* DIAGRAM STEP UPDATES for Icons */
.diagram-step { 
    background: var(--ice-blue); padding: 10px; border-radius: 2px; 
    font-size: 0.85rem; display: flex; gap: 15px; align-items: center; 
}
.step-num-group {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    min-width: 30px;
}
.step-num { font-family: 'JetBrains Mono', monospace; color: var(--magma-orange); font-weight: 700; line-height: 1; }
.step-icon { width: 18px; height: 18px; color: var(--slate-text); opacity: 0.7; }

.diagram-arrow { text-align: center; color: var(--rock-grey); font-size: 0.8rem; }
.modal-code { background: #1e1e1e; color: #d4d4d4; padding: 15px; border-radius: 2px; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; margin-bottom: 15px; }
.modal-footer-note { font-size: 0.75rem; color: var(--rock-grey); border-top: 1px solid var(--ice-blue); padding-top: 10px; font-style: italic; }

/* RESUME STYLES */
.content-view { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.section-title { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; text-transform: uppercase; color: var(--sky-blue); letter-spacing: 1px; margin: 40px 0 20px 0; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; flex-grow: 1; height: 1px; background: var(--ice-blue); }
.section-title:first-child { margin-top: 0; }
.entry-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.company-header { margin-bottom: 15px; }
.org-name { font-size: 1.2rem; font-weight: 800; color: #1a202c; letter-spacing: -0.5px; }
.location { font-size: 0.85rem; color: var(--sky-blue); font-weight: 500; }
.role-title { font-weight: 600; font-size: 1rem; color: #2d3748; }
.date-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; background: #edf2f7; padding: 2px 6px; border-radius: 2px; color: #4a5568; }

ul { 
    padding-left: 20px;
    list-style: square;          /* Standard Square shape */
    margin-top: 8px; 
}

/* This colors the dot ORANGE */
li::marker {
    color: var(--magma-orange);
    font-size: 1.2em;         /* Make the dot slightly bigger */
}

li { 
    margin-bottom: 8px; 
    font-size: 0.95rem; 
    color: #4b5563; 
}

.divider { border: 0; border-top: 1px dashed var(--ice-blue); margin: 40px 0; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    body { flex-direction: column; }
    .left-col { width: 100%; border-right: none; border-bottom: 4px solid var(--magma-orange); min-height: auto; }
    .basecamp-content { padding: 50px 40px; gap: 40px; max-width: 850px; margin: 0 auto; width: 100%; }
    .right-col { width: 100%; min-height: auto; }
    .resume-container { padding: 50px 40px; }
    .crag-card { margin-top: 40px; margin-bottom: 0; }
    
    /* FIX: Hide the rope system on mobile */
    .descent-schematic { display: none; }
}

@media (max-width: 768px) {
    .basecamp-content { padding: 40px 20px; }
    .resume-container { padding: 30px 20px; }
    .top-bar { flex-direction: column-reverse; gap: 25px; align-items: flex-start; }
    .nav-tabs { width: 100%; border-bottom: 1px solid var(--ice-blue); }
    .altimeter-wrapper { width: 100%; align-items: flex-start; }
    .alt-helper { align-self: flex-start; }
    .altimeter-widget.interactive { width: 100%; align-items: center; justify-content: space-between; }
    .crag-card { margin-top: 30px; }
}

/* --- LOG HISTORY ACCORDION --- */
.log-accordion { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }

.log-entry { border: 1px solid var(--ice-blue); border-radius: 2px; overflow: hidden; transition: all 0.3s ease; background: #ffffff; }

.log-header {
    background: #fcfcfc; padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    border-left: 3px solid transparent; transition: background 0.2s, border-color 0.2s;
}

.log-entry:hover .log-header { background: #f0f2f5; border-left-color: var(--sky-blue); }
.log-title { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.9rem; color: var(--slate-text); }
.log-icon { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--magma-orange); transition: transform 0.3s ease; font-size: 1.1rem; line-height: 1; }

.log-entry.active .log-header { background: #f0f2f5; border-bottom: 1px solid var(--ice-blue); border-left-color: var(--magma-orange); }
.log-entry.active .log-icon { transform: rotate(45deg); }

.log-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out, padding 0.4s ease, opacity 0.4s ease; opacity: 0; background: #fff; }
.log-entry.active .log-body { max-height: 80vh; opacity: 1; padding: 25px 20px; overflow-y:auto;}

.log-date { display: block; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px dashed var(--ice-blue); }
.log-content { font-size: 0.95rem; line-height: 1.7; color: #4b5563; }

/* --- FULL CYCLE API ANIMATION (Client -> Server -> DB -> Client) --- */
.net-path {
    stroke: var(--ice-blue);
    stroke-width: 2;
    stroke-linecap: round;
}

.node-icon {
    fill: #fafafa;
    stroke: var(--sky-blue);
    stroke-width: 2;
    transition: all 0.2s ease;
}

.packet-dot {
    fill: var(--magma-orange);
    /* 6s Duration */
    animation: fullRequestCycle 6s linear infinite;
}

/* 1. Packet Movement */
@keyframes fullRequestCycle {
    0%   { cx: 12px; }
    25%  { cx: 60px; }
    50%  { cx: 108px; } /* Hits DB */
    75%  { cx: 60px; }
    100% { cx: 12px; } /* Return */
}

/* 2. Client Pulse */
#node-client {
    animation: clientPulse 6s linear infinite;
}

@keyframes clientPulse {
    0%, 5% { stroke: var(--magma-orange); stroke-width: 2px; }
    10%, 90% { stroke: var(--sky-blue); stroke-width: 2px; }
    95%, 100% { stroke: var(--magma-orange); stroke-width: 2px; }
}

/* 3. Server Pulse */
#node-server {
    animation: serverPulse 6s linear infinite;
}

@keyframes serverPulse {
    0%, 20% { stroke: var(--sky-blue); }
    25% { stroke: var(--magma-orange); stroke-width: 2px; } /* Pass 1 */
    30%, 70% { stroke: var(--sky-blue); }
    75% { stroke: var(--magma-orange); stroke-width: 2px; } /* Pass 2 */
    80%, 100% { stroke: var(--sky-blue); }
}

/* 4. DB Pulse - UPDATED: Using SOLID OPAQUE COLORS to ensure masking works */
#node-db {
    animation: dbUpdatePulse 6s linear infinite;
}

@keyframes dbUpdatePulse {
    0%, 45% { 
        stroke: var(--sky-blue); 
        fill: #fafafa; /* Solid Background */
    }
    
    50% { 
        stroke: var(--magma-orange); 
        fill: #fff0e6; /* Solid Pale Orange - OPAQUE */
    } 
    
    55%, 100% { 
        stroke: var(--sky-blue); 
        fill: #fafafa; /* Solid Background */
    }
}

.log-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid var(--border-line);
    display: block;
}