/* amittechguy.in, 3D branch. Loaded after site.css.
   The page is a list of "beats": one small panel of words each. With html.gl a fixed canvas shows the world behind
   them and each panel pins to the corner while its beat scrolls past. Without html.gl the same panels stack as cards. */

:root { --pin: 28px; --sky: #e8f0fa; }
html:not(.gl) .only3d { display: none !important; }
.gl .only2d { display: none !important; }

/* ---------- words inside a panel (both views) ---------- */
.panel { --edge: color-mix(in srgb, var(--line) 32%, #fff); }
.panel h3 { font-size: 1.34rem; font-weight: 740; line-height: 1.2; }
.panel p { font-size: 1.02rem; line-height: 1.5; margin: 8px 0 0; }
.panel .when, .panel time { display: block; font-stretch: 90%; font-weight: 650; color: var(--ink-2); font-size: .92rem; line-height: 1.3; margin: 0 0 2px; }
.panel .meta { color: var(--ink-2); font-size: .95rem; font-stretch: 94%; margin: 3px 0 0; }
.panel .stack { color: var(--ink-2); font-size: .92rem; font-stretch: 94%; margin-top: 10px; }
.panel .tag { font-size: 1.1rem; font-weight: 560; line-height: 1.3; margin: 4px 0 0; color: var(--deep, var(--ink)); }
.panel .small { font-size: .9rem; color: var(--ink-2); line-height: 1.45; margin-top: 12px; }
.panel .foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 14px 0 0; }
.panel .chips { margin-top: 12px; }
.panel .say { margin-top: 10px; }
.kick { display: flex; align-items: center; gap: 9px; font-weight: 720; font-size: .95rem !important; margin: 0 0 10px !important; }
.kick::before { content: ""; flex: none; width: 24px; height: 9px; border-radius: 5px; background: var(--line); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ink) 22%, transparent); }
.gl .pics { display: grid; gap: 6px; margin-top: 8px; }
.gl .pics .shot figcaption { font-size: 1.02rem; color: var(--ink); margin: 0; padding-left: 18px; position: relative; line-height: 1.45; }
.gl .pics .shot figcaption::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }

/* a short run of stops on one line */
.mini { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 14px; }
.mini::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 7px; border-radius: 4px; background: var(--line); }
.mini li { position: relative; }
.mini li::before { content: ""; position: absolute; left: -28px; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-sizing: border-box; }
.mini li.now::before { background: var(--yellow); }
.mini.future::before { background: repeating-linear-gradient(to bottom, var(--line) 0 7px, transparent 7px 13px); }
.mini.future li::before { border-style: dashed; }
.mini h3 { font-size: 1.14rem; }
.mini p { font-size: .98rem; margin: 3px 0 0; line-height: 1.45; }

