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

:root {
  --bg-primary: #111118;
  --bg-secondary: #1a1a24;
  --bg-card: #1e1e2a;
  --text-primary: #e4e4e8;
  --text-secondary: #a0a0b0;
  --accent: #6c8cff;
  --accent-hover: #8da6ff;
  --border-subtle: #2a2a3a;
  --nav-height: 60px;
  --max-width: 900px;
  --image-border: rgba(255, 255, 255, 0.08);
  --image-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* === Navigation === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--nav-height);
  backdrop-filter: blur(8px);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.06);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* === Main Content === */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* === Hero Image === */
.hero-image {
  width: 100%;
  max-width: 470px;
  margin: 0 auto 48px;
  display: block;
  border: 1px solid var(--image-border);
  border-radius: 8px;
  box-shadow: var(--image-shadow);
}

/* === Section Styling === */
.section {
  margin-bottom: 48px;
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.section p:last-child {
  margin-bottom: 0;
}

/* === Photo Grid === */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  width: 100%;
  border: 1px solid var(--image-border);
  border-radius: 8px;
  box-shadow: var(--image-shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-grid img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.photo-grid figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === Lightbox === */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-close svg {
  width: 28px;
  height: 28px;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid var(--image-border);
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

.lightbox-caption {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  max-width: 600px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  padding: 16px 12px;
  color: var(--text-primary);
  transition: background-color 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lightbox-nav svg {
  width: 24px;
  height: 24px;
  display: block;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 24px;
    transform: none;
    padding: 12px 16px;
  }

  .lightbox-prev {
    left: 50%;
    transform: translateX(-140%);
  }

  .lightbox-next {
    right: 50%;
    transform: translateX(140%);
  }
}

/* === Links Section === */
.links-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.links-list a {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  background-color: var(--bg-card);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.links-list a:hover {
  border-color: var(--accent);
  background-color: rgba(108, 140, 255, 0.08);
  color: var(--accent-hover);
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* === Responsive === */
@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 12px 24px;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 24px 16px 60px;
  }
}
