:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1e1e1e;
  --bg-glass: rgba(255,255,255,0.04);

  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;

  --accent-blue: #4a9eff;
  --accent-purple: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  --border-subtle: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);

  --badge-red: #ef4444;
  --badge-green: #22c55e;
  --badge-blue: #3b82f6;
  --badge-orange: #f97316;
  --badge-purple: #a855f7;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::selection {
  background: var(--accent-purple);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

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

a:hover {
  color: var(--accent-purple);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  margin-bottom: 48px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  height: 64px;
  border-bottom: 1px solid var(--border-subtle);
  transition: transform 0.3s ease, background 0.3s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.95);
}

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

.header-left {
  display: flex;
  align-items: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

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

.site-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.header-center .nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.search-toggle:hover {
  color: var(--text-primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  height: calc(100vh - 64px);
  background: var(--bg-primary);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-inner {
  padding: 24px;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-links a {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

body.nav-open {
  overflow: hidden;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 0;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 32px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-newsletter-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-input:focus {
  border-color: var(--accent-blue);
}

.newsletter-btn {
  padding: 10px 18px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.newsletter-btn:hover {
  opacity: 0.9;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  margin-top: 32px;
}

.hero-card {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 0;
  padding: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
}

.hero-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-meta {
  margin-bottom: 16px;
}

.meta-time {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hero-excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 20px;
}

.hero-image-wrapper {
  overflow: hidden;
  position: relative;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.source-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  margin-right: -8px;
  display: inline-block;
}

.source-dot:first-child {
  margin-left: 0;
}

.source-count {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: 12px;
}

.save-btn, .more-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  margin-left: auto;
  transition: color 0.2s ease;
}

.save-btn:hover {
  color: var(--accent-purple);
}

.more-btn:hover {
  color: var(--text-primary);
}

/* ============================================
   TRENDING GRID
   ============================================ */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.trending-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--bg-secondary);
}

.trending-image-wrapper {
  overflow: hidden;
}

.trending-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.trending-content {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.trending-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.trending-footer {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: auto;
}

.trending-footer .source-count {
  margin-left: 6px;
  font-size: 0.75rem;
}

.trending-footer .save-btn,
.trending-footer .more-btn {
  font-size: 0.95rem;
}

/* ============================================
   MEDIUM CARD
   ============================================ */
.medium-card {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 0;
  text-decoration: none;
  background: var(--bg-secondary);
}

.medium-image-wrapper {
  overflow: hidden;
}

.medium-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/10;
}

.medium-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.medium-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
}

.medium-meta {
  margin-bottom: 12px;
}

.medium-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.medium-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   DISCOVER MORE
   ============================================ */
.discover-heading {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.discover-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.discover-scroll::-webkit-scrollbar {
  display: none;
}

.discover-card {
  flex-shrink: 0;
  width: 250px;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 12px;
  text-decoration: none;
  scroll-snap-align: start;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.discover-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.discover-image-wrapper {
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;
}

.discover-image {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.discover-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.discover-excerpt {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination a:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

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

/* ============================================
   ARCHIVE / SEARCH
   ============================================ */
.archive-page {
  padding-top: 32px;
  padding-bottom: 48px;
}

.archive-header {
  margin-bottom: 32px;
}

.archive-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.archive-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.archive-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.archive-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.archive-card-image {
  overflow: hidden;
}

.archive-card-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.archive-card-content {
  padding: 16px;
}

.archive-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
}

.archive-card-meta {
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.archive-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-results {
  text-align: center;
  padding: 48px 0;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.search-again {
  max-width: 400px;
  margin: 24px auto;
}

.search-query {
  color: var(--accent-blue);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
}

.error-code {
  font-family: 'Inter', sans-serif;
  font-size: 6rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent-gradient);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.error-btn:hover {
  opacity: 0.9;
  color: #fff;
}

.error-search {
  max-width: 400px;
  margin: 32px auto;
}

.error-popular {
  margin-top: 48px;
  text-align: left;
}

.error-popular h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.error-popular-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================
   SINGLE PAGE (static pages)
   ============================================ */
.single-page {
  padding-top: 48px;
  padding-bottom: 48px;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.page-content {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.page-content p {
  margin-bottom: 20px;
}

.page-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
}

/* ============================================
   SEARCH FORM
   ============================================ */
.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-form input[type="search"]:focus {
  border-color: var(--accent-blue);
}

.search-form button {
  padding: 12px 20px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-form button:hover {
  opacity: 0.9;
}
