/* ═══════════════════════════════════════════════════════════════════════
   Techlore Wiki — Custom CSS
   Pixel-perfect replica of the unified Ghost / Jekyll nav + footer.
   For use with MkDocs Material.

   Usage in mkdocs.yml:
     extra_css:
       - stylesheets/techlore.css
   ═══════════════════════════════════════════════════════════════════════ */


/* ─── 1. CSS Custom Properties — Theme Tokens ─────────────────────── */

:root {
  --tl-primary:       hsl(227, 74%, 62%);   /* #5574E6 */
  --tl-primary-hover: hsl(227, 74%, 52%);
  --tl-danger-50:     hsl(12, 85%, 55%);     /* logo badge */
  --tl-warning:       hsl(41, 96%, 47%);     /* theme-toggle active icon */
  --tl-white:         #fff;
  --tl-radius-pill:   100vmax;
  --tl-page-max-width: 1240px;
  --tl-nav-height:    62px;                  /* px so Material's 125% font-size can't inflate it */
  --tl-footer-bg:     #5574E6;
}

/* Dark theme (default for Material "slate") */
[data-md-color-scheme="slate"] {
  --tl-bg:             #1a1c22;
  --tl-translucent-bg: rgba(55, 57, 64, .5);
  --tl-text-color:     #fff;
  --tl-border-color:   rgba(255, 255, 255, 0.12);

  /* Material overrides */
  --md-default-bg-color:        #1a1c22;
  --md-default-fg-color:        #fff;
  --md-default-fg-color--light: rgba(255, 255, 255, 0.7);
  --md-default-fg-color--lighter: rgba(255, 255, 255, 0.52);
  --md-default-fg-color--lightest: rgba(255, 255, 255, 0.12);
  --md-primary-fg-color:        hsl(227, 74%, 62%);
  --md-primary-bg-color:        #fff;
  --md-accent-fg-color:         hsl(227, 74%, 68%);
  --md-typeset-a-color:         hsl(227, 74%, 68%);
  --md-code-bg-color:           #22242b;
}

/* Light theme (default for Material "default") */
[data-md-color-scheme="default"] {
  --tl-bg:             #fff;
  --tl-translucent-bg: rgba(209, 213, 219, .4);
  --tl-text-color:     #1a1c22;
  --tl-border-color:   rgba(0, 0, 0, 0.1);

  /* Material overrides */
  --md-default-bg-color:   #fff;
  --md-primary-fg-color:   hsl(227, 74%, 62%);
  --md-primary-bg-color:   #fff;
  --md-accent-fg-color:    hsl(227, 74%, 55%);
  --md-typeset-a-color:    hsl(227, 74%, 55%);
}


/* ─── 2. Hide Material's default header & footer chrome ───────────── */

.md-header {
  display: none !important;
}

/* We keep Material's search overlay — it's position:fixed and independent */
.md-search {
  z-index: 200;
}


/* ─── 3. Global / body adjustments ────────────────────────────────── */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--tl-nav-height) + 32px);
}

body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
}

/* Give content area top spacing for the sticky nav */
.md-container {
  padding-top: 16px;
}


/* ─── 4. Navbar ───────────────────────────────────────────────────── */

.tl-navbar {
  --_nav-h: var(--tl-nav-height);

  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 16px; /* neutralise Material's 125–150% html font-size */
  position: sticky;
  top: 16px;
  z-index: 100;
  border-radius: var(--tl-radius-pill);
  background-color: var(--tl-translucent-bg);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  backdrop-filter: blur(10px) saturate(180%);
  transition: background-color 350ms ease-in-out, transform 300ms ease-in-out;
  display: flex;
  align-items: center;
  min-height: var(--_nav-h);
}

/* Desktop sizing */
@media (min-width: 1100px) {
  .tl-navbar {
    width: 1200px;
    max-width: 90vw;
    margin-inline: auto;
  }
}

/* Mobile sizing */
@media (max-width: 1099px) {
  .tl-navbar {
    margin-inline: 16px;
    padding-left: 0;
    padding-right: 12px;
  }
}

/* Scroll-hide state */
.tl-navbar.tl-navbar--hidden {
  transform: translateY(-200%);
}


/* ─── 4a. Logo ────────────────────────────────────────────────────── */

.tl-navbar-brand {
  display: flex;
  align-items: center;
  min-height: var(--_nav-h);
  flex-shrink: 0;
}

