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

:root {
  --bg-color: #ffffff;
  --text-color: #222222;
  --border-color: #e0e0e0;
  --overlay-bg: rgba(0, 0, 0, 0.95);
  --hover-bg: rgba(0, 0, 0, 0.02);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --border-color: #333333;
    --overlay-bg: rgba(0, 0, 0, 0.98);
    --hover-bg: rgba(255, 255, 255, 0.05);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

h2,
h3 {
  color: var(--text-color);
}

/* Option 2: Or if you want gradient effect that works in both modes */
@media (prefers-color-scheme: light) {
  h2,
  h3 {
    background: linear-gradient(135deg, #000000 0%, #666666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

@media (prefers-color-scheme: dark) {
  h2,
  h3 {
    background: linear-gradient(135deg, #ffffff 0%, #999999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.clickable-image {
  pointer-events: auto;
  cursor: pointer;
}

/* Login Screen */
#loginScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-container {
  text-align: center;
  padding: 40px;
  max-width: 400px;
  width: 90%;
}

.login-container h1 {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.login-container p {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 30px;
}

.password-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  font-size: 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  transition: border-color 0.3s;
}

.password-input:focus {
  outline: none;
  border-color: var(--text-color);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--text-color);
  color: var(--bg-color);
  border: none;
  border-radius: 4px;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.login-btn:hover {
  opacity: 0.8;
}

.error-message {
  color: #ff3333;
  font-size: 12px;
  margin-top: 10px;
  display: none;
}

/* Main Portfolio */
#portfolio {
  display: none;
  min-height: 100vh;
}

/* Header */
header {
  padding: 30px 40px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-color);
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 3px;
  cursor: pointer;
  margin: 6px;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.9;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  opacity: 0.7;
}

.breadcrumb span {
  cursor: pointer;
  transition: opacity 0.3s;
}

.breadcrumb span:hover {
  opacity: 1;
}

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

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0.5;
  transition: opacity 0.3s;
  cursor: pointer;
  position: relative;
}

.nav-links a:hover {
  opacity: 0.8;
}

.nav-links a.active {
  opacity: 1;
  color: var(--text-color);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--text-color);
  opacity: 0.5;
}

.container {
  max-width: 1200px;
  /* Reduced from 1400px */
  margin: 0 auto;
  padding: 40px;
}

/* Folders View - Fixed width cards, 3 per row */
.folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1140px;
  /* (350px * 3) + (30px * 2) gaps */
  margin: 0 auto;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

/* Ensure exactly 3 columns on desktop */
@media (min-width: 1140px) {
  .folders-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2 columns on tablet */
@media (max-width: 1139px) and (min-width: 768px) {
  .folders-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 760px;
  }
}

.folder-card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.folder-card:hover {
  transform: translateY(-5px);
}

.folder-thumbnail {
  position: relative;
  aspect-ratio: 4/6;
  /* You can change to 16/9 or 1/1 for different looks */
  background: var(--border-color);
  overflow: hidden;
  border-radius: 12px;
}

.folder-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.folder-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 20px;
  color: white;
}

.folder-count {
  font-size: 12px;
  opacity: 0.8;
}

.folder-info {
  margin: 0;
  padding: 18px 10px;
  background: transparent;
}

.folder-title {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.9;
}

.folder-description {
  font-size: 12px;
  opacity: 0.5;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Gallery View */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1140px;
  /* Same as folders */
  margin: 0 auto;
  animation: fadeIn 0.5s ease;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--border-color);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Back Button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  margin-bottom: 30px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.back-button:hover {
  background: var(--hover-bg);
  transform: translateX(-3px);
}

/* About Section */
.about-section {
  display: none;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.about-section h2 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 30px;
}

.about-section p {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--overlay-bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border: 10px solid white;
  outline: 1px solid #e0e0e0;
  /* Subtle outline */
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  /* border: 20px solid white;
            /* Add white border */
  /* box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5); */
  /* Optional: add shadow for depth */
}

/* Adjust for mobile - smaller border */
@media (max-width: 768px) {
  .lightbox-image {
    border: 10px solid white;
    /* Smaller border on mobile */
    max-width: 95%;
  }
}

@media (prefers-color-scheme: dark) {
  .lightbox-image {
    border-color: #f5f5f5;
    /* Slightly off-white in dark mode */
  }
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* For tablets - 2 per row */
@media (max-width: 968px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 700px;
  }
}

