/* Coska-inspired editorial UI — 2026-10-19.
   Replaces projects-ui20261019.css. Used by /assets/index-coska20261019.js:
   - Rk  (home "MY PROJECTS" cards):  .pc-head*, .pc-list, .pc*, .pc-btn*
   - Jk  (/project/:slug detail):     .pd, .pd-nav*, .pd-head, .pd-meta*, .pd-gallery, .pd-shot, .pd-next*
   - home nav Contact link:           .hdr-pill
   Navy ink + wine accents + cream surfaces (Anastazija's palette), Coska layout and hierarchy. */

:root {
  --cx-ink: #14213D;
  --cx-wine: #5B1B23;
  --cx-wine-deep: #57161E;
  --cx-wine-hover: #44111A;
  --cx-wine-tint: #F5ECEC;
  --cx-text: #4A4F5E;
  --cx-muted: #8A8C96;
  --cx-line: rgba(91, 27, 35, 0.14);
  --cx-cream: #F9F9F6;
  --cx-page: #FAFAFA;
  --cx-frame: #F1ECE9;
  --cx-radius: 20px;
  --cx-gutter: 20px;
  --cx-max: 1336px;
  --cx-head: var(--font-headline, "Futura Now Headline", sans-serif);
  --cx-body: var(--font-body, "Inter", sans-serif);
  --cx-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Home nav: Contact pill (light touch) ---------- */

.hdr-pill {
  padding: 9px 18px;
  border: 1px solid rgba(20, 33, 61, 0.4);
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.hdr-pill > span { display: none; }
.hdr-pill:hover {
  background: var(--cx-ink);
  border-color: var(--cx-ink);
  color: var(--cx-page) !important;
}

/* ---------- MY PROJECTS heading ---------- */

.pc-head { padding: 56px 0 20px; text-align: left; }
.pc-head__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 max(var(--cx-gutter), calc((100% - var(--cx-max)) / 2)) 18px;
}
.pc-head__title {
  margin: 0;
  font-family: var(--cx-head);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-align: left;
}
.pc-head__count {
  position: relative;
  top: -0.2em;
  margin-left: 0.35em;
  font-family: var(--cx-body);
  font-size: 0.24em;
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: top;
  color: var(--cx-wine);
}
.pc-head__note {
  margin: 0 0 0.35em;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cx-muted);
  white-space: nowrap;
}

/* ---------- Card list ---------- */

.pc-list {
  display: flex;
  flex-direction: column;
  padding: 0 max(var(--cx-gutter), calc((100% - var(--cx-max)) / 2)) 96px;
}

.pc {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "media" "body";
  row-gap: 18px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--cx-line);
  font-family: var(--cx-body);
  text-align: left;
}

.pc__head { grid-area: head; }

.pc__eyebrow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--cx-wine);
}
.pc__total { color: var(--cx-muted); font-weight: 500; }

.pc__title {
  margin: 0 0 14px;
  font-family: var(--cx-head);
  font-weight: 400;
  font-size: clamp(30px, 8.4vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--cx-ink);
  text-align: left;
  text-wrap: pretty;
}

.pc__tag {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  padding: 5px 14px;
  border: 1px solid rgba(91, 27, 35, 0.4);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cx-ink);
}
.pc__tag-sep { color: var(--cx-wine); opacity: 0.55; }

/* media */
.pc__media { grid-area: media; position: relative; }
.pc__media-link { position: relative; display: block; width: 100%; }
.pc__frame {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--cx-radius);
  background: var(--cx-frame);
}
.pc__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1s var(--cx-ease);
}
.pc:hover .pc__img { transform: scale(1.04); }
.pc__media--laptop { padding: 28px 24px 4px; background: var(--cx-frame); border-radius: var(--cx-radius); }

