/* Roboto loaded via <link> in HTML for non-blocking font load */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, button, nav, .home-icon {
  user-select: none;
}

body {
  background: #17171a;
  color: #878794;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  overflow-x: clip;
  padding: 0 40px 0 40px;
}

nav ul {
  list-style: none;
}

nav li {
  display: inline-block;
  padding: 0 15px;
  border-right: 1px solid #444;
}

nav li:last-child {
  border-right: none;
}

nav a {
  color: #878794;
  text-decoration: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
}

nav a:hover {
  color: #fff;
}

nav li.active > a {
  color: #fff;
}

.album-header {
  padding: 16px 0 16px;
}

.album-title {
  font-size: 42px;
  font-weight: 300;
  color: #e5e5e5;
}

.album-header-date {
  font-size: 16px;
  color: #666;
  margin-top: 6px;
}

.album-sub {
  font-size: 14px;
  color: #b7b7b7;
  margin-top: 10px;
}

.grid {
  padding: 0 0px 40px;
}

.row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
  overflow: hidden;
}

.row img {
  display: block;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.2s;
  flex-shrink: 0;
}

.row img:hover {
  filter: brightness(1.15);
}

.modal.open {
  display: flex;
}

.modal img {
  max-width: 90vw;
  max-height: 84vh;
  display: block;
  transform: translateZ(0);
  transition: opacity 0.2s;
}

.modal.loading #m-img {
  opacity: 0;
}

.m-spinner {
  display: none;
  position: absolute;
  width: 36px;
  height: 36px;
  border: 3px solid #333;
  border-top-color: #888;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.modal.loading .m-spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn {
  position: fixed;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
}

.btn:hover {
  color: #ccc;
}

#m-close {
  top: 16px;
  right: 20px;
  font-size: 26px;
  z-index: 110;
}

#m-prev {
  left: 0;
  top: 0;
  height: 100vh;
  font-size: 22px;
  padding: 0 18px;
  z-index: 105;
}

#m-next {
  right: 0;
  top: 0;
  height: 100vh;
  font-size: 22px;
  padding: 0 18px;
  z-index: 105;
}

.counter {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: #555;
  font-size: 13px;
  font-family: Raleway, sans-serif;
}

/* ── Modal progress bar ── */
#m-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  display: flex;
  z-index: 110;
  overflow: visible;
}

.m-seg {
  opacity: 0.35;
  transition: opacity 0.3s;
  flex-shrink: 0;
}
.m-seg.active {
  opacity: 1;
}

#m-progress-dot {
  position: absolute;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid transparent;
  transform: translateX(-50%);
  transition: left 0.18s ease, border-color 0.3s;
  box-shadow: 0 1px 5px rgba(0,0,0,0.7);
  pointer-events: none;
}

#m-section-label {
  position: fixed;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-family: Roboto, sans-serif;
  letter-spacing: 1.5px;
  font-weight: 500;
  text-transform: uppercase;
  background: rgba(0,0,0,0.45);
  padding: 4px 12px;
  border-radius: 3px;
  transition: color 0.3s;
  pointer-events: none;
  z-index: 112;
  white-space: nowrap;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #17171a;
  z-index: 100;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.highlights {
  font-size: 15px;
  color: #818181;
  margin-top: 8px;
  line-height: 1.4;
  margin-left: 20px;
}

/* ── Desktop nav ── */
#nav-placeholder {
  position: sticky;
  top: 0;
  z-index: 50;
}

nav {
  text-align: center;
  padding: 28px 0 20px;
  background: #1e1e22;
  margin-left: -50px;
  margin-right: -50px;
  border-bottom: 1px solid #2a2a2a;
}

.home-icon {
  position: fixed;
  top: 26px;
  left: 20px;
  color: #878794;
  text-decoration: none;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.home-icon span {
  font-size: 18px;
  font-weight: 500;
  margin-top: 3px;
}

.home-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.home-icon:hover,
.home-icon:hover span {
  color: #fff;
}

nav li {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #17171a;
  border: 1px solid #333;
  min-width: 150px;
  z-index: 200;
  padding: 8px 0;
}

.dropdown li {
  display: block;
  padding: 0;
  border-right: none;
  text-align: center;
}

.dropdown li a {
  display: inline-block;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 400;
  color: #878794;
}

.dropdown li a:hover {
  color: #fff;
  background: #222;
}

nav li:hover .dropdown {
  display: block;
}

/* Hamburger hidden on desktop */
.hamburger {
  display: none;
}

/* ── View-mode menu (Public / Private / Manage) ── */
.view-menu {
  position: fixed;
  top: 26px;
  right: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-indicator {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #878794;
}

.mode-indicator.private {
  color: #9b7ed8;
}

.view-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}

.view-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #878794;
  transition: background 0.2s;
}

.view-menu-toggle:hover span {
  background: #fff;
}

.view-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #1e1e22;
  border: 1px solid #2a2a2a;
  list-style: none;
  min-width: 130px;
  z-index: 100;
  padding: 4px 0;
}

