body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0d0d0d;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #00aaff;
    text-align: center;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #00aaff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.disclaimer {
    background: rgba(0, 170, 255, 0.05); /* softened cyan tint */
    color: #d4f3ff; /* slightly brighter than body text for emphasis */
    border: 1px solid rgba(0, 170, 255, 0.25);
    border-left: 4px solid #c77dff; /* purple accent on leading edge */
    border-radius: 8px;
    padding: 14px 16px;
    margin: 20px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.question {
    background: rgba(0, 170, 255, 0.08);
    border-left: 4px solid #00aaff;
    padding: 12px 16px;
    margin: 1.5rem 0 0.5rem;
    border-radius: 6px;
    color: #b4e9ff;
    font-weight: 600;
}

/* Answer block following a question */
.answer {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #0077cc;
    padding: 12px 16px;
    margin: 0 0 1.5rem;
    border-radius: 6px;
    color: #d0eaff;
}
.disclaimer strong {
    color: #c77dff !important; /* purple for emphasis */
}

img {
  max-width: 100%; /* prevents stretching beyond container */
  height: auto;    /* keeps aspect ratio */
}

/* Content images (screenshots) - subtle framing */
section img,
.walkthrough-content img,
article img {
  border: 1px solid #30363d;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin: 1rem 0;
  transition: box-shadow 0.2s ease-in-out;
}

section img:hover,
.walkthrough-content img:hover,
article img:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
/* Terminal-style header typing */
.step {
    color: #c77dff;           /* Neon purple */
    font-weight: 600;         /* Slightly bold for visibility */
    letter-spacing: 0.5px;    /* Terminal spacing feel */
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'SF Mono', 'Monaco', 'Inconsolata', 'Consolas', 'Courier New', monospace;
}
.note {
  color: #c9d1d9;              /* light text for dark background */
  font-size: 15px;
  background: #0d1117;         /* subtle dark block */
  border-left: 3px solid #58a6ff; /* blue accent line */
  padding: 10px 14px;
  border-radius: 6px;
    margin: 10px 0;
  line-height: 1.5;
    /* Make background fit text (not full width) */
    display: inline-block;
    max-width: min(100%, 68ch);
    overflow-wrap: anywhere;
}

.note code {
  background: #161b22;
  color: #79c0ff;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'SF Mono', 'Monaco', 'Inconsolata', 'Consolas', monospace;
}

.note strong {
  color: #a5d6ff;
}

.terminal-title {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'Consolas', "Liberation Mono", "Courier New", monospace;
    color: #00aaff;
    font-size: 1.25rem;
    font-weight: 700; /* stronger terminal look */
    display: inline-flex;
    align-items: center;
    gap: 0.5ch;
    margin: 0;
    background: #000; /* black background behind the terminal title area */
    padding: 0.35rem 0.6rem; /* subtle breathing room */
    border-radius: 0; /* sharp edges */
}

.terminal-title .prompt {
    opacity: 0.9;
}

.terminal-title .typed {
    letter-spacing: 0.02em;
}

.terminal-title .cursor {
    width: 0.6ch;
    height: 1.15em;
    background: #00aaff;
    display: inline-block;
    border-radius: 1px;
    animation: cursor-blink 2s steps(1, end) infinite; /* slower blink */
}

/* Ensure no theme injects symbols like './' before the title */
.terminal-title::before,
.terminal-title::after {
    content: none !important;
}

.terminal-title .cursor.stopped {
    animation: none;
}

@keyframes cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

header h1 {
    font-size: 1.25rem;
    margin: 0;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 0.85rem;
    color: #00aaff;
    margin-top: 0.25rem;
}

section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

h2 {
    color: #00aaff;
    border-left: 4px solid #00aaff; /* soft cyan border */
    padding-left: 10px;
    font-size: 1.8rem;
    font-weight: 700; /* heavier heading weight */
}

h3 {
    color: #00a0e6; /* slightly muted cyan-blue */
    margin-top: 2rem;
    font-weight: 600;
    text-shadow: none !important; /* ensure no theme glow on h3 */
}

ul {
    list-style-type: square;
    margin-left: 1.5rem;
}

strong {
    color: #00aaff; /* softer cyan for emphasized inline text */
}

/* Defender and Red Teamer specific styling */
.step.defender {
    color: #1e90ff !important;
}

.step.redteam {
    color: #ff6b6b !important;
}

.step.pentester {
    color: #ff6b6b !important;
}

/* Purple text class for specific headings */
.purple-text {
    color: #c77dff;
}

