/* =========================================================
   Aleksey — portfolio
   Design is spec'd on a 1920 canvas (vw units) but capped to a
   ~1300px content width and centered, so the scale stays compact
   on large screens (reference: nikamakes.design).
   Fonts: Jeju Myeongjo · EB Garamond · Pragati Narrow.
   ========================================================= */

:root {
  --bg:        #ffffff;
  --ink:       #282828;
  --muted:     #A4A4A4;
  --btn-bg:    #191919;
  --dark:      #282828;
  --dark-ink:  #ffffff;
  --dark-mut:  #A4A4A4;
  --maxw:      1300px;
  --radius:    90px;
  --narrow: "Pragati Narrow", "Arial Narrow", sans-serif;
  --jeju: "Jeju Myeongjo", "Times New Roman", serif;
  --garamond: "EB Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--narrow);
  font-size: clamp(14px, 1.5625vw, 20px);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------------------------------------------------------
   Header / nav pill
   --------------------------------------------------------- */
.site-header {
  position: fixed;
  top: clamp(16px, 4.5vw, 64px); left: 0; right: 0;
  display: flex;
  justify-content: center;
  z-index: 200;
  pointer-events: none;
  transition: transform .35s ease;
}
.site-header--hidden { transform: translateY(-200%); }
.pill { pointer-events: auto; }

/* home pill (compact) */
.pill--home {
  width: min(500px, calc(100vw - 32px));
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 4px 28px;
  border-radius: var(--radius);
  background: rgba(105, 105, 105, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .35s ease, box-shadow .35s ease;
}
.pill__group { display: flex; align-items: center; gap: 30px; }
.pill--home .pill__logo,
.pill--home .pill__link {
  font-family: var(--narrow);
  font-size: 19px;
  letter-spacing: 1px;
  color: #E5E5E5;
  transition: opacity .2s ease, color .35s ease;
}
.pill--home .pill__link:hover,
.pill--home .pill__logo:hover { opacity: .8; }
/* non-current nav item is muted (the disabled-button gray) */
.pill--home .pill__link.is-muted,
.site-header--light .pill--home .pill__link.is-muted { color: #A4A4A4; }
.pill--home .pill__cta {
  padding: 7px 28px;
  border-radius: 70px;
  background: #000;
  color: #fff;
  font-family: var(--narrow);
  font-size: 19px;
  letter-spacing: 1px;
  transition: transform .25s ease, background .25s ease;
}
.pill--home .pill__cta:hover { transform: translateY(-1px); background: #111; }

/* past the hero frame — white pill, dark text */
.site-header--light .pill--home {
  background: rgba(255, 255, 255, .88);
  box-shadow: inset 0 0 0 1px rgba(72, 72, 76, .22);
}
.site-header--light .pill--home .pill__logo,
.site-header--light .pill--home .pill__link { color: #282828; }

/* case pill (compact) */
.pill--case {
  width: min(540px, calc(100vw - 32px));
  height: 56px;
  padding: 5px 50px 5px 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .60);
  outline: 1px solid rgba(72, 72, 76, .30);
  outline-offset: -1px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.pill--case a {
  font-family: var(--narrow);
  font-size: 20px;
  letter-spacing: 1px;
  color: #1C1C1C;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: opacity .2s ease;
}
.pill--case a:hover { opacity: .55; }
.pill--case .arrow { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------
   Home — hero (grain 1:1 from the design)
   --------------------------------------------------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: min(3.385vw, 44px) min(3.385vw, 44px) 0;
}
.hero__panel {
  position: relative;
  border-radius: min(1.5625vw, 20px);
  overflow: hidden;
  aspect-ratio: 1790 / 903;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero__copy {
  position: absolute;
  left: min(4.167vw, 54px);
  bottom: min(4.167vw, 54px);
  text-align: left;
  color: #fff;
}
.hero__title {
  font-family: var(--jeju);
  font-weight: 400;
  font-size: clamp(34px, 5.3125vw, 68px);
  line-height: 1;
  margin: 0;
}
.hero__sub {
  font-family: var(--garamond);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 4.1667vw, 53px);
  letter-spacing: .21vw;
  line-height: 1;
  margin: min(.52vw, 8px) 0 0;
}

/* ---------------------------------------------------------
   Works
   --------------------------------------------------------- */
.works {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: min(4.167vw, 54px) min(3.385vw, 44px) 0;
}
.work {
  display: grid;
  grid-template-columns: 1fr 49.44%;
  gap: min(1.09vw, 15px);
  align-items: start;
  margin: 0 0 min(5.83vw, 76px);
}
.work:nth-child(2) { margin-bottom: min(4.48vw, 58px); }
.work:last-child { margin-bottom: 0; }
.work__tag {
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .5px;
  color: var(--muted);
  margin: 0;
}
.work__title {
  font-family: var(--narrow);
  font-weight: 400;
  font-size: clamp(24px, 2.344vw, 31px);
  letter-spacing: 1px;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
}
.work__desc {
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .5px;
  color: var(--muted);
  max-width: 36ch;
  margin: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  margin-top: min(2.083vw, 27px);
  padding: min(.52vw, 8px) min(1.5625vw, 22px);
  background: var(--btn-bg);
  box-shadow: inset 0 0 0 1px var(--btn-bg);
  color: #fff;
  font-family: var(--narrow);
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .5px;
  transition: background .25s ease, color .25s ease;
}
a.btn:hover { background: #fff; color: var(--btn-bg); }
.work__media { display: block; position: relative; border-radius: min(1.5625vw, 20px); overflow: hidden; }
.work__media img { width: 100%; transition: transform .5s ease; }
a.work__media:hover img { transform: scale(1.03); }

/* Dentalogica — “coming soon” badge follows the cursor (top-left of it) */
.work--soon, .work--soon .work__media, .work--soon .btn { cursor: default; }
.work--soon .btn:hover { background: var(--btn-bg); color: #fff; }
.soon-badge {
  position: fixed;
  left: 0; top: 0;
  padding: 7px 22px;
  border-radius: 70px;
  background: rgba(0, 0, 0, .85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--narrow);
  font-size: 18px;
  letter-spacing: 1px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 300;
}
.soon-badge.is-on { opacity: 1; }

/* ---------------------------------------------------------
   Case study pages
   --------------------------------------------------------- */
.cs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: min(14.22vw, 185px) min(3.385vw, 44px) 0;
}
.cs__title {
  font-family: var(--jeju);
  font-weight: 400;
  font-size: clamp(32px, 5.3125vw, 68px);
  line-height: 1.14;
  text-align: center;
  color: #1C1C1C;
  margin: 0 auto min(2.34vw, 30px);
  max-width: 20ch;
}
.cs__hero { width: 100%; border-radius: min(1.5625vw, 20px); display: block; }
.cs__meta { display: flex; justify-content: space-between; gap: 4%; margin-top: min(2.083vw, 27px); }
.cs__meta-col { width: 39.4%; }
.cs__label {
  color: #48484C;
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .5px;
  margin: 0 0 min(.52vw, 8px);
}
.cs__text {
  color: #1C1C1C;
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .5px;
  margin: 0;
}
.cs__sections {
  margin-top: min(7.81vw, 102px);
  display: flex;
  flex-direction: column;
  gap: min(15.625vw, 200px);
}
.cs__section { display: flex; justify-content: space-between; align-items: flex-start; gap: 4%; }
.cs__section--text { display: block; }
.cs__body { width: 39.4%; display: flex; flex-direction: column; gap: min(3.125vw, 40px); }
.cs__section--text .cs__body { width: 39.4%; }
.cs__num {
  color: #48484C;
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .5px;
  margin: 0;
}
.cs__h {
  font-family: var(--jeju);
  font-weight: 400;
  font-size: clamp(26px, 3.125vw, 40px);
  color: #000;
  line-height: 1.1;
  margin: 0;
}
.cs__p {
  color: #000;
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .5px;
  margin: 0;
}
.cs__img {
  width: 49.5%;
  border-radius: min(1.5625vw, 20px);
  object-fit: cover;
  object-position: center;
  display: block;
}
.cs__gallery { margin-top: min(6.25vw, 81px); }
.cs__gallery img { width: 100%; border-radius: min(1.5625vw, 20px); display: block; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.footer { margin-top: min(9.58vw, 125px); background: var(--dark); color: var(--dark-ink); }
.footer__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: min(3.07vw, 52px) min(3.385vw, 44px);
}
.footer__lead { font-size: clamp(14px, 1.302vw, 17px); letter-spacing: .5px; margin: 0 0 14px; }
.footer__cities { list-style: none; margin: 0; padding: 0; }
.footer__cities li {
  display: flex; align-items: center; gap: 18px;
  font-size: clamp(14px, 1.302vw, 17px); letter-spacing: .5px; margin-bottom: 10px;
}
.footer .dot { width: 7px; height: 7px; outline: 2px solid #fff; outline-offset: -1px; }
.footer__copy { color: var(--dark-mut); font-size: clamp(14px, 1.302vw, 17px); letter-spacing: .5px; margin: min(6.72vw, 88px) 0 0; }
.footer__cols { display: flex; gap: min(6.82vw, 89px); }
.footer__col h4 { font-weight: 400; font-size: clamp(14px, 1.302vw, 17px); letter-spacing: .5px; color: var(--dark-mut); margin: 0 0 24px; }
.footer__col p { margin: 0 0 8px; }
.footer__col a, .footer__soon {
  color: var(--dark-ink); font-size: clamp(14px, 1.302vw, 17px); letter-spacing: .5px; transition: opacity .2s ease;
}
.footer__col a:hover { opacity: .6; }
.footer__soon { cursor: default; position: relative; }
.footer__soon:hover::after {
  content: "soon"; position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 2px 10px; border-radius: 40px; background: rgba(0, 0, 0, .82); color: #fff; font-size: .8em;
}

/* ---------------------------------------------------------
   Chat overlay — “Say something” (from buttns.pdf)
   Uses visibility + pointer-events (never blocks clicks when closed)
   --------------------------------------------------------- */
.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}
.chat-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.chat-card {
  position: relative;
  width: min(960px, 94vw);
  max-height: 92vh;
  background: #161616;
  border-radius: 30px;
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 5%;
  padding: 40px 48px 40px 36px;
  transform: translateY(14px) scale(.98);
  transition: transform .3s ease;
}
.chat-overlay.is-open .chat-card { transform: none; }
.chat-card__art { display: flex; align-items: center; justify-content: center; }
.chat-card__art img { max-height: 520px; width: auto; max-width: 100%; }
.chat-card__title { font-family: var(--jeju); font-weight: 400; font-size: clamp(30px, 3.4vw, 50px); color: #fff; margin: 4px 0 26px; }
.chat-card__form form { display: flex; flex-direction: column; gap: 16px; }
.chat-field {
  width: 100%; background: #3F3F42; border: none; border-radius: 16px;
  padding: 16px 24px; color: #fff; font-family: var(--narrow); font-size: 19px; letter-spacing: .5px; outline: none;
}
.chat-field::placeholder { color: #A4A4A4; }
.chat-field:focus { box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.chat-field--area { min-height: 140px; resize: vertical; }
.chat-send {
  width: 100%; border: none; cursor: pointer; background: #B4B4B4; color: #191919;
  border-radius: 16px; padding: 15px; font-family: var(--narrow); font-size: 19px; letter-spacing: .5px;
  transition: background .25s ease;
}
.chat-send:hover { background: #fff; }
.chat-send:disabled { opacity: .6; cursor: default; }
.chat-status { margin: 2px 0 0; font-family: var(--narrow); font-size: 16px; letter-spacing: .3px; color: #A4A4A4; }
.chat-close {
  position: absolute; top: 20px; right: 24px; width: 20px; height: 20px;
  background: transparent; border: 2px solid #fff; border-radius: 50%; cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}
.chat-close:hover { transform: scale(1.15); opacity: .8; }

/* ---------------------------------------------------------
   About page
   --------------------------------------------------------- */
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: min(9.9vw, 128px) min(3.385vw, 44px) 0;
}
.about__top { display: grid; grid-template-columns: 1fr 30%; gap: 5%; align-items: start; }
.about__left { display: flex; flex-direction: column; }
.about__h {
  font-family: var(--jeju);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 46px);
  color: #1C1C1C;
  line-height: 1.1;
  margin: 0 0 min(1.8vw, 24px);
}
.about__lead {
  font-size: clamp(14px, 1.5625vw, 20px);
  letter-spacing: .3px;
  color: #1C1C1C;
  line-height: 1.5;
  max-width: 60ch;
  margin: 0 0 14px;
}
.about__lead--sub { margin-top: 8px; }
.about__exp { margin: min(3.2vw, 42px) 0 0; display: flex; flex-direction: column; gap: min(1.4vw, 18px); }
.about__exp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: baseline;
  font-size: clamp(13px, 1.5625vw, 20px);
  letter-spacing: .3px;
}
.about__exp-name { color: #1C1C1C; }
.about__exp-role { color: #A4A4A4; margin-left: 14px; }
.about__exp-date { color: #A4A4A4; white-space: nowrap; }

.about__cv {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-end;
  font-size: clamp(14px, 1.5625vw, 20px);
  letter-spacing: .3px;
  color: #1C1C1C;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity .2s ease;
}
.about__cv:hover { opacity: .6; }

.about__right { display: flex; flex-direction: column; gap: min(2.2vw, 28px); }
.about__portrait { width: 100%; border-radius: min(1.5625vw, 20px); display: block; }

/* card look shared by Photos + Playlist */
.about__card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  border-radius: min(1.5625vw, 20px);
  overflow: hidden;
  cursor: pointer;
}
.about__card img { width: 100%; display: block; }
.about__card-title {
  position: absolute;
  top: min(1.4vw, 20px); left: min(1.4vw, 22px);
  color: #fff;
  font-size: clamp(15px, 1.5625vw, 20px);
  letter-spacing: .3px;
  z-index: 2;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
/* ⊙ button — small; black 60% disc with a white ring (on cards) */
.ring {
  position: absolute;
  top: min(1.4vw, 16px); right: min(1.4vw, 16px);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: transform .2s ease;
}
.ring::after { content: ""; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; }
.about__card:hover .ring { transform: scale(1.1); }
/* Download CV — no fill, just a small dark circle outline */
.about__cv .ring--inline {
  position: static;
  width: 12px; height: 12px;
  background: transparent;
  border: 1.5px solid #1c1c1c;
}
.about__cv .ring--inline::after { display: none; }

.about__photos { margin-top: min(2.6vw, 34px); }
.about__photos img { aspect-ratio: 1180 / 980; object-fit: cover; }

/* Playlist — dark card, turntable sits at the bottom-centre (clipped) */
.about__playlist { position: relative; aspect-ratio: 517 / 279; background: #0d0d0d; }
.about__playlist img {
  position: absolute;
  left: 50%; top: 27%;
  transform: translateX(-50%);
  width: 78%; height: auto;
  aspect-ratio: auto;
  opacity: .97;
}

/* ---------------------------------------------------------
   Photos overlay (grid from зрщещы.pdf)
   --------------------------------------------------------- */
.photos-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}
.photos-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.photos-overlay__inner {
  position: relative;
  width: min(1080px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  padding: 34px 34px 40px;
  transform: translateY(14px) scale(.98);
  transition: transform .3s ease;
}
.photos-overlay.is-open .photos-overlay__inner { transform: none; }
.photos-overlay__head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 26px; }
.photos-overlay__title { font-size: clamp(18px, 1.6vw, 24px); letter-spacing: .3px; color: #1C1C1C; margin: 0; }
.photos-close {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid #1C1C1C; background: transparent; cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}
.photos-close:hover { transform: scale(1.12); opacity: .6; }
.photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photos-grid img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 14px; display: block;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 760px) {
  .site-header { top: 14px; }
  .pill--home { gap: 20px; padding: 4px 4px 4px 20px; height: 50px; }
  .pill--home .pill__logo, .pill--home .pill__link, .pill--home .pill__cta { font-size: 15px; }
  .pill--home .pill__cta { padding: 7px 18px; }
  .pill__group { gap: 16px; }
  .pill--case { height: 50px; padding: 5px 24px; }
  .pill--case a { font-size: 15px; gap: 10px; }
  .pill--case .arrow { width: 15px; height: 15px; }
  .hero { padding: 56px 14px 0; }
  .works { padding: 44px 14px 0; }
  .work { grid-template-columns: 1fr; gap: 16px; margin: 0 0 56px; }
  .work:nth-child(2) { margin-bottom: 56px; }
  .work__media { order: -1; border-radius: 12px; }
  .btn { margin-top: 14px; padding: 8px 18px; }
  .cs { padding: 110px 16px 0; }
  .cs__meta { flex-direction: column; gap: 22px; }
  .cs__meta-col { width: 100%; }
  .cs__sections { margin-top: 56px; gap: 84px; }
  .cs__section { flex-direction: column; gap: 24px; }
  .cs__body, .cs__section--text .cs__body { width: 100%; gap: 22px; }
  .cs__img { width: 100%; }
  .footer { margin-top: 72px; }
  .footer__grid { flex-direction: column; gap: 36px; padding: 40px 16px; }
  .footer__cols { flex-wrap: wrap; gap: 28px; }
  .footer__copy { margin-top: 28px; }
  .chat-card { grid-template-columns: 1fr; padding: 26px 20px; overflow: auto; }
  .chat-card__art img { max-height: 180px; }
  .about { padding: 104px 16px 0; }
  .about__top { grid-template-columns: 1fr; gap: 34px; }
  .about__right { order: 2; }
  .about__cv { align-self: flex-start; }
  .about__exp-row { grid-template-columns: 1fr; gap: 2px; }
  .about__exp-date { grid-column: 1; }
  .photos-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .photos-overlay__inner { padding: 64px 16px 60px; }
}
