/* MahirGlaciar — the wall, then the whiteout */

:root {
  --night: #090c10;
  --snow: #eef1f4;
  --ink: #0d0f12;
  --mute: #646d76;
  --rule: #cdd4da;
  --ice: #bfe3ff;
  --frost: #f2f5f8;
  --nav-fg: #f2f5f8;
  --gutter: clamp(18px, 2.8vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--snow); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--snow); color: var(--ink);
  font-family: Archivo, system-ui, sans-serif; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #4a90d9; outline-offset: 3px; }
::selection { background: var(--ice); color: var(--ink); }

/* Display type: Archivo, condensed and heavy */
.name, .intro__title, .heading__title, .contact__title, .ba-tab__title, .lb__title, .contact__label {
  font-weight: 900; font-stretch: 64%; text-transform: uppercase; letter-spacing: -.004em;
}

/* --------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px var(--gutter); color: var(--nav-fg);
  transition: background-color .4s, backdrop-filter .4s, transform .5s var(--ease);
}
.nav.is-solid { background: rgba(238, 241, 244, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__mark { font-weight: 900; font-stretch: 64%; font-size: 24px; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.nav__links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
.nav__links a { opacity: .72; transition: opacity .2s; }
.nav__links a:hover, .nav__links a.is-active { opacity: 1; }
.nav__status { justify-self: end; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; opacity: .8; }
.nav__status i, .contact__kicker i { width: 8px; height: 8px; border-radius: 50%; background: #3ccf7f; box-shadow: 0 0 0 4px rgba(60, 207, 127, .18); }

/* --------------------------------------------------------------- buttons */
.button {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px;
  border-radius: 4px; font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.button--light { background: var(--frost); color: var(--night); }
.button--light:hover { background: #fff; }
.button--outline { color: var(--frost); box-shadow: inset 0 0 0 1px rgba(242, 245, 248, .32); }
.button--outline:hover { box-shadow: inset 0 0 0 1px var(--frost); }
.button--dark { background: var(--ink); color: #fff; }
.button--dark:hover { background: #2a3038; }

/* --------------------------------------------------------------- opening */
.opening { position: relative; height: 240vh; }
.opening__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--night);
}

.wall { position: absolute; inset: 0; perspective: 1500px; perspective-origin: 50% 20%; }
.wall__rows {
  position: absolute; left: -20%; right: -20%; top: -16%; bottom: -16%;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  transform: rotate(-7deg); will-change: transform;
}
/* padding-right equals the gap so translating by half the row loops without a jump */
.row { display: flex; gap: 14px; padding-right: 14px; width: max-content; height: 18.5vh; animation: slide var(--dur, 90s) linear infinite; }
.row--reverse { animation-direction: reverse; }
@keyframes slide { to { transform: translateX(-50%); } }
.row img {
  position: relative; height: 100%; width: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; cursor: pointer;
  transition: filter 1.4s var(--ease), transform .5s var(--ease);
}
.wall.is-graded .row img { filter: grayscale(1) sepia(1) hue-rotate(172deg) saturate(1.5) brightness(.5) contrast(1.12); }
.wall .row img:hover { filter: none; transform: scale(1.05); z-index: 2; transition-duration: .35s, .5s; }

.opening__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(58% 52% at 50% 52%, rgba(9, 12, 16, .9) 0%, rgba(9, 12, 16, .55) 48%, rgba(9, 12, 16, 0) 78%),
    linear-gradient(180deg, rgba(9, 12, 16, .55) 0%, transparent 20%, transparent 80%, rgba(9, 12, 16, .7) 100%);
}
.opening__haze {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background:
    linear-gradient(90deg, var(--snow) 0%, var(--snow) 26%, rgba(238, 241, 244, .7) 40%, rgba(238, 241, 244, 0) 62%),
    linear-gradient(180deg, var(--snow) 0%, rgba(238, 241, 244, 0) 34%, rgba(238, 241, 244, 0) 72%, var(--snow) 100%);
}

.opening__name {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--frost); padding: 0 var(--gutter); pointer-events: none;
}
.name { font-size: clamp(84px, 15.5vw, 270px); line-height: .8; }
.name__line { display: block; overflow: hidden; padding-bottom: .02em; }
.name__line--ice { color: var(--ice); }
.name .ch { display: inline-block; }
.opening__line { margin-top: 28px; font-size: clamp(16px, 1.3vw, 19px); color: #c3ccd5; }
.opening__actions { display: flex; gap: 10px; margin-top: 30px; pointer-events: auto; }

.opening__intro {
  position: absolute; left: var(--gutter); bottom: clamp(32px, 7vh, 72px); width: min(560px, calc(100% - 2 * var(--gutter)));
  opacity: 0; visibility: hidden;
}
.intro__title { font-size: clamp(46px, 5.4vw, 92px); line-height: .88; }
.intro__text { margin: 22px 0 28px; max-width: 38ch; font-size: clamp(16px, 1.25vw, 18px); color: #2b3138; }

.opening__hint {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(242, 245, 248, .6);
}
.opening__hint::after { content: ""; width: 1px; height: 34px; background: linear-gradient(rgba(242, 245, 248, .7), transparent); animation: hint 2s var(--ease) infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* --------------------------------------------------------------- headings */
.heading {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap;
  border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: clamp(32px, 5vw, 56px);
}
.heading__title { font-size: clamp(60px, 8.4vw, 136px); line-height: .84; }
.heading__title--small { font-size: clamp(38px, 4.4vw, 68px); }
.heading__meta { font-size: 15px; color: var(--mute); }
.heading--sub { margin-top: clamp(80px, 10vw, 140px); border-top-width: 1px; }

/* --------------------------------------------------------------- work */
.work { padding: clamp(60px, 8vw, 110px) var(--gutter) clamp(60px, 8vw, 100px); }

.thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px;
  background: var(--avg, #d9dee3) center / cover no-repeat;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity .6s; }
.thumb img[data-loading] { opacity: 0; }
.piece:hover .thumb img { transform: scale(1.035); }
.cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 12px; font-size: 15px; font-weight: 600; }
.cap span { font-weight: 400; color: var(--mute); white-space: nowrap; }
.cap b { font-weight: 600; }

.featured { display: grid; gap: clamp(48px, 6vw, 88px); }
.feat-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: end; }
.feat-row--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.feat-row .piece--big .cap { font-size: 18px; }
.feat-row .piece--big .cap b { font-weight: 900; font-stretch: 64%; text-transform: uppercase; font-size: clamp(22px, 2vw, 30px); letter-spacing: 0; line-height: 1; }

.filters { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; font-weight: 500; }
.filter { color: var(--mute); padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.filter sup { font-size: 11px; margin-left: 3px; }
.filter:hover { color: var(--ink); }
.filter.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 3.4vw, 52px) 20px; }
.grid .cap { font-size: 14px; }

/* --------------------------------------------------------------- before / after */
.ba-section { padding: clamp(60px, 8vw, 110px) var(--gutter); }
.ba-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2.6fr); gap: clamp(24px, 3vw, 48px); align-items: start; }
.ba-tabs { display: grid; gap: 4px; }
.ba-tab { display: block; text-align: left; padding: 16px 0 16px 18px; border-left: 2px solid var(--rule); color: var(--mute); transition: color .2s, border-color .2s; }
.ba-tab__title { display: block; font-size: 28px; line-height: .95; }
.ba-tab__note { display: block; margin-top: 6px; font-size: 14px; }
.ba-tab:hover { color: var(--ink); }
.ba-tab.is-active { color: var(--ink); border-left-color: var(--ink); }

