:root {
  --blue: #314c9a;
  --blue-light: #3d5bb5;
  --blue-dark: #243870;
  --white: #ffffff;
  --off-white: #f5f7fc;
  --text: #1a1a2e;
  --text-muted: rgba(255, 255, 255, 0.85);
  --radius: 12px;
  --shadow: 0 8px 32px rgba(49, 76, 154, 0.2);
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Korean: all phrases bold */
body.lang-ko .logo,
body.lang-ko .nav-links a,
body.lang-ko .hero-title,
body.lang-ko .hero-name,
body.lang-ko .hero-name-light,
body.lang-ko .hero-subtitle,
body.lang-ko .hero-word,
body.lang-ko .section-title,
body.lang-ko .about-text,
body.lang-ko .service-card h3,
body.lang-ko .service-card p,
body.lang-ko .contact-text,
body.lang-ko .contact-email,
body.lang-ko .footer-text {
  font-weight: 700;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(49, 76, 154, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity var(--transition);
}

.nav-links a:hover {
  opacity: 1;
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition), border-color var(--transition);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.lang-btn.active {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3d5bb5 0%, var(--blue) 40%, var(--blue-dark) 100%);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-words {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.hero-word {
  position: absolute;
  font-size: clamp(0.85rem, 2vw, 1.25rem);
  font-weight: 300;
  color: #ffffff;
  opacity: 0.8;
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.9),
    0 0 24px rgba(255, 255, 255, 0.5),
    0 0 36px rgba(255, 255, 255, 0.3);
  animation: hero-word-float 25s ease-in-out infinite;
  animation-delay: calc(var(--i) * -3.5s);
}

.hero-word:nth-child(1) { left: 8%;  top: 15%; animation-duration: 28s; }
.hero-word:nth-child(2) { left: 72%; top: 22%; animation-duration: 26s; animation-delay: -4s; animation-name: hero-word-float-b; }
.hero-word:nth-child(3) { left: 15%; top: 68%; animation-duration: 30s; animation-delay: -8s; }
.hero-word:nth-child(4) { left: 68%; top: 72%; animation-duration: 27s; animation-delay: -2s; animation-name: hero-word-float-b; }
.hero-word:nth-child(5) { left: 5%;  top: 42%; animation-duration: 29s; animation-delay: -6s; animation-name: hero-word-float-b; }
.hero-word:nth-child(6) { left: 78%; top: 48%; animation-duration: 25s; animation-delay: -10s; }
.hero-word:nth-child(7) { left: 42%; top: 8%;  animation-duration: 31s; animation-delay: -5s; animation-name: hero-word-float-b; }

@keyframes hero-word-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  15%      { transform: translate(12vw, -8vh) rotate(3deg); }
  30%      { transform: translate(-8vw, 10vh) rotate(-2deg); }
  45%      { transform: translate(10vw, 12vh) rotate(2deg); }
  60%      { transform: translate(-12vw, -5vh) rotate(-3deg); }
  75%      { transform: translate(-5vw, -12vh) rotate(1deg); }
  90%      { transform: translate(8vw, 6vh) rotate(-1deg); }
}

@keyframes hero-word-float-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20%      { transform: translate(-10vw, 8vh) rotate(-2deg); }
  40%      { transform: translate(6vw, -10vh) rotate(2deg); }
  60%      { transform: translate(14vw, 6vh) rotate(-1deg); }
  80%      { transform: translate(-6vw, -8vh) rotate(3deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.8),
    0 0 40px rgba(255, 255, 255, 0.5),
    0 0 60px rgba(255, 255, 255, 0.3),
    0 2px 24px rgba(0, 0, 0, 0.2);
}

.hero-name {
  display: inline-block;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding: 0.5em 1em;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 20px;
  text-shadow:
    0 0 16px rgba(135, 206, 235, 0.9),
    0 0 32px rgba(135, 206, 235, 0.6),
    0 0 48px rgba(135, 206, 235, 0.4),
    0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero-name-light {
  font-weight: 300;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.cta {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--white);
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Sections */
.section {
  padding: 5rem 1.5rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 2rem;
  text-align: center;
}

/* About */
.about {
  background: var(--white);
}

.about-text {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.8;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

/* Services */
.services {
  background: var(--off-white);
}

.services-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(49, 76, 154, 0.1);
  box-shadow: 0 4px 20px rgba(49, 76, 154, 0.08);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

/* Fluid motion inside card: clearly visible flow */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 25%,
    rgba(83, 127, 255, 0.35) 40%,
    rgba(123, 157, 255, 0.5) 50%,
    rgba(83, 127, 255, 0.35) 60%,
    transparent 75%,
    transparent 100%
  );
  background-size: 250% 100%;
  animation: service-fluid-flow 6s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.service-card:nth-child(1)::before { animation-duration: 5.2s;  animation-delay: -1.2s; }
.service-card:nth-child(2)::before { animation-duration: 7s;    animation-delay: -3.5s; }
.service-card:nth-child(3)::before { animation-duration: 6.3s;   animation-delay: -0.4s; }
.service-card:nth-child(4)::before { animation-duration: 8.1s;  animation-delay: -5s; }
.service-card:nth-child(5)::before { animation-duration: 5.8s;   animation-delay: -2.8s; }
.service-card:nth-child(6)::before { animation-duration: 6.7s;   animation-delay: -4.1s; }
.service-card:nth-child(7)::before { animation-duration: 7.4s;   animation-delay: -1.9s; }

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(49, 76, 154, 0.12);
}

.service-card:nth-child(1):hover::before { animation-duration: 3.5s; }
.service-card:nth-child(2):hover::before { animation-duration: 4.2s; }
.service-card:nth-child(3):hover::before { animation-duration: 3.8s; }
.service-card:nth-child(4):hover::before { animation-duration: 4.5s; }
.service-card:nth-child(5):hover::before { animation-duration: 3.2s; }
.service-card:nth-child(6):hover::before { animation-duration: 4s; }
.service-card:nth-child(7):hover::before { animation-duration: 3.6s; }

@keyframes service-fluid-flow {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0% 0; }
}

.service-card > .service-icon,
.service-card > h3,
.service-card > p {
  position: relative;
  z-index: 1;
}

.service-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #537fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(83, 127, 255, 0.4);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.85;
}

/* Contact */
.contact {
  background: var(--blue);
  color: var(--white);
}

.contact .section-title {
  color: var(--white);
}

.contact-container {
  text-align: center;
}

.contact-text {
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.contact-email {
  display: inline-block;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: background var(--transition), border-color var(--transition);
}

.contact-email:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

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

.footer-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1.25rem;
  }

  .lang-switcher {
    margin-left: auto;
  }
}
