/*
Theme Name: Astra Child
Theme URI: https://www.unixshadow.com/
Description: Child theme for Astra — dark magazine revamp (Oct 2026). Carries the site's custom design so Astra updates never overwrite it. The previous Additional CSS (post 983) was migrated here and dark-adapted; the original post is left untouched in the database.
Author: unixshadow
Template: astra
Version: 1.0.2
*/

/* ========== Dark magazine revamp (Oct 2026) ========== */
/* v1.0.1: Astra's layout rules and dynamic CSS outrank plain selectors
   (dynamic CSS prints after this stylesheet), so contested properties use
   layout-qualified selectors and, where Astra re-asserts the same property,
   !important. Deliberately NOT applied to buttons or the LinkedIn badge,
   which keep their own styling. */

/* Base: near-black page, light text */
body {
  background-color: #0f1115;
  color: #d1d5db;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
/* Beats Astra dynamic: .ast-separate-container { background-color: ... } */
body.ast-separate-container { background-color: #0f1115 !important; }
button, input, select, textarea { font-family: inherit; }
#primary, .site-content, .ast-container { background-color: transparent; }
body .ast-container { background-color: transparent !important; }
h1, h2, h3, h4, h5, h6,
.entry-title, .site-title {
  color: #f9fafb;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 { color: #f9fafb !important; }
a, .entry-content a { color: #7df9ff; }
a:hover, a:focus, .entry-content a:hover { color: #a5f3fc; }
.entry-content a:not(.ast-button):not(.wp-block-button__link) { color: #7df9ff !important; }
.entry-content a:not(.ast-button):not(.wp-block-button__link):hover { color: #a5f3fc !important; }
.cat-links a, .tags-links a { color: #7df9ff !important; }
body::selection { background: #7df9ff !important; color: #0f1115 !important; }

/* Header (migrated from previous custom CSS, dark-adapted) */
.site-header .custom-logo { max-height: 52px; width: auto; }
/* Logo artwork is dark (black wordmark, made for a light header). Flip its
   luminance for the dark header; hue-rotate keeps the blue glow blue.
   Original file untouched — remove this if a light logo is ever uploaded. */
.custom-logo { filter: invert(1) hue-rotate(180deg); }
.site-header .site-title { display: none; }
#masthead {
  position: sticky; top: 0; z-index: 99;
  background: #111827 !important;
  box-shadow: 0 2px 14px rgba(0,0,0,.5);
}
/* The bar inside the header paints its own white over #masthead — kill it. */
#masthead .main-header-bar {
  background-color: #111827 !important;
  border-bottom-color: #2a2f3a !important;
}
.site-header { background-color: #111827 !important; }
#masthead::before {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, #7df9ff, #4a7dff);
}
body.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { body.admin-bar #masthead { top: 46px; } }

/* Nav links (migrated animation; colors adapted for dark) */
.main-header-menu > .menu-item > .menu-link {
  position: relative; font-weight: 600; letter-spacing: .015em;
  color: #e5e7eb !important; transition: color .2s ease;
}
.main-header-menu > .menu-item > .menu-link:hover { color: #7df9ff !important; }
.main-header-menu > .menu-item > .menu-link::after {
  content: ""; position: absolute; left: 1em; right: 1em; bottom: .55em;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #7df9ff, #4a7dff);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.main-header-menu > .menu-item > .menu-link:hover::after,
.main-header-menu > .menu-item.current-menu-item > .menu-link::after { transform: scaleX(1); }
.main-header-menu > .menu-item.current-menu-item > .menu-link { color: #7df9ff !important; }

/* Post meta (migrated: date only, no author) */
.entry-meta .posted-by { display: none; }
.entry-meta { font-size: 0; }
.entry-meta .posted-on { font-size: 15px; }
/* Beats Astra dynamic: .entry-meta, .entry-meta * { color: ... } */
.entry-meta, .entry-meta *, .entry-meta a, .posted-on a { color: #9ca3af !important; }
.entry-meta a:hover { color: #7df9ff !important; }

/* Blog listing: magazine cards.
   Beats Astra: .ast-separate-container .ast-article-post { background: #fff }
   and dynamic: .ast-blog-layout-4-grid .ast-article-post { background: transparent } */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single {
  background-color: #1a1d23 !important;
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}
/* Inner wrappers, in case one of them carries the white instead of the article. */
.ast-article-post .post-content,
.ast-article-post .entry-header, .ast-article-post .entry-content,
.ast-article-single .entry-header, .ast-article-single .entry-content {
  background-color: #1a1d23 !important;
}
.ast-article-post .post-thumb img { width: 100%; height: auto; display: block; }
.ast-article-post .entry-header,
.ast-article-post .entry-content { padding-left: 1.5rem; padding-right: 1.5rem; }
.entry-title { font-size: 1.9rem; }
.entry-title a { color: #f9fafb !important; }
.entry-title a:hover { color: #7df9ff !important; }
.read-more a { color: #7df9ff !important; font-weight: 700; }

/* Single posts */
.single .entry-title { font-size: 2.4rem; }
.single .entry-content { font-size: 17.5px; }
/* Code blocks (regular posts). Under the Hood terminal blocks use divs, not pre,
   so they are untouched by this rule and keep their own styling. */
body .entry-content pre, body pre.wp-block-code, body pre.wp-block-preformatted {
  background: #1a1d23; color: #e5e7eb;
  border: 1px solid #2a2f3a; border-radius: 8px;
  padding: 1rem; overflow: auto;
}

/* Footer: darker anchor with gradient top border */
.site-footer, #colophon {
  background: #0b0d10 !important; color: #9ca3af;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #7df9ff, #4a7dff) 1;
}
.site-footer a, #colophon a { color: #d1d5db !important; }
.site-footer a:hover, #colophon a:hover { color: #7df9ff !important; }

/* Buttons + inputs (body-qualified to outrank Astra dynamic button rules) */
body .ast-button, body button, body .button, body input[type="submit"], body input[type="button"] {
  background: linear-gradient(90deg, #4a7dff, #7df9ff);
  border: none; color: #0f1115; font-weight: 700; border-radius: 8px;
}
body .ast-button:hover, body button:hover, body .button:hover,
body input[type="submit"]:hover, body input[type="button"]:hover { filter: brightness(1.1); }
body input[type="text"], body input[type="email"], body input[type="search"], body textarea {
  background: #1f2937; border: 1px solid #374151; color: #e5e7eb; border-radius: 8px;
}

/* Mobile */
@media (max-width: 768px) {
  .entry-title { font-size: 1.5rem; }
  .single .entry-title { font-size: 1.9rem; }
  .ast-article-post .entry-header,
  .ast-article-post .entry-content { padding-left: 1rem; padding-right: 1rem; }
}