/* round "View project" badge, cut out of the image with a page-coloured ring */
.pc__badge {
  position: absolute;
  right: 16px;
  bottom: -26px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--cx-wine-deep);
  color: var(--cx-cream);
  box-shadow: 0 0 0 6px var(--cx-page), 0 16px 30px -14px rgba(87, 22, 30, 0.6);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  transition: transform 0.5s var(--cx-ease), background-color 0.3s ease;
}
.pc__badge-label { max-width: 60px; }
.pc__badge-icon { width: 18px; height: 18px; flex: none; }
.pc:hover .pc__badge { transform: rotate(-10deg) scale(1.06); background: var(--cx-wine-hover); }

/* body */
.pc__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding-top: 18px;
}
.pc__desc {
  margin: 0;
  max-width: 30rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--cx-text);
  text-align: left;
}
.pc__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* buttons (cards + detail page) */
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--cx-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.pc-btn:focus-visible,
.pd-nav a:focus-visible,
.pd-next__link:focus-visible,
.pd-meta a:focus-visible {
  outline: 2px solid var(--cx-wine);
  outline-offset: 3px;
}
.pc-btn--primary { background: var(--cx-wine-deep); color: var(--cx-cream); }
.pc-btn--primary:hover { background: var(--cx-wine-hover); color: #FFFFFF; }
.pc-btn--ghost {
  background: transparent;
  color: var(--cx-wine);
  border-color: rgba(91, 27, 35, 0.3);
}
.pc-btn--ghost:hover { background: var(--cx-wine-tint); border-color: var(--cx-wine); }
.pc-btn__icon { width: 16px; height: 16px; flex: none; }
.pc-btn__icon--arrow { transition: transform 0.25s ease; }
.pc-btn:hover .pc-btn__icon--arrow { transform: translateX(3px); }

@media (max-width: 520px) {
  .pc__actions { gap: 8px; }
  .pc__actions .pc-btn { flex: 1 1 auto; padding: 0 14px; }
}

@media (min-width: 900px) {
  :root { --cx-gutter: 32px; }
  .pc-head { padding: 96px 0 28px; }
  .pc-head__note { font-size: 13px; }
  .pc-list { padding-bottom: 128px; }
  .pc {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "head media" "body media";
    column-gap: clamp(48px, 5.5vw, 96px);
    row-gap: 0;
    padding: 40px 0 64px;
  }
  .pc__head { padding-top: 2px; }
  .pc__title { font-size: clamp(40px, 4.2vw, 62px); margin-bottom: 20px; }
  .pc__body { align-self: end; padding-top: 40px; }
  .pc__desc { font-size: 16px; }
  .pc__badge {
    right: auto;
    left: -44px;
    bottom: 36px;
    width: 112px;
    height: 112px;
    gap: 6px;
    font-size: 11.5px;
  }
  .pc__badge-label { max-width: 80px; }
  .pc__badge-icon { width: 20px; height: 20px; }
}

/* ---------- Project detail (Jk) ---------- */

.pd { color: var(--cx-ink); text-align: left; }

/* slim sticky header */
.pd-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 249, 246, 0.84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--cx-line);
}
.pd-nav__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px max(16px, calc((100% - var(--cx-max)) / 2));
  box-sizing: border-box;
}
.pd-nav__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pd-nav__back {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(91, 27, 35, 0.25);
  color: var(--cx-wine);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.pd-nav__back:hover { background: var(--cx-wine-deep); border-color: var(--cx-wine-deep); color: var(--cx-cream); }
.pd-nav__back-icon { width: 16px; height: 16px; }
.pd-nav__brand {
  overflow: hidden;
  font-family: "Poppins", var(--cx-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  color: var(--cx-ink);
}
.pd-nav__brand-full { display: none; }
.pd-nav__links { display: none; }
.pd-nav__link {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cx-ink);
}
.pd-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--cx-wine);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.pd-nav__link:hover::after { transform: scaleX(1); }
.pd-nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--cx-wine);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cx-wine);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.pd-nav__cta:hover { background: var(--cx-wine-deep); color: var(--cx-cream); }

