/* ==========================================================================
   Shami — photographer portfolio theme.
   A camera viewfinder identity: ink / paper / sand with a red REC accent,
   Kufam italic display type, IBM Plex Sans Arabic text, Jost readouts.
   Base colors are CSS variables set in layouts/app.blade.php from the customizer;
   everything else is mixed from them so a palette change stays coherent.
   ========================================================================== */

:root {
  --sh-display: 'Kufam', 'IBM Plex Sans Arabic', sans-serif;
  --sh-sans: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --sh-mono: 'Jost', 'IBM Plex Sans Arabic', sans-serif;

  --sh-ink-2: color-mix(in srgb, var(--sh-ink) 88%, var(--sh-paper));
  --sh-text: color-mix(in srgb, var(--sh-ink) 82%, var(--sh-paper));
  --sh-stone: color-mix(in srgb, var(--sh-ink) 11%, var(--sh-paper));
  --sh-line: color-mix(in srgb, var(--sh-ink) 18%, transparent);
  --sh-dark-text: color-mix(in srgb, var(--sh-paper) 70%, var(--sh-ink));
  --sh-dark-dim: color-mix(in srgb, var(--sh-paper) 52%, var(--sh-ink));
  --sh-dark-line: color-mix(in srgb, var(--sh-paper) 16%, var(--sh-ink));
  --sh-error: #B42318;

  --sh-gutter: clamp(20px, 5vw, 72px);
  --sh-pad: 96px;
}
@media (max-width: 640px) { :root { --sh-pad: 64px; } }

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.shami-body {
  margin: 0;
  background: var(--sh-paper);
  color: var(--sh-ink);
  font-family: var(--sh-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Resets are wrapped in :where() so every component class below wins over them. */
.shami-body [hidden] { display: none !important; }
:where(.shami-body) a { color: inherit; text-decoration: none; }
:where(.shami-body) a:where(:not(.shami-btn)):hover { color: var(--sh-accent); }
:where(.shami-body) img { max-width: 100%; }
:where(.shami-body) :focus-visible { outline: 2px solid var(--sh-accent); outline-offset: 3px; }
:where(.shami-body) :is(h1, h2, h3, h4, p, figure, blockquote) { margin: 0; }
:where(.shami-body) button { font-family: inherit; }
#main-content { scroll-margin-top: 72px; }
main section[id] { scroll-margin-top: 64px; }

.shami-container { max-width: 1600px; margin-inline: auto; padding-inline: var(--sh-gutter); box-sizing: border-box; }
.shami-narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--sh-gutter); box-sizing: content-box; }
.shami-stack { display: flex; flex-direction: column; gap: 24px; }
.shami-stack--sm { gap: 10px; }
.shami-hidden { display: none !important; }
.shami-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[dir="rtl"] .shami-flip { display: inline-block; }
[dir="ltr"] .shami-flip { display: inline-block; transform: scaleX(-1); }

/* ---------- Surfaces ---------- */
.shami-section { padding-block: var(--sh-pad); }
.shami-section--tight { padding-block: calc(var(--sh-pad) * .6); }
.shami-section--line { border-top: 1px solid var(--sh-line); }
.shami-nested { padding: 0; }
.shami-nested--pad { padding: clamp(24px, 4vw, 48px); }
.shami-dark { background: var(--sh-ink); color: var(--sh-paper); }
.shami-sand { background: var(--sh-sand); color: var(--sh-ink); }
.shami-page { padding-top: 64px; }

/* ---------- Type ---------- */
.shami-display, .shami-h1, .shami-h2 {
  font-family: var(--sh-display);
  font-style: italic;
  font-weight: 700;
  text-wrap: balance;
}
.shami-display { font-size: clamp(40px, 6.5vw, 92px); line-height: 1.15; max-width: 900px; }
.shami-h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.25; }
.shami-h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.3; }
.shami-h3 { font-family: var(--sh-sans); font-size: 24px; line-height: 1.4; font-weight: 600; }
.shami-lead { font-size: clamp(16px, 1.6vw, 20px); font-weight: 300; line-height: 1.8; max-width: 480px; }
.shami-text { font-size: 17px; line-height: 1.8; color: var(--sh-text); }
.shami-body-lg { font-size: 18px; line-height: 1.9; color: var(--sh-text); text-wrap: pretty; }
.shami-small { font-size: 16px; line-height: 1.8; color: var(--sh-muted); text-wrap: pretty; }
.shami-meta { font-size: 14px; line-height: 1.6; color: var(--sh-muted); }
.shami-intro { max-width: 560px; }
.shami-dark .shami-text, .shami-dark .shami-body-lg, .shami-dark .shami-small { color: var(--sh-dark-text); }
.shami-dark .shami-meta { color: var(--sh-dark-dim); }
.shami-sand .shami-text, .shami-sand .shami-body-lg { color: var(--sh-text); }
.shami-soft { opacity: .9; }

