/* ARK STYLE Projects — keeps styling scoped to this component */
.ark-projects {
  --ark-dark: #3E3A34;
  --ark-bg: #EDE8E2;
  --ark-bg-soft: #F3EEE8;
  --ark-beige: #C9B79E;
  --ark-mid: #A89A87;
  --ark-accent: #C4A884;
  --ark-accent-hover: #B6946B;
  --ark-border: #D9D2C8;
  --ark-text: #6B645C;
  --ark-muted: #8F8479;
  color: var(--ark-text);
  font-family: "Manrope", sans-serif;
  width: 100%;
  box-sizing: border-box;
  padding: 18px 24px 28px;
}
.ark-projects * { box-sizing: border-box; }
.ark-projects__scope-filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 8px; }
.ark-projects__scope-filter { appearance:none; border:1px solid var(--ark-border); border-radius:2px; background:transparent; color:var(--ark-text); padding:8px 14px; font:400 12px/1.35 "Manrope",sans-serif; cursor:pointer; transition:background .18s ease,color .18s ease,border-color .18s ease; }
.ark-projects__scope-filter:hover,.ark-projects__scope-filter:focus-visible { border-color:var(--ark-accent); outline:none; }
.ark-projects__scope-filter.is-active { background:var(--ark-dark); border-color:var(--ark-dark); color:var(--ark-bg); }
.ark-projects__filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 26px; }
.ark-projects__filter { appearance:none; border:1px solid var(--ark-border); border-radius:2px; background:transparent; color:var(--ark-text); padding:8px 14px; font:400 12px/1.35 "Manrope",sans-serif; cursor:pointer; transition:background .18s ease,color .18s ease,border-color .18s ease; }
.ark-projects__filter[hidden] { display:none !important; }
.ark-projects__filter:hover,.ark-projects__filter:focus-visible { border-color:var(--ark-accent); outline:none; }
.ark-projects__filter.is-active { background:var(--ark-accent); border-color:var(--ark-accent); color:var(--ark-dark); }
.ark-projects__grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px 18px; }
.ark-project-card { min-width:0; position:relative; background:transparent; }
.ark-project-card__image-button { display:block; width:100%; padding:0; margin:0 0 11px; border:0; background:var(--ark-bg); cursor:pointer; overflow:hidden; text-align:inherit; aspect-ratio:4/3; }
.ark-project-card__image { display:block; width:100%; height:100%; object-fit:cover; transition:transform .45s ease; }
.ark-project-card__image-button:hover .ark-project-card__image { transform:scale(1.025); }
.ark-project-card__image-placeholder { display:block; width:100%; height:100%; background:var(--ark-bg); }
.ark-project-card__body { position:relative; padding-right:0; }
.ark-project-card__category { margin:0 0 5px; color:var(--ark-muted); font:400 10px/1.4 "Manrope",sans-serif; text-transform:uppercase; letter-spacing:.04em; }
.ark-project-card__title { margin:0 0 5px; color:var(--ark-dark); font:400 23px/1.12 "Cormorant Garamond",serif; }
.ark-project-card__title button { padding:0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
.ark-project-card__title button:hover { color:var(--ark-muted); }
.ark-project-card__subtitle { margin:0; color:var(--ark-text); font:400 12px/1.55 "Manrope",sans-serif; }
.ark-projects__empty,.ark-projects__no-results { padding:24px 0; margin:0; color:var(--ark-muted); font:400 14px/1.6 "Manrope",sans-serif; }

.ark-project-modal[hidden] { display:none !important; }
.ark-project-modal { position:fixed; z-index:999999; inset:0; display:flex; align-items:center; justify-content:center; padding:28px; }
.ark-project-modal__backdrop { position:absolute; inset:0; background:rgba(38,35,31,.78); }
.ark-project-modal__dialog { position:relative; z-index:1; width:min(1120px,100%); max-height:min(92vh,1000px); overflow:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; padding:34px 42px 30px; background:var(--ark-bg); color:var(--ark-text); box-shadow:0 20px 70px rgba(0,0,0,.18); }
.ark-project-modal__close { position:sticky; top:0; float:right; z-index:5; margin:-12px -22px 0 0; width:36px; height:36px; border:0; background:transparent; color:var(--ark-dark); font:300 31px/1 "Manrope",sans-serif; cursor:pointer; }
.ark-project-modal__head { padding:0 45px 18px 0; }
.ark-project-modal__category { margin:0 0 8px; color:var(--ark-muted); font:400 10px/1.4 "Manrope",sans-serif; text-transform:uppercase; letter-spacing:.07em; }
.ark-project-modal__title { margin:0; color:var(--ark-dark); font:400 clamp(30px,3vw,43px)/1.03 "Cormorant Garamond",serif; }
.ark-project-modal__gallery { margin:0 0 28px; }
.ark-project-modal__image-wrap { position:relative; min-height:160px; background:#D8CFC4; display:flex; align-items:center; justify-content:center; }
.ark-project-modal__image { display:block; width:100%; max-height:440px; object-fit:contain; }
.ark-project-modal__arrow { position:absolute; top:50%; transform:translateY(-50%); width:38px; height:38px; display:flex; align-items:center; justify-content:center; border:1px solid rgba(237,232,226,.7); border-radius:50%; background:rgba(62,58,52,.65); color:var(--ark-bg); font:300 28px/1 "Manrope",sans-serif; cursor:pointer; }
.ark-project-modal__arrow--prev { left:14px; }
.ark-project-modal__arrow--next { right:14px; }
.ark-project-modal__arrow[hidden] { display:none; }
.ark-project-modal__counter { position:absolute; right:14px; top:14px; padding:5px 8px; background:rgba(62,58,52,.72); color:var(--ark-bg); font:400 10px/1.2 "Manrope",sans-serif; letter-spacing:.06em; }
.ark-project-modal__thumbs { display:flex; gap:8px; overflow-x:auto; padding:10px 0 2px; }
.ark-project-modal__thumb { flex:0 0 94px; height:66px; padding:0; overflow:hidden; border:1px solid transparent; background:var(--ark-bg-soft); cursor:pointer; }
.ark-project-modal__thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.ark-project-modal__thumb.is-active { border-color:var(--ark-accent-hover); }
.ark-project-modal__thumbs:empty { display:none; }
.ark-project-modal__info { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 34px; margin:0 0 30px; }
.ark-project-modal__info:empty { display:none; }
.ark-project-modal__info-block { border-top:1px solid var(--ark-border); padding-top:11px; }
.ark-project-modal__info-title { margin:0 0 7px; color:var(--ark-dark); font:500 11px/1.4 "Manrope",sans-serif; text-transform:uppercase; letter-spacing:.05em; }
.ark-project-modal__info-text { margin:0; color:var(--ark-text); font:400 12px/1.65 "Manrope",sans-serif; white-space:pre-line; }
.ark-project-modal__cta { display:flex; align-items:center; justify-content:space-between; gap:28px; padding:22px 24px; background:#D8CFC4; }
.ark-project-modal__cta-copy { flex:1; }
.ark-project-modal__cta-title { margin:0 0 7px; color:var(--ark-dark); font:400 23px/1.1 "Cormorant Garamond",serif; text-transform:uppercase; }
.ark-project-modal__cta-text { max-width:630px; margin:0; color:var(--ark-text); font:400 12px/1.6 "Manrope",sans-serif; }
.ark-project-modal__cta-button { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:0; min-height:44px; padding:12px 18px; border:0; background:var(--ark-accent); color:var(--ark-dark) !important; text-decoration:none !important; font:500 10px/1.3 "Manrope",sans-serif; text-transform:uppercase; letter-spacing:.04em; transition:background .2s ease; }
.ark-project-modal__cta-button:hover,.ark-project-modal__cta-button:focus-visible { background:var(--ark-accent-hover); color:var(--ark-dark) !important; }
body.ark-project-modal-open { overflow:hidden; }

/* Mobile Safari: prevent accidental double-tap zoom on controls while preserving pinch zoom. */
.ark-projects__filter,
.ark-projects__scope-filter,
.ark-project-card__image-button,
.ark-project-card__title button,
.ark-project-modal__close,
.ark-project-modal__arrow,
.ark-project-modal__thumb,
.ark-project-modal__cta-button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ark-project-modal__dialog {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}


@media (max-width: 1024px) {
  .ark-projects { padding: 18px 20px 26px; }
  .ark-projects__grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 16px; }
  .ark-project-modal { padding:18px; }
  .ark-project-modal__dialog { padding:28px 28px 24px; }
}
@media (max-width: 640px) {
  .ark-projects { padding: 16px 14px 24px; }
  .ark-projects__scope-filters { gap:6px; margin-bottom:8px; }
  .ark-projects__scope-filter { padding:7px 10px; font-size:11px; }
  .ark-projects__filters { gap:6px; margin-bottom:20px; }
  .ark-projects__filter { padding:7px 10px; font-size:11px; }
  .ark-projects__grid { grid-template-columns:1fr; gap:24px; }
  .ark-project-card__title { font-size:25px; }
  .ark-project-modal { padding:0; align-items:stretch; }
  .ark-project-modal__dialog { width:100%; height:100vh; height:100dvh; max-height:100vh; max-height:100dvh; min-height:100vh; min-height:100dvh; overflow-y:auto; padding:24px 18px 20px; }
  .ark-project-modal__close { margin:-7px -8px 0 0; }
  .ark-project-modal__head { padding-right:32px; }
  .ark-project-modal__title { font-size:32px; }
  .ark-project-modal__image { max-height:48vh; }
  .ark-project-modal__thumb { flex-basis:76px; height:56px; }
  .ark-project-modal__info { grid-template-columns:1fr; gap:18px; margin-bottom:22px; }
  .ark-project-modal__cta { align-items:stretch; flex-direction:column; gap:16px; padding:18px; }
  .ark-project-modal__cta-title { font-size:21px; }
  .ark-project-modal__cta-button { align-self:flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .ark-project-card__image,.ark-projects__filter,.ark-project-modal__cta-button { transition:none; }
}

/* 0.2.0: pagination, graceful image fallback, loading status and keyboard focus states. */
.ark-projects__more-wrap { display:flex; justify-content:center; margin:34px 0 0; }
.ark-projects__load-more { appearance:none; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:12px 24px; border:1px solid var(--ark-border); border-radius:2px; background:transparent; color:var(--ark-dark); font:500 11px/1.35 "Manrope",sans-serif; letter-spacing:.035em; text-transform:uppercase; cursor:pointer; transition:background .18s ease,border-color .18s ease; }
.ark-projects__load-more:hover:not(:disabled) { background:var(--ark-accent); border-color:var(--ark-accent); }
.ark-projects__load-more:disabled { cursor:wait; opacity:.65; }
.ark-projects__load-more[hidden] { display:none !important; }
.ark-projects__no-results { margin:0; padding:20px 0; color:var(--ark-muted); font:400 14px/1.6 "Manrope",sans-serif; }
.ark-projects__no-results[hidden] { display:none !important; }
.ark-projects__grid[aria-busy="true"] { cursor:progress; }
.ark-project-card__image-placeholder { display:flex; align-items:center; justify-content:center; padding:18px; color:var(--ark-muted); font:400 12px/1.5 "Manrope",sans-serif; text-align:center; }
.ark-project-card__image-placeholder span { max-width:220px; }
.ark-projects button:focus-visible,
.ark-project-modal button:focus-visible,
.ark-project-modal a:focus-visible { outline:2px solid var(--ark-accent-hover); outline-offset:3px; }
.ark-project-modal__status { margin:0 0 18px; color:var(--ark-muted); font:400 13px/1.5 "Manrope",sans-serif; }
.ark-project-modal__status[hidden] { display:none !important; }
.ark-project-modal__gallery[hidden] { display:none !important; }
.ark-project-modal__dialog[aria-busy="true"] { cursor:progress; }
.ark-project-modal__image { height:auto; }
.ark-project-modal__thumb img { height:100%; }

@media (max-width:640px) {
  .ark-projects__more-wrap { margin-top:26px; }
  .ark-projects__load-more { width:100%; }
}


/* 0.2.5: match the approved ARK STYLE projects mockup. Only the plugin gallery/card/modal are affected. */
.ark-project-card__image-button {
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
}
.ark-project-card__body {
  padding-right: 34px;
}
.ark-project-card__title {
  margin: 0;
  color: var(--ark-dark);
  font: 400 24px/1.08 "Cormorant Garamond", serif;
}
.ark-project-card__title button:hover,
.ark-project-card__title button:focus-visible {
  color: var(--ark-muted);
}
.ark-project-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 8px 0 0;
  padding-right: 2px;
}
.ark-project-card__tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid var(--ark-border);
  border-radius: 2px;
  background: var(--ark-bg-soft);
  color: var(--ark-muted);
  font: 400 10px/1.35 "Manrope", sans-serif;
  overflow-wrap: anywhere;
}
.ark-project-card__subtitle {
  margin: 7px 0 0;
  color: var(--ark-text);
  font: 400 11px/1.5 "Manrope", sans-serif;
}

/* Project modal: full-width photograph, controls in the heading row and no empty side rails. */
.ark-project-modal__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 58px 20px 0;
}
.ark-project-modal__heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.ark-project-modal__category {
  margin-bottom: 8px;
  color: var(--ark-muted);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: .055em;
}
.ark-project-modal__title {
  font-size: clamp(30px, 2.55vw, 39px);
  line-height: 1.03;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.ark-project-modal__gallery-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 3px;
}
.ark-project-modal__counter {
  position: static;
  display: inline-block;
  padding: 0 3px 0 0;
  background: transparent;
  color: var(--ark-muted);
  font: 400 10px/1.2 "Manrope", sans-serif;
  letter-spacing: .055em;
}
.ark-project-modal__arrow {
  position: static;
  transform: none;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--ark-border);
  border-radius: 50%;
  background: transparent;
  color: var(--ark-dark);
  font: 300 23px/1 "Manrope", sans-serif;
}
.ark-project-modal__arrow:hover,
.ark-project-modal__arrow:focus-visible {
  border-color: var(--ark-accent);
  background: var(--ark-accent);
  color: var(--ark-dark);
}
.ark-project-modal__arrow[hidden],
.ark-project-modal__counter[hidden] {
  display: none !important;
}
.ark-project-modal__image-wrap {
  display: block;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: transparent;
}
.ark-project-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}
.ark-project-modal__thumbs {
  gap: 9px;
  padding: 10px 0 3px;
}
.ark-project-modal__thumb {
  flex: 0 0 112px;
  height: 66px;
  border: 1px solid transparent;
}
.ark-project-modal__thumb.is-active {
  border-color: var(--ark-accent-hover);
}
.ark-project-modal__info {
  gap: 22px 30px;
  margin-top: 8px;
}
.ark-project-modal__info-block {
  padding-top: 10px;
}
.ark-project-modal__cta {
  gap: 24px;
  padding: 22px 24px;
}
.ark-project-modal__cta-title {
  font-size: 25px;
  line-height: 1.06;
}
.ark-project-modal__cta-button {
  min-height: 44px;
  padding: 12px 20px;
}

