/* Home page. The largest of the seven — mirrors issgjs/src/app/page.tsx.
   Sections sit at 0.88 alpha so the fixed circuit board shows through. */

.home {
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* --- Circuit board background ------------------------------------------- */

/* Fixed, so it stays put while the page scrolls over it. */
.circuit {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.12;
  pointer-events: none;
  overflow: hidden;
}
.circuit svg {
  width: 100%;
  height: 100%;
}

.circuit .trace {
  fill: none;
  stroke: #a8c4d8;
  stroke-width: 1.5;
  stroke-dasharray: 12 8;
  animation: dash-flow 3s linear infinite;
}
.circuit .trace-slow {
  fill: none;
  stroke: #a8c4d8;
  stroke-width: 1;
  stroke-dasharray: 8 14;
  animation: dash-flow-slow 5s linear infinite;
}
.circuit .node {
  fill: #c6dce8;
  animation: node-pulse 2.5s ease-in-out infinite;
}

@keyframes dash-flow {
  from { stroke-dashoffset: 300; }
  to   { stroke-dashoffset: 0; }
}
@keyframes dash-flow-slow {
  from { stroke-dashoffset: 500; }
  to   { stroke-dashoffset: 0; }
}
@keyframes node-pulse {
  0%, 100% { opacity: 0.4; r: 3; }
  50%      { opacity: 1;   r: 5; }
}

@media (prefers-reduced-motion: reduce) {
  .circuit .trace,
  .circuit .trace-slow,
  .circuit .node {
    animation: none;
  }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
@media (min-width: 48em) {
  .hero {
    min-height: 85vh;
  }
}

.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* One wide flex track carrying all five images, slid by transform. */
.hero__track {
  display: flex;
  height: 100%;
  transition: transform 1s ease-in-out;
}
.hero__track img {
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.hero__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}
.hero__dots button {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.3s, background 0.3s;
}
.hero__dots button.is-active {
  width: 24px;
  background: #fff;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(19, 30, 46, 0.88) 0%,
    rgba(19, 30, 46, 0.55) 60%,
    rgba(19, 30, 46, 0.2) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 3;
  padding-block: 6rem;
}
@media (min-width: 48em) {
  .hero__inner {
    padding-block: 0;
  }
}

.hero__copy {
  max-width: 100%;
}
@media (min-width: 48em) {
  .hero__copy {
    max-width: 55%;
  }
}

.hero__kicker {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.64);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 1.5rem;
}
@media (min-width: 48em) {
  .hero h1 {
    font-size: 3.75rem;
  }
}

.hero__lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
  line-height: 1.625;
  max-width: 36rem;
}
@media (min-width: 48em) {
  .hero__lead {
    font-size: 1.25rem;
  }
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Translucent section backgrounds ------------------------------------ */

.band--white { background: rgba(255, 255, 255, 0.88); }
.band--tint  { background: rgba(238, 244, 251, 0.88); }
.band--blue  { background: rgba(230, 240, 248, 0.88); }

/* --- Latest news + event strip ------------------------------------------ */

.latest {
  padding-block: 4rem;
}
.latest__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 48em) {
  .latest__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.latest__item {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem;
  border-radius: var(--radius-xl);
  transition: background 0.2s;
}
.latest__item:hover {
  background: var(--gray-50);
}

.latest__thumb {
  position: relative;
  width: 80px;
  height: 70px;
  flex-shrink: 0;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
@media (min-width: 48em) {
  .latest__thumb {
    width: 120px;
    height: 90px;
  }
}

/* Nine-cell checkerboard for a news item with no image. */
.latest__checker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100%;
}
.latest__checker i:nth-child(odd) { background: var(--gray-200); }
.latest__checker i:nth-child(even) { background: #fff; }

.latest__title {
  font-weight: 600;
  color: var(--issg-dark);
}
.latest__sub {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

/* --- Stats strip -------------------------------------------------------- */

.stats {
  background: var(--issg-dark);
}
.stats__row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-xl);
  transition: background 0.25s, transform 0.25s;
}
.stat:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
}
@media (min-width: 48em) {
  .stat {
    padding: 2.5rem 3rem;
  }
}

.stat__value {
  font-weight: 900;
  font-size: 2.25rem;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.5rem;
}
@media (min-width: 48em) {
  .stat__value {
    font-size: 4.5rem;
  }
}

.stat__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
@media (min-width: 48em) {
  .stat__label {
    font-size: 0.875rem;
  }
}

.stats__divider {
  display: none;
}
@media (min-width: 48em) {
  .stats__divider {
    display: block;
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }
}

/* --- Research focus cards ----------------------------------------------- */

