/* ─── Reset & Base ──────────────────────────────────────────────────────── */

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", system-ui, serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background: #fff;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: rgb(3 105 161); text-decoration-line: underline; transition: color 200ms; }
a:hover, a:focus { color: rgb(12 74 110); }

p { margin: 0 0 1rem; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; font-weight: 500; line-height: 1.2; }
img { max-width: 100%; height: auto; }
blockquote {
  font-style: italic;
  margin: 2rem 0;
  padding: 1rem 0 1rem 1rem;
  border-left: 4px solid #9ca3af;
  position: relative;
}
blockquote::before {
  content: "\201C";
  font-size: 4em;
  position: absolute;
  left: .5rem;
  top: 1.5rem;
  color: #e5e7eb;
}
blockquote p { line-height: 1.75rem; }

/* ─── Typography utilities ──────────────────────────────────────────────── */

.sans { font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", sans-serif; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-wide { letter-spacing: .1em; }
.heading { font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", sans-serif; }
.fst-italic { font-style: italic; }
.fw-bold { font-weight: 700; }
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.small { font-size: 85%; }

/* ─── Layout containers ─────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 12px;
  padding-left: 12px;
}

.container-fluid {
  width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -12px;
  margin-left: -12px;
}

.col, [class*="col-"] {
  padding-right: 12px;
  padding-left: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
}

/* ─── Spacing utilities ─────────────────────────────────────────────────── */

.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 3rem; }
.my-1 { margin-top: .25rem; margin-bottom: .25rem; }
.p-2  { padding: .5rem; }
.p-4  { padding: 1.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-5 { padding-bottom: 3rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* ─── Navbar ────────────────────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: .5rem 1rem;
}

.navbar .container-fluid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.navbar-brand {
  font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: #212529;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-radius: .25rem;
}
.navbar-brand:hover { color: #212529; }

.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .25rem;
  margin-left: auto;
}

.nav-link {
  font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: rgba(33,37,41,.75);
  text-decoration: none;
  padding: .5rem 1rem;
  border-radius: .25rem;
  transition: color .15s;
  text-transform: capitalize;
}
.nav-link:hover { color: #212529; }

/* ─── Spacer for fixed navbar ───────────────────────────────────────────── */

body > *:not(.navbar):first-of-type { margin-top: 56px; }
main { margin-top: 56px; }

/* ─── Feature image splash ──────────────────────────────────────────────── */

.splash {
  background-color: #000;
  min-height: 382px;
}

.day-cover-photo {
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-background-size: cover;
  height: 430px;
}

/* Extend behind the fixed navbar so the image is flush with no gap */
#cover-photo-splash {
  margin-top: 0;
}

/* Fallback header for days without a feature image */
.day-header-no-image {
  background-color: #212529;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 1.5rem;
  margin-top: 0;
}

.day-header-no-image .day-date,
.day-header-no-image .day-day,
.day-header-no-image .day-title {
  background: none;
  padding: .1rem 0;
}

/* Date / weekday / title text overlaid on feature image */
.day-date, .day-day, .day-title {
  font-family: Georgia, "Times New Roman", system-ui, serif;
  font-size: 1.5rem;
  background: rgba(15, 16, 16, 0.65);
  color: #fff;
  font-weight: 400;
  display: inline-block;
  padding: .25rem .5rem;
}
.day-title { font-style: italic; }

/* ─── Entry content ─────────────────────────────────────────────────────── */

.entry-content {
  line-height: 1.4rem;
  position: relative;
}

.entry-content p,
.sidebar-content p {
  line-height: 2rem;
  font-size: 1.4rem;
}

.entry-content a,
.sidebar-content a {
  color: rgb(3 105 161);
  text-decoration-line: underline;
  transition: color 200ms;
}
.entry-content a:hover, .entry-content a:focus,
.sidebar-content a:hover, .sidebar-content a:focus {
  color: rgb(12 74 110);
}

.entry-content blockquote {
  font-style: italic;
  margin: 2rem 0;
  padding: 1rem 0 1rem 1rem;
  border-left: 4px solid #9ca3af;
  position: relative;
}
.entry-content blockquote::before {
  content: "\201C";
  font-size: 4em;
  position: absolute;
  left: .5rem;
  top: 1.5rem;
  color: #e5e7eb;
}
.entry-content blockquote p { line-height: 1.75rem; }

/* ─── Entry meta (biblio + tags) ────────────────────────────────────────── */

.entry-meta,
.entry-biblio {
  font-size: 85%;
  color: #737373;
}

.entry-tags a,
.entry-biblio a {
  display: inline-block;
  transition: color .15s, background-color .15s;
  color: #737373;
  background-color: transparent;
  text-decoration: none;
}
.entry-tags a:hover,
.entry-biblio a:hover {
  text-decoration: underline;
}

/* ─── Link entries ──────────────────────────────────────────────────────── */

.ds-link-title {
  font-weight: 700;
  line-height: 1.4;
}

/* ─── Photo entries ─────────────────────────────────────────────────────── */

.ds-photo-caption {
  font-size: 85%;
  color: #737373;
}

.ds-photo-description p { }

/* ─── Profile sidebar block ─────────────────────────────────────────────── */

.ds-profile-image { text-align: center; }
.ds-profile-name  { font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.2; font-size: 20px; }
.ds-profile-bio   { font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.2; font-size: 18px; }

/* ─── Sidebar background block ──────────────────────────────────────────── */

.bg-body-tertiary { background-color: #f8f9fa; }
.rounded { border-radius: .375rem; }

/* ─── Sidebar section headings ──────────────────────────────────────────── */

h5.heading {
  font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  text-transform: capitalize;
}

/* ─── Border utilities ──────────────────────────────────────────────────── */

.border-bottom { border-bottom: 1px solid #dee2e6; }
.border-top    { border-top: 1px solid #dee2e6; }

/* ─── Rounded circle ────────────────────────────────────────────────────── */

.rounded-circle { border-radius: 50%; }

/* ─── List unstyled ─────────────────────────────────────────────────────── */

.list-unstyled { list-style: none; padding-left: 0; }

/* ─── Text utilities ────────────────────────────────────────────────────── */

.text-gray-600 { color: #6c757d; }
.text-gray-600:hover { color: #495057; }

/* ─── Footer ────────────────────────────────────────────────────────────── */

footer {
  font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-top: auto;
  padding-bottom: 1rem;
}

footer h6 {
  font-weight: 700;
  text-transform: uppercase;
}

footer p { margin-bottom: .5rem; }
footer a { color: #6c757d; text-decoration: none; }
footer a:hover { color: #212529; text-decoration: underline; }

footer .social-icons { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
footer .social-icons img { width: 24px; height: 24px; }

/* ─── Article standalone page ───────────────────────────────────────────── */

.ds-entry-isolated {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 1rem;
}

/* ─── Archive / index pages ─────────────────────────────────────────────── */

.page-title {
  font-family: Georgia, "Times New Roman", system-ui, serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.archive-year { margin-bottom: 2rem; }
.archive-year h2 { font-size: 1.5rem; font-family: Georgia, serif; }
.archive-months { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 0; list-style: none; }
.archive-months a { font-family: Roboto, sans-serif; font-size: .9rem; color: #6c757d; text-decoration: none; }
.archive-months a:hover { color: #212529; text-decoration: underline; }

.day-list { list-style: none; padding: 0; }
.day-list li { padding: .5rem 0; border-bottom: 1px solid #e6e6e6; font-family: Roboto, sans-serif; font-size: .95rem; }
.day-list a { color: #212529; text-decoration: none; }
.day-list a:hover { color: rgb(3 105 161); }
.day-list-meta { color: #737373; font-size: .85rem; margin-left: .5rem; }

.tag-list { list-style: none; padding: 0; }
.tag-list li { padding: .3rem 0; font-family: Roboto, sans-serif; border-bottom: 1px solid #e6e6e6; }
.tag-list a { color: rgb(3 105 161); text-decoration: none; }
.tag-list a:hover { text-decoration: underline; }
.tag-count { color: #737373; font-size: .85rem; margin-left: .35rem; }

/* ─── Home page ─────────────────────────────────────────────────────────── */

/* Hero */
.home-hero {
  background-color: #000;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 320px;
  flex-shrink: 0;
  margin-top: 0;
  display: flex;
  align-items: flex-end;
}

.home-hero-content {
  padding-bottom: 2rem;
}

.home-hero .day-date,
.home-hero .day-day,
.home-hero .day-title {
  display: inline-block;
  margin-bottom: .15rem;
}

.home-hero-link {
  display: inline-block;
  margin-top: .5rem;
  font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .875rem;
  color: #fff;
  background: rgba(3, 105, 161, 0.85);
  padding: .25rem .75rem;
  border-radius: .25rem;
  text-decoration: none;
  transition: background 150ms;
}
.home-hero-link:hover { background: rgba(3, 105, 161, 1); color: #fff; }

/* Day grid */
.home-day-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
  margin-top: 2.5rem;
}

.home-day-card { }

.home-card-image-link { display: block; }

.home-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: .25rem;
  display: block;
}

.home-card-placeholder {
  width: 100%;
  height: 180px;
  background-color: #212529;
  border-radius: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-card-placeholder-date {
  font-family: Georgia, "Times New Roman", system-ui, serif;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.4);
}

.home-card-body { margin-top: .75rem; }

.home-card-date {
  font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .85rem;
  color: #737373;
  margin-bottom: .2rem;
}
.home-card-date a { color: #737373; text-decoration: none; }
.home-card-date a:hover { color: #212529; }

.home-card-title {
  font-family: Georgia, "Times New Roman", system-ui, serif;
  font-size: 1.05rem;
  margin-bottom: .2rem;
}
.home-card-title a { color: #212529; text-decoration: none; }
.home-card-title a:hover { color: rgb(3 105 161); }

.home-card-counts {
  font-family: Roboto, Oxygen, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .8rem;
  color: #9ca3af;
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .home-day-grid { grid-template-columns: 1fr; }
  .home-hero { min-height: 240px; }
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .day-cover-photo { height: 280px; }
  .day-date, .day-day, .day-title { font-size: 1.1rem; }
  .entry-content p, .sidebar-content p { font-size: 1.1rem; line-height: 1.75rem; }
}