@media (max-width: 1024px) {
  .ark-project-modal__head {
    gap: 18px;
    padding-right: 52px;
  }
  .ark-project-modal__title {
    font-size: clamp(29px, 3.2vw, 36px);
  }
  .ark-project-modal__image-wrap {
    aspect-ratio: 16 / 10;
  }
}
@media (max-width: 640px) {
  .ark-project-card__image-button {
    aspect-ratio: 16 / 10;
  }
  .ark-project-card__title {
    font-size: 25px;
  }
  .ark-project-card__meta {
    gap: 5px;
    margin-top: 7px;
    padding-right: 34px;
  }
  .ark-project-card__tag {
    font-size: 10px;
  }
  .ark-project-modal__head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 0 16px;
  }
  .ark-project-modal__heading-copy {
    padding-right: 26px;
  }
  .ark-project-modal__category {
    font-size: 10px;
    line-height: 1.4;
  }
  .ark-project-modal__title {
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.02;
  }
  .ark-project-modal__gallery-controls {
    align-self: flex-end;
    gap: 8px;
    padding: 0;
  }
  .ark-project-modal__image-wrap {
    aspect-ratio: 16 / 10;
  }
  .ark-project-modal__image {
    height: 100%;
    object-fit: cover;
  }
  .ark-project-modal__thumb {
    flex-basis: 78px;
    height: 56px;
  }
  .ark-project-modal__info {
    gap: 18px;
    margin-top: 4px;
  }
  .ark-project-modal__cta-title {
    font-size: 22px;
  }
}
/* The close control is out of document flow so the redesigned flex header can align cleanly. */
.ark-project-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  float: none;
  z-index: 10;
  margin: 0;
}
@media (max-width: 640px) {
  .ark-project-modal__close {
    top: 10px;
    right: 10px;
  }
}
.ark-project-modal__gallery-controls[hidden] {
  display: none !important;
}


