/* ═══ ABOUT ME (`me-*`) ═══════════════════════════════════════════════
   The founder's personal page, /about/me/ (prime/templates/prime/about_me.html).
   Sits on style.css's tokens (--accent, --surface, --border, --text…) and adds
   its own two: a deep navy for the hero and a rising-sun red for Japan.
   Pure CSS — no JavaScript.
   ═══════════════════════════════════════════════════════════════════════ */
.me-page {
  --me-navy: #0b1530;
  --me-navy-2: #15244d;
  --me-sun: #e5484d;
  --me-sun-soft: rgba(229, 72, 77, .12);
  --me-radius: 18px;
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.me-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--me-radius);
  background: linear-gradient(135deg, var(--me-navy) 0%, var(--me-navy-2) 100%);
  color: #e2e8f0;
  padding: 2.75rem 2.25rem;
  margin-bottom: 1.75rem;
}
.me-hero__sun {
  position: absolute;
  right: -90px;
  top: -90px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 60%, #ff6b6b 0%, var(--me-sun) 45%, rgba(229,72,77,0) 72%);
  opacity: .4;
  pointer-events: none;
}
.me-hero__inner {
  position: relative;
  display: flex;
  gap: 2rem;
  align-items: center;
}
.me-avatar {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 5px;
  background: conic-gradient(from 200deg, var(--accent), var(--me-sun), var(--accent));
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.me-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--me-navy);
  display: block;
}
.me-kicker {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.me-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.1;
  color: #fff;
  margin: 0 0 .35rem;
}
.me-headline {
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 .75rem;
}
.me-lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #f1f5f9;
  max-width: 560px;
  margin: 0 0 1rem;
}
.me-status {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.me-status li {
  font-size: .8rem;
  padding: .35rem .75rem;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #e2e8f0;
}
.me-status li:first-child {
  background: var(--me-sun-soft);
  border-color: rgba(229,72,77,.55);
  color: #fecaca;
  font-weight: 600;
}
.me-status i { margin-right: .25rem; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.me-cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.me-cta--center { justify-content: center; }
.me-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.15rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.me-btn:hover { transform: translateY(-2px); }
.me-btn--primary {
  background: var(--accent);
  color: #06233a;
  box-shadow: 0 8px 24px rgba(56,189,248,.35);
}
.me-btn--primary:hover { color: #06233a; box-shadow: 0 10px 28px rgba(56,189,248,.5); }
.me-btn--ghost {
  border: 1px solid rgba(255,255,255,.28);
  color: #f8fafc;
}
.me-btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.me-btn--light { background: #fff; color: var(--me-navy); }
.me-btn--light:hover { color: var(--me-navy); }

/* ── Sections ─────────────────────────────────────────────────────── */
.me-section { margin: 2.5rem 0; }
.me-h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--text);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.me-h2::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--me-sun);
  flex-shrink: 0;
}
.me-sub { color: var(--text-muted); margin: -.5rem 0 1.25rem; }
.me-prose p { line-height: 1.75; color: var(--text); margin-bottom: 1rem; }
.me-footnote { font-size: .78rem; color: var(--text-muted); margin-top: .75rem; }

.me-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--me-radius);
  padding: 1.25rem 1.35rem;
  height: 100%;
}
.me-card--auto { height: auto; }
.me-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .8rem;
}
.me-card__title i { color: var(--accent); margin-right: .3rem; }