.shami-eyebrow, .shami-readout {
  font-family: var(--sh-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  line-height: 1.6;
}
.shami-eyebrow { color: var(--sh-muted); direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .shami-eyebrow { text-align: right; }
[dir="ltr"] .shami-eyebrow { text-align: left; }
.shami-readout { letter-spacing: .25em; }
.shami-dark .shami-eyebrow { color: var(--sh-dark-dim); }
.shami-sand .shami-eyebrow { color: var(--sh-text); }

/* The REC dot */
.shami-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sh-accent); vertical-align: middle; }
.shami-dot--lg { width: 18px; height: 18px; }
.shami-blink { animation: shami-blink 2s steps(1, end) infinite; }
@keyframes shami-blink { 50% { opacity: .2; } }
.shami-rec { display: inline-flex; align-items: center; gap: 10px; direction: ltr; }

/* ---------- Buttons ---------- */
.shami-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 24px; box-sizing: border-box;
  border: 2px solid transparent; border-radius: 0;
  font-family: var(--sh-sans); font-size: 15px; font-weight: 600; line-height: 1.4;
  cursor: pointer; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s;
}
.shami-btn--accent { background: var(--sh-accent); border-color: var(--sh-accent); color: var(--sh-ink); }
.shami-btn--accent:hover { background: var(--sh-paper); border-color: var(--sh-paper); color: var(--sh-ink); }
.shami-btn--accent .shami-dot { background: var(--sh-ink); }
.shami-btn--ink { background: var(--sh-ink); border-color: var(--sh-ink); color: var(--sh-paper); }
.shami-btn--ink:hover { background: var(--sh-ink-2); border-color: var(--sh-ink-2); color: var(--sh-paper); }
.shami-btn--outline { background: transparent; border-color: var(--sh-ink); color: var(--sh-ink); }
.shami-btn--outline:hover { background: var(--sh-ink); color: var(--sh-paper); }
.shami-btn--outline-light { background: transparent; border-color: var(--sh-paper); color: var(--sh-paper); }
.shami-btn--outline-light:hover { background: var(--sh-paper); color: var(--sh-ink); }
.shami-btn--ghost-light { background: none; border: 1px solid var(--sh-paper); color: var(--sh-paper); font-weight: 400; font-size: 14px; padding: 8px 18px; }
.shami-btn--ghost-light:hover { background: var(--sh-paper); color: var(--sh-ink); }
.shami-btn--sm { min-height: 40px; padding: 6px 16px; font-size: 14px; }
.shami-btn--block { display: flex; width: 100%; }
.shami-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; border-bottom: 2px solid currentColor; padding-bottom: 2px; }

/* ---------- Header ---------- */
.shami-header { position: sticky; top: 0; z-index: 40; background: var(--sh-ink); color: var(--sh-paper); }
.shami-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.shami-logo { display: inline-flex; align-items: center; color: var(--sh-paper); flex: none; }
.shami-logo img { height: 34px; width: auto; display: block; }
.shami-logo--invert img { filter: brightness(0) invert(1); }
.shami-wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sh-display); font-style: italic; font-weight: 700; font-size: 22px; line-height: 1; }
.shami-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; flex-wrap: wrap; }
.shami-nav-link { display: inline-flex; align-items: center; gap: 6px; padding-block: 8px; color: var(--sh-paper); border-bottom: 2px solid transparent; }
.shami-nav-link.is-active { border-bottom-color: var(--sh-accent); }
.shami-nav-item { position: relative; }
.shami-nav-sub {
  position: absolute; top: 100%; inset-inline-start: -16px; min-width: 200px; padding: 8px 0;
  background: var(--sh-ink); border: 1px solid var(--sh-dark-line);
  display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.shami-nav-item:hover .shami-nav-sub, .shami-nav-item:focus-within .shami-nav-sub { opacity: 1; visibility: visible; transform: none; }
.shami-nav-sub a { padding: 10px 16px; font-size: 14px; color: var(--sh-paper); }
.shami-header-end { display: flex; align-items: center; gap: 12px; }
.shami-header-cta { min-height: 40px; padding: 8px 20px; }
.shami-lang-slot:empty { display: none; }
.shami-burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 1px solid var(--sh-dark-line); color: var(--sh-paper); cursor: pointer; }
.shami-mobile-nav { border-top: 1px solid var(--sh-dark-line); padding-block: 12px 24px; }
.shami-mobile-nav nav { display: flex; flex-direction: column; }
.shami-mobile-link { padding: 12px 0; border-bottom: 1px solid var(--sh-dark-line); font-size: 17px; color: var(--sh-paper); }
.shami-mobile-link--sub { padding-inline-start: 20px; font-size: 15px; color: var(--sh-dark-text); }
@media (max-width: 900px) {
  .shami-nav { display: none; }
  .shami-burger { display: inline-flex; }
}
@media (max-width: 480px) { .shami-header-cta { display: none; } }

