:root {
  --navy: #193866;
  --navy-light: #254a81;
  --navy-dark: #0f2544;
  --cyan: #1eb4e6;
  --cyan-light: #68ddff;
  --ink: #16202e;
  --body-color: #4b5563;
  --muted: #6b7280;
  --line: #e3e8ef;
  --mist: #f6f8fb;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 37, 68, 0.09);
  --shadow-lift: 0 26px 54px rgba(15, 37, 68, 0.14);
  --max-width: 1040px;
  --max-width-wide: 1240px;
  --font-heading: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.65;
}

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

a:hover {
  color: var(--cyan);
}

/* ============ HEADER ============ */

header.site-header {
  padding: 24px 20px 0;
}

.site-header .header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}

.site-header .brand:hover {
  color: var(--navy);
}

.site-header .brand img {
  height: 30px;
  width: auto;
  display: block;
}

.site-header nav a {
  margin-left: 22px;
  color: var(--body-color);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
}

.site-header nav a:hover {
  color: var(--cyan);
}

/* ============ MAIN / HERO ============ */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

main.home {
  max-width: var(--max-width-wide);
}

.hero {
  margin-bottom: 44px;
}

.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 12px;
}

.hero p {
  color: var(--body-color);
  margin: 0;
  font-size: 1.05rem;
  max-width: 520px;
}

/* ============ SEARCH / SORT CONTROLS ============ */

.controls-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.search-input {
  flex: 1 1 240px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
}

.sort-select {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
}

.search-input:focus,
.sort-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(30, 180, 230, 0.15);
}

/* ============ POST CARDS ============ */

#posts-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
}

#posts-list .empty-state {
  grid-column: 1 / -1;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card-thumb {
  width: 100%;
  height: 260px;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
}

/* No featured image (or it failed to load): a small corner badge instead of
   a reserved thumbnail block, so the text expands to fill the whole card. */
.post-card-thumb--empty {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--mist);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.post-card-thumb--empty svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 30px;
}

.post-card:has(.post-card-thumb--empty) h2 {
  padding-right: 44px;
}

.post-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.post-card .post-date {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-card h2 {
  font-family: var(--font-heading);
  margin: 8px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}

.post-card:hover h2 {
  color: var(--cyan);
}

@media (max-width: 760px) {
  #posts-list {
    grid-template-columns: 1fr;
  }
}

/* ============ PAGINATION ============ */

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination-list button {
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.pagination-list button:hover:not(:disabled):not(.active) {
  background: rgba(30, 180, 230, 0.12);
  color: var(--navy);
}

.pagination-list button.active {
  background: var(--navy);
  color: var(--white);
}

.pagination-list button:disabled {
  color: var(--muted);
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination-list button.pagination-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pagination-ellipsis {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
}

.empty-state {
  color: var(--body-color);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 44px 24px;
  text-align: center;
}

.empty-state code {
  background: var(--mist);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============ POST PAGE ============ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
}

.back-link:hover {
  color: var(--cyan);
}

.post-header .post-date {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.post-header h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 10px 0 36px;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.15;
}

.post-featured-image {
  margin: -12px 0 28px;
}

.post-featured-image img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.post-content {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
}

.post-content p {
  margin: 0 0 18px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 20px 0;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 14px;
}

.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child {
  margin-top: 0;
}

.post-content ul,
.post-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content li::marker {
  color: var(--cyan);
}

.post-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
}

.post-content table td,
.post-content table th {
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.post-content blockquote {
  border-left: 3px solid var(--cyan);
  margin: 24px 0;
  padding: 4px 20px;
  color: var(--body-color);
}

.post-content .sources-list {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

.post-content .sources-list li {
  border-left: 3px solid var(--cyan);
  padding: 4px 0 4px 16px;
  margin-bottom: 10px;
}

.post-content .sources-list a {
  font-weight: 600;
}

/* ============ FOOTER ============ */
/* Matches www.ljwebmanagement.com's footer: solid navy, logo + nav links +
   social icons row, then a separated copyright bar. */

footer.site-footer {
  margin-top: 64px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

footer.site-footer a {
  color: #fff;
}

.footer-row {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
}

.footer-links a {
  opacity: 0.85;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--cyan-light);
}

.footer-link-sep {
  opacity: 0.5;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social a {
  display: inline-flex;
  opacity: 0.85;
}

.footer-social a:hover {
  opacity: 1;
  color: var(--cyan-light);
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  background: var(--navy-dark);
  padding: 16px 24px;
}

.footer-bottom-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    text-align: left;
  }
}

/* The LJ Web Management site is light-only, so the blog stays light-themed
   to match it exactly rather than inventing a dark palette they don't have. */
:root {
  color-scheme: light;
}

@media (max-width: 560px) {
  .site-header .header-inner {
    border-radius: 24px;
  }

  .post-content {
    padding: 28px 22px;
  }

  .post-card-thumb {
    height: 200px;
  }

  .post-card-body {
    padding: 20px 22px;
  }
}
