# -*- 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 Materials Science & Engineering MSE
open("details/up-mse-mat.html","w",encoding="utf-8").write(page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / SEAS 材料科学与工程 / Materials MSE',
 title='UPenn MSE in Materials Science and Engineering',
 h1='材料科学与工程工程硕士（MSE in Materials Science and Engineering）',
 chips=['MSE','工程/材料','SEAS','LRSM 实验室','STEM'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','School of Engineering and Applied Science, Materials Science and Engineering'),
      ('学位','MSE'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/materials-science-engineering-mse/" target="_blank">catalog.upenn.edu/graduate/programs/materials-science-engineering-mse/</a>')],
 items=['宾大是全美最早成立材料研究中心的大学之一，Laboratory for Research on the Structure of Matter (LRSM) 为全美最大同类实验室之一',
        '交叉领域：nanobioscience、nanophotonics、optoelectronics、physics·chemistry·engineering·biology 交叉',
        '培养 materials revolution 领域的 leader、innovator、visionary',
        '多学科课程，学生可按职业与研究兴趣定制'],
 note='半核验页：项目定位、LRSM、方向来自 UPenn Graduate Catalog 2026-27；具体 course units/截止/语言/GRE/学费 catalog 页未列全，留待补。STEM 材料工程类，stem:1。'
))
print("up-mse-mat")

# 2. UT MBiotech
open("details/ut-mbiotech.html","w",encoding="utf-8").write(page(
 crumb='<a href="../index_main.html">项目库</a> / 多伦多 / Institute for Management & Innovation / 生物技术硕士 MBiotech',
 title='UToronto Master of Biotechnology (MBiotech)',
 h1='生物技术硕士（Master of Biotechnology, MBiotech）',
 chips=['MBiotech','生物/商交叉','UTM IMI','24个月','8-12个月带薪实习'],
 kvs=[('学校','多伦多（U of T）'),
      ('院系','Institute for Management & Innovation (IMI), University of Toronto Mississauga'),
      ('学位','MBiotech（Master of Biotechnology）'),
      ('学制','全日制 24 个月，含 8–12 个月业界带薪实习'),
      ('官网','<a href="https://www.sgs.utoronto.ca/programs/biotechnology/" target="_blank">sgs.utoronto.ca/programs/biotechnology/</a>')],
 items=['跨学科 course-based 职业硕士，融合 science 与 business 课程',
        '两个方向：Biopharmaceutical（生物制药）、Digital Health Technologies（数字健康技术）',
        '面向 biotechnology、digital health、biopharmaceutical 行业就业',
        '要求生命科学学术背景，学生来自多种本科背景',
        '讲师来自 UT 多个学院及生物技术/制药业界'],
 note='半核验页：24 个月、8-12 个月带薪实习、两个方向来自 UT SGS 官方项目页；具体截止轮次/语言最低分/学费 SGS 页未列，留待补。STEM 生物技术类，stem:1。'
))
print("ut-mbiotech")

# 3. UPenn MArch
open("details/up-march.html","w",encoding="utf-8").write(page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / Weitzman 设计学院 / 建筑学 MArch',
 title='UPenn Master of Architecture (MArch)',
 h1='建筑学职业硕士（Master of Architecture, MArch）',
 chips=['MArch','设计/建筑','Weitzman 设计学院','职业学位'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','Stuart Weitzman School of Design'),
      ('学位','MArch（Master of Architecture, Professional Degree）'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/architecture-march/" target="_blank">catalog.upenn.edu/graduate/programs/architecture-march/</a>')],
 items=['综合严谨的职业学位项目，培养建筑行业全流程执业人才',
        '核心为高强度 Design Studio 设计序列',
        '配套历史、理论、技术、生态、社会、职业实践训练',
        '视觉研究训练 digital and new media 技能',
        '高年级学生可通过 elective studios 与 leading figures 建立个人方向'],
 note='半核验页：职业学位、Design Studio 核心、课程范围来自 UPenn Graduate Catalog 2026-27；具体学制/截止/语言/GRE/学费 catalog 页未列全，留待补。设计类非 STEM，stem:0。'
))
print("up-march")

# 4. UPenn MSSP
open("details/up-mssp.html","w",encoding="utf-8").write(page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / 社会工作学院 / 社会政策硕士 MSSP',
 title='UPenn Master of Science in Social Policy (MSSP)',
 h1='社会政策硕士（Master of Science in Social Policy, MSSP）',
 chips=['MSSP','公共政策','SSW 社会工作学院','8个月密集'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','School of Social Policy and Practice (SSW)'),
      ('学位','MSSP（Master of Science in Social Policy）'),
      ('学制','10 门课 / 8 个月密集'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/social-policy-mssp/" target="_blank">catalog.upenn.edu/graduate/programs/social-policy-mssp/</a>')],
 items=['培养 policy leadership 人才，用 policy 推动 equality、equity、social change',
        '就业方向：government、philanthropic foundations、research institutes、nonprofit/NGO',
        '课程：政策解决方案背后的世界观与假设、地方/州/国家/全球层级的社会政策决策机制',
        '8 个月密集型，适合已有人文社科基础的职业从业者快速转型'],
 note='半核验页：10 门课/8 个月、SSW 学院、就业方向来自 UPenn Graduate Catalog 2026-27；具体截止/语言/GRE/学费 catalog 页未列，留待补。公共政策类非 STEM，stem:0。'
))
print("up-mssp")

# 5. UPenn M.S.Ed. Education Policy
open("details/up-edupol.html","w",encoding="utf-8").write(page(
 crumb='<a href="../index_main.html">项目库</a> / 宾大 / GSE 教育学院 / 教育政策硕士 M.S.Ed.',
 title='UPenn M.S.Ed. in Education Policy',
 h1='教育政策硕士（M.S.Ed. in Education Policy）',
 chips=['M.S.Ed.','教育政策','GSE 教育学院'],
 kvs=[('学校','宾大（UPenn）'),
      ('院系','Graduate School of Education (GSE)'),
      ('学位','M.S.Ed.（Master of Science in Education）'),
      ('官网','<a href="https://catalog.upenn.edu/graduate/programs/education-policy-msed/" target="_blank">catalog.upenn.edu/graduate/programs/education-policy-msed/</a>')],
 items=['培养理解、评估、实施影响学生与社区的教育项目与政策的人才',
        '就业方向：school districts、federal/state departments of education、education policy research institutes、education-related nonprofits',
        '提供 knowledge 与 methodological tools 双训练',
        '支持 Double Majors 双专业'],
 note='半核验页：项目定位、就业方向来自 UPenn Graduate Catalog 2026-27；具体 course units/截止/语言/GRE/学费 catalog 页未列全，留待补。教育类非 STEM，stem:0。'
))
print("up-edupol")
