/* Blog styles. Tokens and chrome mirror photography.html. */
:root {
  --font-serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --bg: #0a0a0a; --bg2: #101010; --line: rgba(255,255,255,0.09);
  --muted: rgba(255,255,255,0.6); --accent: #E9C49A;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #0a0a0a; }
body { margin: 0; background: var(--bg); color: #fff; font-family: var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* ---------- header (normal flow) ---------- */
.header { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 28px 40px; }
.header-id { display: flex; flex-direction: column; gap: 5px; }
.header-name { font-family: var(--font-serif); font-size: 19px; letter-spacing: 0.015em; }
.header-loc { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; letter-spacing: 0.02em; color: rgba(255,255,255,0.62); }
.header-loc svg { width: 13px; height: 13px; flex: none; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-contact { font-size: 13px; border: 1px solid rgba(255,255,255,0.45); padding: 8px 20px; border-radius: 999px; letter-spacing: 0.02em; transition: background 200ms, border-color 200ms; }
.header-contact:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.9); }
.header-menu-btn { width: 36px; height: 36px; display: grid; place-items: center; background: none; border: none; color: #fff; cursor: pointer; border-radius: 8px; }
.header-menu-btn:hover { background: rgba(255,255,255,0.1); }
.header-menu-btn svg { width: 22px; height: 22px; }
.menu { position: absolute; top: 76px; right: 36px; z-index: 21; background: rgba(15,15,15,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 8px 0; min-width: 220px; opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden; transition: opacity 200ms, transform 200ms, visibility 0s 200ms; }
.menu.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.menu-item { display: block; padding: 11px 24px; font-size: 14px; color: rgba(255,255,255,0.85); }
.menu-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.menu-item.current { color: var(--accent); }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.lede { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,0.8); max-width: 520px; margin: 0; }

/* ---------- blog index ---------- */
.blog { max-width: 1180px; margin: 0 auto; padding: 48px 40px 40px; }
.blog-head { margin-bottom: 40px; }
.blog-title { font-family: var(--font-serif); font-weight: 300; font-size: clamp(64px, 11vw, 120px); line-height: 0.95; letter-spacing: -0.01em; margin: 0 0 28px; }
.blog-title em { font-style: italic; font-weight: 400; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.14em; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 44px; }
.chip { font-family: inherit; font-size: 13px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.16); background: transparent; color: rgba(255,255,255,0.7); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: color 200ms ease, border-color 200ms ease, background 200ms ease; }
.chip .c { font-size: 12px; color: rgba(255,255,255,0.35); font-variant-numeric: tabular-nums; transition: color 200ms ease; }
.chip:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.chip.on { color: #fff; border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.chip.on .c { color: var(--accent); }
.chip:focus-visible, .card-toggle:focus-visible, .carousel:focus-visible, .carousel button:focus-visible,
.panel-actions a:focus-visible, .panel-actions button:focus-visible, .back-link:focus-visible,
.post-body a:focus-visible, .header-contact:focus-visible, .header-menu-btn:focus-visible,
.menu-item:focus-visible, .footer a:focus-visible, .header-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dpill:focus-visible, .dsoc:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.feed-empty { color: var(--muted); font-size: 15px; margin: 0 0 24px; }

/* ---------- timeline feed ---------- */
.feed { list-style: none; margin: 0; padding: 0 0 0 100px; position: relative; }
.feed::before { content: ""; position: absolute; top: 0; bottom: 0; left: 70px; width: 1px; background: var(--line); }
.post { position: relative; margin: 0 0 28px; scroll-margin-top: 24px; }
.post-dot { position: absolute; left: -100px; top: 24px; width: 64px; padding-right: 14px; text-align: right; font-size: 12.5px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-dot::after { content: ""; position: absolute; left: calc(100% + 1px); top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }

.card { position: relative; display: grid; grid-template-columns: 360px minmax(0, 1fr); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; transition: border-color 200ms ease, background 200ms ease; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 42%, transparent); }
.card:has(.card-toggle:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card.open { cursor: default; border-color: color-mix(in srgb, var(--accent) 38%, transparent); overflow: clip; }
.card.animating { overflow: hidden; }

.card-media { position: relative; min-height: 220px; background: #161616; overflow: hidden; }
.card-lead, .card-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-preview { opacity: 0; transition: opacity 250ms ease; pointer-events: none; background: #000; }
.card-preview.playing { opacity: 1; }
.more-badge, .draft-badge { position: absolute; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(10,10,10,0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; line-height: 1.1; }
.more-badge { right: 10px; bottom: 10px; color: var(--accent); letter-spacing: 0.04em; font-size: 12px; }
.draft-badge { left: 10px; top: 10px; color: #fff; border: 1px solid rgba(255,255,255,0.35); }

.card-body { padding: 26px 30px 28px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.ctag { font-size: 12.5px; line-height: 1; padding: 8px 14px 8px 12px; border-radius: 999px; white-space: nowrap; color: rgba(255,255,255,0.94); background: color-mix(in srgb, var(--accent) 13%, rgba(10,10,10,0.4)); border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent); }
.card-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.08; margin: 0 0 12px; }
.card-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: block; color: inherit; font: inherit; line-height: inherit; border-radius: 4px; }
.card.open .card-toggle { cursor: pointer; }
.card-title.card-title-caption, .card.open .card-title.card-title-caption { font-family: var(--font-sans); font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.88); margin: 0; max-width: 56ch; }
.card-caption { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,0.72); margin: 0; max-width: 56ch; }

/* open state: single column, carousel on top, media hidden */
.card.open { display: flex; flex-direction: column; }
.card.open .card-media { display: none; }
.card.open .card-panel { display: contents; }
.card.open .carousel { order: 0; }
.card.open .card-body { order: 1; padding: 30px 32px 6px; justify-content: flex-start; }
.card.open .card-title { font-size: clamp(32px, 4.4vw, 50px); }
.card.open .post-video { order: 2; }
.card.open .post-body { order: 3; padding: 14px 32px 0; }
.card.open .panel-actions { order: 4; }
.card-panel[hidden] { display: none !important; }
/* Solid close button that sticks to the top of an open post while you scroll through it.
   The negative bottom margin lays it over the photos instead of pushing them down. */
.card-close-pin { display: none; }
.card.open .card-close-pin { order: -1; position: sticky; top: 14px; z-index: 6; align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; height: 44px; margin: 14px 14px -58px 0; padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--accent); color: #0a0a0a; font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: 0.02em; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.45); transition: filter 200ms; }
.card-close-pin:hover { filter: brightness(1.12); }
.card-close-pin:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.card-close-pin svg { width: 16px; height: 16px; }

.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 26px 32px 30px; }
.post-link, .share-btn, .card-close { font-family: inherit; font-size: 13px; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.22); background: transparent; color: rgba(255,255,255,0.85); cursor: pointer; display: inline-flex; align-items: center; letter-spacing: 0.02em; transition: background 200ms, border-color 200ms, color 200ms; }
.post-link { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.post-link:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.share-btn:hover, .card-close:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); color: #fff; }
.card-close { margin-left: auto; }

.post-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.card.open .post-video { margin-top: 24px; }

/* ---------- carousel ---------- */
.carousel { position: relative; width: 100%; background: #000; outline-offset: -2px; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; aspect-ratio: 3 / 2; max-height: 72vh; width: 100%; }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.slide img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.carousel-prev, .carousel-next { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28); background: rgba(10,10,10,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background 200ms, border-color 200ms; }
.carousel-prev { left: 14px; } .carousel-next { right: 14px; }
.carousel-prev:hover, .carousel-next:hover { background: rgba(10,10,10,0.8); border-color: rgba(255,255,255,0.7); }
.carousel-prev svg, .carousel-next svg { width: 18px; height: 18px; }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; gap: 0; pointer-events: none; }
.carousel-dots button { pointer-events: auto; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.carousel-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.45); box-shadow: 0 0 0 1px rgba(0,0,0,0.25); transition: background 200ms, transform 200ms; }
.carousel-dots button[aria-current="true"]::before { background: var(--accent); transform: scale(1.35); }

