@font-face {
  font-family: '0xProto';
  src: url('fonts/0xProtoNerdFontMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: '0xProto';
  src: url('fonts/0xProtoNerdFontMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg:       #080808;
  --surface:  #0f0f0f;
  --border:   #1a1a1a;
  --text:     #1ab8bf;
  --muted:    #3a7a7d;
  --white:    #c8d0d4;
  --sidebar:  220px;

  --ansi-green:   #50fa7b;
  --ansi-yellow:  #f1fa8c;
  --ansi-cyan:    #8be9fd;
  --ansi-pink:    #ff79c6;
  --ansi-orange:  #ffb86c;
  --ansi-purple:  #bd93f9;
  --ansi-red:     #ff5555;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: '0xProto', 'Courier New', Courier, monospace;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px 16px;
  overflow-x: hidden;
}

/* ── Centered wrapper ── */
.wrapper {
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 40px);
  border: 1px solid #2a2a2a;
  position: relative;
}


/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar);
  flex-shrink: 0;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  overflow-y: auto;
}

.sidebar__brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.sidebar__title span { color: var(--ansi-green); }

.sidebar__status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar__status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ansi-green);
  box-shadow: 0 0 6px var(--ansi-green);
  flex-shrink: 0;
}

.sidebar__nav {
  padding: 20px 0;
  flex: 1;
}

.sidebar__nav a {
  display: block;
  padding: 8px 20px;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.1s, background 0.1s;
}

.sidebar__nav a::before {
  content: '> ';
  color: var(--border);
  transition: color 0.1s;
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.03);
}

.sidebar__nav a.active::before { color: var(--ansi-green); }
.sidebar__nav a:hover::before  { color: var(--muted); }

.sidebar__footer {
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
  font-size: 11px;
  font-weight: 400;
  color: var(--border);
  line-height: 1.8;
}

/* ── Main content ── */
.main {
  flex: 1;
  z-index: 1;
  padding: 36px 40px 80px;
  min-height: 100vh;
}

/* ── Page header ── */
.page-cmd {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.page-cmd .prompt { color: var(--muted); font-weight: 400; user-select: none; }

.divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

/* ── Index ── */
.hero-title {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 700;
  color: var(--white);
}
.hero-title span { color: var(--ansi-green); }

.hero-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 24px;
}

.about-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  max-width: 640px;
}
.about-text + .about-text { margin-top: 10px; }
.about-text a { color: var(--ansi-green); text-decoration: none; }
.about-text a:hover { text-decoration: underline; }

.quick-links {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-links a {
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.quick-links a:hover { border-color: var(--text); color: var(--white); }

/* ── Post listing ── */
.post-list { display: flex; flex-direction: column; }

.post-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: rgba(255,255,255,0.02); }

.post-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  white-space: nowrap;
}
.tag--ctf      { color: var(--ansi-cyan);   border: 1px solid var(--ansi-cyan);   }
.tag--malware  { color: var(--ansi-red);    border: 1px solid var(--ansi-red);    }
.tag--network  { color: var(--ansi-yellow); border: 1px solid var(--ansi-yellow); }
.tag--osint    { color: var(--ansi-purple); border: 1px solid var(--ansi-purple); }
.tag--web      { color: var(--ansi-orange); border: 1px solid var(--ansi-orange); }
.tag--linux    { color: var(--ansi-green);  border: 1px solid var(--ansi-green);  }
.tag--security { color: var(--ansi-pink);   border: 1px solid var(--ansi-pink);   }
.tag--misc     { color: var(--muted);       border: 1px solid var(--muted);       }
.tag--htb      { color: var(--ansi-green);  border: 1px solid var(--ansi-green);  }
.tag--thm      { color: var(--ansi-red);    border: 1px solid var(--ansi-red);    }

.post-title { font-size: 15px; color: var(--white); }
.post-item:hover .post-title { color: var(--ansi-cyan); }
.post-arrow { font-size: 13px; color: var(--muted); }

.empty-state { font-size: 14px; color: var(--muted); padding: 8px 0; }

/* ── Projects ── */
.project-list { display: flex; flex-direction: column; gap: 22px; }

.project {
  border-left: 2px solid var(--border);
  padding-left: 16px;
  transition: border-color 0.15s;
}
.project:hover { border-left-color: var(--ansi-purple); }

.project__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}
.project__name a { color: var(--ansi-purple); text-decoration: none; }
.project__name a:hover { text-decoration: underline; }

.project__desc { font-size: 14px; color: var(--text); margin-top: 4px; line-height: 1.5; }

.project__tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.project__tag {
  font-size: 11px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 2px;
}

/* ── Contact ── */
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.contact-list li { font-size: 15px; display: flex; gap: 20px; }
.contact-list .key { color: var(--muted); min-width: 80px; }
.contact-list a { color: var(--ansi-pink); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 640px) {
  body { padding: 0; }
  .wrapper { flex-direction: column; border: none; min-height: 100vh; }

  /* Sidebar becomes a sticky top bar */
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
    z-index: 20;
    /* Keep bg-commands from bleeding under transparent sidebar */
    background: var(--surface);
  }

  /* Brand row: logo + status on one line */
  .sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 10px;
    border-bottom: none;
  }

  .sidebar__title { font-size: 16px; }

  /* Status dot stays, label hides */
  .sidebar__status { margin-top: 0; font-size: 0; }
  .sidebar__status::before { width: 6px; height: 6px; }

  /* Nav links: single scrollable row, no wrap */
  .sidebar__nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 8px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
  }
  .sidebar__nav::-webkit-scrollbar { display: none; }

  .sidebar__nav a {
    padding: 5px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
  }

  /* Hide footer — no space for it */
  .sidebar__footer { display: none; }

  /* Main content — no left margin, tighter padding */
  .main {
    margin-left: 0;
    padding: 24px 16px 60px;
  }

  /* Post list: drop the arrow column */
  .post-item { grid-template-columns: auto 1fr; }
  .post-arrow { display: none; }

  /* Scale down hero */
  .hero-title { font-size: 28px; }

  /* Quick links wrap naturally */
  .quick-links { gap: 6px; }
  .quick-links a { font-size: 12px; padding: 5px 10px; }

}
