/* 16-bit Retro City Pop Style CSS */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --primary-color: #FF8FB1;    /* Soft pink */
  --secondary-color: #87CEEB;  /* Sky blue */
  --accent-color: #FFD700;     /* Gold */
  --background-color: rgba(255, 255, 255, 0.95); /* Nearly white with transparency */
  --text-color: #4A4A4A;       /* Soft dark gray */
  --text-secondary: #6B7280;   /* Medium gray */
  --border-color: #87CEEB;     /* Sky blue */
  --section-bg: rgba(255, 255, 255, 0.85);
  --city-pop-gradient: linear-gradient(45deg, #FF8FB1, #87CEEB);
  
  /* Responsive spacing units */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Responsive font sizes */
  --font-size-sm: 0.8rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
}

body {
  background-color: #E6F3FF;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
    url('../img/lake-hula-ghibli.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-color);
  font-family: 'Press Start 2P', cursive;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

/* Retro container */
.container-fluid {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-md);
  width: 100%;
}

/* Retro navigation */
.tm-sidebar {
  background-color: rgba(240, 248, 255, 0.9);
  border-right: 4px solid var(--border-color);
  padding: 20px;
  box-shadow: 0 0 15px var(--primary-color);
}

.tm-brand {
  color: var(--primary-color);
  font-size: 24px;
  text-shadow: 2px 2px var(--secondary-color), 0 0 10px var(--primary-color);
  letter-spacing: 2px;
}

.tm-main-nav .nav-link {
  color: var(--text-color);
  border: 2px solid var(--border-color);
  margin: 10px 0;
  padding: 10px;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px var(--text-color);
}

.tm-main-nav .nav-link:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
  box-shadow: 0 0 15px var(--primary-color);
  transform: translateX(5px);
}

/* Retro sections */
.tm-section {
  border: 3px solid var(--border-color);
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-lg);
  position: relative;
  background-color: var(--section-bg);
  box-shadow: 0 0 20px rgba(135, 206, 235, 0.3);
  border-radius: 8px;
}

.tm-section::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: var(--city-pop-gradient);
  z-index: -1;
  opacity: 0.3;
  border-radius: 8px;
}

.tm-section-title {
  color: var(--text-color);
  text-shadow: 
    2px 2px 0 var(--secondary-color),
    4px 4px 0 rgba(0, 0, 0, 0.2);
  letter-spacing: 4px;
  font-size: var(--font-size-xl);
  margin: 0 0 var(--spacing-lg) 0;
  padding: 10px 0;
  position: relative;
}

/* Retro gallery */
.tm-gallery-item {
  border: 2px solid var(--border-color);
  margin: 10px;
  padding: 10px;
  transition: all 0.3s ease;
  background-color: rgba(240, 248, 255, 0.7);
}

.tm-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(76, 212, 255, 0.3);
}

.tm-gallery-item figcaption {
  color: var(--text-color);
  text-shadow: 0 0 5px var(--text-color);
}

/* Retro buttons */
button.nav-link {
  background: var(--background-color);
  border: 2px solid var(--border-color);
  color: var(--text-color);
  font-family: 'Press Start 2P', cursive;
  padding: 15px 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-width: 200px;
  font-size: 0.9em;
  letter-spacing: 2px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(135, 206, 235, 0.1);
  white-space: nowrap;
}

button.nav-link:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(135, 206, 235, 0.2);
}

button.nav-link:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(135, 206, 235, 0.1);
}

/* Remove general button styles that might interfere */
button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
}

/* Retro social links */
.tm-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  justify-content: flex-start;
}

.tm-social-links .nav-link {
  background: var(--background-color);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9em;
  letter-spacing: 2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-width: auto;
  width: 100%;
  box-shadow: 0 4px 6px rgba(135, 206, 235, 0.1);
  white-space: nowrap;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--background-color);
}

.tm-social-links .nav-link i {
  margin-right: 15px;
  font-size: 1.1em;
  width: 24px;
  text-align: center;
}

.tm-social-links .nav-link:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(135, 206, 235, 0.2);
}

.tm-social-links .nav-link:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(135, 206, 235, 0.1);
}

