/* ==========================================================
   Asif's Security Notes
   Custom MkDocs Material Theme
   ========================================================== */

:root {
  --am-cyan: #00e5ff;
  --am-cyan-soft: #67f4ff;
  --am-cyan-dark: #009fb3;
  --am-red: #ff334f;

  --am-bg: #080c11;
  --am-bg-deep: #05080c;
  --am-surface: #0e151d;
  --am-surface-light: #131d27;
  --am-border: #21303d;
}

/* ==========================================================
   DARK THEME
   ========================================================== */

[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--am-bg);
  --md-default-fg-color: #d8e0e8;
  --md-default-fg-color--light: #aab5c0;
  --md-default-fg-color--lighter: #73808d;

  --md-primary-fg-color: #05080c;
  --md-primary-bg-color: #ffffff;

  --md-accent-fg-color: var(--am-cyan);

  --md-code-bg-color: #05090d;
  --md-code-fg-color: #dce5ed;

  --md-typeset-a-color: var(--am-cyan);
}

/* ==========================================================
   HEADER
   ========================================================== */

.md-header {
  background: rgba(5, 8, 12, 0.98);
  border-bottom: 1px solid var(--am-border);
  box-shadow: none;
}

.md-header__title {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.md-header__button.md-logo {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.md-header__button.md-logo img {
  width: auto;
  height: 2.2rem;
  object-fit: contain;
}

/* ==========================================================
   NAVIGATION TABS
   ========================================================== */

.md-tabs {
  background: #05080c;
  border-bottom: 1px solid var(--am-border);
}

.md-tabs__link {
  font-weight: 600;
  opacity: 0.72;
  transition:
    color 0.15s ease,
    opacity 0.15s ease;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  color: var(--am-cyan);
  opacity: 1;
}

/* ==========================================================
   LEFT NAVIGATION
   ========================================================== */

.md-nav__title {
  font-weight: 700;
}

.md-nav__link {
  transition: color 0.15s ease;
}

.md-nav__link:hover {
  color: var(--am-cyan);
}

.md-nav__link--active {
  color: var(--am-cyan);
  font-weight: 700;
}

/* ==========================================================
   MAIN PAGE
   ========================================================== */

.md-main {
  background:
    radial-gradient(
      circle at 75% 5%,
      rgba(0, 229, 255, 0.04),
      transparent 32rem
    ),
    var(--am-bg);
}

.md-content {
  max-width: 100%;
}

.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.025em;
}

.md-typeset h2 {
  margin-top: 2em;
  padding-bottom: 0.35rem;

  border-bottom: 1px solid var(--am-border);

  font-weight: 700;
}

.md-typeset h3 {
  font-weight: 700;
}

/* ==========================================================
   LINKS
   ========================================================== */

.md-typeset a {
  transition: color 0.15s ease;
}

.md-typeset a:hover {
  color: var(--am-cyan-soft);
}

/* ==========================================================
   HOMEPAGE HERO
   ========================================================== */

.security-hero {
  margin-top: 0;
  margin-bottom: 2rem;
}

.security-hero > p:first-child {
  margin-top: 0;
}

.security-hero > p:first-child img {
  display: block;

  width: 100%;
  max-height: 500px;

  object-fit: cover;

  border: 1px solid var(--am-border);
  border-radius: 0.65rem;

  box-shadow:
    0 0 30px rgba(0, 229, 255, 0.08),
    0 15px 40px rgba(0, 0, 0, 0.4);
}

.hero-intro {
  margin-top: 1.75rem;
}

.hero-intro h1 {
  margin-bottom: 0.7rem;
}

/* ==========================================================
   SECURITY BADGES
   ========================================================== */

.security-badge {
  display: inline-block;

  margin:
    0.25rem
    0.3rem
    0.25rem
    0;

  padding:
    0.32rem
    0.68rem;

  border:
    1px solid
    rgba(0, 229, 255, 0.45);

  border-radius: 999px;

  color: var(--am-cyan);

  background:
    rgba(0, 229, 255, 0.05);

  font-family:
    "Roboto Mono",
    monospace;

  font-size: 0.68rem;

  font-weight: 700;

  letter-spacing: 0.045em;
}

/* ==========================================================
   HOMEPAGE CARDS
   ========================================================== */

.md-typeset .grid.cards > ul > li {
  background:
    linear-gradient(
      145deg,
      rgba(17, 24, 33, 0.82),
      rgba(8, 12, 17, 0.82)
    );

  border: 1px solid var(--am-border);

  border-radius: 0.55rem;

  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color:
    rgba(0, 229, 255, 0.65);

  transform:
    translateY(-3px);

  box-shadow:
    0 10px 30px
    rgba(0, 229, 255, 0.07);
}

.md-typeset .grid.cards .lg {
  color: var(--am-cyan);
}

/* ==========================================================
   CODE
   ========================================================== */

.md-typeset code {
  border-radius: 0.3rem;
}

.md-typeset pre > code {
  border:
    1px solid
    var(--am-border);

  border-radius: 0.5rem;
}

.highlight {
  border-radius: 0.5rem;
}

.md-clipboard:hover {
  color: var(--am-cyan);
}

/* ==========================================================
   TERMINAL
   ========================================================== */

.terminal {
  margin: 1.2rem 0;

  padding: 1rem 1.2rem;

  background:
    #05080b;

  border:
    1px solid
    var(--am-border);

  border-left:
    3px solid
    var(--am-cyan);

  border-radius: 0.45rem;

  font-family:
    "Roboto Mono",
    monospace;

  color: #dce5ed;
}

.terminal::before {
  content: "root@security-notes:~$";

  display: block;

  margin-bottom: 0.65rem;

  color: var(--am-cyan);

  font-weight: 700;
}

/* ==========================================================
   RED TEAM ACCENT
   ========================================================== */

.red-team {
  padding-left: 1rem;

  border-left:
    3px solid
    var(--am-red);
}

/* ==========================================================
   TABLES
   ========================================================== */

.md-typeset table:not([class]) {
  border:
    1px solid
    var(--am-border);

  border-radius: 0.4rem;
}

.md-typeset table:not([class]) th {
  background:
    var(--am-surface);
}

/* ==========================================================
   ADMONITIONS
   ========================================================== */

.md-typeset .admonition,
.md-typeset details {
  border-radius: 0.45rem;
}

/* ==========================================================
   SEARCH
   ========================================================== */

.md-search__form {
  border:
    1px solid
    var(--am-border);

  border-radius: 0.4rem;
}

.md-search__input:focus {
  border-color: var(--am-cyan);
}

/* ==========================================================
   TEXT SELECTION
   ========================================================== */

::selection {
  background:
    rgba(0, 229, 255, 0.25);
}

/* ==========================================================
   SCROLLBAR
   ========================================================== */

[data-md-color-scheme="slate"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-track {
  background: #05080c;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: #273440;
  border-radius: 10px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: #354554;
}

/* ==========================================================
   FOOTER
   ========================================================== */

.md-footer {
  background: #05080c;

  border-top:
    1px solid
    var(--am-border);
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media screen and (max-width: 76.234375em) {

  .md-nav__source {
    background: #05080c;
  }

  .security-hero > p:first-child img {
    border-radius: 0.4rem;
  }
}
