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

html {
  background: #242220;
  color: #e6e1d8;
  color-scheme: dark;
  scrollbar-color: #3a3835 #242220;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #242220;
  color: #e6e1d8;
  font-family: "Segoe UI", "Sakkal Majalla", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

html[lang="zh"] body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

main {
  flex: 1;
}

h1,
h2,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: rgba(143, 164, 184, 0.35);
  color: #e6e1d8;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #8fa4b8;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.8rem;
  background: #8fa4b8;
  color: #242220;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

#content:focus {
  outline: none;
}

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #242220;
  border-bottom: 1px solid rgba(230, 225, 216, 0.14);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: 4.25rem;
  padding-block: 0.7rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #e6e1d8;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.logo .word {
  border-bottom: 1px solid #8fa4b8;
  line-height: 1.3;
}

.logo:hover .word {
  color: #8fa4b8;
}

.mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.bar-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem 1.35rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.15rem;
}

.nav a {
  padding-block: 0.2rem;
  color: #cfc8bc;
  font-size: 0.98rem;
  text-decoration: none;
}

.nav a:hover {
  color: #e6e1d8;
}

.nav a[aria-current="page"] {
  color: #e6e1d8;
  box-shadow: inset 0 -1px 0 #8fa4b8;
}

.lang-menu {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cfc8bc;
  cursor: pointer;
}

.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] {
  color: #e6e1d8;
}

.lang-icon {
  width: 1.3rem;
  height: 1.3rem;
  display: block;
}

.lang-list {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  min-width: 8.5rem;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: #242220;
  border: 1px solid rgba(230, 225, 216, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.lang-list[hidden] {
  display: none;
}

.lang {
  display: block;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 0;
  background: transparent;
  color: #e6e1d8;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
}

.lang:hover,
.lang[aria-pressed="true"] {
  background: rgba(143, 164, 184, 0.16);
}

.home {
  display: flex;
}

.home-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 8.5rem);
  padding-block: 2.75rem 3.5rem;
}

.home h1 {
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(3.5rem, 9vw, 7.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.lead {
  max-width: 36em;
  margin-top: 1.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.7;
  text-wrap: pretty;
}

html[lang="ar"] .lead,
html[lang="ar"] .statement,
html[lang="ar"] .page h1 {
  font-family: "Sakkal Majalla", "Traditional Arabic", "Segoe UI", serif;
  font-weight: 400;
}

html[lang="ar"] .lead {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.9;
}

html[lang="en"] .lead {
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.45;
}

html[lang="zh"] .lead,
html[lang="zh"] .statement,
html[lang="zh"] .page h1 {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.motto {
  margin-top: 0.85rem;
  color: #b7b1a6;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.2rem;
  border: 1px solid #8fa4b8;
  background: transparent;
  color: #e6e1d8;
  font-size: 0.98rem;
  text-decoration: none;
}

.btn-solid {
  background: #8fa4b8;
  color: #242220;
}

.btn:hover {
  background: #2e2c2a;
}

.btn-solid:hover {
  background: #a7b8c8;
  color: #242220;
}

.page {
  padding-block: 3.25rem 4.5rem;
}

.page h1 {
  margin-bottom: 1.75rem;
  font-family: "Palatino Linotype", Palatino, "Sakkal Majalla", "Microsoft YaHei", serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.25;
}

.works li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid rgba(230, 225, 216, 0.18);
}

.works li span {
  font-size: 1.15rem;
  font-weight: 500;
}

.reg {
  color: #b7b1a6;
  font-size: 0.95rem;
}

.works-note {
  max-width: 42em;
  margin-top: 0.95rem;
  color: #b7b1a6;
  font-size: 0.92rem;
  line-height: 1.6;
}

.sheet h2 {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(230, 225, 216, 0.18);
  font-size: 1.2rem;
  font-weight: 500;
}

.sheet ul {
  min-height: 6rem;
}

.statement {
  max-width: 16em;
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.7;
  text-wrap: pretty;
  white-space: pre-line;
}

html[lang="ar"] .statement {
  line-height: 1.9;
}

html[lang="zh"] .statement {
  max-width: 20em;
}

.email {
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.5;
}

.email a {
  text-decoration: none;
  border-bottom: 1px solid #8fa4b8;
  padding-bottom: 0.12rem;
  overflow-wrap: anywhere;
}

.email a:hover {
  color: #8fa4b8;
}

.site-footer {
  border-top: 1px solid rgba(230, 225, 216, 0.14);
}

.site-footer .wrap {
  padding-block: 1.15rem 1.35rem;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: #b7b1a6;
  font-size: 0.92rem;
}

.legal a {
  text-decoration: none;
}

.legal a:hover {
  color: #e6e1d8;
}

@media (max-width: 860px) {
  .bar {
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .bar-end {
    flex: 1 0 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem 1rem;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(1080px, calc(100% - 1.5rem));
  }
}
