/* Typography overrides to match React app exactly */

/* Base font sizes - React app uses 1.2rem for most text */
.small { font-size: 1.2rem !important; }
.list li { font-size: 1.2rem !important; }
article p { margin: 1rem 0; font-size: 1.2rem !important; }
.prose { font-size: 1.2rem !important; }

/* Homepage lead text */
.container article.lead { font-size: 1.125rem; }
.container article.lead p { margin: 1rem 0; font-size: 1.2rem !important; }

/* H2 should be same size as H1 (24pt) */
.h2 { 
  font-family: "Newsreader", serif !important; 
  font-weight: 700 !important; 
  font-size: 24pt !important; 
  margin: 2.5rem 0 0.75rem !important; 
  letter-spacing: -0.01em !important; 
}

/* Back link spacing */
.container .small.muted a { text-decoration: none; }

/* Inline code chips */
.container code {
  background: hsl(var(--muted) / 0.5);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  border: 1px solid hsl(var(--border));
}

/* Blockquote styling from React app */
.container blockquote {
  border-left: 4px solid hsl(var(--accent));
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  font-style: italic;
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.1);
  border-radius: 0 0.5rem 0.5rem 0;
}

/* List bullets style */
.container ul { list-style: disc; padding-left: 1.25rem; }
.container ul li { margin: 0.35rem 0; font-size: 1.2rem !important; }

/* Ordered list spacing */
.container ol { list-style: decimal; padding-left: 1.25rem; }
.container ol li { margin: 0.35rem 0; font-size: 1.2rem !important; }

/* Headings */
.h1 { font-weight: 700; letter-spacing: -0.01em; }

/* Larger post title */
.post-title {
  font-family: "Newsreader", serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 40pt; /* larger than homepage h1 */
  line-height: 1.1;
  margin: 0;
}

/* Network animation dark mode adjustments */
.dark #network-animation svg {
  filter: brightness(1.1);
}

#network-animation {
  position: relative;
  overflow: visible;
}

/* Highlight syntax for inline highlights */
span.highlight {
  background: linear-gradient(104deg, transparent 0.9%, hsl(45, 100%, 85%) 2.4%, hsl(45, 100%, 85%) 5.8%, transparent 93%);
  border-radius: 1em 0.5em;
  text-decoration: inherit;
  transition: background-color 0.25s ease;
}

.dark span.highlight {
  background: linear-gradient(104deg, transparent 0.9%, hsl(200, 60%, 25%) 2.4%, hsl(200, 60%, 25%) 5.8%, transparent 93%);
}

/* Image styling */
.content img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.content figure {
  margin: 2rem 0;
}

.content figcaption {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* Post page specific styles */
.content p {
  margin-bottom: 1rem;
  font-size: 1.2rem !important;
  line-height: 1.8;
  color: hsl(var(--foreground));
}

/* Content links use classic underline, same color as text */
.content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
}

.content a:hover { color: inherit; text-decoration-color: currentColor; }

.content h2 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  color: hsl(var(--foreground));
}

.content ul, .content ol {
  margin: 1.5rem 0;
}

.content ol {
  list-style: decimal;
}

.content li {
  margin: 0.5rem 0;
  font-size: 1.2rem !important;
}

/* Footer styles - removed to prevent double borders */

/* Code block styling to match React app */
.content pre,
pre {
  background: #282c34;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.content pre code,
pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #abb2bf;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* Hugo's highlight shortcode */
div.highlight {
  background: #282c34 !important;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 2rem 0;
  overflow-x: auto;
}

div.highlight pre {
  background: transparent !important;
  margin: 0;
  padding: 0;
}

div.highlight code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  color: #abb2bf !important;
}

/* Back navigation arrow animation */
.back-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.back-link:hover .back-arrow {
  transform: translateX(-4px);
}

/* Theme toggle styles */
.theme-toggle {
  position: relative;
}

.theme-switch {
  width: 44px;
  height: 24px;
  background: transparent;
  border: 2px solid hsl(var(--foreground));
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  padding: 0;
}

.theme-switch:hover {
  opacity: 0.8;
}

.theme-switch .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: hsl(var(--foreground));
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.theme-switch[data-state="dark"] .knob {
  transform: translateX(20px);
}

.dark .theme-switch {
  border-color: hsl(var(--foreground));
}

.dark .theme-switch .knob {
  background: hsl(var(--foreground));
}

/* Animation classes from React app */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in 0.5s ease-out;
}

/* Link styles - classic underline, no hover color shift */
.link-underline { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: currentColor; }
.link-underline::after { content: none !important; }
.link-underline:hover { color: inherit; text-decoration-color: currentColor; }

/* Utility classes */
.min-h-screen { min-height: 100vh; }
.bg-background { background-color: hsl(var(--background)); }
.text-foreground { color: hsl(var(--foreground)); }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-8 { gap: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-16 { margin-top: 4rem; }
.pt-8 { padding-top: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-0 { padding-left: 0; padding-right: 0; }
.text-sm { font-size: 0.875rem; }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.hover\:text-foreground:hover { color: hsl(var(--foreground)); }
.transition-colors { transition: color 0.15s ease; }
.underline { text-decoration: underline; }
.decoration-1 { text-decoration-thickness: 1px; }
.underline-offset-4 { text-underline-offset: 4px; }
.max-w-none { max-width: none; }
.max-w-6xl { max-width: 72rem; }
.flex-1 { flex: 1 1 0%; }
.prose-lg { font-size: 1.125rem; line-height: 1.75; }
.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; }

@media (min-width: 640px) {
  .sm\:py-8 { padding-top: 2rem; padding-bottom: 2rem; }
  .sm\:px-0 { padding-left: 0; padding-right: 0; }
}