/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* GLOBAL STYLES */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #f9fafc;
  color: #333;
  line-height: 1.7;
}

a {
  color: #457b9d;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* NAVIGATION */
#navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  transition: top 0.4s ease-in-out;
  will-change: top;
}

.nav-hidden {
  top: -100px;
}

.top-nav {
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 66px;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #457b9d;
  text-decoration: none;
}

.nav-links a {
  margin-left: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  color: black;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #457b9d;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background-color: #457b9d;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* INTRO SECTION */
.intro {
  position: relative;
  text-align: center;
  padding-top: 10rem;
  padding-bottom: 6rem;
  min-height: 450px;
  overflow: visible;
  z-index: 1; 
}

.intro h1,
.intro .tagline,
.intro .subtitle {
  position: relative;
  z-index: 2;
}

.intro-text {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  margin-bottom: 30px;
}

h1 {
  font-size: 70px;
  margin-bottom: 0.3rem;
}

.tagline {
  font-size: 25px;
  color: #457b9d;
  font-style: italic;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 18px;
  color: #555;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.company-link {
  text-decoration: none;
  font-weight: 500;
}

.company-link:hover {
  text-decoration: underline;
}

.bain {
  color: #b0002d; 
}

.hanwha {
  color: #ff6f00; 
}

/* FLOATING CIRCLES */
.circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
  z-index: 0;
}

