/* Portfolio page: the Instagram profile of samuel.nagler, rebuilt on the site (light look of Instagram, system font like the app). */
html { overflow-anchor: none; }   /* the browser must not shift the scroll position when the feed and the grid are swapped */
main.ig, .igf { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
main.ig { max-width: 935px; padding: 24px 0 72px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0; font-size: 14px; line-height: 1.4; }
main.ig button { font: inherit; letter-spacing: inherit; }
.ig-loading { text-align: center; color: var(--muted); padding: 80px 16px; }

.ig-head { display: grid; grid-template-columns: 150px 1fr; column-gap: 30px; padding: 0 16px; margin-bottom: 24px; }
.ig-avatar { grid-row: 1 / span 3; width: 150px; height: 150px; border-radius: 50%; object-fit: cover; justify-self: center; align-self: start; margin-right: 0; background: var(--soft); }
.ig-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 20px; }
.ig-user { font: 400 20px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; letter-spacing: 0; margin: 0; }
.ig-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ig-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 16px; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; background: #efefef; color: #000; border: 0; cursor: pointer; }
.ig-btn:hover { background: #dbdbdb; }
.ig-btn--primary { background: #0095f6; color: #fff; }
.ig-btn--primary:hover { background: #1877f2; }
.ig-stats { display: flex; gap: 40px; list-style: none; margin: 0 0 20px; padding: 0; min-width: 0; }
.ig-stats b { font-weight: 600; }
.ig-bio { grid-column: 2; }
.ig-name { font-weight: 600; }
.ig-cat { color: #737373; }
.ig-bio p { margin: 0; white-space: pre-line; }
.ig-link { display: inline-block; margin-top: 2px; color: #00376b; font-weight: 600; text-decoration: none; }
.ig-link:hover { text-decoration: underline; }

.ig-hl { display: flex; gap: 28px; overflow-x: auto; padding: 4px 16px 16px; margin-bottom: 8px; scrollbar-width: none; }
.ig-hl::-webkit-scrollbar { display: none; }
.ig-hl button { flex: none; width: 77px; background: none; border: 0; padding: 0; cursor: pointer; text-align: center; color: #262626; }
.ig-hl .ring { display: block; width: 77px; height: 77px; padding: 3px; border-radius: 50%; border: 1px solid #dbdbdb; }
.ig-hl img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ig-hl span.t { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ig-tabs { display: flex; justify-content: center; gap: 56px; border-top: 1px solid #dbdbdb; }
.ig-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 52px; padding: 0; margin-top: -1px; background: none; border: 0; border-top: 1px solid transparent; color: #737373; cursor: pointer; text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.ig-tabs button[aria-selected="true"] { color: #000; border-top-color: #000; }
.ig-tabs svg { width: 12px; height: 12px; }

.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ig-tile { position: relative; display: block; padding: 0; border: 0; background: var(--soft); cursor: pointer; aspect-ratio: 3 / 4; overflow: hidden; }
.ig-grid.is-reels .ig-tile { aspect-ratio: 3 / 5; }
.ig-tile .views { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 5px; color: #fff; font-weight: 600; font-size: 14px; text-shadow: 0 0 4px rgba(0, 0, 0, .6); }
.ig-tile .views svg { width: 18px; height: 18px; }
.ig-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ig-tile .ico { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; color: #fff; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .5)); }
.ig-tile .ico svg { width: 20px; height: 20px; fill: currentColor; }
.ig-tile:hover::after, .ig-tile:focus-visible::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .12); }
.ig-tile:not(.ld) { background: linear-gradient(110deg, #efefed 8%, #f8f8f6 18%, #efefed 33%); background-size: 200% 100%; animation: igshim 1.4s linear infinite; }
@keyframes igshim { to { background-position-x: -200%; } }
.ig-more { display: flex; justify-content: center; padding: 26px 0 8px; }
.ig-more[hidden] { display: none; }
.ig-more i { width: 26px; height: 26px; border: 3px solid #dbdbdb; border-top-color: #737373; border-radius: 50%; animation: igspin .8s linear infinite; }
.ig-empty { grid-column: 1 / -1; text-align: center; color: #737373; padding: 60px 16px; }

@media (max-width: 735px) {
  main.ig { padding-top: 16px; }
  .ig-head { grid-template-columns: 86px 1fr; column-gap: 20px; }
  .ig-avatar { width: 86px; height: 86px; grid-row: 1 / span 2; }
  .ig-top { margin-bottom: 12px; }
  .ig-user { font-size: 18px; }
  .ig-head > * { min-width: 0; }
  .ig-stats li span { font-size: 13px; }
  .ig-btns { order: 3; width: 100%; }
  .ig-btns .ig-btn { flex: 1; padding: 0 10px; font-size: 13px; }
  .ig-stats { gap: 0; justify-content: space-between; margin-bottom: 8px; }
  .ig-stats li { text-align: center; }
  .ig-stats li b { display: block; }
  .ig-stats li span { color: #737373; }
  .ig-bio { grid-column: 1 / -1; margin-top: 12px; }
  .ig-tabs { gap: 0; }
  .ig-tabs button { flex: 1; justify-content: center; }
  .ig-tabs .lbl { display: none; }
  .ig-tabs svg { width: 24px; height: 24px; }
  .ig-grid { gap: 2px; }
  .ig-hl { gap: 18px; }
  .ig-hl button, .ig-hl .ring { width: 66px; }
  .ig-hl .ring { height: 66px; }
}

/* feed view: "Beiträge" with the tapped post first and the following ones below */
.igf, .igs { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.45; letter-spacing: 0; }
.igf { position: relative; min-height: 100vh; background: #fff; color: #000; }
.igf[hidden] { display: none; }
html.igf-on main.ig, html.igf-on .shead-wrap, html.igf-on .site-head, html.igf-on .site-foot { display: none !important; }
.igf-head { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; height: 80px; border-bottom: 1px solid rgba(18, 18, 18, .08); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.igf-back { width: 44px; height: 44px; margin-left: 6px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 50%; color: #000; cursor: pointer; }
.igf-back:hover { background: #f2f2f2; }
.igf-back svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.igf-title { display: flex; align-items: center; justify-content: center; line-height: 0; }
.igf-logo { width: 90px; height: auto; display: block; }
.igf-list { max-width: 470px; margin: 0 auto; padding-bottom: 24px; }
.igf-card { padding-bottom: 14px; border-bottom: 1px solid #efefef; margin-bottom: 6px; }
.igf-who { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 600; }
.igf-who img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.igf-who a { color: inherit; text-decoration: none; }
.igf-media { position: relative; width: 100%; max-height: 82vh; background: #000; overflow: hidden; }
.igf-media.is-video { max-height: 86vh; }
.igf-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.igf-track::-webkit-scrollbar { display: none; }
.igf-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; background: #000; }
.igf-slide { background-size: cover; background-position: center; }
.igf-slide img, .igf-slide video { display: block; width: 100%; height: 100%; object-fit: cover; }
.igf-slide img { opacity: 0; transition: opacity .25s; }
.igf-slide img.ld { opacity: 1; }
.igf-slide.is-video video { object-fit: contain; }
.igf-count { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 12px; background: rgba(26, 26, 26, .75); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.igf-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: #000; cursor: pointer; display: none; align-items: center; justify-content: center; }
.igf-arrow[hidden] { display: none !important; }
.igf-arrow.prev { left: 8px; } .igf-arrow.next { right: 8px; }
.igf-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .igf-arrow { display: flex; } }
.igf-dots { display: flex; justify-content: center; gap: 4px; padding: 10px 0 0; }
.igf-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; }
.igf-dots i.on { background: #0095f6; }
.igf-cap { padding: 10px 12px 0; }
.igf-captext { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.igf-cap.open .igf-captext { display: block; -webkit-line-clamp: unset; }
.igf-captext b { font-weight: 600; }
.igf-captext .tag { color: #00376b; }
.igf-more { display: block; margin-top: 2px; padding: 0; background: none; border: 0; color: #737373; cursor: pointer; }
.igf-date { display: block; padding: 6px 12px 0; color: #737373; font-size: 12px; }
@media (min-width: 560px) { .igf-card { border: 1px solid #efefef; border-radius: 4px; margin: 14px 0; } }

/* highlight (story) viewer */
.igs { position: fixed; inset: 0; z-index: 110; background: #000; display: flex; align-items: center; justify-content: center; touch-action: manipulation; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.igs[hidden] { display: none; }
.igs-frame { position: relative; width: min(100vw, calc(100dvh * 9 / 16)); height: min(100dvh, calc(100vw * 16 / 9)); background: #111; overflow: hidden; border-radius: 8px; }
.igs-frame { transition: opacity .23s ease, transform .23s ease; }
.igs-frame.igs-out { opacity: 0; transform: translateX(var(--igs-dx, -9%)) scale(.97); }
.igs-frame.igs-in { opacity: 0; transform: translateX(var(--igs-dx, 9%)) scale(.97); transition: none; }
.igs-ph { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(14px); transform: scale(1.08); }
.igs-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }   /* all stories are 9:16: the picture fills the whole screen, no bars above or below */
.igs-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.igs-bars i { flex: 1; height: 2px; background: rgba(255, 255, 255, .35); border-radius: 2px; overflow: hidden; }
.igs-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.igs-bars i.done b { width: 100%; }
.igs-who { position: absolute; top: 22px; left: 12px; right: 56px; z-index: 3; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; text-shadow: 0 0 6px rgba(0, 0, 0, .6); }
.igs-who img { position: static; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.igs-who small { font-weight: 400; opacity: .85; }
.igs-x { position: absolute; top: 18px; right: 10px; z-index: 4; width: 40px; height: 40px; border: 0; background: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.igs-x svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.igs-zone { touch-action: manipulation; -webkit-tap-highlight-color: transparent; position: absolute; top: 70px; bottom: 0; width: 38%; z-index: 2; background: none; border: 0; cursor: pointer; }
.igs-zone.prev { left: 0; } .igs-zone.next { right: 0; width: 62%; }
.igs-shade { position: absolute; inset: 0 0 auto 0; height: 110px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); z-index: 1; }
.igs-spin { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; z-index: 3; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: igspin .8s linear infinite; }
.igs-spin[hidden] { display: none; }
@keyframes igspin { to { transform: rotate(360deg); } }
/* phones: the story fills exactly the visible screen (no black strip above or below, whatever the browser bars do); what is behind is white like the site */
@media (max-width: 700px) { .igs { background: #fff; align-items: stretch; justify-content: stretch; } .igs-frame { width: 100%; height: 100%; border-radius: 0; } }
html.ig-lock { overflow: hidden; }

/* sound buttons */
.igs-snd { position: absolute; top: 18px; right: 52px; z-index: 4; width: 40px; height: 40px; border: 0; background: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 0 4px rgba(0, 0, 0, .55)); }
.igs-snd[hidden] { display: none; }
.igs-snd svg { width: 24px; height: 24px; }
.igf-snd { position: absolute; left: 10px; bottom: 54px; z-index: 3; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 17px; background: rgba(26, 26, 26, .78); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.igf-snd svg { width: 18px; height: 18px; }
.igf-slide { position: relative; }

/* iPhone Safari tints its bottom bar with the picture right above it. Stories (a fixed full screen layer): black edge, so the bar is black there. The feed scrolls as a normal page: the glass bar shows the posts. */
@supports (-webkit-touch-callout: none) {
  .igs { background: #000; }
  .igs-frame { height: calc(100% - 8px); }
}
