/* Responsive Viewport & Overflow Guards */
html {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
}

img, video, iframe, figure, pre, table {
  max-width: 100%;
  height: auto;
}

/* Global Typography: Helvetica Style & Zero Bold */

*,
*::before,
*::after {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400 !important;
}

code, kbd, samp, pre, .font-mono {
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-weight: 400 !important;
}

h1, h2, h3, h4, h5, h6, b, strong, th, button, input, textarea, select {
  font-weight: 400 !important;
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.85);
}

.glass-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), inset 0 1px 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), inset 0 1px 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-3px);
}

.glass-subbox {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.7);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.headshot-img {
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Fallback & Custom Utility Classes */
.tech-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 0.75rem;
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.75rem;
  font-weight: 400 !important;
  color: #3f3f46;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.tech-chip:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(212, 212, 216, 0.9);
  color: #09090b;
}

/* Nav Link States */
.nav-link.active {
  background-color: #18181b;
  color: #ffffff;
  font-weight: 400 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.nav-link.active:hover {
  background-color: #27272a;
  color: #ffffff;
}

/* Filter Button Active */
.filter-btn.active {
  background-color: #18181b;
  color: #ffffff;
  font-weight: 400 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f4f4f5;
}

::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

/* Mouse Blue Gradient Trail Light Effect */
.cursor-trail-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.cursor-spotlight {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 9999px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.28) 0%,
    rgba(14, 165, 233, 0.16) 40%,
    rgba(99, 102, 241, 0.06) 65%,
    rgba(255, 255, 255, 0) 80%
  );
  filter: blur(10px);
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cursor-trail-dot {
  position: absolute;
  border-radius: 9999px;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.65) 0%,
    rgba(59, 130, 246, 0.4) 45%,
    rgba(37, 99, 235, 0) 100%
  );
  filter: blur(3px);
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Medium-Style Article Typography & Blocks */
.medium-article {
  color: #27272a;
  line-height: 1.85;
  font-size: 1.05rem;
}

.medium-article p {
  margin-bottom: 1.4rem;
  color: #3f3f46;
  line-height: 1.85;
}

.medium-article h1,
.medium-article h2 {
  font-size: 1.65rem;
  line-height: 1.3;
  color: #09090b;
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  letter-spacing: -0.02em;
}

.medium-article h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  color: #18181b;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.medium-article blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid #18181b;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 1rem 1rem 0;
  color: #18181b;
  font-size: 1.1rem;
  line-height: 1.75;
}

.medium-article figure {
  margin: 2.25rem 0;
}

.medium-article figure img {
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.08);
}

.medium-article figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: #71717a;
}

.medium-article pre {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: #18181b;
  color: #f4f4f5;
  border-radius: 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
}

.medium-article code {
  padding: 0.15rem 0.45rem;
  background: rgba(24, 24, 27, 0.07);
  border-radius: 0.4rem;
  font-size: 0.88em;
  color: #18181b;
}

.medium-article pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.medium-article ul,
.medium-article ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
  color: #3f3f46;
}

.medium-article ul {
  list-style-type: disc;
}

.medium-article ol {
  list-style-type: decimal;
}

.medium-article li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.medium-article hr {
  margin: 2.5rem auto;
  width: 6rem;
  border: 0;
  border-top: 1px solid #d4d4d8;
}

.medium-article a {
  color: #18181b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Company Filter Buttons */
.company-filter-btn.active {
  background-color: #18181b !important;
  color: #ffffff !important;
  font-weight: 400 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.company-filter-btn.active span {
  color: #ffffff !important;
}

.loc-focus-btn.active {
  background-color: #18181b !important;
  color: #ffffff !important;
  border-color: #18181b !important;
}

/* Leaflet Map Glassmorphic Customizations */
.leaflet-container {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  background-color: #f4f4f5;
  outline: none;
  z-index: 10 !important;
}

.leaflet-pane {
  z-index: 10 !important;
}

.leaflet-top,
.leaflet-bottom {
  z-index: 20 !important;
}

.leaflet-bar {
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
  border-radius: 0.75rem !important;
  overflow: hidden;
}

.leaflet-bar a {
  background-color: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #18181b !important;
  border-bottom: 1px solid rgba(228, 228, 231, 0.8) !important;
  transition: all 0.2s ease;
}

.leaflet-bar a:hover {
  background-color: #18181b !important;
  color: #ffffff !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 1rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
  color: #18181b !important;
  padding: 0.35rem 0.5rem !important;
}

.leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.95) !important;
}

/* Custom Marker Pins */
.custom-div-icon {
  background: transparent !important;
  border: none !important;
}

.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.custom-map-pin:hover {
  transform: scale(1.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.custom-map-pin.hq-pin {
  background: #18181b;
  color: #ffffff;
}

.custom-map-pin.comp-pin {
  background: #2563eb;
  color: #ffffff;
}

/* Mobile Navigation Drawer Animations & Backdrop */
#mobile-menu-drawer {
  top: 82px;
  animation: mobileMenuSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mobileMenuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


