:root {
  color-scheme: dark;
  --canvas: #111110;
  --surface: #1d1d1b;
  --ink: #f3f1ec;
  --muted: #aaa89f;
  --line: #30302d;
  --control: #272725;
  --control-hover: #343431;
  --accent: #0065bd;
  --accent-red: #e32934;
  --focus: #7695ff;
}
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f7f6f2;
  --surface: #fff;
  --ink: #211922;
  --muted: #6b6a63;
  --line: #e5e5e0;
  --control: #e5e5e0;
  --control-hover: #deded8;
  --focus: #435ee5;
}
* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-width: 280px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: color 180ms ease, background-color 180ms ease;
}
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(240px, 560px) minmax(90px, 1fr);
  align-items: center;

  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(16px, 3vw, 48px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(12px);
}
.brand-area {
  display: flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  justify-self: start;
  gap: 14px;
}
.brand {
  display: inline-flex;
  width: max-content;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand img { display: block; width: 20px; height: 20px; }
.section-nav { display: flex; align-items: center; gap: 2px; }
.section-nav a {
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}
.section-nav a:hover { color: var(--ink); background: var(--control); }
.section-nav a[aria-current="page"] { color: var(--ink); background: var(--control); }
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.search svg { position: absolute; left: 15px; width: 18px; height: 18px; fill: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  height: 44px;
  padding: 0 42px;
  border: 1px solid transparent;
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: var(--control);
  font: inherit;
  font-size: 14px;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.search input::placeholder { color: var(--muted); }
.search input:hover { background: var(--control-hover); }
.search input:focus { border-color: var(--focus); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.theme-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.theme-toggle:hover { background: var(--control-hover); }
.theme-toggle:active { transform: scale(.96); }
.theme-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.theme-toggle svg { width: 19px; height: 19px; fill: currentColor; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
#status { margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
main { padding: 18px clamp(10px, 2vw, 32px) 64px; }
.collage {
  --columns: 1;
  width: min(100%, calc(var(--columns) * 340px));
  column-count: var(--columns);
  column-gap: 16px;
  margin: 0 auto;
}
.post {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  break-inside: avoid;
  transition: background-color 180ms ease;
}
.media { display: grid; gap: 2px; background: var(--line); }
.image-button { display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; cursor: zoom-in; }
.image-button:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--focus); outline-offset: -3px; }
.media img,
.media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  background: var(--line);
  object-fit: cover;
}
.media video { min-height: 180px; }
.media.multi { grid-template-columns: repeat(2, 1fr); }
.media.multi > * { min-width: 0; }
.media.multi img,
.media.multi video { height: 210px; }
.media.multi > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.media.multi > .image-button:first-child:nth-last-child(odd) img,
.media.multi > video:first-child:nth-last-child(odd) { height: auto; max-height: 420px; }
.media video:fullscreen,
.media.multi video:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #000;
}
.media video:-webkit-full-screen,
.media.multi video:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #000;
}
.post-copy { padding: 14px 15px 12px; }
.caption { margin: 0; font-size: 15px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.post footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
time { color: var(--muted); font-size: 12px; }
.message-link {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin: -10px -9px -10px 0;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  transition: background-color 150ms ease, color 150ms ease;
}
.message-link:hover { color: var(--ink); background: var(--line); }
.message-link:focus-visible, .brand:focus-visible, .section-nav a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.message-link svg { width: 20px; height: 20px; fill: currentColor; }
.empty { max-width: 520px; margin: 18vh auto 0; text-align: center; }
.empty h1 { margin-bottom: 6px; font-size: clamp(28px, 5vw, 48px); letter-spacing: -.05em; }
.empty p { color: var(--muted); }
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop { background: rgb(0 0 0 / 88%); backdrop-filter: blur(5px); }
.lightbox figure { display: flex; width: 100%; height: 100%; margin: 0; padding: 60px 24px 24px; align-items: center; justify-content: center; flex-direction: column; gap: 14px; }
.lightbox figure img { display: block; max-width: min(94vw, 1500px); max-height: calc(100dvh - 130px); border-radius: 12px; object-fit: contain; box-shadow: 0 20px 70px rgb(0 0 0 / 45%); }
.lightbox figcaption { max-width: min(90vw, 760px); color: #deddd8; font-size: 14px; line-height: 1.4; text-align: center; }
.lightbox-close { position: fixed; z-index: 2; top: 16px; right: 16px; display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid rgb(255 255 255 / 18%); border-radius: 14px; color: #fff; background: rgb(20 20 20 / 72%); cursor: pointer; }
.lightbox-close:hover { background: rgb(45 45 45 / 92%); }
.lightbox-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox-close svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 760px) { .site-header { grid-template-columns: minmax(0, 1fr) auto; } .brand-area { min-width: 0; gap: 6px; } .brand-label { display: none; } .section-nav a { padding-inline: 7px; } .search { grid-column: 1 / -1; grid-row: 2; } .collage { column-gap: 10px; } .post { margin-bottom: 10px; border-radius: 16px; } }
@media (max-width: 520px) { .site-header { min-height: 62px; gap: 10px; } .brand { font-size: 16px; } .brand img { width: 22px; height: 22px; } .section-nav a { padding: 6px 5px; font-size: 12px; } #status { display: none; } .collage { max-width: 440px; } main { padding-inline: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
