/* gallery.object.computer — sepia palette matching object.computer blog.
   Sepia is the DEFAULT; @media (prefers-color-scheme: light) flips to the
   white/black/blue fallback only if the visitor's OS is in light mode. */

:root {
  --background: #ECE6D3;
  --text: #4A4137;
  --link: #696f58;
  --link_visited: #696f58;
  --accent1: #6F6356;
  --accent2: #8A7E70;
  --code: #E0D8BF;
  --button-text: #4A4137;
  --blockquote: #F5EFDC;
  --blockquote-border: #B5A079;
  --aside: #E0D8BF;
  --aside-border: #4A4137;
  --note: #DCE5D0;
  --note-border: #A8B89A;
  --alert: #F2D6D3;
  --alert-border: #C24A4A;
  --field: #E0D8BF;
  --mark: #FFFF99;

  --font_system_ui: system-ui, sans-serif;
  --font_monospace_code: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;

  --radius: 5px;
}

@media (prefers-color-scheme: light) {
  :root {
    --background: #ffffff;
    --text: #000000;
    --link: #1565C0;
    --link_visited: #1565C0;
    --accent1: #333333;
    --accent2: #666666;
    --code: #e3e3e3;
    --button-text: #ffffff;
    --blockquote: #fffee0;
    --blockquote-border: #e5d600;
    --aside: #F7F7F7;
    --aside-border: #4A4137;
    --note: #e8f5e9;
    --note-border: #d5e1d6;
    --alert: #ffebee;
    --alert-border: #d32f2f;
    --field: #fffee0;
    --mark: #FFFF99;
  }
}

html, body {
  background: var(--background);
  color: var(--text);
  margin: 0;
  padding: 0;
  font-family: var(--font_system_ui);
  font-size: 18px;
  line-height: 1.6;
}

body {
  max-width: 80em;
  margin: 2em auto;
  padding: 0 1em 4em;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:visited {
  color: var(--link_visited);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* Horizontal rule rendered as five dots in the link color */

hr {
  border: 0;
  height: auto;
  text-align: center;
  margin: 1.5em 0;
  color: var(--link);
  font-size: 1em;
  letter-spacing: 0.4em;
}

hr::before {
  content: "•••••";
}

/* Header */

.site-header {
  text-align: center;
  margin-bottom: 2em;
}

.site-header .logo {
  border: 0;
  text-decoration: none;
}

.site-header .logo img {
  width: 108px;
  height: auto;
}

.site-header a {
  font-size: 0.85em;
  letter-spacing: 0.02em;
}

.site-header nav {
  margin: 0.4em 0 0.6em;
}

.site-header nav a {
  color: var(--link);
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}

.site-header h1 {
  font-family: var(--font_system_ui);
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--link);
  margin: 0.25em 0 0.1em;
  display: inline;
}

.site-header h1 a {
  color: var(--text);
  text-decoration: none;
}

.site-header .sub_title {
  font-size: 1em;
  color: var(--accent2);
  margin: 0;
}

.gallery-description {
  text-align: left;
  max-width: 40em;
  margin: 1.5em auto 0;
}

/* Front page: gallery grid */

.galleries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1em;
}

.galleries-line {
  display: contents;
}

.gallery-square {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--accent1);
}

.gallery-square > a {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  text-decoration: none;
}

.gallery-cover {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: saturate(0.9);
}

.gallery-square:hover .gallery-cover {
  transform: scale(1.03);
  filter: saturate(1);
}

.gallery-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 1.5em 1em 0.85em;
  color: #ECE6D3;
  text-align: left;
  background: linear-gradient(
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 30%,
    rgba(74, 65, 55, 0.7) 100%
  );
  pointer-events: none;
}

.gallery-title h2 {
  font-family: var(--font_system_ui);
  font-size: 1.1em;
  font-weight: 700;
  margin: 0;
  text-transform: none;
}

.gallery-title h3 {
  font-family: var(--font_system_ui);
  font-weight: 400;
  font-size: 0.9em;
  margin: 0.15em 0 0;
  opacity: 0.9;
}

.gallery-datetime,
.gallery-tag {
  display: none;
}

/* Static page (e.g. /equipment/) — narrower than gallery pages, blog-like prose width */

.static-content {
  max-width: 40em;
  margin: 0 auto;
  text-align: left;
}

.static-content section.text {
  margin: 1.5em 0;
}

.static-content h2 {
  font-family: var(--font_system_ui);
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1.2;
  margin: 1.5em 0 0.5em;
}

.static-content ul, .static-content ol {
  padding-left: 1.5em;
}

.static-content li {
  margin: 0.25em 0;
}

/* Album (gallery-index) page */

#wrapper {
  padding: 0;
  max-width: 80em;
  margin: 0 auto;
}