@media (max-width: 1099px) {
  .tl-navbar-brand {
    position: relative;
    z-index: 20;
  }
}

.tl-navbar-logo {
  display: flex;
  align-items: center;
  margin-left: 12px;
  position: relative;
  text-decoration: none;
  padding: 8px 0;
}

.tl-navbar-logo svg {
  width: 32px;
  height: 32px;
  transition: scale 350ms ease-in-out, filter 350ms ease-in-out;
  filter: drop-shadow(0px 0px 0px transparent);
}

.tl-navbar-logo:hover svg {
  scale: 1.05;
  filter: drop-shadow(0px 1px 3px #2f4cb1);
}

.tl-navbar-logo:hover .logo-eye--left  { animation: tl-eye-l 8s infinite; }
.tl-navbar-logo:hover .logo-eye--right { animation: tl-eye-r 8s infinite; }

.logo-eye {
  transition: translate 350ms ease-in-out;
}

/* "Wiki!" badge */
.tl-navbar-logo::after {
  content: "Wiki!";
  color: white;
  letter-spacing: 1px;
  position: absolute;
  rotate: -8deg;
  left: 20px;
  top: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--tl-danger-50);
  padding: 2px 8px 2px 20px;
  border-radius: var(--tl-radius-pill);
  z-index: -1;
}

@keyframes tl-eye-l {
  10%, 21%  { translate: .1rem 0; }
  22%, 32%  { translate: -.2rem 0; }
  33%, 100% { translate: 0 0; }
}
@keyframes tl-eye-r {
  10%, 21%  { translate: .2rem 0; }
  22%, 32%  { translate: -.1rem 0; }
  33%, 100% { translate: 0 0; }
}


/* ─── 4b. Burger (mobile) ─────────────────────────────────────────── */

.tl-navbar-burger {
  display: none;
}

@media (max-width: 1099px) {
  .tl-navbar-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    position: absolute;
    top: 50%;
    right: 8px;
    translate: 0 -50%;
    z-index: 20;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--tl-text-color);
  }

  .tl-navbar-burger span {
    display: block;
    height: 2px;
    background-color: currentColor;
    border-radius: var(--tl-radius-pill);
    transition: transform 250ms ease-in-out, opacity 250ms ease-in-out;
    transform-origin: center;
  }
}


/* ─── 4c. Menu toggle (checkbox hack) ─────────────────────────────── */

#tl-navbar-menu-toggle {
  display: none;
}

/* ── Open state: full-screen mobile menu ── */
@media (max-width: 1099px) {
  /* When menu is open → navbar becomes full-screen overlay */
  .tl-navbar:has(#tl-navbar-menu-toggle:checked) {
    border-radius: 0;
    background-color: var(--tl-bg);
    padding-top: 16px;
    padding-left: 16px;
    padding-right: 28px;
    top: 0;
    position: fixed !important;
    left: 0;
    right: 0;
    width: 100%;
    height: 100dvh;
    margin-inline: 0;
    overflow: hidden;
  }

  /* Top gradient fade for the fixed logo area */
  .tl-navbar:has(#tl-navbar-menu-toggle:checked)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(16px + var(--tl-nav-height) + 32px);
    background: linear-gradient(
      to bottom,
      var(--tl-bg) calc(16px + var(--tl-nav-height)),
      transparent
    );
    pointer-events: none;
    z-index: 10;
  }

  /* Show menu */
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu {
    display: flex;
    animation: tl-menuBgReveal 0.12s ease-out both;
  }

  /* Staggered item reveals */
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li {
    animation: tl-menuItemReveal 0.18s ease-out both;
  }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li:nth-child(1) { animation-delay: 0.04s; }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li:nth-child(2) { animation-delay: 0.08s; }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li:nth-child(3) { animation-delay: 0.12s; }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li:nth-child(4) { animation-delay: 0.16s; }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li:nth-child(5) { animation-delay: 0.20s; }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li:nth-child(6) { animation-delay: 0.24s; }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger + .tl-navbar-menu .tl-navbar-start > div > ul > li:nth-child(7) { animation-delay: 0.28s; }

  /* Burger → X transform */
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger {
    top: calc(16px + var(--tl-nav-height) / 2);
    right: 24px;
  }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger span:nth-child(1) {
    transform: translateY(6px) rotate(-45deg);
  }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger span:nth-child(2) {
    transform: translateY(-0px) rotate(45deg);
  }
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger span:nth-child(3),
  #tl-navbar-menu-toggle:checked + .tl-navbar-burger span:nth-child(4) {
    opacity: 0;
  }

  /* Lock page scroll when menu is open */
  body:has(#tl-navbar-menu-toggle:checked) {
    overflow: hidden;
    height: 100dvh;
  }
}