/* For mobile - 1 per row */
@media (max-width: 568px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 400px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .folders-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  header {
    padding: 20px;
  }

  nav {
    flex-direction: column;
    gap: 20px;
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* Lightbox with Metadata */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-image-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-metadata {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 20px 30px;
  margin-top: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  animation: slideUp 0.3s ease;
}

.metadata-title {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.metadata-description {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 12px;
  line-height: 1.5;
}

.metadata-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  opacity: 0.7;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.metadata-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metadata-icon {
  opacity: 0.5;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile adjustments for metadata */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 100%;
    padding: 20px;
  }

  .lightbox-metadata {
    padding: 15px 20px;
    margin-top: 15px;
    border-radius: 8px 8px 0 0;
  }

  .metadata-details {
    gap: 15px;
  }

  .metadata-title {
    font-size: 18px;
  }
}

/* Lightbox Navigation */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 20px 15px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  z-index: 1001;
  user-select: none;
}

.lightbox-nav:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-counter {
  position: absolute;
  top: 30px;
  left: 30px;
  color: white;
  font-size: 14px;
  opacity: 0.7;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 15px;
  border-radius: 4px;
}

/* Swipe hint for mobile */
.swipe-hint {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 12px;
  opacity: 0.5;
  animation: fadeInOut 3s ease;
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  .lightbox-nav {
    padding: 15px 10px;
    font-size: 24px;
  }

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }
}

/* Loading States & Skeleton Loader */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    rgba(128, 128, 128, 0.2) 50%,
    var(--border-color) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.image-loading {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.image-loaded {
  opacity: 1;
}

/* Gallery Hover Effects */
.gallery-item {
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s ease;
  /* transition: transform 0.3s ease; */
}

.gallery-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.gallery-item::after {
  content: "VIEW";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  color: white;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.gallery-item:hover {
  opacity: 0.9;
  /* transform: scale(1.02); */
}

.gallery-item:hover::before {
  background: rgba(0, 0, 0, 0.3);
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Folder Card Hover Enhancement */
/* .folder-card {
            transition: all 0.3s ease;
        } */

.folder-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.folder-thumbnail {
  position: relative;
  overflow: hidden;
}

.folder-thumbnail::after {
  content: "OPEN GALLERY";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: rgba(0, 0, 0, 0.8);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  pointer-events: none;
}

.folder-card:hover .folder-thumbnail::after {
  opacity: 1;
}

/* Search Box Styles */
.search-container {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-box {
  padding: 12px 20px;
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* border: 1px solid var(--border-color); */
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  /* background: var(--bg-color); */
  color: var(--text-color);
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  margin-bottom: 30px;
}

.search-box:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  /* border-color: var(--text-color); */
  box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.1);
}

.search-box::placeholder {
  color: var(--text-color);
  opacity: 0.4;
}

.search-clear {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  opacity: 0.7;
  margin-bottom: 30px;
}

.search-clear:hover {
  opacity: 1;
  background: var(--hover-bg);
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  opacity: 0.5;
  font-size: 16px;
}

/* Footer Styles */
footer {
  border-top: 1px solid var(--border-color);
  padding: 40px;
  margin-top: 80px;
  text-align: center;
  background: var(--bg-color);
}

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

.footer-copyright {
  font-size: 13px;
  opacity: 0.6;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 13px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  letter-spacing: 0.5px;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-divider {
  margin: 0 10px;
  opacity: 0.3;
}

/* Smooth page transitions */
.fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading overlay for folders */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--text-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .search-container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  footer {
    padding: 30px 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}

/* Timeline Styles */
.timeline-container {
  display: flex;
  gap: 40px;
  position: relative;
  margin-top: 30px;
}

.year-timeline {
  position: sticky;
  top: 100px;
  height: fit-content;
  width: 100px;
  padding: 20px 0;
}

.year-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  transform: translateX(-50%);
}

.year-marker {
  position: relative;
  padding: 15px 0;
  text-align: right;
  cursor: pointer;
  transition: all 0.3s ease;
}

.year-label {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.4;
  transition: all 0.3s ease;
  display: inline-block;
  padding-right: 20px;
}

.year-dot {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.year-marker.active .year-label {
  opacity: 1;
  font-weight: 600;
  transform: scale(1.1);
}

.year-marker.active .year-dot {
  background: var(--text-color);
  transform: translateY(-50%) scale(1.3);
}

.gallery-content {
  flex: 1;
}

.year-section {
  margin-bottom: 60px;
}

.year-header {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  opacity: 0.8;
}

/* Mobile - Hide timeline on small screens */
@media (max-width: 768px) {
  .year-timeline {
    display: none;
  }

  .timeline-container {
    gap: 0;
  }
}
