/* Custom properties */
:root {
  --text-color: #222;
  --secondary-text-color: #666;
}

/* Theme toggle */
.navbar-brand {
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.1);
}

.navbar-brand i {
  font-size: 2rem;
  transition: color 0.3s ease;
}

/* Navbar styles */
.navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-bs-theme="light"] {
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-color: #222;
  --nav-hover: #666;
  --nav-icon: var(--nav-color);
  --toggler-color: #222;
}

[data-bs-theme="dark"] {
  --nav-bg: rgba(33, 37, 41, 0.9);
  --nav-color: #fff;
  --nav-hover: #ccc;
  --nav-icon: var(--nav-color);
  --toggler-color: #fff;
}

.navbar {
  background-color: var(--nav-bg);
}

.navbar-brand i,
.nav-link {
  color: var(--nav-color) !important;
}

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

.navbar-brand i {
  color: var(--nav-icon) !important;
}

/* Mobile nav toggler */
.navbar-toggler {
  border-color: var(--nav-color);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23222222' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Fonts */
.ff-oswald {
  font-family: 'Oswald', sans-serif;
}

/* Base styles */
body {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
}

/* Typography */
.ff-oswald, 
.nav-link,
h2.display-4 {
  font-family: 'Oswald', sans-serif;
}

.nav-link {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
}

h2.display-4 {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 2.75rem;
  margin-bottom: 2rem;
}

/* Card styles */
.card {
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Hero section */
.bio {
  max-width: 600px;
  margin-left: auto;
}

/* Hero image */
.hero-img {
  max-height: 72vh;
  width: auto;
  object-fit: contain;
  /* opacity: 0.9; */
}

/* Resume styles */
.experience-list li {
  display: flex;
  margin-bottom: 1.5rem;
  gap: 2rem;
}

.experience-year {
  font-family: 'Oswald', sans-serif;
  font-weight: 200;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--bs-secondary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  min-width: 90px;
}

.experience-details h3 {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}

.experience-details p {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--secondary-text-color);
  letter-spacing: 0.01em;
}

/* Gallery styles - Mosaic Layout */
#gallery {
  padding: 0;
}

#gallery .container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#gallery h2 {
  flex-shrink: 0;
  margin-bottom: 2rem;
}

.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: minmax(150px, 1fr);
  gap: 1rem;
  padding: 0 1rem;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 200px);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 8px;
  background: var(--bs-body-bg);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

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

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

/* Mosaic size variations */
.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.medium {
  grid-column: span 1;
  grid-row: span 1;
}

.gallery-item.small {
  grid-column: span 1;
  grid-row: span 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(120px, 1fr);
    gap: 0.5rem;
    padding: 0 0.5rem;
    max-height: calc(100vh - 180px);
  }
  
  .gallery-item.large,
  .gallery-item.wide {
    grid-column: span 2;
    grid-row: span 2;
  }
  
  .gallery-item.tall {
    grid-row: span 2;
  }
}

@media (max-width: 480px) {
  .gallery-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(180px, 1fr);
    max-height: calc(100vh - 160px);
  }
  
  .gallery-item.large,
  .gallery-item.wide,
  .gallery-item.tall,
  .gallery-item.medium,
  .gallery-item.small {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 767px) {
  #gallery h2.display-4 {
    margin-bottom: 1.5rem;
  }
}

/* Section scroll margin */
section[id] {
  scroll-margin-top: 80px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .hero-img {
    max-height: 45vh;
    opacity: 0.2;
  }

  .experience-list li {
    flex-direction: column;
    gap: 0.5rem;
  }

  .experience-year {
    margin-bottom: 0.25rem;
  }

  #gallery .card {
    max-width: 90%;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .hero-img {
    max-height: 60vh;
  }
}

@supports (-webkit-touch-callout: none) {
  #home {
    padding-top: 90px;
  }
}