.view-menu-dropdown.open {
  display: block;
}

.view-menu-dropdown li {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 400;
  color: #878794;
  cursor: pointer;
  border-right: none;
  text-align: left;
  white-space: nowrap;
}

.view-menu-dropdown li:hover {
  color: #fff;
  background: #2a2a2a;
}

.view-menu-dropdown li.active {
  color: #e5e5e5;
}

.view-menu-dropdown li.active::after {
  content: '\2713';
  float: right;
  margin-left: 12px;
  color: #5a9a5a;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1e2229;
}

::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ── Timeline (desktop) ── */
.timeline {
  display: table;
  border-collapse: separate;
  border-spacing: 0 80px;
  margin: 0 auto;
}

/* ── Year page (filtered view) ── */
.timeline.year-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 60px;
}

.timeline.year-page .year-heading {
  font-size: 32px;
  font-weight: 300;
  color: #444;
  letter-spacing: 3px;
  margin-bottom: 48px;
}

.timeline.year-page .albums {
  justify-content: center;
}

.year-heading {
  font-size: 32px;
  font-weight: 300;
  color: #444;
  letter-spacing: 3px;
}

.year-row {
  display: table-row;
}

.year-cell {
  display: table-cell;
  vertical-align: top;
  padding-top: 42px; /* align text with center of 100px flag circle */
  width: 60px;
  color: #444;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-align: right;
  padding-right: 24px;
  white-space: nowrap;
}

.divider-cell {
  display: table-cell;
  vertical-align: top;
  padding-top: 1px;
  width: 1px;
}

.divider-line {
  width: 1px;
  height: 100px;
  background: #2a2a2a;
  margin-top: 0;
}

.albums-cell {
  display: table-cell;
  vertical-align: top;
  padding-left: 40px;
}

.albums {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.album {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  width: 130px;
  flex-shrink: 0;
}

.flag-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #2a2a2a;
  transition: border-color 0.2s, transform 0.2s;
}

.flag-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album:hover .flag-circle {
  border-color: #666;
  transform: scale(1.06);
}

.album-name {
  color: #666;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  line-height: 1.4;
  transition: color 0.2s;
}

.album-city {
  display: block;
  white-space: nowrap;
}

.album-date {
  display: block;
  color: #444;
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
}

.album:hover .album-name {
  color: #ccc;
}


/* ═══════════════════════════════════════
   Mobile
═══════════════════════════════════════ */
@media (max-width: 768px) {
  body {
    padding: 0 16px;
    padding-top: 52px;
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 0 16px;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 52px;
    flex-wrap: nowrap;
    z-index: 50;
  }

  .home-icon {
    position: static;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0;
    color: #878794;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 300;
  }

  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #878794;
    transition: background 0.2s;
  }

  .hamburger:hover span {
    background: #fff;
  }

  nav > ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e1e22;
    border-bottom: 1px solid #2a2a2a;
    padding: 8px 0 12px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 49;
  }

  nav > ul.open {
    display: flex;
  }

  nav li {
    display: block;
    border-right: none;
    border-bottom: 1px solid #2a2a2a;
    padding: 0;
    text-align: center;
  }

  nav li:last-child {
    border-bottom: none;
  }

  nav a {
    font-size: 15px;
    display: inline-block;
    padding: 10px 16px;
  }

  .dropdown {
    position: static;
    transform: none;
    border: none;
    background: transparent;
    display: block !important;
    padding: 0;
    min-width: unset;
  }

  .dropdown li {
    border-bottom: none;
  }

  .dropdown li a {
    display: inline-block;
    font-size: 12px;
    color: #555;
    padding: 4px 16px;
  }

  .dropdown li a:hover {
    background: transparent;
    color: #ccc;
  }

  .view-menu {
    top: 6px;
    right: 56px;
  }

  .timeline {
    display: block;
    width: 100%;
    margin-top: 24px;
  }

  .year-row {
    display: block;
    margin-bottom: 36px;
  }

  .year-cell {
    display: block;
    text-align: left;
    padding: 0 0 12px 0;
    font-size: 12px;
    letter-spacing: 1px;
  }

  .divider-cell {
    display: none;
  }

  .albums-cell {
    display: block;
    padding-left: 0;
  }

  .albums {
    gap: 16px;
    justify-content: flex-start;
  }

  .album {
    width: 100px;
  }

  .flag-circle {
    width: 72px;
    height: 72px;
  }

  .album-name {
    font-size: 11px;
    max-width: 100px;
  }

  .album-title {
    font-size: 26px;
  }

  .album-header {
    padding: 12px 0;
  }

  .btn {
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }
}

/* ── Album sections ── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 80px 0 14px;
}

.section-header:first-child {
  padding-top: 8px;
}

.section-name {
  font-size: 20px;
  font-weight: 300;
  color: #c8c8c8;
}

.section-date {
  font-size: 16px;
  color: #555;
  letter-spacing: 0.5px;
}

.section-description {
  font-size: 14px;
  color: #818181;
  margin-top: -6px;
  padding-bottom: 14px;
}