/* iCEM Projects — one-page ongoing programmes */

.icem-proj-hero {
  position: relative;
}

.icem-proj-hero-orbit {
  position: absolute;
  left: 4%;
  top: 52%;
  width: min(20rem, 34vw);
  height: min(20rem, 34vw);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.icem-proj-ring {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(230, 138, 46, 0.35);
  border-radius: 50%;
  animation: icem-proj-spin 22s linear infinite;
}

.icem-proj-ring.is-slow {
  inset: 0;
  border-color: rgba(255, 255, 255, 0.16);
  animation-duration: 36s;
  animation-direction: reverse;
}

.icem-proj-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin: -0.275rem;
  border-radius: 50%;
  background: var(--icem-accent, #e68a2e);
  box-shadow: 0 0 0 6px rgba(230, 138, 46, 0.18);
  transform: rotate(calc(var(--i) * 90deg)) translate(min(11rem, 19vw)) rotate(calc(var(--i) * -90deg));
  animation: icem-proj-pulse 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.35s);
}

@keyframes icem-proj-spin {
  to { transform: rotate(360deg); }
}

@keyframes icem-proj-pulse {
  0%, 100% { opacity: 0.55; transform: rotate(calc(var(--i) * 90deg)) translate(min(11rem, 19vw)) rotate(calc(var(--i) * -90deg)) scale(1); }
  50% { opacity: 1; transform: rotate(calc(var(--i) * 90deg)) translate(min(11rem, 19vw)) rotate(calc(var(--i) * -90deg)) scale(1.25); }
}

.icem-proj-hero-inner,
.icem-proj-hero .icem-about-hero-inner {
  position: relative;
  z-index: 1;
}

.icem-proj-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-top: 1.6rem;
}

.icem-proj-hero-stats div {
  display: grid;
  gap: 0.15rem;
}

.icem-proj-hero-stats strong {
  font-family: var(--heading-font);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1;
  color: #fff;
}

.icem-proj-hero-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Pipeline */
.icem-proj-pipeline {
  background: #161310;
  color: #f4f0ea;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.icem-proj-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.icem-proj-steps li {
  position: relative;
  padding-right: 0.5rem;
}

.icem-proj-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.7rem;
  right: -0.35rem;
  width: 1.1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(230, 138, 46, 0.7), transparent);
}

.icem-proj-steps span {
  display: block;
  color: var(--icem-accent, #e68a2e);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.icem-proj-steps strong {
  display: block;
  margin: 0.2rem 0 0.25rem;
  color: #fff;
  font-size: 1.02rem;
}

.icem-proj-steps em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  line-height: 1.45;
}

/* Explorer — list + one open file */
.icem-proj-explorer-band {
  background: #141210;
  color: #f4f0ea;
  padding-top: 2.75rem;
  padding-bottom: 3.25rem;
  scroll-margin-top: calc(var(--icem-chrome-offset, 6.5rem) + 1rem);
}

.icem-proj-explorer-band .icem-about-topo {
  background:
    radial-gradient(ellipse at 12% 18%, rgba(230, 138, 46, 0.14), transparent 42%),
    repeating-linear-gradient(-18deg, transparent 0 14px, rgba(255, 255, 255, 0.03) 14px 15px);
}

.icem-proj-explorer-band .icem-about-section-head h2 {
  color: #fff;
}