/* ---------- Footer ---------- */
.shami-footer { background: var(--sh-ink); color: var(--sh-dark-dim); padding-block: 32px; }
.shami-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.shami-footer .shami-wordmark { font-size: 20px; }
.shami-footer-links { display: flex; gap: 8px 24px; flex-wrap: wrap; font-size: 14px; }
.shami-footer-end { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.shami-footer .shami-readout { font-size: 12px; direction: ltr; unicode-bidi: isolate; }
.shami-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.shami-social { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--sh-dark-line); color: var(--sh-paper); font-size: 16px; transition: .2s; }
.shami-body a.shami-social:hover { background: var(--sh-accent); border-color: var(--sh-accent); color: var(--sh-ink); }
.shami-socials--ink .shami-social { width: 48px; height: 48px; border: 2px solid var(--sh-ink); color: var(--sh-ink); font-size: 18px; }

.shami-top {
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 30; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sh-ink); color: var(--sh-paper); border: 1px solid var(--sh-dark-line); cursor: pointer;
  opacity: 0; visibility: hidden; transition: .2s;
}
.shami-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- Viewfinder corners ---------- */
.shami-corners { position: absolute; inset: 12px; pointer-events: none; opacity: 0; transition: opacity .3s, inset .3s; }
.shami-corners { color: var(--sh-paper); }
.shami-corners i { position: absolute; width: 24px; height: 24px; border: 0 solid currentColor; }
.shami-corners i:nth-child(1) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.shami-corners i:nth-child(2) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.shami-corners i:nth-child(3) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.shami-corners i:nth-child(4) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.shami-corners--on { opacity: 1; }
.shami-corners--lg { inset: clamp(16px, 3vw, 40px); }
.shami-corners--lg i { width: 36px; height: 36px; }

/* ---------- Frames (photos) ---------- */
.shami-frame { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--sh-stone); overflow: hidden; }
.shami-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.shami-frame--wide { aspect-ratio: 16 / 9; }
.shami-frame--portrait { aspect-ratio: 4 / 5; }
.shami-frame--free { aspect-ratio: auto; }
.shami-frame--free > img { position: static; height: auto; }

/* ---------- Hero ---------- */
.shami-hero {
  position: relative; overflow: hidden;
  height: var(--sh-hero-h, min(92vh, 880px)); min-height: 560px;
  background: var(--sh-ink-2); color: var(--sh-hero-fg, var(--sh-paper));
}
.shami-hero--plain { background: var(--sh-ink); }
.shami-hero--nested { height: auto; min-height: 480px; }
.shami-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shami-hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, color-mix(in srgb, var(--sh-ink) 85%, transparent), transparent 55%); }
.shami-viewfinder { position: absolute; inset: clamp(16px, 3vw, 40px); pointer-events: none; }
.shami-viewfinder .shami-corners { inset: 0; color: inherit; }
.shami-viewfinder-rec, .shami-viewfinder-clock { position: absolute; top: 20px; display: flex; align-items: center; gap: 10px; direction: ltr; }
.shami-viewfinder-rec { inset-inline-start: 24px; }
.shami-viewfinder-clock { inset-inline-end: 24px; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.shami-hero-copy {
  position: absolute; inset-inline: clamp(36px, 6vw, 96px); bottom: clamp(48px, 8vh, 96px);
  display: flex; flex-direction: column; gap: 24px;
}
.shami-hero--nested .shami-hero-copy { position: relative; inset: auto; padding: 120px clamp(36px, 6vw, 96px) 64px; }
.shami-hero .shami-lead { color: color-mix(in srgb, var(--sh-hero-fg, var(--sh-paper)) 92%, var(--sh-ink)); }
.shami-hero .shami-exif { color: var(--sh-hero-fg, var(--sh-sand)); }
.shami-hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.shami-exif { display: flex; gap: 8px 24px; flex-wrap: wrap; font-family: var(--sh-mono); font-size: 13px; letter-spacing: .15em; color: var(--sh-sand); }
.shami-exif--dark { color: var(--sh-muted); }
.shami-hero-split { padding-block: 64px; }
.shami-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: clamp(32px, 5vw, 80px); align-items: center; }
.shami-hero-split .shami-frame { max-height: 82vh; }
@media (max-width: 640px) {
  .shami-viewfinder-rec, .shami-viewfinder-clock { top: 14px; font-size: 11px; }
  .shami-viewfinder-rec { inset-inline-start: 14px; }
  .shami-viewfinder-clock { inset-inline-end: 14px; }
  .shami-exif { font-size: 11px; gap: 6px 14px; }
}

