/*
Theme Name: Chumania
Theme URI: https://chumania.com
Author: Warren Chu
Author URI: https://chumania.com
Description: The official Chumania theme — the journey, documented.
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chumania
Tags: blog, custom-colors, custom-logo, featured-images, full-width-template
*/

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  --black: #0a0a0a;
  --cream: #F2EDE8;
  --white: #ffffff;
  --yellow: #FFD700;
  --red: #CC0000;
  --gray: #888888;
  --gray-light: #cccccc;
  --border: rgba(255,255,255,0.08);
  --border-solid: #1a1a1a;
  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max-width: 1200px;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul, ol { list-style: none; }

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(42px, 6vw, 80px); }
h2 { font-size: clamp(28px, 4vw, 52px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 20px; }

p { margin-bottom: 1.5em; }
p:last-child { margin-bottom: 0; }

/* ============================================
   LAYOUT UTILITIES
============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 48px);
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 48px;
}

/* ============================================
   NAVIGATION
============================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

#site-header.scrolled { padding: 14px 48px; }

.site-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: 1px;
}

.logo-i-container { position: relative; display: inline-block; }

.logo-i-dot {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 50%;
}

.logo-period { color: var(--red); }

#primary-navigation {
  display: flex;
  align-items: center;
  gap: 40px;
}

#primary-navigation .nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

#primary-navigation .nav-links a {
  color: var(--gray);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color var(--transition);
}

#primary-navigation .nav-links a:hover,
#primary-navigation .nav-links a.current-menu-item { color: var(--white); }

.nav-subscribe {
  background: var(--red);
  color: var(--white) !important;
  padding: 8px 20px !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  transition: background var(--transition) !important;
}

.nav-subscribe:hover { background: #aa0000 !important; color: var(--white) !important; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--white);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
}

/* Dropdown positioning */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
  background: var(--black) !important;
  border: 1px solid var(--border) !important;
  padding: 16px !important;
  min-width: 200px !important;
  z-index: 9999 !important;
  margin-top: 8px;
}

.dropdown-menu li {
  margin-bottom: 12px;
}

.dropdown-menu li:last-child {
  margin-bottom: 0;
}

.dropdown-menu a {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.dropdown-menu a:hover {
  color: var(--white);
}

/* ============================================
   HERO
============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(204,0,0,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,215,0,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease both;
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(52px, 8vw, 110px);
  line-height: 0.95;
  letter-spacing: -4px;
  margin-bottom: 36px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-title .line-muted { color: var(--gray); font-weight: 400; }
.hero-title .accent { color: var(--yellow); }

.hero-subtitle {
  max-width: 460px;
  font-size: 16px;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  margin-bottom: 48px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 32px;
  transition: all var(--transition);
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero-cta:hover { background: var(--yellow); color: var(--black); }
.hero-cta .arrow { transition: transform var(--transition); }
.hero-cta:hover .arrow { transform: translateX(4px); }

.hero-scroll-indicator {
  position: absolute;
  right: 48px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gray));
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ============================================
   TICKER
============================================ */
.ticker-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  gap: 60px;
  animation: ticker 25s linear infinite;
}

.ticker-item {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.ticker-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* ============================================
   FEATURED POSTS GRID
============================================ */
.posts-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.posts-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

.posts-header .section-title { margin-bottom: 0; }

.view-all-link {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  border-bottom: 1px solid rgba(136,136,136,0.4);
  padding-bottom: 2px;
  transition: all var(--transition);
}

.view-all-link:hover { color: var(--white); border-color: var(--white); }

.posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1px;
  background: var(--border-solid);
}

.post-card {
  background: var(--black);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  transition: background var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.post-card:hover { background: #111111; }
.post-card.post-featured { min-height: 420px; }
.post-card-inner-top { flex: 1; }

.post-category-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.post-card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--white);
}

.post-card.post-featured .post-card-title { font-size: 26px; letter-spacing: -1px; }

.post-card-excerpt {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  margin-bottom: 0;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--gray);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 28px;
}

.post-arrow {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.post-card:hover .post-arrow { background: var(--white); border-color: var(--white); color: var(--black); }

.post-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 24px;
}

/* ============================================
   CATEGORIES SECTION
============================================ */
.categories-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border-solid);
}

.category-card {
  background: var(--black);
  padding: 36px 32px;
  transition: background var(--transition);
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-card:hover { background: #111111; }
.category-card:hover .category-name { color: var(--yellow); }

.category-icon { font-size: 28px; margin-bottom: 16px; display: block; }

.category-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  transition: color var(--transition);
}

.category-desc { font-size: 12px; color: var(--gray); line-height: 1.5; margin-bottom: 0; }

/* ============================================
   ABOUT STRIP
============================================ */
.about-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-body {
  font-size: 17px;
  color: rgba(255,255,255,0.55);
  line-height: 1.9;
  margin-bottom: 28px;
}

.about-body strong { color: var(--white); font-weight: 400; }
.stats-list { display: flex; flex-direction: column; gap: 0; }

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.stat-item:first-child { border-top: 1px solid var(--border); }

.stat-number {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 48px;
  letter-spacing: -2px;
  color: var(--yellow);
  line-height: 1;
  flex-shrink: 0;
}

.stat-label { font-size: 13px; color: var(--gray); max-width: 180px; line-height: 1.4; margin-bottom: 0; }

/* ============================================
   NEWSLETTER
============================================ */
.newsletter-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: #0d0d0d;
  text-align: center;
}

