/*
Theme Name: Scarlet AI
Theme URI: https://thescarletai.com
Description: Custom dark gradient theme for The Scarlet AI media site. Features card-based layout with scarlet accents.
Version: 1.0.0
Author: ADLINK
Text Domain: scarlet-ai
*/

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

:root {
  --bg-start: #0f0c29;
  --bg-mid: #302b63;
  --bg-end: #24243e;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-hover: rgba(255, 255, 255, 0.1);
  --accent: #e94560;
  --accent-glow: rgba(233, 69, 96, 0.3);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --heading-color: #ffffff;
  --link-color: #e94560;
  --link-hover: #ff6b81;
  --max-width: 1200px;
  --content-width: 780px;
  --radius: 16px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6em;
}

h1 { font-size: 2.4rem; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; margin-top: 2rem; }
h3 { font-size: 1.3rem; }

p {
  margin-bottom: 1.2em;
  color: var(--text-secondary);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--link-hover);
}

strong {
  color: var(--text-primary);
}

ul, ol {
  margin: 0 0 1.5em 1.5em;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5em;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 12, 41, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--heading-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo .logo-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
  display: inline-block;
}

.site-logo:hover {
  color: var(--heading-color);
}

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--accent);
}

/* ===== HERO (HOME) ===== */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5em;
  background: linear-gradient(135deg, #ffffff 0%, #e94560 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
}

/* ===== CARD GRID (ARCHIVE) ===== */
.posts-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.15);
}

.post-card .card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.post-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.post-card h2 a {
  color: var(--heading-color);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-card .card-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.post-card .card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

/* ===== SINGLE POST ===== */
.single-post-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.single-post-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.single-post-header .post-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

.single-post-header h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.single-post-header .post-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.single-post-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 3rem;
}

.single-post-content h2 {
  color: var(--heading-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  margin-top: 2.5rem;
}

.single-post-content h2:first-child {
  margin-top: 0;
}

.single-post-content h3 {
  color: var(--text-primary);
  margin-top: 1.8rem;
}

/* Tables in content */
.single-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}

.single-post-content th {
  background: rgba(233, 69, 96, 0.15);
  color: var(--accent);
  text-align: left;
  padding: 0.8rem 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

.single-post-content td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-secondary);
}

.single-post-content tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Blockquote */
.single-post-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5em 0;
  padding: 1rem 1.5rem;
  background: rgba(233, 69, 96, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.single-post-content blockquote p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* Code */
.single-post-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ===== SIDEBAR ===== */
.sidebar {
  padding: 2rem 0;
}

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

.widget h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1rem;
}

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

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

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

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--card-border);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 2rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination a {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}

.pagination a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination .current {
  background: var(--accent);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-inner {
    padding: 0.8rem 1rem;
  }

  .main-nav ul {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .single-post-container {
    padding: 2rem 1rem;
  }

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

  .single-post-header h1 {
    font-size: 1.8rem;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }

  .single-post-content table {
    font-size: 0.8rem;
  }

  .single-post-content th,
  .single-post-content td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .main-nav {
    display: none;
  }

  .hero {
    padding: 3rem 1rem 2rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }
}
