@font-face {
  font-family: "HY YiSong Jian Local";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/%E6%B1%89%E4%BB%AA%E6%84%8F%E5%AE%8B%E7%AE%80.ttf") format("truetype");
}

:root {
  --black-tea: #080b08;
  --ink: #0e140f;
  --ink-2: #151d16;
  --forest: #17281b;
  --forest-soft: #233627;
  --jade: #829474;
  --gold: #d6b46f;
  --gold-soft: #f0d695;
  --ivory: #fff7e6;
  --ivory-soft: rgba(255, 247, 230, 0.74);
  --muted: rgba(255, 247, 230, 0.56);
  --line: rgba(214, 180, 111, 0.24);
  --shadow: rgba(0, 0, 0, 0.48);
  --nav-h: 76px;
  --font-display: "HY YiSong Jian Local", "汉仪意宋简", "HYYiSongJ", "HY YiSongJ", "Noto Serif SC", "STZhongsong", "华文中宋", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "HY YiSong Jian Local", "汉仪意宋简", "HYYiSongJ", "HY YiSongJ", "Noto Serif SC", "STZhongsong", "华文中宋", "Songti SC", "STSong", "SimSun", serif;
  --font-ui: "HY YiSong Jian Local", "汉仪意宋简", "HYYiSongJ", "HY YiSongJ", "Noto Serif SC", "STZhongsong", "华文中宋", "Songti SC", "STSong", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black-tea);
}

body {
  margin: 0;
  color: var(--ivory);
  background:
    radial-gradient(circle at 52% -10%, rgba(214, 180, 111, 0.11), transparent 34%),
    linear-gradient(180deg, #060806 0%, #0d120e 42%, #080b08 100%);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.045em;
  overflow-x: hidden;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-body);
}

main {
  position: relative;
  background:
    radial-gradient(circle at 18% 0%, rgba(214, 180, 111, 0.11), transparent 24%),
    radial-gradient(circle at 82% 38%, rgba(168, 132, 74, 0.08), transparent 22%),
    linear-gradient(180deg, #0c0f0c 0%, #101410 34%, #111611 68%, #0c0f0c 100%);
}

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

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

.nav-hover-zone {
  position: fixed;
  z-index: 29;
  top: 0;
  left: 0;
  right: 0;
  height: 128px;
  pointer-events: none;
}

body.nav-condensed .nav-hover-zone {
  pointer-events: auto;
}

.nav {
  position: fixed;
  z-index: 30;
  top: 18px;
  left: 50%;
  width: min(1200px, calc(100% - 36px));
  min-height: var(--nav-h);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 12px 14px 12px 20px;
  border: 1px solid rgba(214, 180, 111, 0.23);
  background: linear-gradient(180deg, rgba(10, 14, 10, 0.78), rgba(12, 18, 13, 0.56));
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  isolation: isolate;
  transition:
    top 560ms cubic-bezier(0.22, 1, 0.36, 1),
    width 560ms cubic-bezier(0.22, 1, 0.36, 1),
    min-height 560ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 420ms ease,
    box-shadow 560ms ease;
}

.nav::before,
.nav::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid rgba(214, 180, 111, 0.08);
}

.nav::after {
  inset: auto 18px -1px 18px;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(214, 180, 111, 0.55), transparent);
}

.nav-menu-toggle {
  position: relative;
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--gold-soft);
  background: transparent;
  cursor: pointer;
}

.nav-menu-toggle span {
  position: absolute;
  left: 15px;
  width: 22px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 12px rgba(214, 180, 111, 0.3);
  transition: transform 220ms ease, opacity 160ms ease, top 220ms ease;
}

.nav-menu-toggle span:nth-child(1) {
  top: 18px;
}

.nav-menu-toggle span:nth-child(2) {
  top: 26px;
}

.nav-menu-toggle span:nth-child(3) {
  top: 34px;
}