/* ── Impact numbers ───────────────────────────────────────────────── */
.me-impact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}
.me-impact__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--me-radius);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.me-impact__value {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1.1;
  background: linear-gradient(90deg, #0284c7, var(--me-sun));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.me-impact__label { font-size: .85rem; color: var(--text); line-height: 1.4; }
.me-impact__where {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: auto;
  padding-top: .35rem;
}

/* ── Why Japan ────────────────────────────────────────────────────── */
.me-japan {
  position: relative;
  overflow: hidden;
  background: #fffaf9;
  border: 1px solid #fbd5d5;
  border-radius: var(--me-radius);
  padding: 1.5rem 1.4rem;
  height: 100%;
}
.me-japan__mark {
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--me-sun);
  box-shadow: 0 0 0 8px var(--me-sun-soft);
}
.me-japan > p { line-height: 1.7; color: var(--text); padding-right: 2.5rem; }
.me-ja {
  border-top: 1px dashed #f5b5b5;
  margin-top: 1rem;
  padding-top: 1rem;
  font-family: 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
}
.me-ja__title {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--me-sun);
  margin-bottom: .5rem;
}
.me-ja p { font-size: .88rem; line-height: 1.85; margin-bottom: .5rem; color: var(--text); }

/* ── Link cards ───────────────────────────────────────────────────── */
.me-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}
.me-link {
  --brand: var(--accent);
  position: relative;
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--me-radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.me-link::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
}
.me-link:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 10px 30px rgba(15,23,42,.08);
  color: var(--text);
}
.me-link__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  background: var(--brand);
}
.me-link__body { display: flex; flex-direction: column; min-width: 0; }
.me-link__name { font-weight: 700; }
.me-link__handle {
  font-size: .8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-link__blurb { font-size: .8rem; color: var(--text); margin-top: .25rem; line-height: 1.4; }
.me-link__go { margin-left: auto; color: var(--text-muted); transition: color .15s; }
.me-link:hover .me-link__go { color: var(--brand); }

/* ── Pipeline ─────────────────────────────────────────────────────── */
.me-pipe {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .9rem;
  counter-reset: pipe;
}
.me-pipe__step {
  position: relative;
  counter-increment: pipe;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem .8rem .9rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.me-pipe__step::before {
  content: counter(pipe);
  position: absolute;
  top: .45rem; left: .6rem;
  font-size: .65rem;
  font-weight: 800;
  color: var(--text-muted);
}
.me-pipe__step:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  right: -.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--me-sun);
  font-weight: 800;
  z-index: 1;
}
.me-pipe__icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: #0284c7;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.me-pipe__label { font-weight: 700; font-size: .88rem; color: var(--text); }
.me-pipe__sub { font-size: .72rem; color: var(--text-muted); line-height: 1.35; }

/* ── Kaggle ───────────────────────────────────────────────────────── */
.me-kg-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.me-kg-badge {
  border-radius: 14px;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, #e0f6ff, #f3fbff);
  border: 1px solid #bae6fd;
  display: flex;
  flex-direction: column;
}
.me-kg-badge__value { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.45rem; color: #0369a1; line-height: 1.15; }
.me-kg-badge__label { font-size: .78rem; color: var(--text-muted); }
.me-kg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.me-kg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--me-radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
}
.me-kg--lead { grid-column: 1 / -1; border-color: #7dd3fc; box-shadow: 0 8px 28px rgba(2,132,199,.08); }
.me-kg__top { display: flex; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: .45rem; }
.me-kg__kind {
  font-size: .7rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--me-sun);
}
.me-kg__stats { font-size: .74rem; color: var(--text-muted); white-space: nowrap; }
.me-kg__title { font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 0 0 .65rem; line-height: 1.35; }
.me-kg__dl { margin: 0 0 .6rem; }
.me-kg__dl dt { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-top: .35rem; }
.me-kg__dl dd { margin: .1rem 0 0; font-size: .88rem; line-height: 1.55; color: var(--text); }
.me-kg__dl ul { margin: 0; padding-left: 1.05rem; }
.me-kg__dl li { margin-bottom: .2rem; }
.me-kg__result {
  display: flex; gap: .5rem; align-items: flex-start;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
  padding: .55rem .75rem; font-size: .86rem; line-height: 1.5; color: #14532d; margin: 0 0 .75rem;
}
.me-kg__result i { color: #16a34a; font-size: 1rem; margin-top: .05rem; }
.me-kg__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: .75rem; flex-wrap: wrap; }