@keyframes tl-menuBgReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes tl-menuItemReveal {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ─── 4d. Menu container ──────────────────────────────────────────── */

.tl-navbar-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-height: var(--_nav-h);
}

@media (max-width: 1099px) {
  .tl-navbar-menu {
    display: none;              /* hidden until checkbox :checked */
    position: absolute;
    inset: 0 0 auto 0;
    overflow-y: scroll;
    height: 100dvh;
    background-color: var(--tl-bg);
    padding-top: calc(var(--tl-nav-height) + 16px);
    flex-direction: column;
    justify-content: space-between;
  }
}


/* ─── 4e. Nav start (center links) ────────────────────────────────── */

.tl-navbar-start {
  flex: 1;
}

@media (min-width: 1100px) {
  .tl-navbar-start {
    position: absolute !important;
    inset: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding-top: 3px;
    flex-grow: 0 !important;
    pointer-events: none;
  }
  .tl-navbar-start > * {
    pointer-events: auto;
  }
}

.tl-navbar-start ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile: vertical layout */
@media (max-width: 1099px) {
  .tl-navbar-start {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 28px 128px 29px;
  }

  .tl-navbar-start > div {
    width: 100%;
  }

  .tl-navbar-start ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
}


/* ─── 4f. Nav items ───────────────────────────────────────────────── */

.tl-navbar-item {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 11px;
  padding-right: 11px;
}

.tl-navbar-item > a:not(.tl-navbar-link),
.tl-navbar-link {
  color: var(--tl-text-color);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 8px 0;
  background: none;
  border: none;
}

.tl-navbar-item > a:hover,
.tl-navbar-link:hover {
  color: var(--tl-primary);
}

/* Active state (Wiki page) */
.tl-navbar-item.is-active > a {
  font-weight: 900;
}

/* Mobile: larger font for nav items */
@media (max-width: 1099px) {
  .tl-navbar-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0;
  }

  .tl-navbar-item > a:not(.tl-navbar-link),
  .tl-navbar-link {
    font-size: 24px !important;
    padding-block: 8px;
    padding-inline: 0;
    min-height: 0;
  }
}


/* ─── 4g. Dropdown chevron ────────────────────────────────────────── */

.tl-nav-chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0;
  margin-top: 1px;
  opacity: 0.65;
  flex-shrink: 0;
}

@media (max-width: 1099px) {
  .tl-nav-chevron {
    display: none;
  }
}


/* ─── 4h. Dropdown menu ───────────────────────────────────────────── */

.tl-navbar-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--tl-bg);
  border: 1px solid var(--tl-border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 6px 0;
  min-width: 200px;
  z-index: 100;
}

.tl-has-dropdown:hover > .tl-navbar-dropdown {
  display: block;
}

.tl-dropdown-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 18px;
  white-space: nowrap;
  color: var(--tl-text-color);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
}

.tl-dropdown-item:hover {
  color: var(--tl-primary);
}