.nav.is-condensed {
  top: 8px;
  width: min(640px, calc(100% - 96px));
  min-height: 42px;
  padding: 7px 18px;
  grid-template-columns: auto;
  justify-items: center;
  gap: 0;
  transform: translateX(-50%) scale(0.94);
  opacity: 0.62;
}

.nav-hover-zone:hover ~ .nav.is-condensed,
.nav.is-condensed:hover,
.nav.is-condensed:focus-within {
  top: 18px;
  width: min(1200px, calc(100% - 36px));
  min-height: var(--nav-h);
  padding: 12px 14px 12px 20px;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  transform: translateX(-50%);
  opacity: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ivory);
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  border: 1px solid rgba(214, 180, 111, 0.56);
  background:
    linear-gradient(135deg, rgba(214, 180, 111, 0.18), transparent 42%),
    rgba(8, 11, 8, 0.54);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 18px rgba(214, 180, 111, 0.12), 0 10px 26px rgba(0, 0, 0, 0.32);
}

.brand-mark::before,
.brand-mark::after,
.cornered::before,
.cornered::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(214, 180, 111, 0.58);
  border-style: solid;
  pointer-events: none;
}

.brand-mark::before,
.cornered::before {
  left: 4px;
  top: 4px;
  border-width: 1px 0 0 1px;
}

.brand-mark::after,
.cornered::after {
  right: 4px;
  bottom: 4px;
  border-width: 0 1px 1px 0;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 38px);
  padding: 0;
  margin: 0;
  list-style: none;
  color: rgba(255, 247, 230, 0.74);
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 0.13em;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 2px;
  transition: color 180ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links .active a {
  color: var(--ivory);
}

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

.nav-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  --btn-bg: rgba(214, 180, 111, 0.06);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  overflow: hidden;
  border: 1px solid rgba(214, 180, 111, 0.66);
  color: var(--ivory);
  background: var(--btn-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.04), 0 16px 36px rgba(0, 0, 0, 0.22);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.btn::before,
.btn::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.btn::before {
  inset: 5px;
  border: 1px solid rgba(214, 180, 111, 0.16);
  background:
    linear-gradient(90deg, rgba(214, 180, 111, 0.45), rgba(214, 180, 111, 0.45)) left top / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(214, 180, 111, 0.45), rgba(214, 180, 111, 0.45)) left top / 1px 12px no-repeat,
    linear-gradient(90deg, rgba(214, 180, 111, 0.45), rgba(214, 180, 111, 0.45)) right bottom / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(214, 180, 111, 0.45), rgba(214, 180, 111, 0.45)) right bottom / 1px 12px no-repeat;
}

.btn::after {
  top: -30%;
  bottom: -30%;
  left: -45%;
  width: 38%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 247, 230, 0.34), transparent);
  transition: left 420ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 214, 149, 0.98);
  background: rgba(214, 180, 111, 0.13);
  color: #fff9e8;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34), 0 0 28px rgba(214, 180, 111, 0.13);
}

.btn:hover::after {
  left: 110%;
}

.btn-primary {
  background: linear-gradient(180deg, rgba(214, 180, 111, 0.24), rgba(214, 180, 111, 0.08));
}

.chat-trigger {
  gap: 10px;
  padding-left: 12px;
}

.chat-trigger .chat-mark {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(214, 180, 111, 0.58);
  color: var(--gold-soft);
  background: rgba(8, 11, 8, 0.54);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  box-shadow: inset 0 0 14px rgba(214, 180, 111, 0.12);
}

.chat-trigger .chat-mark::before,
.chat-trigger .chat-mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: rgba(214, 180, 111, 0.6);
  border-style: solid;
}

.chat-trigger .chat-mark::before {
  left: 3px;
  top: 3px;
  border-width: 1px 0 0 1px;
}

.chat-trigger .chat-mark::after {
  right: 3px;
  bottom: 3px;
  border-width: 0 1px 1px 0;
}

