/* Photolog preset "essay-01" — editorial photo essay.
 *
 * Hand-written translation of the provided mockup (which used the Tailwind CDN;
 * the portfolio site does not load Tailwind, so this is plain CSS). Layers on top
 * of project.css (white page, light footer). Loaded only when preset == 'essay-01'.
 *
 * Type:  Playfair Display (display/headings) + Inter (body/metadata).
 * Ink:   #191c1d  ·  muted: #55524f  ·  hairline: #d4d4d8  ·  label: #5c5c61
 */

/* -------------------------------------------------- Essay fallback header -- */
.essay-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #ececec;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.essay-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.essay-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #191c1d;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}
.essay-header__brand:hover { color: #191c1d; text-decoration: none; opacity: 0.7; }
.essay-header__brand i { font-size: 0.85rem; color: #9aa0a6; }
.essay-header__nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.essay-header__link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c5c61;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.essay-header__link:hover { color: #191c1d; text-decoration: none; }
.essay-header__link i { font-size: 0.6rem; margin-left: 0.15rem; }

.essay-header__dropdown { position: relative; }
.essay-header__menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.6rem;
  min-width: 200px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  padding: 0.4rem;
}
.essay-header__dropdown:hover .essay-header__menu,
.essay-header__dropdown:focus-within .essay-header__menu { display: block; }
.essay-header__menu a {
  display: block;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  color: #374151;
  text-decoration: none;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.essay-header__menu a:hover { background: #f4f6fb; color: #191c1d; text-decoration: none; }

@media (max-width: 600px) {
  .essay-header__brand span { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
}

.essay {
  --essay-ink: #191c1d;
  --essay-muted: #55524f;
  --essay-label: #5c5c61;
  --essay-hairline: #d8d8dc;
  --essay-maxw: 1200px;      /* image sections (a bit narrower) */
  --essay-textw: 1320px;     /* text sections: description + text blocks */
  --essay-gap: clamp(56px, 8vw, 96px);
  --essay-pad: clamp(24px, 5vw, 64px);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--essay-ink);
  padding-top: clamp(32px, 6vw, 72px);
  /* Breathing room between the last photo and the footer. */
  padding-bottom: var(--essay-gap);
}

/* ---------------------------------------------------------------- Hero -- */
.essay-hero {
  max-width: var(--essay-textw);
  margin: 0 auto var(--essay-gap);
  padding: 0 var(--essay-pad);
}

.essay-hero__title {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--essay-ink);
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

/* The description is formatted identically to the added text blocks. */
.essay-hero__lede {
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--essay-ink);
  margin: 0;
}
/* Full width, two columns on desktop; single column on small screens. */
@media (min-width: 768px) {
  .essay-hero__lede {
    column-count: 2;
    column-gap: 3.5rem;
  }
}
.essay-hero__lede > :first-child { margin-top: 0; }
.essay-hero__lede p { margin: 0 0 1rem; }
.essay-hero__lede p:last-child { margin-bottom: 0; }
.essay-hero__lede h2, .essay-hero__lede h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1.5rem 0 0.75rem;
  color: var(--essay-ink);
}
.essay-hero__lede ul, .essay-hero__lede ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.essay-hero__lede a { color: var(--essay-ink); text-decoration: underline; }
.essay-hero__lede strong { color: var(--essay-ink); }

/* Ort / Zeitraum: stacked rows (one below the other, each with a hairline),
 * as a left-aligned dateline block between the title and the description. */
.essay-hero__meta {
  margin: 0 0 2.75rem;
  width: 100%;
  max-width: 340px;
}
.essay-hero__meta-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--essay-hairline);
  font-size: 0.875rem;
}
.essay-hero__meta-row dt {
  color: var(--essay-label);
  font-weight: 600;
  margin: 0;
}
.essay-hero__meta-row dd {
  color: var(--essay-ink);
  margin: 0;
}

/* ------------------------------------------------------------- Entries -- */
.essay-entries {
  display: flex;
  flex-direction: column;
  gap: var(--essay-gap);
}

