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

:root {
  --bg-1: #020205;
  --bg-2: #07080d;
  --panel-bg: rgba(11, 13, 18, 0.8);
  --text: #f2f6ff;
  --muted: #b8c7de;
  --accent: #c9d4e3;
  --entry-pad-block: clamp(2.25rem, 5vh, 4.5rem);
  --entry-pad-inline: clamp(1.75rem, 4vw, 4.25rem);
  --entry-gap-eyebrow-title: 1rem;
  --entry-gap-title-copy: 1rem;
  --entry-gap-copy-copy: 0.9rem;
  --entry-gap-copy-button: 2.25rem;
}

body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 66% 42%, rgba(130, 136, 153, 0.08), transparent 52%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 44%, rgba(170, 176, 192, 0.1), transparent 58%);
  transition: filter 0.8s ease-in-out;
}

.bg-grid::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.13) 0.5px, transparent 0.8px);
  background-size: 3px 3px;
  opacity: 0.08;
}

.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 56%, rgba(0, 0, 0, 0.54) 100%);
  opacity: 1;
}

.bg-grid .star {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 2px);
  height: var(--size, 2px);
  border-radius: 50%;
  opacity: var(--opacity, 0.45);
  background: rgba(235, 242, 255, 0.9);
  box-shadow: 0 0 5px rgba(189, 208, 235, 0.28);
  transform: translate3d(var(--x, 50vw), var(--y, 50vh), 0);
  animation: starTwinkle var(--duration, 6s) ease-in-out var(--delay, 0s) infinite;
}

.entry {
  position: relative;
  width: min(1000px, calc(100% - 2rem));
  margin: 3.5rem auto;
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--panel-bg);
  border: 1px solid rgba(219, 227, 240, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(230, 237, 247, 0.05),
    inset 0 -24px 44px rgba(0, 0, 0, 0.25),
    0 1.8rem 4.5rem rgba(0, 0, 0, 0.45);
  min-height: min(640px, calc(100vh - 7rem));
  transform: translateY(0);
  opacity: 1;
  transition: none;
}

.entry__media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 44%, rgba(194, 205, 225, 0.08), transparent 38%),
    linear-gradient(to right, rgba(3, 4, 9, 0.78) 0%, rgba(5, 7, 12, 0.38) 55%, rgba(4, 6, 11, 0.68) 100%);
}

.entry__overlay {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  padding: var(--entry-pad-block) var(--entry-pad-inline);
}

.eyebrow {
  margin: 0 0 var(--entry-gap-eyebrow-title);
  font-size: 0.92rem;
  color: rgba(232, 239, 248, 0.6);
}

.entry__overlay h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0.03em;
  margin-bottom: var(--entry-gap-title-copy);
}

.entry__copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 44ch;
}

.entry__copy + .entry__copy {
  margin-top: var(--entry-gap-copy-copy);
}

.entry__button {
  margin-top: var(--entry-gap-copy-button);
  align-self: center;
  border: 1px solid rgba(225, 232, 242, 0.32);
  border-radius: 999px;
  background: rgba(188, 200, 218, 0.1);
  color: rgba(238, 243, 250, 0.92);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.entry__button:hover {
  transform: translateY(-1px);
  border-color: rgba(238, 244, 252, 0.45);
  box-shadow: 0 0 20px rgba(208, 221, 242, 0.16);
}

.entry__button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.site {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto 4rem;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.site__header {
  padding: 1rem 0 1.5rem;
}

.site h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
}

.site p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.section-card {
  background: rgba(10, 17, 30, 0.5);
  border: 1px solid rgba(199, 225, 255, 0.17);
  border-radius: 1rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 36px rgba(6, 13, 26, 0.25);
}

.section-card + .section-card {
  margin-top: 1rem;
}

.section-card h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
}

.section-card p {
  color: rgba(233, 243, 255, 0.88);
  line-height: 1.65;
}

.project-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  padding: 1.1rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(27, 40, 61, 0.85), rgba(19, 29, 46, 0.85));
  border: 1px solid rgba(130, 171, 222, 0.24);
  box-shadow: 0 10px 28px rgba(5, 12, 24, 0.22);
}

.project-card h4 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.project-card p {
  margin: 0;
  font-size: 0.94rem;
}

.travel__intro {
  margin-bottom: 1rem;
}

.map-panel {
  position: relative;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(144, 196, 255, 0.26);
  background:
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.15), transparent 42%),
    linear-gradient(145deg, #12223a, #1a3b66);
  min-height: 320px;
}

.world-map {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.78;
}

.world-map path {
  fill: rgba(124, 183, 246, 0.36);
  stroke: rgba(195, 225, 255, 0.45);
  stroke-width: 2;
}

.map-pin {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: #4fa6ff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 0 0 0 rgba(100, 176, 255, 0.45);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 100% auto auto 50%;
  width: 2px;
  height: 9px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
}

.map-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

.map-pin[aria-pressed="true"] {
  background: #ffd66d;
  box-shadow: 0 0 0 8px rgba(255, 214, 109, 0.15);
}

.travel__selected {
  margin-top: 0.85rem;
  font-size: 0.95rem;
}

#selectedPlaces {
  color: #d5ebff;
  font-weight: 700;
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.moment-card {
  padding: 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(164, 203, 242, 0.25);
  background: rgba(19, 30, 47, 0.72);
}

.moment-image {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 0.55rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  color: rgba(231, 241, 255, 0.85);
  background:
    linear-gradient(135deg, rgba(114, 168, 230, 0.35), rgba(81, 120, 174, 0.35)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 9px, transparent 9px 18px);
}

.moment-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.moment-card p {
  margin: 0;
  font-size: 0.9rem;
}

body.is-entered .entry {
  position: absolute;
  top: 3.5rem;
  left: 50%;
  margin: 0;
  transform: translate(-50%, 0);
  transform-origin: center center;
  animation: panelDissolve 0.8s ease-in-out forwards;
  pointer-events: none;
}

body.is-entered .site {
  animation: siteFadeUp 0.75s ease-in-out 0.3s forwards;
  pointer-events: auto;
}

body.is-entered .bg-grid {
  filter: brightness(1.08);
}

@keyframes panelDissolve {
  0% {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    filter: blur(10px) saturate(1.08);
    transform: translate(-50%, 0);
  }
}

@keyframes siteFadeUp {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes starTwinkle {
  0% {
    opacity: calc(var(--opacity, 0.7) * 0.45);
    filter: brightness(0.9);
  }

  100% {
    opacity: var(--opacity, 0.7);
    filter: brightness(1.25);
  }
}

@media (max-width: 720px) {
  .entry {
    min-height: min(560px, calc(100vh - 3rem));
    margin: 1.5rem auto;
    border-radius: 1.1rem;
  }

  body.is-entered .entry {
    top: 1.5rem;
  }

  .entry__overlay {
    width: 100%;
    min-height: inherit;
  }

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

  .map-panel {
    min-height: 220px;
  }
}
