/* ===== CSS Custom Properties ===== */
:root {
  --color-primary: #00C9A7;
  --color-secondary: #845EC2;
  --color-accent-pink: #D65DB1;
  --color-accent-blue: #4B8BBE;
  --color-accent-gold: #FFD700;
  --color-text: #333333;
  --color-text-dark: #1a1a2e;
  --color-text-light: #666666;
  --color-bg: #f8f9fc;
  --color-bg-alt: #ffffff;
  --color-white: #ffffff;
  --gradient-main: linear-gradient(135deg, #00C9A7, #4B8BBE, #845EC2, #D65DB1);
  --gradient-hero: linear-gradient(135deg, #00C9A7 0%, #4B8BBE 30%, #845EC2 60%, #D65DB1 100%);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --font-main: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1200px;
  --transition: 0.3s ease;
  --radius: 16px;
  --radius-sm: 8px;
}

/* ===== Base Styles ===== */
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  font-size: 16px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section:nth-child(even) {
  background: var(--color-bg-alt);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text-dark);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 0.02em;
}

.section-title .en {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent-blue);
  margin-top: 0.3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-main);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 38px;
  width: auto;
}

/* Navigation */
.nav-menu {
  display: none;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition);
  position: relative;
}

.header.scrolled .nav-menu a {
  color: var(--color-text);
}

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

/* Language Switch */
.lang-switch {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 4px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.header.scrolled .lang-switch {
  border-color: var(--color-secondary);
  color: var(--color-secondary) !important;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header.scrolled .lang-switch:hover {
  background: rgba(132, 94, 194, 0.08);
}

.lang-switch::after {
  display: none !important;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width var(--transition);
  border-radius: 1px;
}

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

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.header.scrolled .menu-toggle span {
  background: var(--color-text-dark);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.nav-menu.nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem 24px;
  gap: 1.2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-menu.nav-open a {
  color: var(--color-text);
  font-size: 1rem;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  color: var(--color-white);
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, 2%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-logo {
  width: 320px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
}

.hero-company {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-tagline {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.6;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 2;
  fill: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ===== Services Section ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-main);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.2rem;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.8rem;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ===== Projects Section ===== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.project-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 201, 167, 0.1), rgba(132, 94, 194, 0.1));
  color: var(--color-secondary);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.project-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.8rem;
}

.project-card .project-desc {
  font-size: 0.92rem;
  color: var(--color-text-light);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.project-partners {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 1.2rem;
}

.project-partners strong {
  color: var(--color-text);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent-blue);
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--color-secondary);
}

.project-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.project-link:hover svg {
  transform: translateX(3px);
}

/* ===== CEO Section ===== */
.ceo-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.ceo-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-white);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(132, 94, 194, 0.3);
}

.ceo-info {
  text-align: center;
}

.ceo-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.2rem;
}

.ceo-name-en {
  font-size: 0.95rem;
  color: var(--color-text-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.ceo-title {
  font-size: 0.9rem;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.ceo-current {
  font-size: 0.92rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.ceo-education {
  margin-bottom: 1.5rem;
}

.ceo-education h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.8rem;
}

.education-timeline {
  position: relative;
  padding-left: 20px;
}

.education-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gradient-main);
  border-radius: 1px;
}

.education-item {
  position: relative;
  padding: 0 0 1rem 16px;
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.6;
}

.education-item:last-child {
  padding-bottom: 0;
}

.education-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-secondary);
  border: 2px solid var(--color-bg);
}

.education-item .year {
  font-weight: 600;
  color: var(--color-secondary);
}

.ceo-research {
  margin-bottom: 1.5rem;
}

.ceo-research h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
}

.ceo-research p {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

.ceo-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.ceo-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 201, 167, 0.08), rgba(132, 94, 194, 0.08));
  color: var(--color-secondary);
  transition: background var(--transition), transform var(--transition);
}

.ceo-links a:hover {
  background: linear-gradient(135deg, rgba(0, 201, 167, 0.15), rgba(132, 94, 194, 0.15));
  transform: translateY(-1px);
}

.ceo-links a svg {
  width: 16px;
  height: 16px;
}

/* ===== Company Info Section ===== */
.company-info {
  max-width: 700px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.company-info-row {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.company-info-row:last-child {
  border-bottom: none;
}

.company-info-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.company-info-value {
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--gradient-hero) !important;
  color: var(--color-white);
  text-align: center;
}

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

.contact .section-title .en {
  color: rgba(255, 255, 255, 0.7);
}

.contact .section-title::after {
  background: rgba(255, 255, 255, 0.5);
}

.contact-text {
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.25);
}

.contact-item svg {
  width: 20px;
  height: 20px;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-text-dark);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.85rem;
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Media Queries ===== */

/* Tablet */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
  }

  .hero-tagline {
    font-size: 2rem;
  }

  .hero-logo {
    width: 360px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ceo-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .ceo-info {
    text-align: left;
  }

  .ceo-links {
    justify-content: flex-start;
  }

  .company-info-row {
    flex-direction: row;
  }

  .company-info-label {
    width: 140px;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .contact-methods {
    flex-direction: row;
    justify-content: center;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .section {
    padding: 100px 0;
  }

  .hero-tagline {
    font-size: 2.4rem;
  }

  .hero-logo {
    width: 420px;
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .section-title {
    font-size: 2rem;
  }

  .ceo-avatar {
    width: 150px;
    height: 150px;
    font-size: 2.8rem;
  }
}
