:root {
  --bg: #f3efe4;
  --bg-alt: #ece6d7;
  --surface: rgba(255, 255, 255, 0.74);
  --text: #16253b;
  --text-soft: #425069;
  --primary: #cc5f3d;
  --primary-dark: #9f4327;
  --accent: #1f5f77;
  --line: rgba(22, 37, 59, 0.14);
  --shadow: 0 24px 54px rgba(22, 37, 59, 0.13);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 0% 0%, #fff7e4 0%, transparent 43%),
              radial-gradient(circle at 100% 0%, #dfedf4 0%, transparent 48%),
              var(--bg);
  line-height: 1.65;
}

html[lang="zh-CN"] body {
  font-family: "Noto Sans SC", "Space Grotesk", sans-serif;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2 {
  font-family: "Noto Serif SC", "DM Serif Display", serif;
}

.texture-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(22, 37, 59, 0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(22, 37, 59, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: -1;
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.3));
  border-block: 1px solid var(--line);
}

h1,
h2 {
  margin: 0 0 14px;
  font-family: "DM Serif Display", serif;
  line-height: 1.1;
  letter-spacing: 0.4px;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.85rem, 4.2vw, 2.8rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.24rem;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(243, 239, 228, 0.72);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(22, 37, 59, 0.1);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #f8f8f8;
  font-weight: 700;
}

.brand-text {
  font-size: 1rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 0;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.lang-btn img {
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 50%;
}

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

.site-nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.94rem;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfcf8;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 7px auto;
}

.hero {
  padding-top: 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-description {
  max-width: 58ch;
  color: var(--text-soft);
  margin-top: 14px;
}

.headline-rotator {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(31, 95, 119, 0.1);
  border: 1px solid rgba(31, 95, 119, 0.2);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.rotator-label {
  color: var(--accent);
  font-weight: 600;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-small {
  margin-top: 12px;
  padding: 9px 16px;
}

.social-list {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 24px 0 0;
  padding: 0;
}

.social-list a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.hero-card h2 {
  font-size: 2rem;
  margin-top: 16px;
  margin-bottom: 4px;
}

.avatar {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #1f5f77, #327f98);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 700;
}

.metric-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.metric-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.metric-list strong {
  display: block;
  font-size: 1.12rem;
}

.metric-list span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.section-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 32px;
  align-items: start;
}

.section-heading p + h2 {
  max-width: 20ch;
}

.about-cards {
  display: grid;
  gap: 16px;
}

.about-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  padding: 18px;
}

.about-card p {
  color: var(--text-soft);
}

.expertise-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--line);
}

.expertise-card p {
  color: var(--text-soft);
}

.filter-group {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-soft);
  padding: 9px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.project-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  padding: 20px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px rgba(22, 37, 59, 0.12);
}

.tag {
  display: inline-block;
  background: rgba(204, 95, 61, 0.14);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.project-card p {
  color: var(--text-soft);
}

.project-subtitle {
  color: var(--accent) !important;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-credit-title {
  color: var(--text) !important;
  font-weight: 700;
  margin-bottom: 6px;
}

.project-credit-list {
  white-space: pre-line;
  margin-bottom: 10px;
}

.project-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin: 4px 0 14px;
}

.project-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

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

.project-empty {
  margin-top: 18px;
  color: var(--text-soft);
  font-weight: 600;
}

.testimonial {
  margin-top: 20px;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  background: rgba(255, 255, 255, 0.7);
}

.testimonial p {
  font-size: 1.18rem;
}

.testimonial h3 {
  margin-top: 12px;
  color: var(--accent);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.contact-wrap h2 {
  max-width: 18ch;
}

.contact-wrap p {
  color: var(--text-soft);
}

.contact-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 22px;
}

.contact-card a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.copy-feedback {
  min-height: 1.25em;
  margin-top: 8px;
  color: var(--primary);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-wrap p {
  color: var(--text-soft);
}

.footer-wrap a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .section-grid,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding-top: 56px;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-block;
  }

  .header-controls {
    margin-left: auto;
    gap: 8px;
  }

  .site-nav {
    position: absolute;
    left: 4%;
    right: 4%;
    top: 74px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(253, 251, 245, 0.98);
    padding: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .lang-switch {
    padding: 3px;
  }

  .lang-btn {
    padding: 4px 7px;
  }

  .lang-btn img {
    width: 18px;
    height: 18px;
  }

  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .project-grid,
  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }
}
