/*
Theme Name: Goosos
Theme URI: https://goosos.com/
Author: Goosos
Author URI: https://goosos.com/
Description: Dark terminal-style child theme for Goosos — Quantitative Trading Lab. Requires GeneratePress.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: generatepress
Text Domain: goosos
*/

/* ============ 1. Design tokens ============ */
:root {
  --goosos-bg: #0a0d12;
  --goosos-surface: #10151d;
  --goosos-surface-2: #161d27;
  --goosos-border: #1f2833;
  --goosos-green: #00e676;
  --goosos-green-dim: #00b35c;
  --goosos-amber: #ffb300;
  --goosos-red: #ff5252;
  --goosos-text: #dbe2ec;
  --goosos-muted: #8b95a5;
  --goosos-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ============ 2. Base ============ */
body {
  background-color: var(--goosos-bg);
  color: var(--goosos-text);
}

a { color: var(--goosos-green); }
a:hover { color: var(--goosos-amber); }

::selection { background: var(--goosos-green); color: #06130c; }

/* ============ 3. Header / nav ============ */
.site-header {
  background-color: rgba(10, 13, 18, 0.92);
  border-bottom: 1px solid var(--goosos-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Terminal-style text logo: "goosos" + blinking cursor */
.site-branding .main-title a {
  font-family: var(--goosos-mono);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--goosos-text);
  text-decoration: none;
}
.site-branding .main-title a::after {
  content: "_";
  color: var(--goosos-green);
  animation: goosos-blink 1.1s steps(1) infinite;
}
@keyframes goosos-blink { 50% { opacity: 0; } }

.site-description {
  font-family: var(--goosos-mono);
  font-size: 12px;
  color: var(--goosos-muted);
}

.main-navigation .main-nav ul li a {
  font-family: var(--goosos-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--goosos-muted);
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul .current-menu-item > a {
  color: var(--goosos-green);
}

/* ============ 4. Ticker top bar ============ */
.goosos-ticker {
  background: #000;
  border-bottom: 1px solid var(--goosos-border);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--goosos-mono);
  font-size: 11px;
  line-height: 28px;
  color: var(--goosos-muted);
}
.goosos-ticker span { display: inline-block; padding-left: 100%; animation: goosos-tick 30s linear infinite; }
.goosos-ticker b { color: var(--goosos-green); font-weight: 400; }
.goosos-ticker i { color: var(--goosos-amber); font-style: normal; }
@keyframes goosos-tick { to { transform: translateX(-100%); } }

/* ============ 5. Hero (fake terminal window) ============ */
.goosos-hero {
  background: var(--goosos-surface);
  border: 1px solid var(--goosos-border);
  border-radius: 10px;
  overflow: hidden;
  margin: 2rem 0;
}
.goosos-hero-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px;
  background: var(--goosos-surface-2);
  border-bottom: 1px solid var(--goosos-border);
}
.goosos-hero-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.goosos-hero-bar i:nth-child(1) { background: var(--goosos-red); }
.goosos-hero-bar i:nth-child(2) { background: var(--goosos-amber); }
.goosos-hero-bar i:nth-child(3) { background: var(--goosos-green); }
.goosos-hero-body {
  padding: 22px;
  font-family: var(--goosos-mono);
  font-size: 15px;
  line-height: 1.9;
}
.goosos-hero-body .p { color: var(--goosos-green); }
.goosos-hero-body .c { color: var(--goosos-muted); }
.goosos-hero-body .w { color: var(--goosos-text); }
.goosos-hero-body .a { color: var(--goosos-amber); }
/* Typewriter cursor on last line */
.goosos-hero-body > div:last-child::after {
  content: "▋";
  color: var(--goosos-green);
  animation: goosos-blink 1s step-end infinite;
  margin-left: 2px;
}

/* ============ 6. Section cards (Tutorials / Methodology / Tools) ============ */
.goosos-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 2rem 0; }
.goosos-card {
  background: var(--goosos-surface);
  border: 1px solid var(--goosos-border);
  border-radius: 8px;
  padding: 22px;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
  display: block;
}
.goosos-card:hover {
  border-color: var(--goosos-green);
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px var(--goosos-green), 0 8px 24px rgba(0, 255, 136, .12);
}
.goosos-card h3 { font-family: var(--goosos-mono); font-size: 17px; color: var(--goosos-text); margin: 0 0 8px; }
.goosos-card h3::before { content: "> "; color: var(--goosos-green); }
.goosos-card p { color: var(--goosos-muted); font-size: 14px; margin: 0; }
.goosos-card .tag {
  display: inline-block; margin-top: 12px;
  font-family: var(--goosos-mono); font-size: 11px;
  color: var(--goosos-amber); border: 1px solid var(--goosos-amber);
  border-radius: 4px; padding: 2px 8px;
}

/* ============ 7. Article typography ============ */
.single .inside-article {
  background-color: var(--goosos-surface);
  border: 1px solid var(--goosos-border);
  border-radius: 8px;
  padding: 2rem;
}
.entry-content h2 {
  font-family: var(--goosos-mono);
  font-size: 1.35rem;
  color: var(--goosos-text);
  border-left: 3px solid var(--goosos-green);
  padding-left: 12px;
  margin-top: 2.2em;
}
.entry-content h3 { color: var(--goosos-amber); font-size: 1.1rem; }

.entry-content p, .entry-content li { color: #c3ccd8; line-height: 1.85; }

/* Code: terminal look */
.entry-content code {
  font-family: var(--goosos-mono);
  font-size: 0.88em;
  background: #000;
  color: var(--goosos-green);
  border: 1px solid var(--goosos-border);
  border-radius: 4px;
  padding: 1px 6px;
}
.entry-content pre {
  background: #000;
  border: 1px solid var(--goosos-border);
  border-left: 3px solid var(--goosos-green);
  border-radius: 6px;
  padding: 18px;
  overflow-x: auto;
}
.entry-content pre code {
  background: none; border: none; padding: 0;
  color: #c3ccd8; font-size: 13.5px; line-height: 1.7;
}

/* Tables */
.entry-content table { border-collapse: collapse; width: 100%; font-size: 14px; }
.entry-content th {
  font-family: var(--goosos-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--goosos-amber); text-align: left;
  border-bottom: 1px solid var(--goosos-border); padding: 10px;
}
.entry-content td { border-bottom: 1px solid var(--goosos-border); padding: 10px; color: #c3ccd8; }
.entry-content tbody tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.entry-content tbody tr:hover td { background: var(--goosos-surface); }

/* Blockquotes: amber callouts */
.entry-content blockquote {
  border-left: 3px solid var(--goosos-amber);
  background: var(--goosos-surface);
  padding: 14px 18px;
  color: var(--goosos-text);
  font-style: normal;
  border-radius: 0 6px 6px 0;
}

/* ============ 8. TOC ============ */
.goosos-toc {
  background: var(--goosos-surface);
  border: 1px solid var(--goosos-border);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 1.5rem 0;
  font-size: 14px;
}
.goosos-toc > strong {
  font-family: var(--goosos-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--goosos-green);
  display: block; margin-bottom: 10px;
}
.goosos-toc ul { margin: 0; padding-left: 20px; list-style: none; }
.goosos-toc li { margin: 6px 0; }
.goosos-toc a { color: var(--goosos-muted); text-decoration: none; }
.goosos-toc a:hover { color: var(--goosos-green); }

/* ============ 9. Author box + risk disclaimer ============ */
.goosos-author {
  display: flex; gap: 18px;
  background: var(--goosos-surface);
  border: 1px solid var(--goosos-border);
  border-radius: 8px;
  padding: 22px;
  margin: 2.5rem 0 1rem;
}
.goosos-author img { border-radius: 50%; border: 2px solid var(--goosos-green); width: 72px; height: 72px; }
.goosos-author .who { font-family: var(--goosos-mono); font-size: 13px; color: var(--goosos-green); text-transform: uppercase; letter-spacing: 1px; }
.goosos-author .name { font-size: 18px; font-weight: 700; color: var(--goosos-text); margin: 4px 0; }
.goosos-author .bio { color: var(--goosos-muted); font-size: 14px; margin: 0; }

.goosos-disclaimer {
  font-family: var(--goosos-mono);
  font-size: 12px;
  color: var(--goosos-muted);
  border: 1px dashed var(--goosos-border);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 2rem;
}
.goosos-disclaimer::before { content: "⚠ "; color: var(--goosos-amber); }

/* ============ 10. Tool page template ============ */
.page-template-template-tool .site-content { background: var(--goosos-bg); }
.goosos-tool-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}
.goosos-tool-wrap h1.entry-title {
  font-family: var(--goosos-mono);
  font-size: 1.6rem;
}
.goosos-tool {
  background: var(--goosos-surface);
  border: 1px solid var(--goosos-border);
  border-radius: 10px;
  padding: 28px;
  margin: 1.5rem 0;
}
.goosos-tool label {
  display: block; font-family: var(--goosos-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--goosos-muted); margin: 14px 0 6px;
}
.goosos-tool input[type="number"], .goosos-tool input[type="text"], .goosos-tool select {
  width: 100%;
  background: #000;
  border: 1px solid var(--goosos-border);
  border-radius: 6px;
  color: var(--goosos-green);
  font-family: var(--goosos-mono);
  font-size: 16px;
  padding: 10px 12px;
}
.goosos-tool input:focus { outline: none; border-color: var(--goosos-green); }
.goosos-tool button, .goosos-tool input[type="submit"] {
  background: var(--goosos-green);
  color: #06130c;
  border: none; border-radius: 6px;
  font-family: var(--goosos-mono); font-weight: 700; font-size: 14px;
  padding: 12px 28px; margin-top: 18px; cursor: pointer;
}
.goosos-tool button:hover { background: var(--goosos-amber); }
.goosos-result {
  margin-top: 20px; padding: 18px;
  background: #000; border: 1px solid var(--goosos-green); border-radius: 6px;
  font-family: var(--goosos-mono); font-size: 15px; color: var(--goosos-text);
  display: none;
}
.goosos-result.show { display: block; }
.goosos-result b { color: var(--goosos-green); font-weight: 700; font-size: 1.3em; }

/* ============ 11. Footer ============ */
.site-footer {
  background: #000;
  border-top: 1px solid var(--goosos-border);
}
.site-footer, .site-footer a { color: var(--goosos-muted); font-size: 13px; }
.site-footer a:hover { color: var(--goosos-green); }
.site-info { font-family: var(--goosos-mono); font-size: 12px; }

/* Three-column footer */
.goosos-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 12px;
}
.goosos-footer-grid h4 {
  font-family: var(--goosos-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--goosos-green);
  margin: 0 0 12px;
}
.goosos-footer-grid p { font-size: 13px; color: var(--goosos-muted); margin: 0; line-height: 1.7; }
.goosos-footer-grid ul { list-style: none; margin: 0; padding: 0; }
.goosos-footer-grid li { margin-bottom: 8px; }
.goosos-footer-grid a { font-size: 13px; }
@media (max-width: 768px) {
  .goosos-footer-grid { grid-template-columns: 1fr; }
}

/* ============ 12. Ad slots (Advanced Ads friendly) ============ */
.goosos-ad { margin: 1.8rem 0; text-align: center; }
.goosos-ad .ad-label {
  font-family: var(--goosos-mono); font-size: 10px; letter-spacing: 2px;
  color: var(--goosos-muted); text-transform: uppercase; margin-bottom: 6px;
}

/* ============ 13. Responsive ============ */
@media (prefers-reduced-motion: reduce) {
  .goosos-ticker span { animation: none; }
  .site-branding .main-title a::after { animation: none; }
}

@media (max-width: 768px) {
  .goosos-cards { grid-template-columns: 1fr; }
  .goosos-author { flex-direction: column; }
  .goosos-hero-body { font-size: 13px; }
  .entry-content pre code { font-size: 12px; }
}

/* ============ 14. Code blocks: Prism + copy button ============ */
.entry-content pre[class*="language-"] {
  border-radius: 8px;
  border: 1px solid #2d3748;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 1.1rem 1.2rem;
  margin: 1.4rem 0;
  overflow-x: auto;
}
.goosos-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--goosos-mono);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #4a5568;
  background: rgba(45, 55, 72, 0.9);
  color: #a0aec0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}
.entry-content pre:hover .goosos-copy { opacity: 1; }
.goosos-copy:hover { color: #fff; border-color: #22c55e; }
