/* ===== IAMechanics — Vintage Terminal Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

:root {
  --phosphor: #33ff33;
  --phosphor-dim: #1a9e1a;
  --phosphor-glow: #44ff4488;
  --bg: #0a0a0a;
  --bg-lighter: #111;
  --amber: #ffb833;
  --amber-dim: #996e1f;
  --red: #ff4444;
  --cyan: #44dddd;
  --scanline: rgba(0,0,0,0.15);
  --max-w: 900px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'VT323', 'Courier New', monospace;
  color: var(--phosphor);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 2rem;
}

/* CRT scanlines */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--scanline) 2px, var(--scanline) 4px);
  pointer-events: none;
  z-index: 9999;
}

/* Subtle CRT flicker */
@keyframes flicker { 0%,100%{opacity:1;} 92%{opacity:1;} 93%{opacity:0.8;} 94%{opacity:1;} }
body { animation: flicker 8s infinite; }

/* Boot animation */
@keyframes typeIn { from{max-height:0;opacity:0;} to{max-height:4000px;opacity:1;} }
.boot-1 { animation: typeIn 0.4s ease-out 0.2s both; }
.boot-2 { animation: typeIn 0.4s ease-out 0.5s both; }
.boot-3 { animation: typeIn 0.4s ease-out 0.8s both; }

/* Glow */
.glow { text-shadow: 0 0 5px var(--phosphor-glow), 0 0 15px var(--phosphor-glow); }

/* Blinking cursor */
@keyframes blink { 0%,49%{opacity:1;} 50%,100%{opacity:0;} }
.cursor::after { content: '█'; animation: blink 1s step-end infinite; margin-left: 2px; }

/* ==================== NAV ==================== */
.term-nav {
  background: var(--phosphor);
  color: var(--bg);
  padding: 0.3rem 0;
  font-size: 1.1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.term-nav .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.term-nav a {
  color: var(--bg);
  text-decoration: none;
  padding: 0.15rem 0.6rem;
  transition: background 0.15s;
}
.term-nav a:hover, .term-nav a.active {
  background: var(--bg);
  color: var(--phosphor);
}
.term-nav .logo-text { font-weight: bold; letter-spacing: 2px; margin-right: 1rem; font-size: 1.15rem; }
.term-nav .sep { opacity: 0.4; }

/* ==================== PAGE HEADER ==================== */
.page-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px dashed var(--phosphor-dim);
}
.page-header h1 {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.page-header .path {
  color: var(--phosphor-dim);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

/* ==================== MAIN CONTENT ==================== */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem;
}

p { margin-bottom: 0.8rem; font-size: 1.15rem; }
a { color: var(--amber); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--phosphor); text-shadow: 0 0 5px var(--phosphor-glow); }
strong { color: var(--amber); }
em { color: var(--cyan); font-style: normal; }

/* ==================== SECTION BLOCKS ==================== */
.section-block {
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--phosphor-dim);
  background: linear-gradient(90deg, rgba(51,255,51,0.03) 0%, transparent 40%);
}
.section-block h2 {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--amber);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 6px var(--amber-dim);
}
.section-block h2::before { content: '> '; color: var(--phosphor); }

h2 {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--amber);
  margin: 2rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 6px var(--amber-dim);
}
h2::before { content: '> '; color: var(--phosphor); }

h3 {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  font-weight: normal;
  color: var(--cyan);
  margin: 1.2rem 0 0.4rem;
}

/* ==================== TERMINAL WINDOWS ==================== */
.term-window {
  border: 1px solid var(--phosphor-dim);
  margin: 1.5rem 0;
  background: var(--bg-lighter);
}
.term-window .title-bar {
  background: var(--phosphor-dim);
  color: var(--bg);
  padding: 0.2rem 0.8rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.term-window .title-bar .dots { display: flex; gap: 4px; }
.term-window .title-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg); }
.term-window .content { padding: 0.8rem 1rem; }

/* ==================== BOOK FRAME ==================== */
.book-frame {
  border: 1px solid var(--phosphor-dim);
  padding: 1rem;
  margin: 1.5rem 0;
  position: relative;
  text-align: center;
}
.book-frame::before {
  content: attr(data-label);
  position: absolute;
  top: -0.7rem;
  left: 1rem;
  background: var(--bg);
  padding: 0 0.5rem;
  font-size: 0.9rem;
  color: var(--amber);
}
.book-frame img {
  max-width: 100%;
  width: 260px;
  filter: brightness(0.85) contrast(1.1);
  border: 2px solid var(--phosphor-dim);
}