.red      { background: #e76f51;  width: 70px; height: 70px;  top: 40px;   left: 40px; }
.blue     { background: #457b9d;  width: 50px; height: 50px;  top: 100px;  right: 60px; }
.yellow   { background: #f4d35e;  width: 30px; height: 30px;  top: 180px;  left: 240px; }
.pink     { background: #f4a261;  width: 45px; height: 45px;  top: 260px;  right: 160px; }
.cream    { background: #ffe8d6;  width: 65px; height: 65px;  top: 320px;  left: 60px; }
.green    { background: #8ac926;  width: 38px; height: 38px;  top: 150px;  left: 120px; animation-delay: 1s; }
.lavender { background: #cdb4db;  width: 50px; height: 50px;  top: 400px;  right: 100px; animation-delay: 2s; }
.peach    { background: #ffb997;  width: 55px; height: 55px;  top: 460px;  left: 180px; animation-delay: 1.5s; }
.aqua     { background: #a0c4ff;  width: 42px; height: 42px;  top: 230px;  right: 40px; animation-delay: 0.5s; }
.gray     { background: #d6d6d6;  width: 60px; height: 60px;  top: 520px;  left: 260px; animation-delay: 2.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.scroll-hint {
  text-align: center;
  font-size: 2rem;
  color: #457b9d;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* PROJECTS SECTION */
.section-title {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.75rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1rem;
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto; 
}

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-link:hover {
  text-decoration: none;
}

.card {
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 1rem;
  width: 100%;
  max-width: 500px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  color: inherit;
}

.project-card {
  background: #dce8ff;
}

.project-card:hover {
  transform: translateY(-6px);
  background: #506179;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.project-card:hover .project-title,
.project-card:hover .project-desc {
  color: #fff;
}

.project-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.case-card {
  background: #ffcece;
}

.case-card:hover {
  transform: translateY(-6px);
  background: #9f7272;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.case-card:hover .project-title,
.case-card:hover .project-desc {
  color: #fff;
}

.case-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1d3557;
  margin-top: 10px;
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

.project-desc {
  font-size: 0.95rem;
  color: #444;
  transition: color 0.3s ease;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 0;
  background-color: #f9f9f9;
  font-size: 0.9rem;
  color: #555;
}

.footer-icons {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.footer-icons .social-icon {
  font-size: 1.3rem;
  margin: 0 10px;
  color: #333;
  transition: color 0.3s ease;
}

.footer-icons .social-icon:hover {
  color: #0077b5;
}

/* ICONS */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icon {
  font-size: 1.5rem;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: #0077b5;
  text-decoration: none;
}

/* ABOUT SECTION */
.toggle-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.toggle-btn {
  padding: 0.7rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  background-color: #dce8ff;
  color: #1d3557;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.toggle-btn:hover {
  background-color: #a8c9ff;
  color: #fff;
}

.toggle-btn.active {
  background-color: #457b9d;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.toggle-section {
  display: none;
  padding: 2rem;
  animation: fadeInUp 0.4s ease;
}

.toggle-section:not(.hidden) {
  display: block;
}

.hidden {
  display: none;
}

.about-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1d3557;
}

.about-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem;
  gap: 3rem;
}

.sticky-photo {
  flex: 1;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.sticky-photo img {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 2;
  font-size: 1rem;
  color: #333;
}

.about-text p {
  margin-bottom: 1.75rem;
}

/* HIGHLIGHT COLORS */
.highlight { color: #457b9d; font-weight: 600; }
.highlight-orange { color: #e76f51; font-weight: 600; }
.highlight-brown { color: #8d5524; font-weight: 600; }
.highlight-yellow { color: #ddbd48; font-weight: 600; }
.highlight-green { color: #8ac926; font-weight: 600; }
.highlight-purple { color: #734f96; font-weight: 600; }

/* FUN PAGE */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-top: 1rem;
}

.fun-wrapper {
  padding: 0rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.fun-text {
  flex: 1 1 40%;
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
}

.fun-text h2 {
  font-size: 1.4rem;
  color: #457b9d;
  margin-bottom: 0.8rem;
}

.fun-text p {
  font-size: 1rem;
  color: #555;
}

.fun-carousel {
  flex: 1 1 55%;
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
}

.fun-carousel-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.fun-carousel-track {
  display: inline-flex;
  gap: 1rem;
  /* animation: scrollAuto 30s linear infinite; */
}

.fun-carousel-track img {
  height: 240px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.fun-carousel-track img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  animation: zoomIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

/* RESPONSIVENESS */
/* Mobile First: Up to 768px */
@media (max-width: 768px) {
  /* Navigation */
  .top-nav {
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .nav-links a {
    margin-left: 0;
    font-size: 0.95rem;
  }

  /* Intro Section */
  .intro {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  .tagline,
  .subtitle {
    font-size: 1rem;
  }

  /* Projects */
  .projects-grid {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
  }

  .project-card,
  .case-card {
    width: 90%;
    padding: 1rem;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-desc {
    font-size: 0.9rem;
  }

  /* About Section */
  .about-wrapper {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 2rem;
  }

  .about-title,
  .fun-title {
    font-size: 2rem;
  }

  .sticky-photo {
    position: relative !important;
    top: auto !important;
    align-self: center !important;
    margin-bottom: 2rem;
    z-index: auto !important;
  }

  .sticky-photo img {
    max-width: 250px;
    height: auto;
  }

  .about-text,
  .fun-text {
    font-size: 0.95rem;
    width: 100%;
    padding: 0 1rem;
    text-align: left;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
  }

  .toggle-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .toggle-btn {
    width: 100%;
    max-width: 300px;
  }

  /* Fun Page */
  .fun-carousel-track img {
    height: 200px;
  }
}

/* Tablet: 769px–1024px */
@media (max-width: 1024px) {
  /* Navigation */
  .top-nav {
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .nav-links a {
    font-size: 0.9rem;
    margin-left: 0;
  }

  /* Projects Grid */
  .projects-grid {
    padding: 1rem;
  }

  .project-card,
  .case-card {
    width: 90%;
  }

  /* About + Fun Sections */
  .about-wrapper,
  .fun-wrapper {
    flex-direction: column;
    padding: 1.5rem;
    gap: 2rem;
  }

  .about-text,
  .fun-text {
    font-size: 1rem;
  }

  .fun-carousel-track img {
    height: 220px;
  }

  /* Typography */
  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .tagline,
  .subtitle {
    font-size: 1.1rem;
  }
}