/* ---------- Section head + tabs ---------- */
.shami-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.shami-section-head--center { justify-content: center; text-align: center; }
.shami-section-head--center .shami-eyebrow { text-align: center; }

.shami-tabs { display: flex; border: 2px solid var(--sh-ink); max-width: 100%; }
.shami-tabs > button, .shami-tabs > a {
  font-family: var(--sh-sans); font-size: 15px; line-height: 1.5; padding: 10px 18px; border: 0; margin: 0;
  background: transparent; color: var(--sh-ink); cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s;
}
.shami-tabs > :is(button, a):hover { background: var(--sh-stone); color: var(--sh-ink); }
.shami-tabs > .is-active, .shami-tabs > [aria-selected="true"], .shami-tabs > [aria-pressed="true"] { background: var(--sh-ink); color: var(--sh-paper); }
.shami-body .shami-tabs > a.is-active:hover { color: var(--sh-paper); background: var(--sh-ink); }
.shami-tabs--scroll, .shami-section-head .shami-tabs { overflow-x: auto; scrollbar-width: none; }
.shami-tabs::-webkit-scrollbar { display: none; }

/* ---------- Grids ---------- */
.shami-grid { display: grid; gap: 24px; }
.shami-grid--work { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.shami-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shami-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shami-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.shami-grid--cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
@media (max-width: 900px) { .shami-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .shami-grid--2, .shami-grid--3 { grid-template-columns: minmax(0, 1fr); } }

.shami-group-head { padding-top: var(--sh-pad); }
.shami-columns { display: grid; grid-template-columns: var(--sh-cols); gap: 48px; align-items: start; }
@media (max-width: 900px) { .shami-columns { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Work (posts as photographs) ---------- */
.shami-work { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.shami-work-link { display: flex; flex-direction: column; gap: 10px; color: inherit; }
.shami-work-link:hover .shami-frame > img { transform: scale(1.035); }
.shami-work-link:hover .shami-corners { opacity: 1; inset: 16px; }
.shami-work-link:hover { color: inherit; }
.shami-work-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; line-height: 1.5; }
.shami-work-title { font-family: var(--sh-sans); font-size: 14px; font-weight: 600; line-height: 1.5; margin: 0; }
.shami-work-cat { color: var(--sh-muted); flex: none; }
.shami-work-link:hover .shami-work-title { color: var(--sh-accent); }
.shami-work--wide .shami-work-title { font-size: 18px; }
/* Views · comments · "x ago" — a quiet readout under the caption */
.shami-work-stats { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 12px; line-height: 1.4; color: var(--sh-muted); opacity: .75; margin-top: -4px; }
.shami-work-stat { display: inline-flex; align-items: center; gap: 5px; font-family: var(--sh-mono); font-weight: 300; letter-spacing: .04em; }
.shami-work-stat svg { flex: none; opacity: .8; }
.shami-work-ago { font-family: var(--sh-sans); font-weight: 300; letter-spacing: 0; margin-inline-start: auto; }
.shami-row .shami-work-stats { margin-top: 2px; }
.shami-row .shami-work-ago { margin-inline-start: 0; }
.shami-dark .shami-work-stats { color: var(--sh-dark-dim); }
.shami-project-stats .shami-work-stats { margin-top: 2px; font-size: 13px; }
.shami-project-stats .shami-work-ago { margin-inline-start: 0; }
.shami-project-stats a.shami-work-stat:hover { color: var(--sh-accent); }

.shami-masonry { columns: 3 300px; column-gap: 16px; }
.shami-masonry > * { break-inside: avoid; margin-bottom: 16px; }

.shami-rows { display: flex; flex-direction: column; border-top: 1px solid var(--sh-line); }
.shami-rows--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 0; }
.shami-rows--2 > * { border-top: 1px solid var(--sh-line); }
@media (max-width: 760px) { .shami-rows--2 { grid-template-columns: minmax(0, 1fr); } }
.shami-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding-block: 20px; border-bottom: 1px solid var(--sh-line); color: inherit; }
.shami-row-n, .shami-service-n { display: inline-flex; align-items: center; gap: 12px; font-family: var(--sh-mono); font-size: 14px; color: var(--sh-accent); letter-spacing: .05em; }
.shami-row-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shami-row-title { font-family: var(--sh-sans); font-size: 20px; line-height: 1.5; font-weight: 600; margin: 0; }
.shami-row-thumb { width: 72px; aspect-ratio: 4 / 5; background: var(--sh-stone); overflow: hidden; }
.shami-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shami-row--static { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding-block: 28px; }
.shami-row--static .shami-h3 { font-size: 22px; }
.shami-row:hover { color: inherit; }
.shami-body a.shami-row:hover .shami-row-title { color: var(--sh-accent); }

.shami-avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--sh-ink); color: var(--sh-paper); font-family: var(--sh-display); font-style: italic; font-weight: 700; object-fit: cover; }

