body {
  max-width: 800px;
  margin: 50px auto;
  padding: 40px;
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  font-size: 18px;
  line-height: 1.7;
  color: #2a2a2a;
  position: relative;
  background:
    radial-gradient(circle at 20% 50%, transparent 0%, transparent 1px, rgba(0,0,0,0.1) 1px, transparent 2px),
    linear-gradient(135deg, #f9e4c8 0%, #fdefd5 20%, #fff5dc 40%, #fef0d9 60%, #fde8cc 80%, #f9e4c8 100%);
  background-size:
    4px 4px,
    3px 3px,
    100% 100%;
  background-position:
    0 0,
    1.5px 1.5px,
    0 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #1a1a1a;
  font-weight: 600;
}

h1 { font-size: 2em; }
h2 { font-size: 1.6em; border-bottom: 2px solid #d4a373; padding-bottom: 0.3em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }

a {
  color: #b8860b;
  text-decoration: none;
  border-bottom: 1px solid #daa520;
  transition: all 0.2s ease;
  padding: 0 2px;
  background: rgba(218, 165, 32, 0.1);
}

a:hover {
  color: #8b6914;
  background: rgba(218, 165, 32, 0.2);
  border-bottom-color: #8b6914;
}

/* Highlight numbers and email addresses */
a[href^="tel:"],
a[href^="mailto:"] {
  background: rgba(184, 134, 11, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  border-bottom: 2px solid #d4a373;
}

a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
  background: rgba(184, 134, 11, 0.25);
}

/* Style plain numbers in text */
body {
  font-variant-numeric: oldstyle-nums;
}

code {
  background: rgba(139, 105, 20, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  color: #654321;
}

pre {
  background: rgba(139, 105, 20, 0.05);
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  border-left: 4px solid #d4a373;
}

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

blockquote {
  border-left: 4px solid #d4a373;
  padding-left: 20px;
  margin-left: 0;
  color: #5a4a3a;
  font-style: italic;
  background: rgba(212, 163, 115, 0.05);
  padding: 15px 20px;
  border-radius: 0 4px 4px 0;
}

ul, ol {
  padding-left: 30px;
  margin: 1em 0;
}

li {
  margin: 0.5em 0;
}

strong {
  color: #1a1a1a;
  font-weight: 600;
}

em {
  color: #4a3a2a;
}

hr {
  border: none;
  border-top: 2px solid #d4a373;
  margin: 2em 0;
  opacity: 0.5;
}

/* Title image styling */
img.title-image {
  display: block;
  margin: -30px auto 2em auto;
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Add subtle texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.015;
  background-image:
    repeating-radial-gradient(circle at 0 0, transparent 0, #000 1px, transparent 2px);
  background-size: 2px 2px;
  z-index: -1;
}

/* Collapsible details styling */
details {
  margin: 1.5em 0;
  padding: 15px;
  background: rgba(212, 163, 115, 0.08);
  border: 1px solid #d4a373;
  border-radius: 6px;
  transition: all 0.3s ease;
}

details:hover {
  background: rgba(212, 163, 115, 0.12);
  border-color: #b8860b;
}

details[open] {
  background: rgba(212, 163, 115, 0.1);
}

summary {
  cursor: pointer;
  padding: 8px 12px;
  margin: -15px -15px 0 -15px;
  background: rgba(184, 134, 11, 0.15);
  border-radius: 5px 5px 0 0;
  font-weight: 600;
  color: #654321;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  user-select: none;
}

summary:hover {
  background: rgba(184, 134, 11, 0.25);
  color: #4a3010;
}

summary:active {
  background: rgba(184, 134, 11, 0.35);
}

/* Custom arrow indicator */
summary::before {
  content: '▶';
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.85em;
  color: #b8860b;
  flex-shrink: 0;
}

details[open] summary::before {
  transform: rotate(90deg);
}

/* Hide default marker */
summary::-webkit-details-marker {
  display: none;
}

/* Content spacing when expanded */
details[open] summary {
  margin-bottom: 15px;
  border-radius: 5px;
}

/* Images inside details */
details img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Clickable images inside details */
details a img {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

details a img:hover {
  box-shadow: 0 4px 8px rgba(184, 134, 11, 0.3);
  border-color: #d4a373;
  transform: scale(1.02);
}

/* Remove link styling for image links */
details a:has(img) {
  border-bottom: none;
  background: none;
  padding: 0;
  display: block;
}

details a:has(img):hover {
  background: none;
}
