:root {
  --bg: #13171c;
  --surface: #1a1f26;
  --line: #2b323b;
  --text: #ebe6dc;
  --muted: #8f98a2;
  --accent: #86bdb5;

  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(6px, 0.8vw, 10px);
  --max: 1480px;
  color-scheme: dark;
}
:lang(zh) { --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; --font-display: var(--font-body); }
:lang(ar) { --font-body: "Noto Kufi Arabic", "Geeza Pro", "Segoe UI", system-ui, sans-serif; --font-display: var(--font-body); }
.name { font-family: "Unbounded", "Manrope", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 14px; text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 12px; }
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: 18px var(--gutter);
  transition: background-color .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.bar.is-solid { background: rgba(19, 23, 28, .92); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mark {
  font-family: "Unbounded", sans-serif; font-weight: 400; font-size: 15px; letter-spacing: .04em;
  text-decoration: none; margin-inline-end: auto;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid rgba(235, 230, 220, .45); border-radius: 50%;
}
.nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .85; padding: 6px 0; }
.nav a:hover { opacity: 1; color: var(--accent); }
.lang select {
  appearance: none; -webkit-appearance: none;
  background: transparent; color: var(--text);
  border: 1px solid rgba(235, 230, 220, .35); border-radius: 999px;
  padding: 6px 30px 6px 14px; font: inherit; font-size: 14px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ebe6dc' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 10px; background-position: right 12px center;
}
[dir="rtl"] .lang select { padding: 6px 14px 6px 30px; background-position: left 12px center; }
.lang option { background: var(--surface); color: var(--text); }
.menu-btn {
  display: none; place-content: center; gap: 6px;
  width: 40px; height: 40px; background: none; border: 0; cursor: pointer; padding: 0;
}
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: transform .3s; }
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden; isolation: isolate;
}
.hero-media {
  position: absolute; inset: 0;
  display: flex; gap: 4px; background: var(--bg);
}
.hero-panel { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; }
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.8s ease, transform 9s ease-out;
  transform: scale(1.06);
}
.hero-img.intro { transform: scale(1.16); transition: opacity 1.4s ease, transform 5s cubic-bezier(.22,.61,.36,1); }
.hero-img.is-on { opacity: 1; transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(19,23,28,.55) 0%, rgba(19,23,28,0) 22%),
    linear-gradient(to top, rgba(19,23,28,.92) 0%, rgba(19,23,28,.35) 38%, rgba(19,23,28,0) 62%);
}
.hero-text {
  position: absolute; z-index: 2; inset-inline: var(--gutter); bottom: clamp(28px, 6vh, 64px);
}
.name {
  margin: 0; font-weight: 300;
  font-size: clamp(2.6rem, 5.6vw, 6.2rem);
  line-height: .95; letter-spacing: -.035em;
}
.name span + span { color: var(--accent); }
.tagline {
  margin: clamp(12px, 2vh, 20px) 0 0; max-width: 48ch;
  font-size: clamp(16px, 1.25vw, 19px); color: rgba(235,230,220,.88);
  text-wrap: balance;
}
.panel-cap {
  position: absolute; z-index: 3; top: 88px; inset-inline: 18px;
  font-size: 13px; line-height: 1.45; color: rgba(235,230,220,.8);
  opacity: 0; transition: opacity .3s;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.panel-cap b { display: block; font-weight: 600; color: var(--text); font-size: 14px; }
.hero-panel:hover .panel-cap { opacity: 1; }
main > section { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
h2 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.02em;
  margin: 0;
}
:lang(zh) h2, :lang(ar) h2 { letter-spacing: 0; font-weight: 400; }
.lede { color: var(--muted); max-width: 52ch; margin: 14px 0 0; }
.gallery { padding-top: clamp(72px, 11vw, 140px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; }
.section-head .lede { margin: 0; }
.tools {
  display: flex; justify-content: flex-end;
  margin: clamp(24px, 3.5vw, 40px) 0 clamp(18px, 2.5vw, 28px);
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.shuffle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-size: 15px; color: var(--text);
  transition: color .2s, border-color .2s;
}
.shuffle:hover { border-color: var(--accent); color: var(--accent); }
.shuffle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shuffle.spin svg { animation: spin .6s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { color: var(--muted); border: 1px dashed var(--line); padding: 18px; margin: 0; }

.grid { columns: 4 260px; column-gap: var(--gap); }
.tile {
  display: block; width: 100%; margin: 0 0 var(--gap); padding: 0; border: 0; background: var(--surface);
  position: relative; overflow: hidden; cursor: zoom-in; break-inside: avoid;
  border-radius: 2px;
}
.tile img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .5s; opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.025); }
.tile-cap {
  position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; text-align: start;
  background: linear-gradient(to top, rgba(19,23,28,.85), rgba(19,23,28,0));
  font-size: 14px; line-height: 1.35; opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s;
}
.tile-cap b { display: block; font-weight: 600; }
.tile-cap span { color: rgba(235,230,220,.75); font-size: 13px; }
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; transform: none; }
.ph { font-style: italic; opacity: .55; font-weight: 400 !important; }
.travel { padding-top: clamp(96px, 14vw, 180px); }
.travel-body {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px); align-items: start; margin-top: clamp(28px, 4vw, 48px);
}
.globe-wrap { position: relative; width: 100%; max-width: min(700px, calc(100vh - 150px)); justify-self: center; margin-bottom: 30px; }
#globe { display: block; width: 100%; border-radius: 18px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
#globe:active { cursor: grabbing; }
.globe-ctrl { position: absolute; inset-inline-end: 4px; bottom: 4px; display: flex; flex-direction: column; gap: 6px; }
.globe-ctrl button {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  background: rgba(26,31,38,.85); color: var(--text); border: 1px solid var(--line); border-radius: 50%;
  transition: border-color .2s, color .2s;
}
.globe-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.globe-ctrl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.globe-hint { position: absolute; inset-inline-start: 0; bottom: -28px; margin: 0; font-size: 13px; color: var(--muted); }
.globe-tip {
  position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2;
  background: rgba(26,31,38,.95); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; font-size: 13px; line-height: 1.35; color: var(--muted); white-space: nowrap;
}
.globe-tip b { display: block; color: var(--text); font-weight: 600; }
.travel-side { min-width: 0; }
.stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.stats b { font-family: "Unbounded", var(--font-body); font-weight: 300; font-size: 2rem; color: var(--text); margin-inline-end: 6px; }
.country-list {
  list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line);
  max-height: min(560px, 62vh); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.country-list > li { border-bottom: 1px solid var(--line); }