/* ==================== LISTS ==================== */
ul, ol { list-style: none; margin: 0.5rem 0 1rem 0; }
ul li::before { content: '├── '; color: var(--phosphor-dim); }
ul li:last-child::before { content: '└── '; }
ul li { padding: 0.15rem 0; font-size: 1.1rem; }

/* Indented tree items */
.indent-1 { padding-left: 1.8rem !important; }
.indent-2 { padding-left: 3.6rem !important; }

/* ==================== TABLES ==================== */
.term-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1.05rem;
}
.term-table th {
  text-align: left;
  color: var(--amber);
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--phosphor);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: normal;
}
.term-table td {
  padding: 0.4rem 0.7rem;
  border-bottom: 1px dashed var(--phosphor-dim);
  vertical-align: top;
}
.term-table tr:hover td { background: rgba(51,255,51,0.04); }
.term-table .section-row td {
  color: var(--cyan);
  font-size: 1.1rem;
  padding-top: 1rem;
  border-bottom: 1px solid var(--phosphor-dim);
  letter-spacing: 1px;
}

/* ==================== AUTHOR CARD ==================== */
.author-section {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}
.author-section img {
  width: 160px;
  border: 2px solid var(--phosphor-dim);
  filter: grayscale(100%) brightness(1.2) contrast(1.4);
  flex-shrink: 0;
}
.certs {
  color: var(--cyan);
  font-size: 1rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

/* ==================== ORDER CARD ==================== */
.order-section {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}
.order-section img {
  width: 180px;
  border: 2px solid var(--phosphor-dim);
  filter: brightness(0.85) contrast(1.1);
  flex-shrink: 0;
}
.order-meta {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--phosphor-dim);
  margin-bottom: 0.8rem;
}
.order-links a {
  display: inline-block;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  background: var(--phosphor-dim);
  color: var(--bg);
  padding: 0.3rem 0.8rem;
  text-decoration: none;
  font-size: 1.05rem;
  transition: background 0.2s;
}
.order-links a:hover { background: var(--phosphor); color: var(--bg); }

/* ==================== DIAGRAM ==================== */
.diagram-wrap {
  text-align: center;
  margin: 1.5rem 0;
}
.diagram-wrap img {
  max-width: 100%;
  border: 2px solid var(--phosphor-dim);
  filter: brightness(0.85) contrast(1.15);
}

/* ==================== LAB TABLE ==================== */
.lab-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.lab-table th {
  text-align: left;
  color: var(--amber);
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--phosphor);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: normal;
  font-size: 0.9rem;
}
.lab-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px dashed var(--phosphor-dim);
  vertical-align: top;
}
.lab-table td:first-child { color: var(--amber); font-weight: bold; white-space: nowrap; }
.lab-table td:nth-child(2) { color: var(--cyan); white-space: nowrap; }
.lab-table tr:hover td { background: rgba(51,255,51,0.04); }

/* ==================== WIRESHARK LINK ==================== */
.wireshark-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--phosphor-dim);
  text-decoration: none;
  color: var(--phosphor);
  transition: all 0.2s;
}
.wireshark-link:hover { border-color: var(--phosphor); background: rgba(51,255,51,0.05); }
.wireshark-link img { height: 36px; filter: brightness(1.3) saturate(0.6); }
.wireshark-link span { font-size: 1.05rem; }

/* ==================== FOOTER ==================== */
.site-footer {
  max-width: var(--max-w);
  margin: 3rem auto 0;
  padding: 1rem 1.5rem;
  border-top: 1px dashed var(--phosphor-dim);
  color: var(--phosphor-dim);
  font-size: 1rem;
  text-align: center;
}
.site-footer a { color: var(--phosphor-dim); }

/* ==================== STATUS BAR ==================== */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--phosphor-dim);
  color: var(--bg);
  font-size: 0.9rem;
  padding: 0.15rem 1.5rem;
  display: flex;
  justify-content: space-between;
  z-index: 100;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 700px) {
  .term-nav .inner { font-size: 0.95rem; }
  .page-header h1 { font-size: 1.4rem; }
  .author-section, .order-section { flex-direction: column; align-items: center; text-align: center; }
  .author-section img, .order-section img { width: 140px; }
  .lab-table { font-size: 0.8rem; }
  .status-bar { font-size: 0.75rem; }
}
