/*
Theme Name: Dataupward
Theme URI: https://dataupward.com
Author: Dataupward
Author URI: https://dataupward.com
Description: Custom theme for Dataupward - Data Analytics, AI & Career Insights
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: dataupward
*/

/* ── ROOT VARIABLES ── */
:root {
  --bg: #F9F7F4;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --ink-mid: #4A4A4A;
  --ink-light: #888888;
  --accent: #1A6B4A;
  --accent-light: #E8F4EE;
  --border: #E8E4DE;
  --tag-ai: #EEF3FF;
  --tag-ai-text: #1E4FC2;
  --tag-career: #FFF3EE;
  --tag-career-text: #D4522A;
  --tag-tips: #EEFAF4;
  --tag-tips-text: #1A6B4A;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* ── NAV ── */
.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: 'Lora', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo span { color: var(--accent); }

.nav-cats { display: flex; gap: 0.2rem; list-style: none; }
.nav-cats a {
  font-size: 0.85rem; font-weight: 500;
  color: var(--ink-mid); text-decoration: none;
  padding: 0.4rem 0.9rem; border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}
.nav-cats a:hover,
.nav-cats a.current-menu-item { background: var(--accent-light); color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 1rem; }
.btn-subscribe {
  background: var(--ink); color: #fff;
  padding: 0.5rem 1.2rem; border-radius: 20px;
  font-size: 0.82rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s;
}
.btn-subscribe:hover { background: var(--accent); color: #fff; }

/* ── PAGE WRAP ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ── CONTENT LAYOUT ── */
.content-layout {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 3.5rem; padding: 3rem 0 4rem;
}

/* ── ARTICLE PAGE ── */
.article-header { padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }

.article-tag {
  display: inline-block; padding: 0.28rem 0.75rem; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 1rem;
  background: var(--tag-tips); color: var(--tag-tips-text);
}

.article-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; line-height: 1.2;
  color: var(--ink); margin-bottom: 1.2rem;
}

.article-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.82rem; color: var(--ink-light); flex-wrap: wrap;
}
.author-chip { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-mid); }
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0A3D28);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0;
  font-family: 'Lora', serif;
}
.divider-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); flex-shrink: 0; }

/* ── ARTICLE CONTENT ── */
.article-content {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem; line-height: 1.85;
  color: var(--ink-mid);
}
.article-content h2 {
  font-family: 'Lora', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--ink); margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.article-content h3 {
  font-family: 'Lora', serif;
  font-size: 1.25rem; font-weight: 600;
  color: var(--ink); margin: 2rem 0 0.8rem;
}
.article-content h4 {
  font-size: 1rem; font-weight: 600;
  color: var(--ink); margin: 1.5rem 0 0.6rem;
}
.article-content p { margin-bottom: 1.4rem; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: #0A3D28; }
.article-content ul, .article-content ol {
  margin: 1rem 0 1.4rem 1.5rem;
}
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--ink-mid);
}
.article-content img {
  width: 100%; border-radius: 8px;
  margin: 1.5rem 0; border: 1px solid var(--border);
}
.article-content code {
  background: #F0EDE8; padding: 0.15rem 0.4rem;
  border-radius: 4px; font-size: 0.88rem;
  font-family: 'Courier New', monospace; color: var(--accent);
}
.article-content pre {
  background: var(--ink); color: #E8F4EE;
  padding: 1.5rem; border-radius: 8px;
  overflow-x: auto; margin: 1.5rem 0;
  font-size: 0.88rem; line-height: 1.6;
}
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.5rem 0; font-size: 0.9rem;
}
.article-content th {
  background: var(--ink); color: #fff;
  padding: 0.7rem 1rem; text-align: left;
  font-size: 0.8rem; letter-spacing: 0.05em;
}
.article-content td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.article-content tr:nth-child(even) td { background: var(--bg); }

/* ── AUTHOR BOX ── */
.author-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.8rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
  margin-top: 3rem;
}
.author-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #0A3D28);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif; font-size: 1.4rem; font-weight: 700; color: #fff;
}
.author-box h4 { font-family: 'Lora', serif; font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.author-box p { font-size: 0.85rem; color: var(--ink-light); line-height: 1.6; }

/* ── RELATED ARTICLES ── */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--ink); }
.related-section h3 {
  font-family: 'Lora', serif; font-size: 1.1rem; font-weight: 700;
  margin-bottom: 1.5rem;
}
.related-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.related-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.2rem;
  text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.07); }
.related-card .tag {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 0.6rem;
}
.related-card h4 {
  font-family: 'Lora', serif; font-size: 0.9rem; font-weight: 600;
  line-height: 1.35; color: var(--ink);
}

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 2rem; }
.sidebar-widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.5rem;
}
.widget-title {
  font-family: 'Lora', serif; font-size: 0.95rem; font-weight: 700;
  margin-bottom: 1.2rem; padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--ink);
}
.trending-list { display: flex; flex-direction: column; }
.trending-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 0.9rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: opacity 0.2s;
}
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trending-item:hover { opacity: 0.7; }
.trending-num {
  font-family: 'Lora', serif; font-size: 1.4rem; font-weight: 700;
  color: var(--border); line-height: 1; flex-shrink: 0; width: 28px; text-align: right;
}
.trending-item h4 { font-size: 0.85rem; font-weight: 600; line-height: 1.35; margin-bottom: 0.3rem; }
.trending-item span { font-size: 0.73rem; color: var(--ink-light); }

