# -*- coding: utf-8 -*-
import sys, io, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")

def page(crumb, title, h1, chips, kvs, items, note, back="../index_main.html"):
    chips_html = "".join('<span class="chip">%s</span>' % c for c in chips)
    kvs_html = "".join('<div class="k">%s</div><div>%s</div>' % (k,v) for k,v in kvs)
    items_html = "".join("<li>%s</li>" % it for it in items)
    return '''<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><title>%s</title><style>
:root{--bg:#f7f8fa;--card:#fff;--line:#e5e7eb;--ink:#1f2329;--mut:#6b7280;--pri:#1d4ed8;--tag:#eef2ff;}
*{box-sizing:border-box}body{margin:0;font-family:-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--ink);line-height:1.6}
.wrap{max-width:980px;margin:0 auto;padding:24px}
.crumb{font-size:13px;color:var(--mut);margin-bottom:12px}
.crumb a{color:var(--pri);text-decoration:none}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:20px 24px;margin-bottom:16px}
h1{font-size:22px;margin:0 0 6px}
h2{font-size:15px;margin:0 0 10px;color:var(--pri)}
.chips{margin:8px 0 0}
.chip{display:inline-block;background:var(--tag);color:var(--pri);border-radius:999px;padding:2px 10px;font-size:12px;margin-right:6px}
.kv{display:grid;grid-template-columns:110px 1fr;row-gap:6px;font-size:14px}
.kv .k{color:var(--mut)}
ul{margin:6px 0 0;padding-left:20px}
.note{background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:10px 14px;font-size:13px;color:#92400e}
.back{display:inline-block;margin-top:8px;color:var(--pri);text-decoration:none;font-size:14px}
</style></head><body><div class="wrap"><div class="crumb">%s</div><div class="card"><h1>%s</h1><div class="chips">%s</div></div><div class="card"><h2>学位与院系</h2><div class="kv">%s</div></div><div class="card"><h2>核心要求</h2><ul>%s</ul></div><div class="card"><h2>说明</h2><div class="note">%s</div></div><a class="back" href="%s">← 返回项目库</a></div></body></html>''' % (title, crumb, h1, chips_html, kvs_html, items_html, note, back)

