
:root {
  --brand-primary: #f59e0b;
  --brand-primary-hover: #d97706;
  --brand-dark: #0f172a;
  --brand-card-bg: #ffffff;
  --bg-page: #f8fafc;
  --bg-alt: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

*, *:before, *:after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text span:first-child {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s;
}

.header-nav a:hover, .header-nav a.active {
  color: var(--brand-primary);
}

.header-cta-btn {
  background: var(--brand-dark);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px !important;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.header-cta-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  padding: 48px 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 16px;
  max-width: 800px;
}

.hero-title span {
  color: var(--brand-primary);
}

.hero-desc {
  font-size: 16px;
  color: #94a3b8;
  max-width: 700px;
  margin: 0 0 28px;
  line-height: 1.6;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  max-width: 500px;
  backdrop-filter: blur(8px);
}

.search-icon {
  font-size: 16px;
  color: #94a3b8;
  margin-right: 8px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  width: 100%;
}

.search-box input::placeholder {
  color: #94a3b8;
}

/* Category Filters */
.filters-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 24px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.filter-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

/* Articles Section */
.articles-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.article-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 158, 11, 0.4);
}

.card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card:hover .card-thumb-wrap img {
  transform: scale(1.03);
}

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--brand-dark);
}

.card-excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.author-avatar {
  width: 24px;
  height: 24px;
  background: var(--brand-dark);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.read-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
}

/* Single Article Styling */
.article-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s;
}

.breadcrumbs a:hover {
  color: var(--brand-primary);
}

.article-header {
  margin-bottom: 32px;
}

.article-h1 {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 18px;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

.article-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.views-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
}

.views-badge svg {
  color: var(--brand-primary);
}

.article-featured-media {
  width: 100%;
  max-height: 440px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 36px;
  background: var(--bg-alt);
}

.article-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body-wrap {
  font-size: 17px;
  line-height: 1.8;
  color: #334155;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.article-body-wrap h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 44px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  line-height: 1.3;
}

.article-body-wrap h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 32px 0 14px;
}

.article-body-wrap p {
  margin: 0 0 20px;
}

.article-body-wrap ul, .article-body-wrap ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.article-body-wrap li {
  margin-bottom: 8px;
}

.article-body-wrap a {
  color: #d97706;
  text-decoration: underline;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.article-body-wrap a:hover {
  color: #b45309;
}

.article-body-wrap blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  background: #fffbeb;
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #92400e;
  font-size: 16px;
  line-height: 1.6;
}

.article-body-wrap pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 14px;
  line-height: 1.6;
  margin: 24px 0;
}

.article-body-wrap code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  word-break: break-word;
}

.article-body-wrap pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-body-wrap table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 28px 0;
}

.article-body-wrap th, .article-body-wrap td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  font-size: 14.5px;
  text-align: left;
}

.article-body-wrap th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--brand-dark);
}

/* CTA Footer Block */
.article-cta-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-radius: var(--radius-md);
  padding: 32px;
  margin: 50px 0 30px;
  color: #fff;
  text-align: center;
}

.article-cta-box h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px;
  color: #fff;
}

.article-cta-box p {
  color: #cbd5e1;
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto 20px;
}

.article-cta-box a {
  display: inline-block;
  background: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  transition: background 0.15s, transform 0.15s;
}

.article-cta-box a:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 24px 32px;
  margin-top: 60px;
  font-size: 14px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1e293b;
}

.footer-brand h4 {
  font-size: 18px;
  color: #fff;
  margin: 0 0 12px;
}

.footer-links h5 {
  font-size: 14px;
  color: #fff;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 768px) {
  .hero-title { font-size: 26px; }
  .article-h1 { font-size: 28px; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; }
  .header-nav { display: none; }
}
