/*
Theme Name: Astinova Blog
Theme URI: https://astinovabiolabs.com/blog
Author: Astinova Bio Labs
Description: A clean, journal-style WordPress theme for the Astinova Bio Labs blog — long-form scientific writing on drug discovery, chemistry, and advanced modalities.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: Proprietary
Text Domain: astinova-blog
Tags: blog, science, two-columns, custom-menu, featured-images
*/

/* ========================================================================
   Astinova Blog — Journal-style theme
   Palette: white background, navy headings, blue accents
   Type: Inter (body), Sora (display)
   Max article width ~700px for readability
   ======================================================================== */

:root {
  --bg:           #ffffff;
  --bg-soft:      #f8fafc;
  --bg-card:      #f1f5f9;
  --text:         #1f2937;
  --text-strong:  #111827;
  --text-muted:   #64748b;
  --text-faint:   #94a3b8;
  --navy:         #0a1628;
  --navy-2:       #0f2044;
  --blue:         #3b82f6;
  --blue-dark:    #1d4ed8;
  --blue-soft:    #dbeafe;
  --hairline:     #e5e7eb;
  --hairline-2:   #cbd5e1;
  --serif:        'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display:      'Sora', 'Inter', sans-serif;
  --content-w:    720px;
  --wide-w:       1200px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--blue-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
hr { border: none; border-top: 1px solid var(--hairline); margin: 2.5rem 0; }
::selection { background: var(--blue); color: #fff; }

/* ---------- Layout containers ---------- */
.container        { max-width: var(--wide-w); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: var(--content-w); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Site header ---------- */
.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
}
.site-brand__mark { width: 28px; height: 28px; flex-shrink: 0; }
.site-brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.site-brand__sub {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--hairline-2);
}
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0;
}
.site-nav__link:hover { color: var(--blue-dark); }
.site-nav__cta {
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.site-nav__cta:hover { background: var(--blue-dark); color: #fff; }

/* Mobile nav (very simple — only show key items) */
@media (max-width: 720px) {
  .site-nav { gap: 0.9rem; }
  .site-nav__link--hideMobile { display: none; }
  .site-brand__sub { display: none; }
}

/* ---------- Page header (blog homepage) ---------- */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--hairline);
}
.page-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 0.75rem;
}
.page-hero__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.75rem;
  letter-spacing: -0.015em;
}
.page-hero__lede {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
}

/* ---------- Post list (index/archive) ---------- */
.post-list { padding: 2.5rem 0 4rem; }
.post-list__item {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--hairline);
}
.post-list__item:last-child { border-bottom: none; }
.post-list__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.post-list__category {
  color: var(--blue-dark);
  text-decoration: none;
}
.post-list__category:hover { color: var(--navy); }
.post-list__dot { color: var(--hairline-2); }
.post-list__title {
  font-family: var(--display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.65rem;
  letter-spacing: -0.01em;
}
.post-list__title a {
  color: var(--navy);
  text-decoration: none;
}
.post-list__title a:hover { color: var(--blue-dark); }
.post-list__excerpt {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1rem;
  max-width: 680px;
}
.post-list__read {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue-dark);
  text-decoration: none;
}
.post-list__read:hover { color: var(--navy); }

/* ---------- Single post (article view) ---------- */
.article {
  padding: 3rem 0 4rem;
}
.article__header {
  margin-bottom: 2rem;
  text-align: left;
}
.article__breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.article__breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.article__breadcrumb a:hover { color: var(--blue-dark); }
.article__category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-dark);
  text-decoration: none;
  margin-bottom: 1rem;
  display: inline-block;
}
.article__title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.2vw, 2.875rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0.5rem 0 1.25rem;
}
.article__lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 660px;
}
.article__byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.article__byline strong { color: var(--text); font-weight: 600; }
.article__byline-dot { color: var(--hairline-2); }
.article__featured {
  margin: 2rem 0;
}
.article__featured img { display: block; width: 100%; height: auto; border-radius: 4px; }

/* ---------- Article body content ---------- */
.article__body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}
.article__body > * + * { margin-top: 1.1em; }
.article__body p {
  margin: 0;
}
.article__body p + p { margin-top: 1.1em; }
.article__body h2 {
  font-family: var(--display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 2.25rem 0 0.75rem;
}
.article__body h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.75rem 0 0.5rem;
}
.article__body h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 1.5rem 0 0.5rem;
}
.article__body a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article__body a:hover { color: var(--navy); }
.article__body ul, .article__body ol {
  padding-left: 1.5rem;
  margin: 0;
}
.article__body ul li, .article__body ol li { margin: 0.35em 0; }
.article__body blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--blue);
  color: var(--text-strong);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.55;
}
.article__body blockquote p { margin: 0.5em 0; }
.article__body code {
  font-family: 'Menlo', 'SF Mono', Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
  background: var(--bg-card);
  padding: 0.12em 0.4em;
  border-radius: 3px;
}
.article__body pre {
  background: var(--navy);
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}
.article__body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.article__body figure {
  margin: 2rem 0;
}
.article__body figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.5;
}
.article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.article__body th, .article__body td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}
.article__body th {
  background: var(--bg-soft);
  color: var(--navy);
  font-weight: 700;
}

/* ---------- Article footer (tags, share) ---------- */
.article__footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
.article__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.article__tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
}
.article__tag:hover { background: var(--blue-soft); color: var(--blue-dark); }

/* ---------- Adjacent post nav ---------- */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
}
.article-nav__link {
  display: block;
  padding: 1rem 1.15rem;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.article-nav__link:hover { border-color: var(--blue); }
.article-nav__link--next { text-align: right; }
.article-nav__dir {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.article-nav__title {
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}
@media (max-width: 600px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__link--next { text-align: left; }
}

/* ---------- Search ---------- */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--hairline-2);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: var(--sans);
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.search-form button {
  padding: 0.65rem 1.2rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
}
.search-form button:hover { background: var(--blue-dark); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0 1rem;
}
.pagination a, .pagination span {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.pagination a:hover { border-color: var(--blue); color: var(--blue-dark); }
.pagination .current {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0 1.75rem;
  margin-top: 4rem;
}
.site-footer__inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.site-footer__brand strong { color: var(--navy); }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
}
.site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer__links a:hover { color: var(--blue-dark); }
.site-footer__copy {
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- 404 / not found ---------- */
.error-404 {
  padding: 5rem 0;
  text-align: center;
}
.error-404__code {
  font-family: var(--display);
  font-size: 5rem;
  font-weight: 800;
  color: var(--blue);
  margin: 0;
  line-height: 1;
}
.error-404__title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0.75rem 0;
}
.error-404__text {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.65rem 1rem;
  text-decoration: none;
  font-size: 0.875rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- WP-specific classes ---------- */
.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}
.screen-reader-text { position: absolute; left: -9999px; }
.sticky { /* WP requires this class to exist */ }
.gallery-caption { /* WP requires this class to exist */ }
.bypostauthor { /* WP requires this class to exist */ }