.page-hero {
  position: relative;
  min-height: 660px;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: var(--black-tea);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -2%;
  z-index: -3;
  background: var(--hero-image) center / cover no-repeat;
  filter: saturate(0.72) contrast(1.08) brightness(0.74);
  transform: scale(1.04);
  animation: heroBreath 18s ease-in-out infinite alternate;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 8, 5, 0.76), rgba(5, 8, 5, 0.38) 44%, rgba(5, 8, 5, 0.72)),
    linear-gradient(180deg, rgba(5, 8, 5, 0.2), rgba(5, 8, 5, 0.82)),
    radial-gradient(circle at 38% 58%, rgba(214, 180, 111, 0.12), transparent 34%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 160px 0 88px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: rgba(255, 247, 230, 0.66);
  font-size: 13px;
}

.eyebrow,
.kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 1.08;
  letter-spacing: 0.12em;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.58), 0 0 30px rgba(214, 180, 111, 0.12);
}

.hero-copy {
  max-width: 720px;
  margin: 26px 0 0;
  color: rgba(255, 247, 230, 0.82);
  font-size: 16px;
  line-height: 2;
}

.section {
  position: relative;
  padding: 104px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(214, 180, 111, 0.08), transparent 28%),
    linear-gradient(180deg, #0a0e0a 0%, #0f1711 100%);
}

.section.alt {
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 180, 111, 0.1), transparent 32%),
    linear-gradient(180deg, #0d130e 0%, #111b13 60%, #080b08 100%);
}

.section.image-band {
  background:
    linear-gradient(90deg, rgba(8, 11, 8, 0.96), rgba(8, 11, 8, 0.78)),
    var(--band-image) center / cover fixed;
}

main > .section,
main > .section.alt,
main > .section.image-band {
  background: transparent;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(900px, calc(100% - 40px));
}

.section-heading {
  margin: 0 auto 52px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: 0.11em;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, rgba(214, 180, 111, 0.88), transparent);
}

.section-heading p,
.lead {
  max-width: 780px;
  margin: 24px auto 0;
  color: var(--muted);
  line-height: 2;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 46px;
  align-items: center;
}

.split.reverse {
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
}

.image-frame {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(214, 180, 111, 0.16), transparent 30%, rgba(214, 180, 111, 0.08)),
    rgba(255, 247, 230, 0.035);
  box-shadow: 0 34px 90px var(--shadow);
}

.image-frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.04) brightness(0.74);
}

.copy h3 {
  margin: 0 0 18px;
  color: var(--ivory);
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: 0.1em;
}

.copy p,
.copy li,
.card p,
.post-card p,
.sidebar p,
.timeline p {
  color: var(--muted);
  line-height: 2;
}

.copy p,
.card p,
.post-card p,
.sidebar p {
  margin: 0 0 16px;
}

.card-grid,
.feature-grid,
.course-grid,
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

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

.card,
.feature,
.sidebar-block,
.timeline,
.text-panel {
  position: relative;
  border: 1px solid rgba(214, 180, 111, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 247, 230, 0.06), rgba(255, 247, 230, 0.018)),
    rgba(12, 18, 13, 0.76);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.card::before,
.feature::before,
.sidebar-block::before,
.timeline::before,
.text-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(214, 180, 111, 0.08);
  pointer-events: none;
}

.card {
  overflow: hidden;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(214, 180, 111, 0.55);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48), 0 0 38px rgba(214, 180, 111, 0.08);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06) brightness(0.72);
  transition: transform 420ms ease, filter 260ms ease;
}

.card:hover img {
  transform: scale(1.04);
  filter: saturate(0.82) contrast(1.08) brightness(0.86);
}

.product-card img {
  aspect-ratio: 1 / 1;
  padding: 22px;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(214, 180, 111, 0.1), transparent 42%),
    rgba(8, 11, 8, 0.34);
}

