/* Dina Tajić — a quiet personal gallery. White page, black type, the work in front. */
:root {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --mute: #74726d;
  --line: #e7e6e3;
  --tile: #f3f2f0;
  --pad: clamp(20px, 4vw, 56px);
  --gap: clamp(6px, .7vw, 10px);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
img { display: block; max-width: 100%; }
h1, h2, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--pad); top: -60px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 20; }
.skip:focus { top: 12px; }

/* Header */
.site-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 30px var(--pad) 0;
  max-width: 1520px; margin: 0 auto;
}
.brand { display: grid; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.wordmark { display: block; height: 17px; width: auto; }
.brand-role { font-size: 13px; color: var(--mute); letter-spacing: .01em; }
.site-nav { display: flex; gap: clamp(18px, 2.6vw, 34px); font-size: 15px; padding-top: 1px; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; }
.site-nav .hire { font-weight: 600; }

main { max-width: 1520px; margin: 0 auto; padding: 0 var(--pad); outline: none; }

/* Views: without JavaScript every view shows, one after another */
.js .view { display: none; }
.js .view.is-active { display: block; }

/* Rows of images that share one height */
.row {
  display: flex; gap: var(--gap);
  max-width: calc(var(--sum) * var(--maxh, 80vh));
  margin-inline: auto;
}
.row figure { flex: calc(var(--a) * 100) 1 0; min-width: 0; aspect-ratio: var(--a); background: var(--tile); overflow: hidden; }
.row img { width: 100%; height: 100%; object-fit: cover; }
.js .row img { opacity: 0; transition: opacity .6s ease; }
.js .row img.is-loaded { opacity: 1; }

/* My Work */
.practice { padding-top: clamp(56px, 8vw, 104px); }
.practice-title { font-size: 15px; font-weight: 500; color: var(--mute); margin-bottom: 22px; }
.projects { display: grid; gap: clamp(48px, 6vw, 80px); }
.project-link { display: block; }
.project-link:hover { text-decoration: none; }
.project-link .row { --maxh: 64vh; margin-inline: 0; }
.project-link img { transition: opacity .6s ease, filter .3s ease; }
.project-link:hover img { filter: brightness(.93); }
.project-name { display: block; margin-top: 16px; font-size: 17px; font-weight: 500; }
.project-line { display: block; color: var(--mute); font-size: 15px; }
.project-link:hover .project-name { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }

/* Project page */
.project-head { max-width: 760px; padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px); }
.back { font-size: 15px; color: var(--mute); }
.project-head h1, .about h1 {
  font-size: clamp(34px, 4.4vw, 56px); font-weight: 500; line-height: 1.05; letter-spacing: -.02em;
  margin: 18px 0 20px;
}
.project-text { font-size: 18px; line-height: 1.55; max-width: 58ch; }
.facts { margin-top: 28px; display: grid; gap: 6px; font-size: 15px; }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.facts dt { color: var(--mute); }

.group { display: grid; gap: var(--gap); margin-bottom: clamp(40px, 5vw, 72px); }
.group-caption { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.group-caption span { font-weight: 400; color: var(--mute); margin-left: .6em; }
.project-view .row { --maxh: 86vh; width: 100%; }
.zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }

.project-foot {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 22px; margin-top: clamp(48px, 6vw, 96px);
  font-size: 15px;
}
.project-foot .next { font-weight: 500; }

/* About Me */
.about { padding-top: clamp(56px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.js .about.is-active { display: grid; }
.about h1 { margin-top: 0; }
.bio { display: grid; gap: .8em; font-size: clamp(20px, 1.9vw, 25px); line-height: 1.42; max-width: 36ch; letter-spacing: -.005em; }
.cv { margin-top: clamp(40px, 5vw, 64px); max-width: 720px; }
.cv > div { display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px; }
.cv dt { color: var(--mute); }
.cv dd p + p { margin-top: 6px; }
.cv .hire-link { font-weight: 600; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.muted { color: var(--mute); }

/* Footer */
.site-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1520px; margin: clamp(80px, 10vw, 140px) auto 0; padding: 26px var(--pad) 34px;
  font-size: 14px; color: var(--mute);
}
.credit { letter-spacing: .04em; }
.credit:hover { color: var(--ink); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 30; background: var(--paper);
  display: grid; place-items: center; padding: 64px var(--pad);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute; border: 0; background: none; padding: 10px 4px; font: 500 15px var(--font); color: var(--ink); cursor: pointer;
}
.lightbox button:hover { text-decoration: underline; text-underline-offset: .25em; }
.lb-close { top: 18px; right: var(--pad); }
.lb-prev { bottom: 18px; left: var(--pad); }
.lb-next { bottom: 18px; right: var(--pad); }

@media (max-width: 860px) {
  .about, .js .about.is-active { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .site-head { flex-direction: column; gap: 18px; padding-top: 22px; }
  .site-nav { font-size: 15px; }
  .project-link .row figure:not(:first-child) { display: none; }
  .project-link .row { max-width: none; }
  .project-view .row { display: grid; max-width: none; }
  .project-text { font-size: 17px; }
  .facts div, .cv > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .row img, .project-link img { transition: none; }
}
