/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-950: #0a1628;
  --blue-900: #0f1f3d;
  --blue-800: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white: #ffffff;

  --font-jp: 'Noto Sans JP', sans-serif;
  --font-en: 'Space Grotesk', sans-serif;

  --header-h: 68px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.18);
  --shadow-blue: 0 8px 32px rgba(59,130,246,.25);

  --transition: .3s cubic-bezier(.4,0,.2,1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-jp);
  color: var(--slate-800);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(10, 22, 40, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .02em;
}
.logo span { color: var(--blue-400); }

.nav-list {
  display: flex;
  gap: 36px;
}

.nav-link {
  font-family: var(--font-en);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--blue-200);
  position: relative;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue-400);
  transition: width var(--transition);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* ===== SECTION BASE ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  font-family: var(--font-en);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--blue-500);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-en);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: .02em;
  line-height: 1.2;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--blue-600);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: var(--font-jp);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: var(--blue-500);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(59,130,246,.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: 1.5px solid var(--blue-400);
  color: var(--blue-400);
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.btn-outline:hover {
  background: var(--blue-400);
  color: var(--blue-950);
}

/* ===== HERO SECTION ===== */
.section-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--header-h) 0 80px;
  overflow: hidden;
  background: var(--blue-950);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.07) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
}
.hero-glow-1 {
  width: 600px; height: 600px;
  background: var(--blue-700);
  top: -200px; left: -100px;
}
.hero-glow-2 {
  width: 400px; height: 400px;
  background: var(--blue-500);
  bottom: -100px; right: -50px;
  opacity: .2;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-en);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-jp);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero-title span { color: var(--blue-400); }

.hero-desc {
  font-size: 1rem;
  color: var(--blue-200);
  line-height: 1.8;
  margin-bottom: 28px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.badge {
  padding: 6px 14px;
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--blue-300);
  letter-spacing: .02em;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-num small { font-size: 1rem; }
.stat-label {
  font-size: .72rem;
  color: var(--blue-300);
  letter-spacing: .05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.15);
}

/* HERO AVATAR */
.hero-avatar {
  position: relative;
  width: 280px;
  height: 280px;
  flex-shrink: 0;
}

.avatar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  padding: 4px;
  animation: spin 20s linear infinite;
  box-shadow: var(--shadow-blue);
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--blue-900);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-icon {
  width: 120px;
  height: 120px;
  animation: spin-reverse 20s linear infinite;
}
@keyframes spin-reverse {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

.avatar-skills {
  position: absolute;
  inset: 0;
}

.skill-bubble {
  position: absolute;
  padding: 6px 12px;
  background: var(--blue-800);
  border: 1px solid var(--blue-500);
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--blue-300);
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}
.skill-bubble-1 { top: 0; left: -20px; animation-delay: 0s; }
.skill-bubble-2 { top: 20%; right: -30px; animation-delay: .75s; }
.skill-bubble-3 { bottom: 10%; left: -30px; animation-delay: 1.5s; }
.skill-bubble-4 { bottom: 0; right: -10px; animation-delay: 2.25s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* SCROLL INDICATOR */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
.scroll-indicator span {
  font-family: var(--font-en);
  font-size: .65rem;
  letter-spacing: .2em;
  color: var(--blue-400);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--blue-400), transparent);
  animation: scrollLine 1.5s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* ===== PROFILE DETAIL SECTION ===== */
.section-profile-detail {
  background: var(--slate-50);
  padding: 100px 0;
}

.section-profile-detail .section-title { color: var(--slate-900); }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.profile-info-card,
.profile-skills-card,
.profile-services-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  transition: box-shadow var(--transition), transform var(--transition);
}
.profile-info-card:hover,
.profile-skills-card:hover,
.profile-services-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.profile-services-card {
  grid-column: 1 / -1;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-700);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-100);
}

.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: baseline; }
.info-item dt {
  font-size: .8rem;
  font-weight: 700;
  color: var(--slate-400);
  letter-spacing: .05em;
}
.info-item dd { font-size: .9rem; color: var(--slate-700); }

.skill-groups { display: flex; flex-direction: column; gap: 20px; }
.skill-group-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--slate-400);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  padding: 6px 14px;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--blue-700);
}
.skill-tag em {
  font-style: normal;
  font-size: .72rem;
  color: var(--blue-400);
  margin-left: 4px;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  transition: border-color var(--transition), background var(--transition);
}
.service-list li:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
}
.service-icon { font-size: 1.1rem; }