/* ---------- Services ---------- */
.shami-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--sh-line); }
.shami-dark .shami-services { border-top-color: var(--sh-dark-line); }
.shami-service { padding-block: 32px; padding-inline-end: 24px; border-bottom: 1px solid var(--sh-line); display: flex; flex-direction: column; gap: 14px; }
.shami-dark .shami-service { border-bottom-color: var(--sh-dark-line); }
.shami-service-icon { font-size: 18px; color: inherit; }
img.shami-service-icon { width: 28px; height: 28px; object-fit: contain; }
.shami-card { border: 2px solid var(--sh-ink); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.shami-dark .shami-card { border-color: var(--sh-dark-line); }

/* ---------- About ---------- */
.shami-about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: clamp(32px, 5vw, 80px); align-items: center; }
.shami-about-photo { max-width: 520px; width: 100%; }
.shami-about--reverse .shami-about-photo { order: 2; justify-self: end; }
.shami-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-top: 64px; }
.shami-stat { display: flex; flex-direction: column; gap: 4px; border-top: 2px solid currentColor; padding-top: 16px; }
.shami-stat-n { font-family: var(--sh-mono); font-weight: 300; font-size: 44px; line-height: 1.1; }

/* ---------- Booking + forms ---------- */
.shami-booking { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 48px; }
.shami-booking--reverse > :first-child { order: 2; }
.shami-contact-lines { display: flex; flex-direction: column; gap: 6px; font-family: var(--sh-mono); font-size: 15px; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .shami-contact-lines { align-items: flex-end; }
[dir="ltr"] .shami-contact-lines { align-items: flex-start; }
.shami-form-panel { padding: clamp(24px, 4vw, 40px); }

.shami-form { display: flex; flex-direction: column; gap: 14px; }
.shami-field { display: flex; flex-direction: column; gap: 6px; }
.shami-label { font-size: 14px; font-weight: 600; }
.shami-required { color: var(--sh-accent); }
.shami-form input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.shami-form select, .shami-form textarea, .shami-search input {
  width: 100%; box-sizing: border-box; margin: 0;
  font-family: inherit; font-size: 16px; line-height: 1.5; padding: 14px 16px;
  border: 2px solid var(--sh-ink); border-radius: 0; background: var(--sh-paper); color: var(--sh-ink);
  -webkit-appearance: none; appearance: none;
}
.shami-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 16px center; padding-left: 40px;
}
[dir="ltr"] .shami-form select { background-position: right 16px center; padding-left: 16px; padding-right: 40px; }
.shami-form textarea { resize: vertical; min-height: 120px; }
.shami-form input[type="tel"], .shami-form input[type="email"], .shami-form input[type="url"] { text-align: start; }
[dir="rtl"] .shami-form input[type="tel"] { direction: ltr; text-align: right; }
.shami-form :is(input, select, textarea)::placeholder { color: var(--sh-muted); opacity: 1; }
.shami-form :is(input, select, textarea):focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sh-accent) 45%, transparent); }
.shami-form input[type="file"] { font-family: inherit; font-size: 15px; }
.shami-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.shami-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.shami-choice input { width: 18px; height: 18px; accent-color: var(--sh-ink); margin: 0; }
.shami-error { font-size: 14px; color: var(--sh-error); }
.shami-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--sh-ink); color: var(--sh-paper); border: none; border-radius: 0; padding: 16px;
  font-family: inherit; font-size: 17px; font-weight: 600; cursor: pointer; transition: background-color .2s;
}
.shami-submit:hover { background: var(--sh-ink-2); }
.shami-submit:disabled { opacity: .7; cursor: progress; }
.shami-submit:disabled .shami-dot { animation: shami-blink 1s steps(1, end) infinite; }
.shami-form-message { font-size: 15px; margin: 0; }
.shami-form-message.is-error { color: var(--sh-error); }

