/* ============================================================
   id. — minimal log / directory
   Typeface: Adobe Caslon Pro (Regular / Bold / Italic)
   ============================================================ */

@font-face {
  font-family: "ACaslonPro";
  src: url("fonts/ACaslonPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ACaslonPro";
  src: url("fonts/ACaslonPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* italic face — used by the logo 'd' when the Typekit kit isn't available */
@font-face {
  font-family: "ACaslonPro";
  src: url("fonts/ACaslonPro-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Source Sans 3 (open-source, SIL OFL) — self-hosted fallback for dates/footer
   so they render correctly even if the domain-locked Typekit kit doesn't load */
@font-face {
  font-family: "SourceSans3";
  src: url("fonts/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SourceSans3";
  src: url("fonts/source-sans-3-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ----- tokens ----- */
:root {
  --ink: #111111;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --meta: #8f8c8c;   /* dates, footer — greyed against black */
  --hair: #e6e6e6;

  --page-x: clamp(1.5rem, 9vw, 10rem);
  --page-top: clamp(2.25rem, 6vw, 4rem);

  --fs-logo: 22px;   /* wordmark — pgLang-scale */
  --fs-date: 13px;   /* dates */
  --fs-title: 16px;  /* entry titles */
  --fs-body: 16px;   /* entry body copy */

  --gap-entries: 1.75rem;  /* tighter, pgLang-like rhythm */

}

/* ----- reset-ish ----- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: "adobe-caslon-pro", "ACaslonPro", Georgia, "Times New Roman", serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  font-feature-settings: "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ============================================================
   Masthead: logo + plus
   ============================================================ */
.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--page-top) var(--page-x) 0;
}

/* whole wordmark in semibold Adobe Caslon Pro (weight 600 from the Typekit kit) */
.logo {
  font-size: var(--fs-logo);
  line-height: 0.9;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-block;
}

/* the 'd.' is semibold italic (no skew — just the italic glyph) */
.logo-d {
  font-style: italic;
  margin-left: 0;
}

.plus {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0.15em 0.25em;
  margin: -0.15em -0.25em 0 0;
  transition: transform 220ms ease;
}
.plus:hover { transform: rotate(90deg); }
.plus[aria-expanded="true"] { transform: rotate(45deg); }

/* ============================================================
   Info panel (toggled by +)
   ============================================================ */
.info-panel {
  padding: 0 var(--page-x);
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms ease;
}
.info-panel.open { grid-template-rows: 1fr; }
.info-panel .info-inner {
  overflow: hidden;
  min-height: 0;
}
.info-block {
  max-width: 46ch;
  margin: 1.75rem 0 0;
  font-size: var(--fs-body);
}
.info-block:first-child { margin-top: 2.5rem; }
.info-panel a { text-underline-offset: 2px; }

/* ============================================================
   Log / directory list
   ============================================================ */
.log {
  padding: clamp(3rem, 7vw, 6rem) var(--page-x) clamp(3rem, 7vw, 5rem);
  max-width: 1500px;
}

.entry { margin-top: var(--gap-entries); }
.entry:first-child { margin-top: 0; }

/* ============================================================
   Footer — est. 2026 / individual-ag / linkedin.com
   ============================================================ */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(3rem, 8vw, 6rem) var(--page-x) var(--page-top);
  color: var(--meta);
  font-family: "source-sans-pro", "SourceSans3", system-ui, -apple-system, sans-serif;
  font-weight: 400;            /* Source Sans Pro Regular */
  font-size: 14px;
  line-height: 1;
  text-transform: lowercase;
}
.site-footer a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
.site-footer a:hover,
.site-footer a:focus-visible { text-decoration: underline; }

.entry-date {
  font-family: "source-sans-pro", "SourceSans3", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: var(--fs-date);
  line-height: 1;
  letter-spacing: 0;
  color: var(--meta);
  font-variant-numeric: proportional-nums; /* natural digit spacing (not gappy tabular) */
  margin: 0 0 0.4rem;
}

/* the clickable title row */
.entry-toggle {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-size: var(--fs-title);
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  max-width: 100%;
}
.entry-title {
  /* proper even-height numerals for "a/g 0001" etc. (not oldstyle) */
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
  transition: opacity 180ms ease;
}
.entry-toggle:hover .entry-title,
.entry-toggle:focus-visible .entry-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.entry-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* subtle open/close marker, appears on hover or when open */
.entry-mark {
  font-size: 0.6em;
  transform: translateY(-0.15em);
  opacity: 0;
  transition: opacity 180ms ease;
}
.entry-toggle:hover .entry-mark,
.entry-toggle[aria-expanded="true"] .entry-mark { opacity: 0.5; }

/* an open entry (currently being viewed) strikes through its title */
.entry.open .entry-title {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* unused entries: plain, non-interactive text (no expansion) */
.entry.empty .entry-title { cursor: default; }

/* ----- accordion body (animatable to any height via 0fr→1fr grid) ----- */
.entry-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 360ms cubic-bezier(0.4, 0, 0.2, 1);
}
.entry.open .entry-panel { grid-template-rows: 1fr; }
.entry-panel > .entry-body-inner {
  overflow: hidden;
  min-height: 0;
}

.entry-body {
  max-width: 62ch;
  padding: 1.5rem 0 0.25rem;
  opacity: 0;
  transition: opacity 300ms ease 60ms;
}
.entry.open .entry-body { opacity: 1; }

/* ----- rich content inside an entry body ----- */
.entry-body p { margin: 0 0 1.1em; }
.entry-body p:last-child { margin-bottom: 0; }
.entry-body a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.entry-body img,
.entry-body video {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.25rem 0;
}
.entry-body figure { margin: 1.5rem 0; }

/* an image that can be clicked to view fullscreen */
.entry-body img.zoomable { cursor: zoom-in; }

/* fullscreen image lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vmin;
  background: rgba(17, 17, 17, 0.92);
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lightbox-close {
  position: fixed;
  top: clamp(0.75rem, 3vw, 1.75rem);
  right: clamp(1rem, 3vw, 2rem);
  border: 0;
  background: none;
  color: #fff;
  font-family: inherit;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
  cursor: pointer;
  padding: 0.1em 0.2em;
}
.entry-body figcaption {
  font-size: var(--fs-date);
  color: var(--muted);
  margin-top: 0.5rem;
}

/* responsive 16:9 embed wrapper (YouTube/Vimeo iframes) */
.entry-body .embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.25rem 0;
  background: #000;
}
.entry-body .embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* image gallery grid */
.entry-body .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.entry-body .gallery img { margin: 0; }

/* events / external-link list */
.entry-body .events { list-style: none; margin: 1rem 0 0; padding: 0; }
.entry-body .events li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--hair);
}
.entry-body .events li:last-child { border-bottom: 1px solid var(--hair); }
.entry-body .events .ev-date {
  font-weight: 700;
  font-size: var(--fs-date);
  letter-spacing: 0.02em;
  min-width: 6.5rem;
}

/* ============================================================
   Motion preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .plus:hover { transform: none; }
}
