:root {
  --wallpaper: url("assets/images/city_vancouver.jpg");
  --overlay: rgba(10, 17, 24, 0.72);
  --text: #eaf0f4;
  --back-color: #89d4ff;
  --hero-bg: #203041;
  --hero-border: #31485f;
  --hero-img-border: #39526a;
  --meta: #9fc3dd;
  --copy: #cfdee8;
  --brand-sub: #bcd2e2;
  --hero-image-width: 100%;
}

body {
  --weather-overlay: var(--overlay);
  --weather-bg: var(--wallpaper);
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans KR", sans-serif;
  background: linear-gradient(var(--weather-overlay), var(--weather-overlay)), var(--weather-bg) center / cover no-repeat;
  color: var(--text);
  transition: background 420ms ease;
}

body.weather-clear { --weather-overlay: rgba(10, 20, 34, 0.52); }
body.weather-cloudy { --weather-overlay: rgba(16, 20, 28, 0.62); }
body.weather-rain { --weather-overlay: rgba(9, 15, 23, 0.72); }
body.weather-snow { --weather-overlay: rgba(18, 28, 42, 0.56); }
body.weather-fog { --weather-overlay: rgba(19, 24, 32, 0.7); }
body.weather-storm { --weather-overlay: rgba(8, 12, 20, 0.76); }

.wrap {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 28px;
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-brand > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 38px;
  gap: 0;
}

.home-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.site-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 9px;
  mix-blend-mode: screen;
  opacity: 0.96;
}

.site-brand h1 {
  margin: 0;
  font-family: "Google Sans", "Google Sans Text", "Product Sans", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  line-height: 1;
  position: relative;
  display: inline-block;
  padding: 0;
  isolation: isolate;
  --hue: 0deg;
}

.site-brand h1 .char {
  display: inline-block;
  color: #dff6ff;
  text-shadow:
    0 0 8px rgba(95, 210, 255, 0.72),
    0 0 16px rgba(95, 210, 255, 0.52);
  animation: doobobNeon 6s linear infinite;
}

.site-brand h1 .char:nth-child(1) { animation-delay: 0s; }
.site-brand h1 .char:nth-child(2) { animation-delay: -1s; }
.site-brand h1 .char:nth-child(3) { animation-delay: -2s; }
.site-brand h1 .char:nth-child(4) { animation-delay: -3s; }
.site-brand h1 .char:nth-child(5) { animation-delay: -4s; }
.site-brand h1 .char:nth-child(6) { animation-delay: -5s; }

.site-brand h1::before,
.site-brand h1::after {
  content: "";
  position: absolute;
  inset: -6px -12px;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

.site-brand h1::before {
  background:
    radial-gradient(circle at 6% 48%, rgba(124, 227, 255, 0.8) 0 2px, transparent 3px),
    radial-gradient(circle at 52% 78%, rgba(194, 144, 255, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 94% 60%, rgba(255, 135, 120, 0.72) 0 2px, transparent 3px);
  animation: titleOrbitA 8s linear infinite;
}

.site-brand h1::after {
  background:
    radial-gradient(circle at 14% 82%, rgba(124, 227, 255, 0.62) 0 3px, transparent 5px),
    radial-gradient(circle at 86% 84%, rgba(210, 159, 255, 0.58) 0 3px, transparent 5px);
  animation: titleOrbitB 6.5s ease-in-out infinite;
}

.site-brand p {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.05;
  color: var(--brand-sub);
  letter-spacing: 0.05em;
}

.lang {
  display: inline-flex;
  gap: 6px;
  font-size: 0.9rem;
}

.lang a {
  color: var(--meta);
  text-decoration: none;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}

.lang a.active {
  background: #2a3f52;
  color: #eaf0f4;
}

.weather-panel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 20, 30, 0.28);
  border: 1px solid rgba(206, 230, 255, 0.26);
  border-radius: 12px;
  padding: 8px 10px;
  backdrop-filter: blur(4px);
}