# 1. UPenn MSBMI
p1 = page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / Perelman 医学院 / 生物医学信息学 MSBMI',
 title='UPenn MS in Biomedical Informatics (MSBMI)',
 h1='生物医学信息学硕士（MS in Biomedical Informatics, MSBMI）',
 chips=['MS','医学/生物信息','Perelman 医学院','CAHIIM 认证','STEM'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','Perelman School of Medicine, Biomedical Informatics'),
      ('学位','MSBMI（Master of Science in Biomedical Informatics）'),
      ('学制','12 course units（约 1.5–2 年）'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/biomedical-informatics-msbmi/" target="_blank">catalog.upenn.edu/graduate/programs/biomedical-informatics-msbmi/</a>')],
 items=['面向临床医生或 computational/social/biological/behavioral sciences 背景学生，培养研究型生物医学信息学人才',
        '应用领域：precision medicine、predictive analytics、digital health、NLP、machine learning、clinical data integration',
        '课程符合 American Medical Informatics Association (AMIA) 能力要求，经 CAHIIM 认证',
        '与 MCI（Master of Clinical Informatics）共享 4 门核心课（BMIN 5010/5020/5030/5110）；MSBMI 另有 BMIN 5130 等研究方法课',
        '研究型学位，面向 clinical/translational/public health 研究问题'],
 note='半核验页：项目定位、12 course units、CAHIIM 认证、与 MCI 共享核心来自 UPenn Graduate Catalog 2026-27；具体截止/语言/GRE/学费/学费 catalog 页未列，留待补。'
)
open("details/up-msbmi.html","w",encoding="utf-8").write(p1)
print("up-msbmi", len(p1))

# 2. UT MMI
p2 = page(
 crumb='<a href="../index_main.html">项目库</a> / 多伦多 / 管理与创新系 / 创新管理硕士 MMI',
 title='UToronto Master of Management of Innovation (MMI)',
 h1='创新管理硕士（Master of Management of Innovation, MMI）',
 chips=['MMM/MMI','管理/创新','School of Graduate Studies','4 个月实习'],
 kvs=[('学校','多伦多（U of T）'),
      ('院系','School of Graduate Studies, Management & Innovation'),
      ('学位','MMI（Master of Management of Innovation）'),
      ('学制','含 4 个月实习（internship）'),
      ('最低录取','B+ average（GPA 3.3）'),
      ('标化','N/A（不要求 GRE/GMAT）'),
      ('官网','<a href="https://www.sgs.utoronto.ca/programs/management-of-innovation/" target="_blank">sgs.utoronto.ca/programs/management-of-innovation/</a>')],
 items=['面向 science、engineering、technology 背景学生，培养科技企业 leader 与 senior manager',
        '核心课程：economic analysis、technology management、business strategy、finance、accounting、marketing、policy',
        '学术核心课聚焦管理与经济学；学生自选 3 门 elective',
        '必须完成一段 4 个月实习（internship）方可毕业，积累真实业界经验',
        '面向科技创业、技术管理、产品创新等方向'],
 note='半核验页：项目定位、4 个月实习、B+ 3.3、GRE N/A 来自 UT SGS 官方项目页；具体申请截止轮次/语言最低分/学费 SGS 页未列，留待补。非 STEM OPT 口径（管理类），stem:0。'
)
open("details/ut-mmi.html","w",encoding="utf-8").write(p2)
print("ut-mmi", len(p2))

# 3. UPenn Systems Engineering MSE
p3 = page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / SEAS 工程学院 / 系统工程 MSE',
 title='UPenn MSE in Systems Engineering',
 h1='系统工程工程硕士（MSE in Systems Engineering, SE）',
 chips=['MSE','工程/系统','SEAS 工程学院','STEM'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','School of Engineering and Applied Science, Electrical and Systems Engineering (ESE)'),
      ('学位','MSE（Master of Science in Engineering）'),
      ('学制','10 course units'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/systems-engineering-mse/" target="_blank">catalog.upenn.edu/graduate/programs/systems-engineering-mse/</a>')],
 items=['ESE 系系统工程硕士，跨学科定位：data science、systems modeling、optimization、decision-making',
        '应用领域：societal systems（energy、transportation、health operations）',
        '课程方向：signal processing、optimization、simulation、control and cybernetics、complex adaptive systems、stochastic processes、decision sciences',
        '灵活课程，学生可按兴趣与目标定制',
        '面向工程界与科技系统行业'],
 note='半核验页：10 course units、方向列表、ESE 系定位来自 UPenn Graduate Catalog 2026-27；具体截止/语言/GRE/学费 catalog 页未列，留待补。STEM 工程类，stem:1。'
)
open("details/up-syse.html","w",encoding="utf-8").write(p3)
print("up-syse", len(p3))

# 4. UPenn Robotics MSE
p4 = page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / GRASP 实验室 / 机器人学 MSE',
 title='UPenn MSE in Robotics',
 h1='机器人学工程硕士（MSE in Robotics, ROBO）',
 chips=['MSE','工程/机器人','GRASP Lab','跨 CIS+ESE+MEAM','STEM'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','GRASP Lab，跨 CIS（计算机与信息）+ ESE（电子系统工程）+ MEAM（机械工程与应用力学）三系合办'),
      ('学位','MSE in Robotics'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/robotics-mse/" target="_blank">catalog.upenn.edu/graduate/programs/robotics-mse/</a>')],
 items=['GRASP Lab 是世界顶尖机器人研究中心之一',
        '学科：robotics、vision、perception、control、automation、machine learning',
        '学生来自 engineering、scientific、mathematical 多种背景',
        '就业方向：robotics、aerospace、automotive、industrial automation、defense；也为 further graduate studies 打基础',
        '宾大机器人硕士在业内与学界认可度高'],
 note='半核验页：跨三系合办、GRASP Lab、方向与就业来自 UPenn Graduate Catalog 2026-27；具体 course units/截止/语言/GRE/学费 catalog 页未列全，留待补。STEM 机器人/CS 类，stem:1。'
)
open("details/up-robo.html","w",encoding="utf-8").write(p4)
print("up-robo", len(p4))

# 5. UPenn MEAM MSE
p5 = page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / SEAS 机械工程与应用力学 / MEAM MSE',
 title='UPenn MSE in Mechanical Engineering and Applied Mechanics',
 h1='机械工程与应用力学工程硕士（MSE in Mechanical Engineering and Applied Mechanics, MEAM）',
 chips=['MSE','工程/机械','SEAS','5 方向','STEM'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','School of Engineering and Applied Science, Mechanical Engineering and Applied Mechanics (MEAM)'),
      ('学位','MSE in MEAM'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/mechanical-engineering-applied-mechanics-mse/" target="_blank">catalog.upenn.edu/graduate/programs/mechanical-engineering-applied-mechanics-mse/</a>')],
 items=['宾大 MEAM 硕士项目以创新与全美顶尖著称，培养新兴交叉领域 leadership 人才',
        '五个 concentration：① Design and Manufacturing；② Heat Transfer, Fluid Mechanics, and Energy；③ Mechanics of Materials；④ Mechatronic and Robotic Systems；⑤ Micro/Nano Systems',
        '学生可在学术导师指导下定制课程',
        '面向工程界 leadership 与新兴技术交叉领域'],
 note='半核验页：五个 concentration、项目定位来自 UPenn Graduate Catalog 2026-27；具体 course units/截止/语言/GRE/学费 catalog 页未列全，留待补。STEM 机械工程类，stem:1。'
)
open("details/up-meam.html","w",encoding="utf-8").write(p5)
print("up-meam", len(p5))
