:root {
  color-scheme: dark;
  --bg: #020711;
  --surface: rgba(6, 15, 29, 0.9);
  --surface-2: #081426;
  --line: rgba(53, 217, 255, 0.2);
  --text: #eff9ff;
  --muted: #94aabd;
  --cyan: #35d9ff;
  --green: #39ff88;
  --pink: #ff2aa3;
  --warning: #ffd166;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(53,217,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,217,255,.028) 1px, transparent 1px),
    radial-gradient(circle at 83% 3%, rgba(255,42,163,.12), transparent 28rem);
  background-size: 52px 52px, 52px 52px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  animation: gridMove 28s linear infinite;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1,h2,h3,h4,p { margin-top: 0; }
h1,h2,h3,h4 { line-height: 1.08; }
p { line-height: 1.72; }
button,input,select { font: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { position:sticky; top:0; z-index:100; border-bottom:1px solid var(--line); background:rgba(2,7,17,.9); backdrop-filter:blur(18px); }
.nav { min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand { display:flex; align-items:center; gap:13px; font-weight:850; }
.brand img { width:48px; height:48px; object-fit:cover; border:1px solid rgba(255,42,163,.48); box-shadow:0 0 22px rgba(255,42,163,.22); }
.nav-links { display:flex; align-items:center; gap:6px; }
.nav-links a { padding:10px 12px; color:var(--muted); font-size:.9rem; }
.nav-links a:hover,.nav-links a.active { color:white; background:rgba(53,217,255,.07); }
.menu-button { display:none; padding:10px 13px; border:1px solid var(--line); background:transparent; color:white; }
.eyebrow,.control-label { color:var(--green); font:700 .75rem/1.5 "JetBrains Mono",Consolas,monospace; text-transform:uppercase; }
.directory-hero { position:relative; overflow:hidden; padding:100px 0 82px; border-bottom:1px solid var(--line); background:linear-gradient(100deg,rgba(3,10,22,.97),rgba(3,10,22,.74)),url("../img/cyber-hero.png") center/cover no-repeat; }
.directory-hero::after,.guide-hero::after { content:""; position:absolute; inset:auto 0 0; height:110px; background:linear-gradient(transparent,var(--bg)); }
.directory-hero-grid { position:relative; z-index:1; display:grid; grid-template-columns:1.2fr .8fr; gap:70px; align-items:center; }
.directory-hero h1,.guide-hero h1 { margin:14px 0 20px; max-width:850px; font-size:clamp(3rem,6vw,6rem); text-shadow:0 0 30px rgba(53,217,255,.13); }
.directory-hero p,.guide-hero p { max-width:720px; color:#cbdbe7; font-size:1.08rem; }
.directory-console { padding:24px; border:1px solid var(--line); background:rgba(3,9,19,.83); box-shadow:0 25px 55px rgba(0,0,0,.4),0 0 28px rgba(53,217,255,.09); font-family:"JetBrains Mono",Consolas,monospace; }
.directory-console code { color:var(--cyan); }.directory-console strong { display:block; margin:24px 0 10px; color:var(--green); }.directory-console span { color:var(--muted); font-size:.78rem; }
.section { padding:76px 0; }
.tool-toolbar { display:flex; gap:12px; margin-bottom:26px; }
.tool-toolbar input,.tool-toolbar select,.guide-search input { min-height:46px; border:1px solid var(--line); background:rgba(3,9,19,.9); color:white; padding:11px 13px; }
.tool-toolbar input { flex:1; }.tool-toolbar input:focus,.tool-toolbar select:focus,.guide-search input:focus { outline:none; border-color:var(--cyan); box-shadow:0 0 0 3px rgba(53,217,255,.08); }
.tool-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px; }
.tool-card { position:relative; overflow:hidden; min-height:290px; padding:28px; border:1px solid var(--line); background:linear-gradient(135deg,rgba(53,217,255,.035),rgba(255,42,163,.025)),var(--surface); box-shadow:0 18px 45px rgba(0,0,0,.28); transition:.22s ease; }
.tool-card:hover { transform:translateY(-6px); border-color:rgba(53,217,255,.5); box-shadow:0 24px 52px rgba(0,0,0,.36),0 0 32px rgba(53,217,255,.11); }
.tool-card::before { content:attr(data-code); position:absolute; right:18px; top:16px; color:rgba(53,217,255,.13); font:900 2.5rem "JetBrains Mono",Consolas,monospace; }
.tool-card h2 { position:relative; margin:16px 0 12px; font-size:1.65rem; }
.tool-card p { max-width:650px; color:var(--muted); }
.tool-card-meta,.tool-meta { display:flex; flex-wrap:wrap; gap:7px; }
.chip { padding:6px 9px; border:1px solid rgba(53,217,255,.2); color:#c8edf5; font:.7rem "JetBrains Mono",Consolas,monospace; }
.chip.green { color:var(--green); border-color:rgba(57,255,136,.3); }
.btn { display:inline-flex; justify-content:center; align-items:center; min-height:44px; padding:11px 16px; border:1px solid rgba(53,217,255,.34); background:rgba(53,217,255,.07); color:white; font-weight:800; cursor:pointer; transition:.2s ease; }
.btn:hover { transform:translateY(-2px); border-color:var(--cyan); box-shadow:0 0 22px rgba(53,217,255,.15); }
.btn.primary { border-color:transparent; background:linear-gradient(135deg,var(--pink),#7550ff 50%,var(--cyan)); box-shadow:0 0 25px rgba(255,42,163,.24); }
.btn.ghost { background:rgba(2,7,17,.56); }
.tool-card .btn { margin-top:10px; }
.guide-hero { position:relative; overflow:hidden; padding:92px 0 110px; border-bottom:1px solid var(--line); background:linear-gradient(100deg,rgba(2,7,17,.97),rgba(2,7,17,.68)),url("../img/cyber-hero.png") center/cover no-repeat; }
.guide-grid { position:absolute; inset:0; background-image:linear-gradient(rgba(53,217,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(53,217,255,.035) 1px,transparent 1px); background-size:50px 50px; }
.guide-hero-layout { position:relative; z-index:2; display:grid; grid-template-columns:1.15fr .85fr; gap:70px; align-items:center; }
.guide-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:27px; }
.tool-meta { margin-top:23px; }
.tool-console { border:1px solid rgba(53,217,255,.3); background:#030912; box-shadow:0 25px 65px rgba(0,0,0,.45),0 0 32px rgba(53,217,255,.09); }
.console-head { display:flex; align-items:center; gap:7px; padding:12px 14px; border-bottom:1px solid var(--line); background:#07101e; }
.console-head span { width:9px; height:9px; border-radius:50%; background:#ff6058; }.console-head span:nth-child(2){background:#ffbd2e}.console-head span:nth-child(3){background:#28c840}
.console-head b { margin-left:auto; color:var(--muted); font:.65rem "JetBrains Mono",Consolas,monospace; }
.console-body { padding:28px; font-family:"JetBrains Mono",Consolas,monospace; }.console-body code { color:var(--cyan); }.console-body strong { display:block; margin:25px 0 16px; color:var(--green); }.console-body small { color:var(--muted); }
.console-meter { height:5px; margin-bottom:14px; background:rgba(255,255,255,.08); overflow:hidden; }.console-meter i { display:block; width:88%; height:100%; background:linear-gradient(90deg,var(--green),var(--cyan)); animation:meter 2.4s ease-in-out infinite alternate; }
.guide-workspace { display:grid; grid-template-columns:280px minmax(0,1fr); gap:24px; padding-top:42px; padding-bottom:82px; align-items:start; }
.guide-sidebar { position:sticky; top:92px; display:grid; gap:18px; padding:18px; border:1px solid var(--line); background:rgba(4,12,24,.91); max-height:calc(100vh - 112px); overflow:auto; }
.guide-search { display:grid; gap:7px; color:var(--muted); font-size:.75rem; }.guide-search input { width:100%; min-width:0; }
.difficulty-selector { display:grid; gap:7px; }
.difficulty-selector button { min-height:40px; padding:9px 11px; border:1px solid rgba(53,217,255,.14); background:#020711; color:var(--muted); font-weight:800; cursor:pointer; text-align:left; }
.difficulty-selector button.active { color:#02100a; border-color:var(--green); background:linear-gradient(135deg,var(--green),var(--cyan)); box-shadow:0 0 20px rgba(57,255,136,.18); }
.progress-panel { padding:14px; border:1px solid rgba(53,217,255,.12); background:rgba(2,7,17,.64); }
.progress-panel > div:first-child { display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:.74rem; }.progress-panel strong { color:var(--green); }
.progress-track { height:4px; margin:12px 0; background:rgba(255,255,255,.08); }.progress-track span { display:block; width:0; height:100%; background:linear-gradient(90deg,var(--green),var(--cyan)); transition:width .3s; }
.text-button { border:0; padding:0; background:transparent; color:var(--cyan); cursor:pointer; font-size:.72rem; }
.section-nav { display:grid; gap:3px; }.section-nav a { padding:8px 9px; border-left:2px solid transparent; color:var(--muted); font-size:.76rem; }.section-nav a:hover { color:white; border-left-color:var(--green); background:rgba(57,255,136,.04); }
.guide-content { display:grid; gap:14px; min-width:0; }
.guide-section { overflow:hidden; border:1px solid var(--line); background:var(--surface); transition:.2s; scroll-margin-top:95px; }
.guide-section[open] { border-color:rgba(53,217,255,.4); box-shadow:0 20px 45px rgba(0,0,0,.27),0 0 25px rgba(53,217,255,.06); }
.guide-section > summary { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:14px; align-items:center; min-height:74px; padding:15px 20px; cursor:pointer; list-style:none; }.guide-section > summary::-webkit-details-marker{display:none}
.section-index { color:var(--green); font:800 .72rem "JetBrains Mono",Consolas,monospace; }.guide-section summary h2 { margin:0; font-size:1.08rem; }.guide-section summary span:last-child { color:var(--cyan); font-size:.7rem; text-transform:uppercase; }
.section-body { padding:0 22px 25px 82px; border-top:1px solid rgba(53,217,255,.09); animation:reveal .3s ease; }.section-body > p { color:#b7c9d6; }
.content-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }.content-box { padding:16px; border:1px solid rgba(53,217,255,.1); background:rgba(2,8,17,.56); }.content-box h3 { color:var(--cyan); font-size:.78rem; text-transform:uppercase; }.content-box p,.content-box li { color:#afc2d0; font-size:.88rem; line-height:1.65; }.content-box ul,.content-box ol { margin:0; padding-left:18px; }
.command-block { margin:18px 0; border:1px solid rgba(57,255,136,.2); background:#02070d; }.command-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 13px; border-bottom:1px solid rgba(57,255,136,.14); color:var(--green); font:.68rem "JetBrains Mono",Consolas,monospace; text-transform:uppercase; }.copy-command { border:0; background:transparent; color:var(--cyan); cursor:pointer; font:700 .65rem "JetBrains Mono",Consolas,monospace; text-transform:uppercase; }.command-block pre { margin:0; padding:18px; overflow:auto; color:#d8f7e4; font:.84rem/1.8 "JetBrains Mono",Consolas,monospace; }
.safe-note,.takeaway { margin:16px 0; padding:16px; border-left:3px solid var(--warning); background:rgba(255,209,102,.04); color:#c7d4de; }.takeaway { border-left-color:var(--green); background:rgba(57,255,136,.04); }.safe-note strong,.takeaway strong { display:block; margin-bottom:6px; color:white; }
.visual-placeholder { display:grid; place-items:center; min-height:190px; margin:17px 0; border:1px dashed rgba(53,217,255,.28); background:linear-gradient(rgba(53,217,255,.025),rgba(2,7,17,.7)),repeating-linear-gradient(0deg,transparent,transparent 19px,rgba(53,217,255,.03) 20px); color:var(--muted); text-align:center; }.visual-placeholder strong { display:block; color:var(--cyan); margin-bottom:7px; }
.quiz { display:grid; gap:14px; }.quiz-card { padding:16px; border:1px solid rgba(53,217,255,.12); background:rgba(2,8,17,.62); }.quiz-card p { margin-bottom:11px; color:white; }.quiz-options { display:grid; gap:7px; }.quiz-options label { display:flex; gap:8px; color:var(--muted); cursor:pointer; }.quiz-options input { accent-color:var(--green); }.reveal-answer { margin-top:12px; padding:7px 10px; border:1px solid rgba(53,217,255,.22); background:transparent; color:var(--cyan); cursor:pointer; }.quiz-answer { display:none; margin-top:10px; color:#c8ded2; }.quiz-answer.visible { display:block; }
.faq-list { display:grid; gap:9px; }.faq-item { border:1px solid rgba(53,217,255,.12); background:rgba(2,8,17,.58); }.faq-item summary { padding:14px 16px; cursor:pointer; color:#e5f4fc; font-weight:750; }.faq-item p { margin:0; padding:0 16px 16px; color:var(--muted); }
.section-complete { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:20px; padding-top:18px; border-top:1px solid rgba(53,217,255,.1); }.section-complete span { color:var(--muted); font-size:.78rem; }.complete-button.done { color:#021009; background:var(--green); border-color:var(--green); }
.related-band { border-top:1px solid var(--line); background:rgba(4,12,24,.68); }.section-heading h2 { margin:9px 0 24px; font-size:2.2rem; }.related-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }.related-card { padding:20px; border:1px solid var(--line); background:var(--surface); }.related-card p { color:var(--muted); font-size:.86rem; }
footer { padding:30px 0; border-top:1px solid var(--line); color:var(--muted); }footer .shell{display:flex;justify-content:space-between;gap:20px}footer strong{color:white}
.empty-state { grid-column:1/-1; padding:50px; border:1px solid var(--line); color:var(--muted); text-align:center; }
@keyframes gridMove { to { background-position:104px 52px,52px 104px,0 0; } }
@keyframes meter { from { width:52%; } to { width:94%; } }
@keyframes reveal { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:none; } }
@media (max-width:950px) {
  .directory-hero-grid,.guide-hero-layout { grid-template-columns:1fr; }.directory-console,.tool-console{max-width:640px}
  .guide-workspace{grid-template-columns:1fr}.guide-sidebar{position:static;max-height:none}.section-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
  .related-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:700px) {
  .nav{flex-wrap:wrap;padding:12px 0}.menu-button{display:block}.nav-links{display:none;width:100%;flex-direction:column;align-items:stretch}.nav.open .nav-links{display:flex}
  .directory-hero,.guide-hero{padding:64px 0 80px}.directory-hero h1,.guide-hero h1{font-size:clamp(2.7rem,13vw,4rem)}
  .tool-grid,.content-grid,.related-grid{grid-template-columns:1fr}.tool-toolbar{flex-direction:column}
  .guide-workspace{width:min(100% - 22px,1180px)}.section-nav{display:none}.guide-section>summary{grid-template-columns:36px 1fr;padding:14px}.guide-section summary span:last-child{display:none}.section-body{padding:0 14px 20px}
  .difficulty-selector{grid-template-columns:repeat(3,1fr)}.difficulty-selector button{text-align:center;padding:8px 4px;font-size:.72rem}
  .section-complete{align-items:stretch;flex-direction:column}.section-complete .btn{width:100%}footer .shell{flex-direction:column}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}
