body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  display: flex;
  height: 100vh;
  color: #1f1f1f;
  background-color: white;
  box-sizing: border-box;
  overflow-x: hidden;
  align-items: center;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d0d0d0;
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}

.sidebar {
  width: 560px;
  background-color: white;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.sidebar > div:first-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 100px;
}

.name {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.headline {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #444;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
  align-items: flex-start;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s, margin-left 0.2s, padding-left 0.2s;
  margin-left: 0;
  padding-left: 0;
}

.nav a:hover,
.nav a.active {
  color: #800020;
}

/* .nav a.active {
  color: #ff6a3d;
  margin-left: 1.5rem;
  padding-left: 0.5rem;
  font-weight: 700;
} */

.main {
  margin-left: 560px;
  overflow-y: auto;
  width: calc(100% - 560px);
  height: 100vh;
  scroll-behavior: smooth;
  padding-right: 4rem;
}

section {
  padding: 4rem 4rem;
  max-width: 1000px;
  margin: 0 auto;
}
#contact {
  padding-top: 0rem;
}

.about-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  min-width: 0;
  flex: 1 1 0;
}

.about-text p {
  margin: 0 0 0.5rem 0;
  flex: unset;
  display: block;
  align-items: unset;
}

/* .about-image {
  display: flex;
  align-items: flex-start;
  max-width: 460px;
  width: 100%;
  flex: 0 0 460px;
} */

.about-image img {
  width: 100%;
  max-width: 460px;
  max-height: 450px;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.project-grid.column-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.project-card.row-card {
  display: flex;
  gap: 1.5rem;
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.project-card.row-card:hover {
  transform: translateY(-4px);
}

.project-card.row-card img {
  width: 240px;
  border-radius: 8px;
  object-fit: cover;
}

.project-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.project-info p {
  margin: 0;
  font-size: 0.95rem;
  color: #444;
}

.experience-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.experience-item {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.experience-date {
  min-width: 180px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #7b879d;
  letter-spacing: 0.02em;
  text-align: right;
  line-height: 1.2;
  margin-top: 0.2em;
}

.experience-details {
  flex: 1;
  font-size: 1rem;
}

.experience-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.experience-title-row h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #232946;
  margin: 0;
  display: inline;
}

.experience-company {
  font-size: 1rem;
  font-weight: 600;
  color: #7b879d;
  margin-left: 0.5rem;
}

.experience-bullets {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
  color: #444e5e;
  font-size: 1rem;
  line-height: 1.7;
}

.experience-bullets li {
  margin-bottom: 0.5rem;
  list-style: disc inside;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.gallery-item {
  overflow: hidden;
}

@media (max-width: 700px) {
  .experience-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  .experience-date {
    text-align: left;
    margin-bottom: 0.5rem;
  }
  .nav a {
    font-size: 1.2rem;
    gap: 1rem;
  }
}

.cv-text-link {
  background: white;
  color: #444;
  border: 2px solid #444;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
}

.cv-text-link:hover {
  background: #444;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(68, 68, 68, 0.15);
}

.sidebar-social {
  margin-top: auto;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 2rem;
  margin-left: 100px;
  align-self: flex-start;
}

.sidebar-social a svg {
  display: block;
  transition: transform 0.2s, filter 0.2s;
}

.sidebar-social a:hover svg {
  transform: scale(1.15);
  filter: brightness(0.7);
}

#about {
  padding-top: 10rem;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 2rem;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .modal-content {
    width: 90%;
    max-width: none;
    padding: 1rem;
  }

  /* Hide sidebar entirely */
  .sidebar {
    display: none;
  }

  /* Expand main content to full width */
  .main {
    margin-left: 0;
    width: 100%;
    padding: 0 1.5rem;
  }

  /* Collapse about layout to vertical */
  .about-container {
    flex-direction: column;
  }

  /* Hide image on mobile */
  .about-image {
    display: none;
  }

  /* Adjust section spacing for smaller screens */
  section {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    padding: 0.5rem;
  }
    /* #modal-container, #modal-container-sidequest {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    #modal-container img, #modal-container-sidequest img {
      order: -1;
      margin-bottom: 1rem;
    }
    #modal-container p, #modal-container-sidequest p {
      order: 0;
    } */
  .project-card.row-card {
    flex-direction: column;
    align-items: center;
  }
  .project-card.row-card img {
    margin-bottom: 1rem;
  }
}

/* Hide mobile header on desktop */
.mobile-header {
  display: none;
}

/* Mobile layout adjustments */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow-x: hidden;
    align-items: center;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    display: block;
    width: 100%;
    max-width: 1000px;
    padding: 2rem 1.5rem 0 1.5rem;
    text-align: center;
    position: static;
  }

  .mobile-name {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0 0 0.5rem 0;
  }

  .mobile-headline {
    font-size: 1rem;
    margin: 0 0 1rem 0;
    color: #444;
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: 1000px;
    padding: 0 1.5rem;
    box-sizing: border-box;
  }

  .about-container {
    flex-direction: column;
    width: 100%;
  }

  .about-image {
    display: none;
  }

  section {
    padding: 2rem 0;
    width: 100%;
  }

  #about {
    padding-top: 2rem;
  }
}

@media (min-width: 768px) and (max-width: 1300px) {
  .sidebar > div:first-child {
    margin-left: 5vw; /* Make left margin responsive */
  }

  .sidebar {
    width: 33vw;
    padding: 1.5rem 0.25rem;
  }

  .main {
    margin-left: 33vw;
    width: 67vw;
    padding: 0 1.5rem;
  }

  section {
    padding: 3rem 0;
  }

  .about-image img {
    max-width: 25vw;
  }
  
}

/* Show More Button Styles */
.show-more-btn {
  background: white;
  color: #444;
  border: 2px solid #444;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
  margin-top: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
}

.show-more-btn:hover {
  background: #444;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 102, 102, 0.15);
}

.show-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 102, 102, 0.1);
}

/* Project card transitions */
.project-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.project-card.hidden {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

.project-card.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