.ba { --pos: 50%; position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #d9dee3; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; pointer-events: none; }
.ba__line { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .35); }
.ba__knob { position: absolute; top: 50%; left: 0; width: 52px; height: 52px; translate: -50% -50%; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.ba__knob svg { width: 20px; height: 20px; }
.ba__label { position: absolute; top: 14px; padding: 6px 10px; border-radius: 3px; background: rgba(9, 12, 16, .72); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.ba__label--l { left: 14px; }
.ba__label--r { right: 14px; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba__range::-webkit-slider-thumb { -webkit-appearance: none; width: 60px; height: 100vh; }
.ba__range::-moz-range-thumb { width: 60px; height: 1000px; border: 0; }
.ba:has(.ba__range:focus-visible) { outline: 2px solid #4a90d9; outline-offset: 3px; }
.ba-caption { margin-top: 12px; font-size: 15px; color: var(--mute); }
.ba-caption b { color: var(--ink); font-weight: 600; margin-right: 8px; }

/* --------------------------------------------------------------- about */
.about { padding: clamp(60px, 8vw, 110px) var(--gutter) clamp(90px, 11vw, 160px); }
.about__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 100px); }
.about__lead { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.25; font-weight: 500; letter-spacing: -.01em; max-width: 30ch; }
.about__facts { display: grid; gap: 22px; align-content: start; }
.about__facts div { border-top: 1px solid var(--rule); padding-top: 12px; }
.about__facts dt { font-size: 13px; font-weight: 700; color: var(--mute); }
.about__facts dd { margin-top: 4px; font-size: 17px; }

/* --------------------------------------------------------------- contact */
.contact { background: var(--night); color: var(--frost); padding: clamp(80px, 10vw, 140px) var(--gutter) 28px; }
.contact__kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: #c3ccd5; }
.contact__title { margin-top: 22px; font-size: clamp(68px, 11.5vw, 200px); line-height: .82; }
.contact__links { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid rgba(242, 245, 248, .16); }
.contact__links li { border-bottom: 1px solid rgba(242, 245, 248, .16); }
.contact__row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr) auto; align-items: baseline; gap: 20px; width: 100%; padding: 22px 0; text-align: left; transition: color .25s; }
.contact__label { font-size: clamp(30px, 3.2vw, 48px); line-height: 1; }
.contact__value { font-size: 17px; color: #aeb8c2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .25s; }
.contact__arrow { font-size: 22px; transition: transform .3s var(--ease); }
.contact__row:hover { color: var(--ice); }
.contact__row:hover .contact__value { color: var(--ice); }
.contact__row:hover .contact__arrow { transform: translateX(6px); }
.contact__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: clamp(60px, 8vw, 110px); font-size: 14px; color: #8a949e; }
.contact__foot a:hover, .contact__motion:hover { color: var(--frost); }

/* --------------------------------------------------------------- viewer */
.lb { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 14px var(--gutter) calc(16px + env(safe-area-inset-bottom)); color: var(--frost); }
.lb__backdrop { position: absolute; inset: 0; background: #0a0c0f; }
body.lb-open .nav { visibility: hidden; }
.lb__top, .lb__stage, .lb__bottom { position: relative; }
.lb__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 48px; }
.lb__count { font-size: 14px; color: #8a949e; font-variant-numeric: tabular-nums; }
.lb__title { font-size: clamp(24px, 2.4vw, 36px); line-height: 1; text-align: center; }
.lb__close, .lb__btn { height: 42px; padding: 0 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(242, 245, 248, .24); font-size: 14px; font-weight: 600; transition: background-color .2s, color .2s; }
.lb__close { justify-self: end; }
.lb__close:hover, .lb__btn:hover { background: var(--frost); color: var(--night); }
.lb__btn[aria-pressed="true"] { background: var(--frost); color: var(--night); }
.lb__arrow { width: 42px; padding: 0; font-size: 18px; }
.lb__stage { display: grid; place-items: center; min-height: 0; padding: 14px 0; }
.lb__figure { position: relative; width: min(100%, calc((100vh - 190px) * 1.7778)); aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; transform-origin: 0 0; background: #15191e center / cover no-repeat; }
.lb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb__img--hi { opacity: 0; transition: opacity .45s; }
.lb__img--hi.is-ready { opacity: 1; }
.lb__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 50px; }
.lb__versions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb__versions-label { font-size: 14px; color: #8a949e; margin-right: 4px; }
.ver { width: 72px; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; opacity: .55; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .2s, outline-color .2s; }
.ver img { width: 100%; height: 100%; object-fit: cover; }
.ver:hover { opacity: 1; }
.ver.is-active { opacity: 1; outline-color: var(--ice); }
.lb__actions { display: flex; gap: 8px; margin-left: auto; }

.feed { position: absolute; inset: 14px 0; display: none; place-items: center; }
.lb.is-feed .feed { display: grid; }
.lb.is-feed .lb__figure { visibility: hidden; }
.feed__inner { width: min(1120px, 100%); max-height: 100%; overflow: auto; padding: clamp(16px, 2.4vw, 28px); border-radius: 12px; background: #0f0f0f; }
.feed__label { font-size: 14px; color: #8d8d8d; margin-bottom: 18px; }
.feed__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 16px; }
.vcard__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #272727; }
.vcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.vcard__dur { position: absolute; right: 7px; bottom: 7px; padding: 3px 5px; border-radius: 4px; background: rgba(0, 0, 0, .8); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.vcard__meta { display: grid; grid-template-columns: 36px 1fr; gap: 12px; margin-top: 12px; }
.vcard__avatar { width: 36px; height: 36px; border-radius: 50%; background: #272727; }
.vcard__avatar--me { background: linear-gradient(135deg, var(--ice), #2b5d84); }
.vcard__title { font-size: 15px; font-weight: 600; line-height: 1.35; color: #f1f1f1; }
.vcard__channel { margin-top: 4px; font-size: 13px; color: #aaa; }
.sk { height: 12px; border-radius: 6px; background: #272727; }
.sk + .sk { margin-top: 8px; width: 60%; }
.vcard--ghost .vcard__thumb { background: #232323; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 95; translate: -50% 16px; padding: 12px 18px; border-radius: 4px; background: var(--frost); color: var(--night); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .3s, translate .4s var(--ease); }
.toast.is-on { opacity: 1; translate: -50% 0; }

/* --------------------------------------------------------------- small screens */
@media (max-width: 1000px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ba-layout { grid-template-columns: 1fr; }
  .ba-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ba-tab { padding: 10px 0 10px 12px; }
  .ba-tab__title { font-size: 20px; }
  .about__grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .row { height: 13vh; gap: 10px; padding-right: 10px; }
  .wall__rows { gap: 10px; }
  .name { font-size: 23vw; }
  .opening__actions { flex-direction: column; width: min(260px, 100%); }
  .opening__actions .button { justify-content: center; }
  .feat-row, .feat-row--flip { grid-template-columns: 1fr; gap: 40px; }
  .grid { grid-template-columns: 1fr; }
  .ba-tab__note { display: none; }
  .contact__row { grid-template-columns: 1fr auto; }
  .contact__value { grid-column: 1 / -1; grid-row: 2; }
  .lb__top { grid-template-columns: 1fr auto; }
  .lb__title { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .lb__versions-label { display: none; }
  .ver { width: 56px; }
  .feed__grid { grid-template-columns: 1fr; }
  .vcard--ghost:nth-child(n+3) { display: none; }
}

@media (max-width: 700px) {
  .opening__haze {
    background: linear-gradient(180deg, var(--snow) 0%, rgba(238, 241, 244, 0) 22%, rgba(238, 241, 244, 0) 34%, rgba(238, 241, 244, .85) 52%, var(--snow) 64%);
  }
}

/* --------------------------------------------------------------- motion off */
html.reduce-motion .opening { height: auto; }
html.reduce-motion .opening__stage { position: relative; }
html.reduce-motion .opening__intro { display: none; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition-duration: .01ms !important; }
