/* InsightlyJo production overrides — load AFTER _astro CSS */

/* ---------- Shared ---------- */
.section-lead {
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(248, 250, 252, 0.86);
  line-height: 1.7;
}

.ij-section {
  padding-top: clamp(3.5rem, 6vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
}

.home-hero-refined .hero-content h1,
.about-hero-refined .hero-title,
.service-page-hero h1 {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-hero-refined .hero-content p,
.about-hero-refined .hero-description,
.projects-hero-copy,
.service-page-hero p {
  max-width: 640px;
  color: rgba(248, 250, 252, 0.88);
  line-height: 1.7;
  font-size: 1.05rem;
}

.about-hero-refined .hero-description,
.projects-hero-copy,
.service-page-hero p {
  margin-left: auto;
  margin-right: auto;
}

.btn-primary,
.btn-outline-light {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary:hover,
.btn-outline-light:hover {
  transform: translateY(-1px);
}

/* ---------- Services dropdown ---------- */
.navbar.fixed-top {
  z-index: 1040;
}

/* Legacy .nav-link::after underline collides with Bootstrap's caret on the toggle:
   draw the caret as a chevron and move the underline to ::before. */
#navbarNav .nav-link.dropdown-toggle {
  position: relative;
}

#navbarNav .nav-link.dropdown-toggle::after {
  content: "";
  position: static;
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.45em;
  vertical-align: 0.2em;
  background: none;
  border: 0;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  opacity: 0.75;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

#navbarNav .nav-link.dropdown-toggle.show::after {
  vertical-align: -0.05em;
  transform: rotate(-135deg);
}

#navbarNav .nav-link.dropdown-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--secondary, #10b981);
  transition: width 0.3s ease;
}

#navbarNav .nav-link.dropdown-toggle:hover::before,
#navbarNav .nav-link.dropdown-toggle.active::before {
  width: 100%;
}

#navbarNav .dropdown-menu {
  min-width: 272px;
  margin-top: 0.4rem;
  padding: 0.5rem;
  background: #0f172a;
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: 14px;
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.6), 0 0 0 1px rgba(79, 70, 229, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 1060;
}

/* Legacy _astro CSS hides menus with opacity:0 unless hovered; keep click/keyboard-opened menus visible. */
#navbarNav .dropdown-menu.show {
  display: block;
  opacity: 1 !important;
  transform: none !important;
}

/* Hover bridge across the gap between toggle and menu. */
#navbarNav .dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.6rem;
  height: 0.6rem;
}

#navbarNav .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 40px;
  margin: 1px 0;
  padding: 0.55rem 0.85rem;
  border-radius: 9px;
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

#navbarNav .dropdown-item::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.45);
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

#navbarNav .dropdown-item::after {
  display: none !important;
}

#navbarNav .dropdown-item:hover,
#navbarNav .dropdown-item:focus {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.3), rgba(139, 92, 246, 0.12));
  color: #fff;
}

#navbarNav .dropdown-item:hover::before,
#navbarNav .dropdown-item:focus::before {
  background: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18);
}

#navbarNav .dropdown-item:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.75);
  outline-offset: -2px;
}

#navbarNav .dropdown-item.active,
#navbarNav .dropdown-item:active {
  background: rgba(79, 70, 229, 0.34);
  color: #fff;
  font-weight: 600;
}

#navbarNav .dropdown-item.active::before {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

#navbarNav .dropdown-divider {
  height: 1px;
  margin: 0.5rem 0.45rem 0.35rem;
  border: 0;
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), rgba(45, 212, 191, 0.5), transparent);
}

#navbarNav .ij-dd-label {
  display: block;
  padding: 0.3rem 0.85rem 0.3rem;
  color: #5eead4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

@media (max-width: 991.98px) {
  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }

  #navbarNav .dropdown-menu {
    min-width: 0;
    width: 100%;
    margin: 0.35rem 0 0.6rem;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: none;
  }

  #navbarNav .dropdown-menu::before {
    display: none;
  }

  #navbarNav .dropdown-item {
    white-space: normal;
  }
}

/* ---------- Project cards ---------- */
.project-category {
  display: inline-block;
  color: #a5b4fc;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.project-problem {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.55;
}

