/* ----------  GLOBAL  ---------- */
:root {
  --bg-dark: #1e1e1e;
  --bg-light: #f4f4f4;
  --tile-dark: #272727;
  --tile-light: #ffffff;
  --text-dark: #cccccc;
  --text-light: #111111;
  --accent: #4cd964;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  text-align: justify;
  font-size: large;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-dark);
  transition: background 0.3s, color 0.3s;
}

body.light-mode {
  background: var(--bg-light);
  color: var(--text-light);
}

/* ----------  SIDE BACKGROUND IMAGES  ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 320px;
  /* sidebar width */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
  opacity: 1;
  /* subtle */
}

body::before {
  left: 0;
  background-image: url("background.png");
}

body::after {
  right: 0;
  background-image: url("background.png");
}

/* ----------  HEADER FIXED ELEMENTS  ---------- */
.logo {
  position: fixed;
  top: 0.8rem;
  left: 2rem;
  font-weight: 700;
  font-size: 1.1rem;
  z-index: 1000;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  pointer-events: none;
}
.classification{
  position: fixed;
  top: 0.8rem;
  left: 50%;
  font-weight: 700;
  transform: translateX(-50%);
  font-weight: bold;
  color: #000;
  font-size: 1.2rem;
  letter-spacing: 1px;
  background: white;
  padding: 0.3em 1em;
  border: 2px solid blue;
  border-radius: 6px;
}

body.light-mode .classification{
  background: rgba(255, 255, 255, 0.65);
  color: #000;
}

body.light-mode .logo {
  background: rgba(255, 255, 255, 0.65);
  color: #000;
}

/* ----------  THEME TOGGLE SWITCH  ---------- */
.switch {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 52px;
  height: 30px;
  z-index: 1000;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 34px;
  transition: 0.4s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background: gray;
  border-radius: 50%;
  transition: 0.4s;
}

.slider::after {
  content: "☾";
  position: absolute;
  font-size: 14px;
  top: 50%;
  left: 75%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: #111;
}

input:checked+.slider {
  background: #ffd700;
}

input:checked+.slider::before {
  transform: translateX(22px);
}

input:checked+.slider::after {
  content: "☼";
  left: 28%;
}

/* ----------  TILE LAYER  ---------- */
.tile-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--tile-dark);
  padding: 2rem 6%;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
}

body.light-mode .tile-wrapper {
  background: var(--tile-light);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.15);
}

/* ----------  CONTENT STYLES  ---------- */
h1,
h2,
h3 {
  margin-top: 2rem;
  color: #e0e0e0;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3 {
  color: #2c3e50;
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem;
  background: #333;
  color: #fff;
  border-radius: 4px;
  margin-bottom: 1rem;
}

body.light-mode summary {
  background: #e0e0e0;
  color: #111;
}

details {
  margin-bottom: 2rem;
}

.finding {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

img.screenshot{
  max-width: 800px;
  border-radius: 6px;
  margin: 1rem 0;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  border: 3px solid #888;
  padding: 6px 10px;
  text-align: left;
}

body.light-mode table th,
body.light-mode table td {
  border-color: #bbb;
}

.toc a {
  color: inherit;
  text-decoration: none;
}

.toc-list {
  counter-reset: section;
  list-style: none;
  padding-left: 0;
}

.toc-list>li {
  counter-increment: section;
  margin: 0.3rem 0;
}

.toc-list>li::before {
  content: counter(section) ". ";
  font-weight: bold;
}

.toc-list>li>ol {
  counter-reset: subsection;
  list-style: none;
  padding-left: 1.5rem;
  margin-top: 0.25rem;
}

.toc-list>li>ol>li {
  counter-increment: subsection;
  margin: 0.2rem 0;
}

.toc-list>li>ol>li::before {
  content: counter(section) "." counter(subsection) " ";
  font-weight: normal;
  margin-right: 0.3rem;
}

.company-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.company-logo img {
  width: 610px;
  height: 610px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid purple;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
}

/*Code Snippet Styling*/

pre,
code {
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  border-radius: 6px;
}

pre {
  padding: 1rem;
  margin: 1rem 0;
  background-color: #1e1e1e;
  color: #f8f8f2;
  border: 1px solid #444;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

body.light-mode pre {
  background-color: #f7f7f7;
  color: #333;
  border-color: #ccc;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
}

pre code {
  display: block;
}

code:not(pre > code){
  background-color:var(--bg-light);
  color: var(--text-light);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.95em;
  white-space: nowrap;
}

body.light-mode code:not(pre > code) {
  background-color:var(--bg-dark);
  color:var(--text-dark);
}

/* Optional scrollbar tweaking */
pre::-webkit-scrollbar {
  height: 8px;
}

pre::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
  background: #555;
}

@media print {

  .switch,
  .logo {
    display: none;
  }

  body::before,
  body::after {
    display: none;
  }

  .tile-wrapper {
    box-shadow: none;
  }
}
