/*
Theme Name: DeciusAC
Theme URI: https://deciusac.com
Author: DeciusAC
Author URI: https://deciusac.com
Description: A sysadmin-focused theme with terminal aesthetics, green accents, and a dark modern design. Built for IT tutorials and tools.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: deciusac
Tags: dark, one-column, custom-background, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments
*/

/* ========== CSS Variables ========== */
:root {
  --bg-dark: #0a0e14;
  --bg-card: #12161d;
  --text-primary: #f0fdf4;
  --text-muted: #6b7280;
  --accent-green: #22c55e;
  --accent-teal: #14b8a6;
  --border-color: #1f2937;
  --glow-green: 0 0 20px rgba(34, 197, 94, 0.4);
  --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
  color: var(--accent-teal);
  text-shadow: var(--glow-green);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

img {
  max-width: 100%;
  height: auto;
}

code, pre {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
}

code {
  padding: 0.25rem 0.5rem;
}

pre {
  padding: 1rem;
  overflow-x: auto;
}

/* ========== Layout ========== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-content {
  min-height: calc(100vh - 200px);
}

/* ========== Header ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo {
  width: 40px;
  height: 40px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.site-logo:hover {
  border-color: var(--accent-green);
  box-shadow: var(--glow-green);
}

.site-logo svg {
  width: 20px;
  height: 20px;
  color: var(--accent-green);
}

.site-title {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.site-title:hover {
  color: var(--accent-green);
}

.main-navigation ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-navigation a {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.main-navigation a:hover {
  color: var(--accent-green);
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.resume-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--accent-green);
  box-shadow: var(--glow-green);
}

/* ========== Hero Section ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.7);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: 
    linear-gradient(var(--accent-green) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-green) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 1rem;
}

.terminal-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  margin-bottom: 2rem;
}

.terminal-prompt .dollar {
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.terminal-prompt .command {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.terminal-cursor {
  width: 8px;
  height: 16px;
  background: var(--accent-green);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  color: var(--accent-green);
  text-shadow: var(--glow-green);
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-primary);
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-mono);
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-green);
  color: var(--bg-dark);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
  color: var(--bg-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: var(--accent-green);
}

.btn-outline:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(107, 114, 128, 0.3);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(107, 114, 128, 0.5);
}

/* ========== Tutorial Links ========== */
.tutorial-links {
  text-align: center;
}

.tutorial-links h4 {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.tutorial-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.tutorial-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(18, 22, 29, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.tutorial-tag:hover {
  color: var(--accent-green);
  border-color: rgba(34, 197, 94, 0.5);
}

/* ========== Features Section ========== */
.features {
  padding: 6rem 0;
  border-top: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent-green);
}

.feature-card h3 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-muted);
}

/* ========== Support Section ========== */
.support {
  padding: 6rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.support-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.support-icon svg {
  width: 40px;
  height: 40px;
  color: var(--accent-green);
}

.support h2 .highlight {
  color: var(--accent-green);
  text-shadow: var(--glow-green);
}

.support-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ========== Footer ========== */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  background: rgba(18, 22, 29, 0.5);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  width: 32px;
  height: 32px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo svg {
  width: 16px;
  height: 16px;
  color: var(--accent-green);
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--accent-green);
}

/* ========== WordPress Specific ========== */
.entry-content {
  padding: 6rem 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
  color: var(--text-primary);
}

.entry-content p,
.entry-content li {
  color: var(--text-muted);
}

.entry-content a {
  color: var(--accent-green);
}

.entry-content ul,
.entry-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

