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

:root {
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;
  --bg-dark:     #f1f5f9;
  --bg-dark-2:   #e2e8f0;
  --text:        #334155;
  --text-muted:  #94a3b8;
  --text-light:  #cbd5e1;
  --accent:      #c2413a;
  --accent-dark: #a3342e;
  --accent-light:#e06b65;
  --accent-bg:   rgba(194, 65, 58, 0.07);
  --accent-glow: rgba(194, 65, 58, 0.22);
  --heading:     #0f172a;
  --border:      #e2e8f0;
  --border-light:#f1f5f9;
  --gradient:    linear-gradient(135deg, #c2413a 0%, #d4635c 50%, #e8918b 100%);
  --gradient-2:  linear-gradient(135deg, #c2413a 0%, #b8524d 50%, #d4635c 100%);
  --font-sans:   'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ja:     'Noto Sans JP', 'Inter', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --radius:      12px;
  --radius-lg:   20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ja);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  transition: all 0.3s;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.logo {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
  position: relative;
}

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

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: all 0.25s;
}

.lang-toggle:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--heading);
  font-size: 1.3rem;
  cursor: pointer;
}

/* ── Hero ── */
.hero-bg {
  position: relative;
  background: linear-gradient(170deg, #ffffff 0%, #f8fafc 40%, #f1f5f9 100%);
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(194, 65, 58, 0.06) 0%, rgba(194, 65, 58, 0.02) 40%, transparent 70%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(194, 65, 58, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

#particle-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

#hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 3rem;
  padding-right: 3rem;
  gap: 4rem;
}

.hero-left { order: 1; }
.hero-right { order: 2; display: flex; justify-content: center; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

.typing-cursor {
  font-weight: 300;
  animation: blink 0.8s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-name {
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 800;
  color: var(--heading);
  line-height: 1.05;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.hero-name-ja {
  font-family: var(--font-ja);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.15em;
}

.hero-titles {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.hero-catchcopy {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--heading);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.hero-motto {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.hero-motto span {
  color: var(--text-muted);
}

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-ja);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px var(--accent-glow), 0 0 0 1px rgba(194, 65, 58, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(194, 65, 58, 0.35), 0 0 0 1px rgba(194, 65, 58, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-photo {
  width: 320px;
  height: 320px;
  border-radius: 24px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 25px 60px rgba(0, 0, 0, 0.1),
    0 0 80px rgba(194, 65, 58, 0.06);
}

.hero-photo::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: var(--gradient);
  z-index: -1;
  opacity: 0.5;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

/* ── Scroll indicator ── */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-hint i { font-size: 0.9rem; color: var(--accent-light); }

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ── Section shared ── */
.section-wrap {
  padding: 6rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-divider {
  max-width: 1200px;
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--border);
}

.section-alt { background: var(--bg-alt); }
.section-alt .section-wrap { max-width: 100%; padding-left: 0; padding-right: 0; }
.section-alt .section-inner { max-width: 1200px; margin: 0 auto; padding: 0 3rem; }

.section-header { margin-bottom: 3.5rem; }

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gradient);
  margin-top: 1rem;
  border-radius: 2px;
}

/* ── About ── */
.bio-text {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--text);
  max-width: 720px;
}

.bio-text p + p { margin-top: 1.25rem; }

/* ── Expertise ── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.expertise-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2.25rem;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.expertise-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(194, 65, 58, 0.06), 0 0 0 1px rgba(194, 65, 58, 0.1);
  border-color: rgba(194, 65, 58, 0.18);
}

.expertise-card:hover::before { opacity: 1; }

.expertise-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: var(--accent);
  transition: all 0.3s;
}

.expertise-card:hover .expertise-icon {
  background: var(--gradient);
  color: #fff;
}

.expertise-card h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--heading);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.expertise-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 3rem;
  max-width: 720px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--border) 30%, var(--border) 70%, transparent 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  transition: background 0.3s;
}

.timeline-item:hover {
  background: var(--accent-bg);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.6rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--bg-alt);
  transition: all 0.3s;
}

.timeline-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.timeline-item.highlight::before {
  background: var(--accent);
  width: 14px;
  height: 14px;
  left: -2.8rem;
  top: 0.85rem;
  box-shadow: 0 0 0 4px var(--accent-bg);
  border: 3px solid var(--bg-alt);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  font-weight: 500;
  display: block;
  margin-bottom: 0.15rem;
}

.timeline-desc {
  font-size: 0.93rem;
  color: var(--text);
}

.timeline-item.highlight .timeline-desc {
  font-weight: 700;
  color: var(--heading);
}

.timeline-item.highlight {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  margin-left: -3px;
}

/* ── Scrollable List (shared: speaking, patents, publications) ── */
.scroll-list {
  list-style: none;
  max-width: 800px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.scroll-list::-webkit-scrollbar { width: 4px; }
.scroll-list::-webkit-scrollbar-track { background: transparent; }
.scroll-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.scroll-list::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.scroll-list li {
  display: flex;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  align-items: baseline;
  transition: all 0.25s;
}

.scroll-list li + li {
  border-top: 1px solid var(--border-light);
}

.scroll-list li:hover {
  background: var(--accent-bg);
}

/* ── Speaking ── */
.speaking-list li { gap: 1.5rem; }

.speaking-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  min-width: 72px;
  letter-spacing: 0.02em;
}

.speaking-text { font-size: 0.92rem; color: var(--text); }

.speaking-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
}

/* ── Patents ── */

.patent-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 56px;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
}

.patent-status.granted {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.patent-status.filed {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid rgba(194, 65, 58, 0.12);
}

.patent-title { font-size: 0.9rem; color: var(--text); }

.patent-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: var(--font-mono);
}

/* ── Publications ── */
.publication-list li { gap: 1.5rem; }

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  min-width: 48px;
  letter-spacing: 0.02em;
}

.pub-title {
  font-size: 0.9rem;
  color: var(--heading);
  font-weight: 600;
  line-height: 1.5;
}

.pub-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}


/* ── Credentials ── */
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 0.83rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.badge:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(194, 65, 58, 0.08);
}