/* External link icon in dropdown */
.tl-icon-external {
  width: 11px;
  height: 11px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Mobile: dropdowns always visible and flat */
@media (max-width: 1099px) {
  .tl-navbar-dropdown {
    display: block !important;
    position: static !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 0 0 22px !important;
    min-width: unset !important;
    z-index: 0 !important;
  }

  .tl-dropdown-item {
    font-size: 24px;
    font-weight: 600;
    padding: 8px 0;
    white-space: normal;
    display: block;
  }

  .tl-dropdown-item .tl-icon-external {
    display: inline-block;
    width: 10px;
    height: 10px;
  }
}


/* ─── 4i. Nav end (right side buttons) ────────────────────────────── */

.tl-navbar-end {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* On desktop, tl-navbar-start is position:absolute (removed from flow),
   so tl-navbar-end is the only flex child — push it to the far right. */
@media (min-width: 1100px) {
  .tl-navbar-end {
    margin-left: auto;
  }
}

.tl-navbar-end-inner {
  padding-left: 11px;
  padding-right: 11px;
}

.tl-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile: bottom-pinned full-width button area */
@media (max-width: 1099px) {
  .tl-navbar-end {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    padding: 56px 28px 22px;
    background: linear-gradient(to bottom, transparent 0, var(--tl-bg) 56px);
  }

  .tl-navbar-end-inner {
    width: 100%;
    padding: 0;
  }

  .tl-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  /* Hide theme toggle in mobile menu */
  .tl-theme-toggle {
    display: none !important;
  }

  /* Hide search trigger in mobile menu */
  .tl-search-trigger {
    display: none !important;
  }

  .tl-btn-account {
    width: 100%;
    font-size: 19px !important;
    padding: 10px 16px !important;
    border-radius: 9999px !important;
    justify-content: center;
    text-align: center;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      inset 1px 0 0 rgba(255, 255, 255, 0.12),
      inset -1px 0 0 rgba(255, 255, 255, 0.07),
      0 3px 8px rgba(0, 0, 0, 0.12) !important;
  }
}


/* ─── 5. Buttons (shared nav + footer) ────────────────────────────── */

.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--tl-radius-pill);
  transition: filter 200ms ease-in-out;
  line-height: 1;
}

.tl-btn-primary {
  background-color: var(--tl-primary);
  color: #fff !important;
  font-size: 14px;
  white-space: nowrap;
  padding: 8px 17px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 1px 0 0 rgba(255, 255, 255, 0.07),
    inset -1px 0 0 rgba(255, 255, 255, 0.04),
    0 3px 8px rgba(0, 0, 0, 0.12);
}

.tl-btn-primary:hover {
  filter: brightness(0.82);
  color: #fff !important;
}


/* ─── 6. Theme toggle ─────────────────────────────────────────────── */

.tl-theme-toggle {
  position: relative;
  padding: 6px 9px;
  border: 0 !important;
}

.tl-theme-toggle::after {
  content: '';
  position: absolute;
  background-color: var(--tl-bg);
  top: 50%;
  left: 7px; /* centers over the left (moon) icon */
  z-index: 0;
  width: 28px;
  height: 28px;
  border-radius: 100%;
  transform: translateY(-50%);
  transition: left 250ms ease-in-out;
}

/* Slide right to center over the sun icon (25px icon + 8px gap = 33px shift) */
.tl-theme-toggle[data-active-theme="js-light-is-active"]::after {
  left: 41px;
}

.tl-theme-toggle-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.tl-theme-icon {
  rotate: 0;
  scale: 0.75;
  transition: rotate 1s ease-in-out, scale 750ms cubic-bezier(0.34, 1.56, 0.64, 1), color 300ms ease;
}

/* Dark icon active state */
[data-active-theme="js-dark-is-active"] .tl-theme-icon--dark {
  color: var(--tl-warning);
  rotate: 360deg;
  scale: 1.2;
}

/* Light icon active state */
[data-active-theme="js-light-is-active"] .tl-theme-icon--light {
  color: var(--tl-warning);
  rotate: 360deg;
  scale: 1.2;
}


/* ─── 7. Search trigger button ────────────────────────────────────── */

.tl-search-trigger {
  padding: 8px 10px;
}

.tl-search-trigger svg {
  display: block;
}


/* ─── 8. Footer ───────────────────────────────────────────────────── */

.tl-footer {
  background-color: var(--tl-footer-bg);
  width: var(--tl-page-max-width);
  max-width: 90vw;
  margin-inline: auto;
  padding: 62px 51px 109px;
  margin-top: 64px;
  margin-bottom: 48px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

/* Large bottom "Techlore" text */
.tl-footer::after {
  content: attr(data-bottom-title);
  position: absolute;
  color: var(--tl-bg);
  left: 50%;
  bottom: -16px;
  translate: -50% 0;
  font-family: "Nunito", Lato, Arial, sans-serif;
  font-size: 120px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: -14px;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 1099px) {
  .tl-footer {
    padding-top: 58px;
    text-align: center;
  }

  .tl-footer::after {
    font-size: 80px;
    margin-bottom: -2px;
  }
}


/* ─── 8a. Footer container + columns ──────────────────────────────── */

.tl-footer-container {
  max-width: var(--tl-page-max-width);
  margin: 0 auto;
}

.tl-footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1099px) {
  .tl-footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .tl-footer-columns {
    grid-template-columns: 1fr 1fr;
  }
}


