* {
  margin: 0;
  padding: 0;
}

html { transition: background-color .3s ease; }

body {
  font: 16px/1.8 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
  "Microsoft YaHei", Helvetica, Arial, sans-serif,
  "Apple Color Emoji", "Segoe UI Emoji";
  text-align: center;
}

p { margin: 20px 0; }

ul, ol { list-style: none; }


/* Fonts
/* ================================================= */
@font-face {
  font-family: 'icomoon';
  src:
    url('icomoon.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

[class^="icon-"], [class*=" icon-"] {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'icomoon' !important;
  speak-as: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-map-pin:before {
  content: "\e902";
}
.icon-moon:before {
  content: "\e900";
}
.icon-sun:before {
  content: "\e901";
}
.icon-quotes-left:before {
  content: "\e977";
}
.icon-quotes-right:before {
  content: "\e978";
}


/* Animation
/* ================================================= */
.animate-slide-in-down,
.animate-slide-in-up,
.animate-slide-in-left,
.animate-slide-in-right {
  animation-duration: .4s;
  animation-timing-function: ease;
  animation-fill-mode: both;
}

.animate-slide-in-down { animation-name: slide-in-down; }

.animate-slide-in-up { animation-name: slide-in-up; }

.animate-slide-in-left { animation-name: slide-in-left; }

.animate-slide-in-right { animation-name: slide-in-right; }

@keyframes slide-in-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* 动画时序（替代原 jQuery 链式动画） */
.quote-line-start,
.quote-line-end,
.quote-icon-start,
.quote-icon-end { animation-delay: .4s; }

.quote-content { animation-delay: .8s; }

.quote-author { animation-delay: 1.2s; }

.links a:nth-child(1) { animation-delay: 1.6s; }
.links a:nth-child(2) { animation-delay: 1.8s; }
.links a:nth-child(3) { animation-delay: 2s; }
.links a:nth-child(4) { animation-delay: 2.2s; }
.links a:nth-child(5) { animation-delay: 2.4s; }

.location-icon,
.location-text { animation-delay: 2.8s; }

@media (prefers-reduced-motion: reduce) {
  .animate-slide-in-down,
  .animate-slide-in-up,
  .animate-slide-in-left,
  .animate-slide-in-right { animation: none; }
}


/* Headline
/* ================================================= */
.vi {
  margin: 100px auto 0;
  max-width: 780px;
}

@media (max-width: 767px) {
  .vi { margin-top: 50px; }
}


/* Quote
/* ================================================= */
.quote {
  position: relative;
  overflow: hidden;
  margin: 40px 20px;
}

.quote-line {
  display: block;
  position: relative;
  height: 1px;
  transition: all .3s ease;
}

.quote cite::before {
  content: "-";
  padding: 0 5px;
}

.quote-icon { position: absolute; }

.quote-icon-start { left: 0; top: 0; }

.quote-icon-end { right: 0; bottom: 0; }

.quote-content { margin: 30px auto 0; }

.quote-author { margin: 10px auto 30px; }


/* Links
/* ================================================= */
.links {
  margin-top: 40px;
  font-size: 14px;
}

.links a {
  display: inline-block;
  position: relative;
  margin-left: 10px;
  text-decoration: none;
  border-bottom: 1px dotted;
  transition: border .3s ease, color .3s ease;
}

.links a:hover { border-bottom: 1px solid; }

.links a:active { top: 1px !important; }

.links a:first-child { margin-left: 0; }


/* Location
/* ================================================= */
.location {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.location-icon { font-size: 14px; }

.location-text {
  margin-left: 6px;
  font-size: 13px;
}

.relocating {
  opacity: 0;
  font-size: 13px;
  transition: all .3s ease;
}


/* Theme
/* ================================================= */
html {
  --bg: white;
  --text: #333;
  --selection-bg: #222;
  --selection-color: white;
  --h1: #222;
  --quote: #666;
  --quote-icon: #ccc;
  --quote-line: #eee;
  --a: #333;
  --link-border: #999;
  --link-hover-color: #333;
  --link-hover-border: #333;
  --location: #666;
  --relocating: #ccc;
}

/* 夜间模式：由 theme.js 依据当日日出日落时间在 <html> 上切换 .dark 类 */
html.dark {
  --bg: #121621;
  --text: #6C7486;
  --selection-bg: #222;
  --selection-color: #99A3BA;
  --h1: #E4ECFA;
  --quote: #6C7486;
  --quote-icon: #3F4656;
  --quote-line: #242836;
  --a: #99A3BA;
  --link-border: #6C7486;
  --link-hover-color: #E4ECFA;
  --link-hover-border: #99A3BA;
  --location: #6C7486;
  --relocating: #ccc;
}

html { background-color: var(--bg); }
body { color: var(--text); transition: color .3s ease; }
::selection { background: var(--selection-bg); color: var(--selection-color); }
h1 { color: var(--h1); }
.quote { color: var(--quote); }
.quote-icon { color: var(--quote-icon); }
.quote-line { background: var(--quote-line); }
a { color: var(--a); }
.links a { border-bottom-color: var(--link-border); }
.links a:hover { color: var(--link-hover-color); border-bottom-color: var(--link-hover-border); }
.location { color: var(--location); }
.relocating { color: var(--relocating); }