.newsletter-section .section-title { max-width: 560px; margin: 0 auto 16px; }

.newsletter-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 40px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form { display: flex; max-width: 460px; margin: 0 auto; }

.newsletter-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 14px 20px;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-input::placeholder { color: #555; }
.newsletter-input:focus { border-color: rgba(255,255,255,0.25); }

.newsletter-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.newsletter-btn:hover { background: #aa0000; }

/* ============================================
   SINGLE POST
============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--red);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

.single-post-header {
  padding: 160px 0 80px;
  border-bottom: 1px solid var(--border);
}

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.post-date { font-size: 12px; color: var(--gray); letter-spacing: 0.05em; }
.post-read-time { font-size: 12px; color: var(--gray); }

.single-post-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -2px;
  line-height: 1.05;
  max-width: 800px;
  margin-bottom: 32px;
}

.single-post-excerpt {
  font-size: 20px;
  color: rgba(255,255,255,0.5);
  max-width: 640px;
  line-height: 1.7;
}

.single-post-featured-image { width: 100%; height: 500px; object-fit: cover; margin: 60px 0; }

.post-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 0 100px;
  font-size: 18px;
  line-height: 1.85;
  color: rgba(255,255,255,0.8);
}

.post-content h2 { font-size: 28px; color: var(--white); margin: 56px 0 20px; letter-spacing: -0.5px; }
.post-content h3 { font-size: 22px; color: var(--white); margin: 40px 0 16px; }
.post-content p { margin-bottom: 1.6em; }
.post-content strong { color: var(--white); font-weight: 600; }
.post-content em { font-style: italic; }

.post-content a {
  color: var(--yellow);
  border-bottom: 1px solid rgba(255,215,0,0.3);
  transition: border-color var(--transition);
}

.post-content a:hover { border-color: var(--yellow); }

.post-content blockquote {
  border-left: 3px solid var(--red);
  padding-left: 28px;
  margin: 40px 0;
  font-size: 20px;
  font-style: italic;
  color: rgba(255,255,255,0.6);
}

.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 1.6em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.5em; }
.post-content img { width: 100%; height: auto; margin: 40px 0; }

.post-signature {
  font-style: italic;
  color: var(--gray);
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* ============================================
   ARCHIVE / BLOG PAGE
============================================ */
.archive-header { padding: 160px 0 60px; border-bottom: 1px solid var(--border); }

.archive-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(42px, 6vw, 80px);
  letter-spacing: -3px;
  margin-bottom: 16px;
}

.archive-description { font-size: 17px; color: rgba(255,255,255,0.4); max-width: 500px; }

.archive-grid {
  padding: 60px 0 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-solid);
}

.archive-post-card {
  background: var(--black);
  padding: 40px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}

.archive-post-card:hover { background: #111; }

/* ============================================
   PAGINATION
============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.page-numbers {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--gray);
  transition: all var(--transition);
}

.page-numbers:hover, .page-numbers.current { background: var(--white); color: var(--black); border-color: var(--white); }

/* ============================================
   FOOTER
============================================ */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo { font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: -0.5px; }
.footer-copy { font-size: 12px; color: var(--gray); }
.footer-links { display: flex; gap: 28px; }

.footer-links a {
  font-size: 12px;
  color: var(--gray);
  transition: color var(--transition);
  letter-spacing: 0.05em;
}

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

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  #site-header { padding: 16px 24px; }
  .menu-toggle { display: block; }

  #primary-navigation {
    display: none;
    position: fixed;
    top: 61px; left: 0; right: 0;
    background: var(--black);
    border-top: 1px solid var(--border);
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  #primary-navigation.open { display: flex; }
  #primary-navigation .nav-links { flex-direction: column; gap: 20px; }
  #primary-navigation .nav-links a { font-size: 16px; }

  .hero { padding: 100px 24px 60px; }
  .hero-title { letter-spacing: -2px; }
  .hero-scroll-indicator { display: none; }

  .posts-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .archive-grid { grid-template-columns: 1fr; }
  .posts-header { flex-direction: column; align-items: flex-start; gap: 16px; }

  #site-footer { flex-direction: column; text-align: center; padding: 40px 24px; }
  .footer-links { flex-wrap: wrap; justify-content: center; }

  .single-post-header { padding: 120px 0 60px; }
  .single-post-featured-image { height: 240px; }
  .post-content { font-size: 17px; padding: 60px 0 80px; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-input { border-right: 1px solid var(--border); border-bottom: none; }
}
