@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300;
  src: url("/fonts/SpaceGrotesk-Light.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  src: url("/fonts/SpaceGrotesk-SemiBold.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  src: url("/fonts/SpaceGrotesk-Bold.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 200;
  src: url("/fonts/GeneralSans-Extralight.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 300;
  src: url("/fonts/GeneralSans-Light.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/GeneralSans-Regular.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 500;
  src: url("/fonts/GeneralSans-Medium.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 600;
  src: url("/fonts/GeneralSans-Semibold.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  font-style: normal;
  font-weight: 700;
  src: url("/fonts/GeneralSans-Bold.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg-primary: rgba(5, 5, 5, 1);
  --bg-secondary: rgba(2, 2, 2, 1);
  --bg-black: #111;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.06);
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  --size: 22px;    /* cube edge length */
  --dot: 3px;      /* pip diameter */
  --offset: 5px;   /* distance from center to corner pips */

}

body {
  /* your existing background here… */
  position: relative;
  z-index: 0;
  margin: 0;
  padding: 0;
  font-family: "General Sans", sans-serif;
  color: var(--text-primary);
  background: radial-gradient(
    circle at center,
    var(--bg-primary) 0%,
    var(--bg-secondary) 30%,
    rgba(2, 2, 2, 1) 60%,
    var(--bg-black) 100%
  );
  background-attachment: fixed;
  background-size: 100% 100vh;
  background-repeat: no-repeat;
  min-height: 100vh;
}


/* --- Article asides (callouts) --- */
article aside {
  position: relative;
  margin: 1.25rem 0;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  box-shadow:
    0 0 1px hsl(205 20% 10% / 0.15),
    1px 1px 2px -0.4px hsl(205 20% 10% / 0.12),
    2px 2.5px 4px -0.8px hsl(205 20% 10% / 0.12);
}

/* Left accent */
article aside::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(100,200,255,0.9), rgba(160,110,255,0.9));
}

/* Subtle title style if author starts with strong */
article aside > strong:first-child {
  display: inline-block;
  font-weight: 600;
  color: rgba(100, 200, 255, 1);
  margin-right: 0.35rem;
}

/* Links and code inside aside */
article aside a { color: rgba(100, 200, 255, 0.9); }
article aside :not(pre) > code {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 640px) {
  article aside {
    padding: 0.8rem 0.9rem 0.8rem 0.9rem;
    border-radius: 10px;
  }
  article aside::before { top: 6px; bottom: 6px; }
}

/* --- Code blocks (Astro: pre.astro-code.github-dark) --- */
.astro-code.github-dark {
  position: relative;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 0.5px solid var(--glass-border);
  box-shadow:
    0 0 1px hsl(205 20% 10% / 0.15),
    1px 1px 2px -0.4px hsl(205 20% 10% / 0.12),
    2px 2.5px 4px -0.8px hsl(205 20% 10% / 0.12),
    4px 4.5px 7px -1.2px hsl(205 20% 10% / 0.12);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.astro-code.github-dark code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Ensure inner code element doesn't get inline code background */
pre.astro-code.github-dark code {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

/* Optional: line wrapper some highlighters emit */
.astro-code.github-dark .line { padding-right: 1rem; }

/* Scrollbar polish */
.astro-code.github-dark::-webkit-scrollbar { height: 10px; width: 10px; }
.astro-code.github-dark::-webkit-scrollbar-track { background: transparent; }
.astro-code.github-dark::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.astro-code.github-dark:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.25); }

/* Inline code to match overall aesthetic */
/* Inline code only (not inside pre) */
:not(pre) code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

@media (max-width: 640px) {
  .astro-code.github-dark {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin: 1rem 0;
  }
  .astro-code.github-dark code { font-size: 0.85rem; }
}

/* --- Copy button for code blocks --- */
.astro-code.github-dark {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  transition: all 0.2s ease;
  z-index: 10;
}

.astro-code.github-dark:hover .code-copy-btn,
.astro-code.github-dark:focus-within .code-copy-btn {
  opacity: 1;
  transform: translateY(0);
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.code-copy-btn:active {
  transform: translateY(0.5px);
}

.code-copy-btn .icon {
  width: 14px;
  height: 14px;
}

.code-copy-btn .check { display: none; }
.code-copy-btn.copied .copy { display: none; }
.code-copy-btn.copied .check { display: inline; }

@media (max-width: 640px) {
  .code-copy-btn {
    top: 8px;
    right: 8px;
    padding: 6px 8px;
    border-radius: 6px;
  }
}

/* --- Collapsible code blocks --- */
.astro-code.github-dark.code-collapsible {
  /* Collapsed by default */
  --code-collapsed-max-height: 320px;
  position: relative;
  max-height: var(--code-collapsed-max-height);
  overflow: hidden;
}

.astro-code.github-dark.code-collapsible::after {
  /* Bottom fade overlay (matches inline code block bg in Layout.astro) */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(15, 15, 20, 0), rgba(15, 15, 20, 0.95));
  pointer-events: none;
  z-index: 6;
}

.astro-code.github-dark.code-collapsible.code-expanded {
  max-height: none;
}

.astro-code.github-dark.code-collapsible.code-expanded::after {
  display: none;
}

.code-expand-btn {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 11;
}

.code-expand-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
  .astro-code.github-dark.code-collapsible { --code-collapsed-max-height: 260px; }
  .code-expand-btn { bottom: 8px; padding: 6px 8px; border-radius: 6px; }
}

/* Mobile optimization for background */
@media (max-width: 768px) {
  html {
    width: 100%;
    overflow-x: hidden;
  }
  
  body {
    background: var(--bg-black) !important;
    background-attachment: scroll !important;
    width: 100vw;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
  }
  
  body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: url('/images/nebula.png') repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
  }
}

/* Custom text selection colors to match the electric blue/purple theme */
::selection {
  background: hsl(220, 70%, 35%);
  color: rgba(255, 255, 255, 0.95);
}

::-moz-selection {
  background: hsl(220, 70%, 35%);
  color: rgba(255, 255, 255, 0.95);
}

strong { font-weight: 600; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", sans-serif;
}

.glass3d {
  --filter-glass3d: blur(12px) brightness(1) saturate(1.4);
  --color-glass3d: hsl(189 34% 32% / 0.08);
  --noise-glass3d: none;

  position: relative;
  z-index: 4;
  isolation: isolate;
  overflow: hidden;
  border-radius: 12px;
  border: 0.5px solid var(--glass-border);
  box-shadow:
          0 0 1px hsl(205 20% 10% / 0.15),
          1px 1px 2px -0.4px hsl(205 20% 10% / 0.12),
          2px 2.5px 4px -0.8px hsl(205 20% 10% / 0.12),
          4px 4.5px 7px -1.2px hsl(205 20% 10% / 0.12),
          6px 7px 10px -1.7px hsl(205 20% 10% / 0.12),
          9px 10px 15px -2.1px hsl(205 20% 10% / 0.12),
          12px 14px 20px -2.5px hsl(205 20% 10% / 0.15);
}

.glass3d::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  z-index: 3;

  -webkit-backdrop-filter: var(--filter-glass3d);
  backdrop-filter: var(--filter-glass3d);
  background-color: var(--color-glass3d);
  background-image: var(--noise-glass3d);
  background-size: 100px;
  background-repeat: repeat;
}

.glass3d::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  z-index: 5;

  box-shadow:
          inset 1px 1px 0.5px 0 rgba(255,255,255,0.28),
          inset -0.5px -0.5px 0.5px 0 rgba(255,255,255,0.18);
  background-image:
          radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,0.06), transparent 60%),
          radial-gradient(140% 100% at 100% 100%, rgba(255,255,255,0.03), transparent 70%);
}