.card-content,
.feature,
.text-panel,
.timeline {
  padding: 30px 28px;
}

.card h3,
.card h4,
.feature h3,
.sidebar h3,
.timeline h3,
.text-panel h3 {
  margin: 0 0 14px;
  color: var(--ivory);
  font-size: 24px;
  letter-spacing: 0.08em;
}

.card h4 {
  font-size: 21px;
}

.feature {
  min-height: 210px;
}

.feature p {
  margin: 0;
}

.meta-line,
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: rgba(240, 214, 149, 0.78);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
}

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

.post-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(214, 180, 111, 0.22);
  background: rgba(12, 18, 13, 0.82);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 8.2;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08) brightness(0.72);
}

.post-body {
  padding: 34px;
}

.post-card h2 {
  margin: 0 0 14px;
  color: var(--ivory);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.post-card h5,
.post-card h6 {
  margin: 24px 0 10px;
  color: rgba(255, 247, 230, 0.88);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.sidebar {
  display: grid;
  gap: 22px;
}

.sidebar-block {
  padding: 26px 24px;
}

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

.search-form input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(214, 180, 111, 0.28);
  color: var(--ivory);
  background: rgba(8, 11, 8, 0.42);
  padding: 0 13px;
  outline: none;
}

.link-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ivory-soft);
}

.link-list a {
  border-bottom: 1px solid rgba(214, 180, 111, 0.16);
  padding-bottom: 10px;
  transition: color 180ms ease;
}

.link-list a:hover {
  color: var(--gold-soft);
}

.research-grid .card img {
  aspect-ratio: 1 / 0.78;
}

.timeline {
  display: grid;
  gap: 24px;
}

.timeline-item {
  position: relative;
  padding-left: 24px;
  border-left: 1px solid rgba(214, 180, 111, 0.28);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(214, 180, 111, 0.72);
}

.footer {
  padding: 38px 20px;
  border-top: 1px solid rgba(214, 180, 111, 0.18);
  background: #070907;
  color: rgba(255, 247, 230, 0.7);
  text-align: center;
  font-size: 13px;
  line-height: 1.9;
}

.footer p {
  margin: 0 0 4px;
}

.footer a:hover {
  color: var(--gold-soft);
}

.coze-chat-container {
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  z-index: 9999 !important;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  flex: 0 0 44px;
  overflow: hidden;
}

.nav-actions .theme-toggle {
  min-width: 44px;
  padding: 0;
}

.theme-toggle::before {
  inset: 5px;
}

.theme-toggle::after {
  display: none;
}

.theme-toggle .theme-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  transform: translate(-50%, -50%) scale(1);
  color: currentColor;
  opacity: 1;
  transition: opacity 180ms ease, transform 220ms ease;
}

.theme-toggle .theme-icon svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .theme-icon-moon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72) rotate(-18deg);
}

.theme-toggle:hover .theme-icon-sun,
.theme-toggle:hover .theme-icon-moon {
  transform: translate(-50%, -50%) scale(1.08);
}

html[data-theme="light"] {
  --black-tea: #efe2c4;
  --ink: #ead9b8;
  --ink-2: #dfcba5;
  --forest: #2e4935;
  --forest-soft: #cdb98f;
  --jade: #596f50;
  --gold: #9e742b;
  --gold-soft: #775821;
  --ivory: #142418;
  --ivory-soft: rgba(20, 36, 24, 0.9);
  --muted: rgba(31, 45, 30, 0.86);
  --line: rgba(112, 80, 28, 0.34);
  --shadow: rgba(74, 53, 23, 0.24);
}

html[data-theme="light"],
html[data-theme="light"] body {
  background: #efe2c4;
}

html[data-theme="light"] body {
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% -8%, rgba(158, 116, 43, 0.16), transparent 34%),
    linear-gradient(180deg, #f2e7cb 0%, #e9d8b5 48%, #e4d1aa 100%);
}