.project-problem strong {
  color: #cbd5e1;
  font-weight: 600;
}

.projects-hero-refined {
  padding-top: clamp(6.5rem, 10vw, 8rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  min-height: auto !important;
}

/* ---------- About strengths ---------- */
.strength-card {
  height: 100%;
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(17, 24, 39, 0.97));
  border: 1px solid rgba(129, 140, 248, 0.24);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.3);
}

.strength-card .strength-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: rgba(79, 70, 229, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.strength-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

.strength-card p {
  margin-bottom: 0;
  color: rgba(248, 250, 252, 0.82);
  line-height: 1.6;
}

.approach-step {
  height: 100%;
}

.approach-step .step-number {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  color: #fff;
}

/* ---------- Leadership — high specificity, no opacity trap ---------- */
#team .leader-card,
#team .team-card.leader-card {
  height: 100%;
  display: flex !important;
  flex-direction: column;
  text-align: left !important;
  padding: 1.5rem !important;
  border-radius: 18px !important;
  background: rgba(30, 41, 59, 0.92) !important;
  border: 1px solid rgba(129, 140, 248, 0.35) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  opacity: 1 !important;
  transform: none !important;
  overflow: hidden;
  position: relative;
}

#team .leader-card.owner {
  background:
    linear-gradient(155deg, rgba(79, 70, 229, 0.22), rgba(15, 23, 42, 0.94) 45%),
    rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(165, 180, 252, 0.42) !important;
}

#team .leader-card.compact {
  padding: 1.3rem 1.4rem !important;
}

#team .leader-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #8b5cf6, #10b981);
  transform: scaleX(1) !important;
}

#team .leader-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(165, 180, 252, 0.55) !important;
}

#team .leader-top {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.95rem;
}

#team .leader-avatar {
  width: 2.85rem;
  height: 2.85rem;
  min-width: 2.85rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
  font-size: 1rem;
}

#team .leader-card.compact .leader-avatar {
  width: 2.55rem;
  height: 2.55rem;
  min-width: 2.55rem;
}

#team .leader-identity h3 {
  margin: 0 0 0.3rem !important;
  font-size: 1.22rem !important;
  font-weight: 700;
  color: #f8fafc !important;
  line-height: 1.25;
}

#team .leader-role {
  color: #a5b4fc !important;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

#team .leader-card p {
  margin: 0 0 1rem !important;
  color: rgba(248, 250, 252, 0.86) !important;
  font-size: 0.94rem !important;
  line-height: 1.6 !important;
  text-align: left !important;
}

#team .leader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

#team .leader-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c7d2fe !important;
  background: rgba(79, 70, 229, 0.18) !important;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

/* ---------- Homepage hero visual ---------- */
.home-hero-visual {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 22px;
  padding: 1.35rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.home-hero-visual .viz-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.85rem;
}

.home-hero-visual .viz-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
}

.home-hero-visual .viz-panel.wide {
  grid-column: 1 / -1;
}

.home-hero-visual .label {
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
}

.home-hero-visual .value {
  color: #f8fafc;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.home-hero-visual .bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 72px;
}

.home-hero-visual .bars span {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #818cf8, #4f46e5);
}

.home-hero-visual .bars span:nth-child(2) { background: linear-gradient(180deg, #34d399, #10b981); height: 78%; }
.home-hero-visual .bars span:nth-child(3) { background: linear-gradient(180deg, #a78bfa, #8b5cf6); height: 92%; }
.home-hero-visual .bars span:nth-child(4) { height: 64%; }
.home-hero-visual .bars span:nth-child(5) { background: linear-gradient(180deg, #34d399, #10b981); height: 84%; }

.home-hero-visual .metric-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.82rem;
}

/* ---------- Insightly OS strip ---------- */
.os-home-strip {
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(15, 23, 42, 0.75)),
    rgba(15, 23, 42, 0.7);
  padding: clamp(1.75rem, 4vw, 2.6rem);
}

.os-home-strip .os-home-copy {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(248, 250, 252, 0.84);
}

/* ---------- Service pages ---------- */
.service-page-hero {
  padding-top: clamp(6.5rem, 10vw, 8rem);
  padding-bottom: clamp(2.75rem, 5vw, 4rem);
  min-height: auto !important;
}

.flow-step {
  height: 100%;
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(17, 24, 39, 0.97));
  border: 1px solid rgba(129, 140, 248, 0.24);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.3);
}

.flow-step h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.45rem;
}

.flow-step p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.94rem;
  line-height: 1.6;
}