.shami-saved { background: var(--sh-ink); color: var(--sh-paper); padding: 40px; min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.shami-saved:focus { outline: none; }
.shami-saved-tag { display: flex; align-items: center; gap: 10px; justify-content: flex-end; font-family: var(--sh-mono); font-size: 13px; letter-spacing: .25em; direction: ltr; }
[dir="ltr"] .shami-saved-tag { justify-content: flex-start; }
.shami-saved-text { font-size: 26px; font-weight: 600; line-height: 1.5; }
.shami-saved .shami-btn { align-self: flex-start; }
.shami-form-wrap { height: 100%; }

/* ---------- CTA ---------- */
.shami-cta { padding: clamp(40px, 6vw, 80px); }
.shami-cta-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.shami-cta--banner { padding: var(--sh-pad) 0; }
.shami-cta--minimal { border: 2px solid var(--sh-ink); }
.shami-dark .shami-body-lg.shami-soft { color: var(--sh-dark-text); }

/* ---------- Slider ---------- */
.shami-slider { position: relative; }
.shami-slider-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.shami-slider-track::-webkit-scrollbar { display: none; }
.shami-slide { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.shami-slider--cards .shami-slide { flex-basis: calc((100% - 32px) / 3); }
@media (max-width: 900px) { .shami-slider--cards .shami-slide { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 560px) { .shami-slider--cards .shami-slide { flex-basis: 82%; } }
.shami-slide-hero { position: relative; display: block; aspect-ratio: 16 / 8; min-height: 420px; background: var(--sh-ink-2); color: var(--sh-paper); overflow: hidden; }
.shami-slide-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shami-slide-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--sh-ink) 80%, transparent), transparent 55%); }
.shami-slide-hero:hover { color: var(--sh-paper); }
.shami-slide-hero .shami-corners { z-index: 1; }
.shami-slide-count { position: absolute; z-index: 2; top: clamp(32px, 4vw, 60px); inset-inline-end: clamp(36px, 5vw, 72px); }
.shami-slide-caption { position: absolute; z-index: 2; inset-inline: clamp(36px, 5vw, 72px); bottom: clamp(36px, 5vw, 72px); display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.shami-slide-caption .shami-body-lg { color: var(--sh-dark-text); }
.shami-slider-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 20px; }
.shami-slider-dots { display: flex; gap: 6px; }
.shami-slider-dots button { width: 28px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.shami-slider-dots button::before { content: ""; position: absolute; inset-inline: 0; top: 9px; height: 2px; background: var(--sh-line); }
.shami-slider-dots button[aria-current="true"]::before { background: var(--sh-accent); }
.shami-slider-arrows { display: flex; gap: 8px; margin-inline-start: auto; }
.shami-slider-arrows button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--sh-ink); background: transparent; color: var(--sh-ink); cursor: pointer; }
.shami-slider-arrows button:hover { background: var(--sh-ink); color: var(--sh-paper); }

