/* Perfect styling boiler plate - use this if need to revert back */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap&text=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789&font-display=swap');

/* Import Yellowtail font */
@import url('https://fonts.googleapis.com/css2?family=Yellowtail&display=swap&font-display=swap');

/* Reset default margins and padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(
    to bottom,
    #1a2634,  /* Dark blue-gray from bottom of mountain lake */
    #141e2a   /* Slightly darker shade for depth */
  );
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-display: swap;
}

/* Header styles */
.headerContainer {
  width: 80%;
  max-width: 1200px;
  background-color: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.5rem 2rem;
  min-height: 60px;
  position: fixed !important;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  border-radius: 15px;
  box-shadow: 0 12px 10px rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: none !important;
}

.headerContainer.scrolled {
  width: 100% !important;
  max-width: none !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  border-radius: 0 !important;
  background-color: rgba(45, 45, 45, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  transition: none !important;
}

nav {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  position: relative;
}

nav ul li {
  margin: 0 2.5rem;
}

nav ul li a {
  color: #f5f5f5;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #ffa07a;
  transition: width 0.3s ease;
}

nav ul li a:hover {
  color: #ffa07a;
}

nav ul li a:hover::after {
  width: 100%;
}

/* Contact button styles */
nav ul li:last-child {
  position: absolute;
  right: 2rem;
}

nav ul li:last-child a {
  border: 2px solid #f5f5f5;
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
}

nav ul li:last-child a::after {
  display: none;
}

nav ul li:last-child a:hover {
  background-color: #ffa07a;
  color: #2b2523;
  border-color: #ffa07a;
}

/* Hamburger menu styles */
.hamburger {
  display: none;
  cursor: pointer;
  padding: 1rem;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #f5f5f5;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Reset main padding */
.main {
  padding-top: 0;
}

/* MyInfo section */
.myInfo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 7rem 2rem 2rem 2rem;
  position: relative;
  color: #f5f5f5;
  text-align: center;
}

.myInfo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.1),
      rgba(26, 38, 52, 0.98)    /* Keep dark at bottom for text readability */
    ),
    url('../images/justinmtns.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.9;
  z-index: -1;
  filter: brightness(1.4);  /* Brighten the image */
}

/* .myInfo h1 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  color: #f5f5f5;
  -webkit-text-stroke: 2px #f5f5f5;
  background-image: linear-gradient(180deg, #f5f5f5 0%, #ffa07a 100%);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  background-position: 0 0;
  animation: shine 3s ease-in-out infinite;
  text-shadow: 
    3px 3px 0px rgba(255, 160, 122, 0.5),
    6px 6px 0px rgba(0, 0, 0, 0.2);
  font-display: swap;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
} */

.myInfo h2, .myInfo p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 2rem;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  animation: slideUp 0.3s ease-out 0.2s both;
}

.gradient-transition {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(26, 38, 52, 0.5) 50%,
    #1a2634 95%
  );
  z-index: 1;
}

/* About section */
.about-section {
  position: relative;
  background-color: #1a2634;
  padding: 4rem 0;
  width: 100%;
  padding-top: 60px;
  z-index: 2;  /* Ensure about section stays above gradient */
}

.about-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(
    to bottom,
    transparent,
    #1a2634
  );
  z-index: 1;
}

.about-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: #f5f5f5;
}

.about-section h2.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dark overlay */
.about-section h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  z-index: 1;
}

/* Text with outline */
.about-section h2 span {
  position: relative;
  z-index: 2;
  text-shadow: 
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000,
    2px 0 0 #000,
    -2px 0 0 #000;
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skills Section */
.skills-section {
  background-color: #1a2634;
  padding: 4rem 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.skills-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.skills-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: #f5f5f5;
}


.skills-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  /* DELETE THIS grid-template-columns: repeat(2, 1fr); IF WANT TO GO BACK TO 3 COLUMNS */
  /* Replace with grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
  grid-template-columns: repeat(2, 1fr);  /* Changed to 2 columns */
  gap: 2rem;
}

