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

CSS = """
:root{--bg:#f7f8fa;--card:#fff;--pri:#c8102e;--pri2:#a00d24;--line:#e5e7eb;--txt:#1f2937;--sub:#6b7280;--chip:#fef2f2;--link:#c8102e;}
*{box-sizing:border-box}body{margin:0;font-family:-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--txt);line-height:1.65}
.wrap{max-width:1080px;margin:0 auto;padding:24px}
.crumb{font-size:13px;color:var(--sub);margin-bottom:14px}
.crumb a{color:var(--link);text-decoration:none}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:22px 26px;margin-bottom:18px;box-shadow:0 1px 2px rgba(0,0,0,.03)}
h1{font-size:26px;margin:0 0 6px;color:#111}h2{font-size:17px;margin:0 0 12px;color:var(--pri);border-left:4px solid var(--pri);padding-left:10px}
.meta{display:flex;flex-wrap:wrap;gap:8px;margin:10 0 0}
.chip{background:var(--chip);color:var(--pri2);padding:3px 10px;border-radius:999px;font-size:12.5px}
.kv{display:grid;grid-template-columns:110px 1fr;row-gap:8px;font-size:14px}
.kv dt{color:var(--sub)}.kv dd{margin:0}
ul{margin:6px 0;padding-left:20px}li{margin:3px 0}
.note{background:#fffbeb;border-left:4px solid #f59e0b;padding:10px 14px;border-radius:6px;font-size:13.5px;color:#92400e;margin-top:8px}
"""

def build(title, school, deg, disc, stem, dur, core, elect, note, url, dept):
    stem_txt = "STEM-designated（OPT 36 个月）" if stem else "非 STEM（OPT 12 个月）"
    core_html = "".join(f"<li>{c}</li>" for c in core)
    elect_html = "".join(f"<li>{e}</li>" for e in elect)
    return f"""<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><title>{title} | 美加硕博项目库</title><style>{CSS}</style></head><body><div class="wrap">
<div class="crumb"><a href="../index_main.html">← 返回项目库</a> / {school} / {title}</div>
<div class="card">
<h1>{title}</h1>
<div class="meta">
<span class="chip">{deg}</span><span class="chip">{school}</span><span class="chip">{disc}</span><span class="chip">{stem_txt}</span><span class="chip">学制 {dur}</span>
</div>
<dl class="kv" style="margin-top:14px">
<dt>开设院系</dt><dd>{dept}</dd>
<dt>官网链接</dt><dd><a href="{url}" target="_blank" rel="noopener">{url}</a></dd>
<dt>截止日期</dt><dd>catalog 页未列具体轮次（待补）</dd>
<dt>语言要求</dt><dd>TOEFL iBT / IELTS Academic（最低分待补）</dd>
<dt>标化考试</dt><dd>catalog 页未列（待补）</dd>
<dt>学费</dt><dd>catalog 页未列打包学费（待补）</dd>
</dl>
</div>
<div class="card"><h2>核心课程 / 学位要求</h2><ul>{core_html}</ul></div>
<div class="card"><h2>方向选修 / 特色</h2><ul>{elect_html}</ul></div>
<div class="card"><h2>备注</h2><div class="note">{note}</div></div>
</div></body></html>"""

