/*
Theme Name: Ghostcrows
Theme URI: https://ghostcrows.com
Author: Ghostcrows
Description: A dark, metal-inspired theme for a single-author writing and code blog. Built to work with the free version of Elementor. Menu: Writings, Code, Meet Me.
Version: 1.0.5
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ghostcrows
*/

:root {
  color-scheme: dark;
  --gc-bg: #0b0b0d;
  --gc-panel: #141417;
  --gc-line: #3a3a3f;
  --gc-line-soft: #2a2a2f;
  --gc-bone: #e6dcc3;
  --gc-white: #f6f1e4;
  --gc-muted: #a8a290;
  --gc-dim: #8a8578;
  --gc-red: #c1121f;
  --gc-red-dark: #7a0c14;
  --gc-head: 'Grenze Gotisch', Georgia, serif;
  --gc-logo: 'Metal Mania', Georgia, serif;
  --gc-mono: 'Share Tech Mono', ui-monospace, Menlo, Consolas, monospace;
  --gc-body: Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { background: #0b0b0d; }
body {
  margin: 0;
  background: #0b0b0d;
  background: var(--gc-bg);
  color: #e6dcc3;
  color: var(--gc-bone);
  font-family: Georgia, 'Times New Roman', serif;
  font-family: var(--gc-body);
  font-size: 18px;
  line-height: 1.8;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--gc-bone); text-decoration-color: var(--gc-red); text-underline-offset: 3px; }
a:hover { color: var(--gc-white); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gc-red); outline-offset: 2px; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 99; background: var(--gc-bone); color: var(--gc-bg); padding: 8px 12px; }

h1, h2, h3, h4 { font-family: var(--gc-head); font-weight: 600; line-height: 1.15; color: var(--gc-bone); margin: 0 0 0.5em; }
h1 { font-size: 2.6rem; } h2 { font-size: 2rem; } h3 { font-size: 1.5rem; }

/* Header */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--gc-line-soft); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 30px; }
.wordmark { font-family: var(--gc-logo); font-size: 1.1rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gc-bone); }
.main-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { font-family: var(--gc-head); font-weight: 600; font-size: 1rem; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; color: var(--gc-muted); padding-bottom: 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--gc-white); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-menu-ancestor > a { color: var(--gc-bone); border-bottom-color: var(--gc-red); }

/* Layout */
.site-main { padding: 0 24px; }
.wrap { max-width: 1000px; margin: 0 auto; }
.reading { max-width: 640px; margin: 0 auto; }

/* Hero */
.hero { text-align: center; padding: 40px 0 16px; }
.hero-wordmark { font-family: var(--gc-logo); font-weight: 400; font-size: clamp(2.6rem, 9vw, 5.4rem); letter-spacing: 3px; line-height: 1; text-transform: uppercase; color: var(--gc-bone); text-shadow: 4px 4px 0 var(--gc-red-dark); margin: 0; }
.hero-tagline { font-family: var(--gc-mono); font-size: 0.8rem; letter-spacing: 3px; color: var(--gc-muted); margin: 14px 0 0; text-transform: uppercase; }

.crow-row { height: 38px; background: url('assets/crows.svg') repeat-x center; opacity: 0.8; margin: 12px 0; }
.smoke { height: 44px; background: url('assets/smoke.svg') center / 100% 100% no-repeat; }