.glass3d > * {
  position: relative;
  z-index: 6;
}


header.blog-header {
  border-radius: 12px;
  padding: 1.5em 2em;
  max-width: 80ch;
  margin: 2em auto 1em auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  /* Allow tooltip to render outside header bounds */
  overflow: visible;
  z-index: 1000;
}

header.blog-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 300;
  font-family: "Space Grotesk", sans-serif;
  text-transform: lowercase;
}

header.blog-header .blog-title-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

header.blog-header .blog-title-link:hover {
  color: var(--text-secondary);
  opacity: 0.8;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
}

.header-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.header-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.search-wrapper {
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.search-form:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.search-input {
  background: none;
  border: none;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  width: 120px;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-button {
  background: none;
  border: none;
  padding: 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.search-button:hover {
  color: var(--text-secondary);
}

.dice-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  perspective: 600px;
  position: relative;
}

.cube {
  width: var(--size);
  height: var(--size);
  position: relative;
  transform-style: preserve-3d;
  /* start rotated so the "5" face (left) is front */
  transform: rotateY(72deg) rotateX(32deg);
  /* transition: transform 0.6s ease; */
}

.face {
  position: absolute;
  width: var(--size);
  height: var(--size);
  background: #fff;
  border: 2px solid #333;
  border-radius: 6px;
  box-shadow:
    inset -4px -4px 8px rgba(0,0,0,0.1),
    0 4px 6px rgba(0,0,0,0.15);
}

.face::before {
  content: "";
  position: absolute;
  top: 50%;  left: 50%;
  width: var(--dot);
  height: var(--dot);
  background: #333;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* position each face in 3D */
.face.front  { transform: rotateY(  0deg) translateZ(calc(var(--size)/2)); }
.face.back   { transform: rotateY(180deg) translateZ(calc(var(--size)/2)); }
.face.right  { transform: rotateY( 90deg) translateZ(calc(var(--size)/2)); }
.face.left   { transform: rotateY(-90deg) translateZ(calc(var(--size)/2)); }
.face.top    { transform: rotateX( 90deg) translateZ(calc(var(--size)/2)); }
.face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--size)/2)); }

