:root {
  color-scheme: light;
  --bg: #f8f9fb;
  --surface: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #4687ff;
  --purple: #5e3bee;
  --soft: #eef4ff;
  --shadow: 0 18px 48px rgba(26, 26, 46, .1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.site-header,
.blog-nav-wrap,
main,
footer {
  padding-right: clamp(18px, 5vw, 80px);
  padding-left: clamp(18px, 5vw, 80px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(229, 231, 235, .8);
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
}

.header-left,
.header-actions,
.brand,
.main-nav {
  display: flex;
  align-items: center;
}

.header-left {
  min-width: 0;
  gap: clamp(18px, 3vw, 34px);
}

.brand {
  gap: 10px;
  font-weight: 950;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.main-nav,
.header-actions {
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.main-nav a,
.login-link,
.buy-link {
  border-radius: 12px;
  padding: 10px 12px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.main-nav a:hover,
.login-link:hover,
.buy-link:hover {
  transform: translateY(-1px);
}

.main-nav a:hover,
.login-link {
  color: var(--ink);
  background: #eef2f7;
}

.buy-link {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--purple));
  box-shadow: 0 14px 30px rgba(70, 135, 255, .26);
}

.blog-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(248, 249, 251, .92);
}

.blog-nav {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  color: #4b5563;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.blog-nav a {
  padding: 8px 0;
}

.blog-nav a:first-child,
.blog-nav a:hover {
  color: var(--brand);
}

.search-box {
  display: flex;
  align-items: center;
  min-width: min(100%, 280px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  border: 0;
  padding: 0 8px;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

main {
  padding-top: clamp(36px, 6vw, 70px);
  padding-bottom: 76px;
}

.featured-post {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(18px, 3vw, 30px);
  background: #fff;
  box-shadow: var(--shadow);
}

.featured-image,
.cover,
.pick-card {
  overflow: hidden;
  background: #dde7fb;
}

.featured-image {
  display: block;
  border-radius: 18px;
}

.featured-image img,
.cover img,
.pick-card img,
.popular-item img {
  display: block;
  width: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.featured-image img {
  aspect-ratio: 16 / 10;
}

.featured-post:hover .featured-image img,
.article-card:hover .cover img,
.pick-card:hover img {
  transform: scale(1.05);
}

.category {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 950;
}

.category.security {
  background: #ef4444;
}

.category.guide {
  background: #10b981;
}

.category.news {
  background: #f59e0b;
}

.category.knowledge {
  background: var(--purple);
}

.featured-copy h1 {
  margin-top: 16px;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.05;
}

.featured-copy p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.author-row,
.meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-row {
  margin-top: 22px;
}

.avatar {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--purple));
  font-size: 14px;
  font-weight: 950;
}

.author-row strong,
.author-row span {
  display: block;
}

.author-row span,
.meta span,
.popular-item small {
  color: var(--muted);
  font-size: 13px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--brand);
  font-weight: 950;
}

.tabs {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  margin-top: 42px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 0 14px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.tabs button.active {
  color: var(--ink);
  border-color: var(--brand);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 42px;
  align-items: start;
  margin-top: 32px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 26, 46, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
}

.article-card[hidden] {
  display: none;
}

.article-card:hover {
  border-color: rgba(70, 135, 255, .3);
  box-shadow: 0 22px 54px rgba(26, 26, 46, .14);
  transform: translateY(-6px);
}

.cover {
  display: block;
  border-radius: 12px;
}

.cover img {
  aspect-ratio: 16 / 9;
}

.article-card .category {
  margin-top: 16px;
}

.article-card h3 {
  display: -webkit-box;
  min-height: 58px;
  margin-top: 12px;
  overflow: hidden;
  font-size: 21px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-card p {
  display: -webkit-box;
  min-height: 76px;
  margin-top: 10px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.meta {
  margin-top: auto;
  padding-top: 18px;
}

.meta .avatar {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.sidebar {
  position: sticky;
  top: 130px;
  display: grid;
  gap: 20px;
}

.side-card,
.newsletter-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(26, 26, 46, .07);
}

.side-card h2,
.newsletter-card h2 {
  font-size: 24px;
}

.popular-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.popular-item img {
  aspect-ratio: 1;
  border-radius: 10px;
}

.popular-item span,
.popular-item small {
  display: block;
}

.popular-item span {
  font-weight: 950;
  line-height: 1.35;
}

.newsletter-card p,
.newsletter-wide p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.newsletter-card form,
.newsletter-wide form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

input,
button {
  font: inherit;
}

.newsletter-card input,
.newsletter-wide input {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: 0;
}

.newsletter-card button,
.newsletter-wide button {
  flex-shrink: 0;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--purple));
  font-weight: 950;
  cursor: pointer;
}

.inline-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 20px;
  padding: clamp(24px, 4vw, 38px);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--purple));
}

.inline-cta p {
  margin-top: 8px;
  color: rgba(255, 255, 255, .82);
}

.inline-cta a {
  flex-shrink: 0;
  border-radius: 14px;
  padding: 13px 18px;
  color: var(--ink);
  background: #fff;
  font-weight: 950;
}

.editor-picks {
  margin-top: 64px;
  border-radius: 24px;
  padding: clamp(22px, 4vw, 34px);
  background: #eef2f8;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title a {
  color: var(--brand);
  font-weight: 950;
}

.pick-row {
  display: grid;
  grid-auto-columns: minmax(220px, 1fr);
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  margin-top: 22px;
  padding-bottom: 4px;
}

.pick-card {
  display: block;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 26, 46, .08);
}

.pick-card img {
  aspect-ratio: 16 / 10;
}

.pick-card span {
  display: block;
  padding: 14px;
  font-weight: 950;
  line-height: 1.35;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.load-more {
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 13px 22px;
  color: var(--brand);
  font-weight: 950;
}

.newsletter-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  gap: 22px;
  align-items: center;
  margin-top: 62px;
  border-radius: 24px;
  padding: clamp(28px, 5vw, 48px);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--purple));
}

.newsletter-wide p,
.newsletter-wide small {
  color: rgba(255, 255, 255, .82);
}

.newsletter-wide small {
  grid-column: 1 / -1;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 34px;
  padding-bottom: 34px;
  background: #fff;
}

footer .brand img {
  width: 32px;
  height: 32px;
}

footer p {
  margin-top: 8px;
  color: var(--muted);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .site-header,
  .blog-nav-wrap,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-left {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav,
  .blog-nav {
    width: 100%;
    overflow-x: auto;
  }

  .header-actions,
  .search-box {
    width: 100%;
  }

  .featured-post,
  .newsletter-wide {
    grid-template-columns: 1fr;
  }

  .article-grid,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .inline-cta,
  .newsletter-card form,
  .newsletter-wide form {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-cta a,
  .newsletter-card button,
  .newsletter-wide button {
    width: 100%;
  }
}