/* Post/Page Header */
.page-header,
.entry-header {
  padding: 8rem 0 4rem;
  text-align: center;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.entry-title {
  font-size: 2.5rem;
  color: var(--text-primary);
}

.entry-meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Comments */
.comments-area {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
}

.comment-list {
  list-style: none;
}

.comment {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.comment-respond {
  margin-top: 2rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent-green);
}

.comment-form .submit {
  background: var(--accent-green);
  color: var(--bg-dark);
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comment-form .submit:hover {
  box-shadow: var(--glow-green);
}

/* Sidebar / Widget Areas */
.widget-area {
  padding: 2rem 0;
}

.widget {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-green);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-tagline {
    font-size: 1rem;
  }
  
  .main-navigation {
    display: none;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* Scanline Effect */
.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(34, 197, 94, 0.02) 50%
  );
  background-size: 100% 4px;
}

/* Utility Classes */
.text-glow {
  text-shadow: var(--glow-green);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== Tutorials Page ========== */
.tutorials-page {
  padding-top: 120px;
  padding-bottom: 4rem;
  min-height: 100vh;
}

.tutorials-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tutorials-header h1 {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.tutorials-header h1 .terminal-prompt {
  color: var(--accent-green);
}

.tutorials-header p,
.tutorials-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Search Bar */
.tutorials-search-wrapper {
  max-width: 800px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}

.tutorials-search {
  position: relative;
}

.tutorials-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

.tutorials-search input {
  width: 100%;
  padding: 1rem 3rem 1rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.tutorials-search input::placeholder {
  color: var(--text-muted);
}

.tutorials-search input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.tutorials-search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: none;
  transition: color 0.3s ease;
}

.tutorials-search-clear:hover {
  color: var(--text-primary);
}

.tutorials-search-clear.visible {
  display: block;
}

.tutorials-search-clear svg {
  width: 20px;
  height: 20px;
}

/* Category Filters */
.tutorials-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: rgba(34, 197, 94, 0.5);
  color: var(--accent-green);
}

.filter-btn.active {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--bg-dark);
}

/* Results Count */
.tutorials-count {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Tutorials Grid */
.tutorials-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  list-style: none;
}

@media (max-width: 1024px) {
  .tutorials-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .tutorials-grid {
    grid-template-columns: 1fr !important;
  }
}

.tutorial-card {
  display: flex !important;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  min-height: 0;
}

.tutorial-card:hover {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.1);
  transform: translateY(-4px);
}

/* Reset any WordPress default link styles */
a.tutorial-card,
a.tutorial-card:visited,
a.tutorial-card:link {
  color: inherit;
  text-decoration: none;
}

/*
  WordPress sometimes injects empty <p> wrappers / duplicate empty links.
  Those render as “ghost boxes” on the left/right because .tutorial-card has borders.
*/
.tutorials-grid a.tutorial-card:empty {
  display: none !important;
  border: 0 !important;
  padding: 0 !important;
}

.tutorials-grid p {
  margin: 0;
}

.tutorial-card-content p:empty {
  display: none;
}
.tutorial-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.tutorial-card-icon {
  width: 40px;
  height: 40px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.tutorial-card:hover .tutorial-card-icon {
  background: rgba(34, 197, 94, 0.2);
}

.tutorial-card-icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent-green);
}

.tutorial-card-content {
  flex: 1;
  min-width: 0;
}

.tutorial-card-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(107, 114, 128, 0.2);
  border-radius: 9999px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.tutorial-card-title {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.tutorial-card:hover .tutorial-card-title {
  color: var(--accent-green);
}

.tutorial-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.tutorial-card-external {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0;
  transition: all 0.3s ease;
}

.tutorial-card:hover .tutorial-card-external {
  opacity: 1;
  color: var(--accent-green);
}

/* No Results */
.tutorials-no-results {
  text-align: center;
  padding: 3rem 1rem;
  display: none;
}

.tutorials-no-results.visible {
  display: block;
}

.tutorials-no-results p {
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tutorials-no-results button {
  background: none;
  border: none;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
}

.tutorials-no-results button:hover {
  text-shadow: var(--glow-green);
}

@media (max-width: 768px) {
  .tutorials-header h1 {
    font-size: 2rem;
  }
  
  .tutorials-filters {
    gap: 0.5rem;
  }
  
  .filter-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }
}