/* ─── 8b. Footer column label ─────────────────────────────────────── */

.tl-footer-label {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 3px;
  margin-top: 0;
}


/* ─── 8c. Footer links ────────────────────────────────────────────── */

.tl-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 1099px) {
  .tl-footer-list {
    display: inline-flex;
    flex-direction: column;
    text-align: left;
  }
}

.tl-footer-list li {
  margin-bottom: 2px;
}

.tl-footer-link {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 550;
  color: var(--tl-white);
  text-decoration: none;
}

.tl-footer-link:hover {
  text-decoration: underline;
  color: var(--tl-white);
}


/* ─── 8d. Footer CTA column ──────────────────────────────────────── */

.tl-footer-col--cta {
  display: flex;
  flex-direction: column;
}

.tl-footer-rights {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--tl-white);
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 21px;
}

.tl-footer-subscribe-btn {
  display: block;
  width: 100%;
  background-color: var(--tl-white);
  color: #1a1a2e;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  border-radius: 9999px;
  padding: 11px 16px;
  text-align: center;
  text-decoration: none;
  margin-bottom: 26px;
  transition: background-color 200ms ease;
}

.tl-footer-subscribe-btn:hover {
  background-color: rgba(255, 255, 255, 0.88);
  color: #1a1a2e;
}


/* ─── 8e. Footer social icons ─────────────────────────────────────── */

.tl-footer-socials {
  display: grid;
  grid-template-columns: repeat(4, auto);
  column-gap: 16px;
  row-gap: 16px;
  justify-content: start;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 1099px) {
  .tl-footer-socials {
    justify-content: center;
  }
}

.tl-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--tl-radius-pill);
  background-color: var(--tl-primary);
  color: var(--tl-white);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: filter 200ms ease, transform 200ms ease;
}

.tl-social-btn:hover {
  filter: brightness(0.85);
  transform: scale(1.08);
  color: var(--tl-white);
}

.tl-social-btn svg {
  width: 1.75em;
  height: 1.75em;
}

/* Touch-friendly social buttons */
@media (pointer: coarse) {
  .tl-social-btn {
    width: 48px;
    height: 48px;
    border-color: rgba(255, 255, 255, 0.2);
  }
}


/* ─── 8f. Footer copyright ────────────────────────────────────────── */

.tl-footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  margin-top: 40px;
  margin-bottom: 8px;
}

.tl-footer-copy-link {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
}

.tl-footer-copy-link:hover {
  opacity: 0.8;
  color: rgba(255, 255, 255, 0.72);
}


/* ─── 9. Go-to-top button ─────────────────────────────────────────── */

.tl-go-top-btn {
  position: fixed;
  bottom: 36px;
  right: 24px;
  z-index: 20;
  width: 48px;
  height: 48px;
  padding: 0;
  transition: opacity 350ms ease-in-out, translate 350ms ease-in-out;
  text-decoration: none;
}

.tl-go-top-btn[data-visible="false"],
.tl-go-top-btn:not([data-visible]) {
  pointer-events: none;
  opacity: 0;
  translate: 0 25%;
}

.tl-go-top-btn[data-visible="true"] {
  opacity: 1;
  translate: 0 0;
}


/* ─── 10. Material theme integration overrides ────────────────────── */

/* Ensure content area doesn't fight with our nav */
.md-main {
  margin-top: 0;
}

/* Style Material's sidebar to match Techlore colors */
.md-nav__link {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
}

.md-nav__link:hover,
.md-nav__link--active {
  color: var(--tl-primary);
}

/* Material search dialog styling */
.md-search__form {
  border-radius: 0.75rem;
}

/* Ensure Material content font matches */
.md-typeset {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 700;
}

/* Material tabs (if used) — style to match Techlore */
.md-tabs {
  background-color: transparent;
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
}

/* Adjust Material's main grid max-width to match Techlore */
.md-grid {
  max-width: var(--tl-page-max-width);
}

/* Hide Material's built-in footer completely */
.md-footer {
  display: none !important;
}

/* Remove any Material header-related spacing */
.md-header[data-md-state="shadow"] {
  box-shadow: none;
}

/* Style Material's code blocks */
.md-typeset code {
  font-family: 'Source Code Pro', 'Fira Code', monospace;
}

/* Smooth transitions for theme changes */
body {
  transition: background-color 250ms ease-in-out;
}