/* Newsletter */
.newsletter-widget { background: var(--accent); border-color: var(--accent); }
.newsletter-widget .widget-title { color: #fff; border-color: rgba(255,255,255,0.3); }
.newsletter-widget p { font-size: 0.85rem; color: rgba(255,255,255,0.8); line-height: 1.6; margin-bottom: 1.2rem; }
.newsletter-input {
  width: 100%; padding: 0.7rem 1rem; border-radius: 6px; border: none;
  font-family: 'Outfit', sans-serif; font-size: 0.85rem;
  margin-bottom: 0.7rem; outline: none;
}
.newsletter-btn {
  width: 100%; padding: 0.7rem; background: var(--ink); color: #fff;
  border: none; border-radius: 6px;
  font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.newsletter-btn:hover { background: #333; }
.newsletter-note { font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-top: 0.6rem; text-align: center; }

/* Topics */
.topics-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-tag {
  background: var(--bg); border: 1px solid var(--border);
  padding: 0.35rem 0.8rem; border-radius: 20px;
  font-size: 0.78rem; font-weight: 500; color: var(--ink-mid);
  text-decoration: none; transition: all 0.2s;
}
.topic-tag:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* ── FOOTER ── */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-logo { font-family: 'Lora', serif; font-size: 1.2rem; font-weight: 700; color: #fff; text-decoration: none; display: block; margin-bottom: 0.8rem; }
.footer-logo span { color: #6ED9A0; }
.footer-brand p { font-size: 0.83rem; line-height: 1.7; }
.footer-col h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: 1rem; font-weight: 600; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.85rem; color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem;
  display: flex; justify-content: space-between; font-size: 0.78rem; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ── TAG COLORS ── */
.tag-ai, .cat-ai { background: var(--tag-ai); color: var(--tag-ai-text); }
.tag-career, .cat-career { background: var(--tag-career); color: var(--tag-career-text); }
.tag-tips, .tag-analytics { background: var(--tag-tips); color: var(--tag-tips-text); }
.tag-tools { background: #FEF9EE; color: #B07D12; }
.tag-news, .tag-technology { background: #F5F0FF; color: #6B3DC2; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .nav-cats { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .author-box { flex-direction: column; }
}


/* Category List Widget */
.cat-list { display: flex; flex-direction: column; gap: 0; }
.cat-list-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--ink); transition: opacity 0.2s;
}
.cat-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.cat-list-item:hover { opacity: 0.7; }
.cat-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.cat-name { font-size: 0.88rem; font-weight: 600; flex: 1; }
.cat-count {
  font-size: 0.75rem; font-weight: 700;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--ink-light); padding: 0.15rem 0.55rem; border-radius: 20px;
}

/* Hamburger */
.hamburger { display:none; flex-direction:column; gap:5px; cursor:pointer; padding:4px; background:none; border:none; }
.hamburger span { display:block; width:22px; height:2px; background:var(--ink); border-radius:2px; transition:all 0.3s; }

/* Mobile menu */
.mobile-menu { display:none; flex-direction:column; background:var(--surface); border-bottom:1px solid var(--border); padding:1rem 2rem; }
.mobile-menu.open { display:flex; }
.mobile-menu a { font-size:0.95rem; font-weight:500; color:var(--ink-mid); text-decoration:none; padding:0.7rem 0; border-bottom:1px solid var(--border); transition:color 0.2s; }
.mobile-menu a:last-child { border-bottom:none; }
.mobile-menu a:hover { color:var(--accent); }
.mobile-search { display:flex; align-items:center; gap:0.5rem; background:var(--bg); border:1px solid var(--border); border-radius:20px; padding:0.5rem 1rem; margin-bottom:0.5rem; }
.mobile-search input { border:none; background:transparent; outline:none; font-family:'Outfit',sans-serif; font-size:0.9rem; color:var(--ink); width:100%; }

/* Featured image in article */
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  display: block;
}

@media (max-width:768px) {
  .nav-cats { display:none; }
  .search-box { display:none; }
  .hamburger { display:flex; }
  .article-title { font-size:1.6rem; }
  .content-layout { gap:2rem; }
  .footer-bottom { flex-direction:column; gap:0.5rem; }
}

/* Fix featured hero tag overlap */

/* Fix article image on mobile */
@media (max-width:768px) {
  .article-title { font-size:1.5rem; line-height:1.3; }
}

/* Featured hero fix */
.featured-main {
  padding: 2.5rem;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.75rem;
  min-height: 420px;
  background-color: #0F3D28;
}
.featured-main .tag { display:inline-block; width:fit-content; position:static; }
.featured-main h2 { font-family:'Lora',serif; font-size:clamp(1.3rem,2.2vw,1.9rem); font-weight:700; line-height:1.25; color:#fff; margin:0; }
.featured-main .excerpt { font-size:0.9rem; color:rgba(255,255,255,0.75); line-height:1.65; margin:0; }
