:root {
  --bg: #171a1e;
  --bg-footer: #0a0c10;
  --text: #ffffff;
  --text-muted: #e0e0e0;
  --text-footer: #888;
  --page-padding-y: clamp(1rem, calc(3.125vw - 0.5rem), 2rem);
  --page-padding-x: clamp(1.25rem, calc(11.71875vw - 4.375rem), 5rem);
}

body.light {
  --bg: #f0f2f5;
  --bg-footer: #d8dbe0;
  --text: #161a20;
  --text-muted: #444;
  --text-footer: #666;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 4rem 1.5rem;
}

.page-title,
.gallery-title,
.post-title {
  font-size: 2.5rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  padding: var(--page-padding-y) var(--page-padding-x);
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  list-style: none;
  gap: 2rem;
}

.site-nav ul li a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.site-nav ul li a:hover {
  opacity: 0.7;
}

.theme-toggle {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
}

.theme-toggle svg {
  width: 1.375rem;
  height: 1.375rem;
}

.theme-toggle .icon-sun {
  display: none;
}

body.light .theme-toggle .icon-sun {
  display: block;
}

body.light .theme-toggle .icon-moon {
  display: none;
}

footer {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: var(--page-padding-y) var(--page-padding-x);
  font-size: 0.875rem;
  color: var(--text-footer);
  background-color: var(--bg-footer);
}

.footer-updated {
  opacity: 0.75;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.5;
}

.footer-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-brand {
  color: var(--text-footer);
  text-decoration: none;
}

.footer-icons a {
  color: var(--text-footer);
  text-decoration: none;
  display: flex;
  transition: opacity 0.2s;
}

.footer-icons a:hover {
  opacity: 0.7;
}

.footer-icons svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 768px) {
  main {
    padding: 2.5rem 1.5rem;
  }

  .page-title,
  .gallery-title,
  .post-title {
    font-size: 1.75rem;
  }

  .footer-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .footer-separator {
    display: none;
  }

  .site-nav ul {
    gap: 1rem;
  }

  .site-nav ul li a {
    font-size: 0.875rem;
  }

  footer {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .page-title,
  .gallery-title,
  .post-title {
    font-size: 1.5rem;
  }

  .footer-info {
    align-items: center;
  }

  .site-nav ul {
    gap: 0.75rem;
  }

  .site-nav ul li a {
    font-size: 0.8rem;
  }

  footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
  vertical-align: baseline;
  position: relative;
  top: -0.05rem;
}

.pin-icon {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.tag-pinned {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

body.light .tag-pinned {
  background-color: rgba(0, 0, 0, 0.07);
}
