:root{
  --bg: #060913;
  --panel: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.14);
  --text: #e6e9f2;
  --muted: rgba(230,233,242,0.72);

  --blue: #4cc9ff;
  --green: #34d399;
  --amber: #fbbf24;
  --purple: #a78bfa;
  --pink: #fb7185;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% 0%, rgba(76,201,255,0.26), transparent 58%),
    radial-gradient(850px 450px at 88% 12%, rgba(52,211,153,0.18), transparent 58%),
    radial-gradient(800px 450px at 60% 95%, rgba(167,139,250,0.14), transparent 55%),
    linear-gradient(180deg, #050714, #060913 60%, #050714);
  min-height: 100vh;
}

/* NAV */
.topnav{
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
}

.topnav a{
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  margin-right: 16px;
  padding: 8px 10px;
  border-radius: 10px;
  display: inline-block;
}

.topnav a:hover{ background: rgba(255,255,255,0.06); }

.topnav a.active{
  background: rgba(76,201,255,0.12);
  border: 1px solid rgba(76,201,255,0.25);
}

/* HERO */
.hero{
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 24px 18px 10px;
}

.hero h1{
  margin: 0 0 8px;
  font-size: 36px;
}

.hero p{
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
}

/* GRID */
.grid{
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 0 18px 50px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.card{
  grid-column: span 12;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 900px){
  .card{ grid-column: span 6; }
  .card.wide{ grid-column: span 12; }
}

/* Glow border */
.card:before{
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg,
    rgba(76,201,255,0.35),
    rgba(52,211,153,0.25),
    rgba(167,139,250,0.22),
    rgba(251,191,36,0.18)
  );
  filter: blur(20px);
  opacity: 0.35;
  z-index: 0;
}

.card > *{ position: relative; z-index: 1; }

.card-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card h2{
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.card h3{
  margin: 16px 0 8px;
  font-size: 14px;
  color: rgba(230,233,242,0.92);
  letter-spacing: 0.2px;
}

.card p, .card ul{
  color: var(--muted);
}

.card ul{
  margin: 10px 0 0 18px;
}

/* BADGES */
.badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.badge{
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}

.badge.net{ border-color: rgba(76,201,255,0.45); background: rgba(76,201,255,0.12); color: var(--blue); }
.badge.sec{ border-color: rgba(52,211,153,0.45); background: rgba(52,211,153,0.12); color: var(--green); }
.badge.ops{ border-color: rgba(251,191,36,0.45); background: rgba(251,191,36,0.12); color: var(--amber); }
.badge.vm{ border-color: rgba(167,139,250,0.45); background: rgba(167,139,250,0.12); color: var(--purple); }
.badge.cloud{ border-color: rgba(251,113,133,0.45); background: rgba(251,113,133,0.12); color: var(--pink); }

/* Tags */
.tags{
  margin-top: 12px;
}

.tags span{
  display: inline-block;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  margin-right: 8px;
  margin-top: 6px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}

/* Diagram */
.diagram{
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: auto;
}

.diagram code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  color: rgba(230,233,242,0.92);
  white-space: pre;
}

/* Toggle Button */
.toggle-btn{
  margin-top: 14px;
  padding: 10px 16px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid rgba(76,201,255,0.35);
  background: rgba(76,201,255,0.14);
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
}

.toggle-btn:hover{
  background: rgba(76,201,255,0.22);
  transform: translateY(-1px);
}

/* Hidden image container (expand/collapse) */
.hidden-image{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s ease, opacity 0.35s ease;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
}

.hidden-image img{
  width: 100%;
  height: auto;
  display: block;
}

/* Meta + Footer */
.meta{
  margin-top: 12px;
  font-size: 13px;
  color: rgba(230,233,242,0.70);
}

.footer{
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 18px;
  color: var(--muted);
  font-size: 13px;
}
