/* Saleena Shahid — site styles.
   Quiet, white-walled, work-first. Colours and type are set once in :root. */

:root {
  --bg: #ffffff;
  --ink: #141414;
  --muted: #7a7a7a;
  --line: #e8e8e8;
  --wall: #f4f3f1;          /* behind images while they load */
  --dot: #c4161c;           /* the red "sold" dot */
  --serif: "EB Garamond", Garamond, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1240px;
  --gutter: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p a, .text a { border-bottom: 1px solid var(--line); }
p a:hover, .text a:hover { border-bottom-color: var(--ink); }
em, i { font-family: var(--serif); font-size: 1.12em; font-style: italic; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Header: name left, menu right */
.site-header .wrap {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 34px; padding-bottom: 34px; gap: 20px;
}
.site-name { font: 400 25px/1 var(--serif); letter-spacing: .01em; }
.site-nav { display: flex; gap: 28px; font-size: 14px; }
.site-nav a { color: var(--muted); transition: color .15s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

main { min-height: 60vh; }

/* Page headings are small and quiet; the work does the talking */
.page-title { font: 400 14px/1.4 var(--sans); color: var(--muted); margin: 0 0 40px; }

/* Home */
.home-work { padding: 24px 0 0; }
.home-work a { display: block; }
.home-work img { width: auto; max-width: 100%; max-height: 74vh; }
.caption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.caption em { color: var(--ink); }
.home-intro {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter);
  padding: 80px 0 100px; border-bottom: 1px solid var(--line);
}
.home-intro p { margin: 0; }
.home-intro .statement { font: 400 23px/1.45 var(--serif); }
.home-intro .side { font-size: 14px; color: var(--muted); }
.home-intro .side h3 { font: 400 14px var(--sans); color: var(--ink); margin: 0 0 6px; }
.home-intro .side p + h3 { margin-top: 24px; }
.more { display: inline-block; margin-top: 18px; font-size: 14px; border-bottom: 1px solid var(--ink); }

/* Works grid: every work sits on the same baseline, captions line up */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 72px var(--gutter); padding-bottom: 100px; }
.work { margin: 0; }
.work a { display: block; cursor: zoom-in; }
.work .frame { aspect-ratio: 5 / 4; display: flex; align-items: flex-end; justify-content: center; }
.work img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; transition: opacity .2s; }
.work a:hover img { opacity: .85; }
.work figcaption { margin-top: 14px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.work figcaption em { color: var(--ink); font-size: 1.18em; }
.red-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot); margin-left: 8px; vertical-align: 1px;
}

/* Single work view (opens over the grid, has its own link) */
.viewer {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: none; grid-template-columns: 1fr 300px; gap: var(--gutter);
  padding: 32px var(--gutter);
}
.viewer.open { display: grid; }
.viewer .stage { display: flex; align-items: center; justify-content: center; min-height: 0; }
.viewer .stage img { max-width: 100%; max-height: calc(100vh - 64px); object-fit: contain; }
.viewer aside { align-self: end; padding-bottom: 8px; font-size: 14px; color: var(--muted); }
.viewer aside em { color: var(--ink); font-size: 1.5em; display: block; line-height: 1.2; }
.viewer aside p { margin: 0 0 4px; }
.viewer .enquire {
  display: inline-block; margin-top: 22px; padding: 11px 18px; border: 1px solid var(--ink);
  color: var(--ink); font-size: 13px; transition: background .15s, color .15s;
}
.viewer .enquire:hover { background: var(--ink); color: var(--bg); }
.viewer .count { margin-top: 28px; font-size: 13px; }
.viewer .ctrl {
  position: absolute; background: none; border: 0; cursor: pointer; color: var(--ink);
  font: 400 14px var(--sans); padding: 8px;
}
.viewer .ctrl:hover { text-decoration: underline; }
.v-close { top: 24px; right: calc(var(--gutter) - 8px); }
.v-prev, .v-next { bottom: 32px; }
.v-prev { right: calc(var(--gutter) + 46px); }
.v-next { right: calc(var(--gutter) - 8px); }

