/* Primus in Carthago. Plain CSS, no build step. */
@font-face { font-family: "Caslon Display"; src: url("assets/fonts/caslon-display.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Caslon Text"; src: url("assets/fonts/caslon-text.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Caslon Text"; font-style: italic; src: url("assets/fonts/caslon-text-italic.woff2") format("woff2"); font-display: swap; }

:root {
  --ground: #101010;      /* the wall */
  --text: #EAE6DF;        /* warm white */
  --muted: #9A958C;       /* secondary text */
  --line: #2A2927;        /* hairlines */
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --room: clamp(5.5rem, 22vh, 14rem);   /* space between photographs */
  --serif: "Caslon Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --display: "Caslon Display", var(--serif);
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { background: var(--ground); scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 1.0625rem/1.6 var(--serif); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 6px; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: var(--gutter); top: 0.75rem; z-index: 2; background: var(--ground); padding: 0.4rem 0.7rem; }

/* masthead */
.masthead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 2rem;
  margin: 0 var(--gutter); padding: clamp(1.4rem, 3.2vh, 2.2rem) 0 clamp(1.1rem, 2.4vh, 1.6rem); border-bottom: 1px solid var(--line); }
.masthead a { font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; }
.masthead .artist { letter-spacing: 0.34em; }
.masthead nav { display: flex; gap: clamp(1.1rem, 3vw, 2.2rem); }
.masthead nav a { color: var(--muted); padding: 0.5rem 0; }
.masthead nav a:hover { color: var(--text); }

/* title */
.title { text-align: center; padding: clamp(2rem, 5.5vh, 3.6rem) var(--gutter) clamp(1.8rem, 4.5vh, 3rem); }
h1 { margin: 0; font: 400 clamp(1.2rem, 6vw, 2.9rem)/1.15 var(--display); letter-spacing: 0.15em; text-transform: uppercase; margin-right: -0.15em; }
.subline { margin: 0.9rem 0 0; color: var(--muted); font-style: italic; font-size: clamp(0.98rem, 1.5vw, 1.12rem); }
.subline:empty { display: none; }

/* photographs: whole frame always, never cropped */
.work { margin: 0 auto var(--room); padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; }
.frame { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; color: inherit;
  width: min(100%, 70rem, calc(86vh * var(--ar))); width: min(100%, 70rem, calc(86svh * var(--ar))); }
.frame img { display: block; width: 100%; height: auto; background: #0b0b0b; }
.hero .frame { width: min(100%, max(17rem, calc((100vh - 19rem) * var(--ar)))); width: min(100%, max(17rem, calc((100svh - 19rem) * var(--ar)))); }
.gallery .frame img { opacity: 0; transition: opacity 0.9s ease; }
.gallery .frame img.is-loaded { opacity: 1; }
figcaption { margin-top: 1rem; color: var(--muted); font-size: 0.82rem; font-style: italic; text-align: center; max-width: 34rem; }

/* statement */
.about { padding: clamp(1rem, 4vh, 3rem) var(--gutter) var(--room); display: flex; justify-content: center; }
.about > div { max-width: 33rem; font-size: clamp(1.12rem, 1.9vw, 1.32rem); line-height: 1.65; }
.about p { margin: 0 0 1.1em; }
.about p:last-child { margin-bottom: 0; }

/* about page */
.masthead nav a[aria-current="page"] { color: var(--text); }
.bio { padding: clamp(3rem, 9vh, 6rem) var(--gutter) var(--room); display: flex; justify-content: center; }
.bio > div { width: 100%; max-width: 33rem; font-size: clamp(1.06rem, 1.7vw, 1.2rem); line-height: 1.7; }
.bio section + section { margin-top: clamp(3.5rem, 10vh, 6rem); }
.bio h1, .bio h2 { margin: 0 0 1.5rem; font: 400 clamp(1.05rem, 2.6vw, 1.4rem)/1.2 var(--display); letter-spacing: 0.15em; text-transform: uppercase; }
.bio p { margin: 0 0 1.15em; }
.bio p:last-child { margin-bottom: 0; }
.bio .inquiries { margin-top: clamp(3.5rem, 10vh, 6rem); color: var(--muted); font-style: italic; font-variant-ligatures: none; }
.bio .inquiries a { display: inline-block; margin-top: 0.35rem; padding: 0.35rem 0 1px; color: var(--text); font-style: normal; border-bottom: 1px solid var(--line); }
.bio .inquiries a:hover { border-color: var(--muted); }

/* contact */
.contact { margin: 0 var(--gutter); padding: clamp(2.6rem, 7vh, 4rem) 0 clamp(2.6rem, 7vh, 4rem); border-top: 1px solid var(--line); text-align: center; }
.contact .name { margin: 0 0 1.1rem; font-size: 0.74rem; letter-spacing: 0.34em; text-transform: uppercase; margin-right: -0.34em; }
.contact ul { list-style: none; margin: 0; padding: 0; }
.contact li { margin: 0.2rem 0; }
.contact li a { display: inline-block; padding: 0.35rem 0; color: var(--muted); font-style: italic; font-variant-ligatures: none; }
.contact li a span { color: var(--text); font-style: normal; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.contact li a:hover span { border-color: var(--muted); }
.rights, .note { margin: 2.4rem 0 0; color: #7d7870; font-size: 0.78rem; }
.note { margin-top: 0.5rem; font-style: italic; text-align: center; }

/* enlarged view */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #0a0a0a; color: var(--text); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox::backdrop { background: #0a0a0a; }
.lightbox img { display: block; max-width: calc(100vw - 2rem); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); width: auto; height: auto; object-fit: contain; }
.lightbox .close { position: absolute; top: calc(0.9rem + env(safe-area-inset-top, 0px)); right: 1.1rem; background: none; border: 0; color: var(--muted); cursor: pointer;
  font: 400 0.72rem/1 var(--serif); letter-spacing: 0.24em; text-transform: uppercase; padding: 0.7rem; }
.lightbox .close:hover { color: var(--text); }

@media (min-width: 1000px) {
  /* opening photograph, "larger" option: about 12% bigger on desktop, still shown whole */
  .hero-larger .hero .frame { width: min(100%, max(17rem, calc((100vh - 19rem) * var(--ar) * 1.125))); width: min(100%, max(17rem, calc((100svh - 19rem) * var(--ar) * 1.125))); }
}
@media (max-width: 700px) {
  .hero .frame { width: min(100%, max(15rem, calc((100vh - 14.5rem) * var(--ar)))); width: min(100%, max(15rem, calc((100svh - 14.5rem) * var(--ar)))); }
}
@media (max-width: 420px) {
  .masthead { justify-content: center; text-align: center; }
  .masthead .artist { width: 100%; margin-right: -0.34em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery .frame img { opacity: 1; transition: none; }
}
