/* ═══════════════════════════════════════════════════════════
   ZENTIQ ENGINEERING BLOG & DEVLOG HUB — STYLES
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  --bg-deep:        #080808;
  --bg-surface:     #0d0d0d;
  --bg-card:        #121212;
  --bg-card-hover:  #181818;
  --border:         rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(255, 255, 255, 0.16);
  --accent-green:   #00f0ff;
  --accent-blue:    #a855f7;
  --accent-violet:  #a78bfa;
  --accent-warm:    #fbbf24;
  --accent-cyan:    #22d3ee;
  --text-primary:   #f5f5f5;
  --text-secondary: #8e8e93;
  --text-muted:     #4d4d52;
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --font-sans:      'Inter', system-ui, sans-serif;
  --font-display:   'Syne', sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --nav-height:     70px;
  --container:      1240px;
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(0, 240, 255, 0.05) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
}

/* ── NAV ── */

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #080808; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #00f0ff, #a855f7, #ec4899); border-radius: 8px; border: 2px solid #080808; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #38bdf8, #c084fc, #f472b6); }
html { scrollbar-width: thin; scrollbar-color: #a855f7 #080808; }

.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 60px);
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.nav__link:hover, .nav__link.active { color: var(--text-primary); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.nav__btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.nav__btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.nav__btn--primary {
  background: var(--accent-green);
  color: #000;
  border: none;
}
.nav__btn--primary:hover {
  background: #c8f5bc;
  transform: translateY(-1px);
}

/* ── CONTAINER ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* ════════════════════════════════════════
   HERO / EDITORIAL HEADER
   ════════════════════════════════════════ */
.blog-hero {
  padding: calc(var(--nav-height) + 60px) 0 40px;
  text-align: center;
}

.blog-hero__caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.blog-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero__desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ════════════════════════════════════════
   FEATURED SPOTLIGHT ARTICLE
   ════════════════════════════════════════ */
.featured-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 60px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.featured-article:hover {
  border-color: var(--border-hover);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 240, 255, 0.12);
  transform: translateY(-4px);
}

.featured-article__media {
  position: relative;
  background: #050505;
  overflow: hidden;
  min-height: 380px;
}

.featured-article__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-article:hover .featured-article__img {
  transform: scale(1.05);
}

.featured-article__content {
  padding: 44px clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.featured-article__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.featured-article__excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
}

.article-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #000;
}

.author-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-read-article {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-read-article:hover {
  background: var(--accent-green);
  color: #000;
  border-color: var(--accent-green);
}

/* ════════════════════════════════════════
   CATEGORY FILTERS
   ════════════════════════════════════════ */
.category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.category-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.category-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.category-pill.active {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-green);
  border-color: rgba(0, 240, 255, 0.3);
}

/* ════════════════════════════════════════
   ARTICLE GRID
   ════════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
  margin-bottom: 80px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.blog-card__media {
  width: 100%;
  aspect-ratio: 16 / 9.5;
  background: #000;
  overflow: hidden;
  position: relative;
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card__img {
  transform: scale(1.06);
}

.blog-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.blog-card__excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ════════════════════════════════════════
   NEWSLETTER SUBSCRIPTION SECTION
   ════════════════════════════════════════ */
.newsletter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 56px clamp(24px, 5vw, 64px);
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.newsletter-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-green), transparent);
}

.newsletter-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 30px;
}

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

.newsletter-input {
  flex: 1;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}
.newsletter-input:focus { border-color: var(--accent-green); }

.newsletter-btn {
  background: var(--accent-green);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform var(--transition);
}
.newsletter-btn:hover { transform: translateY(-1px); }

/* ════════════════════════════════════════
   ARTICLE READER MODAL
   ════════════════════════════════════════ */
.article-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.article-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.article-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 860px;
  max-height: 85vh;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.article-modal-overlay.open .article-modal {
  transform: translateY(0);
}

.article-modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.article-modal__close:hover {
  background: #fff;
  color: #000;
}

.article-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 14px;
}

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

.article-content pre {
  background: #050505;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #00f0ff;
  overflow-x: auto;
  margin: 24px 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .featured-article { grid-template-columns: 1fr; }
  .featured-article__media { min-height: 240px; }
  .blog-grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}
