@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;600;700&family=Abril+Fatface&family=Comfortaa:wght@300;400;700&family=JetBrains+Mono&display=swap");

:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent-primary: #0f3460;
  --accent-secondary: #e94560;
  --header-gradient-start: #0f3460;
  --header-gradient-end: #16213e;
  --font-primary: "Space Grotesk", sans-serif;
  --font-secondary: "Abril Fatface", cursive;
  --font-accent: "Comfortaa", cursive;
  --font-code: "JetBrains Mono", monospace;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  padding-top: 60px; /* Adjust this value to match your nav height */
}

header {
  background: linear-gradient(
    90deg,
    var(--header-gradient-start),
    var(--header-gradient-end)
  );
  padding: 2rem 0;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-family: var(--font-accent);
  font-weight: 300;
  margin-top: 0.5rem;
}

main > section {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

h1,
h2,
h3 {
  color: var(--accent-secondary);
  font-family: var(--font-secondary);
  font-weight: 400;
  letter-spacing: 0.05em;
}

p,
a {
  color: var(--text-primary);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  font-family: var(--font-accent);
  font-weight: 700;
}

.btn-primary:hover {
  background-color: var(--accent-secondary);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.skill-bar {
  margin-bottom: 1rem;
}

.skill-name {
  display: block;
  margin-bottom: 0.5rem;
}

.progress-bar {
  background-color: #e2e8f0;
  border-radius: 9999px;
  height: 0.75rem;
  overflow: hidden;
}

.progress {
  background-color: #3182ce;
  height: 100%;
  transition: width 0.5s ease-out;
}

.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #e0e0e0;
}

.timeline-item {
  margin-bottom: 40px;
  position: relative;
}

.timeline-content {
  position: relative;
  width: 45%;
  padding: 10px 15px;
  background: var(--bg-primary); /* Changed background color */
  color: var(--text-primary); /* Changed text color */
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Added box shadow */
}

.timeline-item:nth-child(even) .timeline-content {
  left: 55%;
}

/* Map Container Adjustments */
#map {
  position: relative;
  overflow: hidden;
  z-index: 10;
}

/* Make sure popups appear above other elements */
.mapboxgl-popup {
  z-index: 20;
  max-width: 300px;
  /* Ensure popups don't get too wide */
}

/* Style the popup content */
.mapboxgl-popup-content {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 5px; /* Reduced padding */
  color: #ffffff;
  border-radius: 5px;
  max-width: 300px; /* Keep the max-width as needed */
  font-size: 0.8rem; /* Reduced font size */
  line-height: 1.2; /* Adjust line height to reduce spacing between lines */
}

.automotive-table-container {
  float: right;
  margin: 0 0 1.5rem 1.5rem;
  width: 100%;
  max-width: 28rem;
}

#automotive-parts .tags {
  clear: both;
}

@media (max-width: 1023px) {
  .automotive-table-container {
    float: none;
    margin: 1.5rem 0;
    max-width: none;
  }
}

/* Make sure the popup's close button is visible and styled */
.mapboxgl-popup-close-button {
  color: #ffffff;
}

code,
pre {
  font-family: var(--font-code);
}

