/* =========================
   DevSecOps Derek — Modern Styles (Brand Locked)
   Brand Blue: #81C2E4
   Charcoal:   #36454F
========================= */

/* ---------- Theme Tokens ---------- */
:root{
  --brand-blue:#81C2E4;
  --charcoal-gray:#36454F;

  --bg:var(--charcoal-gray);
  --text:#EAF7FF;
  --muted:rgba(234,247,255,0.72);

  --panel:rgba(255,255,255,0.06);
  --panel-2:rgba(255,255,255,0.09);
  --border:rgba(129,194,228,0.28);

  --shadow:0 14px 40px rgba(0,0,0,0.35);
  --radius:18px;
  --focus:0 0 0 3px rgba(129,194,228,0.38);

  --container:min(1100px, calc(100% - 2rem));
}

body.light-mode{
  --bg:#bec2cb;
  --text:#151B54;
  --muted:rgba(21,27,84,0.72);

  --panel:rgba(21,27,84,0.06);
  --panel-2:rgba(21,27,84,0.09);
  --border:rgba(21,27,84,0.22);

  --shadow:0 12px 30px rgba(9,14,28,0.12);
  --focus:0 0 0 3px rgba(21,27,84,0.25);
}

/* ---------- Base Reset ---------- */
*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; }
.hidden{ display:none; }

body{
  font-family:'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.55;
  transition:background-color 0.35s ease, color 0.35s ease;
}

.container{ width:var(--container); margin:0 auto; }

.muted{ color:var(--muted); }
.micro{ font-size:0.86rem; }

/* ---------- Background Gradient ---------- */
.bg-gradient{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(900px 520px at 12% 10%, rgba(129,194,228,0.28), transparent 60%),
    radial-gradient(720px 460px at 88% 20%, rgba(129,194,228,0.18), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.12));
}

body.light-mode .bg-gradient{
  background:
    radial-gradient(900px 520px at 12% 10%, rgba(129,194,228,0.18), transparent 60%),
    radial-gradient(720px 460px at 88% 20%, rgba(21,27,84,0.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.0), rgba(21,27,84,0.06));
}

/* ---------- Accessibility ---------- */
.skip-link{
  position:absolute;
  left:-999px;
  top:10px;
  background:var(--text);
  color:var(--bg);
  padding:10px 14px;
  border-radius:10px;
  z-index:9999;
  text-decoration:none;
  font-weight:800;
}
.skip-link:focus{ left:12px; outline:none; box-shadow:var(--focus); }

/* ---------- Header / Nav ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  backdrop-filter:blur(12px);
  background:linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.0));
}

body.light-mode .site-header{
  background:linear-gradient(to bottom, rgba(238,242,247,0.72), rgba(238,242,247,0.0));
}

.nav-shell{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 1rem;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  min-width:230px;
}

.brand-mark{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--panel);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

.brand-text{ display:grid; line-height:1.1; }
.brand-name{ font-weight:900; letter-spacing:0.3px; }
.brand-tag{ font-size:0.78rem; color:var(--muted); }

.top-nav{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
}

.nav-links{
  display:flex;
  gap:18px;
  list-style:none;
  margin:0;
  padding:0;
}

.nav-links a{
  text-decoration:none;
  font-weight:900;
  font-size:0.86rem;
  letter-spacing:0.8px;
  text-transform:uppercase;
  padding:10px 10px;
  border-radius:12px;
}
.nav-links a:hover{ background:var(--panel); }
.nav-links a:focus{ outline:none; box-shadow:var(--focus); }

.hamburger{
  display:none;
  width:46px;
  height:46px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
  box-shadow:var(--shadow);
}
.hamburger span{
  display:block;
  height:2px;
  width:20px;
  margin:5px auto;
  background:currentColor;
  opacity:0.9;
}

.theme-toggle{
  width:46px;
  height:46px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
  box-shadow:var(--shadow);
  display:grid;
  place-items:center;
}
.theme-toggle:hover{ background:var(--panel-2); }
.theme-toggle:focus{ outline:none; box-shadow:var(--focus); }

/* ---------- Drawer ---------- */
.backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  z-index:1001;
}

.drawer{
  position:fixed;
  top:0;
  right:0;
  height:100%;
  width:min(360px, 90vw);
  background:rgba(15,20,24,0.92);
  border-left:1px solid var(--border);
  backdrop-filter:blur(12px);
  transform:translateX(110%);
  transition:transform 0.25s ease;
  z-index:1002;
  padding:14px;
}
body.light-mode .drawer{ background:rgba(238,242,247,0.92); }
.drawer.open{ transform:translateX(0); }

.drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 6px 14px;
}
.drawer-close{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  cursor:pointer;
}
.drawer-close:hover{ background:var(--panel-2); }
.drawer-close:focus{ outline:none; box-shadow:var(--focus); }

.drawer-body{ display:grid; gap:8px; padding:6px; }

.drawer-link{
  text-decoration:none;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid transparent;
}
.drawer-link:hover{ background:var(--panel); border-color:var(--border); }
.drawer-link:focus{ outline:none; box-shadow:var(--focus); }