.skill-category {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.skill-category h3 {
  color: #ffa07a;
  margin-bottom: 1.5rem;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #f5f5f5;
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-item i {
  font-size: 2rem;
  color: #ffa07a;
}

/* CTA Section */
.cta-section {
  background-color: #1a2634;
  padding: 6rem 2rem;
  text-align: center;
}

.cta-section h2 {
  color: #f5f5f5;
  margin-bottom: 1rem;
}

.cta-section p {
  color: #f5f5f5;
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.cta-button {
  padding: 0.8rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.cta-button.primary {
  background-color: #ffa07a;
  color: #2b2523;
}

.cta-button.secondary {
  border: 2px solid #f5f5f5;
  color: #f5f5f5;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cta-button.primary:hover {
  background-color: #ff8c5a;
}

.cta-button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Footer styles */
footer {
  width: 100%;
  background-color: #141e2a;  /* Slightly darker shade */
  overflow: hidden;
}

.footer-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 2rem 4rem;
  color: #f5f5f5;
}

.footer-section {
  margin-bottom: 1.5rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: #ffa07a;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 500;
  font-display: swap;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ffa07a;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #f5f5f5;
}

.footer-bottom {
  width: 100%;
  text-align: center;
  padding: 1rem;
  background-color: #0f1720;  /* Even darker for footer bottom */
  color: #f5f5f5;
}

/* Animations */
@keyframes shine {
  0%, 100% {
    background-position: 0 0;
  }
  50% {
    background-position: 100% 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile styles */
@media screen and (max-width: 768px) {
  .hamburger {
    display: block;
  }

  nav {
    width: 95%;
    padding: 0 1rem;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem 0;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    margin: 0.5rem 0;
    text-align: center;
  }

  nav ul li:last-child {
    position: static;
  }

  .headerContainer {
    width: 95%;
    padding: 1.5rem 1rem;
  }

  .headerContainer.scrolled {
    width: 100%;
    padding: 1.5rem 1rem;
  }

  /* .myInfo h1 {
    font-size: 3.2rem;
    -webkit-text-stroke: 1px #f5f5f5;
  } */

  .myInfo h2 {
    font-size: 0.8rem;
    padding: 0.8rem 1rem;
  }

  .myInfo p {
    font-size: 1.1rem;
    padding: 1.2rem 1.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
    padding: 2rem;
  }

  .skills-section {
    padding: 3rem 1rem;
  }

  .cta-section {
    padding: 4rem 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-button {
    width: 100%;
    max-width: 300px;
  }

/* DELETE THIS .skills-container IF WANT TO GO BACK TO 3 COLUMNS */
  .skills-container {
    grid-template-columns: 1fr;  /* Single column on mobile */
    gap: 1.5rem;  /* Slightly reduced gap for mobile */
  }

  .info-card {
    width: 100%;        /* Full width on mobile */
    max-width: 350px;   /* But not too wide */
    margin: 0 auto;     /* Center cards */
    margin-bottom: 30px;  /* Add space between cards on mobile */
  }
  
  .info-card:last-child {
    margin-bottom: 0;  /* Remove margin from last card */
  }
  
  .about-content {
    gap: 15px;          /* Slightly reduced gap on mobile */
  }
}

@media screen and (min-width: 769px) and (max-width: 1035px) {
    nav ul li {
        margin: 0 0.8rem;  /* Reduced spacing */
    }

    nav ul li a {
        font-size: 0.95rem;  /* Slightly smaller font */
    }

    nav ul li:last-child {
        position: absolute;
        right: 1rem;  /* Moved contact button closer */
    }

    nav ul li:last-child a {
        padding: 0.4rem 1.2rem;  /* Smaller padding on contact button */
    }
}

@media screen and (min-width: 1036px) {
    nav ul li {
        margin: 0 1.5rem;  /* Original spacing */
    }

    nav ul li a {
        font-size: 1.1rem;  /* Original font size */
    }

    nav ul li:last-child {
        position: absolute;
        right: 2rem;
    }

    nav ul li:last-child a {
        padding: 0.5rem 1.5rem;
    }
}

.logo-link {
    position: absolute;
    left: 2rem;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 5px 0;
    z-index: 1000;
}

.header-logo {
    height: 65px;
    width: auto;
    cursor: pointer;
    display: block;
    pointer-events: none;
}

.nav-link {
    text-decoration: none;
    position: relative;
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #fff;
    transition: width 0.3s ease;
    opacity: 0;
}

.nav-link:hover::after {
    width: 100%;
    opacity: 1;
}

/* Simplified Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(45, 45, 45, 0.95);
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1;
    border-radius: 8px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown::after {
    content: '';
    position: absolute;
    height: 15px;
    width: 100%;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #f5f5f5;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    text-align: center;
    font-size: 0.9em;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dropdown-content a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

h2 a{
  color: #fff;
  text-decoration: none;
}

h2 a:hover {
  color: #ffa07a;
}

.info-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

.card-header {
  color: #ffa07a;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
}

.card-body {
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5f5f5;
}

.about-section h2,
.about-content,
.skills-section,
.about-section {
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.about-section h2.animate,
.about-content.animate,
.skills-section.animate,
.about-section.animate {
  opacity: 0;
  transform: translateY(20px);
}

/* Preload the font specifically for this text */
@font-face {
    font-family: 'Inter';
    font-weight: 700;  /* Bold weight for heading */
    font-display: swap;
    src: local('Inter Bold'),
         url('https://fonts.gstatic.com/s/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2') format('woff2');
    unicode-range: U+4A-5A, U+61-7A;  /* Only load characters needed for "Justin Glover" */
}

/* Modify the animation to be more subtle */
.about-section.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.about-section.visible {
  opacity: 1;
  transform: translateY(0);
}