/* Arabesque catalogue — Muhammed Saied Kalash */

:root {
  --ink: #111111;
  --paper: #ffffff;
  --muted: #444444;
  --header-height: 7.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body.arabesque {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Libre Baskerville", "Times New Roman", Times, serif;
  line-height: 1.45;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--paper);
  padding: 0.4rem 0.7rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.ar {
  font-family: "Noto Naskh Arabic", "Times New Roman", Times, serif;
  direction: rtl;
}

.en-caps {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Sticky site title across all pages */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  width: 100%;
  padding: 1.5rem 1.5rem 1rem;
}

.wordmark {
  display: block;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
  color: inherit;
  text-decoration: none;
  font-size: inherit;
  font-weight: 400;
}

h1.wordmark {
  margin: 0 auto;
}

.wordmark:hover,
.wordmark:focus {
  text-decoration: none;
}

.wordmark-ar {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.wordmark-en {
  display: block;
  font-size: 1.45rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
}

.header-names {
  width: 100%;
  max-width: 1120px;
  margin: 1.1rem auto 0;
  padding: 0 0.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.header-side {
  flex: 0 0 auto;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.55;
}

.header-side .ar {
  letter-spacing: 0;
  text-transform: none;
  font-size: 1.05rem;
}

.header-left {
  text-align: left;
}

.header-right {
  text-align: right;
}

.header-sub {
  font-size: 0.64rem;
}

.header-right .header-sub {
  font-size: 0.85rem;
}

main {
  flex: 1 0 auto;
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

/* Home */
body.home main {
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
}

.home-stage {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(14rem, 24rem) minmax(10rem, 1fr);
  column-gap: 1.75rem;
  align-items: center;
  min-height: calc(100vh - 14rem);
}

.home-theme {
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-theme img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 14rem);
  object-fit: contain;
}

.home-col {
  align-self: center;
}

.home-browse {
  text-align: right;
}

.home-about {
  text-align: left;
}

.home-col-title {
  margin: 0 0 1.5rem;
  font-weight: 400;
  font-size: inherit;
}

.home-col-title a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.home-col-title a:hover,
.home-col-title a:focus {
  text-decoration: underline;
}

.home-col-title .en-caps {
  display: block;
  margin-bottom: 0.15rem;
}

.home-col-title .ar {
  display: block;
  font-size: 1rem;
}

.home-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-list li {
  margin: 0 0 1.25rem;
}

.home-list a {
  display: inline-block;
}

.home-list .en-caps {
  display: block;
  margin-bottom: 0.1rem;
}

.home-list .ar {
  display: block;
  font-size: 0.95rem;
}

.home-browse .home-list,
.home-about .home-list {
  text-align: inherit;
}

/* Category / list pages */
.page-heading {
  text-align: center;
  margin: 0 0 2.5rem;
  font-size: inherit;
  font-weight: 400;
}

.page-heading .en-caps {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.page-heading .ar {
  display: block;
  font-size: 1.15rem;
}

.work-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 36rem;
}

.work-list li {
  margin: 0 0 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid #e6e6e6;
}

.work-list li:last-child {
  border-bottom: 0;
}

.work-list a {
  display: block;
}

.work-en {
  display: block;
  font-size: 0.95rem;
}

.work-ar {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
}

.work-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Under construction */
.construction-message {
  min-height: calc(100vh - 12rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
}

.construction-message .en-caps {
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  margin: 0;
}

.construction-message .ar {
  margin: 0;
  font-size: 1.15rem;
}

/* Work / object page */
.item-page {
  width: min(900px, 100%);
  margin: 0 auto;
}

.item-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0.85rem 1rem;
  margin: 0.25rem 0 1.5rem;
}

.item-breadcrumb .crumb {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
}

.item-breadcrumb .crumb .en-caps {
  font-size: 0.7rem;
}

.item-breadcrumb .crumb .ar {
  font-size: 0.9rem;
}

.crumb-sep {
  align-self: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

.item-viewer {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.item-figure {
  margin: 0;
  display: flex;
  justify-content: center;
}

.item-figure img,
.item-page img {
  display: block;
  max-width: 100%;
  max-height: min(58vh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.item-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.5rem;
  text-decoration: none;
  user-select: none;
}

.item-arrow:hover,
.item-arrow:focus {
  text-decoration: none;
  opacity: 0.55;
}

.item-arrow[hidden] {
  visibility: hidden;
}

.item-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 0.35rem;
}

.item-number {
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.item-meta-en {
  text-align: left;
}

.item-meta-ar {
  text-align: right;
}

.item-title-en,
.item-title-ar,
.item-technique,
.item-technique-ar {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 400;
}

.item-title-ar {
  font-size: 1.05rem;
}

.item-technique,
.item-technique-ar {
  font-size: 0.85rem;
  color: var(--muted);
}

.item-size {
  text-align: center;
  margin: 1.25rem 0 0.45rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  min-height: 1.2em;
}

.item-year {
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.item-missing,
.item-loading {
  text-align: center;
  padding: 3rem 0;
}

/* Footer — home only */
.site-footer {
  text-align: center;
  padding: 0.5rem 1.5rem 2.5rem;
  font-size: 0.85rem;
}

.site-footer .contact-label {
  margin: 0 0 0.35rem;
}

.site-footer .contact-label .ar {
  margin-left: 0.45rem;
}

.site-footer .social-links {
  margin: 1rem 0 0;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.instagram-link:hover,
.instagram-link:focus {
  text-decoration: none;
  opacity: 0.65;
}

.instagram-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}

@media (max-width: 800px) {
  .site-header {
    padding: 1.25rem 1rem 0.85rem;
  }

  .header-names {
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-align: center;
  }

  .header-left,
  .header-right {
    text-align: center;
  }

  main {
    width: calc(100% - 2rem);
  }

  .home-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 2rem;
    min-height: 0;
  }

  .home-theme {
    order: -1;
    max-width: 16rem;
  }

  .home-theme img {
    max-height: 45vh;
  }

  .home-browse,
  .home-about {
    text-align: center;
  }

  .item-viewer {
    grid-template-columns: 2rem 1fr 2rem;
    gap: 0.35rem;
  }

  .item-meta {
    grid-template-columns: 1fr;
    gap: 1rem;
    justify-items: stretch;
  }

  .item-number {
    order: -1;
  }

  .item-meta-ar {
    text-align: right;
  }
}
