/* Brandon.cc Site Styles */

/* CSS Custom Properties */
:root {
  --font-serif: ETBookRoman, warnock-pro, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

  --color-text: rgba(0, 0, 0, 0.87);
  --color-text-secondary: rgba(0, 0, 0, 0.54);
  --color-text-muted: rgba(0, 0, 0, 0.5);
  --color-nav: #757575;
  --color-accent: #dc2626;
  --color-border: #e5e7eb;
  --color-code-bg: #f3f4f6;

  --transition-fast: 0.2s ease;
}

/* Base */
html {
  scroll-padding-top: 10rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-serif);
  color: var(--color-text);
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
}

/* Navigation */
nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-sans);
}

nav li {
  margin-right: 1rem;
}

nav li:last-child {
  margin-right: 0;
}

nav ul a {
  font-family: var(--font-sans);
  color: var(--color-nav);
  white-space: nowrap;
  transition: color var(--transition-fast);
}

nav ul a:hover {
  color: var(--color-text);
}

nav a.active {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Site header */
.site-name {
  font-family: var(--font-serif);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  font-weight: 600;
  white-space: nowrap;
}

.site-tagline {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* UI elements use sans-serif */
button, .button, a.px-6, a.px-8,
input, textarea, select, label {
  font-family: var(--font-sans);
}

/* Prose typography */
.prose {
  max-width: 900px;
  margin: 0 auto;
}

.prose p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

@media (max-width: 640px) {
  .prose p {
    font-size: 1.0625rem;
    line-height: 1.9;
  }
}

.prose ol,
.prose ul {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose ol {
  list-style: decimal;
}

.prose ul {
  list-style: disc;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.prose h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  margin-top: 4rem;
  position: relative;
}

.prose h2 {
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
}

.prose h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.prose h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.prose h2.article-subtitle,
h2.article-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  font-style: italic;
  color: rgba(0, 0, 0, 0.54);
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-list-subtitle {
  font-size: 0.9375rem;
  font-style: italic;
  color: rgba(0, 0, 0, 0.54);
  margin-top: 0;
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.prose blockquote {
  border-left: none;
  padding: 2rem 2.5rem;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.6;
  margin: 3rem 0;
  color: var(--color-text-secondary);
  text-align: center;
}

@media (max-width: 640px) {
  .prose blockquote {
    font-size: 1.25rem;
    padding: 1.5rem 1rem;
    margin: 2rem 0;
  }
}

/* Pull quotes */
.prose .pull-quote {
  font-size: 1.375rem;
  line-height: 1.6;
  font-style: italic;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin: 2.5rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 640px) {
  .prose .pull-quote {
    font-size: 1.1875rem;
    margin: 2rem 0;
  }
}

/* Law cards */
.prose .law {
  border-left: 3px solid var(--color-border);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 1.75rem 0;
}

.prose .law h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
}

.prose .law p {
  margin-bottom: 0;
  color: rgba(0, 0, 0, 0.75);
}

@media (max-width: 640px) {
  .prose .law {
    padding-left: 1rem;
    margin: 1.5rem 0;
  }
}

.prose code {
  background: var(--color-code-bg);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  color: var(--color-text);
}

.prose pre {
  background: var(--color-code-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
}

.prose pre code {
  background: transparent;
  padding: 0;
}

.prose hr {
  margin: 2.5rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  display: block;
  opacity: 0.7;
}

/* Header anchor links */
.prose .header-anchor {
  position: absolute;
  left: -1.5rem;
  opacity: 0;
  color: #9ca3af;
  text-decoration: none;
  font-weight: 400;
  transition: opacity var(--transition-fast);
}

.prose h1:hover .header-anchor,
.prose h2:hover .header-anchor,
.prose h3:hover .header-anchor,
.prose h4:hover .header-anchor {
  opacity: 1;
}

.prose .header-anchor:hover {
  color: var(--color-text);
}

/* Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-nav);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* About page header */
.about-intro {
  overflow: hidden;
}

.about-header-image {
  float: right;
  width: 220px;
  height: 220px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  margin: 0 0 1rem 2rem;
}

@media (max-width: 640px) {
  .about-header-image {
    float: none;
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem auto;
  }
}

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

.sr-only:focus,
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: revert;
  margin: revert;
  overflow: visible;
  clip: auto;
  white-space: normal;
}
