/*
Theme Name: Chao AI Personal Brand
Theme URI: https://example.com/chao-ai
Author: Codex
Author URI: https://example.com
Description: A WordPress personal brand homepage theme inspired by the provided Chao AI design.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: chao-ai-personal-brand
*/

:root {
  --brand: #6651ff;
  --brand-deep: #4d3ff0;
  --brand-soft: #f0edff;
  --ink: #11182f;
  --ink-2: #1d2440;
  --muted: #65708c;
  --line: #e9ecf7;
  --paper: #ffffff;
  --page: #fbfcff;
  --blue: #2f76ff;
  --green: #25c985;
  --orange: #ff8b3d;
  --pink: #ed4ba1;
  --shadow: 0 18px 48px rgba(64, 69, 120, 0.11);
  --shadow-soft: 0 8px 28px rgba(65, 70, 130, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 5%, rgba(111, 87, 255, 0.12), transparent 31%),
    radial-gradient(circle at 80% 10%, rgba(54, 128, 255, 0.09), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #ffffff 58%, #fbfcff 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Heiti SC", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

.site-shell {
  overflow: hidden;
}

.wrap {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 255, 0.86);
  border-bottom: 1px solid rgba(229, 232, 245, 0.62);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 14px;
  min-width: 270px;
}

.brand-script {
  display: inline-block;
  color: var(--brand);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-11deg);
}

.brand-title {
  display: block;
  color: #0c1328;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-subtitle {
  display: block;
  margin-top: 4px;
  color: #8891aa;
  font-size: 10px;
  font-weight: 600;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 38px;
  color: #11182f;
  font-size: 13px;
  font-weight: 800;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a.is-active {
  color: var(--brand);
}

.main-nav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: -12px;
  left: 0;
  height: 3px;
  background: var(--brand);
  border-radius: 99px;
  content: "";
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #0d1834;
  background: transparent;
  cursor: pointer;
}

.icon-button svg,
.button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(98, 81, 255, 0.24);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #7761ff, #563ff2);
}

.button-secondary {
  color: #27304f;
  background: #fff;
  border-color: #e5e8f4;
  box-shadow: var(--shadow-soft);
}