/* ——— PIP layouts ——— */

/* 1 pip */
.face.front::before {
  box-shadow: none;
}

/* 2 pips (hide center dot) */
.face.right::before {
  background: transparent;
  box-shadow:
    calc(-1*var(--offset)) calc(-1*var(--offset)) 0 0 #333,
    var(--offset)             var(--offset)       0 0 #333;
}

/* 3 pips */
.face.top::before {
  /* center + two corners is exactly 3 */
  box-shadow:
    calc(-1*var(--offset)) calc(-1*var(--offset)) 0 0 #333,
    var(--offset)         var(--offset)           0 0 #333;
}

/* 4 pips (hide center dot) */
.face.bottom::before {
  background: transparent;
  box-shadow:
    calc(-1*var(--offset)) calc(-1*var(--offset)) 0 0 #333,
    var(--offset)            calc(-1*var(--offset)) 0 0 #333,
    calc(-1*var(--offset))   var(--offset)         0 0 #333,
    var(--offset)            var(--offset)         0 0 #333;
}

/* 5 pips */
.face.left::before {
  /* center + 4 corners */
  box-shadow:
    calc(-1*var(--offset)) calc(-1*var(--offset)) 0 0 #333,
    var(--offset)            calc(-1*var(--offset)) 0 0 #333,
    0                        0                       0 0 #333,
    calc(-1*var(--offset))   var(--offset)          0 0 #333,
    var(--offset)            var(--offset)          0 0 #333;
}

/* 6 pips (hide center dot) */
.face.back::before {
  background: transparent;
  box-shadow:
    /* left column */
    calc(-1*var(--offset)) calc(-1*var(--offset)) 0 0 #333,
    calc(-1*var(--offset)) 0                       0 0 #333,
    calc(-1*var(--offset)) var(--offset)          0 0 #333,
    /* right column */
    var(--offset)           calc(-1*var(--offset)) 0 0 #333,
    var(--offset)           0                       0 0 #333,
    var(--offset)           var(--offset)          0 0 #333;
}

