:root {
  --ink: #07130f;
  --ink-soft: #11251e;
  --paper: #f2f6f3;
  --white: #fff;
  --acid: #b8f238;
  --cyan: #3fd5c6;
  --line: rgba(255,255,255,.15);
  --muted: #8ca098;
  --text: #183029;
  --danger: #e05a52;
  --shadow: 0 24px 70px rgba(0,0,0,.28);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --display: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--paper); font-family: var(--font); letter-spacing: 0; }
body.locked { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.noise { position: fixed; inset: 0; z-index: 1000; pointer-events: none; opacity: .025; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--acid); border: 1px solid rgba(184,242,56,.5); background: rgba(184,242,56,.08); }
.brand-mark svg { width: 23px; }
.brand b, .brand small { display: block; }
.brand b { font-size: 17px; font-weight: 700; }
.brand small { color: #8ba097; font: 600 10px/1.4 var(--display); letter-spacing: 1.7px; }
.eyebrow { color: var(--cyan); font: 700 12px/1 var(--display); letter-spacing: 2.5px; text-transform: uppercase; }
.primary-btn, .secondary-btn { min-height: 46px; padding: 0 18px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; border: 1px solid transparent; font-weight: 700; transition: .25s ease; }
.primary-btn { color: #0a1611; background: var(--acid); }
.primary-btn:hover { background: #cef86e; transform: translateY(-2px); }
.primary-btn svg, .secondary-btn svg { width: 18px; }
.secondary-btn { color: var(--text); background: #fff; border-color: #dbe4df; }
.secondary-btn:hover { border-color: #91a69c; }
.icon-btn { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; color: inherit; border: 1px solid currentColor; background: transparent; }
.icon-btn svg { width: 19px; }

/* ===== Visitor site ===== */
.app-shell { background: var(--paper); }
.site-header { height: 76px; padding: 0 4.5vw; position: absolute; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.22); }
.site-header nav { margin-left: auto; display: flex; height: 100%; }
.site-header nav a { min-width: 62px; padding: 0 11px; display: grid; place-items: center; color: #bac8c2; font-size: 13px; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a.active { color: #fff; border-color: var(--acid); }
.header-tools { margin-left: 18px; display: flex; gap: 8px; color: #fff; }
.header-tools .icon-btn { border-color: rgba(255,255,255,.3); }
.mobile-menu { display: none; }

.home-hero { min-height: 100svh; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.25fr .85fr; align-items: center; color: #fff; background: var(--ink); }
.hero-grid { position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(90deg,#000,transparent 85%); }
.hero-glow { position: absolute; width: 720px; height: 720px; right: -180px; top: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(184,242,56,.16), transparent 62%); pointer-events: none; }
.hero-content { width: min(720px, 100%); position: relative; z-index: 2; padding: 120px 0 60px 8vw; }
.home-hero h2 { margin: 20px 0 22px; color: #fff; font: 800 clamp(52px,6.4vw,100px)/.9 var(--font); letter-spacing: 0; }
.home-hero h2 em { color: var(--acid); font-style: normal; }
.hero-lead { max-width: 560px; margin: 0; color: #c5d0cb; font-size: 17px; line-height: 1.8; }
.hero-actions { margin-top: 32px; display: flex; align-items: center; gap: 28px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.text-link svg { width: 17px; color: var(--acid); }
.hero-contact { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-contact span { padding: 9px 13px; display: inline-flex; align-items: center; gap: 8px; color: #b7c6c0; border: 1px solid rgba(255,255,255,.16); background: rgba(7,24,18,.5); font-size: 12px; }
.hero-contact svg { width: 15px; color: var(--acid); }
.hero-side { position: relative; z-index: 2; padding: 120px 7vw 60px 0; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.avatar-wrap { width: min(300px, 62%); aspect-ratio: 1/1; display: grid; place-items: center; border-radius: 50%; overflow: hidden; border: 1px solid rgba(184,242,56,.4); background: radial-gradient(circle at 35% 30%, #1a4234, #091713); box-shadow: 0 0 0 12px rgba(184,242,56,.06), 0 30px 80px rgba(0,0,0,.45); }
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.avatar-wrap .avatar-init { color: var(--acid); font: 800 clamp(60px,9vw,120px) var(--display); }
.hero-metrics { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(7,22,17,.86); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.18); }
.hero-metrics div { padding: 20px 14px; text-align: center; border-right: 1px solid rgba(255,255,255,.13); }
.hero-metrics div:last-child { border: 0; }
.hero-metrics strong, .hero-metrics span { display: block; }
.hero-metrics strong { color: var(--acid); font: 700 clamp(22px,2.6vw,30px) var(--display); }
.hero-metrics span { margin-top: 4px; color: #9bada6; font-size: 10px; white-space: nowrap; }
.scroll-indicator { position: absolute; z-index: 2; right: 3vw; bottom: 24px; display: flex; align-items: center; gap: 14px; color: #93a59e; font-size: 10px; writing-mode: vertical-rl; letter-spacing: 2px; }
.scroll-indicator span { width: 1px; height: 55px; background: linear-gradient(var(--acid),transparent); }

.section-pad { padding: 100px 7vw; }
.manifesto { display: grid; grid-template-columns: 120px 1.2fr .9fr; gap: 5vw; background: #f4f7f5; }
.section-index { color: #8fa098; font: 600 11px var(--display); letter-spacing: 1px; }
.manifesto h2, .section-head h2 { margin: 15px 0 0; color: #0d211a; font-size: clamp(28px,3.2vw,50px); line-height: 1.25; letter-spacing: 0; }
.manifesto-copy { padding-top: 28px; }
.manifesto-copy > p { margin: 0; color: #5c6f67; font-size: 14px; line-height: 2; }
.capability-line { margin-top: 28px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 14px; color: #789086; border-top: 1px solid #d2ddd7; font: 600 10px var(--display); letter-spacing: 1.2px; }
.capability-line span { padding: 6px 10px; border: 1px solid #d2ddd7; background: #fff; }

.skills-section { background: #e9f0ec; }
.section-head { margin-bottom: 50px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.section-head > p { width: min(390px,100%); margin: 0; color: #71877d; font-size: 13px; line-height: 1.8; }
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skill-card { padding: 26px; background: #fff; border: 1px solid #d7e2dd; transition: .28s; }
.skill-card:hover { transform: translateY(-5px); border-color: #79a818; box-shadow: 0 16px 40px rgba(20,48,39,.1); }
.skill-card .skill-head { display: flex; align-items: center; gap: 14px; }
.skill-head > span { width: 46px; height: 46px; display: grid; place-items: center; color: #10241c; background: var(--acid); }
.skill-head svg { width: 22px; }
.skill-head h3 { margin: 0; font-size: 19px; }
.skill-card > p { margin: 14px 0 18px; color: #71847d; font-size: 12px; line-height: 1.7; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span { padding: 7px 10px; color: #3d6658; background: #eaf2ee; border: 1px solid #d7e3dd; font-size: 11px; }
.skill-tags span.hot { color: #0a1611; background: var(--acid); border-color: var(--acid); font-weight: 700; }

.experience-section { color: #eaf1ee; background: #071710; }
.experience-section .section-head h2 { color: #fff; }
.timeline { position: relative; margin-top: 10px; padding-left: 32px; }
.timeline::before { content: ""; width: 1px; position: absolute; left: 7px; top: 6px; bottom: 6px; background: #2c4238; }
.timeline-item { position: relative; padding: 0 0 44px 28px; }
.timeline-item::before { content: ""; width: 15px; height: 15px; position: absolute; left: -32px; top: 6px; border-radius: 50%; border: 3px solid var(--ink); background: var(--acid); box-shadow: 0 0 0 4px rgba(184,242,56,.15); }
.timeline-item time { color: var(--cyan); font: 600 12px var(--display); letter-spacing: 1px; }
.timeline-item h3 { margin: 8px 0 6px; color: #f4f8f6; font-size: 21px; }
.timeline-item .tl-org { color: #9db0a8; font-size: 13px; }
.timeline-item p { margin: 10px 0 0; color: #7f948b; font-size: 13px; line-height: 1.9; }

.awards-section { background: #fff; }
.awards-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.award-card { padding: 24px; position: relative; overflow: hidden; border: 1px solid #d7e2dd; background: #f8faf9; transition: .28s; }
.award-card:hover { transform: translateY(-4px); border-color: #79a818; }
.award-card::after { content: ""; width: 90px; height: 90px; position: absolute; right: -30px; top: -30px; border-radius: 50%; background: rgba(184,242,56,.16); }
.award-card small { color: #79a818; font: 600 10px var(--display); letter-spacing: 1.2px; }
.award-card h3 { margin: 10px 0 8px; font-size: 17px; }
.award-card p { margin: 0; color: #71847d; font-size: 12px; line-height: 1.7; }

/* Research */
.research-section { background: #f4f7f5; }
.research-list { border-top: 1px solid #d2ddd7; }
.research-row { padding: 22px 4px; display: grid; grid-template-columns: 150px 1fr auto; gap: 6px 24px; align-items: center; border-bottom: 1px solid #d2ddd7; transition: .2s; }
.research-row:hover { padding-left: 14px; background: #fff; }
.research-row time { color: #79a818; font: 600 11px var(--display); letter-spacing: 1px; white-space: nowrap; }
.research-row h3 { margin: 0; color: #0d211a; font-size: 16px; line-height: 1.55; }
.research-row .research-rank { padding: 5px 11px; color: #3d6658; border: 1px solid #cbdad2; background: #fff; font-size: 10px; white-space: nowrap; }
.research-row p { grid-column: 2 / 4; margin: 0; color: #6a7f76; font-size: 12px; line-height: 1.7; }

/* Intellectual */
.intellectual-section { color: #eaf1ee; background: #0c2119; }
.intellectual-section .section-head h2 { color: #fff; }
.intellectual-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; align-items: start; }
.ip-group { border: 1px solid #2c4238; background: #0a1a14; }
.ip-group header { padding: 20px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #2c4238; }
.ip-group header > span { width: 42px; height: 42px; display: grid; place-items: center; color: #10241c; background: var(--acid); }
.ip-group header svg { width: 20px; }
.ip-group header small { color: #79a818; font: 600 9px var(--display); letter-spacing: 1.2px; }
.ip-group header h3 { margin: 4px 0 0; color: #f4f8f6; font-size: 17px; }
.ip-group ul { margin: 0; padding: 8px 20px 18px; list-style: none; }
.ip-group li { padding: 12px 0; border-bottom: 1px solid #1d352b; }
.ip-group li:last-child { border: 0; }
.ip-group li b, .ip-group li span { display: block; }
.ip-group li b { color: #dce7e2; font-size: 12px; font-weight: 600; line-height: 1.65; }
.ip-group li span { margin-top: 5px; color: #7f948b; font-size: 10px; }

.projects-section { background: #dfe8e3; }
.ai-section { background: #0c2119; color: #eaf1ee; }
.ai-section .section-head h2 { color: #fff; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.project-card { position: relative; overflow: hidden; color: #fff; background: #13261f; border: 1px solid #2c4238; transition: .3s; }
.project-card:hover { transform: translateY(-5px); border-color: var(--acid); }
.project-card .project-media { aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; background: #0c2018; }
.project-card .project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .project-media img { transform: scale(1.05); }
.project-card .project-media .project-init { padding: 24px; color: var(--acid); font: 700 28px/1.5 var(--display); text-align: center; letter-spacing: 1px; }
.project-card .project-body { padding: 20px 22px 24px; }
.project-card small { color: var(--cyan); font: 600 10px var(--display); letter-spacing: 1.4px; }
.project-card h3 { margin: 9px 0 8px; font-size: 20px; }
.project-card p { margin: 0; color: #a5b6af; font-size: 13px; line-height: 1.7; }
.project-card .project-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.project-card .project-tags span { padding: 5px 9px; color: #9db0a8; border: 1px solid #344b40; font-size: 10px; }
.project-link { margin-top: 15px; display: inline-flex; align-items: center; gap: 7px; color: var(--acid); font-size: 11px; font-weight: 700; }
.project-link svg { width: 15px; }

footer { padding: 75px 7vw 25px; color: #dfe8e4; background: #06130e; }
.footer-main { display: grid; grid-template-columns: 1.4fr .6fr .7fr .6fr; gap: 5vw; }
.footer-main h2 { margin: 50px 0; color: #fff; font-size: clamp(28px,4vw,50px); }
.footer-main > div > small { color: var(--acid); font: 600 10px var(--display); letter-spacing: 1.5px; }
.footer-main p { color: #82968d; font-size: 12px; line-height: 2; }
.footer-main a { display: inline-flex; align-items: center; gap: 7px; color: #cfe0d8; font-size: 12px; line-height: 2; }
.footer-main a:hover { color: var(--acid); }
.footer-main a svg { width: 14px; }
.footer-bottom { padding-top: 23px; display: flex; justify-content: space-between; align-items: center; color: #54685f; border-top: 1px solid #25382f; font-size: 10px; }
.footer-bottom button { display: inline-flex; align-items: center; gap: 8px; color: #788c83; border: 0; background: transparent; }
.footer-bottom svg { width: 15px; }

/* ===== Login modal ===== */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; visibility: hidden; opacity: 0; transition: .25s; }
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,10,8,.76); backdrop-filter: blur(9px); }
.login-panel { width: min(440px, calc(100vw - 32px)); position: relative; z-index: 1; padding: 42px; color: #eaf0ed; background: #0c1d17; border: 1px solid #355047; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 18px; right: 18px; color: #8aa098; border-color: #40534d; }
.login-symbol { width: 60px; height: 60px; margin-bottom: 25px; display: grid; place-items: center; color: var(--acid); border: 1px solid #435a50; background: #142a22; }
.login-symbol svg { width: 31px; }
.login-panel h2 { margin: 8px 0; color: #fff; font-size: 28px; }
.login-panel > p:not(.eyebrow):not(.form-error) { margin: 0 0 26px; color: #82968e; font-size: 13px; }
.login-panel label { margin-top: 17px; display: block; color: #aebdb7; font-size: 12px; }
.input-wrap { height: 50px; margin-top: 8px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border: 1px solid #395047; background: #10241d; }
.input-wrap:focus-within { border-color: var(--acid); }
.input-wrap svg { width: 17px; color: #7f968d; }
.input-wrap input { min-width: 0; flex: 1; color: #fff; outline: 0; border: 0; background: transparent; }
.input-wrap button { padding: 4px; color: #82968e; border: 0; background: transparent; }
.form-error { min-height: 20px; margin: 12px 0 0; color: #ff8e86; font-size: 12px; }
.login-btn { width: 100%; margin-top: 8px; }

/* ===== Admin ===== */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 245px 1fr; color: #183028; background: #edf2ef; }
.admin-sidebar { height: 100vh; position: sticky; top: 0; padding: 25px 18px; display: flex; flex-direction: column; color: #c9d5d0; background: #081812; }
.admin-sidebar .brand { padding: 0 8px 26px; }
.admin-sidebar nav { margin-top: 35px; display: grid; gap: 7px; }
.admin-sidebar nav button { height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 12px; color: #7f958b; text-align: left; border: 0; border-left: 2px solid transparent; background: transparent; }
.admin-sidebar nav button:hover, .admin-sidebar nav button.active { color: #fff; border-color: var(--acid); background: #142a21; }
.admin-sidebar nav svg { width: 18px; }
.admin-user { margin-top: auto; padding: 14px 8px 0; display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 10px; border-top: 1px solid #294037; }
.admin-user > span { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink); background: var(--acid); font-weight: 800; }
.admin-user b, .admin-user small { display: block; }
.admin-user b { color: #e8efec; font-size: 13px; }
.admin-user small { color: #647a70; font-size: 9px; }
.admin-user .icon-btn { width: 35px; height: 35px; color: #748a80; border: 0; }
.admin-main { min-width: 0; }
.admin-header { height: 86px; padding: 0 35px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #d9e2dd; }
.admin-header > div { display: flex; align-items: center; gap: 15px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.save-status-bar { color: #769187; font-size: 10px; white-space: nowrap; }
.save-status-bar .save-ok { color: #2d7a5a; }
.save-status-bar .save-err { color: #d4534b; font-weight: 600; }
.admin-header small { color: #83968e; font-size: 10px; }
.admin-header h1 { margin: 3px 0 0; font-size: 22px; }
#adminMenu { display: none; color: #345046; }
.admin-content { padding: 30px 35px 50px; }
.admin-welcome { min-height: 190px; padding: 36px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: #0d291f; overflow: hidden; position: relative; }
.admin-welcome::after { content: ""; width: 320px; height: 320px; position: absolute; right: -50px; border-radius: 50%; border: 60px solid rgba(184,242,56,.06); }
.admin-welcome h2 { margin: 8px 0; font-size: 29px; }
.admin-welcome p { margin: 0; color: #829d92; font-size: 13px; }
.welcome-icon { margin-right: 7vw; color: var(--acid); }
.welcome-icon svg { width: 80px; height: 80px; stroke-width: 1; }
.stat-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.stat-card { padding: 23px; background: #fff; border: 1px solid #dbe4df; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: #769087; }
.stat-top span { width: 36px; height: 36px; display: grid; place-items: center; color: #315f4e; background: #e7f0eb; }
.stat-top svg { width: 18px; }
.stat-card strong { display: block; margin-top: 20px; color: #122a21; font: 700 34px var(--display); }
.stat-card small { color: #82958d; }
.admin-section { margin-top: 25px; padding: 25px; background: #fff; border: 1px solid #dbe4df; }
.admin-section-head { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-section-head h3 { margin: 0; font-size: 17px; }
.admin-section-head p { margin: 5px 0 0; color: #83958e; font-size: 12px; }
.manage-head { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.manage-head h2 { margin: 0; font-size: 24px; }
.manage-head p { margin: 5px 0 0; color: #83958e; font-size: 12px; }
.manage-toolbar { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.search-box { width: min(300px,100%); height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid #d4dfda; background: #fff; }
.search-box svg { width: 17px; color: #91a099; }
.search-box input { min-width: 0; border: 0; outline: 0; background: transparent; }
.list-grid { display: grid; gap: 12px; }
.list-card { padding: 16px 18px; display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; background: #fff; border: 1px solid #d8e2dd; transition: .2s; }
.list-card:hover { border-color: #5d8e7b; }
.list-card > span.list-icon { width: 44px; height: 44px; display: grid; place-items: center; color: #37705b; background: #e7f1ec; }
.list-card > span.list-icon svg { width: 20px; }
.list-card h3 { margin: 0 0 5px; font-size: 16px; }
.list-card p { margin: 0; color: #6a7f76; font-size: 12px; line-height: 1.6; }
.list-card small { display: block; color: #8b9c95; font-size: 10px; }
.list-card .list-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.list-card .list-tags span { padding: 4px 8px; color: #3d6658; background: #eaf2ee; font-size: 10px; }
.action-buttons { display: flex; gap: 6px; }
.action-buttons button { width: 34px; height: 34px; display: grid; place-items: center; color: #5b7168; border: 1px solid #d7e0dc; background: #fff; }
.action-buttons button:hover { color: #174c3a; border-color: #83a497; }
.action-buttons button.danger:hover { color: var(--danger); border-color: #eab0ac; }
.action-buttons svg { width: 15px; }
.empty-state { padding: 70px 20px; text-align: center; color: #81958c; border: 1px dashed #bdcbc5; background: #fff; }
.empty-state svg { width: 45px; height: 45px; stroke-width: 1; }
.activity-list { display: grid; }
.activity-item { padding: 14px 0; display: flex; align-items: center; gap: 13px; border-top: 1px solid #ecf0ee; }
.activity-item span { width: 35px; height: 35px; display: grid; place-items: center; color: #37715d; background: #e7f1ec; }
.activity-item svg { width: 16px; }
.activity-item p { margin: 0; font-size: 13px; }
.activity-item small { color: #94a39d; font-size: 10px; }
.tag { padding: 5px 8px; display: inline-block; color: #3d6658; background: #eaf2ee; font-size: 10px; }
.metric-row button { display: grid; place-items: center; color: #b4544d; }
.metric-row button svg { width: 15px; }

/* ===== Editor ===== */
.editor-panel { width: min(780px,calc(100vw - 24px)); max-height: 92vh; position: relative; z-index: 1; display: flex; flex-direction: column; background: #f5f7f6; box-shadow: var(--shadow); }
.editor-panel > header { padding: 23px 26px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: #0c251c; }
.editor-panel > header small { color: var(--acid); font: 600 9px var(--display); letter-spacing: 1.5px; }
.editor-panel > header h2 { margin: 5px 0 0; font-size: 21px; }
.editor-panel > header .icon-btn { color: #94aaa1; border-color: #40574d; }
.editor-fields { padding: 25px 26px; overflow-y: auto; display: grid; grid-template-columns: repeat(2,1fr); gap: 17px; }
.field { display: block; color: #5f746b; font-size: 11px; }
.field.full { grid-column: 1/-1; }
.field > span { display: block; margin-bottom: 7px; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; color: #173128; outline: 0; border: 1px solid #ccd8d2; background: #fff; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #4d8c75; }
.image-upload { min-height: 120px; position: relative; display: grid; place-items: center; overflow: hidden; color: #758a81; text-align: center; border: 1px dashed #9cafa6; background: #edf2ef; }
.image-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-upload svg { width: 27px; margin-bottom: 4px; }
.image-upload small { display: block; font-size: 9px; }
.upload-prompt { display: grid; place-items: center; }
.upload-prompt b { margin-top: 2px; font-size: 11px; }
.upload-prompt small { color: #899a93; }
.image-preview { width: 100%; height: 170px; object-fit: cover; display: none; }
.image-preview.visible { display: block; }
.remove-single-image { margin-top: 7px; padding: 6px 0; display: none; align-items: center; gap: 6px; color: #a14d47; border: 0; background: transparent; font-size: 10px; }
.remove-single-image.visible { display: inline-flex; }
.remove-single-image svg { width: 14px; }
.editor-panel > footer { padding: 16px 26px; display: flex; justify-content: flex-end; gap: 10px; background: #fff; border-top: 1px solid #d9e2dd; }
.dynamic-item { grid-column: 1/-1; padding: 16px; display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; border: 1px solid #d7e2dd; background: #fff; }

.toast { min-width: 240px; position: fixed; z-index: 500; left: 50%; bottom: 28px; padding: 14px 18px; display: flex; align-items: center; gap: 10px; color: #eaf4f0; background: #0e2b21; border: 1px solid #3f6657; box-shadow: var(--shadow); transform: translate(-50%,80px); opacity: 0; transition: .3s; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.toast svg { width: 18px; color: var(--acid); }

/* Ghost button (dark hero) */
.ghost-btn { min-height: 46px; padding: 0 18px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; color: #fff; border: 1px solid rgba(255,255,255,.3); background: rgba(7,24,18,.5); font-weight: 700; transition: .25s ease; }
.ghost-btn:hover { color: #10241c; background: var(--acid); border-color: var(--acid); transform: translateY(-2px); }
.ghost-btn svg { width: 18px; }

/* Colored tags palette */
.tag-c0 { color: #10241c; background: var(--acid); border-color: var(--acid); }
.tag-c1 { color: #0a3d36; background: var(--cyan); border-color: var(--cyan); }
.tag-c2 { color: #5c4307; background: #ffc94d; border-color: #ffc94d; }
.tag-c3 { color: #4c2a7a; background: #d8b4fe; border-color: #d8b4fe; }
.tag-c4 { color: #124a7a; background: #93c5fd; border-color: #93c5fd; }
.tag-c5 { color: #7a1f1b; background: #fca5a5; border-color: #fca5a5; }

/* Research tags */
.research-tags { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 7px; }
.research-tags span { padding: 4px 9px; border: 1px solid transparent; font-size: 10px; white-space: nowrap; }

/* Intellectual tags */
.ip-group li .ip-tags { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.ip-group li .ip-tags span { margin: 0; padding: 3px 8px; border: 1px solid transparent; font-size: 9px; }

/* Awards clickable */
.award-card { cursor: pointer; }
.award-card .award-hint { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; color: #285d4a; font-size: 10px; font-weight: 700; }
.award-card .award-hint svg { width: 13px; }
.award-card:hover .award-hint { color: #79a818; }

/* Award lightbox */
.award-lightbox { z-index: 420; }
.lightbox-panel { width: min(920px,calc(100vw - 30px)); height: min(86vh,780px); position: relative; z-index: 1; padding: 24px; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 16px; background: #07150f; box-shadow: var(--shadow); }
.lightbox-panel > img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox-panel .modal-close { color: #fff; border-color: rgba(255,255,255,.35); }
.lightbox-controls { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; color: #c6d4ce; font-size: 11px; text-align: center; }
.lightbox-controls .icon-btn { color: #c6d4ce; border-color: rgba(255,255,255,.3); }
.lightbox-controls .icon-btn:hover { color: #10241c; background: var(--acid); border-color: var(--acid); }

/* Highlights */
.highlights-section { background: #dfe8e3; }
.highlights-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.highlight-card { position: relative; overflow: hidden; color: #fff; background: #13261f; border: 1px solid #2c4238; transition: .3s; }
.highlight-card:hover { transform: translateY(-5px); border-color: var(--acid); }
.highlight-card .hl-media { aspect-ratio: 16/9; display: grid; place-items: center; overflow: hidden; background: #0c2018; }
.highlight-card .hl-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.highlight-card:hover .hl-media img { transform: scale(1.05); }
.highlight-card .hl-media .hl-init { color: var(--acid); font: 700 26px/1.5 var(--display); padding: 24px; text-align: center; letter-spacing: 1px; }
.highlight-card .hl-body { padding: 20px 22px 24px; }
.highlight-card small { color: var(--cyan); font: 600 10px var(--display); letter-spacing: 1.4px; }
.highlight-card h3 { margin: 9px 0 8px; font-size: 20px; }
.highlight-card p { margin: 0; color: #a5b6af; font-size: 13px; line-height: 1.75; }
.highlight-card .hl-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.highlight-card .hl-tags span { padding: 5px 9px; color: #10241c; border: 1px solid transparent; font-size: 10px; }

/* Engineering */
.engineering-section { background: #e9f0ec; }
.engineering-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.eng-card { padding: 26px; position: relative; overflow: hidden; background: #fff; border: 1px solid #d7e2dd; transition: .28s; }
.eng-card:hover { transform: translateY(-4px); border-color: #79a818; box-shadow: 0 16px 40px rgba(20,48,39,.1); }
.eng-card::after { content: ""; width: 110px; height: 110px; position: absolute; right: -40px; top: -40px; border-radius: 50%; background: rgba(184,242,56,.14); }
.eng-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.eng-head h3 { margin: 0; color: #0d211a; font-size: 19px; line-height: 1.4; }
.eng-status { padding: 5px 11px; color: #3d6658; border: 1px solid #cbdad2; background: #f4f7f5; font-size: 10px; font-weight: 700; white-space: nowrap; }
.eng-status.s-built { color: #2d6a1f; background: #e4f8dc; border-color: #b7e3a5; }
.eng-status.s-feasibility { color: #0a6d63; background: #dcf6f2; border-color: #9adfd6; }
.eng-status.s-building { color: #8a5c06; background: #fdf1d0; border-color: #f0d58a; }
.eng-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.eng-meta span { padding: 6px 11px; color: #3d6658; border: 1px solid #d7e3dd; background: #f7faf8; font-size: 11px; }
.eng-highlights { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e3eae6; }
.eng-highlights small { color: #79a818; font: 600 10px var(--display); letter-spacing: 1.2px; }
.eng-highlights p { margin: 8px 0 0; color: #5c6f67; font-size: 13px; line-height: 1.8; }

/* AI assistant */
.ai-launcher { width: 58px; height: 58px; position: fixed; z-index: 210; left: 20px; bottom: 28px; display: grid; place-items: center; color: #10241c; border: 1px solid rgba(255,255,255,.65); background: var(--acid); box-shadow: 0 14px 34px rgba(9,40,29,.3); cursor: pointer; }
.ai-launcher svg { width: 22px; height: 22px; }
.ai-launcher b { position: absolute; right: 5px; bottom: 3px; font: 700 8px var(--display); }
.ai-launcher-pulse { position: absolute; inset: -5px; border: 1px solid rgba(184,242,56,.45); animation: ai-pulse 2.4s ease-out infinite; pointer-events: none; }
@keyframes ai-pulse { 0% { opacity: .8; transform: scale(.88); } 75%,100% { opacity: 0; transform: scale(1.22); } }
.ai-panel { width: min(390px,calc(100vw - 30px)); height: min(620px,calc(100vh - 40px)); position: fixed; z-index: 220; left: 88px; bottom: 24px; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; overflow: hidden; color: #183128; border: 1px solid #b7c9c1; background: #f5f8f6; box-shadow: 0 28px 70px rgba(5,25,17,.34); opacity: 0; transform: translateX(-18px) scale(.97); transform-origin: left bottom; pointer-events: none; transition: opacity .25s,transform .25s; }
.ai-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.ai-quick { padding: 10px 13px; border-bottom: 1px solid #d4dfda; background: #edf3f0; }
#aiQuickToggle { width: 100%; padding: 7px 12px; display: flex; align-items: center; gap: 8px; color: #285d4a; border: 1px dashed #c5d3cd; background: #fff; font-size: 11px; font-weight: 700; transition: .2s; }
#aiQuickToggle:hover, #aiQuickToggle.open { color: #10241c; border-color: var(--acid); background: rgba(184,242,56,.15); }
#aiQuickToggle > svg { width: 15px; }
#aiQuickToggle .ai-quick-arrow { width: 14px; margin-left: auto; transition: transform .2s; }
#aiQuickToggle.open .ai-quick-arrow { transform: rotate(180deg); }
.ai-quick-menu { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-quick-menu button { padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; color: #285d4a; border: 1px solid #c5d3cd; background: #fff; font-size: 10px; transition: .2s; }
.ai-quick-menu button:hover { color: #10241c; border-color: var(--acid); background: var(--acid); transform: translateY(-1px); }
.ai-quick-menu button svg { width: 12px; }
.ai-suggest { align-self: flex-start; margin-top: -6px; }
.ai-suggest button { padding: 6px 11px; display: inline-flex; align-items: center; gap: 6px; color: #0a6d63; border: 1px dashed #9adfd6; background: #dcf6f2; font-size: 10px; transition: .2s; }
.ai-suggest button:hover { color: #10241c; border-color: var(--acid); background: var(--acid); transform: translateY(-1px); }
.ai-suggest button svg { width: 12px; }
.ai-panel-head { min-height: 76px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: #0c2a1f; }
.ai-panel-head > div { display: flex; align-items: center; gap: 11px; }
.ai-avatar { width: 42px; height: 42px; display: grid; place-items: center; color: #10241c; background: var(--acid); }
.ai-avatar svg { width: 21px; }
.ai-panel-head small { color: #86a398; font: 600 8px var(--display); letter-spacing: 1px; }
.ai-panel-head h2 { margin: 3px 0 0; font-size: 17px; }
.ai-panel-head .icon-btn { color: #91a69e; border-color: #39564a; }
.ai-messages { min-height: 0; padding: 17px 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.ai-message { max-width: 86%; padding: 10px 12px; line-height: 1.65; white-space: pre-wrap; font-size: 12px; }
.ai-message.assistant { align-self: flex-start; color: #29463b; border: 1px solid #d4dfda; background: #fff; }
.ai-message.user { align-self: flex-end; color: #fff; background: #1b5c46; }
.ai-message .md-h { margin: 8px 0 5px; color: #79a818; font-size: 14px; font-weight: 800; line-height: 1.5; }
.ai-message .md-h:first-child { margin-top: 0; }
.ai-message h1.md-h { font-size: 15px; }
.ai-message h2.md-h { font-size: 14px; }
.ai-message .md-p { margin: 4px 0; }
.ai-message .md-list { margin: 4px 0; padding-left: 18px; }
.ai-message .md-list li { margin: 3px 0; }
.ai-message .md-list li::marker { color: #79a818; }
.ai-message b { color: #1b5c46; font-weight: 800; }
.ai-message code { padding: 1px 5px; color: #0a6d63; background: #e6f0eb; border-radius: 3px; font-size: 11px; }
.ai-message del { color: #94a39d; }
.ai-message.loading { color: #6f867d; }
.ai-message.loading::after { content: ""; width: 20px; height: 5px; margin-left: 7px; display: inline-block; background: radial-gradient(circle,var(--acid) 2px,transparent 3px) 0 50%/7px 7px repeat-x; animation: ai-dots 1s linear infinite; }
@keyframes ai-dots { to { background-position: 7px 50%; } }
.ai-chat-form { padding: 12px; display: grid; grid-template-columns: 1fr 42px; align-items: end; gap: 8px; border-top: 1px solid #d1ddd7; background: #fff; }
.ai-chat-form textarea { min-height: 46px; max-height: 110px; padding: 10px 11px; resize: none; color: #173128; outline: 0; border: 1px solid #cbd8d2; background: #f7faf8; font: inherit; line-height: 1.5; }
.ai-chat-form textarea:focus { border-color: #4c836e; }
.ai-chat-form button { width: 42px; height: 42px; display: grid; place-items: center; color: #10241c; border: 0; background: var(--acid); }
.ai-chat-form button:disabled { opacity: .45; }
.ai-chat-form svg { width: 18px; }

/* Editor multi-image */
.asset-field { padding-top: 4px; }
.asset-grid { margin-bottom: 9px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.asset-preview { aspect-ratio: 4/3; position: relative; margin: 0; overflow: hidden; background: #dfe8e3; }
.asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.asset-preview button { width: 28px; height: 28px; position: absolute; top: 5px; right: 5px; display: grid; place-items: center; color: #fff; border: 0; background: rgba(5,20,14,.78); }
.asset-preview button svg { width: 14px; }
.asset-upload { min-height: 82px; position: relative; display: grid; place-items: center; align-content: center; color: #597268; text-align: center; border: 1px dashed #9aafa6; background: #eaf0ed; cursor: pointer; }
.asset-upload > svg { width: 22px; margin-bottom: 3px; }
.asset-upload span, .asset-upload small { display: block; }
.asset-upload span { font-weight: 700; }
.asset-upload small { margin-top: 3px; color: #899a93; font-size: 9px; }
.asset-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* PDF export */
#pdfResume { width: 794px; padding: 48px 56px; color: #10241c; background: #fff; font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif; position: absolute; left: -9999px; top: 0; z-index: -1; }
#pdfResume .pdf-head { padding-bottom: 22px; border-bottom: 3px solid #79a818; }
#pdfResume .pdf-head h1 { margin: 0 0 8px; font-size: 34px; }
#pdfResume .pdf-sub { margin: 0; color: #0a6d63; font-size: 12px; letter-spacing: 1px; }
#pdfResume .pdf-contact { margin: 12px 0 0; color: #5c6f67; font-size: 11px; }
#pdfResume .pdf-section { margin-top: 24px; }
#pdfResume .pdf-section h2 { margin: 0 0 10px; padding-left: 10px; color: #10241c; border-left: 4px solid #79a818; font-size: 16px; }
#pdfResume .pdf-section > div { color: #3d4f47; font-size: 12px; line-height: 1.9; }
#pdfResume .pdf-section b { color: #10241c; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .site-header nav { height: auto; position: absolute; top: 76px; left: 0; right: 0; padding: 10px; display: none; background: #0a1c15; }
  .site-header nav.open { display: grid; }
  .site-header nav a { min-height: 45px; }
  .mobile-menu { display: grid; }
  .home-hero { grid-template-columns: 1fr; align-content: center; }
  .hero-side { padding: 0 8vw 80px; flex-direction: row; justify-content: space-between; align-items: center; }
  .avatar-wrap { width: 180px; }
  .hero-metrics { max-width: 420px; }
  .manifesto { grid-template-columns: 100px 1fr; }
  .manifesto-copy { grid-column: 2; }
  .skills-grid, .awards-grid { grid-template-columns: repeat(2, 1fr); }
  .intellectual-grid { grid-template-columns: 1fr; }
  .highlights-grid, .engineering-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .site-header { height: 66px; padding: 0 18px; }
  .site-header nav { height: auto; position: absolute; top: 66px; left: 0; right: 0; padding: 10px; display: none; background: #0a1c15; }
  .site-header nav.open { display: grid; }
  .site-header nav a { min-height: 45px; }
  .mobile-menu { display: grid; }
  .header-tools { margin-left: auto; }
  .site-header .brand b { font-size: 14px; }
  .site-header .brand-mark { width: 36px; height: 36px; }
  .home-hero { min-height: 700px; }
  .home-hero h2 { font-size: clamp(44px,13vw,72px); }
  .hero-content { padding: 100px 7vw 40px; }
  .hero-side { flex-direction: column; gap: 22px; padding-bottom: 110px; }
  .avatar-wrap { width: min(220px, 60vw); }
  .hero-metrics { width: 100%; max-width: none; }
  .section-pad { padding: 70px 20px; }
  .manifesto { grid-template-columns: 1fr; gap: 10px; }
  .manifesto-copy { grid-column: auto; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 36px; }
  .skills-grid, .awards-grid, .projects-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 24px; }
  .research-row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .research-row h3 { grid-column: 1 / 3; grid-row: 2; }
  .research-row p { grid-column: 1 / 3; }
  .research-tags { grid-column: 1 / 3; }
  .hero-actions { flex-wrap: wrap; gap: 16px 28px; }
  .ai-launcher { left: 14px; bottom: 16px; }
  .ai-panel { width: auto; height: calc(100dvh - 20px); inset: 10px; }
  .lightbox-panel { padding: 14px; }
  .asset-grid { grid-template-columns: repeat(2,1fr); }
  .footer-main { grid-template-columns: 1fr; gap: 30px; }
  .footer-main h2 { margin: 24px 0; }
  .footer-bottom { gap: 15px; align-items: flex-start; flex-direction: column; }
  .login-panel { padding: 35px 24px 28px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { width: 245px; position: fixed; z-index: 80; left: -255px; transition: .3s; box-shadow: var(--shadow); }
  .admin-sidebar.open { left: 0; }
  .admin-header { height: 76px; padding: 0 16px; }
  #adminMenu { display: grid; }
  .admin-header .secondary-btn { padding: 0 12px; font-size: 0; }
  .admin-header .secondary-btn svg { margin: 0; }
  .admin-content { padding: 20px 14px 40px; }
  .admin-welcome { padding: 25px; }
  .welcome-icon { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .manage-toolbar { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .list-card { grid-template-columns: 40px 1fr; }
  .list-card > .action-buttons { grid-column: 2; justify-content: flex-end; }
  .editor-fields { grid-template-columns: 1fr; padding: 20px; }
  .dynamic-item { grid-template-columns: 1fr; }
}
