:root {
  --red: #dc3545;
  --bg: #0d0d0d;
  --bg-card: #111111;
  --bg-alt: #141414;
  --border: #222;
}

html {
  background-color: var(--bg);
}

body {
  background-color: transparent;
  font-family: 'Courier New', Courier, monospace;
  scroll-behavior: smooth;
}

/* Navbar */
#mainNav {
  background-color: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

#mainNav .nav-link {
  color: #aaa;
  transition: color 0.2s;
}

#mainNav .nav-link:hover {
  color: var(--red);
}

/* Section titles */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-left: 4px solid var(--red);
  padding-left: 12px;
}

/* Hero terminal */
#hero {
  background: transparent;
}

.terminal-box {
  background-color: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  max-width: 560px;
  box-shadow: 0 0 40px rgba(220, 53, 69, 0.15);
  overflow: hidden;
}

.terminal-header {
  background-color: #1c1c1c;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.terminal-body {
  padding: 20px 24px;
  text-align: left;
  font-size: 0.95rem;
  line-height: 2;
}

.blink {
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* About */
.avatar-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background-color: #1a0000;
}

.stat-card {
  background-color: var(--bg-card);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
}

/* Platform cards */
.platform-card {
  background: #0d1117;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}
.htb-card {
  border: 1px solid #9fef0033;
}
.htb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px #9fef0022;
  border-color: #9fef00;
}
.thm-card {
  border: 1px solid #c1111133;
}
.thm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px #c1111122;
  border-color: #c11111;
}
.platform-logo {
  width: 42px; height: 42px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.thm-stat-box {
  background: #ffffff08;
  border: 1px solid #ffffff0f;
}

/* Tools */
.bg-tools {
  background-color: var(--bg-alt);
}

.tool-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.tool-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2);
}

/* Writeups */
.writeup-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.writeup-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(220, 53, 69, 0.15);
}

.border-dashed {
  border: 1px dashed #333 !important;
}

.writeup-item {
  transition: opacity 0.3s, transform 0.3s;
}

.writeup-item.hidden {
  display: none;
}

/* Filter buttons */
.filter-btn.active {
  background-color: var(--red);
  border-color: var(--red);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d0d0d; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* Form inputs focus */
.form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
  background-color: #1a1a1a;
  color: white;
}
