/*
Theme Name: BiosStore
Theme URI: https://biosstore.in
Author: BiosStore
Author URI: https://biosstore.in
Description: A simple, fast, SEO-friendly blog theme for BiosStore. Clean dark tech design with blue accents, built for easy daily posting and readability.
Version: 1.2
Requires at least: 5.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: biosstore
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root{
  --bg: #f7f9fb;
  --bg-alt: #eef2f6;
  --card: #ffffff;
  --border: #dfe6ec;
  --blue: #1287e8;
  --blue-dim: #8fc4f0;
  --white: #14202b;
  --muted: #66757f;
  --radius: 10px;
  --maxw: 1080px;
}

/* Dark theme — applied only when the visitor opts in via the toggle. Light stays the default. */
html.dark-theme {
  --bg: #0b131f;
  --bg-alt: #121d2c;
  --card: #16212f;
  --border: #263344;
  --blue: #2f9dee;
  --blue-dim: #4a7196;
  --white: #eaf1f8;
  --muted: #8ea0b3;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(18,135,232,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,135,232,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { color: var(--white); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  color: var(--white);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 1.4em 0 0.5em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }

code, pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
}
code { padding: 0.1em 0.4em; font-size: 0.9em; }
pre { padding: 1em; overflow-x: auto; }
pre code { border: none; padding: 0; }

blockquote {
  border-left: 3px solid var(--blue);
  margin: 1.5em 0;
  padding: 0.2em 1.2em;
  color: var(--muted);
  font-style: italic;
}

hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
th, td { border: 1px solid var(--border); padding: 0.6em 0.8em; text-align: left; }
th { background: var(--bg-alt); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #000;
  padding: 0.6em 1em;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   2. Layout
   ========================================================================== */

.site-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header ---- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(247,249,251,0.9);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
  flex-wrap: wrap;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-branding img.custom-logo {
  height: 44px;
  width: auto;
  border-radius: 6px;
}

.homepage-banner {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.homepage-banner img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.site-title a { color: var(--white); text-decoration: none; }
.site-title a:hover { color: var(--blue); text-decoration: none; }
.site-title .accent { color: var(--blue); }

.site-description {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Nav ---- */

.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-navigation a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--white);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--blue);
  background: var(--bg-alt);
  text-decoration: none;
}
.main-navigation ul ul { display: none; }

.menu-toggle {
  display: none;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--blue-dim); color: var(--blue); }

.theme-toggle .icon-moon { display: none; }
html.dark-theme .theme-toggle .icon-sun { display: none; }
html.dark-theme .theme-toggle .icon-moon { display: block; }

/* ---- Main content grid ---- */

.content-area {
  padding: 40px 0 60px;
}

.site-content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.has-no-sidebar .site-content-grid { grid-template-columns: 1fr; }

/* ---- Post cards / list ---- */

.post-list { display: flex; flex-direction: column; gap: 26px; }

article.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(20,32,43,0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
article.post-card:hover { border-color: var(--blue-dim); box-shadow: 0 4px 14px rgba(20,32,43,0.09); }

article.post-card { display: flex; flex-direction: row; align-items: stretch; }

.post-card .post-thumb {
  display: block;
  flex: 0 0 150px;
  width: 150px;
  overflow: hidden;
  background: var(--bg-alt);
}
.post-card .post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card-body { padding: 16px 20px; flex: 1; min-width: 0; }

.post-card .entry-title { margin: 0 0 6px; font-size: 1.2rem; }
.post-card .entry-title a { color: var(--white); text-decoration: none; }
.post-card .entry-title a:hover { color: var(--blue); }

.entry-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--blue); }

.entry-summary p { margin-bottom: 0.8em; color: #3c4a56; }

.read-more {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 1px solid var(--blue-dim);
}
.read-more:hover { border-color: var(--blue); text-decoration: none; }

/* ---- Single post ---- */

.single-post-header { margin-bottom: 20px; }
.single .entry-title { font-size: 2rem; }
.post-thumbnail-single {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 20px 0 30px;
}
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: 8px; margin: 1.2em 0; }

.entry-tags {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.entry-tags a {
  display: inline-block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  margin: 0 6px 6px 0;
  color: var(--muted);
}
.entry-tags a:hover { color: var(--blue); border-color: var(--blue-dim); text-decoration: none; }

.author-box {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center;
}
.author-box img { border-radius: 50%; width: 56px; height: 56px; }

/* ---- Pagination ---- */

.pagination-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.pagination-nav a, .pagination-nav span {
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--white);
  font-weight: 600;
}
.pagination-nav a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

.page-numbers {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
  flex-wrap: wrap;
}
.page-numbers li a, .page-numbers li span {
  display: inline-block;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--white);
}
.page-numbers li span.current { background: var(--blue); color: #ffffff; border-color: var(--blue); }
.page-numbers li a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* ---- Sidebar ---- */

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.widget-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 0.92rem; }
.widget ul li:last-child { border-bottom: none; }
.widget a { color: #3c4a56; }
.widget a:hover { color: var(--blue); }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--white);
  font-size: 0.95rem;
}
.search-form button {
  background: var(--blue);
  border: none;
  border-radius: 6px;
  padding: 0 16px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}
.search-form button:hover { background: var(--white); }

/* ---- Comments ---- */

.comments-area { margin-top: 50px; }
.comment-list { list-style: none; padding: 0; margin: 20px 0; }
.comment-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.comment-form input, .comment-form textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--white);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-family: inherit;
  font-size: 0.95rem;
}
.comment-form textarea { min-height: 120px; }
.comment-form input[type="submit"] {
  width: auto;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
}
.comment-form input[type="submit"]:hover { background: var(--white); }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}
.footer-bottom .accent { color: var(--blue); }

/* ---- Brand footer bar ---- */

.footer-bar {
  background: linear-gradient(90deg, #000000 0%, #0c1522 45%, var(--blue) 100%);
  color: #ffffff;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.footer-bar .dot { color: var(--blue-dim); margin: 0 10px; }

/* ---- 404 / empty ---- */

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

/* ---- Alignments (WP core) ---- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: 0.85rem; text-align: center; }

/* ==========================================================================
   3. Responsive
   ========================================================================== */

@media (max-width: 600px) {
  article.post-card { flex-direction: column; }
  .post-card .post-thumb { width: 100%; flex-basis: auto; aspect-ratio: 16/9; }
}

@media (max-width: 800px) {
  .site-content-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-block; }
  .main-navigation { display: none; width: 100%; }
  .main-navigation.toggled { display: block; }
  .main-navigation ul { flex-direction: column; gap: 2px; }
  .header-inner { flex-direction: row; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .site-title { font-size: 1.25rem; }
  h1 { font-size: 1.6rem; }
  .post-card-body { padding: 16px 18px 20px; }
}