/* ── Media ── */
.media-card {
  display: flex;
  gap: 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all 0.3s;
  max-width: 800px;
}

.media-card:hover {
  border-color: rgba(194, 65, 58, 0.18);
  box-shadow: 0 12px 40px rgba(194, 65, 58, 0.06);
}

.media-card-badge {
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: var(--radius);
  font-size: 1.4rem;
  color: var(--accent);
}

.media-card-source {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.media-card-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.75rem;
}

.media-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.media-card-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 2rem;
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.8;
}

.media-card-list li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.media-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.25s;
}

.media-card-link:hover { gap: 0.85rem; }

.media-card-link i { font-size: 0.75rem; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.media-card-sm {
  display: flex;
  gap: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s;
  align-items: flex-start;
}

.media-card-sm:hover {
  border-color: rgba(194, 65, 58, 0.18);
  box-shadow: 0 8px 24px rgba(194, 65, 58, 0.05);
}

.media-card-sm .media-card-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  font-size: 1.1rem;
  border-radius: 10px;
}

.media-card-sm .media-card-source {
  font-size: 0.7rem;
  margin-bottom: 0.25rem;
}

.media-card-sm .media-card-title {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.media-card-sm .media-card-desc {
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.media-card-sm .media-card-link {
  font-size: 0.8rem;
}

.media-feature + .media-feature { margin-top: 2.5rem; }

.media-card-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
}

.media-card-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 860px) {
  .media-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .media-card { flex-direction: column; gap: 1.25rem; padding: 1.75rem; }
  .media-card-sm { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .media-card-list { grid-template-columns: 1fr; }
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--heading);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.contact-links { list-style: none; }

.contact-links li {
  margin-bottom: 0.75rem;
}

.contact-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.25s;
}

.contact-links a:hover {
  color: var(--accent);
  background: var(--accent-bg);
}

.contact-links i { color: var(--accent); width: 18px; text-align: center; }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.contact-form .full { grid-column: 1 / -1; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 0.9rem;
  transition: all 0.25s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  background: var(--bg);
}

.contact-form textarea { resize: vertical; min-height: 130px; }

