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

def build(title, school, deg, disc, stem, dur, core, elect, note, url, dept):
    stem_txt = "STEM（OPT 36 个月）" if stem else "非 STEM（OPT 12 个月）"
    chips = f'<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>'
    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>
: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}}
</style></head><body><div class="wrap">
<div class="crumb"><a href="../index_main.html">← 返回项目库</a> / 佐治亚理工 Georgia Tech / {title}</div>
<div class="card">
<h1>{title}</h1>
<div class="meta">{chips}</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 = []

# 1. International Security MS
pages.append(("details/gatech-international-security-ms.html", build(
    "国际安全硕士（MS International Security）",
    "佐治亚理工 Georgia Tech", "MS", "soc", 0,
    "学制 30 学分；全日制；INTA 系",
    [
        "INTA 6003 Empirical Research Methods（3cr）",
        "INTA 6102 International Relations Theory（3cr）",
        "INTA 6103 International Security（3cr）",
        "方向选修 12cr（INTA 6000-/8000-level Specialization）",
        "自由选修约 9cr",
    ],
    [
        "Sam Nunn School of International Affairs 主办",
        "方向覆盖：国际安全、军备控制、情报、网络安全、跨国威胁、国防政策",
        "INTA 8803 专题含 Intelligence & International Security / Proliferation / Big Data & Security / Networks & Infrastructure & Security",
        "面向政府/智库/NGO/军事/企业安全岗位",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；本项目为 INTA 系国际安全方向专业硕士，与已录 MS International Affairs（两年制传统国关）、MS IAST（一年制科技政策交叉）为不同项目。",
    "https://catalog.gatech.edu/programs/international-security-ms/",
    "Sam Nunn School of International Affairs")))

# 2. MBID
pages.append(("details/gatech-mbid.html", build(
    "生物医学创新与发展硕士（Master of Biomedical Innovation and Development, MBID）",
    "佐治亚理工 Georgia Tech", "MBID", "eng", 1,
    "学制 30 学分；全日制；BMED 系",
    [
        "BMED 6501 Fundamentals of Biomedical Innovation and Development Processes（3cr）",
        "BMED 6502 Clinical Literacy and Experience（3cr）",
        "BMED 6503 Medical Markets and Clinical Specialties（3cr）",
        "BMED 6504 Financial Planning for Development Projects（3cr）",
        "BMED 6505 Product Planning and Project Management（3cr）",
        "BMED 6506 Professional Communications for Biomedical Innovation and Development（3cr）",
        "BMED 6507 Medical Device Regulatory Requirements（3cr）",
        "BMED 6508 Team Masters Project I（3cr）",
        "BMED 6509 Masters Project II（6cr）",
    ],
    [
        "Wallace H. Coulter Department of Biomedical Engineering 主办",
        "专业型生物医学工程创新硕士：覆盖临床、市场、财务、监管、产品管理全链条",
        "Team Masters Project 为团队医疗器械/产品开发实战项目",
        "面向医疗器械行业、生物医学创新、临床转化岗位",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；本项目为专业型生物医学创新硕士，与已录 MS BME（Coulter 系研究型）、MS BioE（跨学院 8 单位联合研究型）为不同项目。",
    "https://catalog.gatech.edu/programs/master-biomedical-innovation-development/",
    "Wallace H. Coulter Department of Biomedical Engineering")))

# 3. PMASE
pages.append(("details/gatech-pmase.html", build(
    "应用系统工程专业硕士（Professional Master's in Applied Systems Engineering, PMASE）",
    "佐治亚理工 Georgia Tech", "PMASE", "eng", 1,
    "学制 30 学分；全日制；跨学院 ECE/ME/ISyE 联合",
    [
        "ASE 6001 Fundamentals of Modern Systems Engineering（3cr）",
        "ASE 6002 Systems Design and Analysis（3cr）",
        "ASE 6003 Modeling and Simulation for Systems Engineers（3cr）",
        "ASE 6005 Advanced Topics in Systems Engineering: Systems Modeling with SysML（3cr）",
        "ASE 6006 Systems Engineering Laboratory（3cr）",
        "ASE 6102 System of Systems and Architecture（3cr）",
        "ASE 6103 Complex System Lifecycle and Integration（3cr）",
        "ASE 6104 Complex System Design and Integration (Capstone)（3cr）",
        "方向选修任选一组：ASE 6111 Sensor Systems / ASE 6121 Information Systems / ASE 6131 Human Systems Integration",
        "ASE 8803 Special Topics: Leadership Development（3cr）",
    ],
    [
        "跨学院 professional master's：面向工业界系统工程师",
        "核心覆盖系统工程全生命周期：需求、设计、建模、集成、验证、领导力",
        "方向分三组：传感器系统 / 信息系统 / 人因系统集成",
        "Capstone 为复杂系统设计与集成实战项目",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；PMASE 为 professional master's 学位，与研究型 MS 不同，面向工业界系统工程岗位。",
    "https://catalog.gatech.edu/programs/applied-systems-engineering-pmase/",
    "跨学院（ECE/ME/ISyE）")))

# 4. MRED
pages.append(("details/gatech-mred.html", build(
    "房地产开发硕士（Master of Real Estate Development, MRED）",
    "佐治亚理工 Georgia Tech", "MRED", "biz", 0,
    "学制约 30 学分；全日制；BCFM/ARCH/CP 跨学院",
    [
        "BC 6175 Real Estate Development and Construction（3cr）",
        "BC 6575 Real Estate Production Finance（3cr）",
        "BC 6350 Design and Construction Law 1（3cr）",
        "CP 6640 Applied Real Estate Development Methods（3cr）",
        "ARCH 6151 Theories of Urban Design 2（3cr）",
        "BC 6875 Real Estate Development Capstone Project（3cr）",
    ],
    [
        "跨学院：College of Design（建筑/城市规划）+ Scheller College of Business",
        "选修方向：BC 6375 Trends & Policy / BC 6675 Residential Design / ARCH 6226 Green Construction / CP 6016 Growth Management Law / CP 6112 Land Use Planning / CP 6611 Real Estate Finance / MGT 6082 Real Estate Development",
        "覆盖地产开发全链条：设计、融资、法律、施工、城市规划、可持续",
        "面向房地产开发、投资、咨询、政府土地管理岗位",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；MRED 为 professional master's 房地产开发方向，与已录 MCRP（城市规划）、MSUD（城市设计）、BCFM（建筑施工管理）为不同项目。",
    "https://catalog.gatech.edu/programs/master-real-estate-development/",
    "College of Design（BCFM/ARCH/CP）跨学院")))

# 5. MS Architecture
pages.append(("details/gatech-ms-architecture.html", build(
    "建筑学研究型硕士（MS Architecture）",
    "佐治亚理工 Georgia Tech", "MS", "art", 0,
    "学制 30 学分；全日制；含 Thesis；建筑学院",
    [
        "ARCH 6512 Research Colloquium（3cr）",
        "ARCH 7625 Theories of Inquiry（3cr）",
        "ARCH 7000 Master's Thesis（学分待补）",
        "方向选修（研究型）：建筑物理建模 / 证据设计 / 脚本 / 形状语法 / BIM / 参数化设计 / 建筑系统与数据 / 设计与气候变化",
    ],
    [
        "College of Design 主办研究型 MS",
        "方向覆盖：Building Physics Modeling / Evidence-Based Design / Scripting for Architecture / Shape Grammars / BIM Concepts / Parametric Modeling / Building Systems & Data / Design & Climate Change",
        "需完成 Master's Thesis，适合申请博士或建筑研究岗位",
        "与已录 M.Arch（60-102cr 专业学位，面向跨专业申请者）为不同项目：MS Architecture 为研究型 MS Thesis",
    ],
    "catalog 页未列截止/语言/GRE/学费，整项待补；本项目为研究型 MS Architecture，与已录 M.Arch（专业学位）、MSUD（城市设计）、MCRP（城市规划）为不同项目。",
    "https://catalog.gatech.edu/programs/architecture-ms/",
    "College of Architecture")))

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