/* hover: flip to show "2" face */
.dice-button:hover .cube {
  /* Animation will be handled by JavaScript */
}

.tooltip {
  position: absolute;
  top: 50%;
  left: calc(100% + 18px);
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.tooltip::after {
  content: none;
}

.dice-button:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(2px);
}

@keyframes spin-dice {
  0% {
    transform: rotateY(72deg) rotateX(32deg);
  }
  25% {
    transform: rotateY(162deg) rotateX(32deg);
  }
  50% {
    transform: rotateY(252deg) rotateX(32deg);
  }
  75% {
    transform: rotateY(342deg) rotateX(32deg);
  }
  100% {
    transform: rotateY(432deg) rotateX(32deg);
  }
}

@media (max-width: 640px) {
  header.blog-header {
    justify-content: center;
    text-align: center;
    margin: 1.5em 1em;
    padding: 1em 1.5em;
    flex-direction: column;
    gap: 1.25rem;
    width: calc(100% - 2em);
    max-width: calc(100% - 2em);
    box-sizing: border-box;
  }

  .search-input {
    width: 120px;
    font-size: 0.85rem;
  }

  header.blog-header h1 {
    font-size: 1.25rem;
  }

  main {
    padding: 0 1em;
  }
}

ul#nav {
  list-style: none;
  padding: 0;
}

ul#nav li {
  display: inline-block;
  padding: 0.5em 1em;
  margin: 0 0.5em;
  border-radius: 12px;
  transition: all 0.3s ease;
}

ul#nav li.active,
ul#nav li:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

main {
  margin: 0 auto;
  padding: 0 1em;
  p {
    font-size: 1.05rem;
  }
}

article {
  border-radius: 12px;
  max-width: 80ch;
  margin: 1em auto 2em auto;
  padding: 2em;
}

/* Mobile optimizations for content */
@media (max-width: 768px) {
  main {
    padding: 0 1em !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  article {
    margin: 1.5em 0 1.5em 0 !important;
    padding: 1.5em 1.25em !important;
    width: calc(100% - 2em) !important;
    max-width: calc(100% - 2em) !important;
    box-sizing: border-box !important;
  }
  
  /* Ensure text doesn't overflow */
  body {
    overflow-x: hidden !important;
    word-wrap: break-word !important;
  }
  
  /* Better typography for mobile */
  p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
  
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.3 !important;
  }
  
  /* Prevent any JavaScript from changing these values */
  * {
    max-width: 100% !important;
  }
  
  /* Force container widths */
  .container, 
  header.blog-header,
  article.glass3d {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Specific header mobile fixes */
  header.blog-header {
    margin: 1.5em 1em !important;
    padding: 1.5em 1em !important;
    width: calc(100% - 2em) !important;
    max-width: calc(100% - 2em) !important;
    box-sizing: border-box !important;
  }
  
  /* Header controls responsive adjustments */
  .header-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    width: 100% !important;
  }
  
  .search-form {
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  
  .search-input {
    width: 100px !important;
    font-size: 0.8rem !important;
  }
  
  .search-wrapper {
    margin: 0 !important;
  }
  
  .dice-button {
    margin: 0 !important;
  }
  
  /* Position tooltip below dice on mobile */
  .dice-button .tooltip {
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
  }
  
  .dice-button .tooltip::before {
    /* Arrow pointing up */
    top: -6px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    border-right-color: transparent;
  }
  
  .dice-button:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(2px);
  }
  
  /* Add extra spacing between search and dice on mobile */
  .header-controls > * {
    margin: 0.25rem 0 !important;
  }
}

article a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

article a:hover {
  opacity: 0.8;
}

