/* ==========================================================================
   profile.css
   Styles used only on the Research Profile page (profile.html).
   Figures and the figure viewer: components.css section 8.
   ========================================================================== */

.profile {
  padding-top: .5rem;
}

.page-sub .icon {
  margin: 0 .35rem;
  font-size: .7em;
  color: var(--icon);
}

/* opening lines */
.profile-lead {
  max-width: 44rem;
  margin-bottom: 1.5rem;
}

.profile-lead p {
  margin: 0 0 .9rem;
  font-size: var(--fs-sub);
  line-height: 1.5;
}

.profile-lead p + p {
  font-size: var(--fs-body);
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Research lines: text beside a main figure, a strip of figures below;
   the sides alternate from line to line
   -------------------------------------------------------------------------- */

.line {
  display: grid;
  padding-top: .25rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  grid-template-areas:
    "text  main"
    "strip strip";
  gap: 2rem clamp(2rem, 5vw, 4rem);
}

.line.is-flipped {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  grid-template-areas:
    "main  text"
    "strip strip";
}

.line-text  { grid-area: text; }
.line-main  { grid-area: main; }
.line-strip { grid-area: strip; }


.line-text p {
  margin: 0;
  line-height: 1.65;
  color: var(--ink-soft);
}

.line-text .first {                    /* the first sentence, a little stronger */
  font-size: 1.08em;
  font-weight: 500;
  color: var(--ink);
}

/* the line's outside link: below the main figure, at its right edge, the same place in every line */
.line-link {
  justify-content: flex-end;
  margin-top: .9rem;
}

.line-link .link-tag .icon {
  margin-left: .2rem;
  font-size: .75em;
}

/* the strip: small plates, all the same size — enough to show there is more to open, not to read
   (Mehul, 7 October 2026) — together on a soft tray so they read as one group */
.line-strip {
  display: grid;
  grid-template-columns: repeat(4, 7.25rem);
  gap: .6rem;
  justify-self: start;
  padding: .6rem;
  background: var(--tray-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.line-strip .fig img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-color: rgba(28, 29, 26, .1);
  border-radius: 8px;
}

/* each figure its own thing to click: pointed at (or reached by keyboard) it lifts a little, with a soft
   shadow and its full colour; the main figure lifts more gently */
.line a.fig {
  border-radius: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.line a.fig:hover,
.line a.fig:focus-visible {
  position: relative;
  z-index: 1;
  transform: translateY(-3px) scale(1.06);
  box-shadow: var(--pop-shadow);
}

.line-main a.fig:hover,
.line-main a.fig:focus-visible {
  transform: translateY(-2px) scale(1.015);
}

.line a.fig:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .line a.fig,
  .line a.fig:hover,
  .line a.fig:focus-visible {
    transform: none;
    transition: none;
  }
}

/* a figure's frame, with "+n" when the line has more figures than places */
.fig-frame {
  position: relative;
  display: block;
}

.fig-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 72%, transparent);
  border-radius: 10px;
}

.fig.is-placeholder img {
  object-fit: cover;
}

@media (max-width: 820px) {
  .line,
  .line.is-flipped {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "main"
      "strip";
  }

  .line-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-self: stretch;
    gap: .5rem;
    padding: .5rem;
  }
}

/* --------------------------------------------------------------------------
   Lab activities / approach: six blocks, each with its icon in a soft circle
   -------------------------------------------------------------------------- */

.act-grid {
  display: grid;
  padding-top: .25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.25rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.act-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;                       /* a touch bigger (Mehul, 7 October 2026; was 2.75rem) */
  height: 3.1rem;
  margin-bottom: .9rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 50%;
}

.act-icon .icon {
  font-size: 1.2rem;                   /* the icon inside (was 1rem) */
}

.act h3 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.act p {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .act-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .act-grid {
    grid-template-columns: 1fr;
  }
}
