:root {
  color-scheme: dark light;
  --bg: #050509;
  --fg: #f5f5f5;
  --accent: #ffcc33;
  --thumb-bg: transparent; /* match background texture */
  --thumb-border: transparent;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

/* Global reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Page background: dark grey + subtle texture */
body {
  margin: 0;
  font-family: var(--font);

  background-color: #2a2a2e;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 4px
    );
  background-attachment: fixed;
  background-size: auto;
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  padding: 1.5rem 1.5rem 0.75rem;
  max-width: none;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.site-logo {
  margin: 0;
}

.site-logo img {
  max-width: 320px;
  height: auto;
  display: block;
}

/* Navigation menu */
.site-nav {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.nav-link {
  background: transparent;
  border: none;
  color: rgba(245, 245, 245, 0.7);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: var(--font);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.nav-link[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Layout */
main {
  flex: 1;
  padding: 0 1.5rem 2rem;
/*  max-width: 1200px; */
  width: 100%;
  margin: 0 auto;
}

/* Gallery section wrapper */
#gallery-section {
  padding: 1rem 0;
}

/* Main gallery grid */
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 150px;
  gap: 0.75rem;
}

/* Published Work section */
#work-section {
  padding: 1rem 0 0;
}

#work-section h2 {
  margin-top: 0;
  color: var(--accent);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

#work-section p {
  margin: 0 0 1rem;
  color: rgba(245, 245, 245, 0.9);
}

/* Published work grid */
#work-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

/* Hide gallery when viewing a single image */
.gallery--hidden {
  display: none;
}

/* Main gallery thumbnails */
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  background: transparent;          /* was var(--thumb-bg) */
  border: none;                     /* remove solid border */
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out, transform 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery__item:hover,
.gallery__item:focus-visible {
  transform: scale(1.15);
  z-index: 10;
}

.gallery__item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease-out, filter 0.3s ease-out;
  opacity: 0.95;
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
  opacity: 1;
  filter: brightness(1.15);
}

.gallery__item:hover::after,
.gallery__item:focus-visible::after {
  opacity: 1;
}

.gallery__item:hover,
.gallery__item:focus-visible {
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(255, 204, 51, 0.5);
  border-color: transparent;        /* no visible border */
}

/* Published work thumbnails */
.work__item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  background: transparent;          /* match background */
  border: none;                     /* remove border */
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out, transform 0.3s ease-out;
}

.work__item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.work__item:hover,
.work__item:focus-visible {
  transform: scale(1.05);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.65),
    0 0 30px rgba(255, 204, 51, 0.4);
  border-color: transparent;
}

/* About section */
#about-section {
  padding: 2rem;
  max-width: 800px;
  margin: 2rem auto;
  line-height: 1.7;
  color: rgba(245, 245, 245, 0.9);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;

  /* Use same background as body instead of solid black */
  background-color: #2a2a2e;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 4px
    );

  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0;
}

.lightbox--open {
  display: flex;
}

.lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.lightbox__image {
  max-width: 100vw;
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  border: none;

  /* Match non-hover thumbnail drop shadow */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Caption */
lightbox__caption {
  max-width: min(100%, 900px);
  font-size: 0.9rem;
  color: rgba(245, 245, 245, 0.85);
  text-align: center;
  line-height: 1.4;
  margin-top: 0.75rem;
}

/* Lightbox controls */
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: var(--fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease-out, opacity 0.2s ease-out;
}

.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.4rem 0.7rem;
  font-size: 1.6rem;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  padding: 0.75rem 1.1rem;
  font-size: 2rem;
  min-width: 44px;
  min-height: 44px;
}

.lightbox__prev {
  left: 1.2rem;
}

.lightbox__next {
  right: 1.2rem;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* Auto-hide controls */
.lightbox--controls-hidden .lightbox__close,
.lightbox--controls-hidden .lightbox__prev,
.lightbox--controls-hidden .lightbox__next {
  opacity: 0;
  pointer-events: none;
}

/* Small screens */
@media (max-width: 600px) {
  main {
    padding-inline: 1rem;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: center;
  }

  .lightbox__close {
    top: 1rem;
    right: 1rem;
  }

  .lightbox__prev {
    left: 0.5rem;
  }

  .lightbox__next {
    right: 0.5rem;
  }
}