/* Section grouping for better visual separation */
section > h3 {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

/* Container for grouped content under each h3 heading */
section > h3 ~ p,
section > h3 ~ ul,
section > h3 ~ ol,
section > h3 ~ pre,
section > h3 ~ .question,
section > h3 ~ .answer,
section > h3 ~ .note,
section > h3 ~ .disclaimer {
    background: rgba(0, 170, 255, 0.03);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    margin-left: 0;
}

/* Special styling for defender sections */
h3:has(.step.defender) ~ ul,
h3:has(.step.defender) ~ p {
    background: rgba(30, 144, 255, 0.05);
    border-left: 3px solid #1e90ff;
    margin-left: 0;
    padding-left: 1.25rem;
}

/* Special styling for red teamer sections */
h3:has(.step.redteam) ~ ul,
h3:has(.step.redteam) ~ p {
    background: rgba(255, 107, 107, 0.05);
    border-left: 3px solid #ff6b6b;
    margin-left: 0;
    padding-left: 1.25rem;
}

/* Special styling for pentester sections */
h3:has(.step.pentester) ~ ul,
h3:has(.step.pentester) ~ p {
    background: rgba(255, 107, 107, 0.05);
    border-left: 3px solid #ff6b6b;
    margin-left: 0;
    padding-left: 1.25rem;
}

/* Step sections background */
h3:has(.step:not(.defender):not(.redteam):not(.pentester)) ~ p,
h3:has(.step:not(.defender):not(.redteam):not(.pentester)) ~ ul,
h3:has(.step:not(.defender):not(.redteam):not(.pentester)) ~ pre,
h3:has(.step:not(.defender):not(.redteam):not(.pentester)) ~ .note {
    background: rgba(199, 125, 255, 0.04);
    border-left: 3px solid #c77dff;
    margin-left: 0;
    padding-left: 1.25rem;
}

footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #00aaff;
    font-size: 0.9rem;
    color: #00aaff;
    background-color: #111;
    position: relative;
}

/* Sticky footer only on the index page */
body.page-index {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.page-index > footer {
    margin-top: auto;
}

.pillar {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.18);
    margin-bottom: 2rem;
    transition: transform 0.2s ease-in-out;
}

.pillar:hover {
    transform: scale(1.02);
}