nav {
  background-color: var(--bg-secondary);
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.nav-link {
  color: var(--text-primary);
  font-family: var(--font-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--accent-secondary);
  transform: translateY(-2px);
}

.nav-link.active {
  color: var(--accent-secondary);
  border-bottom: 2px solid var(--accent-secondary);
}

.logo-banner {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  text-align: center;
  padding: 2rem 0;
  background-image: linear-gradient(
    45deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  background-size: 200% 200%;
  animation: gradientBG 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idea-bulb-icon {
  color: var(--text-primary);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 2px var(--text-primary));
  }
  to {
    filter: drop-shadow(0 0 8px var(--accent-secondary));
  }
}

.idea-bulb-icon path:first-child {
  fill: #fff9c4; /* Light yellow for the bulb */
}

.idea-bulb-icon path:nth-child(2),
.idea-bulb-icon path:nth-child(3) {
  fill: #b0bec5; /* Light grey for the base */
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.logo-banner h1 {
  font-family: var(--font-secondary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.logo-banner p {
  font-family: var(--font-accent);
  opacity: 0.8;
}

.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px; /* This creates space between tags both horizontally and vertically */
}

.tag {
  display: inline-block;
  background-color: #007cbf;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 0.875rem;
  margin-bottom: 8px; /* This adds extra space below each tag */
}

.skill-scale {
  margin-bottom: 20px;
}

.skill-name {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.scale {
  display: flex;
  gap: 5px;
}

.scale-level {
  width: 20px;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 50%;
}

.scale-level.filled {
  background-color: #007cbf;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Fade-in effect for sections */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.bg-gradient-to-r {
  background-image: linear-gradient(
    to right,
    var(--accent-primary),
    var(--accent-secondary)
  );
}

.text-accent-primary {
  color: var(--accent-primary);
}

.thesis-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 0.5rem;
  font-style: italic;
  line-height: 1.4;
}

.hover\:text-accent-secondary:hover {
  color: var(--accent-secondary);
}

html {
  scroll-padding-top: 60px; /* Adjust this value to match your navigation bar height */
}

.view-project-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  background-color: var(--accent-primary);
  color: var(--text-primary);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--accent-primary);
}

.view-project-btn:hover {
  background-color: transparent;
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.view-project-btn:active {
  transform: translateY(0);
}

.skill-category {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skill-list {
  list-style-type: none;
  padding: 0;
}

.skill-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-weight: 500;
}

.skill-level {
  width: 60px;
  height: 8px;
  background-color: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-level::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--accent-secondary);
  border-radius: 4px;
}

.skill-level.novice::after {
  width: 20%;
}

.skill-level.beginner::after {
  width: 40%;
}

.skill-level.intermediate::after {
  width: 60%;
}

.skill-level.advanced::after {
  width: 80%;
}

.skill-level.expert::after {
  width: 100%;
}

.learning-goals {
  list-style-type: none;
  padding-left: 0;
}

.learning-goals li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.learning-goals li::before {
  content: "➤";
  position: absolute;
  left: 0;
  color: var(--accent-secondary);
}

/* Video Container Styles */
.video-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-wrapper-vertical {
  position: relative;
  width: 100%;
  max-width: 315px;
  max-height: 560px;
  aspect-ratio: 9 / 16;
}

.video-wrapper-vertical iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 1023px) {
  .video-wrapper-vertical {
    max-width: 100%;
    max-height: 56.25vw; /* 16:9 aspect ratio */
    aspect-ratio: 16 / 9;
  }
}

/* Media Queries */
@media (max-width: 767px) {
  /* Ensure flex columns stack correctly */
  .flex-col {
    flex-direction: column;
  }

  /* Video responsive styles */
  video {
    max-width: 100%; /* Ensure full width on smaller screens */
    max-height: 300px; /* Adjust for mobile viewing */
  }

  /* Mobile menu visibility */
  #mobile-menu {
    display: block;
  }

  #mobile-menu.hidden {
    display: block;
  }

  /* Video container adjustments */
  .video-container {
    max-width: 100%;
  }

  .video-container-vertical {
    max-width: 100%;
    margin: 0 auto;
    height: 300px; /* Shorter height for mobile devices */
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .video-container-vertical {
    padding-bottom: 133.33%; /* 3:4 aspect ratio for tablets */
    max-width: 75%;
    margin: 0 auto;
    height: 300px;
  }
}

@media (min-width: 1024px) {
  .video-container-vertical {
    padding-bottom: 177.78%; /* Back to 9:16 for larger screens */
    max-width: 50%;
    margin: 0 auto;
  }
}

@media (max-width: 1023px) {
  .video-container-vertical {
    max-width: 100%;
    height: 0;
    padding-bottom: 177.78%; /* 16:9 aspect ratio */
  }
}

#mobile-menu {
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
}

#mobile-menu.show {
  max-height: 300px; /* Adjust this value based on your menu's content */
  opacity: 1;
}

.nav-link {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

