/* --------------------------------------------------------------------------
   Reset & globals
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  --primary: #0078D4;
  font-family: "Urbanist", sans-serif;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
#cover {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  z-index: 7;
}

#name,
#title {
  visibility: hidden;
}

/* typography overrides */
h1 {
  font-size: 3rem;
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

/* shared positioning for header and nav */
header,
nav {
  position: fixed;
  left: 50%;
  /* horizontal centring only here; vertical will be handled in
     the dedicated header rule to allow translateY adjustments */
  transform: translateX(-50%);
}

header {
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  z-index: 10;
  /* add vertical translation here so the header is exactly centered
     regardless of viewport height */
  transform: translate(-50%, -50%);
}

#title {
  margin-top: 0.4rem;
}

header p {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  margin-top: 0;
  color: gray;
  z-index: 7;
}

nav {
  top: 9rem;
  display: flex;
  gap: 2rem;
  z-index: 6;
  justify-content: center; /* center nav links horizontally */
}

.nav-link {
  text-decoration: none;
  color: gray;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nav-link.active {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Slider & slides
   -------------------------------------------------------------------------- */
#slider {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  align-items: flex-start; /* vertical alignment for slides */
  opacity: 0;
}

.slide {
  position: relative;
  flex: 0 0 100vw;
  min-width: 100vw;
  max-width: 100vw;
  align-items: flex-start;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding-top: 180px;
}

.slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.slide-content.resume-content {
  justify-content: flex-start;
}

/* --------------------------------------------------------------------------
   Resume slide
   -------------------------------------------------------------------------- */
.resume-content {
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}


.resume-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.resume-section {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 1.5rem;
}

.resume-section + .resume-section {
  margin-top: 1.25rem;
  border-top: 1px solid #e5e5e5;
  padding-top: 1.25rem;
}

.resume-section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: gray;
  margin-bottom: 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.resume-entry {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.resume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
}

.resume-role {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.01em;
}

.resume-company {
  font-size: 1rem;
  font-weight: 600;
  color: #777;
  letter-spacing: 0.04em;
}

.resume-date {
  font-size: 1rem;
  font-weight: 500;
  color: #999;
  letter-spacing: 0.02em;
}

.resume-highlights {
  margin: 0.4rem 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.resume-highlights li {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.2;
  color: #444;
}

.resume-highlights a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.resume-highlights a:hover {
  color: #111;
}

/* certifications */
.certifications {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.cert-badge {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: block;
}

.cert-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.1rem;
}

/* --------------------------------------------------------------------------
   Space Weather slide
   -------------------------------------------------------------------------- */
.space-weather-content {
  justify-content: flex-start;
  padding-top: 2rem;
}

.notices-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  max-height: calc(100vh - 250px);
  max-height: calc(100dvh - 250px);
  overflow-y: auto;
  scrollbar-width: none;
}

.notices-container::-webkit-scrollbar {
  display: none;
}

.notices-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 2rem;
  text-align: center;
}