@media (min-width: 768px) {
  .pd-nav__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: 64px;
    padding-left: max(32px, calc((100% - var(--cx-max)) / 2));
    padding-right: max(32px, calc((100% - var(--cx-max)) / 2));
  }
  .pd-nav__links { display: flex; gap: 36px; }
  .pd-nav__cta { justify-self: end; }
}
@media (min-width: 1100px) {
  .pd-nav__brand-full { display: inline; }
  .pd-nav__brand-short { display: none; }
}

/* title, intro, meta row */
.pd-head {
  padding: 44px max(var(--cx-gutter), calc((100% - var(--cx-max)) / 2)) 28px;
}
.pd-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cx-wine);
}
.pd-eyebrow__rule { width: 28px; height: 1px; background: currentColor; opacity: 0.45; }
.pd-eyebrow__muted { color: var(--cx-muted); font-variant-numeric: tabular-nums; }
.pd-title {
  max-width: 16ch;
  margin: 0;
  font-family: var(--cx-head);
  font-weight: 400;
  font-size: clamp(42px, 11vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--cx-ink);
  text-wrap: pretty;
}
.pd-intro { display: grid; gap: 24px; margin-top: 26px; }
.pd-desc {
  max-width: 40rem;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--cx-text);
}
.pd-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.pd-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  margin: 32px 0 0;
  border-top: 1px solid var(--cx-line);
  border-bottom: 1px solid var(--cx-line);
}
.pd-meta__item { min-width: 0; padding: 14px 0; }
.pd-meta dt {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cx-muted);
}
.pd-meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cx-ink);
  overflow-wrap: anywhere;
}
.pd-meta a {
  color: var(--cx-wine);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 27, 35, 0.3);
  transition: border-color 0.2s ease;
}
.pd-meta a:hover { border-bottom-color: var(--cx-wine); }

/* hero + stacked gallery */
.pd-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px max(12px, calc((100% - var(--cx-max)) / 2)) 64px;
}
.pd-shot {
  overflow: hidden;
  border-radius: 14px;
  background: var(--cx-frame);
  box-shadow: 0 0 0 1px rgba(91, 27, 35, 0.07);
}
.pd-shot img { display: block; width: 100%; height: auto; }

/* next project */
.pd-next { padding: 0 max(var(--cx-gutter), calc((100% - var(--cx-max)) / 2)) 64px; }
.pd-next__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--cx-line);
  text-decoration: none;
  color: var(--cx-ink);
}
.pd-next__text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pd-next__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cx-wine);
}
.pd-next__title {
  font-family: var(--cx-head);
  font-size: clamp(30px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.pd-next__arrow {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cx-wine-deep);
  color: var(--cx-cream);
  transition: transform 0.5s var(--cx-ease), background-color 0.3s ease;
}
.pd-next__icon { width: 24px; height: 24px; }
.pd-next__link:hover .pd-next__arrow { transform: rotate(-45deg); background: var(--cx-wine-hover); }

@media (min-width: 900px) {
  .pd-head { padding-top: 80px; padding-bottom: 40px; }
  .pd-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 48px;
    margin-top: 40px;
  }
  .pd-desc { font-size: 20px; }
  .pd-meta {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    column-gap: 0;
    margin-top: 56px;
  }
  .pd-meta__item { padding: 18px 24px 20px 0; }
  .pd-meta__item + .pd-meta__item { padding-left: 24px; border-left: 1px solid var(--cx-line); }
  .pd-gallery { gap: 28px; padding: 16px max(32px, calc((100% - var(--cx-max)) / 2)) 120px; }
  .pd-shot { border-radius: var(--cx-radius); }
  .pd-next { padding-bottom: 120px; }
  .pd-next__link { padding-top: 44px; }
  .pd-next__arrow { width: 112px; height: 112px; }
  .pd-next__icon { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .pc__img, .pc__badge, .pc-btn, .pc-btn__icon--arrow, .pd-next__arrow, .pd-nav__link::after { transition: none; }
  .pc:hover .pc__img, .pc:hover .pc__badge, .pd-next__link:hover .pd-next__arrow { transform: none; }
}