/* ---------- Testimonials ---------- */
.shami-quote { display: flex; flex-direction: column; gap: 20px; border-top: 2px solid var(--sh-ink); padding-top: 24px; }
.shami-quote-mark { font-family: var(--sh-display); font-style: italic; font-weight: 700; font-size: 72px; line-height: .6; color: var(--sh-accent); height: 32px; }
.shami-quote-text { font-size: 18px; line-height: 1.9; margin: 0; }
.shami-byline { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.shami-stars { font-size: 10px; letter-spacing: .4em; color: var(--sh-accent); }

/* ---------- Social tiles ---------- */
.shami-social-tile { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border: 2px solid var(--sh-ink); font-size: 17px; font-weight: 600; transition: background-color .2s, color .2s; }
.shami-social-tile i { font-size: 20px; }
.shami-body a.shami-social-tile:hover { background: var(--sh-ink); color: var(--sh-paper); }

/* ---------- Packages ---------- */
.shami-plan { border: 2px solid var(--sh-ink); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.shami-plan--featured { background: var(--sh-ink); color: var(--sh-paper); }
.shami-plan--featured .shami-small, .shami-plan--featured .shami-meta { color: var(--sh-dark-text); }
.shami-plan-price { font-family: var(--sh-mono); font-size: 44px; font-weight: 300; line-height: 1.1; }
.shami-plan-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.shami-plan-list li { padding: 8px 0; border-bottom: 1px solid var(--sh-line); font-size: 15px; }
.shami-plan--featured .shami-plan-list li { border-bottom-color: var(--sh-dark-line); }
.shami-plan-list li::before { content: "— "; color: var(--sh-accent); }

/* ---------- Prose ---------- */
.shami-prose { font-size: 18px; line-height: 1.9; color: var(--sh-text); overflow-wrap: anywhere; }
.shami-prose > * { margin: 0 0 24px; }
.shami-prose > *:last-child { margin-bottom: 0; }
.shami-prose h1, .shami-prose h2, .shami-prose h3 { font-family: var(--sh-display); font-style: italic; font-weight: 700; color: var(--sh-ink); line-height: 1.4; margin-top: 48px; }
.shami-prose h1 { font-size: 40px; }
.shami-prose h2 { font-size: 32px; }
.shami-prose h3 { font-size: 24px; }
.shami-prose h4 { font-size: 20px; font-weight: 600; color: var(--sh-ink); }
.shami-prose a { color: var(--sh-ink); text-decoration: underline; text-decoration-color: var(--sh-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.shami-prose strong { color: var(--sh-ink); }
.shami-prose ul, .shami-prose ol { padding-inline-start: 24px; }
.shami-prose ul { list-style: square; }
.shami-prose ol { list-style: decimal; }
.shami-prose li { margin-bottom: 8px; }
.shami-prose li::marker { color: var(--sh-accent); }
.shami-prose blockquote { border-inline-start: 3px solid var(--sh-accent); padding-inline-start: 24px; font-family: var(--sh-display); font-style: italic; font-size: 24px; line-height: 1.6; color: var(--sh-ink); }
.shami-prose blockquote p { margin: 0; }
.shami-prose img, .shami-prose video, .shami-prose iframe { max-width: 100%; height: auto; display: block; }
.shami-prose figure figcaption { font-family: var(--sh-mono); font-size: 13px; letter-spacing: .1em; color: var(--sh-muted); margin-top: 10px; }
.shami-prose hr { border: 0; border-top: 1px solid var(--sh-line); margin-block: 48px; }
.shami-prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.shami-prose th, .shami-prose td { border-bottom: 1px solid var(--sh-line); padding: 12px; text-align: start; }
.shami-prose th { font-weight: 600; color: var(--sh-ink); }
.shami-prose code { font-size: .85em; background: var(--sh-stone); padding: 2px 6px; }
.shami-prose pre { background: var(--sh-ink); color: var(--sh-paper); padding: 20px; overflow-x: auto; direction: ltr; }
.shami-prose pre code { background: none; padding: 0; }
.shami-dark .shami-prose, .shami-dark .shami-prose :is(h1, h2, h3, h4, strong) { color: var(--sh-paper); }

/* ---------- Archive ---------- */
.shami-search { display: flex; gap: 0; margin-bottom: 40px; max-width: 640px; }
.shami-search input { border-inline-end: 0; }
.shami-search .shami-btn { min-height: auto; }
.shami-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-block: 80px; }
.shami-empty .shami-text { max-width: 480px; }

.shami-pagination { margin-top: 56px; }
.shami-pagination nav { font-family: var(--sh-mono); }
.shami-pagination nav > div:first-child { display: none; }
.shami-pagination nav > div:last-child { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.shami-pagination nav p { font-size: 13px; letter-spacing: .1em; color: var(--sh-muted); margin: 0; }
.shami-pagination nav span.relative.z-0 { display: inline-flex; gap: 6px; box-shadow: none; }
.shami-pagination span[aria-current] > span, .shami-pagination a, .shami-pagination span[aria-disabled] > span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; box-sizing: border-box;
  border: 2px solid var(--sh-ink) !important; border-radius: 0 !important; background: transparent !important; color: var(--sh-ink) !important; font-size: 15px; margin: 0 !important;
}
.shami-pagination span[aria-current] > span { background: var(--sh-ink) !important; color: var(--sh-paper) !important; }
.shami-pagination span[aria-disabled] > span { opacity: .35; }
.shami-pagination a:hover { background: var(--sh-ink) !important; color: var(--sh-paper) !important; }
@media (max-width: 640px) { .shami-pagination nav > div:first-child { display: flex; justify-content: space-between; } .shami-pagination nav > div:last-child { display: none; } }

/* ---------- Project (single post) ---------- */
.shami-project-head { padding-block: 48px 40px; display: flex; flex-direction: column; gap: 24px; }
.shami-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--sh-muted); margin-bottom: 8px; }
.shami-breadcrumb [aria-current] { color: var(--sh-ink); }
.shami-project-facts { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 0; }
.shami-project-facts > div { display: flex; flex-direction: column; gap: 2px; }
.shami-project-facts dt { font-size: 11px; color: var(--sh-muted); }
.shami-project-facts dd { margin: 0; font-weight: 600; font-size: 16px; }
.shami-cover { position: relative; background: var(--sh-ink); display: flex; justify-content: center; }
.shami-cover-link { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shami-cover img { display: block; max-height: 86vh; width: auto; max-width: 100%; }
.shami-project-foot { padding-top: 56px; display: flex; flex-direction: column; gap: 32px; }
.shami-project-comments { padding-top: 32px; }

/* Gallery beside a sticky comments column. The column sits on the physical left in both
   directions: after the gallery in RTL (grid flows right-to-left), moved first in LTR. */
.shami-project-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; padding-top: 64px; }
[dir="ltr"] .shami-project-body { grid-template-columns: 380px minmax(0, 1fr); }
[dir="ltr"] .shami-project-aside { order: -1; }
.shami-project-main { min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.shami-project-main > .shami-project-foot { padding-top: 0; }
.shami-project-aside { position: sticky; top: 88px; }
.shami-project-aside-inner {
  max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain;
  border-top: 2px solid var(--sh-ink); padding-top: 20px; padding-inline-end: 8px;
  scrollbar-width: thin; scrollbar-color: var(--sh-line) transparent;
}
.shami-project-aside .comments-section > h3 { font-family: var(--sh-display); font-style: italic; font-weight: 700; font-size: 26px; line-height: 1.4; margin-bottom: 20px; }
.shami-project-aside .comments-section form { padding: 16px; }
.shami-project-aside .sm\:grid-cols-2 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1024px) {
  .shami-project-body, [dir="ltr"] .shami-project-body { grid-template-columns: minmax(0, 1fr); }
  [dir="ltr"] .shami-project-aside { order: 0; }
  .shami-project-aside { position: static; }
  .shami-project-aside-inner { max-height: none; overflow: visible; padding-inline-end: 0; }
}

.shami-gallery { display: flex; flex-direction: column; gap: 16px; }
.shami-gallery-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--sh-line); padding-bottom: 12px; }
.shami-gallery-head .shami-eyebrow { margin: 0; }
.shami-gallery-head .shami-readout { color: var(--sh-muted); }
.shami-gallery-grid { display: flex; flex-direction: column; gap: 16px; }
.shami-gallery-item {
  position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden;
  background: linear-gradient(90deg, var(--sh-stone) 0%, color-mix(in srgb, var(--sh-stone) 55%, var(--sh-paper)) 40%, var(--sh-stone) 80%);
  background-size: 200% 100%; animation: shami-shimmer 1.4s ease-in-out infinite;
}
.shami-gallery-item.is-loaded { animation: none; background: var(--sh-stone); }
.shami-gallery-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shami-gallery-btn:disabled { cursor: default; }
.shami-gallery-btn img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.shami-gallery-item.is-loaded img { opacity: 1; }
.shami-gallery-btn:hover img { opacity: .92; }
@keyframes shami-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.shami-gallery-more { display: flex; justify-content: center; padding-top: 16px; }
.shami-gallery-more .shami-btn { min-width: 260px; }
.shami-gallery-more .shami-readout { color: var(--sh-muted); }
.shami-gallery-more .shami-btn:hover .shami-readout { color: inherit; }
.shami-gallery-done { text-align: center; color: var(--sh-muted); padding-top: 16px; }
.shami-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.shami-tag { padding: 4px 12px; border: 1px solid var(--sh-ink); font-size: 14px; }
.shami-share { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 24px; border-block: 1px solid var(--sh-line); }
#comments { color: var(--sh-ink); }

/* ---------- Lightbox ---------- */
.shami-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: color-mix(in srgb, var(--sh-ink) 96%, transparent); color: var(--sh-paper); }
.shami-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.shami-lightbox::backdrop { background: transparent; }
.shami-lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; display: block; }
.shami-lightbox-btn { position: absolute; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--sh-dark-line); color: var(--sh-paper); cursor: pointer; }
.shami-lightbox-btn:hover { background: var(--sh-paper); color: var(--sh-ink); }
.shami-lightbox-close { top: 20px; inset-inline-end: 20px; }
.shami-lightbox-prev { top: 50%; inset-inline-start: 20px; transform: translateY(-50%); }
.shami-lightbox-next { top: 50%; inset-inline-end: 20px; transform: translateY(-50%); }
.shami-lightbox-count { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .shami-blink, .shami-submit:disabled .shami-dot, .shami-gallery-item { animation: none; }
  .shami-frame > img, .shami-corners, .shami-nav-sub, .shami-top { transition: none; }
  .shami-work-link:hover .shami-frame > img { transform: none; }
}