pages = []
pages.append((
  "details/gatech-intatech-ms.html",
  build(
    "国际事务、科学与技术硕士（MS International Affairs, Science, and Technology）",
    "佐治亚理工 Georgia Tech", "MS IAST", "soc", 0,
    "30 学分；1 年；全日制",
    [
      "INTA 6102 International Relations Theory（3cr）",
      "INTA 6003 Empirical Research Methods（3cr）",
      "INTA 8000 Seminar in Science, Technology and International Affairs I（3cr）",
      "INTA 8001 Seminar in Science, Technology and International Affairs II（3cr）",
      "方向选修 9cr（INTA 6002/6004/6011/6014/6015/6016/6304/6740/6742/6745/6753/8803 系列）",
      "自由选修 9cr（6000-8000-level）",
    ],
    [
      "方向覆盖：能源政策、环境政治、人工智能、数据分析、太空政策、颠覆性技术、情报、军备控制、网络安全、跨国关系",
      "INTA 8803 专题含 Space Policy / Technology Policy / Networks & Infrastructure & Security / Proliferation / Intelligence & International Security / Big Data & Security / Data Analysis & Visualization / Energy & International Security",
      "跨学科：Sam Nunn School of International Affairs 主办，面向政府/智库/NGO/军事/企业技术政策岗位",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；本项目与已入库 MS International Affairs（INTA）为不同项目：MS INTA 为传统国际关系两年制，MS IAST 为一年制科技政策交叉方向。",
    "https://catalog.gatech.edu/programs/international-affairs-science-technology-ms/",
    "Sam Nunn School of International Affairs",
  )
))
pages.append((
  "details/gatech-mseem.html",
  build(
    "可持续能源与环境管理硕士（MSEEM）",
    "佐治亚理工 Georgia Tech", "MSEEM", "soc", 0,
    "full-time 1 年（4-4-2）/ part-time 2 年（2-2-1）",
    [
      "PUBP 6312 Economics of Environmental Policy（3cr）",
      "PUBP 6360 Sustainable Energy & Environmental Management（3cr）",
      "PUBP 6801 Research Paper（6cr）",
      "定量方法 6cr（PUBP 6114/6120/6218/6530/8200/8205/8751，或 CEE 6355/6790、EAS 6490、CP 6541、MGT 6203/6314/6451、MSE 6759）",
      "方向选修 9cr（环境/能源/可持续专题）",
    ],
    [
      "跨学院：公共政策学院主办，联合 Scheller 商学院、城市与区域规划、土木与环境工程、经济学院",
      "能源方向：PUBP 6350 Energy Policy & Markets / 6352 Utility Regulation / 6701 Energy Technology Policy / CHBE 4030/6743 能源化工系统",
      "环境方向：PUBP 6310 Environmental Issues / 6326 Environmental Values / 6327 Sustainability Policy / 6330 Environmental Law / CEE 4300/4395/4620/6345/6390/6625",
      "GIS/大数据：PUBP 6530 GIS / 8751 Big Data & Public Policy / EAS 6490 Advanced Environmental Data Analysis",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；研究型论文 PUBP 6801 占 6cr；跨学院项目，适合能源/环境政策咨询与管理岗位。",
    "https://catalog.gatech.edu/programs/master-sustainable-energy-environmental-management/",
    "School of Public Policy（跨学院）",
  )
))
pages.append((
  "details/gatech-msud.html",
  build(
    "城市设计硕士（MS Urban Design）",
    "佐治亚理工 Georgia Tech", "MSUD", "art", 0,
    "30 学分；含夏季欧洲学习项目",
    [
      "Urban Design Studio（核心设计课，与当地社区合作）",
      "城市设计历史与理论",
      "房地产开发",
      "城市生态学",
      "实习：与美国领先城市设计事务所合作",
    ],
    [
      "面向已有建筑学 / 景观建筑学 / 城市规划 / 土木工程本科背景的职业人士",
      "当代议题：气候变化、公平性、老旧基础设施改造（retrofitting obsolescent infrastructure）",
      "跨学院：建筑学院主办，与 CRP 学院合作",
      "选修方向：建筑、规划、工程、计算、公共政策、遗产保护",
      "欧洲模块：Modern Architecture and Modern City 夏季欧洲学习项目（多数学生参加）",
    ],
    "catalog 页未列具体课程学分表/截止/语言/GRE/学费，整项待补；本项目为职业进阶型，需前置建筑/规划/景观学位；与已入库 MCRP（城市规划）为不同项目，MSUD 偏设计 studio，MCRP 偏规划政策。",
    "https://catalog.gatech.edu/programs/urban-design-msud/",
    "School of Architecture（与 CRP 合作）",
  )
))
pages.append((
  "details/gatech-bioengineering-ms.html",
  build(
    "生物工程硕士（MS Bioengineering）",
    "佐治亚理工 Georgia Tech", "MS BioE", "eng", 1,
    "30 学分；Thesis / Non-Thesis 双选",
    [
      "Engineering Fundamentals 6-9cr（Thesis 3-6 / Non-Thesis 6-9）",
      "Biological Sciences 6-9cr（Thesis 3-6 / Non-Thesis 6-9）",
      "Engineering Mathematics 3cr",
      "Technical Electives：Non-Thesis 12cr / Thesis 9cr",
      "Thesis Option：CEE 7000 Master's Thesis 9cr（含 oral defense）",
      "GPA 要求：累计 GPA ≥ 3.0；至少 15-21cr 为 6000-level+",
    ],
    [
      "跨学院：8 个学术单位联合（工程学院、计算学院、设计学院），非单一系",
      "研究方向：新型医疗器械开发、生物现象基础研究、物理与数学概念在医学/生物学问题中的应用",
      "导师选择自由度高：可在 BioE Program 全体 faculty 中选择",
      "Thesis Option：21cr 课程 + 9cr 论文；Non-Thesis：30cr 全课程（无 Pass/Fail）",
      "课程分布按学生本科背景定制（工程类多修生物科学，生物类多修工程基础）",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；注意：本项目（BioE 跨学院项目）与已入库 Biomedical Engineering MS（Wallace H. Coulter BME 系）为不同项目，BioE 更偏跨学科研究，BME 为系内学位。",
    "https://catalog.gatech.edu/programs/bioengineering-ms/",
    "Interdisciplinary Bioengineering Program（8 个学术单位联合）",
  )
))
pages.append((
  "details/gatech-esm-ms.html",
  build(
    "工程科学与力学硕士（MS Engineering Science and Mechanics）",
    "佐治亚理工 Georgia Tech", "MS ESM", "eng", 1,
    "30 学分；Thesis / Non-Thesis 双选；≥21cr 为 6000-level+",
    [
      "Non-Thesis：Mechanics 18cr + Mathematics 6cr + Approved Electives 6cr = 30cr",
      "Thesis：Mechanics 12cr + Mathematics 6cr + Approved Electives 6cr + CEE 7000 Master's Thesis 6cr = 30cr",
      "入学要求：工程或物理科学 BS 学位",
    ],
    [
      "CEE（土木与环境工程学院）主办",
      "方向：力学高级研究、固体力学、流体力学、材料力学",
      "面向继续 PhD 或工程研发岗位",
      "Thesis Option 需完成硕士论文并 oral defense",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；本项目与已入库 Mechanical Engineering MS、Civil Engineering MS 不同，ESM 为力学方向偏理论研究。",
    "https://catalog.gatech.edu/programs/engineering-science-mechanics-ms/",
    "School of Civil and Environmental Engineering",
  )
))

for path, html in pages:
    open(path, "w", encoding="utf-8").write(html)
    print("WROTE", path, len(html))