/* 0.2.6: larger readable type, gallery controls over the photo, and touch swipe support. */
.ark-projects__scope-filter,
.ark-projects__filter {
  font-size: 14px;
  padding: 10px 16px;
  line-height: 1.4;
}
.ark-projects__scope-filters { gap: 9px; }
.ark-projects__filters { gap: 9px; }
.ark-project-card__title { font-size: 28px; line-height: 1.08; }
.ark-project-card__tag { font-size: 12px; line-height: 1.4; padding: 4px 8px; }
.ark-project-card__subtitle { font-size: 14px; line-height: 1.55; }
.ark-projects__empty,
.ark-projects__no-results { font-size: 16px; }
.ark-projects__load-more { font-size: 13px; }
.ark-project-modal__category { font-size: 12px; line-height: 1.5; }
.ark-project-modal__title { font-size: clamp(36px, 3vw, 48px); line-height: 1.04; }
.ark-project-modal__head { padding-right: 54px; padding-bottom: 18px; }
.ark-project-modal__gallery-controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  padding: 0;
  pointer-events: none;
}
.ark-project-modal__image-wrap { position: relative; touch-action: pan-y pinch-zoom; }
.ark-project-modal__image { user-select: none; -webkit-user-drag: none; }
.ark-project-modal__counter {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 9px;
  background: rgba(62,58,52,.78);
  color: var(--ark-bg);
  font: 500 12px/1.2 "Manrope", sans-serif;
  letter-spacing: .06em;
}
.ark-project-modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(237,232,226,.82);
  border-radius: 50%;
  background: rgba(62,58,52,.66);
  color: var(--ark-bg);
  font: 300 31px/1 "Manrope", sans-serif;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}