.icem-proj-explorer-band .icem-kicker {
  color: var(--icem-accent, #e68a2e);
}

.icem-proj-count {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.icem-proj-shell {
  display: grid;
  grid-template-columns: minmax(16.5rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
  min-height: 34rem;
  align-items: stretch;
}

.icem-proj-index {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #1c1916;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.icem-proj-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
}

.icem-proj-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
}

.icem-proj-search input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.icem-proj-index-list {
  overflow-y: auto;
  max-height: min(38rem, 70vh);
  padding: 0.4rem;
  display: grid;
  gap: 0.3rem;
  align-content: start;
}

.icem-proj-item {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  padding: 0.7rem 0.65rem;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.icem-proj-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.icem-proj-item.is-active {
  background: rgba(230, 138, 46, 0.14);
  border-color: rgba(230, 138, 46, 0.4);
}

.icem-proj-item.is-hidden {
  display: none;
}

.icem-proj-item-num {
  font-family: var(--heading-font);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
}

.icem-proj-item.is-active .icem-proj-item-num {
  color: var(--icem-accent, #e68a2e);
}

.icem-proj-item-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.icem-proj-item-body strong {
  font-size: 0.88rem;
  line-height: 1.25;
}

.icem-proj-item-body em {
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}

.icem-proj-stage {
  position: relative;
  min-height: 0;
  background: #1c1916;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.icem-proj-chapter {
  display: none;
  grid-template-columns: minmax(13rem, 0.4fr) minmax(0, 1fr);
  height: 100%;
  min-height: 34rem;
}

.icem-proj-chapter.is-open {
  display: grid;
  animation: icem-proj-fade 0.35s ease;
}

@keyframes icem-proj-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.icem-proj-visual {
  position: relative;
  min-height: 14rem;
  overflow: hidden;
  background: #0e0c0b;
}

.icem-proj-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.icem-proj-visual-idx {
  position: absolute;
  top: 0.75rem;
  left: 0.85rem;
  z-index: 1;
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.28);
}

.icem-proj-visual-tag {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  background: rgba(20, 18, 16, 0.72);
  border: 1px solid rgba(230, 138, 46, 0.45);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.icem-proj-copy {
  padding: 1.15rem 1.2rem 1.25rem;
  overflow-y: auto;
  max-height: min(38rem, 70vh);
}

.icem-proj-copy-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.icem-proj-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.icem-proj-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.icem-proj-status {
  color: #b7ebc9 !important;
  border-color: rgba(47, 158, 98, 0.45) !important;
}

.icem-proj-pager {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.icem-proj-pager-btn {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.icem-proj-pager-btn:hover {
  background: rgba(230, 138, 46, 0.2);
  border-color: rgba(230, 138, 46, 0.5);
}

.icem-proj-copy h3 {
  margin: 0 0 0.45rem;
  color: #fff;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}

.icem-proj-lead {
  margin: 0 0 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.55;
}

.icem-proj-role {
  margin-bottom: 0.95rem;
  padding: 0.75rem 0.85rem;
  background: rgba(230, 138, 46, 0.1);
  border-left: 3px solid var(--icem-accent, #e68a2e);
}

.icem-proj-role h4,
.icem-proj-cols h4 {
  margin: 0 0 0.35rem;
  color: var(--icem-accent, #e68a2e);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.icem-proj-role p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  line-height: 1.5;
}

.icem-proj-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.2rem;
}

.icem-proj-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.38rem;
}

.icem-proj-cols li {
  position: relative;
  padding-left: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  line-height: 1.4;
}

.icem-proj-cols li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: var(--icem-accent, #e68a2e);
}

.icem-proj-live {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #2f9e62;
  box-shadow: 0 0 0 0 rgba(47, 158, 98, 0.55);
  animation: icem-proj-live 1.8s ease-out infinite;
}

@keyframes icem-proj-live {
  0% { box-shadow: 0 0 0 0 rgba(47, 158, 98, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(47, 158, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 158, 98, 0); }
}

@media (max-width: 991.98px) {
  .icem-proj-hero-orbit {
    opacity: 0.28;
  }

  .icem-proj-steps {
    grid-template-columns: 1fr 1fr;
  }

  .icem-proj-steps li:nth-child(2)::after {
    display: none;
  }

  .icem-proj-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .icem-proj-index-list {
    max-height: 14.5rem;
  }

  .icem-proj-chapter,
  .icem-proj-chapter.is-open {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .icem-proj-visual {
    min-height: 12.5rem;
  }

  .icem-proj-copy {
    max-height: none;
  }
}

@media (max-width: 575.98px) {
  .icem-proj-steps {
    grid-template-columns: 1fr;
  }

  .icem-proj-steps li::after {
    display: none;
  }

  .icem-proj-cols {
    grid-template-columns: 1fr;
  }

  .icem-proj-hero-orbit {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .icem-proj-ring,
  .icem-proj-node,
  .icem-proj-live,
  .icem-proj-chapter.is-open {
    animation: none !important;
  }
}
