/* ==========================================================================
   photography.css
   Minimal: pure white, no lines, no frame around photos.
   Only text on screen is the name, top left, in Garamond.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --paper: #ffffff;
  --ink: #111111;
  --link-hover-color: #63b3e6;
  --font-name: 'EB Garamond', Garamond, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body.photography {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  height: 100%;
  height: 100dvh; /* iOS/Android: account for the address bar instead of the old 100vh, which can leave a sliver scrollable at the bottom */
  overflow: hidden;
  -webkit-tap-highlight-color: transparent; /* no gray flash on tap for links/buttons */
}

/* ---------- Name, upper left ---------- */
.pg-name {
  position: fixed;
  top: 20px;
  left: 32px;
  z-index: 10;
  font-family: var(--font-name);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.pg-name:hover,
.pg-name:focus-visible {
  color: var(--link-hover-color);
}

/* ---------- Links panel, lower left ---------- */
.pg-links {
  bottom: 60px;
  left: 32px;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  font-size: 0.95rem;
}

.pg-links a {
  color: var(--ink);
  text-decoration: none;
  width: fit-content;
}

.pg-links a:hover,
.pg-links a:focus-visible {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* ---------- Shared behavior for all toggled text panels ---------- */
.pg-panel {
  position: fixed;
  z-index: 10;
  font-family: var(--font-name);
  line-height: 1.5;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pg-panel.pg-bio-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Bio lead-in, next to the name ---------- */
.pg-bio-lead {
  top: 20px;
  right: 235px;
  max-width: 340px;
  text-align: center;
  font-size: .95rem;
}

.pg-bio-lead p {
  margin: 0;
}

/* ---------- Bio panel, upper right ---------- */
.pg-bio {
  top: 20px;
  right: 32px;
  max-width: 200px;
  font-size: 0.95rem;
  text-align: left;
}

.pg-bio p {
  margin: 0 0 0.9em;
}

.pg-bio p:last-child {
  margin-bottom: 0;
}

.pg-bio a {
  color: var(--ink);
  text-decoration: none;
}

.pg-bio a:hover,
.pg-bio a:focus-visible {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* ---------- Stage: one large centered photo ---------- */
.pg-stage {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  box-sizing: border-box;
}

.pg-photo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* Placeholder shown only if an image file hasn't been added yet */
.pg-photo-missing {
  width: 60vw;
  max-width: 640px;
  height: 60vh;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-name);
  font-size: 1rem;
  color: #999;
  border: 1px dashed #ddd;
}

/* ==========================================================================
   Mobile
   The desktop layout relies on fixed offsets (bio-lead sitting 235px to
   the right of the name, bio pinned to a narrow top-right corner) that
   only work at desktop widths. Below 600px, everything instead stacks in
   reading order down the left edge: name, then the lead-in line, then the
   full bio. The links panel stays bottom-left, and the photo gets less
   padding since screen space is tighter.
   ========================================================================== */
@media (max-width: 600px) {
  .pg-name {
    top: 18px;
    left: 20px;
    font-size: 1rem;
  }

  .pg-bio-lead {
    top: 54px;
    left: 20px;
    right: 20px;
    max-width: none;
    text-align: left;
    font-size: .88rem;
  }

  .pg-bio {
    top: 100px;
    left: 20px;
    right: 20px;
    max-width: none;
    font-size: 0.88rem;
    /* If the bio text runs long on a small screen, it scrolls within its
       own box instead of overflowing off the bottom of the page. */
    max-height: 44vh;
    max-height: 44dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pg-links {
    bottom: 20px;
    left: 20px;
    font-size: 0.88rem;
  }

  .pg-stage {
    padding: 4.5rem 1.25rem 1.5rem;
  }
}

@media (max-width: 380px) {
  .pg-bio-lead { top: 50px; font-size: 0.9rem; }
  .pg-bio { top: 92px; }
}