html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  /* A very subtle, elegant noise/texture effect using gradients, removing the garish colors */
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(212, 163, 115, 0.03), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(160, 82, 45, 0.03), transparent 25%);
  position: relative;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-wrapper,
.site-main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-main {
  overflow: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--weight-regular); /* Opting for elegant regular weight in serif */
  color: var(--color-text);
  line-height: var(--leading-tight);
}

h1 {
  font-size: clamp(2.5rem, 6vw, var(--text-5xl));
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: clamp(2rem, 4vw, var(--text-4xl));
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, var(--text-2xl));
  font-weight: var(--weight-medium);
}

h4 {
  font-size: var(--text-lg);
}

h5 {
  font-size: var(--text-md);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

p {
  margin: 0;
  max-width: 70ch;
  color: var(--color-text-muted);
}

strong {
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

a {
  color: var(--color-link);
  transition: color var(--transition-fast);
}

a:not([class]) {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-border-strong);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration-color: var(--color-link-hover);
}

::selection {
  background: var(--color-paper-deep);
  color: var(--color-ink);
}

.prose > * + * {
  margin-top: var(--space-6);
}

.prose h2, .prose h3 {
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.prose p, .prose li {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
}

.prose ul, .prose ol {
  padding-left: var(--space-6);
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose blockquote {
  padding-left: var(--space-6);
  border-left: 2px solid var(--color-accent);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--color-text);
  font-style: italic;
}

.prose img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-block: var(--space-10);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-center { text-align: center; }

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
