:root {
  color-scheme: light;
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-muted: #eef0eb;
  --text: #1d2927;
  --muted: #6b7773;
  --line: #d9dfda;
  --accent: #d86e4b;
  --accent-dark: #b95232;
  --green: #3e7666;
  --shadow: 0 18px 50px rgba(35, 53, 47, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  transition: background 180ms ease, color 180ms ease;
}

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

button {
  font: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--text);
  color: var(--surface);
  font-size: 19px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.main-nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

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

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 7px 11px;
}

.theme-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: stretch;
  gap: 58px;
  min-height: 495px;
  padding: 74px 0 88px;
}

.intro-copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

h1 {
  max-width: 600px;
  margin-bottom: 23px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
}

h1 em {
  color: var(--accent-dark);
  font-style: normal;
}

.intro-text {
  max-width: 550px;
  margin-bottom: 31px;
  color: var(--muted);
  font-size: 16px;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 7px;
  background: var(--text);
  color: var(--surface);
  font-size: 14px;
  padding: 12px 17px;
  transition: transform 180ms ease, background 180ms ease;
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.primary-button span {
  font-size: 18px;
  line-height: 1;
}

.text-link {
  border-bottom: 1px solid var(--text);
  font-size: 14px;
}

.intro-art {
  position: relative;
  min-height: 370px;
  overflow: hidden;
  border: 1px solid rgba(42, 72, 64, 0.15);
  border-radius: 18px;
  background: #cad9d1;
  box-shadow: var(--shadow);
}

.intro-art::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, transparent 0 30%, rgba(255, 255, 255, 0.23) 30% 31%, transparent 31% 57%, rgba(255, 255, 255, 0.18) 57% 58%, transparent 58%),
    linear-gradient(35deg, #90b1a2 0 22%, #557b70 22% 45%, #325e59 45% 68%, #1f4d51 68%);
  content: "";
}

.sun {
  position: absolute;
  top: 56px;
  right: 70px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: #e4b974;
  box-shadow: 0 0 0 18px rgba(228, 185, 116, 0.12);
}

.mountain {
  position: absolute;
  bottom: 100px;
  width: 0;
  height: 0;
  border-right: 190px solid transparent;
  border-bottom: 190px solid rgba(216, 232, 223, 0.76);
  border-left: 190px solid transparent;
  filter: drop-shadow(8px 9px 0 rgba(34, 80, 74, 0.35));
}

.mountain-back {
  left: -38px;
  transform: scale(1.17);
}

.mountain-front {
  right: -70px;
  bottom: 76px;
  transform: scale(1.35);
  opacity: 0.72;
}

.lake {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 116px;
  background:
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(226, 242, 233, 0.18) 14px 16px),
    #2e6667;
}

.art-caption {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.83);
  font-size: 11px;
  letter-spacing: 0.07em;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding: 53px 0 25px;
}

.section-heading h2,
.about-section h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  font-weight: 600;
  line-height: 1.2;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 7px 13px;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 90px;
}

.article-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 24px;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.article-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.article-card.featured {
  grid-column: span 2;
  border-color: rgba(216, 110, 75, 0.35);
  background: #fff9f4;
}

.card-top,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-tag {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
}

.category-tag.investment {
  background: #fbe0d6;
  color: #a64e35;
}

.category-tag.tech {
  background: #dcebe6;
  color: #2f6657;
}

.category-tag.life {
  background: #eee7d4;
  color: #79693e;
}

.read-time,
.card-footer time {
  color: var(--muted);
  font-size: 11px;
}

.article-card h3 {
  max-width: 500px;
  margin: 42px 0 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.25;
}

.article-card:not(.featured) h3 {
  font-size: 23px;
}

.article-card p {
  max-width: 540px;
  color: var(--muted);
  font-size: 14px;
}

.card-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}

.card-link {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.about-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding: 56px 0 66px;
}

.about-avatar {
  display: grid;
  width: 83px;
  height: 83px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
}

.about-section h2 {
  margin-bottom: 11px;
  font-size: 28px;
}

.about-section p:not(.eyebrow) {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.about-meta {
  display: grid;
  gap: 3px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  color: var(--muted);
  font-size: 12px;
}

.about-meta strong {
  color: var(--text);
  font-size: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 22px 0 30px;
}

body.dark {
  --bg: #15201f;
  --surface: #1d2b29;
  --surface-muted: #243632;
  --text: #e9f0eb;
  --muted: #aebdb6;
  --line: #38504a;
  --accent: #ee9471;
  --accent-dark: #f2a17e;
  --green: #437f6e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

body.dark .brand-mark,
body.dark .primary-button,
body.dark .filter-button:hover,
body.dark .filter-button.active {
  background: #e9f0eb;
  color: #15201f;
}

body.dark .article-card.featured {
  background: #2a2725;
}

body.dark .category-tag.investment {
  background: #4a3029;
  color: #f2a17e;
}

@media (max-width: 800px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 32px, 640px);
  }

  .site-header {
    min-height: 74px;
  }

  .main-nav {
    display: none;
  }

  .intro-section {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 47px 0 60px;
  }

  .intro-art {
    min-height: 290px;
  }

  h1 {
    font-size: 45px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .article-grid {
    grid-template-columns: 1fr;
    padding-bottom: 65px;
  }

  .article-card.featured {
    grid-column: auto;
  }

  .about-section {
    grid-template-columns: auto 1fr;
  }

  .about-meta {
    grid-column: 2;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 17px;
    padding-left: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: 5px;
  }
}