.drawer-divider{
  height:1px;
  background:var(--border);
  margin:10px 0;
  opacity:0.75;
}

.drawer-group summary{
  cursor:pointer;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  font-weight:900;
}
.drawer-group summary:hover{ background:var(--panel-2); }

.drawer-sub{
  display:grid;
  gap:6px;
  padding:10px 12px 6px;
}
.drawer-sub a{
  text-decoration:none;
  padding:10px 10px;
  border-radius:12px;
}
.drawer-sub a:hover{ background:var(--panel-2); }

/* ---------- Sections ---------- */
.hero{ padding:70px 0 22px; }
.kicker{
  color:var(--muted);
  letter-spacing:1.2px;
  text-transform:uppercase;
  font-size:0.84rem;
  margin:0 0 10px;
}
.hero-title{
  font-size:clamp(3rem, 9vw, 5.6rem);
  margin:0;
  letter-spacing:0.4px;
  font-weight:900;
}
.hero-subtitle{
  margin:10px 0 20px;
  color:var(--muted);
  font-size:clamp(1.02rem, 2.4vw, 1.25rem);
  max-width:64ch;
}

.panel{ padding:46px 0; }
.panel-head h2{
  margin:0;
  font-size:1.7rem;
  letter-spacing:0.4px;
}
.panel-head p{ margin:8px 0 0; color:var(--muted); }

.brand-quote{
  font-family:'Playfair Display', serif;
  font-size:clamp(1.2rem, 3vw, 1.8rem);
  font-style:italic;
  line-height:1.35;
  margin:22px 0 26px;
  padding:16px 18px;
  border-left:4px solid rgba(129,194,228,0.85);
  background:var(--panel);
  border-radius:14px;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

/* ---------- Buttons ---------- */
.cta-row{ display:flex; gap:12px; flex-wrap:wrap; margin:18px 0 18px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--panel);
  text-decoration:none;
  font-weight:900;
  cursor:pointer;
}
.btn:hover{ background:var(--panel-2); }
.btn:focus{ outline:none; box-shadow:var(--focus); }

.btn.primary{
  background:rgba(129,194,228,0.18);
  border-color:rgba(129,194,228,0.55);
}
.btn.ghost{ background:transparent; }
.btn.small{ padding:10px 12px; }

/* ---------- Stats ---------- */
.stat-row{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:18px;
}
.stat{
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--panel);
  padding:14px;
  box-shadow:var(--shadow);
}
.stat-top{ font-weight:900; letter-spacing:0.6px; }
.stat-bottom{ color:var(--muted); font-size:0.9rem; margin-top:6px; }

/* ---------- Cards ---------- */
.card-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top:18px;
}

.card-grid.three{ grid-template-columns:repeat(3, minmax(0, 1fr)); }

/* Tools should be TWO columns on desktop */
.card-grid.tools-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items:stretch;
}

.card{
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--panel);
  padding:16px;
  box-shadow:var(--shadow);
}

.card h3{ margin:0 0 8px; font-size:1.05rem; }
.card p{ margin:0; color:rgba(234,247,255,0.75); }
body.light-mode .card p{ color:rgba(21,27,84,0.72); }

.link-card{
  text-decoration:none;
  transition:transform 0.12s ease;
}
.link-card:hover{ transform:translateY(-2px); }
.link-card:focus{ outline:none; box-shadow:var(--focus); }

.meta{ display:block; margin-top:12px; color:var(--muted); font-size:0.86rem; }

/* ---------- Tools ---------- */
.tool-card .tool-head{ margin-bottom:12px; }

.tool-row{
  display:grid;
  grid-template-columns:1fr 2fr auto;
  gap:10px;
  align-items:center;
  margin:10px 0;
}

.alias-row-single{
  grid-template-columns:1fr;
}

.tool-row input[type="range"]{ width:100%; }

.tool-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:12px 0 14px;
}

.check{ display:flex; align-items:center; gap:10px; color:var(--muted); }

.tool-out{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:10px;
  align-items:center;
}

.tool-out input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(0,0,0,0.18);
  color:var(--text);
}
body.light-mode .tool-out input{ background:rgba(255,255,255,0.7); }

.tool-out input:focus{
  outline:none;
  box-shadow:var(--focus);
}

.meter{ margin-top:12px; }
.meter-bar{
  height:10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(129,194,228,0.12);
  width:0%;
  transition:width 0.2s ease;
}
.meter-text{ margin-top:8px; color:var(--muted); font-size:0.92rem; }

/* ---------- Footer ---------- */
.site-footer{ padding:30px 0 40px; }

.foot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  color:var(--muted);
}

.footer-name{ font-weight:800; }
.footer-sdlc{ margin-left:auto; text-align:right; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .nav-links{ display:none; }
  .hamburger{ display:inline-block; }
  .card-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .stat-row{ grid-template-columns:1fr; }
}

@media (max-width: 620px){
  .card-grid, .card-grid.three{ grid-template-columns:1fr; }
  .card-grid.tools-grid{ grid-template-columns:1fr; }
  .brand{ min-width:unset; }
  .brand-tag{ display:none; }
  .tool-grid{ grid-template-columns:1fr; }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; }
}
