article {
  --img-scale: 1.001;
  --title-color: black;
  --link-icon-translate: -20px;
  --link-icon-opacity: 0;
  position: relative;
  border-radius: 16px;
  box-shadow: none;
  background: #fff;
  transform-origin: center;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
  --link-icon-translate: 0;
  --link-icon-opacity: 1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  margin-bottom: 1rem;
}

article a::after {
  position: absolute;
  inset-block: 0;
  inset-inline: 0;
  cursor: pointer;
  content: "";
}

/*basic article elements styling*/
article h2 {
  margin: 0 0 18px 0;
  color: var(--title-color);
  transition: color 0.3s ease-out;
}

figure {
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
}

article img {
  max-width: 100%;
  transform-origin: center;
  transform: scale(var(--img-scale));
  transition: transform 0.4s ease-in-out;
}

.article-body {
  padding: 24px;
}

article a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #28666e;
}

article a:focus {
  outline: 1px dotted #28666e;
}

article a .icon {
  min-width: 24px;
  width: 24px;
  height: 24px;
  margin-left: 5px;
  transform: translateX(var(--link-icon-translate));
  opacity: var(--link-icon-opacity);
  transition: all 0.3s;
}

/*using the has() relational pseudo selector to update our custom properties*/
article:has(:hover, :focus) {
  --img-scale: 1.1;
}

/************************
Generic layout (demo looks)
**************************/
*,
*::before,
*::after {
  box-sizing: border-box;
}

.articles {
  display: grid;
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 32px;
  margin-top: 2rem;
}

@media screen and (max-width: 960px) {
  article {
    container: card/inline-size;
  }

  .article-body p {
    display: none;
  }
}

@container card (min-width: 380px) {
  .article-wrapper {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
  }

  .article-body {
    padding-left: 0;
  }

  figure {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: grid;
    place-items: center;
  }

  figure img {
    /* height: 100%;
    width: 100%; */
    vertical-align: middle;
  }
}

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  /* clip-path: inset(50%); */
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.project-title-nav {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
}

