@media (max-width: 768px) {
  .desktop-main-ads {
    display: none;
  }
}

.technical-interview {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
  padding: 20px;
}

/* Sidebar */
.technical-interview .sidebar {
  width: 350px;
  flex-shrink: 0;
  border-radius: 8px;
  padding: 5px;
  text-decoration: none;
}

/* Section wrapper */
.sidebar .technology-choose {
  margin-bottom: 30px;
  padding: 20px 30px;
  border-radius: 10px;
  background-color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Technology list */
.sidebar .technology-choose ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .technology-choose ul li {
  margin-bottom: 10px;
}

.sidebar .technology-choose ul li a {
  display: block;
  padding: 6px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  color: #1877f2;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar .technology-choose ul li a:hover {
  background: linear-gradient(to right, #6366f1, #ec4899);
  color: white;
  transform: translateY(-2px);
}

/* other interviews sections aside */
.interview-right-side-section {
  margin-bottom: 20px;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.interview-right-side-section h4 {
  margin-top: 20px;
  font-size: 16px;
  color: #2662e4;
  border-left: #0076fd 3px solid;
  background: linear-gradient(to right, #6366f1, #ec4699);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-left: 6px;
}

.interview-right-side-section .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.interview-right-side-section .btn-link {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.interview-right-side-section .btn-link:hover {
  background: linear-gradient(to right, #6366f1, #ec4899);
  color: white;
}

  /* aside heading */

  /* Heading */
  .aside-heading {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    position: relative;
    display: inline-block;
  }

  /* Heading */
  .aside-heading h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
    /* gives space for line */
  }

  .aside-heading h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80%;
    /* half the text width */
    height: 2px;
    background: linear-gradient(to right, #989af7, #fa8d8d);
    border-radius: 2px;
  }


  /* Quick Links */

  .notes-aside-2 {
    margin-bottom: 20px;
    background-color: #ffffff;
    padding: 10px 10px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  /* List reset */
  .notes-aside-2 ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 2px;
  }

  /* List items */
  .notes-aside-2 li {
    background: transparent;
    border-radius: 8px;
    padding: 1px 8px;
    font-weight: 500;
    color: #1877f2;
    transition: background var(--transition), transform var(--transition);
  }

  /* Link styles */
  .notes-aside-2 a {
    display: block;
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.3;
    padding: 6px 8px;
    border-radius: 6px;
    position: relative;
    /* needed for ::after underline */
    transition: color var(--transition), background var(--transition),
      transform var(--transition);
    outline: none;
  }

  /* Underline effect */
  .notes-aside-2 a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: #1d43bf;
    /* brand color */
    transition: width 0.3s ease;
  }

  /* Hover & active */
  .notes-aside-2 li:hover,
  .notes-aside-2 a:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
  }

  .notes-aside-2 a:hover {
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .notes-aside-2 a:hover::after {
    width: 40%;
  }

  /* Focus state */
  .notes-aside-2 a:focus {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
    background: rgba(56, 189, 248, 0.03);
  }

  /* Muted text example — if you want small counts/tags */
  .notes-aside-2 .muted {
    color: var(--muted);
    font-size: 0.85rem;
    margin-left: 8px;
  }

  .notes-aside-2 ul li a::before {
    margin-right: 8px;
  }

  /* Scoped icons */
  .notes-aside-2 ul li:nth-child(1) a::before {
    content: "📝";
  }

  .notes-aside-2 ul li:nth-child(2) a::before {
    content: "💡";
  }

  .notes-aside-2 ul li:nth-child(3) a::before {
    content: "📄";
  }

  .notes-aside-2 ul li:nth-child(4) a::before {
    content: "🎓";
  }

  .notes-aside-2 ul li:nth-child(5) a::before {
    content: "💼";
  }

  .notes-aside-2 ul li:nth-child(6) a::before {
    content: "💻";
  }

  .notes-aside-2 ul li:nth-child(7) a::before {
    content: "🌍";
  }

  .notes-aside-2 ul li:nth-child(8) a::before {
    content: "🔥";
  }

  /* .notes-aside-3 */

  .notes-aside-3 {
    margin-bottom: 20px;
    background-color: #ffffff;
    padding: 10px 20px 20px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .notes-aside-3 a {
    text-decoration: none;
  }

  /* Grid layout */
  .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
  }

  /* Card styling */
  .project-card {
    background-color: #d6e3e9;
    border-radius: 12px;
    padding: 8px 1px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  }

  /* Icon styling */
  .project-card .icon {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  /* Title */
  .project-card h4 {
    font-weight: 500;
    font-size: 1rem;
    color: #1877f2;
    margin: 0;
  }

  .project-card h4:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
  }

  .project-card h4:hover {
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .project-card h4:hover::after {
    width: 40%;
  }

  /* notes-aside-4 */

  .notes-aside-5 {
    margin-bottom: 20px;
    background-color: #ffffff;
    padding: 10px 20px 20px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  /* Ebook grid inside section */
  .ebook-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 images per row */
    gap: 10px;
    /* spacing between items */
    margin-top: 12px;
  }

  .ebook-list a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    background-color: #d6e3e9;
  }

  .ebook-list a:hover {
    transform: translateY(-4px);
  }

  .ebook-list img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  /* ✅ Hide sidebar on phones */
  @media (max-width: 768px) {
    .main-side-layout {
      display: none;
    }

    .main-side-content {
      flex: 1;
      /* Take full width */
    }
  }



  /* section 6 Blog list aside */
  .notes-aside-6 {
    background-color: #ffffff;
    padding: 0px 20px 20px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .blog-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .blog-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: #000;
    transition: transform 0.2s ease;
  }

  .blog-item:hover {
    transform: translateY(-2px);
  }

  .blog-item img {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  }

  .blog-info {
    display: flex;
    flex-direction: column;
  }

  .blog-date {
    font-size: 0.8rem;
    color: #1877f2;
  }

  .blog-info p {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    color: #363333;
    margin: 0;
  }

/* Hide sidebar on small screens */
/* Hide by default */
.technology-choose-mobile,
.mobile-top-section {
  display: none;
}

/* PHONE + TABLET (max 768px) */
@media (max-width: 768px) {
  /* Hide sidebar */
  .technical-interview .sidebar {
    display: none;
  }

  /* Show Ads + Technology Section */
  .mobile-top-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
  }

  /* Heading */
  .mobile-top-heading {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* Ads style */
  .mobile-top-section .mobile-ads {
    padding: 10px;
    text-align: center;
  }

  /* Technology chooser */
  .technology-choose-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px 0;
  }

  .technology-choose-mobile button {
    flex: 1 1 calc(33.333% - 10px); /* 3 per row */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    color: #1877f2;
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .technology-choose-mobile button:hover {
    background: linear-gradient(to right, #6366f1, #ec4899);
    color: white;
    transform: translateY(-2px);
  }
}

/* Slightly bigger phones → 4 per row */
@media (min-width: 551px) and (max-width: 768px) {
  .technology-choose-mobile button {
    flex: 1 1 calc(25% - 10px); /* 4 per row */
  }
}

/* TABLET & DESKTOP (769px and up) */
@media (min-width: 769px) {
  .technical-interview .sidebar {
    display: block;
  }
  .technology-choose-mobile {
    display: none; /* Hide top chooser */
  }
}

/* Main content */
.technical-interview .main-content {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Responsive: Stack sidebar and main content on small screens */
@media (max-width: 768px) {
  .technical-interview {
    flex-direction: column; /* stack items */
    padding: 10px;
  }
  .technical-interview .sidebar {
    width: 100%; /* full width */
    margin-bottom: 20px; /* space between sidebar and content */
  }
  .technical-interview .main-content {
    width: 100%; /* full width */
  }
}

.main-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  background: linear-gradient(to right, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}


/* ---------- Tips section ---------- */

.interview-tips {
  max-width: 900px;
  margin: 0 auto 30px;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.interview-tips h3 {
  color: #27ae60;
  margin-bottom: 15px;
}

.interview-tips ul {
  list-style: disc inside;
  margin-left: 10px;
}

.interview-tips li {
  margin-bottom: 10px;
}

/* ---------- Questions wrapper ---------- */

.questions {
  max-width: 900px;
  margin: 0 auto 40px;
  background: #ffffff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.questions h3 {
  color: #2980b9;
  margin-bottom: 20px;
}

/* Ordered list styling: remove default numbers, use custom counter */
.questions ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: q-counter;
}

/* Each question card */
.questions li {
  counter-increment: q-counter;
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  position: relative;
  background: #ffffff;
  overflow: hidden;
}

/* bottom divider only on non-last items */
.questions li:not(:last-child) {
  margin-bottom: 24px;
}

/* Number badge on the top-right */
.questions li::before {
  content: "#" counter(q-counter);
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  padding: 3px 8px;
  border-radius: 999px;
}

/* Question text */
.questions li strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
  color: #5d68fd;
}

/* Answer text */
.questions li p {
  margin: 4px 0;
  line-height: 1.5;
  color: #111827;
}

/* Inline code in answers */
.questions li p code,
.questions li strong code {
  background: #f3f4f6;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e11d48;
  font-family: "Fira Code", Menlo, Monaco, Consolas, "Courier New", monospace;
}

/* Code block styling */
.questions pre {
  margin-top: 8px;
  padding: 10px 12px;
  background: #020617;
  color: #e5e7eb;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-family: "Fira Code", Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

/* Optional simple syntax colors if you wrap tokens with spans */
.questions pre span.kw { color: #22c55e; }   /* keyword */
.questions pre span.fn { color: #38bdf8; }   /* function name */
.questions pre span.str { color: #f97316; }  /* string */
.questions pre span.num { color: #eab308; }  /* number */
.questions pre span.cm  { color: #9ca3af; }  /* comment */

/* Highlighted text inside answers */
.questions p .highlight,
.questions li .highlight {
  background: rgba(250, 204, 21, 0.15);
  padding: 0 4px;
  border-radius: 4px;
  color: #b45309;
  font-weight: 600;
}

/* “Tip” and “Warning” callouts */
.questions .tip-box,
.questions .warn-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.questions .tip-box {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #065f46;
}

.questions .warn-box {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #b91c1c;
}

.questions .tip-box::before {
  content: "💡";
  flex-shrink: 0;
}

.questions .warn-box::before {
  content: "⚠️";
  flex-shrink: 0;
}

/* Small screen tweaks */
@media (max-width: 600px) {
  .interview-tips,
  .questions {
    padding: 14px;
  }

  .questions li {
    padding: 14px 14px;
  }
}

/* ---------- Dark Mode Styles ---------- */



/* ========== GLOBAL DARK MODE ========== */
body.dark-mode {
  background-color: #0b1623; /* deeper navy for eye comfort */
  color: #d6deeb;
  transition: background 0.3s ease, color 0.3s ease;
}
body.dark-mode .cs-navbar-menu li a{
  color: #2e2d2d;
}
/* ========== MAIN CONTENT ========== */
body.dark-mode .main-content {
  background-color: #122235;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}

/* ========== SIDEBARS & SECTIONS ========== */
body.dark-mode .notes-aside-2,
body.dark-mode .notes-aside-3,
body.dark-mode .notes-aside-5,
body.dark-mode .notes-aside-6,
body.dark-mode .interview-right-side-section,
body.dark-mode .questions,
body.dark-mode .sidebar .language-choose,
body.dark-mode .interview-tips,
body.dark-mode .technology-choose,
body.dark-mode .blog-item {
  background-color: #122235;
  border: 1px solid #1e324b;
}

/* ========== LINKS ========== */
body.dark-mode a {
  color: #7aa2ff;
}

body.dark-mode a:hover {
  color: #ffffff;
}

/* ========== BUTTONS & TAGS ========== */
body.dark-mode .btn-link,
body.dark-mode .language-choose-mobile button,
body.dark-mode .project-card,
body.dark-mode .ebook-list a {
  background-color: #1a2b42;
  border: 1px solid #2e4560;
  color: #d6deeb;
  transition: all 0.25s ease;
}

body.dark-mode .btn-link:hover,
body.dark-mode .language-choose-mobile button:hover,
body.dark-mode .project-card:hover,
body.dark-mode .ebook-list a:hover {
  background: linear-gradient(135deg, #5a82f7, #f254a0);
  color: #ffffff;
  border-color: transparent;
}

/* ========== HEADINGS ========== */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #eef2ff;
}

/* ========== CODE BLOCKS ========== */
body.dark-mode code {
  background: #1a2b42;
  color: #ff9d8a;
  padding: 3px 6px;
  border-radius: 4px;
}

body.dark-mode pre {
  background: #020617;
  border: 1px solid #334155;
  color: #e5e7eb;
  border-radius: 8px;
}

/* ========== HIGHLIGHTS & CALLOUTS ========== */
body.dark-mode .questions .highlight {
  background: rgba(250, 204, 21, 0.15);
  color: #fde68a;
  padding: 2px 6px;
  border-radius: 4px;
}

body.dark-mode .questions .tip-box {
  background: rgba(34, 197, 94, 0.15);
  border-left: 4px solid #22c55e;
  color: #bbf7d0;
}

body.dark-mode .questions .warn-box {
  background: rgba(239, 68, 68, 0.15);
  border-left: 4px solid #ef4444;
  color: #fecaca;
}
body.dark-mode .questions li{
  background-color: #142433;
  color: white;
}
body.dark-mode .questions p{
  color: rgb(223, 221, 221);
}
/* ========== BLOG TEXT ========== */
body.dark-mode .blog-item p,
body.dark-mode .blog-date {
  color: #c7d2fe;
}

/* ========== FLOATING DARK MODE BUTTON ========== */
#darkModeBtn {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #5a82f7, #f254a0);
  color: #ffffff;
  border: none;
  border-radius: 0 10px 10px 0;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 18px;
  z-index: 9999;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#darkModeBtn:hover {
  transform: translateY(-50%) scale(1.1);
  opacity: 0.95;
}
