/* =========================================================
   OUR LIVES — Plain 1990s-inspired stylesheet
   Prioritas: keterbacaan, navigasi jelas, dan fungsi.
   Seluruh fitur JavaScript tetap dipertahankan.
   ========================================================= */

:root {
  color-scheme: light;
  --bg: #eeeeee;
  --surface: #ffffff;
  --text: #111111;
  --muted: #444444;
  --soft: #dddddd;
  --line: #888888;
  --accent: #ffff99;
  --header-bg: #eeeeee;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #202020;
    --surface: #292929;
    --text: #eeeeee;
    --muted: #cccccc;
    --soft: #383838;
    --line: #777777;
    --accent: #555500;
    --header-bg: #202020;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eeeeee;
  --surface: #ffffff;
  --text: #111111;
  --muted: #444444;
  --soft: #dddddd;
  --line: #888888;
  --accent: #ffff99;
  --header-bg: #eeeeee;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #202020;
  --surface: #292929;
  --text: #eeeeee;
  --muted: #cccccc;
  --soft: #383838;
  --line: #777777;
  --accent: #555500;
  --header-bg: #202020;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: auto;
  scroll-padding-top: 12px;
}

body {
  margin: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.4;
}

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 2px outset #dddddd;
  border-radius: 0;
  padding: 3px 8px;
  background: #eeeeee;
  color: #111111;
}