.focus {
  padding-block: 4rem;
}
@media (min-width: 48em) {
  .focus {
    padding-block: 6rem;
  }
}

.focus__head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.focus__head h2 {
  color: var(--issg-dark);
}

.focus__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 48em) {
  .focus__grid {
    gap: 1rem;
  }
}
@media (min-width: 62em) {
  .focus__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.focus-card {
  position: relative;
  height: 160px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
}
@media (min-width: 48em) {
  .focus-card { height: 260px; }
}
@media (min-width: 62em) {
  .focus-card { height: 320px; }
}

.focus-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.focus-card:hover img {
  transform: scale(1.05);
}

.focus-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(19, 30, 46, 0.92) 0%,
    rgba(19, 30, 46, 0.3) 60%,
    transparent 100%
  );
}

.focus-card__body {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
}
@media (min-width: 48em) {
  .focus-card__body {
    padding: 1.5rem;
  }
}

.focus-card__number {
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.16);
  line-height: 1;
  margin-bottom: 0.25rem;
}
@media (min-width: 48em) {
  .focus-card__number {
    font-size: 2.25rem;
  }
}

.focus-card__title {
  font-size: 0.875rem;
  line-height: 1.2;
  color: #fff;
}
@media (min-width: 48em) {
  .focus-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
}

.focus-card__desc {
  display: none;
}
@media (min-width: 48em) {
  .focus-card__desc {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.625;
  }
}

/* --- About block -------------------------------------------------------- */

.home-about {
  padding-block: 3rem;
}
@media (min-width: 48em) {
  .home-about {
    padding-block: 4rem;
  }
}

.home-about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 48em) {
  .home-about__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

.home-about__col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}
.home-about__col h2 {
  color: var(--issg-dark);
  line-height: 1.25;
}
.home-about__col > p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.625;
}

.mini-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}
.mini-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: var(--issg-accent-dark);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.mini-card__label--wide {
  margin-bottom: 0.75rem;
}
.mini-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.625;
}
.mini-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}
.mini-card li {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* --- Featured projects -------------------------------------------------- */

.featured {
  padding-block: 3rem;
}
@media (min-width: 48em) {
  .featured {
    padding-block: 4rem;
  }
}

.featured__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.featured__head h2 {
  color: var(--issg-dark);
  margin-bottom: 1rem;
}
.featured__head .eyebrow {
  margin-bottom: 0.5rem;
}
.featured__sub {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 36rem;
}

.featured__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 62em) {
  .featured__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Home project card */
.project-card {
  max-width: 24rem;
  width: 100%;
  background: #fff;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--issg-sage);
}

.project-card__media {
  position: relative;
  height: 200px;
  background: var(--gray-100);
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card__media .badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
}
.project-card__admin {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.project-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.project-card__title {
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--gray-700);
}
.project-card__summary {
  color: var(--gray-600);
  font-size: 0.875rem;
}
.project-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-card__team {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* --- Recent publications ------------------------------------------------ */

.recent {
  padding-block: 3rem;
}
@media (min-width: 48em) {
  .recent {
    padding-block: 4rem;
  }
}

.recent__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
}
.recent__head h2 {
  color: var(--issg-dark);
  margin-bottom: 0.5rem;
}
.recent__head p {
  color: var(--gray-500);
}

.recent__list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-row {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.pub-row:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(8px);
  border-color: var(--issg-sage);
}
@media (min-width: 48em) {
  .pub-row {
    padding: 2rem;
  }
}

.pub-row__icon {
  display: flex;
  padding: 0.75rem;
  background: var(--issg-background);
  border-radius: var(--radius-xl);
  margin-right: 0.75rem;
  color: var(--issg-dark);
  flex-shrink: 0;
}
@media (min-width: 48em) {
  .pub-row__icon {
    padding: 1rem;
    margin-right: 1.5rem;
  }
}

.pub-row__body {
  flex: 1;
  min-width: 0;
}
.pub-row__title {
  font-size: 0.875rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--issg-dark);
}
@media (min-width: 48em) {
  .pub-row__title {
    font-size: 1.25rem;
  }
}
.pub-row__authors {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.pub-row__link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: var(--issg-accent-dark);
  border-radius: var(--radius-md);
  transition: background 0.2s;
}
.pub-row__link:hover {
  background: var(--gray-50);
}

/* --- Contact ------------------------------------------------------------ */

.home-contact {
  padding-block: 5rem;
}
@media (min-width: 48em) {
  .home-contact {
    padding-block: 8rem;
  }
}

.home-contact__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 5rem;
}
.home-contact__head h2 {
  color: var(--issg-dark);
}
.home-contact__head p {
  font-size: 1.25rem;
  color: var(--gray-500);
  max-width: 42rem;
}
