/* Melissa Allegories — recreated from the Adobe Portfolio theme */
:root {
  --ink: #222;
  --muted: #999;
  --body: #333;
  --bg: #fff;
  --rule: #eee;
  --display: "Jost", "Futura PT", Futura, "Century Gothic", sans-serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --sidebar: 336px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------- splash ---------- */
body.splash { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.splash-img { background: #ddd center / cover no-repeat; min-height: 100vh; }
.splash-text { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px 48px; }
.splash-text h1 { font: 400 50px/1.1 var(--display); text-transform: uppercase; color: var(--ink); margin: 0 0 18px; letter-spacing: .01em; }
.splash-text p { color: #888; font-size: 20px; line-height: 1.5; max-width: 560px; margin: 0 0 28px; font-weight: 300; }
.btn { display: inline-block; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 26px; font: 500 13px/1.4 var(--sans); cursor: pointer; transition: background .2s; }
.btn:hover { background: #000; }

/* ---------- inner layout (measured from Adobe Portfolio at 1366px) ---------- */
.site { display: flex; max-width: 1400px; margin: 0 auto; }
.sidebar { flex: 0 0 351px; width: 351px; text-align: center; padding: 50px 32px 50px 59px; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
.logo a { font: 700 30px/30px var(--display); text-transform: uppercase; color: var(--ink); display: block; margin-bottom: 50px; }
.menu-toggle { display: none; }
.nav, .nav ul { list-style: none; margin: 0; padding: 0; }
.nav > li { margin: 0 0 20px; }
.nav ul { margin-top: 12px; }
.nav ul li { padding: 0 0 10px; }
.page-title a, .project-title a { color: var(--muted); font-size: 16px; line-height: 20px; transition: color .2s; }
.page-title a:hover, .project-title a:hover, .nav a.active { color: var(--ink); }
.gallery-title > a { font: 700 14px/14px var(--display); text-transform: uppercase; color: var(--ink); }
.gallery-title > a.active { color: var(--muted); }

.main { flex: 1; min-width: 0; padding: 0; }
.page-header { max-width: 800px; margin: 0 auto; padding: 70px 0; text-align: center; }
.page-header h1 { font: 400 50px/50px var(--display); text-transform: uppercase; color: var(--ink); margin: 0 0 20px; }
.page-desc { font-size: 18px; line-height: 26px; color: var(--muted); margin: 0; }
.page-header h1:last-child { margin-bottom: 0; }
.modules > * { margin: 0; padding: 0 0 40px; }
.m-img img { width: 100%; }
.m-mc { display: flex; flex-direction: column; gap: 10px; }
.mc-row { display: flex; gap: 10px; }
.mc-item { flex: var(--a) 1 0; min-width: 0; margin: 0; }
.mc-item img { width: 100%; aspect-ratio: var(--a); object-fit: cover; }
.m-img figcaption, .mc-item figcaption { padding: 10px 8px 0; text-align: center; color: var(--muted); font-size: 15px; line-height: 22px; }
.m-txt { max-width: 800px; margin: 0 auto !important; padding: 20px 0 40px !important; text-align: center; color: var(--muted); font-size: 18px; line-height: 26px; }
.m-txt p { margin: 0 0 10px; }
.m-txt p:last-child { margin-bottom: 0; }
.m-txt p.gap { height: 26px; }
.m-txt-left { text-align: left; }
.m-btn { text-align: center; padding-bottom: 20px !important; }
.m-embed { position: relative; aspect-ratio: 16 / 9; margin-bottom: 40px !important; padding: 0 !important; }
.m-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.m-prose p { margin: 0 0 26px; }
.m-prose p:last-child { margin-bottom: 0; }
.m-prose p.gap { display: none; }
.m-img img, .mc-item img { cursor: zoom-in; }
/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,.97); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.lb.open { opacity: 1; pointer-events: auto; }
.lb img { max-width: calc(100vw - 160px); max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; box-shadow: 0 2px 30px rgba(0,0,0,.08); }
.lb button { position: absolute; background: none; border: 0; color: var(--ink); cursor: pointer; font: 300 40px/1 var(--display); padding: 16px; opacity: .7; }
.lb button:hover, .lb button:focus-visible { opacity: 1; }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .lb img { max-width: 100vw; max-height: calc(100vh - 120px); }
  .lb-prev, .lb-next { top: auto; bottom: 4px; transform: none; font-size: 34px; }
  .lb-count { bottom: 22px; }
  .m-prose p { margin-bottom: 24px; }
}

/* ---------- gallery grid ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Gallery: edge-to-edge 4:5 covers, image only; hover swaps to the rollover image and shows year + title */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 25px; }
.cover { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; container-type: inline-size; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-rollover { opacity: 0; }
.cover-empty { position: absolute; inset: 0; background: #f6f6f6; }
.cover-details { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8%; text-align: center; background: rgba(255,255,255,.55); opacity: 0; transition: opacity .15s; }
.cover:hover .cover-details, .cover:focus-visible .cover-details { opacity: 1; }
.cover:hover .cover-rollover, .cover:focus-visible .cover-rollover { opacity: 1; }
.cover:has(.cover-rollover):hover .cover-normal { opacity: 0; }
.cover-year { font: 400 clamp(14px, 8cqi, 20px)/1.2 var(--display); color: var(--muted); margin-bottom: 10px; }
.cover-title { font: 400 clamp(22px, 15cqi, 50px)/1 var(--display); text-transform: uppercase; color: var(--ink); }
@media (hover: none) {
  .cover-details { opacity: 1; background: none; justify-content: flex-end; align-items: stretch; padding: 0; }
  .cover-year { display: none; }
  .cover-title { font-size: 15px; background: rgba(255,255,255,.88); padding: 8px; }
}

/* ---------- contact ---------- */
.contact-form { max-width: 640px; margin: 20px auto 60px; display: grid; gap: 8px; }
.contact-form label { font-size: 14px; color: var(--ink); margin-top: 10px; }
.contact-form input, .contact-form textarea { font: inherit; padding: 12px 14px; border: 1px solid #ccc; border-radius: 2px; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.contact-form .btn { justify-self: start; margin-top: 16px; }
.hp { position: absolute; left: -9999px; }
.form-status { min-height: 1.5em; color: #555; }

/* ---------- footer ---------- */
.footer { text-align: center; }
.back-to-top { display: block; padding: 60px 0; color: var(--muted); font-size: 18px; }
.back-to-top::before { content: "\2191"; margin-right: 8px; }
.footer p { margin: 0; padding: 0 0 60px; color: #ccc; font-size: 13px; line-height: 19px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .sidebar { flex-basis: 280px; width: 280px; padding: 40px 24px; }
  .page-header { padding: 60px 24px; }
  .m-txt { padding-left: 24px !important; padding-right: 24px !important; }
}
@media (max-width: 760px) {
  body.splash { grid-template-columns: 1fr; }
  .splash-img { min-height: 62vh; }
  .splash-text { padding: 32px 20px 40px; }
  .splash-text h1 { font-size: 34px; }
  .splash-text p { font-size: 17px; }
  .site { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 5; width: auto; max-height: 100vh; padding: 14px 16px; background: rgba(255,255,255,.97); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; border-bottom: 1px solid #f0f0f0; }
  .logo a { font-size: 20px; line-height: 22px; margin: 0; }
  .menu-toggle { display: inline-flex; align-items: center; background: none; border: 1px solid #ccc; border-radius: 999px; padding: 6px 16px; font: 500 13px var(--sans); color: var(--ink); cursor: pointer; }
  #site-nav { display: none; flex-basis: 100%; text-align: center; max-height: calc(100vh - 70px); overflow-y: auto; padding: 20px 0 10px; }
  #site-nav.open { display: block; }
  .nav > li { margin-bottom: 16px; }
  .nav ul { margin-top: 8px; }
  .nav ul li { padding-bottom: 6px; }
  .page-header { padding: 36px 20px 28px; }
  .page-header h1 { font-size: 30px; line-height: 34px; margin-bottom: 12px; }
  .page-desc { font-size: 16px; line-height: 24px; }
  .modules > * { padding-bottom: 24px; }
  .m-txt { font-size: 16px; line-height: 24px; padding: 8px 20px 28px !important; }
  .m-txt p.gap { height: 24px; }
  .mc-row.mc-many { flex-wrap: wrap; }
  .m-mc, .mc-row { gap: 6px; }
  .mc-row.mc-many .mc-item { flex: 0 0 calc(50% - 3px); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 6px; padding-top: 0; }
  .back-to-top { padding: 36px 0; font-size: 16px; }
  .footer p { padding-bottom: 36px; }
  .contact-form { padding: 0 20px; }
}