a {
    color: #00aaff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Utility */
.hidden {
    display: none !important;
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 1rem auto 0;
    border: 1px solid #00aaff;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.nav-toggle-label:hover {
    background: rgba(0, 170, 255, 0.1);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 1.4rem;
    height: 2px;
    background-color: #00aaff;
    border-radius: 1px;
    transition: transform 0.2s ease-in-out;
}

.nav-toggle-icon {
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle-icon::before {
    top: -6px;
}

.nav-toggle-icon::after {
    top: 6px;
}

.nav-toggle:checked + .nav-toggle-label .nav-toggle-icon {
    background-color: transparent;
}

.nav-toggle:checked + .nav-toggle-label .nav-toggle-icon::before {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label .nav-toggle-icon::after {
    transform: translateY(-6px) rotate(-45deg);
}

.pillar-menu {
    display: none;
    margin-top: 1rem;
}

.nav-toggle:checked + .nav-toggle-label + .pillar-menu {
    display: block;
}

.pillar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #111;
    border: 1px solid #00aaff;
    border-radius: 0.6rem;
    overflow: hidden;
}

.pillar-menu li + li {
    border-top: 1px solid rgba(0, 170, 255, 0.2);
}

.pillar-menu a {
    display: block;
    padding: 0.75rem 1rem;
}

.pillar-menu a:hover {
    background-color: rgba(0, 170, 255, 0.1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Footer social links in bottom-left */
.social-links {
    position: absolute;
    left: 1rem;
    bottom: 0.75rem;
    display: inline-flex;
    gap: 0.6rem;
    align-items: center;
}

.social-links .social {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,170,255,0.35);
    border-radius: 8px;
    background: rgba(0, 170, 255, 0.06);
    transition: background 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.social-links .social:hover {
    background: rgba(0,170,255,0.12);
    border-color: rgba(0,170,255,0.55);
    box-shadow: 0 0 8px rgba(0,170,255,0.25);
}

.social-links .social svg path { fill: #00aaff; }
.social-links .social:hover svg path { fill: #0094d6; }

/* Sidebar hamburger button on the side */
.hamburger-btn {
    position: fixed;
    left: 0.75rem;
    top: 0.25rem;
    transform: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #00aaff;
    background: rgba(0, 170, 255, 0.06);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hamburger-btn:hover {
    background: rgba(0, 170, 255, 0.12);
    box-shadow: 0 0 8px rgba(0,170,255,0.25);
}

/* Hide hamburger when sidebar is open (X is available inside sidebar) */
body.sidebar-open .hamburger-btn {
    display: none;
}

.hamburger-icon, .hamburger-icon::before, .hamburger-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background: #00aaff;
    border-radius: 1px;
    position: relative;
}

.hamburger-icon::before, .hamburger-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: #0f0f0f;
    border-right: 1px solid rgba(0,184,217,0.25);
    box-shadow: 2px 0 16px rgba(0,0,0,0.6);
    transform: translateX(-110%);
    transition: transform 0.25s ease-in-out;
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0,184,217,0.15);
    position: relative;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #00aaff;
}

/* Close (X) button inside sidebar */
.sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #00aaff;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    z-index: 2;
}

.sidebar-close:hover {
    background: transparent;
    box-shadow: none;
    text-shadow: none; /* removed glow */
}

.sidebar-close:focus-visible {
    outline: 2px solid #00aaff;
    text-shadow: none; /* removed glow */
}

.sidebar-content {
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
}

/* Sidebar navigation */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li + li {
    border-top: 1px solid rgba(0,184,217,0.12);
}

.sidebar-nav a {
    display: block;
    padding: 0.6rem 0.5rem;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 6px;
}

.sidebar-nav a:hover {
    background: rgba(0,170,255,0.08);
    color: #00aaff;
}

.sidebar-nav a[aria-current="page"] {
    background: rgba(0,170,255,0.12);
    color: #00aaff;
}

/* Submenu (Writeups dropdown) */
.sidebar-nav .has-submenu { position: relative; }
.submenu-toggle {
    width: 100%;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font: inherit;
    padding: 0.6rem 0.5rem 0.6rem 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    border-radius: 6px;
    text-align: left;
    position: relative;
    transition: background .2s ease-in-out, color .2s ease-in-out;
}
.submenu-toggle:hover { background: rgba(0,170,255,0.08); color: #00aaff; }
.submenu-toggle:focus-visible { outline: 2px solid #00aaff; outline-offset: 2px; }
.submenu-toggle[aria-expanded="true"] { background: rgba(0,170,255,0.06); }

.submenu-toggle .arrow {
    display: inline-block;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid currentColor; /* caret */
    transform: rotate(-90deg);
    transition: transform .25s ease;
    filter: none; /* remove glow */
}
.submenu-toggle[aria-expanded="true"] .arrow { transform: rotate(0deg); }

ul.submenu {
    list-style: none;
    margin: 0 0 0 -1rem;
    padding: 0 0 0.4rem 0.35rem;
}
ul.submenu li a {
    padding: 0.45rem 0.5rem;
    font-size: 0.9rem;
    border-radius: 4px;
    white-space: nowrap;
}
ul.submenu li a:hover { background: rgba(0,170,255,0.1); }

.sidebar .sidebar-nav li,
.sidebar .sidebar-nav .submenu li {
    list-style: none;
}
.sidebar .sidebar-nav li::marker { content: ''; }
.sidebar .sidebar-nav li::before,
.sidebar .sidebar-nav a::before,
.sidebar .sidebar-nav li::after,
.sidebar .sidebar-nav a::after {
    content: none;
}

/* Remove symbols from certification nav list on vector3 */
#certifications nav ul { list-style: none; margin: 0; padding: 0; }
#certifications nav li::marker { content: ''; }
#certifications nav li::before,
#certifications nav a::before,
#certifications nav li::after,
#certifications nav a::after { content: none; }

/* Add purple arrow tips to all list items */
ul, ol {
    list-style: none;
    padding-left: 0;
}
ul li, ol li {
    list-style: none;
    list-style-image: none;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}
ul li::before, ol li::before {
    content: '▸';
    color: #c77dff;
    font-size: 1.1em;
    position: absolute;
    left: 0;
    top: 0;
}
ul li::marker, ol li::marker {
    content: '';
}
ul a::before,
ul li::after, ul a::after,
ol a::before,
ol li::after, ol a::after {
    content: none;
}

/* Slightly increase size for certification quick links and section headings */
#certifications nav a {
    font-size: 1.1rem; /* subtle bump for in-page nav items */
    line-height: 1.45;
}

/* Certification quick nav styling */
#certifications nav {
    margin: 1rem 0 2rem;
    background: rgba(0,170,255,0.05); /* subtle cyan-tinted panel */
    border: 1px solid rgba(0,170,255,0.25);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    display: inline-flex; /* shrink-wrap to content */
    gap: 0.25rem;
    box-shadow: 0 0 10px rgba(0,170,255,0.08);
    backdrop-filter: blur(2px); /* slight glass feel */
}

/* Purple color for "Recommended Resources" headings */
#certifications h4 {
    color: #c77dff !important;
}

#certifications nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}

#certifications nav li { margin: 0; }

#certifications nav a {
    position: relative;
    display: inline-block;
    padding: 0.55rem 0.85rem 0.55rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #8ecde8; /* softer text colour */
    background: linear-gradient(145deg, rgba(0, 170, 255, 0.05), rgba(0, 170, 255, 0.02)); /* Darker, subtler background */
    border: 1px solid rgba(0, 170, 255, 0.2);
    box-shadow: 0 0 0 rgba(0,170,255,0.0);
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease, border-color .18s ease, color .18s ease;
}

#certifications nav a:hover,
#certifications nav a:focus-visible {
    background: linear-gradient(145deg, rgba(0, 170, 255, 0.12), rgba(0, 170, 255, 0.06));
    border-color: rgba(0, 170, 255, 0.4);
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.25);
    color: #b4e9ff;
    transform: translateY(-2px);
    text-decoration: none; /* override global underline */
}

