/* =========================================================
   Danny Kim Photography — site styles
   Colors / fonts match the original Format site
   ========================================================= */

:root {
  --bg: #222222;
  --text: #ffffff;
  --muted: #8a8a8a;
  --gap: 2px;            /* space between gallery photos */
  --tile-gap: 25px;      /* space between home page tiles */
  --font-title: "Courier Prime", "Courier New", Courier, monospace;
  --font-nav: "Fira Mono", "Courier New", monospace;
  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 68px 20px 56px;
}

.site-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: 0.5px;
}

.site-nav ul {
  list-style: none;
  margin: 50px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav li {
  font-family: var(--font-nav);
  font-size: 13px;
  display: flex;
  align-items: center;
}

.site-nav li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  margin: 0 22px;
}

.site-nav a:hover,
.site-nav a.active { text-decoration: underline; text-underline-offset: 3px; }

.social {
  margin-top: 54px;
  display: flex;
  justify-content: center;
}
.social svg { width: 15px; height: 15px; fill: var(--text); display: block; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 70px 20px 30px;
}

/* ---------- Protected image building block ----------
   Every photo is painted onto a <canvas> (no <img> tag, no
   image URL in the page), with a transparent shield on top. */
.protected {
  position: relative;
  overflow: hidden;
  background: #2b2b2b;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;   /* blocks iPhone/iPad long-press "Save Image" */
  -webkit-user-drag: none;
}
.protected canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.protected.loaded canvas { opacity: 1; }
.protected .shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

/* ---------- Home page tiles ---------- */
.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px var(--tile-gap);
  padding: 0 0 20px;
}
.tile {
  width: calc((100% - 2 * var(--tile-gap)) / 3);
  display: block;
}
.tile .protected { aspect-ratio: 325 / 219; }
.tile p {
  margin: 18px 0 0;
  text-align: center;
  font-size: 15px;
}

/* ---------- Gallery (masonry) ---------- */
.gallery {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}
.gallery-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}
.gallery-item { cursor: zoom-in; }
.gallery-empty {
  text-align: center;
  color: var(--muted);
  font-family: var(--font-nav);
  font-size: 13px;
  padding: 40px 20px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, .97);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox .protected { background: transparent; }
.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 16px;
  opacity: .75;
  z-index: 5;
  font: 300 34px/1 var(--font-body);
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 10px; right: 14px; font-size: 38px; }
.lb-prev  { left: 8px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute;
  bottom: 18px;
  left: 0; right: 0;
  text-align: center;
  font: 12px var(--font-nav);
  color: var(--muted);
}

/* ---------- Information page ---------- */
.info {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 38px 0;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}
.info-photo { flex: 0 0 292px; aspect-ratio: 1 / 1; }
.info-text { flex: 1; font-size: 18px; line-height: 1.6; }
.info-text p { margin: 0 0 12px; }
.info-text .spacer { height: 30px; }
.info-text h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.info-text a { border-bottom: 1px solid rgba(255,255,255,.35); }
.info-text a:hover { border-bottom-color: #fff; }
.clients { list-style: none; padding: 0; margin: 0 0 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tile { width: calc((100% - var(--tile-gap)) / 2); }
}
@media (max-width: 700px) {
  .site-header { padding: 44px 16px 40px; }
  .site-title { font-size: 28px; }
  .site-nav ul { margin-top: 32px; }
  .site-nav li + li::before { margin: 0 14px; }
  .social { margin-top: 34px; }
  .info { flex-direction: column; padding: 0 22px; }
  .info-photo { flex-basis: auto; width: 100%; max-width: 360px; }
  .info-text { font-size: 16px; }
}
@media (max-width: 560px) {
  .tile { width: 100%; }
}

/* Hide photos if someone tries to print / save the page as PDF */
@media print {
  .protected, .lightbox { display: none !important; }
}
