:root {
  --amber: #ffb000;
  --amber-dim: #c87800;
  --amber-faint: #4a2c00;
  --bg: #0a0700;
  --scanline: rgba(0,0,0,0.18);
}

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

body {
  background: var(--bg);
  color: var(--amber);
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* CRT scanlines */
body::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    var(--scanline) 0px,
    var(--scanline) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 9998;
}

/* CRT vignette */
body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.75) 100%);
  z-index: 9997;
}

/* CRT flicker */
@keyframes flicker {
  0%   { opacity: 1; }
  92%  { opacity: 1; }
  93%  { opacity: 0.85; }
  94%  { opacity: 1; }
  96%  { opacity: 0.9; }
  100% { opacity: 1; }
}
#main-content { animation: flicker 8s infinite; }

/* ── BOOT SCREEN ── */
#boot {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 3rem;
  transition: opacity 0.8s ease;
}
#boot.fade-out { opacity: 0; pointer-events: none; }
#boot-text { white-space: pre; color: var(--amber); }
#boot-bar-wrap { margin-top: 1.2rem; width: 340px; }
#boot-bar-label { margin-bottom: 4px; color: var(--amber-dim); font-size: 13px; }
#boot-bar-outer {
  width: 100%;
  height: 14px;
  border: 1px solid var(--amber-dim);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
#boot-bar-inner {
  height: 100%;
  width: 0%;
  background: var(--amber);
  transition: width 0.15s linear;
}
#boot-status { margin-top: 0.6rem; color: var(--amber-dim); font-size: 12px; min-height: 1.2em; }

/* ── CURSOR ── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.cursor {
  display: inline-block;
  width: 9px;
  height: 1em;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ── LAYOUT ── */
#main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ── PROMPT HEADER ── */
.prompt-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--amber-faint);
  padding-bottom: 1.2rem;
}
.prompt-header .path { color: var(--amber-dim); font-size: 13px; margin-bottom: 0.3rem; }
.prompt-header h1 { font-size: clamp(1.3rem, 4vw, 2rem); letter-spacing: 0.04em; }
.prompt-header .tagline { color: var(--amber-dim); font-size: 13px; margin-top: 0.3rem; }

/* ── NAV ── */
nav {
  display: flex;
  gap: 0;
  margin-bottom: 2.5rem;
  border: 1px solid var(--amber-faint);
  width: fit-content;
}
nav a {
  color: var(--amber-dim);
  text-decoration: none;
  padding: 6px 18px;
  font-size: 13px;
  border-right: 1px solid var(--amber-faint);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
nav a:last-child { border-right: none; }
nav a:hover, nav a.active {
  background: var(--amber);
  color: var(--bg);
}

/* ── SECTIONS ── */
.section { display: none; }
.section.active { display: block; }

/* CMD label */
.cmd { color: var(--amber-dim); font-size: 13px; margin-bottom: 1rem; }
.cmd span { color: var(--amber); }

/* ── ABOUT ── */
.about-block p { margin-bottom: 0.9rem; }
table.info-table { border-collapse: collapse; margin-top: 1rem; width: 100%; max-width: 560px; }
table.info-table td { padding: 5px 12px 5px 0; font-size: 13px; vertical-align: top; }
table.info-table td:first-child { color: var(--amber-dim); white-space: nowrap; padding-right: 2rem; }

/* ── BLOG ── */
.post-list { list-style: none; }
.post-list li { border-bottom: 1px solid var(--amber-faint); padding: 1rem 0; }
.post-list li:first-child { padding-top: 0; }
.post-meta { color: var(--amber-dim); font-size: 12px; margin-bottom: 0.3rem; }
.post-title { font-size: 1rem; cursor: pointer; }
.post-title:hover { text-decoration: underline; }
.post-body { margin-top: 0.6rem; font-size: 13px; color: var(--amber-dim); display: none; line-height: 1.7; }
.post-body.open { display: block; }
.post-toggle { font-size: 11px; color: var(--amber-dim); cursor: pointer; margin-top: 0.4rem; }
.post-toggle:hover { color: var(--amber); }

/* ── PORTFOLIO ── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; border: 1px solid var(--amber-faint); }
.project-card {
  padding: 1.2rem;
  border: 1px solid transparent;
  transition: background 0.15s;
  background: var(--bg);
}
.project-card:hover { background: #110c00; }
.project-card .proj-title { font-size: 0.95rem; margin-bottom: 0.4rem; }
.project-card .proj-tags { font-size: 11px; color: var(--amber-dim); margin-bottom: 0.5rem; }
.project-card .proj-desc { font-size: 13px; color: var(--amber-dim); line-height: 1.6; }
.project-card a { color: var(--amber); font-size: 12px; text-decoration: none; display: inline-block; margin-top: 0.5rem; }
.project-card a:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--amber-faint);
  color: var(--amber-dim);
  font-size: 12px;
}