@view-transition {
  navigation: auto;
}
:root {
  /* Dark mode as default to match original spirit */
  --bg-color: #000000;
  --text-color: #b0b0b0;
  --heading-color: #ffffff;
  --link-color: #b0b0b0;
  --link-hover: #ffffff;
  --accent-color: #8bff00;
  --border-color: #333333;
  --font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #555555;
  --heading-color: #000000;
  --link-color: #555555;
  --link-hover: #000000;
  --accent-color: #008800;
  --border-color: #cccccc;
}

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

html {
  background-color: var(--bg-color);
  color: var(--text-color);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
}

body.theme-transition {
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

li.on>a,
a.active {
  color: var(--accent-color) !important;
  font-weight: bold;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

header.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.5rem 0 1rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.logo img {
  max-height: 90px;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  margin-left: 1rem;
}

.theme-toggle:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
}

.navSubs {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-end;
}

.navSubs ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.navSubs a {
  font-size: 13px;
}

/* Layout */
.content {
  min-height: 60vh;
  width: 100%;
  margin-bottom: 3rem;
}
.content>img {
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
}

.sideNav {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 250px;
}

.sideNav>li {
  margin-bottom: 0.8rem;
  width: 150px;
}

@media(min-width: 768px) {
  .sideNav {
    float: left;
    width: 320px;
  }
}

.sideNav ul {
  display: none;
}

.sideNav li.on ul {
  display: block;
  list-style: none;
  position: absolute;
  left: 140px;
  top: 0;
  width: 150px;
  padding: 0;
  margin: 0;
}

.sideNav ul>li {
  margin-bottom: 0.8rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  list-style: none;
  overflow: hidden;
  /* Clears floats naturally and ensures space constraint next to float */
  padding: 0;
  margin: 0;
}

.gallery li {
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  border-radius: 4px;
  overflow: hidden;
  padding: 4px;
  transition: border-color 0.2s ease;
}

.gallery li:hover {
  border-color: var(--link-hover);
}

.gallery img {
  width: 100%;
  height: auto;
  min-height: 150px;
  object-fit: contain;
  display: block;
}

footer.main-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact a {
  border: 1px solid var(--border-color);
  padding: 0.4rem 2rem;
  transition: all 0.2s;
  display: inline-block;
}

.contact a:hover {
  border-color: var(--link-hover);
  color: var(--link-hover);
}

@media (max-width: 768px) {
  header.main-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }

  nav.main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .sideNav ul {
    position: static;
    margin-left: 1rem;
    margin-top: 0.5rem;
    left: auto;
    width: auto;
  }

  .navSubs {
    justify-content: center;
  }

  .sideNav {
    width: 100%;
    margin-bottom: 2rem;
  }
}

/* Custom Vanilla Lightbox */
.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}
.custom-lightbox img {
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 4px solid var(--border-color);
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  transition: color 0.2s;
}
.lightbox-close:hover {
  color: var(--accent-color);
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 40px;
  cursor: pointer;
  padding: 10px 20px;
  transition: background 0.2s, color 0.2s;
  z-index: 10000;
}
.lightbox-prev:hover, .lightbox-next:hover {
  background: var(--accent-color);
  color: black;
}
.lightbox-prev {
  left: 20px;
}
.lightbox-next {
  right: 20px;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}