/*
Theme Name: Gusinski Pro
Theme URI: https://gusinski.pro
Author: Pavel Gusinski
Author URI: https://gusinski.pro
Description: Custom dark theme for Gusinski Pro - Quant Trader & Entrepreneur. Matches Next.js frontend design system.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gusinski-pro
Tags: dark, custom-background, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ==========================================================================
   CSS Variables (Design Tokens)
   ========================================================================== */

:root {
  /* Primary Colors */
  --primary-50: #e6f3ff;
  --primary-100: #b3dbff;
  --primary-400: #1a94ff;
  --primary-500: #1A8CFF;
  --primary-600: #0070e6;
  --primary-700: #0056b3;

  /* Accent Colors */
  --accent-cyan: #00D4FF;
  --accent-purple: #7B61FF;

  /* Dark Theme */
  --dark-950: #050507;
  --dark-900: #0A0A0F;
  --dark-800: #12121A;
  --dark-700: #1A1A25;
  --dark-600: #252530;
  --dark-500: #35354A;

  /* Text Colors */
  --text-white: #ffffff;
  --text-gray-300: #d1d5db;
  --text-gray-400: #9ca3af;
  --text-gray-500: #6b7280;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --container-max: 1280px;
  --section-padding: 6rem;

  /* Border Radius */
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.625;
  color: var(--text-gray-300);
  background-color: var(--dark-900);
}

::selection {
  background: rgba(26, 140, 255, 0.3);
  color: white;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-white);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.875rem; }
}

p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

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

a:hover {
  color: var(--primary-500);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-500), var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding-top: 80px; /* Header height */
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dark-700);
  transition: all 0.3s ease;
}

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

.site-logo img {
  height: 32px;
  width: auto;
}

.main-navigation {
  display: none;
}

@media (min-width: 768px) {
  .main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.main-navigation a {
  color: var(--text-gray-300);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.header-cta {
  background: var(--primary-500);
  color: white !important;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.header-cta:hover {
  background: var(--primary-600);
  box-shadow: 0 0 30px rgba(26, 140, 255, 0.5);
}

/* Mobile menu toggle */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--text-gray-300);
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
}

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

.site-footer {
  background: var(--dark-950);
  border-top: 1px solid var(--dark-700);
  padding: 3rem 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-brand p {
  color: var(--text-gray-400);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.footer-nav h4,
.footer-social h4 {
  color: var(--text-white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--text-gray-400);
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: var(--text-white);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-700);
  border-radius: var(--radius-lg);
  color: var(--text-gray-300);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-500);
  color: white;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--dark-700);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-gray-500);
  font-size: 0.875rem;
  margin: 0;
}

/* ==========================================================================
   Article Content
   ========================================================================== */

.article-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.article-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .article-title { font-size: 3rem; }
}

.article-meta {
  color: var(--text-gray-500);
  font-size: 0.875rem;
}

.article-meta a {
  color: var(--primary-400);
}

.article-featured-image {
  margin-bottom: 2rem;
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

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

/* Content Typography */
.article-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--dark-700);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content p {
  color: var(--text-gray-300);
}

.article-content strong {
  color: var(--text-white);
  font-weight: 600;
}

.article-content em {
  font-style: italic;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-gray-300);
}

.article-content ul li::marker {
  color: var(--primary-400);
}

.article-content ol li::marker {
  color: var(--primary-400);
  font-weight: 600;
}

/* Blockquotes */
.article-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--dark-800);
  border-left: 4px solid var(--primary-500);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}

.article-content blockquote p {
  margin: 0;
  color: var(--text-gray-300);
  font-style: italic;
}

/* Code */
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--dark-800);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-lg);
  color: var(--accent-cyan);
}

.article-content pre {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--dark-800);
  border-radius: var(--radius-xl);
  overflow-x: auto;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text-gray-300);
}

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  margin: 2rem 0;
}

.article-content figure {
  margin: 2rem 0;
}

.article-content figcaption {
  text-align: center;
  color: var(--text-gray-500);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Tables */
.article-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--dark-700);
}

.article-content th {
  color: var(--text-white);
  font-weight: 600;
  background: var(--dark-800);
}

.article-content td {
  color: var(--text-gray-300);
}

/* ==========================================================================
   Archive / Blog Listing
   ========================================================================== */

.archive-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.archive-title {
  font-size: 2.25rem;
}

.archive-description {
  color: var(--text-gray-400);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0 4rem;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Post Card */
.post-card {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all 0.3s ease;
}

.post-card:hover {
  border-color: rgba(26, 140, 255, 0.5);
}

.post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-date {
  color: var(--text-gray-500);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.post-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.post-card-title a {
  color: var(--text-white);
  transition: color 0.3s ease;
}

.post-card:hover .post-card-title a {
  color: var(--primary-400);
}

.post-card-excerpt {
  color: var(--text-gray-400);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  color: var(--primary-400);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more:hover {
  color: var(--primary-500);
}

.read-more svg {
  transition: transform 0.3s ease;
}

.read-more:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 4rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 1rem;
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-lg);
  color: var(--text-gray-300);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.pagination a:hover {
  border-color: var(--primary-500);
  color: var(--primary-400);
}

.pagination .current {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

/* ==========================================================================
   Sidebar & Widgets
   ========================================================================== */

.sidebar {
  padding: 2rem 0;
}

.widget {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--dark-700);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  margin-bottom: 0.5rem;
}

.widget a {
  color: var(--text-gray-400);
  font-size: 0.875rem;
}

.widget a:hover {
  color: var(--primary-400);
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--dark-700);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-xl);
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-gray-500);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-500);
}

label {
  display: block;
  color: var(--text-gray-300);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

button,
input[type="submit"],
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-500);
  border: none;
  border-radius: var(--radius-xl);
  color: white;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover,
input[type="submit"]:hover,
.button:hover {
  background: var(--primary-600);
  box-shadow: 0 0 30px rgba(26, 140, 255, 0.5);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
  max-width: 768px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.comment-author-name {
  color: var(--text-white);
  font-weight: 600;
}

.comment-date {
  color: var(--text-gray-500);
  font-size: 0.875rem;
}

.comment-content p {
  color: var(--text-gray-300);
  margin: 0;
}

.comment-reply-link {
  color: var(--primary-400);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Comment Form */
#respond,
.comment-respond {
  max-width: 768px;
  margin: 4rem auto 0;
  padding: 2rem 1rem;
}

#respond .comment-respond,
.comments-area .comment-respond {
  padding: 2rem;
  margin: 0;
}

.comment-respond {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: var(--radius-xl);
}

.comment-reply-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-white);
}

.comment-notes {
  color: var(--text-gray-400);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.required {
  color: var(--primary-400);
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
  margin-bottom: 1.5rem;
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--primary-500);
}

.comment-form-cookies-consent label {
  color: var(--text-gray-400);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.form-submit {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0;
}

.error-404 h1 {
  font-size: 6rem;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.error-404 p {
  color: var(--text-gray-400);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ==========================================================================
   WordPress Specific
   ========================================================================== */

/* Alignment */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignwide {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.alignfull {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

/* Gallery */
.wp-block-gallery {
  display: grid;
  gap: 1rem;
}

/* Captions */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  text-align: center;
  color: var(--text-gray-500);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Screen reader text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