.flow-step .step-number {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  color: #fff;
  font-size: 0.9rem;
}

.example-card {
  height: 100%;
  padding: 1.4rem 1.5rem 1.4rem 1.65rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(17, 24, 39, 0.97));
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-left: 3px solid rgba(52, 211, 153, 0.7);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.3);
}

.example-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.example-card p {
  margin: 0;
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.92rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 991.98px) {
  .home-hero-visual {
    margin-top: 1.5rem;
  }

  /* Stacked hero copy + illustration is taller than one screen; a centered 100vh flex box pushes the headline under the fixed navbar. */
  .hero.home-hero-refined {
    height: auto;
    min-height: 0;
    align-items: flex-start;
    padding-top: 6.25rem;
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 767.98px) {
  .navbar .btn.ms-3 {
    margin-left: 0 !important;
    margin-top: 0.75rem;
  }

  .home-hero-visual .viz-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-visual .viz-panel.wide {
    grid-column: auto;
  }

  #team .leader-card {
    padding: 1.25rem !important;
  }

  .cta-buttons .btn {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 400px) {
  .home-hero-refined .hero-content h1,
  .about-hero-refined .hero-title,
  .service-page-hero h1 {
    font-size: clamp(1.85rem, 9vw, 2.2rem);
  }
}


/* ---------- Homepage hero solutions showcase ---------- */
.home-hero-visual.ij-hero-showcase {
  max-width: 560px;
  margin-left: auto;
  padding: 1.35rem 1.35rem 1.15rem;
  background:
    linear-gradient(160deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96)),
    #0f172a;
  border: 1px solid rgba(129, 140, 248, 0.32);
  border-radius: 22px;
  box-shadow:
    0 24px 48px rgba(2, 6, 23, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.ij-hero-showcase__headline {
  margin: 0 0 1rem;
  font-family: Poppins, sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #f8fafc;
}

.ij-hero-showcase__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.ij-hero-sol {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem 0.9rem;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--tone-border, rgba(129, 140, 248, 0.32));
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.25);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.ij-hero-sol:hover,
.ij-hero-sol:focus-visible {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.88);
  border-color: var(--tone, #a5b4fc);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
  outline: none;
  text-decoration: none;
  color: inherit;
}

.ij-hero-sol__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--tone, #a5b4fc);
  background: var(--tone-bg, rgba(79, 70, 229, 0.18));
  border: 1px solid var(--tone-border, rgba(129, 140, 248, 0.35));
}

.ij-hero-sol__icon .ij-icon {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}

.ij-hero-sol__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ij-hero-sol__title {
  font-family: Poppins, sans-serif;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.25;
  color: #f8fafc;
  overflow-wrap: anywhere;
}

.ij-hero-sol__sub {
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(148, 163, 184, 0.95);
}

.ij-hero-showcase__footer {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: rgba(165, 180, 252, 0.85);
}

@media (max-width: 991.98px) {
  .home-hero-visual.ij-hero-showcase {
    margin-left: auto;
    margin-right: auto;
    max-width: 520px;
  }
}

@media (max-width: 575.98px) {
  .home-hero-visual.ij-hero-showcase {
    padding: 1.1rem 1rem 1rem;
    max-width: 100%;
  }

  .ij-hero-showcase__grid {
    gap: 0.6rem;
  }

  .ij-hero-sol {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.8rem;
  }

  .ij-hero-sol__icon {
    width: 36px;
    height: 36px;
  }

  .ij-hero-sol__title {
    font-size: 0.82rem;
  }

  .ij-hero-sol__sub {
    font-size: 0.68rem;
  }
}

.tech-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
}