/* ===== HISTORY SECTION ===== */
.section-history {
  background: var(--white);
}

.history-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.history-col-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--blue-100);
}
.history-col-icon { font-size: 1.2rem; }

/* TIMELINE */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-500), var(--blue-200));
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-500);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue-300);
}

.timeline-period {
  display: inline-block;
  padding: 3px 10px;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--blue-600);
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: .875rem;
  color: var(--slate-500);
  line-height: 1.7;
}

/* ACHIEVEMENT CARDS */
.achievement-cards { display: flex; flex-direction: column; gap: 20px; }

.achievement-card-main {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-800));
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.achievement-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--white);
}
.platform-icon { width: 20px; height: 20px; border-radius: 4px; }

.achievement-stats {
  display: flex;
  gap: 24px;
}

.ach-stat { text-align: center; }
.ach-num {
  display: block;
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}
.ach-num small { font-size: 1rem; color: var(--blue-300); }
.ach-label { font-size: .7rem; color: var(--blue-300); letter-spacing: .05em; }

.achievement-services {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 24px;
}

.achievement-services-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--slate-600);
  margin-bottom: 16px;
  letter-spacing: .05em;
}

.achievement-service-list { display: flex; flex-direction: column; gap: 10px; }
.achievement-service-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  font-size: .85rem;
}
.service-name { color: var(--slate-700); font-weight: 500; }
.service-meta { font-size: .75rem; color: var(--blue-500); font-weight: 600; }

/* ===== CONTACT SECTION ===== */
.section-contact {
  background: var(--blue-950);
}
.section-contact .section-label { color: var(--blue-400); }
.section-contact .section-title { color: var(--white); }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.contact-desc {
  font-size: 1rem;
  color: var(--blue-200);
  line-height: 1.8;
  margin-bottom: 32px;
}

.contact-notes { display: flex; flex-direction: column; gap: 14px; }
.contact-notes li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .9rem;
  color: var(--blue-200);
}
.note-icon {
  width: 20px;
  height: 20px;
  background: var(--blue-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: var(--white);
  flex-shrink: 0;
  margin-top: 2px;
}

/* FORM */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--slate-700);
  letter-spacing: .02em;
}
.required { color: var(--blue-500); }

.form-input, .form-textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-jp);
  font-size: .9rem;
  color: var(--slate-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-textarea { resize: vertical; min-height: 140px; }

.btn-submit { width: 100%; justify-content: center; font-size: 1rem; }

.form-result {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  text-align: center;
  font-weight: 600;
}
.form-result.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.form-result.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ===== LINK SECTION ===== */
.section-link {
  background: var(--slate-50);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}
.link-card:hover {
  border-color: var(--blue-400);
  box-shadow: 0 8px 32px rgba(59,130,246,.15);
  transform: translateY(-3px);
}

.link-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
}
.link-card-icon svg { width: 100%; height: 100%; }

.link-card-body { flex: 1; min-width: 0; }
.link-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 4px;
}
.link-card-desc {
  font-size: .82rem;
  color: var(--slate-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card-arrow {
  font-size: 1.2rem;
  color: var(--blue-400);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.link-card:hover .link-card-arrow {
  transform: translateX(4px);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--blue-950);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.footer-logo span { color: var(--blue-400); }

.footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-family: var(--font-en);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--blue-300);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--white); }

.footer-copy {
  font-size: .78rem;
  color: var(--slate-600);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-avatar {
    display: none;
  }
  .hero-badges { justify-content: center; }
  .hero-stats { justify-content: center; }

  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-services-card { grid-column: auto; }

  .history-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }

  .section { padding: 72px 0; }
  .section-header { margin-bottom: 40px; }

  .nav { display: none; position: fixed; inset: 0; top: var(--header-h); background: rgba(10,22,40,.97); backdrop-filter: blur(12px); flex-direction: column; justify-content: center; align-items: center; }
  .nav.open { display: flex; }
  .nav-list { flex-direction: column; gap: 28px; text-align: center; }
  .nav-link { font-size: 1.2rem; color: var(--white); }
  .nav-toggle { display: flex; }

  .contact-form { padding: 28px 20px; }

  .achievement-stats { flex-wrap: wrap; gap: 16px; }

  .link-card-desc { display: none; }
}