/* ── Experience timeline ──────────────────────────────────────────── */
.me-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--border);
}
.me-job {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--me-radius);
  padding: 1.15rem 1.3rem;
  margin-bottom: 1rem;
}
.me-job::before {
  content: '';
  position: absolute;
  left: calc(-1.4rem - 7px);
  top: 1.45rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
}
.me-job:first-child::before { border-color: var(--me-sun); background: var(--me-sun); }
.me-job__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .6rem;
}
.me-job__role { font-size: 1.02rem; font-weight: 700; color: var(--text); margin: 0; }
.me-job__org { font-size: .85rem; color: var(--text-muted); }
.me-job__dates {
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.me-job__points { margin: 0; padding-left: 1.1rem; }
.me-job__points li { font-size: .9rem; line-height: 1.6; color: var(--text); margin-bottom: .3rem; }
.me-job__points strong { color: #0369a1; }
.me-job__tech {
  font-size: .76rem;
  color: var(--text-muted);
  margin: .6rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.me-chip-link {
  flex-shrink: 0;
  font-size: .78rem;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  white-space: nowrap;
}
.me-edu { margin-bottom: .9rem; height: auto; }

/* ── Chips, languages, beyond ─────────────────────────────────────── */
.me-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.me-chips li {
  font-size: .8rem;
  padding: .3rem .65rem;
  border-radius: 8px;
  background: var(--accent-glow);
  color: #075985;
  font-weight: 600;
}
.me-chips--soft li { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-weight: 500; }

.me-langs { list-style: none; padding: 0; margin: 0; }
.me-langs li {
  display: grid;
  grid-template-columns: 80px auto 1fr;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}
.me-langs li:last-child { border-bottom: 0; }
.me-langs__name { font-weight: 700; color: var(--text); }
.me-langs__note { font-size: .8rem; color: var(--text-muted); text-align: right; }
.me-dots { display: inline-flex; gap: 4px; }
.me-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.me-dot.is-on { background: var(--accent); }
.me-langs li:last-child .me-dot.is-on { background: var(--me-sun); }

.me-beyond { list-style: none; padding: 0; margin: 0; }
.me-beyond li { display: flex; gap: .6rem; padding: .4rem 0; font-size: .9rem; color: var(--text); }
.me-beyond i { color: var(--me-sun); }

/* ── Close ────────────────────────────────────────────────────────── */
.me-close {
  text-align: center;
  border-radius: var(--me-radius);
  background:
    radial-gradient(circle at 50% 120%, rgba(229,72,77,.45), transparent 55%),
    linear-gradient(135deg, var(--me-navy), var(--me-navy-2));
  color: #e2e8f0;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}
.me-close h2 { font-family: 'Syne', sans-serif; font-weight: 800; color: #fff; margin-bottom: .5rem; }
.me-close p { max-width: 520px; margin: 0 auto 1.25rem; color: #cbd5e1; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .me-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-impact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-kg-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .me-pipe__step:nth-child(3n)::after { display: none; }
}
@media (max-width: 640px) {
  .me-hero { padding: 2rem 1.15rem; }
  .me-hero__inner { flex-direction: column; text-align: center; gap: 1.25rem; }
  .me-avatar { width: 128px; height: 128px; }
  .me-lede { margin-left: auto; margin-right: auto; }
  .me-status, .me-cta { justify-content: center; }
  .me-btn { width: 100%; justify-content: center; }
  .me-links { grid-template-columns: 1fr; }
  .me-kg-grid { grid-template-columns: 1fr; }
  .me-kg__top { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .me-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-pipe__step:nth-child(3n)::after { display: block; }
  .me-pipe__step:nth-child(2n)::after { display: none; }
  .me-job__head { flex-direction: column; gap: .4rem; }
  .me-timeline { padding-left: 1rem; }
  .me-job::before { left: calc(-1rem - 7px); }
  .me-langs li { grid-template-columns: 70px auto; }
  .me-langs__note { grid-column: 1 / -1; text-align: left; margin-top: -.3rem; }
}