html[data-theme="light"] main {
  background:
    radial-gradient(circle at 18% 0%, rgba(158, 116, 43, 0.16), transparent 25%),
    radial-gradient(circle at 82% 38%, rgba(46, 73, 53, 0.12), transparent 24%),
    linear-gradient(180deg, #efe2c4 0%, #e5d2ad 38%, #eadbbd 100%);
}

html[data-theme="light"] .nav {
  border-color: rgba(112, 80, 28, 0.42);
  background: linear-gradient(180deg, rgba(242, 231, 203, 0.92), rgba(229, 211, 174, 0.82));
  box-shadow: 0 22px 58px rgba(74, 53, 23, 0.22);
}

html[data-theme="light"] .nav::before {
  border-color: rgba(112, 80, 28, 0.2);
}

html[data-theme="light"] .brand,
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links .active a {
  color: #142418;
}

html[data-theme="light"] .nav-links {
  color: rgba(20, 36, 24, 0.88);
}

html[data-theme="light"] .brand-mark,
html[data-theme="light"] .chat-trigger .chat-mark {
  color: #775821;
  border-color: rgba(112, 80, 28, 0.5);
  background: rgba(239, 226, 196, 0.48);
  box-shadow: inset 0 0 12px rgba(158, 116, 43, 0.08), 0 8px 20px rgba(74, 53, 23, 0.08);
}

html[data-theme="light"] .nav-menu-toggle {
  color: #775821;
}

html[data-theme="light"] .btn {
  --btn-bg: rgba(239, 226, 196, 0.32);
  border-color: rgba(112, 80, 28, 0.52);
  color: #142418;
  background: var(--btn-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.2), 0 10px 24px rgba(74, 53, 23, 0.08);
}

html[data-theme="light"] .btn::before {
  border-color: rgba(112, 80, 28, 0.16);
  background:
    linear-gradient(90deg, rgba(112, 80, 28, 0.44), rgba(112, 80, 28, 0.44)) left top / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(112, 80, 28, 0.44), rgba(112, 80, 28, 0.44)) left top / 1px 12px no-repeat,
    linear-gradient(90deg, rgba(112, 80, 28, 0.44), rgba(112, 80, 28, 0.44)) right bottom / 18px 1px no-repeat,
    linear-gradient(180deg, rgba(112, 80, 28, 0.44), rgba(112, 80, 28, 0.44)) right bottom / 1px 12px no-repeat;
}

html[data-theme="light"] .btn::after {
  background: linear-gradient(90deg, transparent, rgba(255, 248, 232, 0.66), transparent);
}

html[data-theme="light"] .btn:hover {
  border-color: rgba(112, 80, 28, 0.72);
  background: rgba(239, 226, 196, 0.46);
  color: #0b1a0f;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.24), 0 14px 30px rgba(74, 53, 23, 0.12);
}

html[data-theme="light"] .btn-primary {
  background: var(--btn-bg);
}

html[data-theme="light"] .theme-toggle .theme-icon-sun {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72) rotate(18deg);
}

html[data-theme="light"] .theme-toggle .theme-icon-moon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

html[data-theme="light"] .page-hero {
  background: #e5d2ad;
}

html[data-theme="light"] .page-hero::before {
  filter: saturate(0.78) contrast(1.06) brightness(0.9);
}

html[data-theme="light"] .page-hero::after {
  background:
    linear-gradient(180deg, rgba(242, 231, 203, 0.22), rgba(224, 204, 164, 0.72)),
    linear-gradient(90deg, rgba(239, 226, 196, 0.84), rgba(232, 215, 181, 0.56) 44%, rgba(225, 206, 168, 0.86)),
    radial-gradient(circle at 38% 58%, rgba(158, 116, 43, 0.16), transparent 34%);
}