/* Stork Search Customization */
.stork-output {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin-top: 8px !important;
  max-height: 400px;
  overflow-y: auto;
  box-shadow:
    0 0 1px hsl(205 20% 10% / 0.15),
    1px 1px 2px -0.4px hsl(205 20% 10% / 0.12),
    2px 2.5px 4px -0.8px hsl(205 20% 10% / 0.12),
    4px 4.5px 7px -1.2px hsl(205 20% 10% / 0.12),
    6px 7px 10px -1.7px hsl(205 20% 10% / 0.12),
    9px 10px 15px -2.1px hsl(205 20% 10% / 0.12),
    12px 14px 20px -2.5px hsl(205 20% 10% / 0.15);
  min-width: 280px;
  display: none !important;
  isolation: isolate;
  overflow: hidden;
}

/* Add glassomorphic effects to search dropdown */
.stork-output::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  z-index: 1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.02);
}

.stork-output::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  z-index: 2;
  box-shadow:
    inset 1px 1px 0.5px 0 rgba(255,255,255,0.28),
    inset -0.5px -0.5px 0.5px 0 rgba(255,255,255,0.18);
  background-image:
    radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(140% 100% at 100% 100%, rgba(255,255,255,0.03), transparent 70%);
}

.stork-output > * {
  position: relative;
  z-index: 3;
}

.stork-output-visible {
  display: block !important;
}

.stork-output:empty {
  display: none !important;
}

.stork-result {
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s ease !important;
  background: transparent !important;
  cursor: pointer !important;
}

.stork-result:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.stork-result:last-child {
  border-bottom: none !important;
}

.stork-title {
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.9rem !important;
  margin-bottom: 0.25rem !important;
  text-decoration: none !important;
  display: block !important;
}

.stork-title:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

.stork-excerpt {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

.stork-excerpt em {
  color: hsl(220, 70%, 70%) !important;
  background: hsl(220, 70%, 35%) !important;
  padding: 0.1rem 0.2rem !important;
  border-radius: 3px !important;
  font-style: normal !important;
  font-weight: 500 !important;
}

/* Hide default Stork styles that conflict */
.stork-output .stork-message {
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  padding: 0.75rem 1rem !important;
  text-align: center !important;
  background: transparent !important;
  margin: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Customize search result count messages */
.stork-output .stork-results-count {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  padding: 0.5rem 1rem !important;
  text-align: center !important;
  margin: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Override any default Stork styles */
.stork-output * {
  color: inherit !important;
}

/* Force override of default Stork basic.css */
.stork-wrapper {
  position: relative !important;
}

.stork-input {
  background: transparent !important;
  border: none !important;
  color: var(--text-primary) !important;
}

.stork-progress {
  display: none !important;
}

/* Ensure proper text colors throughout */
.stork-output .stork-result .stork-title a {
  color: var(--text-primary) !important;
  text-decoration: none !important;
}

.stork-output .stork-result .stork-title a:hover {
  color: var(--text-secondary) !important;
}

.stork-output .stork-result .stork-excerpt p {
  color: var(--text-muted) !important;
  margin: 0 !important;
}

/* Hide search output when it has no visible content */
.stork-output:not(.stork-output-visible),
.stork-output[style*="display: none"] {
  display: none !important;
}

/* Better hover effects */
.stork-result a {
  display: block !important;
  color: inherit !important;
  text-decoration: none !important;
}

.stork-result a:hover {
  color: inherit !important;
}

/* Override any yellow highlighting */
.stork-excerpt mark,
.stork-excerpt .stork-highlight,
.stork-title mark,
.stork-title .stork-highlight {
  background: hsl(220, 70%, 35%) !important;
  color: hsl(220, 70%, 70%) !important;
  font-weight: 500 !important;
}

/* Remove "powered by stork" attribution */
.stork-attribution,
.stork-output .stork-attribution,
.stork-powered-by {
  display: none !important;
}

/* Ensure all stork text uses proper colors */
.stork-output,
.stork-output * {
  color: rgba(255, 255, 255, 0.8) !important;
}

.stork-title,
.stork-title * {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Hide Stork's default close button */
.stork-close-button {
  display: none !important;
}

/* Responsive adjustments for search */
@media (max-width: 640px) {
  .stork-output {
    left: 0 !important;
    right: 0 !important;
    max-height: 300px;
  }
}