a { color: #0000ee; text-decoration: underline; }
a:visited { color: #551a8b; }
a:hover { color: #ff0000; }

img { display: block; max-width: 100%; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 1000;
  padding: 5px 8px;
  background: #ffff99;
  color: #0000ee;
  border: 1px solid #000000;
}
.skip-link:focus { top: 8px; }

.site-header {
  min-height: 52px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  position: relative;
  top: auto;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0;
  text-decoration: none;
}

.brand:visited { color: var(--text); }

.brand-mark {
  display: inline;
  width: auto;
  height: auto;
  padding: 2px 5px;
  background: var(--text);
  color: var(--bg);
  border-radius: 0;
  font-size: 14px;
}

.header-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

.theme-toggle {
  width: auto;
  height: auto;
  min-width: 34px;
  min-height: 30px;
  border-radius: 0;
  background: #eeeeee;
  color: #111111;
}

.icon { width: 15px; height: 15px; }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

.hero {
  min-height: 0;
  padding: 18px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
  align-items: start;
  gap: 20px;
  position: relative;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}

.hero-copy { max-width: 600px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0;
}
.eyebrow-line { display: none; }

h1, h2 {
  font-family: "Times New Roman", Times, serif;
  letter-spacing: 0;
  font-weight: bold;
}

.hero h1 {
  margin: 8px 0;
  font-size: 38px;
  line-height: 1.05;
}

.hero h1 span,
.section-heading h2 span,
.timeline-heading h2 span,
.about-inner h2 span {
  color: inherit;
}

.hero-description {
  max-width: 480px;
  margin: 12px 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.text-link {
  display: inline;
  padding: 0;
  border: 0;
  font-size: 16px;
  font-weight: normal;
  text-decoration: underline;
}
.text-link span { font-size: inherit; }

.hero-image-wrap { margin: 0; }
.hero-image-wrap img {
  width: 100%;
  height: 270px;
  object-fit: contain;
  object-position: left top;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 0;
}
.hero-image-wrap figcaption {
  position: static;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}
.hero-index {
  position: absolute;
  bottom: 8px;
  left: 10px;
  color: var(--muted);
  font-size: 11px;
}

.intro-strip {
  min-height: 0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--soft);
}
.intro-strip p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0;
}
.intro-strip p span { padding: 0 4px; }
.intro-note { font-weight: normal !important; }

.section-shell {
  padding: 24px 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.section-heading,
.timeline-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2,
.timeline-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.section-heading .eyebrow,
.timeline-heading .eyebrow { margin-bottom: 7px; }

.section-description {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-button {
  border: 1px solid #777777;
  border-radius: 0;
  background: #eeeeee;
  color: #111111;
  padding: 4px 8px;
  font-size: 13px;
}
.filter-button:hover { background: #ffffcc; color: #111111; }
.filter-button.is-active {
  background: #000080;
  color: #ffffff;
  border: 2px inset #cccccc;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 210px;
  padding: 3px 5px;
  border: 1px solid #777777;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
}
.search-box svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.search-box kbd {
  padding: 0 3px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 11px;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.random-button {
  border: 1px outset #dddddd;
  border-radius: 0;
  background: #eeeeee;
  color: #111111;
  font-size: 13px;
  font-weight: normal;
}
.random-button span { padding-right: 3px; }

.gallery {
  columns: 3 210px;
  column-gap: 12px;
}
.memory-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
  cursor: pointer;
  border: 1px solid var(--line);
  padding: 5px;
  background: var(--surface);
}
.memory-image {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--soft);
  border-radius: 0;
}
.memory-image img {
  width: 100%;
  height: auto;
  min-height: 100px;
  object-fit: contain;
  transition: none;
}
.memory-card:hover .memory-image img { transform: none; }
.memory-overlay {
  position: static;
  display: block;
  padding: 3px 0 0;
  opacity: 1;
  background: transparent;
}
.view-label { color: var(--muted); font-size: 11px; letter-spacing: 0; }
.memory-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 5px;
}
.memory-caption h3 {
  margin: 0;
  font: bold 16px "Times New Roman", Times, serif;
  letter-spacing: 0;
}
.memory-caption p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.memory-count { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.empty-state, .loading-note {
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.timeline-section { padding-top: 24px; }
.timeline {
  max-width: 900px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 0 0 18px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 4px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: var(--accent);
}
.timeline-date { color: var(--muted); font-size: 13px; padding-top: 2px; }
.timeline-event { padding-bottom: 12px; border-bottom: 1px dotted var(--line); }
.timeline-event h3 {
  margin: 0 0 5px;
  font: bold 17px "Times New Roman", Times, serif;
  letter-spacing: 0;
}
.timeline-event p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.timeline-category {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0;
}

.about-section {
  margin-top: 12px;
  padding: 25px 10px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.about-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.about-inner .eyebrow { margin-bottom: 10px; }
.about-inner h2 { margin: 0; font-size: 32px; line-height: 1.1; }
.about-inner > p:not(.eyebrow) {
  max-width: 540px;
  margin: 12px auto;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}
.about-signature { font-style: italic; font-size: 14px; }

.site-footer {
  min-height: 0;
  margin-top: 12px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.site-footer p, .back-top { color: var(--text); font-size: 13px; margin: 0; }
.back-top { color: #0000ee; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 35px 6%;
  background: rgba(0,0,0,.94);
  color: #ffffff;
}
.lightbox.is-open { display: flex; }
.lightbox-content {
  width: min(1050px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, .65fr);
  align-items: center;
  gap: 25px;
}
.lightbox-image-area { position: relative; display: grid; place-items: center; min-height: 160px; }
.lightbox-image-area img { max-width: 100%; max-height: 78vh; object-fit: contain; }
.lightbox-counter { position: absolute; bottom: -22px; left: 0; color: #cccccc; font-size: 12px; }
.lightbox-info .eyebrow { color: #cccccc; }
.lightbox-info h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.1; }
.lightbox-date { color: #cccccc; font-size: 13px; }
.lightbox-description { color: #eeeeee; font-size: 15px; line-height: 1.45; }
.lightbox-close, .lightbox-arrow {
  position: absolute;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}
.lightbox-close { top: 8px; right: 15px; font-size: 34px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); font-size: 42px; padding: 10px; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 700px) {
  .site-header { flex-wrap: wrap; }
  .header-nav { order: 3; width: 100%; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero-image-wrap img { height: auto; max-height: 300px; }
  .hero-index { position: static; }
  .intro-strip { display: block; }
  .intro-note { margin-top: 4px !important; }
  .section-heading, .timeline-heading { display: block; }
  .section-description { margin-top: 10px; }
  .gallery-toolbar { align-items: stretch; }
  .filter-list { gap: 4px; }
  .search-box { width: 100%; }
  .gallery { columns: 2 130px; column-gap: 8px; }
  .memory-card { margin-bottom: 9px; padding: 4px; }
  .memory-caption { display: block; }
  .memory-count { display: block; margin-top: 4px; }
  .timeline { padding-left: 16px; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .timeline-item::before { left: -20px; }
  .site-footer { flex-wrap: wrap; }
  .site-footer p { order: 3; width: 100%; }
  .lightbox { padding: 45px 12px 20px; }
  .lightbox-content { display: flex; flex-direction: column; gap: 18px; max-height: 100%; overflow-y: auto; }
  .lightbox-image-area img { max-height: 50vh; }
  .lightbox-info { width: 100%; text-align: center; }
  .lightbox-arrow { top: 33%; font-size: 34px; }
  .lightbox-counter { left: 50%; transform: translateX(-50%); white-space: nowrap; }
}

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