.ark-project-modal__arrow--prev { left: 18px; }
.ark-project-modal__arrow--next { right: 18px; }
/* Use vector chevrons rather than font glyphs so arrows sit optically centered in their circles. */
.ark-project-modal__arrow { padding: 0; line-height: 0; font-size: 0; }
.ark-project-modal__arrow svg { display: block; width: 21px; height: 21px; flex: 0 0 auto; overflow: visible; }
.ark-project-modal__arrow svg path { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.ark-project-modal__arrow:hover,
.ark-project-modal__arrow:focus-visible { background: rgba(62,58,52,.88); border-color: var(--ark-bg); color: var(--ark-bg); }
.ark-project-modal__thumb { flex-basis: 120px; height: 76px; }
.ark-project-modal__info { gap: 24px 34px; }
.ark-project-modal__info-block { padding-top: 12px; }
.ark-project-modal__info-title { font-size: 14px; line-height: 1.4; margin-bottom: 8px; }
.ark-project-modal__info-text { font-size: 15px; line-height: 1.65; }
.ark-project-modal__cta { gap: 28px; padding: 24px 26px; }
.ark-project-modal__cta-title { font-size: 29px; line-height: 1.08; }
.ark-project-modal__cta-text { font-size: 14px; line-height: 1.6; }
.ark-project-modal__cta-button { font-size: 12px; padding: 13px 20px; }
.ark-project-modal__status { font-size: 15px; }

@media (max-width: 1024px) {
  .ark-project-card__title { font-size: 27px; }
  .ark-project-modal__title { font-size: clamp(34px, 4vw, 44px); }
  .ark-project-modal__info-title { font-size: 14px; }
  .ark-project-modal__info-text { font-size: 15px; }
}
@media (max-width: 640px) {
  .ark-projects__scope-filter,
  .ark-projects__filter { font-size: 13px; padding: 9px 12px; }
  .ark-project-card__title { font-size: 28px; line-height: 1.08; }
  .ark-project-card__tag { font-size: 12px; padding: 4px 7px; }
  .ark-project-card__subtitle { font-size: 14px; }
  .ark-project-modal__head { padding: 0 32px 16px 0; }
  .ark-project-modal__category { font-size: 12px; }
  .ark-project-modal__title { font-size: clamp(31px, 8.6vw, 38px); line-height: 1.04; }
  .ark-project-modal__gallery-controls { inset: 0; }
  .ark-project-modal__counter { top: 10px; right: 10px; font-size: 12px; }
  .ark-project-modal__arrow { width: 42px; height: 42px; font-size: 0; }
  .ark-project-modal__arrow svg { width: 20px; height: 20px; }
  .ark-project-modal__arrow--prev { left: 10px; }
  .ark-project-modal__arrow--next { right: 10px; }
  .ark-project-modal__image-wrap { aspect-ratio: 4 / 3; min-height: 0; }
  .ark-project-modal__image { height: 100%; object-fit: cover; }
  .ark-project-modal__thumb { flex-basis: 88px; height: 64px; }
  .ark-project-modal__info { gap: 18px; margin-top: 4px; }
  .ark-project-modal__info-title { font-size: 13px; margin-bottom: 6px; }
  .ark-project-modal__info-text { font-size: 15px; line-height: 1.6; }
  .ark-project-modal__cta { padding: 20px 18px; gap: 14px; }
  .ark-project-modal__cta-title { font-size: 25px; line-height: 1.08; }
  .ark-project-modal__cta-text { font-size: 14px; }
  .ark-project-modal__cta-button { font-size: 12px; align-self: flex-start; }
}

/* 0.2.8: explicitly anchor mobile gallery controls to the visible image frame.
   Some mobile Safari/theme combinations were aligning the arrows near the lower edge. */
@media (max-width: 640px) {
  .ark-project-modal .ark-project-modal__image-wrap {
    position: relative !important;
    display: block !important;
    overflow: hidden;
    isolation: isolate;
  }

  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    z-index: 5 !important;
    pointer-events: none;
  }

  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow {
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    z-index: 6 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow--prev {
    left: 10px !important;
    right: auto !important;
  }

  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow--next {
    right: 10px !important;
    left: auto !important;
  }

  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__counter {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 6 !important;
  }
}


/* 0.2.9: lighter, more balanced carousel controls on narrow screens.
   Keep desktop sizing unchanged and preserve a clear touch target on mobile. */
@media (max-width: 640px) {
  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    line-height: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow svg {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
    margin: 0 !important;
    transform: translateY(-0.5px);
  }

  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow svg path {
    stroke-width: 1.9;
  }
}


/* 0.2.10: consistent optical centering for mirrored carousel chevrons on mobile.
   Anchor each SVG to the exact center of its circular control, then apply a tiny
   opposite horizontal optical correction because mirrored chevrons have asymmetric visual weight. */
@media (max-width: 640px) {
  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow svg {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    flex: none !important;
    transform: translate(-50%, -50%) !important;
  }
  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow--prev svg {
    transform: translate(calc(-50% - 0.45px), -50%) !important;
  }
  .ark-project-modal .ark-project-modal__image-wrap > .ark-project-modal__gallery-controls > .ark-project-modal__arrow--next svg {
    transform: translate(calc(-50% + 0.45px), -50%) !important;
  }
}


/* 0.2.11: editorial filter panel and responsive project typography.
   Styles remain scoped to the project shortcode; Gutenberg/Spectra sections are untouched. */
.ark-projects .ark-projects__scope-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--ark-border);
}
.ark-projects .ark-projects__filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--ark-border);
}
.ark-projects .ark-projects__filter-label {
  display: block;
  flex: 0 0 100%;
  margin: 0 0 2px;
  color: var(--ark-muted);
  font: 500 11px/1.4 "Manrope", sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.ark-projects .ark-projects__scope-filter {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.4;
}
.ark-projects .ark-projects__filter-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ark-projects .ark-projects__filter {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.ark-projects .ark-projects__filter.is-active {
  background: var(--ark-accent);
  border-color: var(--ark-accent);
  color: var(--ark-dark);
}

/* Keep three columns on wide desktop layouts, even when the browser is zoomed. */
@media (min-width: 901px) {
  .ark-projects .ark-projects__grid {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 22px;
    row-gap: 34px;
  }
}
@media (min-width: 641px) and (max-width: 900px) {
  .ark-projects .ark-projects__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 18px;
    row-gap: 28px;
  }
}
@media (max-width: 640px) {
  .ark-projects .ark-projects__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 30px;
  }
}

