/* ─── JDI Common Design System (Resets, Variables, Nav & Footer) ─── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --jdi-navy:    #193450;
  --jdi-blue:    #1b5f90;
  --jdi-cyan:    #1ea8fc;
  --jdi-gold:    #f9ad0a;
  --jdi-gold2:   #c68018;
  --jdi-white:   #ffffff;
  --nav-font:    'Inter', sans-serif;
  --body-font:   'Outfit', sans-serif;
  --success:     #10b981;
  --warning:     #f59e0b;
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  font-family: var(--body-font);
  position: relative;
}

/* ─── Global Navigation Bar ────────────────────────────────────── */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5% 18px 3%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.nav-bar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 5% 12px 3%;
  box-shadow: 0 4px 20px rgba(25, 52, 80, 0.03);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 52px;
  list-style: none;
}

.nav-links a {
  font-family: var(--nav-font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--jdi-navy);
  text-decoration: none;
  letter-spacing: 0.03em;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--jdi-cyan);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover { color: var(--jdi-cyan); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--jdi-cyan); }
.nav-links a.active::after { width: 100%; }

/* ─── Apple Style Language Switcher (PT | EN) ───────────────────── */
.nav-bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(18, 34, 52, 0.06);
  border: 1px solid rgba(18, 34, 52, 0.12);
  border-radius: 99px;
  padding: 3px 4px;
  gap: 2px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.nav-bar.scrolled .lang-switcher {
  background: rgba(18, 34, 52, 0.05);
}

