/* Custom Styles */
:root {
  --base-color: #EFE9E1; /* Beige */
  --accent-color: #6E8658; /* Muted Green */
  --dark-brown: #57473A; /* Dark Brown */
  --dark-grey: #2a2b2f;
}

/* Universal Box-Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Rubik', sans-serif;
  background-color: var(--base-color) !important;
  color: var(--dark-brown);
  padding-top: 56px;
}

@font-face {
  font-family: 'Kiwi Soda';
  src: url('/static/fonts/KiwiSoda.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

h1, h2, .headline {
  font-family: 'Kiwi Soda', sans-serif;
  color: var(--accent-color);
}

h3, h4 {
  font-family: 'Kiwi Soda', sans-serif;
  color: var(--dark-brown);
}

/* Navbar Styles */
.navbar {
  background-color: var(--accent-color) !important;
  padding: 0.5rem 1rem;
}

.navbar .container {
  width: 100%;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-family: 'Kiwi Soda', sans-serif;
  font-size: 30px;
  color: var(--base-color) !important;
  white-space: nowrap;
}

.navbar-nav {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 24px;
  }
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 20px;
  }
  .nav-link {
    font-size: 14px;
    padding: 0.25rem 0.5rem;
  }
}

/* Section Scroll Margins */
section {
  scroll-margin-top: 100px;
}

@media (max-width: 768px) {
  section {
    scroll-margin-top: 70px;
  }
}

#home {
  scroll-margin-top: 100px;
}

@media (max-width: 768px) {
  #home {
    scroll-margin-top: 70px;
  }
}

/* Hero Section */
.hero-section {
  background-color: var(--base-color) !important;
  color: var(--dark-brown);
  padding: 60px 0;
  margin-bottom: 0;
}

.hero-text {
  text-align: center;
}

.hero-buttons {
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero-text {
    text-align: left;
  }
}

.btn-outline {
  background: none;
  border: 2px solid var(--accent-color);
  color: var(--dark-brown);
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: var(--accent-color);
  color: var(--base-color);
}

/* Cards, Photos, and Hover Effects */

/* Fixed width for profile and photo-container images */
.profile img,
.photo-container img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  width: 300px;
  height: auto;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 0 auto;
}

.profile img:hover,
.photo-container img:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Let Bootstrap handle card sizing—remove fixed width */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Optional: Enforce card width on larger screens; use full width on mobile */
@media (min-width: 768px) {
  .card {
    width: 300px;
  }
}
@media (max-width: 767px) {
  .card {
    width: 100%;
  }
}

.timeline {
  position: relative;
  padding-left: 20px;
}

.photo-container {
  position: relative;
  width: 90%;
  max-width: 200px;
  margin: 0 auto;
  text-align: center;
  overflow: visible;  
}

.photo-container img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Reposition fun facts around the circle */
/* Fun Facts: Adjust positions to sit just outside the circle */
.fun-fact {
  position: absolute;
  font-size: 16px;
  background: var(--base-color);
  padding: 5px 10px;
  border-radius: 5px;
  border: 2px solid var(--accent-color);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Desktop default: scatter fun facts around the circle */
.fun-fact:nth-child(1) {
  top: 0;
  left: 10px;
}

.fun-fact:nth-child(2) {
  top: 50%;
  right: -30px;     /* Stays on the right side */
}

.fun-fact:nth-child(3) {
  bottom: 0;
  left: 10px;
}


/* Hover Effect for Fun Facts */
.fun-fact:hover {
  transform: scale(1.1);
  border-color: var(--accent-color);
}

.fact-text {
  background-color: var(--accent-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  opacity: 1;
  transition: none;
}

/* Popup Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background-color: var(--base-color);
  color: var(--dark-brown);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  padding: 20px;
  width: 400px;
  max-width: 80%;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  font-family: 'Rubik', sans-serif;
}

.popup-content h4 {
  color: var(--accent-color);
}

.popup-overlay.show {
  display: flex;
}

.popup-overlay.show .popup-content {
  transform: scale(1);
}

/* Close button in popup */
.popup-close {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 1.5rem;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  transition: color 0.2s ease;
}

/* Work Experience & Contact Backgrounds */
#experience,
#contact {
  background-color: var(--base-color) !important;
}

/* Marquee Container */
.experience-marquee {
  overflow: hidden;
  position: relative;
}

/* Flex container for continuous scrolling */
.experience-container {
  display: flex;
  animation: scroll 30s linear infinite;
}

.experience-card {
  flex: 0 0 20%;
  max-width: 20%;
  padding: 20px;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transition: transform 0.3s ease;
}

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

.experience-logo {
  max-width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0;
}

/* Keyframes for marquee scroll */
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.card-deck {
  position: relative;
  width: 300px;
  margin: 0 auto;
  height: 400px;
}

/* Base styling for each photo in the deck */
.card-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  height: 350px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, z-index 0.3s ease;
  cursor: pointer;
}

.card-img-top {
  height: 200px;
  object-fit: contain;
  padding: 10px;
  background-color: white;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.front-photo {
  z-index: 2;
}

.behind-photo {
  z-index: 1;
  transform: translate(20px, 20px);
}

/* Fan out on hover */
.card-deck:hover .front-photo {
  transform: rotate(-5deg) translate(-10px, 0);
}

.card-deck:hover .behind-photo {
  transform: rotate(5deg) translate(30px, 0);
  z-index: 2;
}

.icon-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.icon-row a {
  text-decoration: none;
  color: inherit;
}

.social-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.social-icon:hover {
  transform: scale(1.1);
}

#contact a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.social-icon {
  filter: invert(48%) sepia(13%) saturate(974%) hue-rotate(43deg) brightness(93%) contrast(87%);
  transition: filter 0.3s ease;
}

@media (max-width: 768px) {
  .experience-card {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    padding: 10px;
  }
}

.experience-logo {
  max-width: 60px;
  height: 60px;
}

.experience-card p {
  font-size: 14px;
}

/* Adjust fun-fact offsets on small screens */
@media (max-width: 576px) {
  .fun-fact:nth-child(1),
  .fun-fact:nth-child(3) {
    left: -60px;
  }
  .fun-fact:nth-child(2) {
    right: -60px;
  }
}


#about {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0; /* Reduce padding to minimize extra bottom space */
}

#projects .card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto; /* Centers card in its column */
  transition: all 0.3s ease;
}

#projects .row {
  --bs-gutter-x: 2rem; /* Horizontal gap between columns */
}