.notices-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notice-item {
  padding: 1rem;
  border-left: 4px solid;
  border-radius: 4px;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.notice-item {
  border-left-color: #0078D4;
  background: rgba(0, 120, 212, 0.05);
}

.notice-item.notice-warning {
  border-left-color: #ff9500;
  background: rgba(255, 149, 0, 0.08);
}

.notice-item.notice-alert {
  border-left-color: #d13438;
  background: rgba(209, 52, 56, 0.08);
}

.notice-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.notice-type {
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
}

.notice-time {
  font-size: 1rem;
  color: #999;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.notice-window {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
  color: #666;
}

.notice-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notice-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0078D4;
  background: rgba(0, 120, 212, 0.12);
  border: 1px solid rgba(0, 120, 212, 0.25);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.notice-tag.notice-cause,
.notice-tag.notice-band {
  color: #0078D4;
  background: rgba(0, 120, 212, 0.12);
  border-color: rgba(0, 120, 212, 0.25);
}

.notice-tag.notice-k-index {
  color: #8a6b00;
  background: rgba(255, 205, 86, 0.24);
  border-color: rgba(255, 205, 86, 0.42);
}

.notice-tag.notice-k-index.k-index-0,
.notice-tag.notice-k-index.k-index-1 {
  color: #8a6b00;
  background: rgba(255, 205, 86, 0.24);
  border-color: rgba(255, 205, 86, 0.42);
}

.notice-tag.notice-k-index.k-index-2,
.notice-tag.notice-k-index.k-index-3,
.notice-tag.notice-k-index.k-index-4 {
  color: #9a4b00;
  background: rgba(255, 149, 0, 0.22);
  border-color: rgba(255, 149, 0, 0.4);
}

.notice-tag.notice-k-index.k-index-5,
.notice-tag.notice-k-index.k-index-6 {
  color: #9b3b00;
  background: rgba(236, 101, 0, 0.24);
  border-color: rgba(236, 101, 0, 0.42);
}

.notice-tag.notice-k-index.k-index-7,
.notice-tag.notice-k-index.k-index-8,
.notice-tag.notice-k-index.k-index-9 {
  color: #8f1f1f;
  background: rgba(209, 52, 56, 0.22);
  border-color: rgba(209, 52, 56, 0.4);
}

.notice-tag.notice-g-scale {
  color: #8a6b00;
  background: rgba(255, 205, 86, 0.24);
  border-color: rgba(255, 205, 86, 0.42);
}

.notice-tag.notice-g-scale.g-scale-1 {
  color: #8a6b00;
  background: rgba(255, 205, 86, 0.24);
  border-color: rgba(255, 205, 86, 0.42);
}

.notice-tag.notice-g-scale.g-scale-2 {
  color: #9a4b00;
  background: rgba(255, 149, 0, 0.22);
  border-color: rgba(255, 149, 0, 0.4);
}

.notice-tag.notice-g-scale.g-scale-3 {
  color: #9b3b00;
  background: rgba(236, 101, 0, 0.24);
  border-color: rgba(236, 101, 0, 0.42);
}

.notice-tag.notice-g-scale.g-scale-4 {
  color: #972a1d;
  background: rgba(224, 73, 52, 0.24);
  border-color: rgba(224, 73, 52, 0.42);
}

.notice-tag.notice-g-scale.g-scale-5 {
  color: #8f1f1f;
  background: rgba(209, 52, 56, 0.22);
  border-color: rgba(209, 52, 56, 0.4);
}

.notice-comments {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.4;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Travel slide & globe
   -------------------------------------------------------------------------- */
.travel-slide {
  position: relative;
  padding-top: 0;
}

#globe {
  position: absolute;
  top: 190px;
  left: 50%;
  transform: translateX(-50%);
}

#legend {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  font-size: 1rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #888;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

@media (max-width: 900px) {
  h1 {
    font-size: 2.4rem;
  }

  header p,
  .nav-link {
    font-size: 1rem;
  }

  nav {
    top: 8rem;
    gap: 1.2rem;
  }

  .slide {
    padding-top: 155px;
  }

  .travel-slide {
    padding-top: 160px;
  }

  .resume-content {
    max-height: calc(100dvh - 130px);
    padding: 0.9rem 1.1rem 2.5rem;
  }

  .notices-container {
    max-height: calc(100dvh - 210px);
    padding: 0 1rem;
  }

  #globe {
    top: 165px;
  }

  #legend {
    gap: 0.9rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 1.9rem;
  }

  #title {
    margin-top: 0.3rem;
  }

  header p {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
  }

  nav {
    top: 6.8rem;
    width: calc(100% - 1rem);
    gap: 0.75rem;
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .nav-link {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
  }

  .slide {
    padding-top: 130px;
  }

  .travel-slide {
    padding-top: 150px;
  }

  .resume-content {
    max-height: calc(100dvh - 115px);
    padding: 0.7rem 0.85rem 1.7rem;
  }

  .resume-role {
    font-size: 1.05rem;
  }

  .resume-company,
  .resume-date,
  .resume-highlights li,
  .cert-name {
    font-size: 0.9rem;
  }

  .space-weather-content {
    padding-top: 1rem;
  }

  .notices-container {
    max-height: calc(100dvh - 150px);
    padding: 0 0.7rem;
  }

  .notice-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .notice-type {
    font-size: 1rem;
  }

  .notice-time,
  .notice-window {
    font-size: 0.82rem;
  }

  .notice-comments {
    font-size: 0.95rem;
  }

  .travel-slide .slide-content {
    justify-content: flex-start;
    align-items: center;
    padding-top: 0;
  }

  #globe {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
  }

  #legend {
    position: static;
    transform: none;
    margin-top: 0.75rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }
}