@import url('https://fonts.googleapis.com/css2?family=DotGothic16&family=VT323&family=Noto+Sans+JP:wght@400;700&family=Noto+Sans+SC:wght@400;700&display=swap');

:root {
  --bg: #0a1020;
  --text: #e4ecf8;
  --text-mid: #a0b0cc;
  --text-dim: #607090;
  --mint: #2ef8a8;
  --yellow: #ffcc40;
  --blue: #44aaff;
  --pink: #ff6ea0;
  --accent: #ff7840;
  --purple: #b48cff;
  --px: 'VT323', 'DotGothic16', monospace;
  --body: 'DotGothic16', 'Noto Sans JP', 'Noto Sans SC', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(46,248,168,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(68,170,255,.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(180,140,255,.05) 0%, transparent 50%);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- top nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(90deg, #0e1830, #141e38, #18143a);
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, var(--mint), var(--blue), var(--purple), var(--pink)) 1;
  display: flex;
  align-items: stretch;
  padding: 0 16px 0 0;
}

.nav-logo {
  font-family: var(--px);
  font-size: 18px;
  color: var(--mint);
  font-weight: 700;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  border-right: 2px solid rgba(255,255,255,.1);
}

.nav-space { flex: 1; }

.lang-sw {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
}

.lang-btn {
  font-family: var(--px);
  font-size: 15px;
  padding: 3px 8px;
  background: none;
  color: var(--text-dim);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.05s;
}

.lang-btn:hover { color: var(--text-mid); border-color: rgba(255,255,255,.15); }

.lang-btn.active {
  color: #0a1020;
  background: var(--yellow);
  border-color: var(--yellow);
}

/* ---- side nav ---- */
.side-nav {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  background: linear-gradient(180deg, rgba(20,30,56,.95), rgba(24,20,58,.95));
  border: 2px solid rgba(100,140,255,.2);
  border-left: none;
  border-radius: 0 6px 6px 0;
  backdrop-filter: blur(8px);
}

.side-nav a {
  font-family: var(--px);
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 12px;
  white-space: nowrap;
  transition: all 0.05s;
  border-left: 3px solid transparent;
}

.side-nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.side-nav a.active {
  color: var(--mint);
  border-left-color: var(--mint);
  background: rgba(46,248,168,.08);
}

/* ---- layout ---- */
.frame {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 28px 40px;
}

/* ---- hero ---- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 28px 16px;
  background: linear-gradient(135deg, rgba(46,248,168,.06) 0%, transparent 40%, rgba(68,170,255,.05) 70%, rgba(180,140,255,.06) 100%);
  border-bottom: 1px solid rgba(100,140,255,.1);
}

.hero-name {
  font-family: var(--px);
  font-size: 32px;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(46,248,168,.3);
}

.hero-role {
  font-family: var(--px);
  font-size: 16px;
  color: var(--mint);
  line-height: 2;
  margin-bottom: 8px;
}

.hero-desc {
  color: var(--text-mid);
  font-size: 14px;
  max-width: 700px;
  margin-bottom: 12px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-links a {
  font-family: var(--px);
  font-size: 15px;
  color: var(--blue);
  text-decoration: none;
  padding: 4px 12px;
  border: 2px solid rgba(68,170,255,.3);
  background: rgba(68,170,255,.06);
  transition: all 0.05s;
}

.hero-links a:hover {
  border-color: var(--mint);
  color: var(--mint);
  background: rgba(46,248,168,.1);
}

/* ---- section bands ---- */
#research { background: linear-gradient(180deg, rgba(46,248,168,.03) 0%, rgba(68,170,255,.03) 100%); padding: 8px 0; border-radius: 4px; }
#projects { background: linear-gradient(180deg, rgba(68,170,255,.04) 0%, rgba(68,170,255,.02) 100%); padding: 8px 0; border-radius: 4px; }
#awards { background: linear-gradient(180deg, rgba(255,204,64,.04) 0%, rgba(255,204,64,.02) 100%); padding: 8px 0; border-radius: 4px; }
#timeline { background: linear-gradient(180deg, rgba(255,110,160,.04) 0%, rgba(255,110,160,.02) 100%); padding: 8px 0; border-radius: 4px; }
#contact { background: linear-gradient(180deg, rgba(180,140,255,.04) 0%, rgba(68,170,255,.02) 100%); padding: 8px 0; border-radius: 4px; }

/* ---- RPG window ---- */
.rpg {
  background: linear-gradient(135deg, rgba(30,50,80,.6), rgba(20,36,60,.8));
  margin-bottom: 20px;
  border: 2px solid rgba(46,248,168,.25);
  box-shadow: 4px 4px 0 0 rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.04);
}

.rpg-head {
  background: linear-gradient(90deg, rgba(46,248,168,.15), rgba(30,50,80,.8) 70%);
  padding: 7px 14px;
  font-family: var(--px);
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid rgba(46,248,168,.2);
  border-left: 4px solid var(--mint);
}

.rpg-head::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--mint);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--mint);
}

.rpg--yellow { border-color: rgba(255,204,64,.25); background: linear-gradient(135deg, rgba(60,48,20,.5), rgba(36,30,16,.7)); }
.rpg--yellow .rpg-head { border-left-color: var(--yellow); border-bottom-color: rgba(255,204,64,.2); background: linear-gradient(90deg, rgba(255,204,64,.18), rgba(60,48,20,.6) 70%); }
.rpg--yellow .rpg-head::before { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }

.rpg--blue { border-color: rgba(68,170,255,.25); background: linear-gradient(135deg, rgba(20,40,70,.6), rgba(16,30,56,.7)); }
.rpg--blue .rpg-head { border-left-color: var(--blue); border-bottom-color: rgba(68,170,255,.2); background: linear-gradient(90deg, rgba(68,170,255,.18), rgba(20,40,70,.6) 70%); }
.rpg--blue .rpg-head::before { background: var(--blue); box-shadow: 0 0 6px var(--blue); }