/* Panels */
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 10px 0 16px; }
.panel { border: 1px solid var(--gc-line); padding: 16px; }
.panel-label { font-family: var(--gc-mono); font-size: 0.75rem; letter-spacing: 3px; color: var(--gc-red); text-transform: uppercase; border-bottom: 1px solid var(--gc-line); padding-bottom: 6px; margin: 0 0 10px; }
.panel-more { display: inline-block; margin-top: 8px; font-family: var(--gc-mono); font-size: 0.75rem; letter-spacing: 2px; color: var(--gc-red); text-decoration: none; text-transform: uppercase; }
.panel-more:hover { color: var(--gc-white); }
.row { padding: 8px 0; border-bottom: 1px dotted #5a5850; }
.row:last-of-type { border-bottom: 0; }
.row-title { font-family: var(--gc-head); font-weight: 600; font-size: 1.3rem; line-height: 1.2; margin: 0; }
.row-title a { text-decoration: none; }
.row-excerpt { font-size: 0.85rem; line-height: 1.5; color: var(--gc-muted); margin: 3px 0 0; }
.row-meta { font-family: var(--gc-mono); font-size: 0.72rem; letter-spacing: 1px; color: var(--gc-dim); margin-top: 2px; }

.meet { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center; border: 1px solid var(--gc-line); padding: 16px; margin: 0 0 16px; }
.meet img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.meet h2 { font-size: 1.5rem; margin: 4px 0; }
.meet p { font-size: 0.9rem; line-height: 1.6; color: var(--gc-muted); margin: 0; }

/* Post list (Writings page, archives) */
.page-head { text-align: center; padding: 32px 0 8px; }
.page-head .kicker, .entry-kicker { font-family: var(--gc-mono); font-size: 0.75rem; letter-spacing: 3px; color: var(--gc-red); text-transform: uppercase; }
.list { max-width: 720px; margin: 0 auto; padding: 8px 0 24px; }
.list .row { padding: 18px 0; }
.list .row-title { font-size: 1.8rem; }
.list .row-excerpt { font-size: 1rem; line-height: 1.6; margin-top: 6px; }

/* Single post / page */
.entry-header { text-align: center; padding: 34px 0 6px; }
.entry-title { font-size: clamp(2rem, 6vw, 3rem); margin: 8px 0 10px; }
.entry-meta { font-family: var(--gc-mono); font-size: 0.78rem; letter-spacing: 1px; color: var(--gc-dim); }
.entry-rule { width: 80px; height: 3px; background: var(--gc-red); margin: 16px auto 0; }
.entry-content { padding: 22px 0 8px; }
.entry-content > p:first-of-type::first-letter { float: left; font-family: var(--gc-logo); font-size: 4rem; line-height: 0.85; padding: 6px 10px 0 0; color: var(--gc-red); }
.entry-content p { margin: 0 0 1.1em; }
.entry-content blockquote { border-left: 3px solid var(--gc-red); border-radius: 0; margin: 1.4em 0; padding: 4px 0 4px 18px; font-size: 1.35rem; line-height: 1.5; font-style: italic; color: var(--gc-white); }
.entry-content blockquote p { margin: 0; }
.entry-content pre, .entry-content code { font-family: var(--gc-mono); font-size: 0.85rem; }
.entry-content pre { background: var(--gc-panel); border: 1px solid var(--gc-line-soft); padding: 14px 16px; overflow-x: auto; line-height: 1.7; }
.entry-content :not(pre) > code { background: var(--gc-panel); padding: 2px 6px; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content hr { border: 0; height: 38px; background: url('assets/crows.svg') repeat-x center; opacity: 0.8; margin: 1.6em 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 10px 0 24px; }
.post-nav a { display: block; border: 1px solid var(--gc-line); padding: 12px 14px; text-decoration: none; }
.post-nav .next { text-align: right; }
.post-nav small { display: block; font-family: var(--gc-mono); font-size: 0.7rem; letter-spacing: 2px; color: var(--gc-red); text-transform: uppercase; }
.post-nav span { font-family: var(--gc-head); font-weight: 600; font-size: 1.2rem; line-height: 1.2; }

/* Buttons */
.button, .wp-block-button__link, input[type='submit'] { display: inline-block; font-family: var(--gc-mono); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; color: var(--gc-bone); background: transparent; border: 1px solid var(--gc-red); padding: 8px 16px; cursor: pointer; border-radius: 0; }
.button:hover, .wp-block-button__link:hover, input[type='submit']:hover { background: var(--gc-red); color: var(--gc-white); }

/* Code projects page */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 12px 0 24px; }
.project { border: 1px solid var(--gc-line); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.project .row-title { font-size: 1.5rem; }
.project .row-excerpt { font-size: 0.95rem; flex: 1; }
.sample-code { background: var(--gc-panel); border: 1px solid var(--gc-line-soft); padding: 12px 14px; font-family: var(--gc-mono); font-size: 0.78rem; line-height: 1.7; overflow-x: auto; white-space: pre; margin: 0; }
.sample-code .k { color: var(--gc-red); }

/* Pagination, comments, forms */
.pagination { text-align: center; padding: 8px 0 28px; font-family: var(--gc-mono); font-size: 0.8rem; letter-spacing: 2px; }
.pagination .page-numbers { padding: 4px 10px; text-decoration: none; border: 1px solid transparent; }
.pagination .current { border-color: var(--gc-red); }
.comments-area { max-width: 640px; margin: 0 auto; padding: 8px 0 28px; }
.comments-area ol { list-style: none; padding: 0; }
.comments-area .comment-body { border-top: 1px solid var(--gc-line-soft); padding: 14px 0; font-size: 0.95rem; }
input[type='text'], input[type='email'], input[type='url'], input[type='search'], textarea { width: 100%; background: var(--gc-panel); color: var(--gc-bone); border: 1px solid var(--gc-line); padding: 10px 12px; font-family: var(--gc-body); font-size: 1rem; border-radius: 0; }

/* Footer */
.site-footer { text-align: center; padding: 0 24px 28px; }
.site-footer p { font-family: var(--gc-mono); font-size: 0.72rem; letter-spacing: 2px; color: var(--gc-dim); text-transform: uppercase; margin: 8px 0 0; }

/* Mobile */
@media (max-width: 680px) {
  body { font-size: 17px; }
  .site-header { justify-content: center; }
  .panels, .projects { grid-template-columns: minmax(0, 1fr); }
  .meet { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Safety net: keep text light and the menu clean even if a plugin or builder sets its own colors */
html body { background-color: #0b0b0d; color: #e6dcc3; }
html body p, html body li, html body td, html body span, html body div { color: inherit; }
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6 { color: #e6dcc3; }
html body a { color: #e6dcc3; }
html body .main-nav ul { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0; padding: 0; }
html body .main-nav li { list-style: none; margin: 0; padding: 0; display: block; }
html body .main-nav a { color: #a8a290; text-decoration: none; }
html body .main-nav .current-menu-item > a, html body .main-nav .current_page_item > a { color: #e6dcc3; border-bottom-color: #c1121f; }
html body .row-excerpt, html body .hero-tagline, html body .meet p { color: #a8a290; }
html body .panel-label, html body .panel-more, html body .entry-kicker, html body .kicker { color: #c1121f; }
html body .wordmark, html body .hero-wordmark { color: #e6dcc3; }
html body .button, html body .button:hover { text-decoration: none; }

/* Elementor on a dark theme: Elementor's default palette is dark grey and black, which disappears on this
   background. Re-point Elementor's global colors to the Ghostcrows palette. Anything you set yourself in
   Elementor (Site Settings or a widget's own color) still wins. */
body[class*="elementor-kit-"] {
  --e-global-color-primary: #e6dcc3;
  --e-global-color-secondary: #a8a290;
  --e-global-color-text: #e6dcc3;
  --e-global-color-accent: #c1121f;
}
body .elementor-widget-text-editor,
body .elementor-widget-text-editor p,
body .elementor-widget-icon-list .elementor-icon-list-text,
body .elementor-widget-image-box .elementor-image-box-description { color: #e6dcc3; }
body .elementor-widget-heading .elementor-heading-title { color: #e6dcc3; }
body .elementor-widget-button .elementor-button { color: #e6dcc3; background-color: transparent; border: 1px solid #c1121f; border-radius: 0; }
body .elementor-widget-button .elementor-button:hover { background-color: #c1121f; color: #f6f1e4; }
body .elementor-section, body .e-con { background-color: transparent; }