#training .leader-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c7d2fe;
  background: rgba(79, 70, 229, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.os-home-strip .os-home-copy {
  max-width: 560px;
}

/* ---------- Card system ----------
   Uses ij-* class names on purpose: the legacy .project-card / .project-img /
   .service-card / .service-icon rules in _astro CSS (and main.js inline transforms)
   would otherwise override sizing, backgrounds, and hover behaviour. */
.ij-project-card,
.ij-cap-card {
  --tone: #818cf8;
  --tone-bg: rgba(79, 70, 229, 0.16);
  --tone-border: rgba(129, 140, 248, 0.35);
}

.ij-tone-indigo { --tone: #a5b4fc; --tone-bg: rgba(79, 70, 229, 0.18); --tone-border: rgba(129, 140, 248, 0.38); }
.ij-tone-violet { --tone: #c4b5fd; --tone-bg: rgba(139, 92, 246, 0.17); --tone-border: rgba(167, 139, 250, 0.38); }
.ij-tone-emerald { --tone: #6ee7b7; --tone-bg: rgba(16, 185, 129, 0.14); --tone-border: rgba(52, 211, 153, 0.34); }
.ij-tone-teal { --tone: #5eead4; --tone-bg: rgba(20, 184, 166, 0.14); --tone-border: rgba(45, 212, 191, 0.34); }

.ij-icon {
  display: block;
  flex: none;
}

.ij-project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ij-project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.12);
}

.ij-project-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 120px;
  padding: 0 1.5rem;
  background:
    radial-gradient(circle at 88% 15%, var(--tone-bg), transparent 62%),
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(11, 17, 32, 0.55);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.ij-project-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--tone-bg);
  border: 1px solid var(--tone-border);
  color: var(--tone);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ij-project-icon .ij-icon {
  width: 48px;
  height: 48px;
}

.ij-project-icon .ij-a2 {
  stroke: #34d399;
}

.ij-tone-emerald .ij-project-icon .ij-a2,
.ij-tone-teal .ij-project-icon .ij-a2 {
  stroke: #a78bfa;
}

.ij-eyebrow {
  align-self: flex-start;
  margin-top: 1.1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--tone-border);
  color: var(--tone);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
  text-align: right;
}

.ij-project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.4rem 1.5rem 1.5rem;
}

.ij-project-body h3 {
  margin: 0 0 0.55rem;
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.ij-project-body p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ij-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.ij-project-actions .btn-outline-light {
  border-color: rgba(167, 139, 250, 0.5);
  color: #e0e7ff;
}

.ij-project-actions .btn-outline-light:hover,
.ij-project-actions .btn-outline-light:focus-visible {
  background: rgba(139, 92, 246, 0.2);
  border-color: #a78bfa;
  color: #fff;
}

.ij-cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 180px;
  padding: 1.5rem;
  overflow: hidden;
  text-align: left;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.3);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ij-cap-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--tone), transparent 75%);
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

.ij-cap-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.45);
}

.ij-cap-card:hover::before {
  opacity: 1;
}

.ij-cap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: var(--tone-bg);
  border: 1px solid var(--tone-border);
  color: var(--tone);
}

.ij-cap-icon .ij-icon {
  width: 24px;
  height: 24px;
}

.ij-cap-card h3 {
  margin: 0 0 0.5rem;
  color: #f8fafc;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
}

.ij-cap-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.95rem;
  line-height: 1.6;
}

.ij-cap-card--row {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  min-height: 0;
  padding: 1.35rem 1.4rem;
}

.ij-cap-card--row .ij-cap-icon {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  margin-bottom: 0;
}

.ij-cap-card--row h3 {
  font-size: 1.06rem;
  margin-bottom: 0.35rem;
}

/* Legacy _astro CSS stacks #projects columns at 100% width on tablets. */
@media (min-width: 768px) and (max-width: 991.98px) {
  #projects .row.g-4 {
    flex-direction: row;
  }

  #projects .row.g-4 > .col-md-6.col-lg-4 {
    width: 50%;
    max-width: 50%;
  }
}

@media (max-width: 767.98px) {
  .ij-cap-card {
    min-height: 0;
    padding: 1.35rem 1.25rem;
  }

  .ij-project-visual {
    height: 104px;
    padding: 0 1.25rem;
  }

  .ij-project-icon {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .ij-project-icon .ij-icon {
    width: 44px;
    height: 44px;
  }

  .ij-project-body {
    padding: 1.25rem 1.25rem 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ij-project-card,
  .ij-cap-card {
    transition: none;
  }

  .ij-project-card:hover,
  .ij-cap-card:hover {
    transform: none;
  }
}
