/* ── Reset & Variables ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #07090f;
  --bg-2:        #0d1117;
  --bg-card:     #111827;
  --bg-card-h:   #161f2e;
  --border:      #1c2a3a;
  --border-h:    #263447;
  --text-1:      #f0f4f8;
  --text-2:      #8899aa;
  --text-3:      #556678;
  --blue:        #3b82f6;
  --blue-h:      #2563eb;
  --cyan:        #06b6d4;
  --purple:      #8b5cf6;
  --green:       #22c55e;
  --red:         #ef4444;
  --orange:      #f97316;
  --r:           14px;
  --r-sm:        8px;
  --shadow:      0 8px 32px rgba(0,0,0,.5);
  --transition:  0.22s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ── Shared Components ─────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  padding: 11px 24px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--blue-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,130,246,.35);
}
.btn-arrow { font-size: 1rem; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  color: var(--text-1);
  border: 1px solid var(--border-h);
  padding: 11px 32px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: var(--transition);
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Tags */
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}
.tag--ai         { background: rgba(139,92,246,.18); color: #a78bfa; border: 1px solid rgba(139,92,246,.3); }
.tag--cyber      { background: rgba(239,68,68,.18);  color: #f87171; border: 1px solid rgba(239,68,68,.3);  }
.tag--iot        { background: rgba(6,182,212,.18);  color: #22d3ee; border: 1px solid rgba(6,182,212,.3);  }
.tag--electronics{ background: rgba(34,197,94,.18);  color: #4ade80; border: 1px solid rgba(34,197,94,.3);  }
.tag--review     { background: rgba(249,115,22,.18); color: #fb923c; border: 1px solid rgba(249,115,22,.3); }

/* Logo */
.logo-wrap {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--blue);
  flex-shrink: 0;
}
.nav-logo { width: 100%; height: 100%; object-fit: cover; }
.logo-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; font-weight: 800; font-size: .85rem;
  align-items: center; justify-content: center;
}

/* ── Navbar ────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(7,9,15,.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,.6); }

.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
  height: 64px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.brand-text {
  font-size: 1.1rem; font-weight: 800;
  letter-spacing: -.025em; color: var(--text-1);
}
.brand-accent { color: var(--cyan); }

.nav-links {
  display: flex; list-style: none;
  gap: 2px; flex: 1;
}
.nav-link {
  display: block;
  color: var(--text-2); font-size: .875rem; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text-1);
  background: rgba(255,255,255,.06);
}

.btn-subscribe {
  background: var(--blue); color: #fff;
  padding: 7px 18px; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.btn-subscribe:hover { background: var(--blue-h); transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column;
  justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; padding: 4px; margin-left: auto;
}
.hamburger span {
  display: block; height: 2px; width: 100%;
  background: var(--text-2); border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column;
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 12px 24px 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text-2); font-size: .95rem; font-weight: 500;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--text-1); }
.mobile-subscribe {
  margin-top: 12px;
  background: var(--blue); color: #fff !important;
  text-align: center; padding: 10px 0 !important;
  border-radius: 8px; border: none !important; font-weight: 600;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  padding: 88px 0 80px;
}
.hero-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.hero-glow--left {
  top: -180px; left: -180px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(59,130,246,.1) 0%, transparent 65%);
}
.hero-glow--right {
  bottom: -120px; right: -80px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(139,92,246,.08) 0%, transparent 65%);
}

.hero-container {
  max-width: 740px; margin: 0 auto; padding: 0 24px;
  position: relative; z-index: 1;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.25);
  color: var(--blue); font-size: .75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 28px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900; line-height: 1.12;
  letter-spacing: -.035em; margin-bottom: 22px;
  background: linear-gradient(135deg, #f0f4f8 0%, #8899aa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-excerpt {
  font-size: 1.05rem; color: var(--text-2);
  line-height: 1.75; margin-bottom: 32px; max-width: 600px;
}

.hero-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 36px; flex-wrap: wrap;
}
.author-info { display: flex; align-items: center; gap: 12px; }

.author-avatar, .author-avatar-fallback {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border-h); flex-shrink: 0;
}
.author-avatar-fallback {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; font-weight: 800; font-size: .8rem;
  display: none; align-items: center; justify-content: center;
}
.author-name { display: block; font-weight: 600; font-size: .9rem; }
.post-meta-text { font-size: .8rem; color: var(--text-3); }

/* ── Stat Bar ──────────────────────────────────────────── */
.stat-bar {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.stat-bar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 0;
  justify-content: center; flex-wrap: wrap; gap: 4px;
}
.stat-item {
  font-size: .85rem; color: var(--text-2);
  padding: 4px 20px; white-space: nowrap;
}
.stat-num { font-weight: 700; color: var(--cyan); }
.stat-divider {
  width: 1px; height: 20px;
  background: var(--border); flex-shrink: 0;
}

/* ── Filter Bar ────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow-x: auto;
}
.filter-bar .container { display: flex; gap: 8px; }
.filter-btn {
  background: none; border: 1px solid var(--border-h);
  color: var(--text-2); padding: 6px 16px;
  border-radius: 100px; font-size: .83rem; font-weight: 500;
  white-space: nowrap; transition: var(--transition);
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Main / Posts ──────────────────────────────────────── */
.main { padding: 56px 0 80px; }

.section-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 32px;
}
.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; }
.view-all { color: var(--blue); font-size: .875rem; font-weight: 500; transition: opacity var(--transition); }
.view-all:hover { opacity: .75; }

/* Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-h);
  box-shadow: var(--shadow);
}

/* Card image strips */
.card-image {
  height: 168px; flex-shrink: 0;
  position: relative;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 14px;
}
.card-tag {
  font-size: .7rem; font-weight: 700; padding: 3px 9px;
  border-radius: 100px; text-transform: uppercase; letter-spacing: .04em;
  backdrop-filter: blur(8px);
}
.card-tag.tag--ai         { background: rgba(139,92,246,.8); color: #fff; border: none; }
.card-tag.tag--cyber      { background: rgba(239,68,68,.8);  color: #fff; border: none; }
.card-tag.tag--iot        { background: rgba(6,182,212,.8);  color: #fff; border: none; }
.card-tag.tag--electronics{ background: rgba(34,197,94,.8);  color: #fff; border: none; }
.card-tag.tag--review     { background: rgba(249,115,22,.8); color: #fff; border: none; }

/* Gradient swatches */
.grad-purple { background: linear-gradient(135deg,#667eea,#764ba2); }
.grad-red    { background: linear-gradient(135deg,#f093fb,#f5576c); }
.grad-cyan   { background: linear-gradient(135deg,#4facfe,#00f2fe); }
.grad-green  { background: linear-gradient(135deg,#43e97b,#38f9d7); }
.grad-orange { background: linear-gradient(135deg,#fa709a,#fee140); }
.grad-pink   { background: linear-gradient(135deg,#a18cd1,#fbc2eb); }
.grad-indigo { background: linear-gradient(135deg,#4776e6,#8e54e9); }
.grad-teal   { background: linear-gradient(135deg,#0f2027,#203a43,#2c5364); }
.grad-amber  { background: linear-gradient(135deg,#f7971e,#ffd200); }

/* Card body */
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }

.card-title {
  font-size: .975rem; font-weight: 700; line-height: 1.42;
  letter-spacing: -.015em; margin-bottom: 10px; color: var(--text-1);
}
.card-excerpt {
  font-size: .855rem; color: var(--text-2); line-height: 1.65;
  margin-bottom: 18px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.read-time   { font-size: .78rem; font-weight: 600; color: var(--cyan); }
.card-date   { font-size: .78rem; color: var(--text-3); }

.load-more-wrap { text-align: center; margin-top: 48px; }

/* ── About Strip ───────────────────────────────────────── */
.about-strip {
  background: var(--bg-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 56px 0;
}
.about-strip-inner {
  max-width: 820px; margin: 0 auto;
  display: flex; gap: 36px; align-items: flex-start;
}
.about-avatar, .about-avatar-fallback {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--blue); flex-shrink: 0;
}
.about-avatar-fallback {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; font-weight: 800; font-size: 1.3rem;
  display: none; align-items: center; justify-content: center;
}
.about-text h3 {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.025em; margin-bottom: 10px;
}
.about-text p {
  color: var(--text-2); line-height: 1.75; font-size: .9rem; margin-bottom: 16px;
}
.about-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.about-tags span {
  background: rgba(255,255,255,.05); border: 1px solid var(--border-h);
  color: var(--text-2); font-size: .78rem; font-weight: 500;
  padding: 4px 12px; border-radius: 100px;
}

/* ── Newsletter ────────────────────────────────────────── */
.newsletter {
  position: relative; overflow: hidden;
  background: var(--bg-2); padding: 80px 0;
}
.newsletter-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(59,130,246,.07) 0%, transparent 70%);
  pointer-events: none;
}
.newsletter-box {
  max-width: 560px; margin: 0 auto;
  text-align: center; position: relative; z-index: 1;
}
.newsletter-icon {
  font-size: 2.2rem; margin-bottom: 20px;
}
.newsletter-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900; letter-spacing: -.03em; margin-bottom: 12px;
}
.newsletter-sub {
  color: var(--text-2); font-size: .95rem;
  line-height: 1.7; margin-bottom: 28px;
}
.newsletter-form {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.newsletter-input {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border-h);
  color: var(--text-1); padding: 11px 16px; border-radius: var(--r-sm);
  font-size: .9rem; font-family: inherit; outline: none;
  transition: border-color var(--transition);
}
.newsletter-input:focus { border-color: var(--blue); }
.newsletter-input::placeholder { color: var(--text-3); }
.newsletter-note { font-size: .8rem; color: var(--text-3); }
.newsletter-note strong { color: var(--text-2); }

/* ── Footer ────────────────────────────────────────────── */
.footer { background: var(--bg-2); padding: 64px 0 32px; }

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 56px; margin-bottom: 48px;
}

.footer-logo-link { margin-bottom: 16px; display: inline-flex; }

.footer-desc {
  color: var(--text-2); font-size: .855rem;
  line-height: 1.75; margin: 16px 0 24px; max-width: 320px;
}
.social-row { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.05); border: 1px solid var(--border-h);
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.social-btn:hover {
  background: rgba(59,130,246,.15); border-color: var(--blue); color: var(--blue);
}

.footer-heading {
  font-size: .75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 18px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
  color: var(--text-2); font-size: .875rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-1); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.footer-bottom p { color: var(--text-3); font-size: .8rem; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .btn-subscribe { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 56px 0 56px; }
  .stat-bar-inner { gap: 0; justify-content: flex-start; overflow-x: auto; }
  .stat-divider { display: none; }

  .posts-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }

  .about-strip-inner { flex-direction: column; align-items: center; text-align: center; }
  .about-tags { justify-content: center; }

  .newsletter-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .section-title { font-size: 1.25rem; }
}