.country {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: 0; padding: 11px 4px; cursor: pointer; text-align: start; font-size: 15px; color: var(--text);
}
.country:hover .c-name, .is-open .c-name { color: var(--accent); }
.c-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.place-list { list-style: none; padding: 0 4px 14px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.place {
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.place:hover { border-color: var(--accent); color: var(--accent); }
.about {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-top: clamp(96px, 14vw, 180px);
}
.portrait {
  width: min(100%, 380px); aspect-ratio: 1; justify-self: center; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); font-size: 14px; overflow: hidden;
  border: 1.5px solid rgba(134,189,181,.55);
  box-shadow: 0 0 14px rgba(134,189,181,.28), 0 0 42px rgba(134,189,181,.14), inset 0 0 12px rgba(134,189,181,.12);
}
.portrait { position: relative; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.about.no-portrait { grid-template-columns: 1fr; }
.about-body { margin-top: 28px; max-width: 60ch; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.7; }
.about-body p { margin: 0 0 1em; }
.about-body .ph-block {
  color: var(--muted); border-inline-start: 2px solid var(--accent); padding-inline-start: 18px; font-style: italic;
}
.about h3 { font-size: 15px; font-weight: 600; margin: 36px 0 10px; color: var(--muted); }
.cameras { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cameras li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 14px; }
.contact { padding-block: clamp(88px, 11vw, 140px) clamp(56px, 7vw, 90px); }
.contact h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.contact .lede { font-size: 16px; }
.email {
  display: inline-block; margin-top: 24px;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 500;
  text-decoration: none; overflow-wrap: anywhere; color: var(--text);
  border-bottom: 1px solid var(--accent); padding-bottom: 2px;
  transition: color .2s;
  direction: ltr;
}
.email:hover, .email:focus-visible { color: var(--accent); }
.socials { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 32px; max-width: 640px; }
.socials a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; font-size: 15px;
}
.socials a:hover .soc-handle { color: var(--accent); }
.soc-label { color: var(--muted); font-size: 14px; }
.soc-handle { font-weight: 500; direction: ltr; }
[hidden] { display: none !important; }

.foot { border-top: 1px solid var(--line); padding: 26px var(--gutter); color: var(--muted); font-size: 13px; text-align: center; }
.foot p { margin: 0; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: #0d1014;
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center;
  animation: fade .25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { margin: 0; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 0 18px; min-width: 0; }
.lb-figure img { max-width: 100%; max-height: calc(100svh - 150px); object-fit: contain; transition: opacity .25s; }
.lb-figure img.loading { opacity: .25; }
.lb-cap { display: grid; grid-template-columns: 1fr auto; gap: 2px 24px; width: 100%; max-width: 900px; padding: 16px 8px 0; font-size: 14px; }
.lb-title { font-weight: 600; font-size: 16px; }
.lb-meta { color: var(--muted); grid-column: 1; }
.lb-count { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.lb-btn {
  background: none; border: 0; cursor: pointer; width: 56px; height: 56px; display: grid; place-items: center;
  color: var(--text); opacity: .7; justify-self: center; border-radius: 50%;
}
.lb-btn:hover { opacity: 1; background: rgba(255,255,255,.06); }
.lb-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { position: absolute; top: 10px; inset-inline-end: 12px; }
[dir="rtl"] .lb-prev svg, [dir="rtl"] .lb-next svg { transform: scaleX(-1); }
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { padding-block: 12px; gap: 12px; }
  .menu-btn { display: grid; }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    background: var(--bg);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav a { font-family: var(--font-display); font-weight: 300; font-size: 2rem; opacity: 1; }
  body.menu-open { overflow: hidden; }
  body.menu-open .bar { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; border-color: transparent; }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  body.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
  body.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .bar .mark { width: 36px; height: 36px; font-size: 13px; }
  .panel-cap { display: none; }
  .name { font-size: clamp(3.1rem, 12.5vw, 5rem); line-height: .88; }
  .name span { display: block; }
  .name span + span { padding-inline-start: .35em; }
  .grid { columns: 2; }
  .about { grid-template-columns: 1fr; }
  .travel-body { grid-template-columns: 1fr; }
  .country-list { max-height: none; overflow: visible; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .country-list > li.is-open { grid-column: 1 / -1; }
  .country-list { grid-auto-flow: dense; }
  .globe-hint { display: none; }
  .portrait { width: min(72%, 280px); }
  .lightbox { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { position: absolute; bottom: 14px; width: 48px; height: 48px; }
  .lb-prev { inset-inline-start: 8px; }
  .lb-next { inset-inline-end: 8px; }
  .lb-figure { padding: 60px 0 76px; }
  .lb-figure img { max-height: calc(100svh - 230px); }
  .lb-cap { padding-inline: 16px; }
  .tile-cap { display: none; }
}
@media (max-width: 380px) { .grid { columns: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-img { transform: none; }
}
.notfound main { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: var(--gutter); max-width: var(--max); margin: 0 auto; }
.nf-code { font-family: "Unbounded", sans-serif; font-weight: 300; font-size: clamp(4rem, 14vw, 9rem); line-height: 1; margin: 0; color: var(--accent); }
.notfound .email { align-self: flex-start; margin-top: 28px; }
.notfound h1 { font-weight: 500; font-size: clamp(1.4rem, 2.5vw, 2rem); margin: 24px 0 0; }

@media (max-width: 1000px) {
  .travel-body { grid-template-columns: 1fr; }
  .country-list { max-height: none; overflow: visible; }
}