/* A work's own page (/works/<name>/) — same layout as the enlarged view, in the page */
.work-page { display: grid; grid-template-columns: 1fr 300px; gap: var(--gutter); padding-bottom: 90px; }
.work-page .stage { display: flex; align-items: center; justify-content: center; }
.work-page .stage img { max-height: 78vh; width: auto; max-width: 100%; }
.work-page aside { align-self: end; font-size: 14px; color: var(--muted); }
.work-page h1 { margin: 0 0 4px; font-weight: 400; line-height: 1.2; }
.work-page h1 em { color: var(--ink); font-size: 1.7em; }
.work-page aside p { margin: 0 0 4px; }
.work-page .sold-note { margin-top: 14px; }
.work-page .sold-note .red-dot { margin: 0 8px 0 0; }
.work-page .enquire {
  display: inline-block; margin-top: 22px; padding: 11px 18px; border: 1px solid var(--ink);
  color: var(--ink); font-size: 13px;
}
.work-page .enquire:hover { background: var(--ink); color: var(--bg); }
.work-nav { display: flex; gap: 22px; margin-top: 32px; font-size: 14px; }
.work-nav a { color: var(--ink); }
.work-nav a:hover { text-decoration: underline; }
.work-page .count { margin-top: 14px; font-size: 13px; }

/* Text pages */
.cols { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; padding-bottom: 110px; }
.text { max-width: 640px; }
.text h2 { font: 400 14px/1.4 var(--sans); color: var(--muted); margin: 56px 0 16px; }
.text h2:first-child { margin-top: 0; }
.text p { margin: 0 0 1.1em; }
.text .lede { font: 400 22px/1.5 var(--serif); }
.portrait { position: sticky; top: 30px; align-self: start; }
.portrait figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* CV lists: year in a narrow column, entry beside it */
.cv { list-style: none; margin: 0; padding: 0; }
.cv li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 7px 0; }
.cv li span:first-child { color: var(--muted); }
.cv-plain { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.cv-plain li { padding: 4px 0; break-inside: avoid; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 40px;
  padding-top: 28px; padding-bottom: 32px; font-size: 13px; line-height: 1.6; color: var(--muted);
}
/* Left: copyright and credit as one block. Right: links, sitting on the last line. */
.footer-text p { margin: 0; }
.footer-text p + p { margin-top: 4px; }
.site-footer nav { display: flex; gap: 22px; flex-shrink: 0; }
.site-footer a:hover { color: var(--ink); }

/* Credit line — a colophon, not an advert */
.site-footer .credit a {
  color: var(--ink); border-bottom: 0; text-decoration: underline; text-decoration-color: #c9c9c9;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.site-footer .credit a:hover { text-decoration-color: var(--ink); }

@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .works { grid-template-columns: repeat(2, 1fr); gap: 48px var(--gutter); }
  .home-intro, .cols { grid-template-columns: 1fr; gap: 40px; }
  .work-page { grid-template-columns: 1fr; gap: 24px; }
  .work-page .stage img { max-height: 70vh; }
  .work-nav a { padding: 11px 0; margin: -11px 0; }
  .portrait { position: static; max-width: 420px; }
  .viewer { grid-template-columns: 1fr; grid-template-rows: 1fr auto; padding: 56px var(--gutter) 24px; gap: 18px; }
  .viewer .stage img { max-height: calc(100vh - 260px); }
  .viewer aside { align-self: start; }
  .viewer .count { margin-top: 14px; }
  .v-close { top: 14px; }
  .v-prev, .v-next { bottom: 24px; }
}
/* Phones: every link gets a finger-sized tap area (about 44px) without changing the look */
@media (max-width: 900px) {
  .site-nav a, .site-footer nav a { padding: 11px 0; margin: -11px 0; }
  .site-footer .credit a { padding: 12px 0; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer-text p + p { margin-top: 10px; }
  .text p > a, .text li a { display: inline-block; padding: 12px 0; margin: -12px 0; }
  .viewer .ctrl { padding: 14px 10px; }
  .cols > div:empty { display: none; }
}
@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 24px; padding-bottom: 24px; }
  .site-nav { gap: 22px; }
  .page-title { margin-bottom: 28px; }
  .works { gap: 40px 16px; }
  .work figcaption { font-size: 12.5px; }
  .cv-plain { columns: 1; }
  .home-intro { padding: 56px 0 64px; }
}