.contact-form button {
  grid-column: 1 / -1;
  padding: 0.95rem;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.3s;
  font-family: var(--font-ja);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.contact-form button:hover {
  box-shadow: 0 8px 30px rgba(194, 65, 58, 0.3);
  transform: translateY(-2px);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 3.5rem 2rem;
  font-size: 0.78rem;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

footer .footer-logo {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

footer .footer-logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Fade in ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Language ── */
[data-lang="en"] { display: none; }
body.en [data-lang="ja"] { display: none; }
body.en [data-lang="en"] { display: revert; }

/* ── Stats ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ── Terminal ── */
.terminal-window {
  background: #1e1e2e;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-width: 800px;
  font-family: var(--font-mono);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #181825;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red    { background: #f38ba8; }
.terminal-dot.yellow { background: #f9e2af; }
.terminal-dot.green  { background: #a6e3a1; }

.terminal-title {
  margin-left: auto;
  font-size: 0.72rem;
  color: #6c7086;
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 1.25rem;
  max-height: 420px;
  overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #cdd6f4;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: #45475a; border-radius: 2px; }

.terminal-welcome { color: #a6adc8; margin: 0; font-family: inherit; font-size: inherit; }
.terminal-welcome .term-cmd { color: #a6e3a1; }

.terminal-output pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: inherit;
}

.terminal-output .term-success { color: #a6e3a1; }
.terminal-output .term-error   { color: #f38ba8; }
.terminal-output .term-accent  { color: #f9e2af; }
.terminal-output .term-info    { color: #89b4fa; }
.terminal-output .term-muted   { color: #6c7086; }

.terminal-input-line {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.terminal-prompt {
  color: #a6e3a1;
  white-space: nowrap;
  flex-shrink: 0;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #cdd6f4;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  caret-color: #f9e2af;
}

/* ── Terminal Page Overlay ── */
.terminal-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #11111b;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: termFadeIn 0.3s ease;
}
.terminal-page-overlay[hidden] { display: none; }
@keyframes termFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.terminal-page-wrap {
  width: 90%;
  max-width: 960px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}
.terminal-page-wrap .terminal-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: none;
  border-radius: 12px;
  box-shadow: 0 0 80px rgba(137, 180, 250, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.terminal-page-wrap .terminal-bar {
  flex-shrink: 0;
}
.terminal-page-wrap .terminal-body {
  flex: 1;
  max-height: none;
  font-size: 0.9rem;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}
.terminal-page-wrap .terminal-input {
  font-size: 0.9rem;
}
.terminal-close-btn {
  background: none;
  border: none;
  color: #6c7086;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  margin-left: 8px;
}
.terminal-close-btn:hover {
  color: #f38ba8;
  background: rgba(243, 139, 168, 0.1);
}
.terminal-nav-link {
  color: var(--accent) !important;
  font-family: var(--font-mono);
  font-size: 0.82rem !important;
  letter-spacing: 0.03em;
}
@media (max-width: 768px) {
  .terminal-page-wrap { width: 100%; height: 100vh; }
  .terminal-page-wrap .terminal-window { border-radius: 0; }
}

/* ── Vi Mode ── */
.vi-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: viIn 0.2s;
}

.vi-overlay[hidden] { display: none; }

@keyframes viIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vi-modal {
  background: #1e1e2e;
  border: 1px solid #313244;
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 90%;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.vi-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #313244;
}

.vi-modal-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #a6e3a1;
  letter-spacing: 0.04em;
}

.vi-close {
  background: none;
  border: none;
  color: #6c7086;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.2s;
}

.vi-close:hover { color: #f38ba8; }

.vi-modal-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 1.5rem;
}

.vi-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #f9e2af;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.vi-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #a6adc8;
}

.vi-row kbd {
  display: inline-block;
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #cdd6f4;
  min-width: 24px;
  text-align: center;
}

.vi-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #313244;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #6c7086;
  text-align: center;
}

.vi-footer kbd {
  display: inline-block;
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #cdd6f4;
}

.vi-cmdline {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #1e1e2e;
  border-top: 1px solid #313244;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #cdd6f4;
}

.vi-cmdline[hidden] { display: none; }

.vi-cmdline input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #cdd6f4;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  caret-color: #f9e2af;
}

.vi-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 998;
  background: #1e1e2e;
  border: 1px solid #313244;
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #a6e3a1;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.3s;
}

.vi-toast[hidden] { display: none; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  #hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 100px;
    padding-bottom: 5rem;
    gap: 2.5rem;
  }
  .hero-right { order: 1; }
  .hero-left  { order: 2; }
  .hero-eyebrow { justify-content: center; }
  .btn-group { justify-content: center; }
  .hero-name { font-size: 2.8rem; }
  .hero-photo { width: 240px; height: 240px; border-radius: 20px; }
  .hero-photo::before { border-radius: 22px; }
  .expertise-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .section-wrap { padding: 4rem 1.5rem; }
  .section-alt .section-inner { padding: 0 1.5rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .vi-modal-body { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 600px) {
  nav { padding: 0 1.25rem; }
  nav .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.25rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }
  nav .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .hero-name { font-size: 2.2rem; }
  .contact-form { grid-template-columns: 1fr; }
  .speaking-list li { flex-direction: column; gap: 0.2rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 1.6rem; }
}
