@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');

:root {
  --primary-color: #0E59B3;
  --secondary-color: #00B4D8;
  --background-dark: #0B1120;
  --background-light: #F8FAFC;
  --text-dark: #1E293B;
  --text-light: #F1F5F9;
  --card-bg: #FFFFFF;
  --border-radius: 16px;
  --transition: all 0.3s ease-in-out;
}

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

body {
  font-family: 'Jua', sans-serif;
  background-color: var(--background-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 1.05rem;
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-logo {
  font-size: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1010;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: var(--transition);
}

/* Hamburger animation */
.mobile-menu-btn.toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-menu-btn.toggle span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

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

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary-color);
}

/* Nav Group Right */
.nav-group-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Language Switch Toggle */
.lang-switch {
  order: -1;
  position: relative;
  width: 80px;
  height: 32px;
  background: #e2e8f0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 2px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.lang-switch input {
  display: none;
}

.lang-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 38px;
  height: 28px;
  background: white;
  border-radius: 14px;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.lang-switch input:checked ~ .lang-switch-thumb {
  transform: translateX(38px);
}

.lang-text {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: bold;
  color: #64748b;
  z-index: 1;
  user-select: none;
  transition: color 0.3s;
}

.lang-switch input:not(:checked) ~ .lang-text.en {
  color: var(--primary-color);
}

.lang-switch input:checked ~ .lang-text.ko {
  color: var(--primary-color);
}


/* Header Sections */
.page-header {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 8rem 2rem 4rem;
  margin-bottom: 4rem;
}

.page-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: fadeUp 1s ease-out;
  text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.25);
}

.page-header p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  animation: fadeUp 1s ease-out 0.2s both;
}

.mobile-br {
  display: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* Content Blocks */
.content-section {
  margin-bottom: 6rem;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.15);
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-2.reverse .text-content {
  order: 2;
}

.grid-2.reverse .image-content {
  order: 1;
}

/* Cards & Images */
.image-wrapper {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: transform 0.5s ease;
}

.image-wrapper:hover {
  transform: translateY(-10px);
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-wrapper:hover img {
  transform: scale(1.05);
}

/* Text Content styling */
.text-box {
  background: white;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.text-box h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.15);
}

.text-box p {
  color: #475569;
  font-size: 1.15rem;
  line-height: 1.8;
}

/* Timeline specific */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--secondary-color);
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  width: 50%;
  padding-right: 3rem;
}

.timeline-item:nth-child(even) {
  margin-left: auto;
  padding-right: 0;
  padding-left: 3rem;
}

.timeline-dot {
  position: absolute;
  top: 0;
  right: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid white;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.2);
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
  right: auto;
}

.timeline-content {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.timeline-content:hover {
  transform: translateY(-5px);
}

.timeline-date {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  display: block;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-section {
  opacity: 0;
  transform: translateY(20vh);
  visibility: hidden;
  transition: opacity 1s ease-out, transform 1s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
}

/* Prototype specifics */
.stat-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin-top: 2rem;
}

.stat-card h4 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Circular Charts */
.chart-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.pie-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pie-chart {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.1);
}

.pie-chart.p-60 {
  background: conic-gradient(var(--primary-color) 60%, #e2e8f0 0);
}
.pie-chart.p-45 {
  background: conic-gradient(var(--secondary-color) 45%, #e2e8f0 0);
}
.pie-chart.p-85 {
  background: conic-gradient(#10b981 85%, #e2e8f0 0);
}

.pie-inner {
  width: 85px;
  height: 85px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text-dark);
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.pie-label {
  text-align: center;
  margin-top: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 1.1rem;
}

/* Footer */
footer {
  background: var(--background-dark);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

footer p {
  opacity: 0.7;
}

/* Progress Bar Text */
.bar-text {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.85rem;
  white-space: nowrap;
  height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .bar-text {
    font-size: clamp(0.6rem, 2.8vw, 0.8rem);
    letter-spacing: -0.3px;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .grid-2.reverse .text-content {
    order: 1;
  }
  
  .grid-2.reverse .image-content {
    order: 2;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
  }
  
  .timeline-item:nth-child(even) {
    padding-left: 50px;
  }
  
  .timeline-dot {
    left: 10px !important;
  }
  
  .page-header h1 {
    font-size: clamp(1.5rem, 6.5vw, 2.5rem);
    padding: 0 1rem;
    white-space: nowrap;
  }
  
  .page-header p {
    font-size: clamp(0.8rem, 3.8vw, 1.15rem);
    padding: 0 1rem;
    white-space: nowrap;
  }
  
  /* Mobile Navigation */
  .mobile-menu-btn {
    display: flex;
  }
  
  .nav-group-right {
    gap: 1rem;
  }
  
  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem 1rem;
    gap: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    text-align: center;
    border-bottom: 4px solid var(--primary-color);
    z-index: 999;
  }
  
  .nav-links.open {
    transform: translateY(0);
  }

  .mobile-br {
    display: block;
  }
}