.hero {
  padding: 64px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(430px, 0.85fr) minmax(480px, 1.15fr);
  align-items: center;
  gap: 38px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 18px;
  padding: 0 12px;
  border-radius: 8px;
  color: #6c7290;
  background: rgba(245, 246, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  color: #080b14;
  font-size: clamp(42px, 3.8vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 900;
}

.hero h1 span {
  color: var(--brand);
}

.hero-copy {
  max-width: 505px;
  margin: 22px 0 24px;
  color: #404a68;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-art {
  position: relative;
  min-height: 324px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-art::before {
  position: absolute;
  inset: 8% 2% 6% 16%;
  background: radial-gradient(circle, rgba(104, 84, 255, 0.17), transparent 68%);
  filter: blur(14px);
  content: "";
}

.hero-visual-scene {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  min-height: 358px;
  overflow: visible;
  background: transparent;
}

.hero-person {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 246px;
  max-width: 42%;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 28px rgba(33, 31, 68, 0.1));
}

.hero-tag {
  position: absolute;
  z-index: 4;
  min-width: 114px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #15203b;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(231, 233, 246, 0.86);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(80, 88, 145, 0.13);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.tag-growth {
  top: 72px;
  left: 82px;
}

.tag-geo {
  top: 158px;
  left: 30px;
}

.tag-startup {
  top: 252px;
  left: 2px;
}

.tag-agent {
  top: 72px;
  right: 58px;
}

.tag-quant {
  top: 158px;
  right: 8px;
}

.tag-product {
  top: 252px;
  right: 52px;
}

.orbit-line {
  position: absolute;
  z-index: 1;
  width: 150px;
  height: 96px;
  border-top: 2px solid rgba(127, 106, 255, 0.24);
  border-radius: 50%;
  transform: rotate(8deg);
}

.orbit-line-left {
  top: 123px;
  left: 95px;
}

.orbit-line-right {
  top: 124px;
  right: 99px;
  transform: rotate(-8deg);
}

.hero-signature {
  position: absolute;
  right: 8px;
  bottom: 32px;
  z-index: 3;
  color: var(--brand);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-13deg);
}

.stats {
  margin-top: 20px;
}

.stats-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.stat:nth-child(2) .stat-icon {
  color: var(--blue);
  background: #edf4ff;
}

.stat:nth-child(3) .stat-icon {
  color: var(--green);
  background: #eaf9f2;
}

.stat:nth-child(4) .stat-icon {
  color: var(--orange);
  background: #fff2e8;
}

.stat strong {
  display: block;
  color: #141a34;
  font-size: 29px;
  line-height: 1.1;
  font-weight: 900;
}

.stat b {
  display: block;
  margin-top: 2px;
  color: #252d4d;
  font-size: 12px;
  line-height: 1.3;
}

.stat span:last-child {
  display: block;
  margin-top: 2px;
  color: #7a849d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.section {
  padding: 24px 0 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 16px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #11182f;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
}

.section-title .num,
.panel-num {
  color: var(--brand);
  font-size: 20px;
  font-weight: 900;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

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

.feature-card {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  padding: 22px 22px 18px;
  background:
    radial-gradient(circle at 82% 48%, rgba(103, 82, 255, 0.12), transparent 36%),
    #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.feature-card:nth-child(3) {
  background:
    radial-gradient(circle at 86% 50%, rgba(255, 154, 71, 0.18), transparent 45%),
    linear-gradient(100deg, #fff 0%, #fff6f1 100%);
}

.feature-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 6px;
  color: #11182f;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
}

.feature-card p {
  position: relative;
  z-index: 2;
  margin: 0 0 13px;
  color: #68728c;
  font-size: 12px;
  font-weight: 700;
}

.mini-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  width: 44%;
  margin: 0 0 16px;
  padding: 0;
  color: #58617d;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.mini-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-list li::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.feature-link {
  position: relative;
  z-index: 2;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.feature-art {
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 42%;
  opacity: 0.98;
}

.feature-card:nth-child(2) .feature-art {
  right: 10px;
  width: 43%;
}

.feature-card:nth-child(3) .feature-art {
  right: 16px;
  bottom: 12px;
  width: 44%;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.topic-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(63, 70, 125, 0.055);
}

.topic-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 13%, white);
}

.topic-icon svg {
  width: 21px;
  height: 21px;
}

.topic-card h3 {
  margin: 0 0 3px;
  color: #1a2038;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #8a93aa;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.topic-heat {
  color: #f48622;
}

.lower-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.panel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 304px;
  overflow: hidden;
  padding: 20px 20px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel-card > *:not(.panel-art) {
  position: relative;
  z-index: 1;
}

.panel-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.panel-head h3 {
  margin: 0;
  color: #11182f;
  font-size: 17px;
  font-weight: 900;
}

.panel-subtitle {
  margin: 0 0 18px;
  color: #68728c;
  font-size: 12px;
  font-weight: 700;
}

.panel-list {
  display: grid;
  gap: 11px;
  max-width: 68%;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #3c4666;
  font-size: 13px;
  font-weight: 800;
}

.panel-list li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-list li::before {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(102, 81, 255, 0.45);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 0 4px rgba(102, 81, 255, 0.11);
}

.panel-art {
  position: absolute;
  right: 26px;
  bottom: 54px;
  z-index: 0;
  width: 100px;
  margin: 0;
  transform: none;
  opacity: 0.92;
  pointer-events: none;
}

.panel-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.panel-fill {
  width: min(100%, 68%);
  margin-top: auto;
  padding: 11px 12px;
  background:
    radial-gradient(circle at 12% 20%, rgba(102, 81, 255, 0.1), transparent 28%),
    rgba(249, 250, 255, 0.86);
  border: 1px solid #ecebfb;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(65, 70, 130, 0.07);
}

.panel-fill-products {
  width: 100%;
}

