/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0e0e0e;
  --surface:   #161616;
  --border:    #2a2a2a;
  --text:      #f5f5f5;      /* white */
  --muted:     #999999;      /* light grey */
  --accent:    #cccccc;      /* medium grey */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'bd-geminis', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; }

/* ── Layout ───────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* ── Nav ──────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 2.5rem;
  background: rgba(14,14,14,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav .logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
nav ul { list-style: none; display: flex; gap: 2rem; }
nav ul a { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.05em; text-transform: uppercase; }
nav ul a:hover { color: var(--text); text-decoration: none; }

/* Mobile header — hidden by default, shown only on mobile */
.mobile-header { display: none; }

/* Hamburger — hidden by default */
.hamburger-btn { display: none; }

/* ── Hero ─────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: radial-gradient(ellipse at 50% 60%, #1a1610 0%, var(--bg) 70%);
}
#hero .tagline {
  font-size: clamp(0.85rem, 2vw, 1rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #e0e0e0;
  margin-bottom: 1.5rem;
}
#hero h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
#hero .bio {
  max-width: 520px; margin: 0 auto 1.5rem;
  color: var(--muted); font-size: 1.05rem;
}
.china-note {
  max-width: 520px; margin: 0 auto 2.5rem;
  color: var(--muted); font-size: 0.95rem;
}
.china-note a {
  font-family: "la-bohemienne", serif;
  font-size: 1.1rem;
  color: #f5f5f5;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.china-note a:hover { color: #ffffff; }
.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-china {
  /* Same styling as .btn, applies button styling to 365 Days link */
}
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  color: #e0e0e0;
  border-radius: 2px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: #e0e0e0; color: var(--bg); text-decoration: none; }

/* ── Section Headers ──────────────────────────────────────────── */
.section-header {
  text-align: center;
  padding: 5rem 0 3rem;
}
.section-header h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.75rem; }
.section-header p { color: var(--muted); max-width: 480px; margin: 0 auto; }

/* ── Trip Grid ────────────────────────────────────────────────── */
#trips { padding-bottom: 5rem; }

.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.trip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s, border-color 0.25s;
}
.trip-card:hover { transform: translateY(-4px); border-color: var(--accent); }

.trip-cover {
  width: 100%; aspect-ratio: 3/2; 
  object-fit: cover;
  display: block; background: #1c1c1c;
}
.trip-cover-placeholder {
  width: 100%; aspect-ratio: 3/2;
  background: linear-gradient(135deg, #1c1c1c, #222);
  display: flex; align-items: center; justify-content: center;
  color: var(--border); font-size: 2rem;
}

.trip-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.trip-meta { font-size: 0.8rem; color: #b0b0b0; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.trip-title { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 0.75rem; }
.trip-story { color: var(--muted); font-size: 0.95rem; line-height: 1.65; flex: 1; }
.trip-link { display: inline-block; margin-top: 1.25rem; font-size: 0.85rem; letter-spacing: 0.08em; color: #d0d0d0; text-transform: uppercase; }
.trip-link:hover { text-decoration: underline; }

/* ── Gallery Lightbox ─────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10,8,6,0.97);
  flex-direction: column;
  align-items: stretch;
}
#lightbox.open { display: flex; }

/* Top bar */
#lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.8rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#lb-title {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
#lb-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text);
  line-height: 1;
}
#lb-meta {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}
#lb-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
#lb-counter {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.35);
}
#lb-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  transition: color 0.2s;
  font-family: var(--font-sans);
  line-height: 1;
}
#lb-close:hover { color: var(--text); }

/* Progress bar */
#lb-progress {
  height: 2px;
  background: rgba(200,200,200,0.08);
  flex-shrink: 0;
  position: relative;
}
#lb-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.25s ease;
}

/* Image stage */
#lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
#lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1rem 5rem;
}
#lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease;
  user-select: none;
}
#lb-img.loading { opacity: 0; }

/* Prev / Next buttons */
#lb-prev, #lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  font-size: 1.4rem;
  width: 3.2rem;
  height: 3.2rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }
#lb-prev:hover, #lb-next:hover {
  background: rgba(200,200,200,0.12);
  color: var(--text);
}
#lb-prev:disabled, #lb-next:disabled {
  opacity: 0.15;
  cursor: default;
}

/* Thumbnail strip */
#lb-thumbs {
  display: flex;
  gap: 4px;
  padding: 0.6rem 1rem;
  overflow-x: auto;
  flex-shrink: 0;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(200,200,200,0.2) transparent;
}
#lb-thumbs::-webkit-scrollbar { height: 3px; }
#lb-thumbs::-webkit-scrollbar-thumb { background: rgba(200,200,200,0.2); }

.lb-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 42px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  border: 1px solid transparent;
}
.lb-thumb:hover { opacity: 0.75; }
.lb-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

/* Share buttons (in lightbox top bar) */
.gallery-share {
  display: flex;
  gap: 0.6rem;
}
.share-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4);
  width: 2rem;
  height: 2rem;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── About ────────────────────────────────────────────────────── */
#about {
  border-top: 1px solid var(--border);
  padding: 5rem 0;
}
.about-inner {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}
.about-inner img {
  width: 220px; height: 220px; border-radius: 3px;
  filter: grayscale(20%);
  object-fit: cover;
  margin-bottom: 2rem;
}
.about-text h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.25rem; }
.about-text p { color: var(--muted); margin-bottom: 1rem; }

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-content p {
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1.2rem;
}

.social-links a {
  color: #888888;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.social-links a:hover {
  color: #d0d0d0;
}

