/* Hero variations for heroes.html (local preview). body[data-hero] picks one; "prod" is the live home untouched.
   Desktop only: phones keep the stacked layout from lab-crew.css. */

.hero-pick {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  display: flex;
  gap: 2px;
  padding: 4px;
  translate: -50% 0;
  background: var(--bg);
  border: 1px solid var(--line-subtle);
  box-shadow: 4px 4px 0 var(--surface-subtle);
  font: 500 11px/1 var(--font-mono);
}
.hero-pick a {
  display: flex;
  gap: 6px;
  padding: 7px 10px;
  color: var(--text-nav);
  text-decoration: none;
  white-space: nowrap;
}
.hero-pick i {
  font-style: normal;
  opacity: 0.5;
}
.hero-pick a:hover {
  color: var(--text-heading);
}
.hero-pick a[aria-current] {
  color: #fff;
  background: var(--accent);
}
@media (max-width: 820px) {
  .hero-pick {
    display: none;
  }
}

@media (min-width: 821px) {
  /* The variations start the bio closer to the side nav, where mint's "the big one" label would land on it. */
  body:not([data-hero="prod"]) .cw-pin {
    display: none;
  }

  /* 2 · Airy: the live three columns, with much wider gutters and more room between every block. */
  body[data-hero="airy"] .crew-cluster {
    grid-template-columns: minmax(0, 430px) minmax(0, 340px) minmax(0, 260px);
    column-gap: clamp(72px, 8vw, 150px);
  }
  body[data-hero="airy"] .crew-left {
    gap: 24px;
  }
  body[data-hero="airy"] .crew-about {
    gap: 20px;
    line-height: 1.65;
  }
  body[data-hero="airy"] .crew-about > p:nth-child(4) {
    display: none;
  }
  body[data-hero="airy"] .crew-mid {
    gap: 52px;
  }
  body[data-hero="airy"] .crew-side {
    gap: 52px;
  }
  body[data-hero="airy"] .crew-side .cw-hlist:not(:nth-child(2)) {
    display: none; /* only notes stays, so the side column breathes */
  }

  @media (max-height: 860px) {
    body[data-hero="airy"] .crew-about > p:nth-child(2) {
      display: none; /* short laptops: the long Roblox/Amphi/Infra paragraph goes, the deck below covers it */
    }
  }

  /* 3 · Roomy: three columns, but each holds less: no work list, no side lists, the figure on its own. */
  body[data-hero="roomy"] .crew-cluster {
    grid-template-columns: minmax(0, 470px) minmax(0, 420px) minmax(0, 300px);
    column-gap: clamp(64px, 7vw, 130px);
  }
  body[data-hero="roomy"] .crew-list,
  body[data-hero="roomy"] .crew-side .cw-hlist {
    display: none;
  }
  body[data-hero="roomy"] .crew-about {
    gap: 18px;
  }
  body[data-hero="roomy"] .crew-about > p:nth-child(2) {
    display: none;
  }

  /* 4 · Two up: bio on the left, a bigger project deck on the right, a wide gap between and nothing else. */
  body[data-hero="two"] .crew-cluster {
    grid-template-columns: minmax(0, 500px) minmax(0, 540px);
    column-gap: clamp(90px, 10vw, 180px);
  }
  body[data-hero="two"] .crew-list,
  body[data-hero="two"] .crew-side {
    display: none;
  }
  body[data-hero="two"] .crew-about {
    gap: 18px;
    line-height: 1.65;
  }
  body[data-hero="two"] .crew-about > p:nth-child(2) {
    display: none;
  }

  /* 7 · Two up + list: bio, big deck, and the work list of 9 as three columns that start on one line, each under
     its own label (@soham · featured · work). The list is the deck's index. No circle packing. */
  body[data-hero="list"] .crew-cluster {
    grid-template-columns: minmax(0, 420px) minmax(0, 460px) minmax(0, 320px);
    column-gap: clamp(56px, 5.4vw, 100px);
    align-items: start;
  }
  body[data-hero^="list"] .crew-left {
    position: relative;
  }
  body[data-hero^="list"] .crew-mascot {
    position: absolute; /* sits above the top line instead of pushing the bio down */
    bottom: calc(100% + 14px);
    left: 0;
  }
  body[data-hero^="list"] .crew-mid {
    display: contents; /* deck and list become their own columns */
  }
  body[data-hero^="list"] .cw-deckwrap,
  body[data-hero^="list"] .crew-list {
    margin-top: 18px; /* their labels sit above the frame, level with the @soham line */
  }
  body[data-hero^="list"] .cw-deckwrap {
    position: relative;
  }
  body[data-hero^="list"] .cw-deckwrap::before {
    content: "featured";
    position: absolute;
    bottom: calc(100% + 7px);
    left: -1px;
    color: var(--text-nav);
    font: 500 10.5px/1 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  body[data-hero^="list"] .crew-side {
    display: none;
  }
  body[data-hero^="list"] .crew-about {
    gap: 18px;
    line-height: 1.65;
  }
  body[data-hero^="list"] .crew-about > p:nth-child(2) {
    display: none;
  }

  /* 8 · Index: the list moves to the middle as a table of contents, and the deck on the right gets bigger. */
  body[data-hero="list-index"] .crew-cluster {
    grid-template-columns: minmax(0, 420px) minmax(0, 320px) minmax(0, 500px);
    column-gap: clamp(56px, 5vw, 96px);
    align-items: start;
  }
  body[data-hero="list-index"] .crew-list {
    order: 1;
  }
  body[data-hero="list-index"] .cw-deckwrap {
    order: 2;
  }

  /* 9 · Stack: bio on the left; on the right one work column, the deck over the list, the list in two columns. */
  body[data-hero="list-stack"] .crew-cluster {
    grid-template-columns: minmax(0, 460px) minmax(0, 600px);
    column-gap: clamp(80px, 8vw, 150px);
    align-items: start;
  }
  body[data-hero="list-stack"] .crew-mid {
    display: flex;
    gap: 44px;
  }
  body[data-hero="list-stack"] .cw-deckwrap {
    width: min(100%, 440px);
  }
  body[data-hero="list-stack"] .crew-list {
    display: block;
    columns: 2;
    column-gap: 28px;
  }
  body[data-hero="list-stack"] .crew-list .crew-row {
    break-inside: avoid;
  }
  body[data-hero="list-stack"] .crew-list .crew-group:nth-of-type(2) {
    break-before: column; /* building | research, competitions */
  }

  /* 10 · Masthead: the name runs large across the top, then bio, deck and list share the line under it. */
  body[data-hero="list-top"] .crew-cluster {
    grid-template-columns: minmax(0, 400px) minmax(0, 440px) minmax(0, 320px);
    grid-template-areas: "kick kick kick" "name name name" "about deck work";
    column-gap: clamp(56px, 5.4vw, 100px);
    align-items: start;
  }
  body[data-hero="list-top"] .crew-left {
    display: contents;
  }
  body[data-hero="list-top"] .crew-left > .cw-kick {
    grid-area: kick;
  }
  body[data-hero="list-top"] .crew-mascot {
    position: static;
    grid-area: name;
    justify-self: end;
    align-self: center;
  }
  body[data-hero="list-top"] .crew-name {
    grid-area: name;
    margin: 6px 0 40px;
    font-size: clamp(76px, 8vw, 128px);
    letter-spacing: -0.035em;
  }
  body[data-hero="list-top"] .crew-about {
    grid-area: about;
    margin-top: 18px;
  }
  body[data-hero="list-top"] .crew-about > p:nth-child(4) {
    display: none;
  }
  body[data-hero="list-top"] .cw-deckwrap {
    grid-area: deck;
  }
  body[data-hero="list-top"] .crew-list {
    grid-area: work;
  }

  /* 12 · Masthead + index: the big name across the top with the mascot right after it, then 8's order under it
     (bio and list together, the deck on the right). */
  body[data-hero^="list-mast"] .crew-cluster {
    position: relative;
    grid-template-columns: minmax(0, 420px) minmax(0, 360px) minmax(0, 460px);
    grid-template-areas: "kick kick kick" "name name name" "about work deck";
    column-gap: clamp(56px, 5vw, 96px);
    align-items: start;
  }
  body[data-hero^="list-mast"] .crew-left {
    display: contents;
  }
  body[data-hero^="list-mast"] .crew-left > .cw-kick {
    grid-area: kick;
  }
  body[data-hero^="list-mast"] .crew-name {
    grid-area: name;
    margin: 6px 0 36px;
    font-size: clamp(76px, 8vw, 128px);
    letter-spacing: -0.035em;
    anchor-name: --hero-name;
  }
  body[data-hero^="list-mast"] .crew-mascot {
    position: absolute; /* pinned just past "Gugale", centred on the name's line */
    position-anchor: --hero-name;
    left: calc(anchor(right) + 56px); /* room for soham's cursor, which rests at the end of the name */
    top: anchor(center);
    bottom: auto;
    translate: 0 -50%;
  }
  @media (max-width: 1099px) {
    /* Tablets: the same bio + deck split as smaller laptops (below), with a smaller name and a touch smaller bio
       (no 90% zoom here, so 17px is already bigger on screen than the laptop's). */
    body[data-hero^="list-mast"] .crew-name {
      margin-bottom: 20px;
      font-size: 64px !important;
    }
    body[data-hero^="list-mast"] .crew-about {
      font-size: 17px !important;
      gap: 14px !important;
    }
  }
  @supports not (anchor-name: --a) {
    /* No anchor positioning (Firefox): the mascot sits in the name row's free space, a little past the name. */
    body[data-hero^="list-mast"] .crew-mascot {
      position: static;
      grid-area: name;
      justify-self: end;
      align-self: center;
      translate: none;
    }
  }
  body[data-hero^="list-mast"] .crew-about {
    grid-area: about;
    margin-top: 18px;
  }
  body[data-hero^="list-mast"] .crew-about > p:nth-child(4) {
    display: none;
  }
  body[data-hero^="list-mast"] .crew-list {
    grid-area: work;
  }
  body[data-hero^="list-mast"] .cw-deckwrap {
    grid-area: deck;
  }

  /* 13 · Even: 12, with all three columns stretched to the list's height. The links drop to the bottom of the bio
     and the deck's arrows to the bottom of the deck, so the last list row, the links and the arrows share a line. */
  body:is([data-hero="list-mast-even"], [data-hero="list-mast-cards"]) .crew-cluster {
    align-items: stretch;
  }
  body:is([data-hero="list-mast-even"], [data-hero="list-mast-cards"]) .crew-about {
    display: flex;
    flex-direction: column;
  }
  body:is([data-hero="list-mast-even"], [data-hero="list-mast-cards"]) .crew-about .lab-socials {
    margin-top: auto;
  }
  body:is([data-hero="list-mast-even"], [data-hero="list-mast-cards"]) .cw-deck-nav {
    margin-top: auto;
  }

  /* Bigger reading sizes for the masthead layouts: the page runs at 90% zoom on laptops, and the short-screen
     rules in lab-crew.css shrank the bio to ~13.5px on screen. The name gives up some size to pay for it. */
  body[data-hero^="list-mast"] .crew-name {
    font-size: clamp(68px, 6.4vw, 104px);
  }
  body[data-hero^="list-mast"] .crew-about {
    gap: 18px;
    font-size: 20px;
    line-height: 1.6;
  }
  body[data-hero^="list-mast"] .crew-about .lab-socials a {
    font-size: 15px;
  }
  body[data-hero^="list-mast"] .crew-list .crew-row .work-name {
    font-size: 18.5px;
  }
  body[data-hero^="list-mast"] .crew-list .crew-role,
  body[data-hero^="list-mast"] .crew-group,
  body[data-hero^="list-mast"] .cw-label,
  body[data-hero^="list-mast"] .cw-deckwrap::before,
  body[data-hero^="list-mast"] .crew-left > .cw-kick {
    font-size: 11.5px;
  }
  body[data-hero^="list-mast"] .crew-cap .work-name {
    font-size: 22px;
  }

  /* Smaller laptops: no room for three readable columns, so the work list goes (the Projects tab has it) and the
     bio and deck split the line. */
  @media (max-width: 1499px) {
    body[data-hero^="list-mast"] .crew-cluster {
      grid-template-columns: minmax(0, 520px) minmax(0, 500px);
      grid-template-areas: "kick kick" "name name" "about deck";
      column-gap: clamp(64px, 7vw, 120px);
    }
    body[data-hero^="list-mast"] .crew-list {
      display: none;
    }
  }

  /* 14 · Cards: Even, with the bio and the deck framed like the list, so the three read as equal tiles. */
  body[data-hero="list-mast-cards"] .crew-about,
  body[data-hero="list-mast-cards"] .cw-deckwrap {
    position: relative;
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--line-subtle);
  }
  body[data-hero="list-mast-cards"] .crew-about::before {
    content: "about";
    position: absolute;
    bottom: calc(100% + 7px);
    left: -1px;
    color: var(--text-nav);
    font: 500 10.5px/1 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  /* 11 · Band: bio and a big deck side by side, the list of 9 as a wide band under both, one group per column. */
  body[data-hero="list-band"] .crew-cluster {
    grid-template-columns: minmax(0, 480px) minmax(0, 520px);
    column-gap: clamp(80px, 9vw, 160px);
    row-gap: 40px;
    align-items: start;
  }
  body[data-hero="list-band"] .crew-list {
    grid-column: 1 / -1;
    display: block;
    columns: 3;
    column-gap: 40px;
  }
  body[data-hero="list-band"] .crew-list .crew-row {
    break-inside: avoid;
  }
  body[data-hero="list-band"] .crew-list .crew-group:not(:first-of-type) {
    break-before: column;
  }
  body[data-hero="list-band"] .crew-about > p:nth-child(4) {
    display: none;
  }

  /* 5 · Poster: the name runs huge across the top, then three short columns under it. */
  body[data-hero="poster"] .crew-cluster {
    grid-template-columns: minmax(0, 440px) minmax(0, 360px) minmax(0, 280px);
    grid-template-areas: "kick kick kick" "name name name" "about mid side";
    column-gap: clamp(64px, 6vw, 120px);
    align-items: start;
  }
  body[data-hero="poster"] .crew-left {
    display: contents;
  }
  body[data-hero="poster"] .crew-left > .cw-kick {
    grid-area: kick;
    margin-bottom: 10px;
  }
  body[data-hero="poster"] .crew-mascot {
    grid-area: name;
    justify-self: end;
    align-self: center;
  }
  body[data-hero="poster"] .crew-name {
    grid-area: name;
    margin-bottom: 44px;
    font-size: clamp(84px, 9vw, 148px);
    letter-spacing: -0.035em;
  }
  body[data-hero="poster"] .crew-about {
    grid-area: about;
    gap: 16px;
  }
  body[data-hero="poster"] .crew-about > p:nth-child(2),
  body[data-hero="poster"] .crew-about > p:nth-child(4),
  body[data-hero="poster"] .crew-list,
  body[data-hero="poster"] .crew-side .cw-hlist {
    display: none;
  }
  body[data-hero="poster"] .crew-mid {
    grid-area: mid;
  }
  body[data-hero="poster"] .crew-side {
    grid-area: side;
  }

  /* 6 · Column: one centered column, just the name, the bio and the links, with lots of empty page around it. */
  body[data-hero="column"] .crew-cluster {
    grid-template-columns: minmax(0, 580px);
  }
  body[data-hero="column"] .crew-mid,
  body[data-hero="column"] .crew-side {
    display: none;
  }
  body[data-hero="column"] .crew-left {
    gap: 22px;
  }
  body[data-hero="column"] .crew-name {
    font-size: clamp(64px, 6.4vw, 96px);
  }
  body[data-hero="column"] .crew-about {
    gap: 20px;
    font-size: 17px;
    line-height: 1.7;
  }
  body[data-hero="column"] .crew-about > p:nth-child(2) {
    display: none;
  }
}