.panel-fill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.panel-fill-grid span {
  min-width: 0;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(102, 81, 255, 0.1);
  border-radius: 10px;
}

.panel-fill-grid strong {
  display: block;
  color: var(--brand);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.panel-fill-grid em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #6f7893;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-fill p {
  margin: 8px 0 0;
  color: #747e98;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.latest-articles-panel {
  min-height: 304px;
  padding: 20px 20px 18px;
  background: #fffdf9;
  border-color: #eee2d6;
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(95, 76, 54, 0.08);
}

.latest-articles-panel .panel-head {
  gap: 10px;
  margin-bottom: 6px;
}

.latest-articles-panel .panel-num {
  color: var(--brand);
  font-size: 20px;
  line-height: inherit;
}

.latest-articles-panel .panel-head h3 {
  color: #120f2a;
  font-size: 17px;
  line-height: inherit;
}

.latest-articles-panel .panel-subtitle {
  margin-bottom: 14px;
  color: #6f7c99;
  font-size: 12px;
}

.latest-articles-panel .panel-link {
  margin-top: 14px;
  font-size: 13px;
}

.post-list {
  display: grid;
  gap: 8px;
}

.post-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 9px 10px;
  background: #fffdf9;
  border: 1px solid #ede1d4;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(95, 76, 54, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.post-item:hover,
.post-item:focus-visible {
  border-color: rgba(240, 88, 61, 0.28);
  box-shadow: 0 20px 42px rgba(95, 76, 54, 0.1);
  transform: translateY(-2px);
  outline: none;
}

.post-content {
  display: block;
  min-width: 0;
}