/* Card hierarchy: title leads, metadata is quiet, summary remains comfortably readable. */
.ark-projects .ark-project-card__image-button {
  margin-bottom: 14px;
}
.ark-projects .ark-project-card__title {
  margin: 0 0 2px;
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -.01em;
}
.ark-projects .ark-project-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 8px 0 0;
  padding-right: 0;
}
.ark-projects .ark-project-card__tag {
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--ark-bg-soft);
  color: var(--ark-muted);
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.4;
}
.ark-projects .ark-project-card__subtitle {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
}

/* Modal remains editorial on desktop, with a slightly calmer title and CTA on phones. */
.ark-project-modal .ark-project-modal__title {
  font-size: clamp(34px, 2.8vw, 44px);
  line-height: 1.05;
}
.ark-project-modal .ark-project-modal__cta-title {
  font-size: 27px;
  line-height: 1.08;
}
.ark-project-modal .ark-project-modal__cta-text {
  font-size: 14px;
  line-height: 1.6;
}
.ark-project-modal .ark-project-modal__cta-button {
  font-size: 12px;
}
@media (max-width: 640px) {
  .ark-projects .ark-projects__scope-filters {
    gap: 7px;
    margin-bottom: 12px;
    padding-bottom: 13px;
  }
  .ark-projects .ark-projects__scope-filter {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }
  .ark-projects .ark-projects__filters {
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 14px;
  }
  .ark-projects .ark-projects__filter-label {
    font-size: 11px;
    margin-bottom: 1px;
  }
  .ark-projects .ark-projects__filter-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 7px;
    width: 100%;
    padding: 0 1px 8px;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  .ark-projects .ark-projects__filter-list > .ark-projects__filter {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .ark-projects .ark-project-card__title {
    font-size: 26px;
    line-height: 1.08;
  }
  .ark-projects .ark-project-card__tag {
    font-size: 11px;
    padding: 4px 7px;
  }
  .ark-project-modal .ark-project-modal__title {
    font-size: clamp(30px, 7.4vw, 36px);
    line-height: 1.05;
  }
  .ark-project-modal .ark-project-modal__cta {
    padding: 19px 18px;
    gap: 13px;
  }
  .ark-project-modal .ark-project-modal__cta-title {
    font-size: 24px;
    line-height: 1.1;
  }
  .ark-project-modal .ark-project-modal__cta-text {
    font-size: 14px;
    line-height: 1.6;
  }
  .ark-project-modal .ark-project-modal__cta-button {
    min-height: 44px;
    padding: 12px 17px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ark-projects .ark-projects__scope-filter,
  .ark-projects .ark-projects__filter {
    transition: none;
  }
}
