/* ============================================================
   Alex Kielkucki, portfolio
   ============================================================ */

/* --- reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, figure, dl, dd, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* --- tokens ----------------------------------------------- */
:root {
  --bg:      #0a0a0b;
  --bg-2:    #0e0e10;
  --ink:     #f2f0ed;
  --ink-dim: #9a9aa0;
  --ink-low: #6a6a70;
  --line:    rgba(242, 240, 237, .14);
  --line-2:  rgba(242, 240, 237, .07);
  --accent:  #a41c2c;

  --wrap: 1440px;
  --gut: clamp(20px, 4vw, 64px);

  --f-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --head-h: 76px;
}

/* --- base ------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
body.nav-open { overflow: hidden; }

::selection { background: var(--ink); color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.display {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .88;
}

.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .005em;
  line-height: .95;
  font-size: clamp(2.1rem, 5.2vw, 4.4rem);
}

/* word-mask used by the split reveal */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .14em; margin-bottom: -.14em; }
.w > i { display: inline-block; font-style: inherit; will-change: transform; }

/* keep content visible when GSAP is unavailable */
.no-gsap [data-reveal],
.no-gsap [data-card],
.no-gsap [data-row] { opacity: 1 !important; transform: none !important; }

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 0;
}
.loader__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 22px;
}
.loader__name {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .34em;
  font-size: 13px;
  color: var(--ink-dim);
}
.loader__count {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(3rem, 12vw, 9rem);
  line-height: .8;
}
.loader__bar { height: 1px; background: var(--line); }
.loader__bar > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--head-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.site-head.is-stuck {
  background: rgba(10, 10, 11, .92);
  border-bottom-color: var(--line);
}
.site-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
.mark {
  font-family: var(--f-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 13px;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 34px; }
.site-nav a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  padding-bottom: 3px;
  transition: color .25s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.head-cta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 10px 18px;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.head-cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.burger { display: none; width: 34px; height: 18px; position: relative; }
.burger span {
  position: absolute; left: 0; right: 0; height: 1px; background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}
.burger span:first-child { top: 4px; }
.burger span:last-child { bottom: 4px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--head-h) 0 auto 0;
  z-index: 99;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: none;
  flex-direction: column;
  padding: 8px var(--gut) 28px;
}
.mobile-nav a {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: .02em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
}
.mobile-nav.is-open { display: flex; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}
.hero__stage { position: absolute; inset: 0; background: #000; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
}
.slide.is-active { opacity: 1; }
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(.5) contrast(1.14) brightness(1.02);
  will-change: transform;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,11,.94) 0%, rgba(10,10,11,.44) 38%, rgba(10,10,11,.16) 66%, rgba(10,10,11,.52) 100%),
    linear-gradient(to right, rgba(10,10,11,.7) 0%, rgba(10,10,11,.22) 52%, rgba(10,10,11,0) 100%);
}

/* hairline vertical structure */
.hero__rules {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}
.hero__rules i { border-right: 1px solid var(--line-2); }

.hero__body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(150px, 21vh, 230px);
}
.hero__copy { position: relative; width: 100%; }
.slide-copy {
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}
.slide-copy.is-active { position: relative; opacity: 1; pointer-events: auto; }
/* each headline is fitted to the measure by script; this is the fallback */
.slide-copy h1 {
  font-size: clamp(2rem, 10vw, 8rem);
  white-space: nowrap;
}
.slide-copy .deck {
  margin-top: clamp(18px, 2.4vw, 30px);
  max-width: 46ch;
  font-size: clamp(1rem, 1.28vw, 1.2rem);
  color: var(--ink-dim);
  line-height: 1.55;
  border-left: 1px solid var(--line);
  padding-left: clamp(14px, 1.6vw, 22px);
}

/* hero ui */
.hero__ui {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(10,10,11,.75), rgba(10,10,11,0));
}
.hero__ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 96px;
}
.counter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-dim);
}
.counter #cur { color: var(--ink); font-size: 16px; }
.counter i { width: 22px; height: 1px; background: var(--line); }

.dots { display: flex; gap: 0; flex: 1; max-width: 640px; }
.dot {
  flex: 1;
  text-align: left;
  padding: 0 0 12px;
  border-top: 0;
  color: var(--ink-low);
  transition: color .3s ease;
}
.dot + .dot { margin-left: 24px; }
.dot span {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dot i { display: block; height: 1px; background: var(--line); position: relative; }
.dot i b { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.dot:hover { color: var(--ink-dim); }
.dot.is-active { color: var(--ink); }

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.scroll-cue i { width: 46px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  transform: translateX(-100%);
  animation: cue 2.6s cubic-bezier(.6,0,.2,1) infinite;
}
@keyframes cue {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
  background: var(--bg);
}
.ticker__row { display: flex; width: max-content; will-change: transform; }
.ticker__row span {
  display: flex;
  align-items: center;
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-dim);
  white-space: nowrap;
}
.ticker__row i {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  margin: 0 34px;
  flex: none;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section { position: relative; }
.statement, .disciplines, .work, .record, .principles, .contact {
  padding-block: clamp(84px, 11vw, 168px);
}
.disciplines, .record, .contact { border-top: 1px solid var(--line); }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 60px);
  align-items: end;
  padding-bottom: clamp(34px, 4vw, 56px);
  margin-bottom: clamp(34px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.sec-head__deck { color: var(--ink-dim); max-width: 44ch; font-size: 1rem; }

/* statement */
.statement__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 90px);
  align-items: start;
}
.statement .h2 { font-size: clamp(2.2rem, 5.6vw, 5rem); }
.statement__body p { color: var(--ink-dim); max-width: 58ch; }
.statement__body p + p { margin-top: 1.4em; }
.statement__body .lede {
  color: var(--ink);
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  line-height: 1.45;
  font-weight: 300;
}

/* cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.card {
  padding: 0 clamp(20px, 2.4vw, 40px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.card:last-child { border-right: 1px solid var(--line); }
.card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 26px;
  background: var(--bg-2);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(.86);
  transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .6s ease;
}
.card:hover .card__media img { transform: scale(1.05); filter: grayscale(.55) brightness(.95); }
.card__title {
  font-family: var(--f-display);
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 1.9vw, 1.75rem);
  letter-spacing: .01em;
  margin-bottom: 14px;
}
.card__text { color: var(--ink-dim); font-size: .95rem; }
/* pushed to the foot of the card so the note blocks line up across the row */
.notes { margin-top: auto; padding-top: 26px; border-top: 1px solid var(--line-2); }
.notes > div { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.notes dt {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-low);
  padding-top: 3px;
}
.notes dd { font-size: .86rem; color: var(--ink-dim); }

/* work list */
.work { overflow: hidden; }
/* no top rule, the section header already closes with one */
.work-list { border-top: 0; }
.work-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1.5fr) minmax(0, 1fr) 84px;
  align-items: center;
  gap: 18px;
  padding: clamp(22px, 3vw, 38px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: default;
  transition: padding-left .5s cubic-bezier(.2,.7,.2,1), color .4s ease;
}
.work-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.work-row:hover { padding-left: 22px; }
.work-row:hover::before { transform: scaleY(1); transform-origin: 50% 0; }
.work-row__idx { font-family: var(--f-mono); font-size: 11px; color: var(--ink-low); letter-spacing: .1em; }
.work-row__title {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  line-height: 1;
  letter-spacing: .005em;
}
.work-row__meta, .work-row__year {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.work-row__year { text-align: right; }

.work-peek {
  position: fixed;
  top: 0; left: 0;
  width: 250px;
  height: 320px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  z-index: 40;
  will-change: transform;
}
.work-peek img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.9); }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.stat {
  padding: clamp(28px, 3.6vw, 48px) clamp(16px, 2vw, 32px);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.stat:first-child { border-left: 1px solid var(--line); }
.stat__num {
  display: block;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: .9;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  margin-top: 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* rules */
.rules { border-top: 0; }
.rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(16px, 3vw, 60px);
  padding: clamp(26px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}
.rule h3 {
  font-family: var(--f-display);
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(1.2rem, 2.3vw, 2rem);
  line-height: 1.05;
  letter-spacing: .01em;
}
.rule p { color: var(--ink-dim); max-width: 62ch; }

/* contact */
.contact { text-align: left; }
.contact__head {
  font-size: clamp(3rem, 12vw, 11rem);
  line-height: .86;
}
.contact__deck {
  margin-top: clamp(22px, 3vw, 36px);
  max-width: 48ch;
  color: var(--ink-dim);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}
.contact__mail {
  display: inline-block;
  margin-top: clamp(34px, 4.5vw, 60px);
  font-family: var(--f-display);
  text-transform: none;
  font-size: clamp(1.15rem, 2.6vw, 2.1rem);
  letter-spacing: .01em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  transition: border-color .3s ease, color .3s ease;
}
.contact__mail:hover { border-color: var(--ink); }
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 34px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.contact__links a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color .25s ease;
}
.contact__links a:hover { color: var(--ink); }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 28px; }
.site-foot__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-low);
}

/* focus */
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .cards { grid-template-columns: 1fr; }
  .card { border-left: 0; border-top: 1px solid var(--line); padding: 30px 0 40px; }
  .card:last-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .card__media { aspect-ratio: 16 / 9; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statement__grid { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: 1fr; align-items: start; }
  .rule { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 860px) {
  :root { --head-h: 64px; }
  .site-nav, .head-cta { display: none; }
  .burger { display: block; }
  .hero__body { padding-bottom: clamp(160px, 26vh, 240px); }
  .hero__ui-row { height: auto; padding-block: 18px; flex-wrap: wrap; gap: 16px; }
  .dots { order: 3; width: 100%; max-width: none; }
  .dot span { font-size: 9px; letter-spacing: .08em; }
  .dot + .dot { margin-left: 12px; }
  .scroll-cue { display: none; }
  .work-row { grid-template-columns: 44px 1fr; row-gap: 6px; }
  .work-row__meta { grid-column: 2; }
  .work-row__year { grid-column: 2; text-align: left; }
  .work-peek { display: none; }
  .hero__rules { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .slide-copy .deck { font-size: .95rem; }
  .notes > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue i::after { animation: none; }
  * { transition-duration: .01ms !important; }
}