#certifications nav a:active {
    transform: translateY(0);
    background: linear-gradient(145deg, rgba(0,170,255,0.22), rgba(0,170,255,0.12));
}

/* Optional current anchor highlight if needed (add class .current to link) */
#certifications nav a.current {
    background: linear-gradient(145deg, rgba(0,170,255,0.28), rgba(0,170,255,0.14));
    border-color: rgba(0,170,255,0.65);
    box-shadow: 0 0 10px rgba(0,170,255,0.4);
    color: #c9f4ff;
}

#certifications h3 {
    font-size: 1.35rem; /* slightly larger section headings */
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(0,170,255,0.15);
    font-size: 0.85rem;
    color: #00aaff;
}

/* Backdrop */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Layout shift when sidebar open on larger screens */
@media (min-width: 768px) {
    body.sidebar-open {
        padding-left: 300px; /* room for 280px sidebar + gap */
    }

    .sidebar-backdrop {
        display: none; /* no overlay on desktop */
    }
}

/* Ensure consistent placement on wider screens */
@media (min-width: 768px) {
    .hamburger-btn { top: 0.25rem; }
}

/* Code block styling - Markdown style */
pre.code-block, pre {
    background: #161b22;
    border: 1px solid #30363d;
    border-left: 3px solid #6B46C1;
    padding: 1rem 1.25rem 1rem 40px; /* Extra left padding to clear copy icon */
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #6B46C1 #161b22;
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-right: 0;
    /* margin-left is set in the copy button section below */
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

pre.code-block:hover, pre:hover {
    border-left-color: #ff8787;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

pre.code-block code, pre code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'SF Mono', 'Monaco', 'Inconsolata', 'Consolas', 'Courier New', monospace;
    display: block;
    white-space: pre;
    color: #c9d1d9;
    background: transparent;
    padding: 0;
    padding-left: 0; /* Text positioning handled by parent pre element */
}

/* Inline code styling - Markdown style */
code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'SF Mono', 'Monaco', 'Inconsolata', 'Consolas', 'Courier New', monospace;
    background: #161b22;
    color: #ff8787;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    border: 1px solid #30363d;
}

pre code {
    background: transparent;
    padding: 0;
    border: none;
    font-size: 0.9rem;
}

/* PowerShell code highlighting */
code.language-powershell {
    color: #79c0ff;
}

/* Ordered list styling - Markdown style */
ol {
    counter-reset: item;
    padding-left: 0;
}

ol li {
    counter-increment: item;
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 0.75rem;
}

ol li::before {
    content: counter(item) ".";
    color: #ff6b6b;
    font-weight: 600;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1em;
}

/* Override the purple arrow for ol items */
ol li::before {
    content: counter(item) "." !important;
}

/* Optional custom scrollbar (WebKit) */
pre.code-block::-webkit-scrollbar, pre::-webkit-scrollbar {
    height: 10px;
}
pre.code-block::-webkit-scrollbar-track, pre::-webkit-scrollbar-track {
    background: #161b22;
}
pre.code-block::-webkit-scrollbar-thumb, pre::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 6px;
}
pre.code-block::-webkit-scrollbar-thumb:hover, pre::-webkit-scrollbar-thumb:hover {
    background: #0094d6;
}
/* Question and Answer styling */
.question {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 170, 255, 0.08);
    border-left: 4px solid #00aaff;
    border-radius: 6px;
}

.question strong {
    color: #00aaff;
    font-size: 1.1rem;
    font-weight: 600;
}

