/* ============================================
   jamesstopford.com — Custom styles
   Companion to Tailwind CDN in index.html
   ============================================ */

/* Base tweaks */
html {
  scroll-behavior: smooth;
}

body {
  /* Better font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fixed nav scroll state */
#nav-header.scrolled {
  background-color: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #233554;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Navigation active link */
.nav-link.active,
.mobile-nav-link.active {
  color: #64ffda;
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, #64ffda, transparent);
}

/* Tech pills (used in About + Experience + Projects) */
.tech-pill {
  @apply inline-flex items-center justify-center px-3.5 py-1.5 rounded-md bg-navy-lighter text-xs font-mono tracking-wider text-accent/90 border border-navy-lighter/60;
  transition: all 0.1s ease;
}

.tech-pill:hover {
  border-color: #64ffda33;
  background-color: #112240;
  color: #64ffda;
  transform: translateY(-1px);
}

/* Project cards */
.project-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
              box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 
              0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Experience list bullets */
#experience li {
  transition: color 0.1s ease;
}

#experience li:hover {
  color: #ccd6f6;
}

/* Resume button hover treatment */
a[href*="linkedin"] {
  transition: all 0.1s ease;
}

/* Copy email button success state */
#copy-email-btn.copied {
  border-color: #64ffda;
  color: #64ffda;
}

/* Subtle section entrance animation (triggered by JS) */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.2s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus styles (stronger than Tailwind defaults for dark theme) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #64ffda;
  outline-offset: 2px;
}

/* Better table / list rhythm if we ever add more content */
ul {
  list-style: none;
}

/* Print styles (nice if someone prints the resume CTA page) */
@media print {
  .fixed, header, #mobile-menu-btn {
    display: none !important;
  }
  body {
    background: white;
    color: #111;
  }
}

/* Small polish for very small screens */
@media (max-width: 380px) {
  .tech-pill {
    font-size: 10px;
    padding-left: 10px;
    padding-right: 10px;
  }
}