.post-title-row {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.post-item h4 {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: #2c241f;
  font-size: 12px;
  line-height: 1.24;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.post-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px 3px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.post-badge-1 {
  background: #ffe5df;
  color: #f0583d;
}

.post-badge-2 {
  background: #eaf2ff;
  color: #246fd8;
}

.post-excerpt {
  display: none;
  max-width: 860px;
  margin-top: 9px;
  color: #756a62;
  font-size: 18px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-item time {
  display: block;
  margin-top: 5px;
  color: #f0583d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
}

.post-arrow {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff0ea;
  color: #ff714f;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.post-item:hover .post-arrow,
.post-item:focus-visible .post-arrow {
  background: #ffe3d9;
  color: #f0583d;
  transform: translateX(4px);
}

.product-list {
  display: grid;
  gap: 15px;
  margin-top: 6px;
}

.product-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  align-items: center;
}

.product-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
}

.product-item:nth-child(2) .product-icon {
  color: #4b7dff;
  background: #edf3ff;
}

.product-item:nth-child(3) .product-icon {
  color: #347cff;
  background: #eff5ff;
}

.product-item:nth-child(4) .product-icon {
  color: #ff6c45;
  background: #fff0ea;
}

.product-item h4 {
  margin: 0 0 2px;
  color: #202842;
  font-size: 13px;
  font-weight: 900;
}

.product-item p {
  margin: 0;
  color: #8a93aa;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 800;
}

.newsletter {
  margin-top: 22px;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: 1fr minmax(340px, 0.48fr);
  gap: 28px;
  align-items: center;
  background:
    radial-gradient(circle at 18% 50%, rgba(102, 81, 255, 0.13), transparent 30%),
    linear-gradient(90deg, #f7f5ff 0%, #fff 100%);
  border: 1px solid #ecebfb;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.newsletter-copy {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: center;
}

.newsletter-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--brand);
  background: #fff;
  box-shadow: 0 10px 24px rgba(102, 81, 255, 0.12);
}

.newsletter h2 {
  margin: 0;
  color: #151b34;
  font-size: 20px;
  font-weight: 900;
}

.newsletter p {
  margin: 2px 0 0;
  color: #6d7690;
  font-size: 12px;
  font-weight: 800;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.newsletter-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  color: #222a43;
  background: #fff;
  border: 1px solid #e7e9f3;
  border-radius: 8px;
  outline: none;
}

.newsletter-form input::placeholder {
  color: #b4bbcc;
}

.site-footer {
  padding: 36px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr 1.35fr;
  gap: 34px;
  align-items: start;
}

.footer-brand {
  min-width: auto;
  margin-bottom: 18px;
}

.footer-about {
  max-width: 260px;
  margin: 0 0 18px;
  color: #55607a;
  font-size: 14px;
  font-weight: 700;
}

.socials {
  display: flex;
  gap: 15px;
  color: #11182f;
}

.socials a {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-column h3 {
  margin: 0 0 12px;
  color: #172039;
  font-size: 13px;
  font-weight: 900;
}

.footer-column a {
  display: block;
  margin: 0 0 7px;
  color: #69748f;
  font-size: 12px;
  font-weight: 800;
}

.quote-card {
  min-height: 124px;
  padding: 22px;
  background: linear-gradient(135deg, #f7f4ff, #ffffff);
  border: 1px solid #efecff;
  border-radius: var(--radius);
  color: #10172e;
  box-shadow: 0 12px 30px rgba(102, 81, 255, 0.08);
}

.quote-card .quote-mark {
  display: block;
  color: var(--brand);
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.quote-card p {
  margin: 8px 0 14px;
  color: #202744;
  font-size: 13px;
  line-height: 1.8;
  font-weight: 900;
}

.quote-card cite {
  display: block;
  color: #202744;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.copyright {
  margin: 32px 0 0;
  color: #a0a8ba;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .main-nav {
    gap: 22px;
  }

  .brand {
    min-width: 230px;
  }

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

  .hero-art {
    justify-content: center;
    min-height: auto;
  }

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

  .stat:nth-child(3) {
    border-left: 0;
  }

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

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .wrap {
    width: min(100% - 32px, 680px);
  }

  .header-inner {
    height: auto;
    min-height: 70px;
    gap: 16px;
  }

  .main-nav {
    display: none;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .explore-grid,
  .newsletter {
    grid-template-columns: 1fr;
  }

  .latest-articles-panel {
    padding: 28px 24px;
  }

  .latest-articles-panel .panel-head h3 {
    font-size: 27px;
  }

  .latest-articles-panel .panel-subtitle {
    font-size: 16px;
  }

  .post-item {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 22px;
    min-height: 118px;
    padding: 22px 22px;
  }

  .post-item h4 {
    font-size: 22px;
  }

  .post-excerpt {
    display: block;
    font-size: 16px;
  }

  .post-arrow {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .feature-card {
    min-height: 210px;
  }

  .panel-fill {
    width: 100%;
  }

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

@media (max-width: 620px) {
  .header-actions .button {
    display: none;
  }

  .brand-script {
    font-size: 30px;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-subtitle {
    font-size: 9px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-actions,
  .newsletter-form {
    grid-template-columns: 1fr;
    display: grid;
  }

  .button {
    width: 100%;
  }

  .stats-card,
  .catalog-grid,
  .lower-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .latest-articles-panel {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .latest-articles-panel .panel-head {
    gap: 10px;
  }

  .latest-articles-panel .panel-num {
    font-size: 30px;
  }

  .latest-articles-panel .panel-head h3 {
    font-size: 24px;
  }

  .latest-articles-panel .panel-link {
    font-size: 16px;
  }

  .post-list {
    gap: 14px;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 22px 20px;
    border-radius: 22px;
  }

  .post-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-item h4 {
    width: 100%;
    max-width: 100%;
    font-size: 20px;
  }

  .post-excerpt {
    width: 100%;
    max-width: 100%;
    font-size: 15px;
  }

  .post-item time {
    font-size: 15px;
  }

  .post-badge {
    min-height: 26px;
    padding: 3px 10px 4px;
    font-size: 13px;
  }

  .post-arrow {
    justify-self: start;
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .stat,
  .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px 8px;
  }

  .stat:first-child {
    border-top: 0;
  }

  .mini-list {
    width: 52%;
  }

  .feature-art {
    width: 42%;
  }
}