.panel .ticks { margin-top: 12px; gap: 8px; max-width: none; }
.panel .ticks li { font-size: 1rem; line-height: 1.42; padding-left: 28px; }
.panel .ticks li::before { width: 15px; height: 15px; border-width: 4px; }
.panel .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.panel .figures li { padding: 12px 14px; border-radius: 14px; }
.panel .figures strong { font-size: 1.9rem; }
.panel .figures span { font-size: .9rem; margin-top: 4px; }
.panel .facts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.panel .facts li { padding: 12px 14px; border-radius: 14px; }
.panel .facts strong { font-size: 1.7rem; margin-bottom: 3px; }
.panel .facts span { font-size: .95rem; }
.facts-dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: .96rem; line-height: 1.4; }
.facts-dl dt { color: var(--ink-2); font-stretch: 90%; font-weight: 600; }
.facts-dl dd { margin: 0; font-weight: 540; }
.pairs { margin: 12px 0 0; display: grid; gap: 9px; }
.pairs dt { font-weight: 730; font-size: 1.02rem; line-height: 1.25; color: var(--deep, var(--ink)); }
.pairs dd { margin: 1px 0 0; color: var(--ink-2); font-size: .96rem; line-height: 1.42; }
.steps { list-style: none; counter-reset: s; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { position: relative; padding-left: 42px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1.5px var(--ink); display: grid; place-items: center; font-weight: 750; font-size: .95rem; }
.steps b { display: block; font-size: 1.08rem; }
.steps span { display: block; color: var(--ink-2); font-size: .96rem; line-height: 1.42; }
.panel .phd-title { font-size: 1.22rem; line-height: 1.22; max-width: none; margin: 0; }
.panel .chart { border: 0; padding: 0; margin: 0; max-width: none; background: none; }
.panel .chart h3 { font-size: 1.2rem; margin-bottom: 6px; }
.chart-table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.chart-table th { text-align: left; font-weight: 650; color: var(--ink-2); padding: 3px 0; border-bottom: 1px solid var(--rule); }
.chart-table td { text-align: right; font-weight: 720; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.panel .notes-list { gap: 10px; }
.panel .notes-list li { padding: 12px 14px 13px; border-radius: 14px; }
.panel .notes-list h3 { font-size: 1.12rem; margin: 1px 0 3px; }
.panel .notes-list h3 a { text-decoration: none; }
.panel .notes-list h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.panel .notes-list li:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.panel .notes-list p { font-size: .94rem; margin: 0; }
.panel .listen { margin-top: 10px; }

/* screens: buttons that put a picture on the screen in the scene (3D) or swap the big picture (simple) */
.panel .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.thumbs button { all: unset; display: block; cursor: pointer; border-radius: 10px; }
.thumbs button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.thumbs button img { display: block; }
.thumbs button[aria-pressed="true"] img { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.thumbs.phones button img { aspect-ratio: 520 / 1130; }
.thumbs button span { display: block; margin-top: 3px; font-size: .78rem; font-weight: 650; line-height: 1.2; color: var(--ink-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumbs button[aria-pressed="true"] span { color: var(--ink); }
.zoom-row { margin: 6px 0 0 !important; }
.zoom-btn { font: inherit; font-size: .9rem; font-weight: 680; background: none; border: 0; padding: 2px 0; color: var(--deep, var(--ink)); cursor: zoom-in; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.zoom-btn:hover { text-decoration-thickness: 3px; }
dialog.zoom { border: 0; padding: 0; background: none; max-width: none; max-height: none; overflow: visible; }
dialog.zoom::backdrop { background: rgba(226, 235, 247, .95); }
dialog.zoom form { display: flex; justify-content: flex-end; margin: 0 0 10px; }
dialog.zoom button { font: inherit; font-weight: 720; font-size: .95rem; border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
dialog.zoom img { display: block; width: auto; height: auto; max-width: min(96vw, 1500px); max-height: calc(92vh - 60px); border-radius: 10px; border: 1.5px solid #c3ccd9; background: #fff; box-shadow: 0 30px 60px -32px rgba(22, 44, 88, .65); }
html:not(.gl) img.main { cursor: zoom-in; }

.sign-say { font-size: clamp(1.3rem, 2.1vw, 1.7rem); font-weight: 730; font-stretch: 106%; line-height: 1.15; margin: 0; text-wrap: balance; }
.sign-more { margin: 0; }

.view-btn { font: inherit; font-size: .9rem; font-weight: 650; background: #fff; border: 1.5px solid #c9ced6; border-radius: 999px; padding: 6px 13px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.view-btn:hover { border-color: var(--ink); color: var(--ink); }
.no-gl .view-btn { display: none; }
.menu-view { margin: 26px 0 0; }
.menu-view .view-btn { font-size: 1.05rem; padding: 9px 18px; }
@media (max-width: 1100px) { .bar > .view-btn { display: none; } }

/* ======================================================================= 3D view: the look of a card
   In the world (html.gl) every beat's panel is a card over the scene. Where a card sits and when it shows is in
   life-exhibits.css; here is what it looks like. */
.gl .station { background: none; padding: 0; }
.gl .panel, .gl .hero-text {
  width: min(440px, 100%);
  background: #fff; border: 1.5px solid color-mix(in srgb, var(--ink) 16%, #fff); border-top: 8px solid var(--line); border-radius: 10px;
  padding: 16px 22px 20px;
  box-shadow: 0 14px 30px -16px rgba(22, 44, 88, .6);
}
.gl .panel .thumbs.phones { grid-template-columns: repeat(4, minmax(0, 66px)); }
@media (min-width: 860px) and (max-height: 800px) { /* short laptop screens: slightly denser panels, so they fit */
  .gl .panel { padding: 12px 20px 16px; }
  .gl .panel p, .gl .panel .ticks li, .gl .mini p { font-size: .95rem; line-height: 1.4; }
  .gl .panel .ticks { gap: 6px; margin-top: 10px; }
  .gl .panel h3 { font-size: 1.24rem; }
  .gl .mini { gap: 10px; }
  .gl .panel .facts li, .gl .panel .figures li { padding: 9px 12px; }
  .gl .facts-dl { gap: 5px 14px; font-size: .92rem; }
}
.gl .panel:focus, .gl .hero-text:focus { outline: none; }
.gl .panel:focus-visible, .gl .hero-text:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.gl .panel.sign { width: min(500px, 100%); background: var(--line); color: var(--on, #fff); border: 0; border-radius: 10px; padding: 0; }
.gl .panel.sign::after { display: none; }
.gl .sign-inner { grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; padding: 20px 22px 12px; }
.gl .sign .code { width: 58px; }
.gl .sign h2 { font-size: clamp(1.7rem, 2.5vw, 2.25rem); }
.gl .sign .hi { font-size: 1.12rem; margin-top: 3px; }
.gl .sign .termini { grid-column: 2; text-align: left; font-size: 1.02rem; margin-top: 8px; }
.gl .sign-role { margin: 0 22px; padding-block: 10px 16px; font-size: .97rem; gap: 2px 20px; }
.gl .sign-say { padding: 0 22px 20px; }
.gl .sign-more { background: #fff; color: var(--ink); padding: 14px 22px 18px; font-size: 1rem; }
.gl .panel.contact-body { width: min(520px, 100%); padding: 20px 26px 26px; }
.gl .contact h2 { font-size: clamp(1.8rem, 2.9vw, 2.5rem); }
.gl .contact .hi { font-size: 1.15rem; }
.gl .contact .lead { font-size: 1.05rem; margin-top: 12px; }
.gl .hub-row { margin-top: 18px; }
.gl .hub-mail { font-size: clamp(1.15rem, 2vw, 1.5rem); border-width: 4px; }

/* the hero's card: name, roles, introduction, the tour's button, the list of lines */
.gl .hero { --line: var(--blue); }
.gl .hero-text { width: min(500px, 100%); padding: 16px 24px 22px; }
.gl .hero h1 { font-size: 2.5rem; }
.gl .hero .hi-name { font-size: 1.3rem; }
.gl .roles { font-size: 1.08rem; line-height: 1.7; margin-top: 10px; }
.gl .hero .intro { font-size: 1rem; line-height: 1.5; margin-top: 12px; }
.gl .hero .pill { font-size: .9rem; }
.ride { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 0 !important; color: var(--ink-2); font-size: .95rem; line-height: 1.3; }
.ride span { flex: 1 1 12em; }
.ride-btn { --line: var(--ink); font-size: 1.05rem; padding: 10px 20px; white-space: nowrap; }

/* Next and Back */
.stepper { position: fixed; right: clamp(12px, 2.4vw, 30px); bottom: clamp(12px, 2.4vw, 28px); z-index: 20; display: none; gap: 8px; transition: opacity .25s ease, visibility .25s; }
.stepper button {
  font: inherit; font-weight: 720; font-size: .98rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px;
  border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
}
.stepper button[data-step="back"] { padding: 0; width: 44px; justify-content: center; }
.stepper button[data-step="next"] { background: var(--ink); color: #fff; padding-right: 10px; }
.stepper button:hover { box-shadow: 0 0 0 3px rgba(16, 17, 20, .16); }
.stepper button:disabled { opacity: .35; cursor: default; box-shadow: none; }
.stepper .where { align-self: center; font-weight: 680; font-stretch: 92%; font-size: .92rem; color: var(--ink); background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.stepper .where:empty { display: none; }
.stepper .ico { width: 18px; height: 18px; stroke-width: 2.6; }
@media (min-width: 860px) { .at-start .stepper { opacity: 0; visibility: hidden; } } /* the hero's card has the button that starts the tour */

@media (max-width: 859px) {
  :root { --pin: calc(64px + env(safe-area-inset-bottom, 0px)); } /* a card sits above the stepper */
  .gl .panel, .gl .panel.sign, .gl .panel.contact-body, .gl .hero-text { width: 100%; }
  .gl .panel, .gl .hero-text { padding: 12px 16px 16px; border-top-width: 6px; }
  .gl .panel h3 { font-size: 1.2rem; }
  .gl .panel p { font-size: .97rem; line-height: 1.45; margin-top: 6px; }
  .gl .panel .ticks li { font-size: .95rem; line-height: 1.38; }
  .gl .sign-inner { padding: 14px 16px 8px; column-gap: 12px; }
  .gl .sign .code { width: 46px; }
  .gl .sign h2 { font-size: 1.5rem; }
  .gl .sign-role { margin: 0 16px; padding-block: 8px 12px; font-size: .92rem; }
  .gl .sign-say { padding: 0 16px 14px; font-size: 1.2rem; }
  .gl .sign-more { padding: 12px 16px 14px; font-size: .95rem; }
  .gl .hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.3rem); }
  .gl .hero .hi-name { font-size: 1.15rem; }
  .gl .roles { font-size: 1rem; line-height: 1.65; margin-top: 8px; }
  .stepper { left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); justify-content: space-between; }
  .stepper button { box-shadow: 0 8px 20px -12px rgba(16, 17, 20, .6); }
}

/* ======================================================================= simple view: the same beats as cards */
html:not(.gl) .station {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
  align-items: start;
}
html:not(.gl) .beat.arrive { grid-column: 1 / -1; width: 100vw; margin-left: calc(50% - 50vw); margin-bottom: clamp(6px, 1.4vw, 18px); }
html:not(.gl) body { overflow-x: clip; }
html:not(.gl) .panel { background: #fff; border: 1.5px solid var(--edge); border-radius: 18px; padding: 18px 20px 20px; overflow: hidden; }
html:not(.gl) .panel.sign { background: var(--line); border: 0; border-radius: 0; padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2)); overflow: visible; }
html:not(.gl) .sign-say { font-size: clamp(1.5rem, 3vw, 2.4rem); padding-bottom: 26px; margin-top: -4px; }
html:not(.gl) .sign-more { padding-bottom: 26px; max-width: 64ch; font-size: 1.12rem; }
html:not(.gl) .beat[data-beat="jft-photos"], html:not(.gl) .beat[data-beat="phd-chart"] { grid-column: span 2; }
/* a product takes the full row: its big screen on the left, the words on the right, small screens under the big one */
html:not(.gl) .beat.prod { grid-column: 1 / -1; }
html:not(.gl) .beat.prod .panel { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); column-gap: clamp(20px, 3vw, 44px); align-content: start; padding: clamp(18px, 2.2vw, 28px); }
html:not(.gl) .beat.prod .panel > * { grid-column: 2; }
html:not(.gl) .beat.prod .panel > img.main { grid-column: 1; grid-row: 1 / span 5; margin: 0; align-self: start; }
html:not(.gl) .beat.prod .panel > .thumbs { grid-column: 1; grid-row: 6; margin-top: 10px; }
html:not(.gl) .beat.prod .panel > .zoom-row { grid-column: 1; grid-row: 7; }
html:not(.gl) .beat.prod .panel h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
html:not(.gl) .panel .pic { display: block; margin: -18px -20px 14px; overflow: hidden; background: var(--tint); border-bottom: 1.5px solid var(--edge); position: relative; }
html:not(.gl) .panel .pic img { width: 100%; height: auto; } /* each picture keeps its own shape */
html:not(.gl) .panel .kick + .pic { margin-top: 0; border-top: 1.5px solid var(--edge); } /* a label above the picture stays readable */
html:not(.gl) .panel .pic video { width: 100%; height: 100%; object-fit: cover; }
html:not(.gl) .panel .pic.poster img { object-position: center; }
html:not(.gl) .panel .pic video { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; }
html:not(.gl) .panel .pic.playing video { opacity: 1; }
html:not(.gl) .panel img.main { width: 100%; height: auto; border-radius: 12px; border: 1.5px solid var(--edge); margin-bottom: 14px; }
html:not(.gl) .pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
html:not(.gl) .pics img { border-radius: 12px; width: 100%; height: auto; } /* the two photos are not the same shape: neither is cropped */
html:not(.gl) .contact { display: block; padding-inline: 0; }
html:not(.gl) .contact .beat { width: auto; margin: 0; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
html:not(.gl) .contact .panel { background: none; border: 0; border-radius: 0; padding-inline: 0; overflow: visible; }
html:not(.gl) .contact .panel p { font-size: revert; }
@media (max-width: 720px) {
  html:not(.gl) .beat.prod .panel { display: block; }
  html:not(.gl) .beat.prod .panel > img.main { margin-bottom: 14px; }
}
@media (max-width: 745px) { /* below this the grid has one column */
  html:not(.gl) .beat[data-beat="jft-photos"], html:not(.gl) .beat[data-beat="phd-chart"] { grid-column: auto; }
}
@media print { /* on paper: no scene, the panels one after another */
  #world, .stepper, .first { display: none !important; }
  .gl .beat, .gl .hero { min-height: 0 !important; padding-block: 6px; }
  .gl .panel { position: static; box-shadow: none; opacity: 1 !important; width: auto; break-inside: avoid; }
  .gl .panel.long { max-height: none; }
  .gl .panel .more { display: none !important; }
}

.look .bar, .look main, .look .stepper, .look .menu, .look .skip { display: none !important; }