/* ── Social Nav Icons ─────────────────────────────────────────── */
.social-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.social-nav a {
  display: flex;
  align-items: center;
  color: #888888;
  transition: color 0.2s;
  line-height: 1;
}
.social-nav a:hover { color: #d0d0d0; text-decoration: none; }

/* ── Language Switcher ────────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.lang-switcher a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.1rem 0;
}
.lang-switcher a:hover { color: #d0d0d0; }
.lang-switcher a.active { color: #d0d0d0; }
.lang-switcher span {
  color: #333;
  user-select: none;
}

/* ── Responsive Design ──────────────────────────────────────────── */

/* Hover guards — pointer devices only (prevents iOS sticky-hover) */
@media (hover: hover) {
  .trip-card:hover { transform: translateY(-4px); border-color: var(--accent); }
  .btn:hover { background: #e0e0e0; color: var(--bg); text-decoration: none; }
  #lb-prev:hover, #lb-next:hover { background: rgba(200,200,200,0.12); color: var(--text); }
}

/* Touch feedback */
.trip-card:active { transform: scale(0.98); opacity: 0.85; }
.btn:active       { opacity: 0.75; }
.share-btn:active { opacity: 0.6; }

/* ── MOBILE (up to 1023px) ──────────────────────────────────────── */
@media (max-width: 1023px) {

  body { font-size: 16px; }
  .container { padding: 0 1rem; }

  /* Kill the desktop nav completely */
  nav { display: none !important; }

  /* Mobile header bar */
  .mobile-header {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    z-index: 200;
    background: rgba(14,14,14,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    align-items: center;
    justify-content: center;
  }

  .mobile-logo {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: var(--text);
    pointer-events: none;
  }

  .hamburger-btn {
    display: flex !important;
    position: absolute;
    right: 0; top: 0;
    width: 56px; height: 56px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 1.5rem;
    padding: 0;
    z-index: 201;
  }

  /* Mobile dropdown menu */
  .mobile-menu {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: rgba(14,14,14,0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    z-index: 199;
    animation: slideDown 0.25s ease;
  }
  .mobile-menu.open { display: block; }

  .mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0 0 1rem 0;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu ul li a {
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
  }
  .mobile-menu ul li a:hover { color: var(--text); }

  .mobile-bottom-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
  }
  .mobile-social { display: flex; gap: 1.25rem; align-items: center; }
  .mobile-social a { color: var(--muted); display: flex; align-items: center; }
  .mobile-social a:hover { color: var(--text); }
  .mobile-lang { display: flex; gap: 0.75rem; align-items: center; margin-left: auto; }
  .mobile-lang a { color: #555; font-size: 0.8rem; letter-spacing: 0.08em; text-decoration: none; text-transform: uppercase; }
  .mobile-lang a:hover { color: var(--text); }
  .mobile-lang a.active { color: #d0d0d0; }

  /* Hero */
  #hero {
    min-height: 70vh;
    min-height: 70dvh;
    padding: 4.5rem 1rem 3rem;
  }
  #hero h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  #hero .bio { font-size: 1rem; max-width: 100%; }
  .btn { width: 100%; max-width: 300px; padding: 0.85rem 1.5rem; font-size: 0.8rem; }
  #map-btn { display: none !important; }

  /* Sections */
  .section-header { padding: 3rem 0 2rem; }
  .section-header h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
  .section-header p { font-size: 0.95rem; }

  /* Trip grid — 1 col */
  .trips-grid { grid-template-columns: 1fr; gap: 1rem; }
  .trip-cover { aspect-ratio: 2/1; }
  .trip-body  { padding: 1rem; }
  .trip-title { font-size: 1.1rem; }
  .trip-story { font-size: 0.9rem; }

  /* About */
  #about { padding: 3rem 0; }
  .about-inner { max-width: 100%; padding: 0 1rem; }
  .about-inner img { width: 160px; height: 160px; }
  .about-text h2 { font-size: 1.4rem; }
  .about-text p  { font-size: 0.95rem; }

  /* Lightbox */
  #lb-img-wrap { padding: 0.5rem 3rem; }
  #lb-prev { left: 0.3rem; }
  #lb-next { right: 0.3rem; }
  #lb-prev, #lb-next { width: 2.6rem; height: 2.6rem; font-size: 1.1rem; }
  #lb-thumbs { display: none; }
  #lb-bar { padding: 0.7rem 1rem; }
  #lb-name { font-size: 1.1rem; }

  /* Footer */
  footer { padding: 2rem 0 80px; }
  .footer-content { flex-direction: column; text-align: center; gap: 1rem; padding: 0 1rem; }
  .social-links { gap: 1.5rem; justify-content: center; }
  .social-links a { width: 28px; height: 28px; }

  /* Bottom tab bar */
  .bottom-tab-bar {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: rgba(14,14,14,0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 150;
  }
  .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.4rem 0;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    min-width: 0;
  }
  .tab-item.active { color: var(--accent); }
  .tab-icon { font-size: 1.15rem; }
  .tab-item.lang-tab { display: none; }
  body { padding-bottom: 62px; }
}

/* ── Modal (Map) ─────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  max-width: 900px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

/* ── TABLET (768–1023px): 2-col trip grid ───────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  .trips-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .container { padding: 0 1.5rem; }
}

/* ── DESKTOP (1024px+) ──────────────────────────────────────────── */
@media (min-width: 1024px) {
  nav { display: flex !important; }
  .mobile-header { display: none !important; }
  .hamburger-btn { display: none !important; }
  .mobile-menu { display: none !important; }
  .bottom-tab-bar { display: none !important; }
  body { padding-bottom: 0; }
}