/* ---------- post page ---------- */
.post-page { max-width: 880px; margin: 0 auto; padding: 36px 40px 40px; }
.back-link { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 44px; letter-spacing: 0.02em; border-radius: 4px; transition: color 200ms; }
.back-link:hover { color: var(--accent); }
.post-title.post-title-caption { font-family: var(--font-sans); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.5; }
.post-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; margin: 0 0 18px; }
.post-page .card-meta { margin-bottom: 32px; }
.post-page .carousel { border-radius: 8px; overflow: hidden; margin-bottom: 32px; }
.post-page .post-video { border-radius: 8px; margin-bottom: 32px; }

.post-body { font-size: 17px; line-height: 1.78; color: rgba(255,255,255,0.82); overflow-wrap: break-word; min-width: 0; }
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body p { margin: 0 0 1.3em; }
.post-body h2, .post-body h3, .post-body h4 { color: #fff; font-weight: 400; margin: 1.9em 0 0.55em; }
.post-body h2 { font-family: var(--font-serif); font-size: 36px; line-height: 1.1; }
.post-body h3 { font-family: var(--font-serif); font-size: 28px; line-height: 1.15; }
.post-body h4 { font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.post-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.post-body a:hover { text-decoration-color: var(--accent); }
.post-body strong { color: #fff; font-weight: 600; }
.post-body ul, .post-body ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.post-body li { margin: 0 0 0.45em; padding-left: 0.2em; }
.post-body li::marker { color: var(--accent); }
.post-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); font-family: var(--font-serif); font-size: 24px; line-height: 1.4; color: rgba(255,255,255,0.9); }
.post-body blockquote p { margin: 0 0 0.6em; }
.post-body blockquote p:last-child { margin: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post-body img { width: 100%; height: auto; border-radius: 6px; margin: 1.6em 0; background: #161616; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; }

/* ---------- footer ---------- */
.footer { max-width: 1180px; margin: 0 auto; padding: 28px 40px 120px; font-size: 12.5px; color: rgba(255,255,255,0.4); display: flex; justify-content: space-between; }
.footer a:hover { color: #fff; }

/* ---------- dock (copied from photography.html) ---------- */
.dock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; white-space: nowrap; background: rgba(14,14,14,0.74); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.dpill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1; color: rgba(255,255,255,0.8); padding: 9px 14px; border-radius: 999px; transition: background 200ms ease, color 200ms ease; }
.dpill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.dpill:hover { background: rgba(255,255,255,0.08); color: #fff; }
.dpill.on { color: #fff; background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.dpill .ls { display: none; }
.dsep { width: 1px; height: 18px; background: rgba(255,255,255,0.14); margin: 0 6px; }
.dsoc { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: rgba(255,255,255,0.72); transition: background 200ms ease, color 200ms ease; }
.dsoc:hover { background: rgba(255,255,255,0.1); color: #fff; }
.dsoc svg { width: 17px; height: 17px; }

/* ---------- page transition veil (created by blog.js) ---------- */
.veil { position: fixed; inset: 0; background: #0a0a0a; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity 380ms ease; }
.page-exit .veil { opacity: 1; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.blog, .post-page, .header { animation: pageIn 600ms ease both; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .header { padding: 20px 24px; }
  .header-contact { padding: 7px 14px; font-size: 12px; }
  .menu { right: 20px; top: 64px; }
  .blog { padding: 32px 24px 32px; }
  .post-page { padding: 24px 24px 32px; }
  .footer { padding: 28px 24px 110px; }
  .blog-title { font-size: clamp(56px, 15vw, 96px); margin-bottom: 22px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px 36px; padding: 2px 24px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { font-size: 12.5px; padding: 0 14px; flex: none; }
  .back-link { margin-bottom: 30px; }
}
@media (max-width: 700px) {
  .dock { bottom: 12px; }
  .dpill { padding: 12px 10px; gap: 6px; }
  .dpill .ll { display: none; } .dpill .ls { display: inline; }
  .dsep { margin: 0 3px; }
  .dsoc { width: 38px; height: 38px; }
  .header-loc { font-size: 11.5px; }

  /* timeline: line ~16px from the feed edge, label above the card */
  .feed { padding-left: 40px; }
  .feed::before { left: 16px; }
  .post { margin-bottom: 26px; }
  .post-dot { position: relative; left: auto; top: auto; width: auto; text-align: left; display: block; padding: 0 0 10px 0; }
  .post-dot::after { left: -29.5px; top: 6px; margin-top: 0; }

  .card { grid-template-columns: minmax(0, 1fr); }
  .card-media { min-height: 0; aspect-ratio: 16 / 10; }
  .card-body { padding: 20px 20px 22px; }
  .card.open .card-body { padding: 22px 20px 4px; }
  .card.open .post-body { padding: 12px 20px 0; }
  .panel-actions { padding: 22px 20px 22px; }
  .card-close { margin-left: 0; }
  .carousel-track { aspect-ratio: 4 / 3; }
  .carousel-prev, .carousel-next { width: 40px; height: 40px; margin-top: -20px; }
  .carousel-prev { left: 8px; } .carousel-next { right: 8px; }
  .post-body { font-size: 16.5px; }
  .post-body h2 { font-size: 30px; }
  .post-body h3 { font-size: 25px; }
  .post-body blockquote { font-size: 21px; }
}
@media (max-width: 380px) { .dsep { display: none; } .dsoc { width: 34px; height: 34px; } .dpill { padding: 12px 8px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .veil { display: none; }
}
