:root {
  /* UTC-inspired professional dark palette */
  --primary-color: #4F6DF5;
  --primary-hover: #6B85F7;
  --secondary-color: #3A56D4;
  --accent-color: #A7B1D8;
  
  /* Backgrounds – deep, rich dark */
  --bg-primary: #05060B;
  --bg-secondary: #0B0E1A;
  --bg-card: rgba(242, 245, 255, 0.04);
  
  /* Typography */
  --text-primary: #F2F5FF;
  --text-secondary: #A7B1D8;
  --text-muted: #6B7293;
  
  /* Borders & separators */
  --border-color: rgba(242, 245, 255, 0.10);
  --border-light: rgba(242, 245, 255, 0.06);
  
  /* Gradients replaced with solid accent */
  --gradient-1: #4F6DF5;
  --gradient-2: #6B85F7;
  
  /* Shadows – explicitly none */
  --shadow-glow: none;
  --shadow-card: none;
  
  /* Transitions & fonts unchanged */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* Remove all browser default focus outlines and hover highlights */
*,
*:focus,
*:focus-visible,
*:focus-within {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Remove tap highlight on mobile */
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
}

::selection {
  background: var(--primary-color);
  color: #fff;
}

::-webkit-scrollbar {
  width: 0px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

/* Animated background – subtle grain effect */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-primary);
}

.animated-bg:before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 80%, rgba(79, 109, 245, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(79, 109, 245, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, rgba(107, 133, 247, 0.04) 0%, transparent 40%);
  animation: bgFloat 20s ease-in-out infinite;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.3;
  animation: particleFloat 15s infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0) rotate(0); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(100vh) rotate(0); opacity: 0; }
  10% { opacity: 0.2; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  transition: var(--transition-smooth);
  background: transparent;
}

.nav.scrolled {
  background: transparent;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  /* no box-shadow */
}

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

.nav__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.nav__logo i {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.nav__menu {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-smooth);
}

.nav__link:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-smooth);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link:hover:after,
.nav__link.active:after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav__toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-smooth);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Page Header */
.page-header {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  text-align: center;
}

.page-header__content {
  max-width: 800px;
}

.page-header__subtitle {
  font-family: var(--font-mono);
  color: var(--primary-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
}

.page-header__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.page-header__title .gradient-text {
  color: var(--primary-color);
}

.page-header__description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Gallery Controls */
.gallery-controls {
  max-width: 1400px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.view-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.view-btn:hover {
  color: var(--primary-color);
  background: var(--bg-secondary);
}

.view-btn.active {
  background: var(--primary-color);
  color: #fff;
}

.upload-zone {
  flex: 1;
  max-width: 500px;
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary-color);
  background: rgba(79, 109, 245, 0.04);
}

.upload-zone i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.upload-zone h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.upload-zone p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Gallery Container */
.gallery__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  position: relative;
}

.gallery__grid.masonry {
  display: block;
  column-count: 3;
  column-gap: 2rem;
}

.gallery__grid.masonry .gallery__item {
  break-inside: avoid;
  margin-bottom: 2rem;
  aspect-ratio: auto;
}

/* Gallery Item */
.gallery__item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.gallery__item:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: none;
}

.gallery__image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.9;
}

.gallery__item:hover .gallery__image {
  transform: scale(1.05);
  opacity: 1;
}

.gallery__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 6, 11, 0.95) 0%, rgba(5, 6, 11, 0.5) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery__item:hover .gallery__overlay {
  opacity: 1;
}

.gallery__actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.gallery__item:hover .gallery__actions {
  transform: translateY(0);
  opacity: 1;
}

.gallery__action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.gallery__action-btn:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.gallery__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: transform 0.4s ease;
  color: var(--text-primary);
}

.gallery__item:hover .gallery__title {
  transform: translateY(0);
}

.gallery__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.1s;
}

.gallery__item:hover .gallery__meta {
  transform: translateY(0);
}

.gallery__category {
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
}

.gallery__date {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.gallery__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 11, 0.98);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lightbox__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(5, 6, 11, 0.8), transparent);
}

.lightbox__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.lightbox__counter {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.lightbox__actions {
  display: flex;
  gap: 1rem;
}

.lightbox__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox__btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.1);
}

.lightbox__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 4rem;
}

.lightbox__image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: none;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox__nav:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.lightbox__nav.prev {
  left: 2rem;
}

.lightbox__nav.next {
  right: 2rem;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(400px);
  opacity: 0;
  animation: slideIn 0.3s ease forwards;
  min-width: 300px;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.info {
  border-left-color: var(--primary-color);
}

.toast__icon {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.toast.success .toast__icon {
  color: #10b981;
}

.toast.error .toast__icon {
  color: #ef4444;
}

.toast__content {
  flex: 1;
}

.toast__title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.toast__message {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  background: var(--bg-primary);
  padding: 4rem 2rem 1rem;
}

.footer__container {
  max-width: 1400px;
  margin: 0 auto;
}

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
}

.footer__social-link:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer__column-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer__links {
  list-style: none;
}

.footer__link {
  margin-bottom: 0.75rem;
}

.footer__link a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__link a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer__link a i {
  font-size: 0.75rem;
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer__contact-item i {
  color: var(--primary-color);
  width: 20px;
}

.footer__bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__copyright span {
  color: var(--primary-color);
}

.footer__back-to-top {
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  box-shadow: none;
}

.footer__back-to-top:hover {
  transform: translateY(-5px);
  background: #05060B;
  border: 1px solid #fff;
  box-shadow: none;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  display: none;
  grid-column: 1 / -1;
}

.empty-state.active {
  display: block;
}

.empty-state i {
  font-size: 4rem;
  color: var(--border-color);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery__grid.masonry {
    column-count: 2;
  }
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1050px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: rgba(5, 6, 11, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: var(--transition-smooth);
    border-left: 1px solid var(--border-color);
    box-shadow: none;
  }
  .nav__menu.active {
    right: 0;
  }
  .nav__link {
    font-size: 1.2rem;
    color: var(--text-primary);
  }
  .nav__toggle {
    display: flex;
  }
  .gallery-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .upload-zone {
    max-width: 100%;
  }
  .gallery__grid {
    grid-template-columns: 1fr;
  }
  .gallery__grid.masonry {
    column-count: 1;
  }
  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  .lightbox__nav.prev {
    left: 1rem;
  }
  .lightbox__nav.next {
    right: 1rem;
  }
  .footer__top {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer__brand {
    max-width: 100%;
  }
  .footer__social {
    justify-content: center;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 7rem 1rem 3rem;
  }
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}
.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Page loader */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#currentYear {
  color: inherit;
  font-weight: inherit;
}