/* Layout adjustment for Side-by-Side */
.main-content-body {
  margin-left: 0;
  /* Default to full width (e.g. homepage) */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Apply margin only when sidebar is active on PC */
@media screen and (min-width: 769px) {
  .has-sidebar .main-content-body {
    margin-left: 280px;
  }
}

/* Open sidebar by default on PC only if it exists */
@media screen and (min-width: 769px) {
  .has-sidebar .sidebar:not(.collapsed) {
    transform: translateX(0);
  }
}

/* Fix for content being cut off by the sticky header globally */
.main-content-body {
  padding-top: 3.5rem;
}

.has-sidebar .main-content-body {
  padding-top: 4rem;
  /* Additional breathing room on desktop with sidebar */
}

.has-sidebar .sidebar.collapsed+.main-content-body {
  margin-left: 0;
}

/* Ensure header and main content align in the new space */
.main-content-body .page-header,
.main-content-body .main-content {
  width: 100%;
  padding: 1rem 1rem;
}

.has-sidebar .main-content-body .page-header,
.has-sidebar .main-content-body .main-content {
  max-width: 1100px;
  /* Constrain width when sidebar is present for better readability */
  margin-left: auto;
  margin-right: auto;
}

/* On homepage/pages without sidebar, allow the header to span full width */
body:not(.has-sidebar) .page-header {
  max-width: none;
  text-align: center;
  padding: 4rem 2rem;
}

body:not(.has-sidebar) .main-content {
  max-width: 64rem;
  /* Use more of the screen on the landing page/cheat sheets */
  margin-left: auto;
  margin-right: auto;
}

/* For pages where there is no sidebar, reset margin */
/* Handled by .has-sidebar class above */

/* Sidebar styles */
.sidebar {
  color: #1a202c;
  position: fixed;
  top: 3.5rem;
  /* Start below the sticky header */
  left: 0;
  bottom: 0;
  width: 280px;
  background-color: #f7fafc;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s;
  z-index: 1000;
  overflow-y: auto;
  border-right: 1px solid #e2e8f0;
  transform: translateX(-100%);
  /* Hidden by default */
}

.sidebar.collapsed {
  transform: translateX(-100%);
  box-shadow: none;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f7fafc;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Toggle button styles */
.toggle-sidebar {
  display: none !important;
  font-size: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s;
  align-items: center;
  justify-content: center;
}

.toggle-sidebar:hover {
  background-color: #f7fafc;
}

.toggle-sidebar:focus {
  outline: none;
}

.close-sidebar {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #718096;
  line-height: 1;
  padding: 0.5rem;
  z-index: 2002;
}

.close-sidebar:hover {
  color: #2d3748;
}

/* Navigation styles */
.section-nav {
  padding: 1.5rem 1rem;
  margin: 0;
  list-style: none;
}

.section-nav a {
  display: block;
  color: #4a5568;
  text-decoration: none;
  padding: 8px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  margin-bottom: 2px;
}

.section-nav a:hover {
  color: #2d3748;
  background-color: #edf2f7;
  padding-left: 20px;
  /* Subtle slide effect */
}

.section-nav a.active {
  background-color: #ffffff;
  color: #159957 !important;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  position: relative;
}

.section-nav strong {
  display: block;
  padding: 10px 12px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a0aec0;
  font-weight: 700;
}

/* Sidebar General Elements */
.sidebar-category-title {
  padding: 1.5rem 1.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #718096;
  letter-spacing: 0.05em;
}

.sidebar-divider {
  height: 1px;
  background-color: #e2e8f0;
  margin: 1.5rem 1.5rem;
}

/* Visibility Helpers */
@media screen and (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

/* Mobile Dropdown styles */
.mobile-dropdown {
  padding: 0 1rem;
}

.mobile-dropdown-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 15px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a5568;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.mobile-dropdown-btn:hover {
  background-color: #edf2f7;
}

.mobile-dropdown-btn .chevron {
  transition: transform 0.3s;
}

.mobile-dropdown-btn .chevron.rotated {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.mobile-dropdown-content {
  display: none;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

.mobile-dropdown-content.open {
  display: block;
  animation: slideDown 0.3s ease-out;
}

.mobile-dropdown-content a {
  display: block;
  padding: 8px 15px;
  font-size: 0.9rem;
  color: #718096;
  text-decoration: none;
  border-radius: 6px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sub-navigation styles */
.section-nav ul {
  padding-left: 0;
  margin-top: 2px;
  margin-bottom: 8px;
  list-style: none;
  border-left: 1px solid #e2e8f0;
  margin-left: 18px;
}

.section-nav ul li a {
  font-size: 0.85rem;
  font-weight: 400;
  padding: 6px 12px;
  color: #718096;
  border-radius: 0 6px 6px 0;
  margin-left: -1px;
  /* Overlap the border-left */
}

.section-nav ul li a:hover {
  background-color: #ffffff;
  color: #2d3748;
}

.section-nav ul li a.active {
  background-color: #ffffff;
  color: #159957 !important;
  font-weight: 600;
  border-left: 2px solid #159957;
  border-radius: 0 6px 6px 0;
  margin-left: -2px;
  /* Pull left to cover border */
  box-shadow: none;
}


@media screen and (max-width: 768px) {
  .sidebar {
    width: 280px;
    top: 3.5rem;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
    box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.1);
  }

  .has-sidebar .main-content-body {
    padding-top: 3.5rem !important;
    /* Reset additional breathing room on mobile */
  }

  .toggle-sidebar {
    margin-left: 8px;
    display: flex !important;
    position: relative;
    width: 40px;
    height: 40px;
  }

  /* Change icon when sidebar is open */
  body:has(.sidebar:not(.collapsed)) .toggle-sidebar::before {
    content: "\2715";
    /* X icon */
    font-size: 1.5rem;
  }

  body:has(.sidebar.collapsed) .toggle-sidebar::before {
    content: "\2630";
    /* Hamburger icon */
    font-size: 1.5rem;
  }

  /* Hide the original text/icon if any */
  .toggle-sidebar {
    font-size: 0;
  }

  .close-sidebar {
    display: none !important;
    /* Remove individual close button */
  }

  .section-nav {
    padding-top: 1rem !important;
    /* Reset padding */
  }
}

/* Hide toggle button on desktop if you want it always open,
   or keep it if you want users to be able to hide it */
@media screen and (min-width: 769px) {
  .sidebar.collapsed {
    transform: translateX(-100%);
  }
}

/* The sticky class is added to the navbar with JS when it reaches its scroll position */
.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #ffffff;
  height: 3.5rem;
  z-index: 1001;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #edf2f7;
}

.sticky-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.sticky-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.2s;
}

.site-logo-link:hover {
  opacity: 0.85;
  text-decoration: none !important;
}

.site-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #159957 0%, #157878 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(21, 153, 87, 0.2);
  transform: rotate(-4deg);
  /* Trendy slight tilt */
}

.site-name {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #2d3748;
  /* Dark Charcoal for "Note" */
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  background: linear-gradient(to right, #2d3748 60%, #159957 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Adjusting the dot-less look */
.site-name::after {
  display: none !important;
}

.site-breadcrumb-separator {
  color: #cbd5e0;
  font-size: 1.25rem;
  margin: 0 0.25rem;
}

.page-project-title {
  color: #718096;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

@media screen and (max-width: 960px) {

  .page-project-title,
  .site-breadcrumb-separator {
    display: none;
  }
}

/* Global Nav Styles */
.global-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
  margin-right: 3rem;
}

.nav-item {
  text-decoration: none;
  color: #4a5568;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

.nav-item:hover {
  color: #159957;
}

/* Dropdown Logic */
.dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown-btn {
  background: none;
  border: none;
  color: #4a5568;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-btn:hover {
  color: #159957;
}

.chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.2s;
}

.dropdown:hover .chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 220px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #edf2f7;
  border-radius: 8px;
  padding: 0.5rem 0;
  z-index: 1002;
  margin-top: 0;
}

.dropdown:hover .dropdown-content {
  display: block;
  animation: slideIn 0.2s ease-out;
}

.dropdown-content a {
  color: #4a5568;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.dropdown-content a:hover {
  background-color: #f7fafc;
  color: #159957;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 768px) {
  .global-nav {
    display: none;
    /* Hide global nav links on mobile, they can be added to the sidebar if needed */
  }

  .sticky-container {
    padding: 0 1rem;
  }

  .site-name {
    font-size: 1.1rem;
  }
}

/* AdBlock Detected! CSS  Start */
.img {
  height: 2rem;
  width: 2rem;
}

.adp {
  display: flex;
  box-sizing: border-box;
  flex-flow: column;
  position: fixed;
  z-index: 99999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22rem;
  height: 20rem;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 5px;
  align-items: center;
}

.adp h2 {
  border-bottom: 1px solid #eee;
  margin: 0;
  padding: 15px 0;
}

.adp p {
  flex-grow: 1;
}

.adp a {
  display: block;
  text-decoration: none;
  width: 100%;
  background-color: #366ed8;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  color: #ffffff;
  border-radius: 5px;
}

.adp a:hover {
  background-color: #3368cc;
}

.adp-underlay {
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 99998;
}

details summary {
  cursor: pointer;
  background: #159957b5;
  color: white;
  border-radius: 1rem;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

/* AdBlock Detected! CSS  End */

ul {
  display: block;
  list-style-type: disc;
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
  padding-inline-start: 20px;
  unicode-bidi: isolate;
}

/* 404 Page Styles */
.not-found-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.not-found-content {
  max-width: 600px;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #159957 0%, #157878 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.error-message {
  font-size: 2rem;
  color: #2d3748;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.error-description {
  font-size: 1.1rem;
  color: #718096;
  margin-bottom: 2.5rem;
}

.back-home-btn {
  background-color: #159957 !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 12px 30px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  border: none !important;
  font-size: 1.05rem !important;
  box-shadow: 0 4px 6px rgba(21, 153, 87, 0.2) !important;
  text-decoration: none !important;
  display: inline-block;
}

.back-home-btn:hover {
  background-color: #157878 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(21, 153, 87, 0.3) !important;
}

.hide-star {
  display: none;
}