html[data-theme="light"] .breadcrumbs,
html[data-theme="light"] .hero-copy,
html[data-theme="light"] .section-heading p,
html[data-theme="light"] .lead,
html[data-theme="light"] .copy p,
html[data-theme="light"] .copy li,
html[data-theme="light"] .card p,
html[data-theme="light"] .post-card p,
html[data-theme="light"] .sidebar p,
html[data-theme="light"] .timeline p,
html[data-theme="light"] .contact-card p,
html[data-theme="light"] .contact-card li {
  color: rgba(24, 37, 25, 0.86);
}

html[data-theme="light"] .eyebrow,
html[data-theme="light"] .kicker,
html[data-theme="light"] .meta-line,
html[data-theme="light"] .post-meta,
html[data-theme="light"] .field label,
html[data-theme="light"] .contact-list strong {
  color: rgba(111, 76, 24, 0.96);
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .copy h3,
html[data-theme="light"] .card h3,
html[data-theme="light"] .card h4,
html[data-theme="light"] .feature h3,
html[data-theme="light"] .sidebar h3,
html[data-theme="light"] .timeline h3,
html[data-theme="light"] .text-panel h3,
html[data-theme="light"] .post-card h2,
html[data-theme="light"] .post-card h5,
html[data-theme="light"] .post-card h6,
html[data-theme="light"] .contact-card h3 {
  color: #142418;
}

html[data-theme="light"] h1 {
  text-shadow: 0 18px 60px rgba(74, 53, 23, 0.24), 0 0 28px rgba(158, 116, 43, 0.15);
}

html[data-theme="light"] .image-frame,
html[data-theme="light"] .card,
html[data-theme="light"] .feature,
html[data-theme="light"] .sidebar-block,
html[data-theme="light"] .timeline,
html[data-theme="light"] .text-panel,
html[data-theme="light"] .post-card,
html[data-theme="light"] .contact-card {
  border-color: rgba(112, 80, 28, 0.36);
  background:
    linear-gradient(135deg, rgba(158, 116, 43, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(239, 226, 196, 0.9), rgba(219, 198, 155, 0.58));
  box-shadow: inset 0 0 0 1px rgba(255, 248, 232, 0.3), 0 28px 80px rgba(74, 53, 23, 0.22);
}

html[data-theme="light"] .card::before,
html[data-theme="light"] .feature::before,
html[data-theme="light"] .sidebar-block::before,
html[data-theme="light"] .timeline::before,
html[data-theme="light"] .text-panel::before,
html[data-theme="light"] .contact-card::before {
  border-color: rgba(112, 80, 28, 0.16);
}

html[data-theme="light"] .product-card img,
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select,
html[data-theme="light"] .search-form input {
  border-color: rgba(112, 80, 28, 0.3);
  color: #142418;
  background: rgba(239, 226, 196, 0.62);
}

html[data-theme="light"] .image-frame img,
html[data-theme="light"] .card img,
html[data-theme="light"] .post-card img {
  filter: saturate(0.76) contrast(1.05) brightness(0.84);
}

html[data-theme="light"] .timeline-item {
  border-left-color: rgba(112, 80, 28, 0.34);
}

html[data-theme="light"] .timeline-item::before {
  background: #9e742b;
  box-shadow: 0 0 14px rgba(158, 116, 43, 0.55);
}

html[data-theme="light"] .link-list {
  color: rgba(20, 36, 24, 0.86);
}

html[data-theme="light"] .link-list a {
  border-bottom-color: rgba(112, 80, 28, 0.22);
}

html[data-theme="light"] .qr-frame {
  border-color: rgba(112, 80, 28, 0.36);
  background: #efe2c4;
}

html[data-theme="light"] .footer {
  color: rgba(20, 36, 24, 0.78);
  background: linear-gradient(180deg, #dfcba5 0%, #cdb98f 100%);
  border-top-color: rgba(112, 80, 28, 0.32);
}

@keyframes heroBreath {
  from { transform: scale(1.04); }
  to { transform: scale(1.09); }
}

@media (max-width: 980px) {
  .nav {
    position: absolute;
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
  }

  .nav.is-condensed {
    position: absolute;
    top: 18px;
    width: min(1200px, calc(100% - 36px));
    min-height: var(--nav-h);
    padding: 12px 14px 12px 20px;
    grid-template-columns: 1fr;
    gap: 14px;
    transform: translateX(-50%);
    opacity: 1;
  }

  .nav-hover-zone {
    display: none;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 10px 20px;
  }

  .nav-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-hero {
    min-height: 620px;
  }

  .hero-inner {
    padding-top: 170px;
  }

  .split,
  .split.reverse,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .course-grid,
  .research-grid,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    letter-spacing: 0.025em;
  }

  .nav {
    width: calc(100% - 24px);
    padding: 12px;
  }

  .brand {
    font-size: 20px;
  }

  .nav-links {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .nav-actions,
  .hero-actions,
  .search-form {
    width: 100%;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .page-hero {
    min-height: 590px;
  }

  .hero-inner {
    width: min(100% - 30px, 1120px);
    padding: 210px 0 70px;
  }

  h1 {
    font-size: clamp(36px, 13vw, 52px);
  }

  .section {
    padding: 74px 0;
  }

  .container,
  .narrow {
    width: min(100% - 30px, 1160px);
  }

  .card-grid,
  .course-grid,
  .research-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .card-content,
  .feature,
  .text-panel,
  .timeline,
  .post-body {
    padding: 26px 22px;
  }
}

@media (orientation: portrait) and (max-width: 980px) {
  .nav {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    padding: 0;
    grid-template-columns: 52px;
    grid-auto-rows: min-content;
    justify-items: stretch;
    align-items: start;
    gap: 0;
    overflow: hidden;
    transform: none;
    opacity: 1;
    transition:
      width 260ms ease,
      height 260ms ease,
      min-height 260ms ease,
      max-height 260ms ease,
      padding 260ms ease,
      box-shadow 260ms ease,
      background 260ms ease;
  }

  .nav.is-condensed {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    padding: 0;
    grid-template-columns: 52px;
    gap: 0;
    transform: none;
    opacity: 1;
  }

  .nav.is-menu-open,
  .nav.is-menu-open.is-condensed {
    width: min(320px, calc(100vw - 28px));
    height: auto;
    min-height: 52px;
    max-height: calc(100vh - 28px);
    padding: 0 16px 18px;
    grid-template-columns: 1fr;
    gap: 16px;
    overflow-y: auto;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), 0 0 32px rgba(214, 180, 111, 0.08);
  }

  .nav-menu-toggle {
    display: grid;
    grid-row: 1;
    justify-self: start;
  }

  .nav.is-menu-open .nav-menu-toggle {
    margin-left: -16px;
  }

  .nav.is-menu-open .nav-menu-toggle span:nth-child(1) {
    top: 26px;
    transform: rotate(42deg);
  }

  .nav.is-menu-open .nav-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav.is-menu-open .nav-menu-toggle span:nth-child(3) {
    top: 26px;
    transform: rotate(-42deg);
  }

  .nav .brand,
  .nav .nav-links,
  .nav .nav-actions {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 220ms ease, visibility 0s linear 220ms;
  }

  .nav.is-menu-open .brand,
  .nav.is-menu-open .nav-links,
  .nav.is-menu-open .nav-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 60ms, 60ms, 0s;
  }

  .nav .brand {
    width: 100%;
    font-size: 20px;
  }

  .nav .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .nav .nav-links a {
    width: 100%;
    min-height: 40px;
    padding: 0 2px;
  }

  .nav .nav-links a::after {
    bottom: 4px;
  }

  .nav .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nav .nav-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .nav .nav-actions .theme-toggle {
    width: 44px;
    min-width: 44px;
    align-self: flex-start;
  }
}