.essay-entry {
  max-width: var(--essay-maxw);
  margin: 0 auto;
  padding: 0 var(--essay-pad);
  width: 100%;
}

.essay-entry__img {
  display: block;
  width: 100%;
  height: auto;
  /* Reset the portfolio theme's global `img { padding: 0 1.5pt }`, which would
   * otherwise show as an uneven left/right gap. */
  padding: 0;
}

.essay-entry__title {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.5rem);
  line-height: 1.25;
  color: var(--essay-ink);
  margin: 0 0 0.85rem;
  text-wrap: balance;
}
.essay-entry__caption {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--essay-muted);
  margin: 0;
  max-width: 42ch;
}

/* Single, lightweight dateline: "Vienna, 12. Juni 2026" (either part may be
 * absent). Muted colour + light weight so it recedes under the caption. */
.essay-entry__dateline {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--essay-muted);
}

/* --- text blocks (interleaved between photo entries) --- */
.essay-textblock {
  /* Match the hero/entries: centred, with the same side padding so the block
   * never runs past the page edge. box-sizing:border-box keeps padding inside
   * max-width. Single column keeps a readable ~42rem measure. */
  box-sizing: border-box;
  max-width: calc(42rem + 2 * var(--essay-pad));
  margin: 0 auto;
  padding: 0 var(--essay-pad);
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--essay-ink);
}
.essay-textblock > :first-child { margin-top: 0; }
.essay-textblock > :last-child { margin-bottom: 0; }
.essay-textblock p { margin: 0 0 1rem; }
.essay-textblock h2, .essay-textblock h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1.5rem 0 0.75rem;
  color: var(--essay-ink);
}
.essay-textblock a { color: var(--essay-ink); text-decoration: underline; }
.essay-textblock ul, .essay-textblock ol { margin: 0 0 1rem; padding-left: 1.5rem; }
/* Two-column text block (fills the wider text-content width). */
.essay-textblock--2col { max-width: var(--essay-textw); }
@media (min-width: 768px) {
  .essay-textblock--2col { column-count: 2; column-gap: 3.5rem; }
  .essay-textblock--2col > :first-child { margin-top: 0; }
}

/* --- alignment layouts --- */
/* full-width: image on top, text below (constrained for readability) */
.essay-entry--full .essay-entry__media { margin-bottom: 1.75rem; }
.essay-entry--full .essay-entry__img { margin: 0 auto; }
.essay-entry--full .essay-entry__text { max-width: 42rem; }

/* left / right: image and text side-by-side on desktop, stacked on mobile */
@media (min-width: 768px) {
  .essay-entry--left,
  .essay-entry--right {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(2rem, 4vw, 2.5rem);
    align-items: start;
  }
  .essay-entry--left .essay-entry__text,
  .essay-entry--right .essay-entry__text { padding-top: 0.5rem; }

  /* image left, text right */
  .essay-entry--left .essay-entry__media { grid-column: 1; }
  .essay-entry--left .essay-entry__text  { grid-column: 2; }

  /* text left, image right */
  .essay-entry--right { grid-template-columns: 1fr 2fr; }
  .essay-entry--right .essay-entry__text  { grid-column: 1; grid-row: 1; }
  .essay-entry--right .essay-entry__media { grid-column: 2; grid-row: 1; }
  /* Right-align the image so its right edge meets the container edge — i.e. it
   * lines up with the full-width images even when capped below column width. */
  .essay-entry--right .essay-entry__img { margin-left: auto; margin-right: 0; }
}
@media (max-width: 767px) {
  .essay-entry__media { margin-bottom: 1.25rem; }
  .essay-entry__img { max-width: 100% !important; } /* fill on mobile regardless of original size */
}

/* --------------------------------------------------------- Reveal motion -- */
/* Content is visible by default; the animation only applies once essay01.js
 * marks the document `.essay-js`, so headless/no-JS renders never ship blank. */
.essay-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.essay-js .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .essay-js .reveal { opacity: 1; transform: none; transition: none; }
}
