/*
Theme Name: Stygian OS
Theme URI: https://stygian-os.com
Author: Stygian OS Team
Author URI: https://stygian-os.com
Description: A dark, developer-focused WordPress theme for Stygian OS with brass accents
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stygian-os
Tags: dark, developer, custom-colors, custom-logo, featured-images, full-width-template

This theme, like WordPress, is licensed under the GPL.
*/

/* ==========================================================================
   Base Styles - Dark Calamares Theme
   ========================================================================== */

@font-face {
    font-family: 'Agraham';
    src: url('assets/fonts/Agraham.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
  --stygian-black: #050505;
  --stygian-dark: #121212;
  --stygian-darker: #0a0a0a;
  --stygian-brass: #d4af37;
  --stygian-gold: #c5a028;
  --stygian-light-text: #f0f0f0;
  --stygian-muted: #a0a0a0;
  --stygian-border: #333333;
  --stygian-accent: #ff6b35;
  --glass-bg: rgba(18, 18, 18, 0.8);
  --glass-border: rgba(255, 255, 255, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--stygian-black);
  color: var(--stygian-light-text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--stygian-brass);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--stygian-gold);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--stygian-light-text);
  letter-spacing: 0.02em;
}

/* Use Agraham font for front page marketing sections and site header */
.site-title,
body.home h1,
body.home h2,
body.home h3 {
  font-family: 'Agraham', 'Inter', serif;
  font-weight: 700;
  line-height: 1.4;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  background-color: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--stygian-border);
}

/* Fix for WordPress Admin Bar */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.custom-logo,
.site-logo img,
.custom-logo-link img {
    height: 80px; /* Increased from 50px */
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.site-title {
  font-family: 'Agraham', 'Inter', serif;
  font-size: 1.75rem; /* Slightly larger to match new logo */
  font-weight: 700;
  color: var(--stygian-brass); /* Changed to brass */
  letter-spacing: -0.03em;
}

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

.main-navigation a {
  color: var(--stygian-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

.main-navigation a:hover {
  color: var(--stygian-light-text);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--stygian-brass);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after {
  width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10rem 2rem 5rem; /* Increased top padding from 8rem to 10rem to clear header */
  background: radial-gradient(circle at top right, #1a1a1a 0%, var(--stygian-black) 60%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
}

.hero-container {
  max-width: 1400px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 5rem; /* Reduced from 5.5rem to prevent clipping */
  margin-bottom: 2rem;
  background: linear-gradient(to right, #ffffff 20%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
  padding-bottom: 0.2em;
  padding-top: 0.1em; /* Added slight top padding */
}

.hero-content h1 span {
    color: var(--stygian-brass);
    -webkit-text-fill-color: var(--stygian-brass);
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--stygian-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--stygian-brass);
  color: #000;
}

.btn-primary:hover {
  background: var(--stygian-gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stygian-border);
  color: var(--stygian-light-text);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--stygian-muted);
  transform: translateY(-2px);
}

.hero-image {
  position: relative;
  perspective: 1000px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--stygian-border);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: rotateY(0) rotateX(0);
}

/* ==========================================================================
   Showcase Section
   ========================================================================== */

.showcase-section {
    padding: 8rem 2rem;
    background: var(--stygian-black);
    position: relative;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.showcase-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--stygian-border);
    background: var(--stygian-dark);
}

.showcase-item.large {
    grid-column: span 2;
}

.showcase-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    object-fit: cover;
}

.showcase-item:hover img {
    transform: scale(1.02);
}

.showcase-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--stygian-light-text);
}

.showcase-caption h3 {
    color: var(--stygian-brass);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
  padding: 8rem 2rem;
  background-color: var(--stygian-darker);
  position: relative;
}

.features-container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--stygian-muted);
  font-size: 1.125rem;
}

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

.feature-card {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--stygian-border);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--stygian-brass);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--stygian-brass);
  background: rgba(212, 175, 55, 0.1);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.feature-card h3 {
  color: var(--stygian-light-text);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--stygian-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--stygian-black);
  border-top: 1px solid var(--stygian-border);
  padding: 5rem 2rem 2rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-section h3 {
  color: var(--stygian-light-text);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: var(--stygian-muted);
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--stygian-brass);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--stygian-border);
  color: var(--stygian-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   Content & Single Pages
   ========================================================================== */

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.site-main {
    min-height: 60vh;
    padding-top: 80px; /* offset fixed header */
}

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

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--stygian-brass);
}

.entry-meta {
    color: var(--stygian-muted);
    font-size: 0.9rem;
}

.entry-content {
    line-height: 1.8;
    color: var(--stygian-light-text);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--stygian-brass);
}

.post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--stygian-border);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--stygian-border);
    font-size: 0.9rem;
}

.cat-links, .tags-links {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--stygian-muted);
}

/* ==========================================================================
   Blog Section (Front Page)
   ========================================================================== */

.blog-section {
    padding: 8rem 2rem;
    background-color: var(--stygian-black);
    position: relative;
    border-top: 1px solid var(--stygian-border);
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
}

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

.post-card {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--stygian-border);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--stygian-brass);
}

.post-card .post-thumbnail {
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--stygian-border);
    height: 240px;
}

.post-card .post-thumbnail img {
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-content h3 a {
    color: var(--stygian-light-text);
}

.post-content h3 a:hover {
    color: var(--stygian-brass);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--stygian-muted);
    margin-bottom: 1rem;
}

.post-content p {
    color: var(--stygian-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content p {
    margin: 0 auto 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .showcase-grid {
      grid-template-columns: 1fr;
  }

  .showcase-item.large {
      grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 3rem;
  }

  .header-container {
      padding: 1rem;
  }

  .main-navigation {
      display: none; /* Mobile menu implementation usually requires JS */
  }

  .entry-title {
      font-size: 2rem;
  }
}
/* ==========================================================================
   WordPress Media Alignment Fix
   ========================================================================== */

/* Force floats and wrapping for aligned images */
img.alignleft {
    float: left;
    display: inline-block; /* Fixes wrapping when inside <b> or <span> */
    margin: 0.5rem 2rem 1rem 0;
}

img.alignright {
    float: right;
    display: inline-block;
    margin: 0.5rem 0 1rem 2rem;
}

img.aligncenter {
    display: block;
    margin: 0 auto 1.5rem auto;
    float: none;
}

/* Clearfix: Ensures paragraphs expand to contain their floating images */
.entry-content p::after {
    content: "";
    display: table;
    clear: both;
}

/* Small screens: Stack images instead of floating them */
@media (max-width: 600px) {
    img.alignleft, img.alignright {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}