/* Ensure copy-email button text looks identical */
.copy-email {
  background: none;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Retro animations */
@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.blink {
  animation: blink 1s infinite;
}

@keyframes neon-pulse {
  0% { text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color); }
  50% { text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
  100% { text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color); }
}

.neon-pulse {
  animation: neon-pulse 2s infinite;
}

/* City pop elements */
.city-pop-header {
  position: relative;
  overflow: hidden;
  height: 200px;
  margin-bottom: 30px;
}

.city-pop-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, rgba(240,248,255,0.8) 0%, rgba(240,248,255,0) 100%);
  z-index: 1;
}

.city-pop-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) contrast(1.2) saturate(1.5);
}

.city-pop-header h2 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  color: var(--accent-color);
  text-shadow: 2px 2px var(--primary-color), 0 0 10px var(--accent-color);
}

/* Responsive design */
@media (max-width: 768px) {
  .tm-brand {
    font-size: 18px;
  }
  
  .tm-section {
    padding: var(--spacing-md);
  }
}

/* Carousel container wrapper */
.carousel-wrapper {
  position: relative;
  width: 100%;
  padding-right: 40px; /* Space for arrow */
}

/* Carousel styles */
.carousel-container {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--spacing-md) 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  display: flex;
  gap: 30px;
  scroll-behavior: smooth;
  width: 100%;
  min-height: 300px;
}

/* Scroll indicator arrow */
.carousel-wrapper::after {
  content: '→';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Press Start 2P', cursive;
  color: var(--accent-color);
  font-size: 1.5em;
  text-shadow: 0 0 10px var(--accent-color);
  animation: arrowPulse 2s infinite;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  background: linear-gradient(to right, transparent, var(--section-bg) 50%);
  padding: 20px 10px 20px 40px;
  z-index: 3;
}

.carousel-wrapper.has-more::after {
  opacity: 1;
  visibility: visible;
}

@keyframes arrowPulse {
  0% { opacity: 0.5; transform: translate(0, -50%); }
  50% { opacity: 1; transform: translate(5px, -50%); }
  100% { opacity: 0.5; transform: translate(0, -50%); }
}

/* Build section specific styles */
.build-carousel .carousel-slide {
  height: 250px;  /* Increased height to accommodate 2 lines */
}

.build-carousel .carousel-caption {
  white-space: nowrap;  /* Changed to nowrap to match Where section */
  font-size: 0.75em;  /* Smaller font size specifically for Build section */
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 15px;  /* Slightly reduced padding */
}

/* Where section specific styles */
.where-carousel .carousel-caption {
  white-space: nowrap;
}

/* Common carousel styles */
.carousel-slide {
  flex: 0 0 auto;
  width: 280px;
  height: 280px;
  scroll-snap-align: center;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  background-color: #FFFFFF;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(135, 206, 235, 0.1);
  position: relative;
  overflow: hidden;
}

.carousel-slide a {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide .image-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 8px;
  padding: 10px;
  background-color: #FFFFFF;
  margin: 0;
  transition: all 0.3s ease;
}

.carousel-caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-color);
  font-size: 0.9em;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
  padding: 20px;
  text-align: center;
}

/* Build section specific styles */
.build-carousel .carousel-caption {
  white-space: normal;
  line-height: 1.4;
}

/* Where section specific styles */
.where-carousel .carousel-caption {
  white-space: nowrap;
}

/* Hover effects */
.carousel-slide a:hover .carousel-caption {
  opacity: 1;
}

.carousel-slide a:hover img {
  transform: scale(0.95);
  filter: blur(1px);
}

.carousel-slide:hover {
  box-shadow: 0 8px 20px rgba(135, 206, 235, 0.2);
}

/* Hide scrollbar but keep functionality */
.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Where section specific styles */
.where-carousel .carousel-slide img {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
}

.where-carousel .image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

/* Career link styles */
.career-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.career-link:hover {
  text-decoration: none;
  color: inherit;
}

.career-link > * {
  pointer-events: none;
}

/* Education section */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.education-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--spacing-md);
  background: var(--background-color);
  border-radius: 8px;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(135, 206, 235, 0.3);
}

.education-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 4px;
  padding: 12px;
  background-color: var(--background-color);
  transition: transform 0.3s ease;
}