.rpg--pink { border-color: rgba(255,110,160,.25); background: linear-gradient(135deg, rgba(60,20,40,.5), rgba(40,16,30,.7)); }
.rpg--pink .rpg-head { border-left-color: var(--pink); border-bottom-color: rgba(255,110,160,.2); background: linear-gradient(90deg, rgba(255,110,160,.18), rgba(60,20,40,.6) 70%); }
.rpg--pink .rpg-head::before { background: var(--pink); box-shadow: 0 0 6px var(--pink); }

.rpg--purple { border-color: rgba(180,140,255,.25); background: linear-gradient(135deg, rgba(40,24,60,.5), rgba(30,18,50,.7)); }
.rpg--purple .rpg-head { border-left-color: var(--purple); border-bottom-color: rgba(180,140,255,.2); background: linear-gradient(90deg, rgba(180,140,255,.18), rgba(40,24,60,.6) 70%); }
.rpg--purple .rpg-head::before { background: var(--purple); box-shadow: 0 0 6px var(--purple); }

.rpg-body {
  padding: 14px 16px;
}

.rpg-body p { margin-bottom: 6px; }
.rpg-body p:last-child { margin-bottom: 0; }

.rpg-note {
  font-family: var(--px);
  font-size: 15px;
  color: var(--yellow);
  margin-top: 8px;
  text-shadow: 0 0 8px rgba(255,204,64,.3);
}

/* ---- project image ---- */
.proj-img {
  width: 100%;
  max-width: 560px;
  border: 2px solid rgba(68,170,255,.3);
  margin-bottom: 14px;
  display: block;
  image-rendering: auto;
}

/* ---- publication ---- */
.pub {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
  line-height: 1.7;
  position: relative;
}

.pub:last-child { border-bottom: none; }

.pub-y {
  font-family: var(--px);
  font-size: 15px;
  color: var(--blue);
  flex-shrink: 0;
  min-width: 52px;
  padding-top: 3px;
  text-align: right;
  position: relative;
  text-shadow: 0 0 8px rgba(68,170,255,.4);
}

.pub-y::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 9px;
  width: 5px;
  height: 5px;
  background: var(--yellow);
  box-shadow: 0 0 4px var(--yellow);
}

.pub-c {
  flex: 1;
  min-width: 0;
  border-left: 2px solid rgba(68,170,255,.15);
  padding-left: 10px;
}

.tag {
  font-family: var(--px);
  font-size: 13px;
  padding: 0px 5px;
  margin-right: 4px;
  display: inline-block;
  vertical-align: middle;
}

.tag-j { background: var(--yellow); color: #0a1020; box-shadow: 0 0 6px rgba(255,204,64,.3); }
.tag-p { background: var(--mint); color: #0a1020; box-shadow: 0 0 6px rgba(46,248,168,.3); }
.tag-c { background: var(--blue); color: #0a1020; box-shadow: 0 0 6px rgba(68,170,255,.3); }

.lang-mark {
  font-family: var(--px);
  font-size: 13px;
  padding: 0 4px;
  margin-right: 3px;
  display: inline;
  vertical-align: middle;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text-dim);
}

.pub-c .lang-mark::after {
  content: '\A';
  white-space: pre;
}

/* ---- links ---- */
a.gl {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px dashed var(--blue);
}
a.gl:hover { color: var(--yellow); border-color: var(--yellow); }

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.btn {
  font-family: var(--px);
  font-size: 15px;
  padding: 5px 14px;
  background: rgba(68,170,255,.08);
  color: var(--blue);
  border: 2px solid rgba(68,170,255,.25);
  text-decoration: none;
  transition: all 0.05s;
}

.btn:hover {
  border-color: var(--mint);
  color: var(--mint);
  background: rgba(46,248,168,.1);
}

/* ---- awards ---- */
.aw {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,204,64,.1);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.aw:last-child { border-bottom: none; }

.aw-y {
  font-family: var(--px);
  font-size: 16px;
  color: var(--yellow);
  flex-shrink: 0;
  min-width: 40px;
  text-shadow: 0 0 8px rgba(255,204,64,.3);
}

.aw-d { font-size: 13px; }

/* ---- timeline ---- */
.tl { padding-left: 24px; position: relative; }

.tl::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 3px;
  background: linear-gradient(180deg, var(--pink), var(--purple));
  opacity: .4;
}

.tl-n { position: relative; margin-bottom: 10px; }

.tl-n::before {
  content: '';
  position: absolute;
  left: -22px; top: 7px;
  width: 8px; height: 8px;
  background: var(--pink);
  border: 2px solid rgba(255,110,160,.3);
  box-shadow: 0 0 6px rgba(255,110,160,.4);
}

.tl-y {
  font-family: var(--px);
  font-size: 16px;
  color: var(--pink);
  text-shadow: 0 0 8px rgba(255,110,160,.3);
}

.tl-t {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ---- contact ---- */
.ct {
  font-family: var(--px);
  font-size: 16px;
  padding: 6px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.ct-label { color: var(--text-dim); }

/* ---- footer ---- */
.foot {
  text-align: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  font-family: var(--px);
  font-size: 14px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ---- i18n ---- */
[data-lang] { display: none; }
[data-lang].active { display: block; }
span[data-lang].active, a[data-lang].active { display: inline; }

/* ---- responsive ---- */
@media (max-width: 800px) {
  .side-nav { display: none; }
  .hero-name { font-size: 22px; }
  .hero { padding: 50px 12px 12px; }
  .rpg-body { padding: 10px; }
  .frame { padding: 12px 10px 30px; }
}
