/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #000000;
  color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
}

/* Logo */
.logo-container {
  display: flex;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: -0.025em;
}

/* Main content */
.main-content {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Article header */
.article-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* Meta information */
.meta-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon {
  width: 1rem;
  height: 1rem;
}

/* Author info */
.author-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
}

.author-avatar {
  width: 3rem;
  height: 3rem;
  background-color: #374151;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-initials {
  font-size: 1.125rem;
  font-weight: 600;
}

.author-details {
  text-align: left;
}

.author-name {
  font-weight: 500;
}

.author-title {
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Featured image */
.featured-image-container {
  padding: 2rem 0;
}

.featured-image {
  width: 100%;
  height: 24rem;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Article content */
.article-content {
  font-size: 1rem;
  line-height: 1.75;
  color: #d1d5db;
}

.lead-paragraph {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 2rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content p:last-child {
  margin-bottom: 2rem;
}

/* Social sharing */
.social-sharing {
  border-top: 1px solid #374151;
  padding-top: 2rem;
}

.sharing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sharing-label {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-right: 1rem;
}

.share-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.share-button:hover {
  color: #ffffff;
  background-color: #374151;
}

/* Footer */
.footer {
  margin-top: 6rem;
  padding-bottom: 3rem;
}

.footer-content {
  text-align: center;
}

.copyright {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Responsive design */
@media (min-width: 768px) {
  .article-title {
    font-size: 3rem;
  }

  .logo-container {
    padding-top: 3rem;
    padding-bottom: 4rem;
  }
}

@media (max-width: 640px) {
  .meta-info {
    flex-direction: column;
    gap: 1rem;
  }

  .sharing-container {
    flex-direction: column;
    align-items: center;
  }

  .sharing-label {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

/* -------------------------------------------------------
   Content HTML elements (scoped) — non-breaking additions
   ----------------------------------------------------- */

/* Headings inside article content */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2rem 0 1rem;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }
.article-content h5 { font-size: 1.125rem; }
.article-content h6 { font-size: 1rem; color: #9ca3af; }

/* Links */
.article-content a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.article-content a:hover { color: #93c5fd; }

/* Lists */
.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.25rem;
  color: #d1d5db;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin: 0.5rem 0; }
.article-content li > ul,
.article-content li > ol { margin-top: 0.5rem; }

/* Blockquote */
.article-content blockquote {
  border-left: 4px solid #374151;
  background-color: #0b0f19;
  color: #e5e7eb;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  font-style: italic;
}

/* Horizontal rule */
.article-content hr {
  border: none;
  border-top: 1px solid #374151;
  margin: 2rem 0;
}

/* Images & figures */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
}
.article-content figure {
  margin: 1.5rem 0;
  text-align: center;
}
.article-content figcaption {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Code, pre, kbd */
.article-content code,
.article-content kbd,
.article-content samp {
  background-color: #0b0f19;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 0.375rem;
  padding: 0.15rem 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

.article-content pre {
  background-color: #0b0f19;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.6;
  margin: 1.5rem 0;
}
.article-content pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.article-content thead th {
  text-align: left;
  color: #e5e7eb;
  background-color: #0b0f19;
  border-bottom: 1px solid #374151;
  padding: 0.75rem;
}
.article-content tbody td {
  border-top: 1px solid #111827;
  border-bottom: 1px solid #111827;
  padding: 0.75rem;
  color: #d1d5db;
}
.article-content tbody tr:nth-child(odd) {
  background-color: #070a12;
}
.article-content caption {
  caption-side: bottom;
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Inline text semantics */
.article-content strong { color: #ffffff; font-weight: 700; }
.article-content em { font-style: italic; }
.article-content small { font-size: 0.875rem; color: #9ca3af; }
.article-content mark {
  background-color: #fde68a1a; /* soft amber */
  color: #fbbf24;
  padding: 0.1rem 0.25rem;
  border-radius: 0.25rem;
  border: 1px solid #4b5563;
}
.article-content sup,
.article-content sub {
  font-size: 0.75em;
  line-height: 0;
}

/* Details / summary */
.article-content details {
  background-color: #0b0f19;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
}
.article-content summary {
  cursor: pointer;
  color: #e5e7eb;
  font-weight: 600;
}

/* Embeds */
.article-content iframe,
.article-content video,
.article-content audio {
  width: 100%;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  background-color: #0b0f19;
}

/* Footnotes-style lists */
.article-content .footnotes {
  border-top: 1px solid #374151;
  margin-top: 2rem;
  padding-top: 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
}

/* -------------------------------------------------------
   Minimal global additions (accessibility / forms)
   ----------------------------------------------------- */

/* Focus states (don’t fight existing classes) */
:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* Generic form controls inside main content only */
.main-content input[type="text"],
.main-content input[type="email"],
.main-content input[type="url"],
.main-content input[type="search"],
.main-content input[type="password"],
.main-content input[type="number"],
.main-content select,
.main-content textarea {
  width: 100%;
  background-color: #0b0f19;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.main-content input::placeholder,
.main-content textarea::placeholder {
  color: #6b7280;
}

.main-content input:focus,
.main-content select:focus,
.main-content textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

/* Neutral button (does not touch .share-button) */
.main-content .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background-color: #111827;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .05s ease;
}
.main-content .btn:hover {
  background-color: #1f2937;
}
.main-content .btn:active {
  transform: translateY(1px);
}
.main-content .btn--primary {
  background-color: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}
.main-content .btn--primary:hover {
  background-color: #1d4ed8;
}

/* Helper: spacing utilities for content (opt-in) */
.article-content .mt-0 { margin-top: 0 !important; }
.article-content .mt-1 { margin-top: 0.25rem !important; }
.article-content .mt-2 { margin-top: 0.5rem !important; }
.article-content .mt-3 { margin-top: 0.75rem !important; }
.article-content .mt-4 { margin-top: 1rem !important; }
.article-content .mb-0 { margin-bottom: 0 !important; }
.article-content .mb-1 { margin-bottom: 0.25rem !important; }
.article-content .mb-2 { margin-bottom: 0.5rem !important; }
.article-content .mb-3 { margin-bottom: 0.75rem !important; }
.article-content .mb-4 { margin-bottom: 1rem !important; }

/* -------------------------------------------------------
   Responsive tweaks
   ----------------------------------------------------- */
@media (min-width: 768px) {
  .article-content h1 { font-size: 2.5rem; }
  .article-content h2 { font-size: 2rem; }
  .article-content h3 { font-size: 1.75rem; }
}

@media (max-width: 640px) {
  .article-content table { display: block; overflow-x: auto; white-space: nowrap; }
  .article-content pre { font-size: 0.95rem; }
}