.lang-btn {
  font-family: var(--nav-font);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 99px;
  color: var(--jdi-navy);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lang-btn:hover:not(.active) {
  color: var(--jdi-cyan);
}

.lang-btn.active {
  background: var(--jdi-navy);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(18, 34, 52, 0.25);
}

.lang-btn.active::after,
.lang-btn::after {
  display: none !important;
}

/* Drawer Language Segment */
.mobile-drawer-footer .drawer-lang-toggle,
.drawer-lang-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 4px !important;
  gap: 4px !important;
  margin-top: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.mobile-drawer-footer .drawer-lang-btn,
.drawer-lang-btn {
  flex: 1 !important;
  text-align: center !important;
  font-family: var(--nav-font) !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  color: rgba(255, 255, 255, 0.75) !important;
  text-decoration: none !important;
  display: block !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.mobile-drawer-footer .drawer-lang-btn:hover,
.drawer-lang-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.mobile-drawer-footer .drawer-lang-btn.active,
.drawer-lang-btn.active {
  background: var(--jdi-cyan) !important;
  color: #0e1929 !important;
  font-weight: 800 !important;
}

/* ─── Global Footer Row & Social Links ──────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-link-icon svg {
  width: 18px !important;
  height: 18px !important;
  fill: #ffffff !important;
  color: #ffffff !important;
  transition: transform 0.25s ease;
}

.social-link-icon:hover {
  transform: translateY(-3px) scale(1.08);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.social-link-icon:hover svg {
  transform: scale(1.1);
  fill: #ffffff !important;
  color: #ffffff !important;
}

.social-link-icon.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(0, 119, 181, 0.4);
}

.social-link-icon.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: #dc2743;
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(220, 39, 67, 0.4);
}

.social-link-icon.linktree:hover {
  background: #43e660;
  border-color: #43e660;
  color: #0d1117;
  box-shadow: 0 6px 15px rgba(67, 230, 96, 0.4);
}

.footer-right {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-right a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: var(--jdi-cyan);
}

/* Contact Row Social Badges */
.contact-social-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.contact-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  text-decoration: none;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.contact-social-btn svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  fill: #ffffff !important;
  color: #ffffff !important;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-social-btn:hover {
  transform: translateY(-3px) scale(1.08);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  color: #ffffff !important;
}

.contact-social-btn:hover svg {
  transform: scale(1.1);
  fill: #ffffff !important;
  color: #ffffff !important;
}
/* ─── Shareable Project Details Modal Styling ──────────────────────── */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 52, 80, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.modal-container {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-radius: 28px;
  max-width: 780px;
  width: 90%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 30px 70px rgba(10, 20, 35, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transform: translateY(24px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

.project-modal.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 34, 52, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 300;
  z-index: 30;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
  background: rgba(18, 34, 52, 0.95);
  transform: scale(1.08);
}

.modal-close:active {
  transform: scale(0.92);
}

.modal-hero {
  width: 100%;
  height: 380px;
  overflow: hidden;
  position: relative;
  background: var(--jdi-navy);
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.8s ease;
}

.project-modal.active .modal-hero img {
  filter: grayscale(0%);
}

.modal-hero img[src*="vectorized-logo.svg"] {
  object-fit: contain;
  width: 50%;
  height: 50%;
  margin: auto;
  position: absolute;
  inset: 0;
  opacity: 0.85;
}

/* Modal Gallery Carousel for additional pictures */
.modal-gallery-container {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.modal-gallery-slider {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
}

.modal-gallery-slider::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.modal-gallery-slider img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  filter: grayscale(100%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.modal-gallery-slider img:hover {
  transform: scale(1.02);
}

.project-modal.active .modal-gallery-slider img {
  filter: grayscale(0%);
}

.modal-gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.modal-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}

.modal-gallery-dot.active {
  background: #ffffff;
  transform: scale(1.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.modal-body {
  padding: 36px;
}

.modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--body-font);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: var(--jdi-navy);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}

.modal-description {
  font-size: 1.02rem;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 28px;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  border-top: 1px solid #f1f5f9;
  padding-top: 24px;
  margin-bottom: 28px;
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-detail-label {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modal-detail-val {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--jdi-navy);
}

.modal-insights {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
}

.modal-insights h4 {
  font-family: var(--body-font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--jdi-navy);
  margin-bottom: 12px;
}

.modal-insights ul {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-insights li {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  position: relative;
  padding-left: 20px;
}

.modal-insights li::before {
  content: "•";
  color: var(--jdi-cyan);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  position: absolute;
  left: 0px;
}

/* Category badging styling inside modal */
.modal-meta .category-label {
  font-family: var(--nav-font);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--jdi-cyan);
  background: rgba(30, 168, 252, 0.08);
  border: 1px solid rgba(30, 168, 252, 0.22);
  border-radius: 40px;
  padding: 4px 14px;
}

.modal-meta .status-badge {
  font-family: var(--nav-font);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 40px;
  padding: 4px 14px;
}

.modal-meta .status-badge.completed {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.modal-meta .status-badge.running {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ─── Architectural Blueprint background ────────────────── */
.architectural-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Sits behind text content but fits visual stack */
  pointer-events: none;
  overflow: hidden;
  
  /* Subtle drafting grid paper background */
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(27, 95, 144, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 95, 144, 0.035) 1px, transparent 1px),
    linear-gradient(to right, rgba(30, 168, 252, 0.015) 10px, transparent 10px),
    linear-gradient(to bottom, rgba(30, 168, 252, 0.015) 10px, transparent 10px);
}

.blueprint-svg {
  position: absolute;
  width: min(500px, 35vw);
  height: auto;
  opacity: 0.14; /* very subtle */
  transition: transform 0.5s ease;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

/* Floating positions */
.blueprint-truss {
  top: 15vh;
  left: 2%;
  transform: rotate(-5deg);
  animation: slowFloat1 20s ease-in-out infinite;
}

.blueprint-plan {
  top: 95vh;
  right: 2%;
  transform: rotate(8deg);
  animation: slowFloat2 24s ease-in-out infinite;
}

.blueprint-compass {
  top: 175vh;
  left: 5%;
  transform: rotate(-15deg);
  animation: slowFloat3 22s ease-in-out infinite;
}

/* Blueprint drawing line style */
.blueprint-line {
  fill: none;
  stroke: var(--jdi-blue);
  stroke-width: 1.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawBlueprint 15s linear forwards infinite;
  will-change: stroke-dashoffset, opacity;
}

.blueprint-dash {
  fill: none;
  stroke: var(--jdi-cyan);
  stroke-width: 1px;
  stroke-dasharray: 5 4;
  stroke-dashoffset: 200;
  animation: drawBlueprintDash 25s linear forwards infinite;
}

.blueprint-solid {
  fill: rgba(25, 52, 80, 0.2);
  stroke: var(--jdi-navy);
  stroke-width: 1px;
  opacity: 0;
  animation: fadeSolid 3s ease forwards 1s;
}

.blueprint-dim {
  fill: none;
  stroke: #a0aec0;
  stroke-width: 0.8px;
  opacity: 0.7;
}

.blueprint-text {
  fill: var(--jdi-navy);
  font-family: var(--nav-font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* Drawing animations */
@keyframes drawBlueprint {
  0% { stroke-dashoffset: 1000; }
  40% { stroke-dashoffset: 0; }
  90% { stroke-dashoffset: 0; opacity: 0.14; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes drawBlueprintDash {
  0% { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}

@keyframes fadeSolid {
  to { opacity: 0.8; }
}

@keyframes slowFloat1 {
  0% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-15px) rotate(-3deg); }
  100% { transform: translateY(0) rotate(-5deg); }
}

@keyframes slowFloat2 {
  0% { transform: translateY(0) rotate(8deg); }
  50% { transform: translateY(15px) rotate(6deg); }
  100% { transform: translateY(0) rotate(8deg); }
}

@keyframes slowFloat3 {
  0% { transform: translateY(0) rotate(-15deg); }
  50% { transform: translateY(-10px) rotate(-18deg); }
  100% { transform: translateY(0) rotate(-15deg); }
}

/* Clickable modal images */
.clickable-image {
  cursor: zoom-in;
  transition: opacity 0.25s ease;
}

.clickable-image:hover {
  opacity: 0.9;
}

/* Fullscreen Image Lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.image-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 300;
  z-index: 3010;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-content {
  position: relative;
  z-index: 3005;
  max-width: 90%;
  max-height: 85vh;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 2.2rem;
  font-weight: 300;
  z-index: 3010;
  transition: all 0.2s ease;
  user-select: none;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.05);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
  }
  .lightbox-prev {
    left: 12px;
  }
  .lightbox-next {
    right: 12px;
  }
}

/* ─── JDI Living Bot Ambient States ───────────────────────────────── */
body {
  transition: filter 1.2s ease;
}

/* Lonely / Dormant State */
body.jdi-lonely-mode {
  filter: grayscale(18%) brightness(95%);
}

body.jdi-lonely-mode .architectural-bg .blueprint-truss {
  animation: drawBlueprint 60s linear forwards infinite !important;
}
body.jdi-lonely-mode .architectural-bg .blueprint-dash {
  animation: drawBlueprintDash 80s linear forwards infinite !important;
}

/* Bottom-Right Pulsing Bot Status */
.jdi-bot-status {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(10, 15, 29, 0.15);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.jdi-bot-status.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.jdi-bot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a0aec0;
  animation: jdiBotPulse 2s infinite;
}

.jdi-bot-status-text {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  color: #a0aec0;
  font-weight: 500;
  letter-spacing: 0.02em;
}

@keyframes jdiBotPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(160, 174, 192, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(160, 174, 192, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(160, 174, 192, 0); }
}

/* Executive Welcoming Toast */
.jdi-bot-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(380px, 90vw);
  background: rgba(25, 53, 80, 0.95);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(30, 168, 252, 0.25);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(10, 15, 29, 0.3);
  z-index: 1001;
  transform: translateX(120%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jdi-bot-toast.visible {
  transform: translateX(0);
}

.jdi-bot-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jdi-bot-toast-title {
  font-family: var(--body-font);
  font-size: 0.85rem;
  font-weight: 700;
  color: #1ea8fc;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.jdi-bot-toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.jdi-bot-toast-close:hover {
  color: #ffffff;
}

.jdi-bot-toast-body {
  font-family: var(--body-font);
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.5;
  font-weight: 400;
}

/* ─── Navbar Guide Indicatives ───────────────────────────────────── */
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-indicator-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jdi-cyan);
  display: inline-block;
  opacity: 0.8;
}

.nav-indicator-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  position: relative;
}

.nav-indicator-pulse::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #10b981;
  animation: navPulse 1.8s infinite;
}

@keyframes navPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

.nav-indicator-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.nav-indicator-badge.gold {
  background: rgba(249, 173, 10, 0.12);
  border: 1px solid rgba(249, 173, 10, 0.4);
  color: #f9ad0a;
  animation: goldPulse 2s infinite;
}

.nav-indicator-badge.blue {
  background: rgba(30, 168, 252, 0.1);
  border: 1px solid rgba(30, 168, 252, 0.35);
  color: #1ea8fc;
}

.nav-indicator-badge.gray {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

@keyframes goldPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(249, 173, 10, 0.2); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(249, 173, 10, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(249, 173, 10, 0); }
}

/* ─── Crimson Real-Time Dashboard Helpers ────────────────────────── */
.telemetry-card {
  background: rgba(20, 10, 10, 0.35);
  border: 1px solid rgba(239, 68, 68, 0.12);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s;
}

.telemetry-card:hover {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(20, 10, 10, 0.45);
}

.telemetry-sparkline {
  width: 100%;
  height: 48px;
  stroke: #ef4444;
  stroke-width: 1.5px;
  fill: url(#red-gradient);
}

/* ─── Dropdown Menu Styles ──────────────────────────────────────── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px !important;
}

.dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(25, 52, 80, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(25, 52, 80, 0.08);
  padding: 8px 0;
  min-width: 190px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1010;
}

.nav-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(2px);
}

.dropdown-menu li {
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  width: 100% !important;
}

.dropdown-menu a {
  display: block !important;
  padding: 10px 20px !important;
  color: var(--jdi-navy) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  width: 100% !important;
  transition: all 0.25s ease !important;
  border-radius: 0;
  text-align: left;
}

.dropdown-menu a::after {
  display: none !important; /* remove underline for dropdown items */
}

.dropdown-menu a:hover {
  background: rgba(27, 95, 144, 0.05);
  color: var(--jdi-cyan) !important;
  padding-left: 24px !important;
}

/* Adjust dropdown position and spacing on mobile */
@media (max-width: 768px) {
  .dropdown-menu {
    min-width: 160px;
  }
  .dropdown-menu a {
    padding: 8px 16px !important;
    font-size: 0.82rem !important;
  }
}

/* ─── Apple HIG Mobile Navigation & Frosted Drawer Styles ───────── */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  position: relative;
  align-items: center;
  justify-content: center;
  background: rgba(25, 52, 80, 0.05);
  border: 1px solid rgba(25, 52, 80, 0.12);
  border-radius: 50%;
  cursor: pointer;
  z-index: 100002;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-toggle:focus,
.nav-toggle:focus-visible,
.nav-toggle:active {
  outline: none !important;
  box-shadow: none !important;
}

.nav-toggle .bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background-color: var(--jdi-navy);
  border-radius: 99px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.25s ease;
  transform-origin: center center;
  pointer-events: none;
}

.nav-toggle .bar:nth-child(1) {
  transform: translate(-50%, -6px);
}

.nav-toggle .bar:nth-child(2) {
  transform: translate(-50%, -50%);
  opacity: 1;
}

.nav-toggle .bar:nth-child(3) {
  transform: translate(-50%, 4px);
}

/* Animations into clean, centered Apple X */
.nav-bar.active-menu .nav-toggle {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.nav-bar.active-menu .nav-toggle .bar {
  background-color: #ffffff !important;
}

.nav-bar.active-menu .nav-toggle .bar:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-bar.active-menu .nav-toggle .bar:nth-child(2) {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.nav-bar.active-menu .nav-toggle .bar:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Standalone Apple Dimmed Backdrop */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 28, 0.65);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100001 !important;
}

body.mobile-menu-open .mobile-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open .site-container {
  z-index: 100000 !important;
}

/* Hide mobile-only drawer elements on desktop */
.mobile-drawer-header,
.mobile-drawer-footer,
.nav-chevron,
.cta-arrow {
  display: none;
}

/* ─── Mobile responsive drawer overlay (Apple iOS HIG Standard) ─── */
@media (max-width: 768px) {
  .nav-bar.active-menu {
    z-index: 100000 !important;
  }

  .nav-toggle {
    display: flex;
    z-index: 100006 !important;
  }

  .nav-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100006;
  }

  .lang-switcher {
    padding: 2px 3px;
  }

  .lang-btn {
    font-size: 0.7rem;
    padding: 3px 6px;
  }

  .nav-links-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background: #0e1929 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    border-top-left-radius: 28px;
    border-bottom-left-radius: 28px;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.6);
    z-index: 100005 !important;
    transform: translateX(105%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    padding: max(20px, calc(env(safe-area-inset-top, 0px) + 14px)) 16px max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px)) 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-font-smoothing: antialiased;
  }

  .nav-bar.active-menu .nav-links-wrapper {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important;
  }

  /* Apple Drawer Header */
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px 16px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
    flex-shrink: 0;
  }

  .drawer-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .drawer-header-logo {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
  }

  .drawer-header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
  }

  .drawer-brand-name {
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  .drawer-brand-tag {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
  }

  .drawer-close-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .drawer-close-circle:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.22);
  }

  /* Inset Grouped Navigation List */
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    color: #ffffff !important;
    font-size: 0.98rem !important;
    font-weight: 600 !important;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    padding: 13px 16px;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.12s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links a:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.12) !important;
  }

  .nav-links a:hover {
    color: var(--jdi-cyan) !important;
  }

  .nav-links a::after {
    display: none !important;
  }

  /* Apple Disclosure Chevrons */
  .nav-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
  }

  .nav-chevron svg {
    stroke: rgba(255, 255, 255, 0.45);
  }

  /* Apple Call-To-Action Pill Button inside Drawer */
  .nav-links li:has(.mobile-cta-btn) {
    border-bottom: none;
    background: transparent;
  }

  .mobile-cta-btn {
    background: linear-gradient(135deg, #1ea8fc 0%, #1b5f90 100%) !important;
    color: #ffffff !important;
    border-radius: 14px !important;
    margin: 12px 0 4px 0 !important;
    min-height: 48px !important;
    padding: 12px 18px !important;
    font-weight: 700 !important;
    font-size: 0.98rem !important;
    box-shadow: 0 4px 18px rgba(30, 168, 252, 0.35);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
  }

  .cta-arrow {
    display: inline-block;
    font-size: 1.15rem;
    font-weight: 400;
    transition: transform 0.2s ease;
  }

  .mobile-cta-btn:active {
    transform: scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(30, 168, 252, 0.25) !important;
  }

  /* Inline mobile dropdown styling */
  .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-dropdown .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .nav-dropdown .dropdown-arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-dropdown .dropdown-arrow svg {
    stroke: rgba(255, 255, 255, 0.45);
  }

  .nav-dropdown.active .dropdown-arrow svg {
    transform: rotate(180deg);
    stroke: var(--jdi-cyan);
  }

  .nav-dropdown .dropdown-menu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none;
    background: rgba(0, 0, 0, 0.25) !important;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
    padding: 4px;
    margin: 4px 8px 10px 8px;
    width: calc(100% - 16px);
    flex-direction: column;
    gap: 2px;
    transition: none;
  }

  .nav-dropdown.active .dropdown-menu {
    display: flex !important;
  }

  .dropdown-menu a {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 10px 14px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    border-radius: 8px;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .dropdown-menu a::before {
    content: "•";
    font-size: 1rem;
    color: var(--jdi-cyan);
    opacity: 0.7;
  }

  .dropdown-menu a:hover,
  .dropdown-menu a:active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Apple Drawer Footer */
  .mobile-drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 18px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }

  .drawer-contact-pills {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .drawer-contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.2s ease;
  }

  .drawer-contact-pill svg {
    stroke: var(--jdi-cyan);
    flex-shrink: 0;
  }

  .drawer-contact-pill:active {
    background: rgba(255, 255, 255, 0.12);
  }

  .drawer-social-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2px;
  }

  .drawer-social-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .drawer-social-badges {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  .drawer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .drawer-social-btn svg {
    fill: #ffffff !important;
    width: 16px;
    height: 16px;
  }

  .drawer-social-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.22);
  }

  .drawer-legal {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.7rem;
    text-align: center;
    margin-top: 2px;
  }

  /* ─── Apple iOS Modal Sheet Standard on Mobile ────────────────── */
  .project-modal,
  .article-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .project-modal .modal-container,
  .article-modal .modal-container {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 28px) !important;
    max-height: calc(100dvh - 28px) !important;
    border-radius: 28px 28px 0 0 !important;
    margin: auto 0 0 0 !important;
    transform: translateY(100%) !important;
    border-bottom: none !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28) !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 20px)) !important;
  }

  .project-modal.active .modal-container,
  .article-modal.active .modal-container {
    transform: translateY(0) !important;
  }

  /* Apple iOS Sheet Handle Indicator */
  .modal-container::before {
    content: "";
    display: block;
    width: 40px;
    height: 5px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.2);
    margin: 10px auto 4px auto;
    flex-shrink: 0;
  }

  .modal-close {
    top: 14px !important;
    right: 16px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(18, 34, 52, 0.75) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    font-size: 1.6rem !important;
    z-index: 50 !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .modal-hero {
    height: 230px !important;
    min-height: 230px !important;
  }

  .modal-body {
    padding: 24px 20px 32px !important;
  }

  .modal-header h2,
  .modal-title {
    font-size: 1.45rem !important;
    line-height: 1.3 !important;
  }

  .modal-gallery-container {
    height: 190px !important;
  }
}

