/* kirillukolov.com — static v2, Wix-faithful desktop layout at 1280px */

:root {
  --ink: #5e5d5d;
  --bg: #ffffff;
  --col: 980px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  -webkit-font-smoothing: auto;
}

.page {
  /* Wix SITE_HEADER min-height: 32px. Title then sits at y=44 (32+12). */
  padding-top: 32px;
}

.col {
  width: var(--col);
  margin: 0 auto;
  position: relative;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #111;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.site-title,
a.site-title,
span.site-title,
h1.site-title {
  display: block;
  font-family: "Times New Roman", Times, serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 51px;
  color: var(--ink);
  text-decoration: none;
  margin: 12px 0 10px;
  position: relative;
  left: -8px;
  width: 260px;
}
.site-title:hover { text-decoration: none; color: var(--ink); }

.site-nav {
  position: relative;
  height: 21px;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 21px;
  color: var(--ink);
}
.nav-gap-home { margin: 0 0 22px; }
.nav-gap-bio { margin: 0 0 39px; }
.nav-gap-textes { margin: 0 0 46px; }
.nav-gap-contact { margin: 0 0 51px; }
.nav-gap-work { margin: 0 0 15px; }

.site-nav .nav-item {
  position: absolute;
  top: 0;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.site-nav .nav-item.is-current {
  text-decoration: none;
  cursor: default;
}
.site-nav .nav-travaux { left: 135px; width: 65px; }
.site-nav .nav-bio { left: 211px; width: 40px; }
.site-nav .nav-textes { left: 259px; width: 51px; }
.site-nav .nav-contact { left: 326px; width: 58px; }
.site-nav .nav-pdf { left: 400px; width: 117px; }

main { padding: 0; margin: 0; }

/* Homepage mosaic: absolute positions measured from the Wix replay at 1280px */
.mosaic {
  position: relative;
  width: 980px;
  /* first tile y=148/149; last tile bottom ≈ 7961; page 7979 */
  height: 7821px; /* 7979 - 158, adjusted after first-tile offset is applied in HTML */
}

.mosaic a {
  position: absolute;
  display: block;
  overflow: hidden;
  background: #f3f3f3;
  text-decoration: none;
  color: inherit;
}
.mosaic a img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mosaic a:focus { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Bio / Textes / Contact */
.prose {
  margin: 0 0 0 135px;
  width: 766px;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: normal;
  color: var(--ink);
}
.prose-contact {
  margin-left: 135px;
  width: 239px;
}
.prose p { margin: 0; }
.prose p.blank { height: 21px; margin: 0; }
.prose em { font-style: italic; }
.prose strong { font-weight: 700; }
.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Work pages */
.work-head {
  position: relative;
  height: 49px; /* 37px type + margins, measured so media starts at y=278 when meta is 88px */
}
.work-back {
  position: absolute;
  left: 80px;
  top: 0;
  width: 40px;
  font-family: "Times New Roman", Times, serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 37px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.work-title {
  position: absolute;
  left: 135px;
  top: 1px;
  margin: 0;
  width: 700px;
  font-family: "Times New Roman", Times, serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 37px;
  color: var(--ink);
}
.work-meta {
  margin: 9px 0 13px 135px;
  width: 845px;
  min-height: 66px;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: normal;
  color: var(--ink);
}
.work-meta p { margin: 0; }

.work-media { margin: 0; padding: 0; }
.media-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  margin: 0 0 16px;
  align-items: flex-start;
}
.media-frame {
  overflow: hidden;
  background: #f3f3f3;
  flex: 0 0 auto;
}
.media-frame img { display: block; }
a.zoom { display: block; cursor: zoom-in; color: inherit; text-decoration: none; }

.video-wrap {
  position: relative;
  background: #000;
  margin-bottom: 16px;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.work-note {
  margin: 8px 0 24px 135px;
  width: 766px;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: normal;
  color: var(--ink);
}
.work-note p { margin: 0 0 0.2em; }

.redirect { padding: 3rem 1.5rem; }

/* Lightbox (same behaviour as v1, visual only) */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 3.5rem;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  opacity: 0.85;
}
.lightbox .lb-close { top: 0.6rem; right: 0.6rem; font-size: 2rem; }
.lightbox .lb-prev { left: 0.4rem; }
.lightbox .lb-next { right: 0.4rem; }
.lightbox .lb-close:hover,
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover { opacity: 1; }
.lightbox .lb-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.6rem;
  text-align: center;
  color: #ddd;
  font-size: 0.9rem;
  padding: 0 1rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/*
  Under 980px Wix used a separate mobile layout we do not have.
  The 980px column is scaled down on tablets; below 600px the mosaic
  and work media reflow as a simple vertical stack.
*/
@media (max-width: 979px) and (min-width: 600px) {
  .page { padding-top: 24px; }
  .col {
    width: 100%;
    transform-origin: top center;
    transform: scale(calc(100vw / 980));
  }
  /* occupy the scaled height so following page content isn't covered */
  .page { overflow: hidden; }
}

@media (max-width: 599px) {
  .page { padding-top: 16px; }
  .col { width: 100%; padding: 0 16px; }
  .site-title, a.site-title, span.site-title {
    left: 0;
    width: auto;
    margin-left: 0;
  }
  .site-nav {
    position: static;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 24px;
  }
  .site-nav .nav-item {
    position: static;
    width: auto !important;
  }
  .mosaic {
    position: static;
    width: 100%;
    height: auto !important;
  }
  .mosaic a {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 12px;
  }
  .mosaic a img { width: 100%; height: auto; }
  .prose, .prose-contact, .work-meta, .work-note {
    margin-left: 0;
    width: 100%;
  }
  .work-head { height: auto; display: flex; align-items: baseline; gap: 12px; }
  .work-back, .work-title { position: static; width: auto; }
  .media-row { flex-wrap: wrap; }
  .media-frame, .media-frame img, .video-wrap { max-width: 100%; height: auto !important; }
  .video-wrap { margin-left: 0 !important; width: 100% !important; aspect-ratio: 796 / 458; }
  .video-wrap iframe { position: absolute; }
}