/* Specific size for NP logo */
.education-item img[alt="Ngee Ann Polytechnic"] {
  width: 180px;  /* 150px + 20% */
  height: 180px; /* 150px + 20% */
}

.education-item img:hover {
  transform: scale(1.05);
}

.education-item h3 {
  margin: 0.5rem 0;
  color: var(--text-color);
  font-size: var(--font-size-sm);
}

.education-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8em;
}

.education-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.education-item a:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
  transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

/* Update hover effects with new colors */
.nav-link:hover,
.social-link:hover {
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-color);
}

/* Add subtle animation for links */
@keyframes neonPulse {
  0% { text-shadow: 0 0 5px var(--accent-color); }
  50% { text-shadow: 0 0 15px var(--accent-color); }
  100% { text-shadow: 0 0 5px var(--accent-color); }
}

.nav-link:hover,
.social-link:hover {
  animation: neonPulse 1.5s infinite;
}

/* Add subtle neon glow to sections */
section {
  background: rgba(42, 45, 62, 0.7);
  border: 2px solid var(--border-color);
  box-shadow: 0 0 20px rgba(76, 212, 255, 0.2);
}

/* Update gallery items with new color scheme */
.gallery-item {
  background: rgba(42, 45, 62, 0.8);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(76, 212, 255, 0.3);
}

/* Animations */
@keyframes softGlow {
  0% { box-shadow: 0 0 5px rgba(135, 206, 235, 0.2); }
  50% { box-shadow: 0 0 15px rgba(135, 206, 235, 0.4); }
  100% { box-shadow: 0 0 5px rgba(135, 206, 235, 0.2); }
}

.tm-section:hover {
  animation: softGlow 2s infinite;
}

/* Toast notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--background-color);
  color: var(--text-color);
  padding: 15px 25px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8em;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-notification i {
  color: var(--accent-color);
}

/* Media Queries */
/* Mobile devices */
@media screen and (max-width: 480px) {
  :root {
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --font-size-xl: 1.25rem;
  }
  
  .tm-section {
    padding: var(--spacing-md);
  }
  
  .tm-section-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
  }
  
  .carousel-slide {
    width: 240px;
    height: 240px;
  }
  
  .carousel-slide img {
    width: 120px;
    height: 120px;
  }
  
  .education-item {
    padding: var(--spacing-md);
  }
  
  .education-item img {
    width: 100px;
    height: 100px;
  }
  
  .tm-social-links {
    flex-direction: column;
  }
  
  .tm-social-links .nav-link {
    width: 100%;
    justify-content: center;
  }
}

/* Tablet devices */
@media screen and (min-width: 481px) and (max-width: 768px) {
  :root {
    --spacing-lg: 1.5rem;
    --font-size-xl: 1.35rem;
  }
  
  .carousel-slide {
    width: 260px;
    height: 260px;
  }
  
  .carousel-slide img {
    width: 130px;
    height: 130px;
  }
  
  .education-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Laptop and larger screens */
@media screen and (min-width: 769px) {
  .container-fluid {
    padding: var(--spacing-xl);
  }
  
  .tm-section {
    padding: var(--spacing-xl);
  }
  
  .carousel-container {
    padding: var(--spacing-lg) 0;
  }
}

/* High-DPI screens */
@media screen and (min-width: 1200px) {
  :root {
    --font-size-xl: 1.75rem;
  }
  
  .container-fluid {
    max-width: 1400px;
  }
}

/* Ensure text remains readable on small screens */
@media screen and (max-width: 320px) {
  :root {
    --font-size-base: 0.9rem;
    --font-size-lg: 1.1rem;
  }
  
  .carousel-slide {
    width: 220px;
    height: 220px;
  }
  
  .education-item h3 {
    font-size: var(--font-size-sm);
  }
}

/* Prevent horizontal overflow */
body {
  overflow-x: hidden;
  width: 100%;
}

/* Touch device optimizations */
@media (hover: none) {
  .carousel-container {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .carousel-slide {
    scroll-snap-align: center;
  }
  
  .tm-social-links .nav-link:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  body {
    background: none;
  }
  
  .tm-section {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #000;
  }
} 