.full-picture,
.bordered-picture,
.image {
  margin: 0 0 1em;
}

.full-picture img,
.bordered-picture img,
.image img,
.panorama img,
.pictures-group img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.full-picture {
  text-align: center;
  padding-bottom: 1em;
  margin-bottom: 1.5em;
}

.full-picture h1 {
  font-family: var(--font_system_ui);
  font-size: 1.5em;
  font-weight: 700;
  text-transform: none;
  margin: 1em 0 0.25em;
}

.full-picture h2 {
  font-family: var(--font_system_ui);
  font-weight: 400;
  font-style: italic;
  font-size: 1em;
  margin: 0;
  color: var(--accent1);
}

.datetime {
  display: block;
  margin-top: 0.5em;
  font-size: 0.9em;
  color: var(--accent1);
}

/* Masonry-style packing via CSS columns. Photos flow column-major
   (top of col 1, then bottom, then top of col 2). */
.pictures-group {
  column-count: 3;
  column-gap: 1em;
  margin-bottom: 1.5em;
}

.pictures-group .image {
  break-inside: avoid;
  margin: 0 0 1em;
  display: block;
}

.pictures-group .image a,
.pictures-group .image img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 1024px) {
  .pictures-group { column-count: 2; }
}

.bordered-picture {
  padding: 4px;
  background: var(--code);
  border-radius: var(--radius);
  margin-bottom: 1.5em;
}

/* Block-level callouts — shared shape, only colors differ.
   Mirrors object.computer/TinyTheme conventions. */

aside,
.aside,
.note,
.alert,
.callout,
blockquote {
  margin: 1em 0;
  padding: 1em;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9em;
}

aside,
.aside {
  background: var(--aside);
  border-left: 4px solid var(--aside-border);
}

.note {
  background: var(--note);
  border-left: 4px solid var(--note-border);
  font-style: italic;
}

.alert {
  background: var(--alert);
  border-left: 4px solid var(--alert-border);
  font-weight: 700;
  animation: alert-pulse 2s ease-in-out infinite;
}

@keyframes alert-pulse {
  0%, 100% { border-left-color: var(--alert-border); }
  50% { border-left-color: transparent; }
}

.callout {
  background: var(--code);
  border: 0;
  border-radius: var(--radius);
}

blockquote {
  background: var(--blockquote);
  border-left: 4px solid var(--blockquote-border);
  color: var(--text);
}

blockquote cite,
aside cite,
.aside cite {
  display: block;
  text-align: right;
  margin-top: 0.5em;
  font-style: italic;
  font-size: 0.95em;
  color: var(--accent1);
}

cite {
  font-style: italic;
}

/* Inline */

mark {
  background: var(--mark);
  color: var(--text);
  padding: 0 0.15em;
  border-radius: 2px;
}

sub, sup {
  font-size: 0.75em;
  line-height: 0;
}

/* Utility classes mirroring object.computer */

.tiny-img {
  max-width: 25em;
  width: 100%;
  height: auto;
}

.tiny-text {
  font-size: 0.6em;
}

.hiddenlink {
  display: none;
}

.read-more {
  display: inline-block;
  padding: 0.4em 0.9em;
  background: var(--link);
  color: var(--button-text);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9em;
}

.read-more:hover {
  text-decoration: none;
  opacity: 0.85;
}

p {
  margin: 0 0 1em;
}

h3 {
  font-family: var(--font_system_ui);
  font-size: 1.17em;
  text-transform: none;
  font-weight: 700;
  line-height: 1.2;
}

code, pre {
  font-family: var(--font_monospace_code);
  background: var(--code);
  border-radius: var(--radius);
}

code {
  padding: 0.1em 0.3em;
  font-size: 0.9em;
}

pre {
  padding: 0.75em 1em;
  overflow-x: auto;
}

pre code {
  background: transparent;
  padding: 0;
}

/* Back-to-galleries link on an album page */

.back-to-home {
  text-align: center;
  margin-top: 3em;
  font-size: 0.95em;
}

.back-to-home a {
  color: var(--link);
}

/* Footer */

footer {
  margin-top: 2em;
  text-align: center;
}

footer .custom_footer {
  font-size: 0.75em;
  color: var(--accent2);
}

footer i {
  font-size: 1.5em;
  padding: 0 5px;
}

footer a {
  color: var(--link);
}

/* Mobile */

@media (max-width: 640px) {
  html, body {
    font-size: 17px;
  }
  body {
    padding: 0 1em 3em;
    margin: 1.5em auto;
  }
  .site-header h1 {
    font-size: 1.6em;
  }
  .galleries-grid {
    grid-template-columns: 1fr;
  }
  .gallery-square {
    aspect-ratio: 3 / 2;
  }
  .pictures-group {
    column-count: 1;
  }
}