.weather-city {
  border: 1px solid rgba(184, 213, 245, 0.35);
  background: transparent;
  color: #f5fbff;
  border-radius: 8px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 34px 7px 10px;
  min-width: 138px;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #d5eaff 50%),
    linear-gradient(135deg, #d5eaff 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 10px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.weather-city option {
  background: rgba(13, 20, 30, 0.96);
  color: #f5fbff;
}

.weather-chip {
  color: #ecf5ff;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: normal;
  line-height: 1.3;
}

.weather-chip strong {
  color: #9dd8ff;
  font-weight: 700;
}

.weather-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 260ms ease;
}

.weather-fx.active { opacity: 1; }

.wx-particle {
  position: absolute;
  border-radius: 999px;
  will-change: transform, opacity;
}

.wx-rain {
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(180, 225, 255, 0.08), rgba(180, 225, 255, 0.85));
  animation: wxRain linear infinite;
}

.wx-snow {
  width: 7px;
  height: 7px;
  background: rgba(233, 245, 255, 0.9);
  box-shadow: 0 0 10px rgba(233, 245, 255, 0.45);
  animation: wxSnow linear infinite;
}

.wx-fog {
  width: 220px;
  height: 36px;
  background: radial-gradient(circle, rgba(220, 228, 236, 0.22) 0%, rgba(220, 228, 236, 0) 70%);
  filter: blur(1px);
  animation: wxFog linear infinite;
}

.wx-spark {
  width: 5px;
  height: 5px;
  background: rgba(255, 198, 123, 0.8);
  box-shadow: 0 0 12px rgba(255, 198, 123, 0.62);
  animation: wxSpark ease-in-out infinite;
}

.hero {
  margin-top: 18px;
  background: var(--hero-bg);
  border: 1px solid var(--hero-border);
  border-radius: 16px;
  padding: 22px;
}

.hero img {
  width: var(--hero-image-width);
  border-radius: 12px;
  border: 1px solid var(--hero-img-border);
  margin: 0 auto 16px;
  display: block;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
}

.meta {
  margin: 8px 0 0;
  color: var(--meta);
  font-weight: 600;
}

p {
  line-height: 1.7;
  color: var(--copy);
}

ul {
  line-height: 1.7;
  color: var(--copy);
}

@keyframes doobobNeon {
  0% {
    color: #dff6ff;
    text-shadow: 0 0 8px rgba(95, 210, 255, 0.72), 0 0 16px rgba(95, 210, 255, 0.52);
  }
  25% {
    color: #ffd8f1;
    text-shadow: 0 0 8px rgba(255, 145, 223, 0.74), 0 0 16px rgba(255, 145, 223, 0.54);
  }
  50% {
    color: #ffe5cd;
    text-shadow: 0 0 8px rgba(255, 175, 107, 0.74), 0 0 16px rgba(255, 175, 107, 0.54);
  }
  75% {
    color: #e1dcff;
    text-shadow: 0 0 8px rgba(177, 160, 255, 0.74), 0 0 16px rgba(177, 160, 255, 0.54);
  }
  100% {
    color: #dff6ff;
    text-shadow: 0 0 8px rgba(95, 210, 255, 0.72), 0 0 16px rgba(95, 210, 255, 0.52);
  }
}

@keyframes titleOrbitA {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes titleOrbitB {
  0%, 100% { transform: rotate(0deg); opacity: 0.7; }
  50% { transform: rotate(-180deg); opacity: 0.95; }
}

@keyframes wxRain {
  from { transform: translateY(-130vh) translateX(0) rotate(12deg); opacity: 0; }
  15% { opacity: 1; }
  to { transform: translateY(120vh) translateX(32px) rotate(12deg); opacity: 0; }
}

@keyframes wxSnow {
  from { transform: translateY(-120vh) translateX(0); opacity: 0; }
  15% { opacity: 1; }
  to { transform: translateY(120vh) translateX(40px); opacity: 0; }
}

@keyframes wxFog {
  from { transform: translateX(-28vw); opacity: 0.2; }
  50% { opacity: 0.55; }
  to { transform: translateX(128vw); opacity: 0.2; }
}

@keyframes wxSpark {
  0%, 100% { transform: translateY(0) scale(0.8); opacity: 0.35; }
  50% { transform: translateY(-8px) scale(1.2); opacity: 1; }
}

@media (max-width: 760px) {
  .top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .top-right {
    width: 100%;
    justify-content: space-between;
  }

  .weather-panel {
    width: 100%;
    justify-content: space-between;
  }
}