.answer {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 170, 255, 0.03);
    border-left: 2px solid rgba(0, 170, 255, 0.3);
    border-radius: 4px;
    line-height: 1.7;
}

.answer ol, .answer ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Difficulty level color coding */
.difficulty-easy {
    color: #3fb950;
    font-weight: 600;
}

.difficulty-medium {
    color: #d29922;
    font-weight: 600;
}

.difficulty-hard {
    color: #f85149;
    font-weight: 600;
}

/* Mobile-specific footer adjustments */
@media (max-width: 768px) {
    footer {
        padding-bottom: 3.5rem; /* Add extra padding at bottom for social links */
        padding-top: 0.5rem;
    }

    footer p {
        margin-top: 0;
        margin-bottom: 2.5rem; /* Push text up more to avoid social buttons */
        position: relative;
        z-index: 1; /* Ensure text is above social icons if they overlap */
    }

    .social-links {
        bottom: 0.5rem; /* Position social links at the very bottom */
    }
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #30363d;
    color: #00aaff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(0, 170, 255, 0.15);
    border-color: #00aaff;
    box-shadow: 0 4px 16px rgba(0, 170, 255, 0.25);
    color: #33bbff;
}

.back-to-top:focus-visible {
    outline: 2px solid #00aaff;
    outline-offset: 2px;
}

.back-to-top:active {
    transform: scale(0.95);
}

/* Mobile adjustments for back to top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   Copy to Clipboard Button for Code Blocks
   ============================================ */

pre {
    position: relative;
}

.copy-btn {
    position: absolute;
    left: 6px;
    top: 6px;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 12px;
    line-height: 1;
    font-family: inherit;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #6e7681;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.copy-btn:hover {
    opacity: 1;
    color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
}

.copy-btn:focus-visible {
    outline: 1px solid #00aaff;
    opacity: 1;
}

.copy-btn.copied {
    opacity: 1;
    color: #3fb950;
}

/* Touch devices */
@media (hover: none) {
    .copy-btn {
        opacity: 0.5;
    }
}

/* ============================================
   Search Box and Results
   ============================================ */

.search-container {
    position: relative;
    max-width: 320px;
    width: 100%;
    margin-left: auto;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 170, 255, 0.35);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

.search-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: #00aaff;
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.3);
}

/* Search icon (magnifying glass) */
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button {
    display: none;
}

.search-container::after {
    content: "\1F50D"; /* 🔍 magnifying glass */
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: rgba(0, 170, 255, 0.6);
    pointer-events: none;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background: #0f0f0f;
    border: 1px solid rgba(0, 170, 255, 0.35);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    z-index: 1100;
    scrollbar-width: thin;
    scrollbar-color: #00aaff #161b22;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #161b22;
}

.search-results::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #0094d6;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 170, 255, 0.15);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item:focus {
    background: rgba(0, 170, 255, 0.1);
    outline: none;
}

.search-result-item.focused {
    background: rgba(0, 170, 255, 0.15);
}

.search-result-title {
    font-weight: 600;
    color: #00aaff;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.search-result-category {
    font-size: 0.75rem;
    color: #c77dff;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-description {
    font-size: 0.85rem;
    color: #a0a0a0;
    line-height: 1.4;
}

/* Section-level search results (Page > Section format) */
.search-result-section-item {
    border-left: 2px solid rgba(199, 125, 255, 0.4);
}

.search-result-section-item .search-result-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.search-result-page {
    color: #a0a0a0;
    font-weight: 400;
    font-size: 0.85rem;
}

.search-result-separator {
    color: #c77dff;
    font-size: 0.85rem;
    margin: 0 0.1rem;
}

.search-result-section {
    color: #00aaff;
    font-weight: 600;
}

.search-result-keywords {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.search-keyword-tag {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(199, 125, 255, 0.15);
    border: 1px solid rgba(199, 125, 255, 0.3);
    border-radius: 3px;
    font-size: 0.7rem;
    color: #c77dff;
}

.search-keyword-tag.highlighted {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
    color: #ff8787;
    font-weight: 600;
}

.search-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #a0a0a0;
    font-size: 0.9rem;
}

.search-no-results::before {
    content: "\26A0\FE0F"; /* ⚠️ */
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Mobile adjustments for search */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 0.5rem;
    }

    .search-container {
        max-width: 100%;
        order: 3;
        margin-top: 0.5rem;
        margin-left: 0;
    }

    .terminal-title {
        font-size: 1rem;
    }

    .search-results {
        max-height: 300px;
    }
}

/* Desktop: position search in top right */
@media (min-width: 769px) {
    header {
        justify-content: center;
    }

    .search-container {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        max-width: 280px;
    }
}

