:root {
  /* Color Palette - Nautical Theme */
  --jasmine: #DEB841;           /* Gold/brass */
  --jasmine-dark: #C4A525;      /* Darker gold for light backgrounds - brighter */
  --jasmine-aged: #9A7B2E;      /* Aged brass for buttons */
  --carbon-black: #29261f;      /* Dark background */
  --tomato-jam: #b9432f;        /* Rust/red */
  --deep-sea: #2C5F7C;          /* Deep blue for header */
  --ocean-teal: #4A9B8E;        /* Rich teal */
  --storm-gray: #6B7C8C;        /* Neutral gray-blue */
  --seafoam: #B8D4D0;           /* Light accent */
  --old-parchment: #E8DCC4;     /* Cream/ivory */

  /* Light mode */
  --post-bg: rgba(255, 255, 255, 0.85);
  --bg-overlay: rgba(255, 255, 255, 0.60);
  --text-color: #1f2937;
  --text-secondary: #4b5563;
  --heading-color: var(--jasmine-dark);
}

.dark {
  /* Dark mode */
  --post-bg: rgba(41, 38, 31, 0.75);
  --bg-overlay: rgba(41, 38, 31, 0.60);
  --text-color: #e5e7eb;
  --text-secondary: #d1d5db;
  --heading-color: var(--jasmine);
}

body {
  color: var(--text-color);
  background-image: url('/images/backgrounds/the_shipwreck_2000.22.1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-overlay);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Macondo Swash Caps', cursive;
  font-weight: 400;
  line-height: 1.25;
  color: var(--heading-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Stronger shadow for headings on dark backgrounds */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

h1 {
  font-size: 1.875rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 1.75rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h4, h5, h6 {
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.25rem;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
  }
  h2 {
    font-size: 1.875rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
  }
  h3 {
    font-size: 1.5rem;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
  }
}

/* Header navigation bar styling */
header {
  background-color: var(--deep-sea) !important;
}

/* Theme toggle button styling */
header button {
  background-color: transparent;
}

header button:hover {
  background-color: rgba(44, 95, 124, 0.5) !important;
}

/* Apply Macondo Swash Caps to site title in header */
header a.text-3xl {
  font-family: 'Macondo Swash Caps', cursive;
  font-weight: 400;
  font-size: 1.875rem !important;
  color: var(--jasmine) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header a.text-3xl:hover {
  color: var(--jasmine) !important;
  filter: brightness(1.2);
}

/* Navigation menu links styling */
header nav a {
  font-family: 'Macondo Swash Caps', cursive;
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--jasmine) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header nav a:hover {
  color: var(--jasmine) !important;
  filter: brightness(1.2);
}

/* Post header titles */
article h3 a,
.space-y-6 h3 a {
  font-family: 'Macondo Swash Caps', cursive;
  color: var(--heading-color) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

article h3 a:hover,
.space-y-6 h3 a:hover {
  filter: brightness(1.2);
}

.dark article h3 a,
.dark .space-y-6 h3 a {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Pagination styling */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination li {
  list-style: none;
  display: inline-block;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  min-width: 2.5rem;
  text-align: center;
  background-color: var(--post-bg);
  color: var(--text-color);
  border-radius: 0.375rem;
  transition: all 150ms;
  text-decoration: none;
}

.pagination a:hover {
  background-color: var(--ocean-teal);
  color: white;
  transform: translateY(-2px);
}

.pagination .active {
  background-color: var(--jasmine);
  color: var(--carbon-black);
  font-weight: bold;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Golden gradient buttons inspired by Uiverse.io */
a[style*="background-color: var(--ocean-teal)"] {
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(to right, #77530a, #ffd277, #77530a, #77530a, #ffd277, #77530a) !important;
  background-size: 250% !important;
  background-position: left !important;
  color: #c9a850 !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background-position 1s !important;
  overflow: hidden !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 4px rgba(201, 168, 80, 0.3) !important;
  z-index: 1 !important;
}

a[style*="background-color: var(--ocean-teal)"]::before {
  position: absolute;
  content: '';
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 8px;
  transition: all 1s;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: -1;
  left: 3px;
  top: 3px;
}

a[style*="background-color: var(--ocean-teal)"] span,
a[style*="background-color: var(--ocean-teal)"] {
  position: relative;
  z-index: 1;
}

a[style*="background-color: var(--ocean-teal)"]:hover {
  background-position: right !important;
  transition: background-position 1s;
}

a[style*="background-color: var(--ocean-teal)"]:hover::before {
  transition: all 1s;
}

a[style*="background-color: var(--ocean-teal)"]:active {
  transform: scale(0.95);
}

/* Regular links */
a {
  color: var(--ocean-teal);
  transition: color 150ms;
}

a:hover {
  color: var(--tomato-jam);
}

.dark a {
  color: var(--seafoam);
}

.dark a:hover {
  color: var(--jasmine);
}
