
:root{
  --bg: #f4f7ff;
  --bg-soft: #eef4ff;
  --surface: rgba(255,255,255,.78);
  --surface-strong: rgba(255,255,255,.96);
  --surface-soft: rgba(255,255,255,.56);
  --text: #0f172a;
  --muted: #52607a;
  --border: rgba(148,163,184,.22);
  --border-strong: rgba(37,99,235,.2);
  --primary: #2563eb;
  --secondary: #7c3aed;
  --accent: #06b6d4;
  --success: #059669;
  --danger: #e11d48;
  --warning: #f59e0b;
  --shadow: 0 20px 50px rgba(15,23,42,.09);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1180px;
  --header-h: 72px;
  --grid: rgba(148,163,184,.13);
  --code-bg: rgba(15,23,42,.85);
  --theme-color: #f4f7ff;
}

:root[data-theme="dark"]{
  --bg: #07111f;
  --bg-soft: #0d1830;
  --surface: rgba(10,18,35,.76);
  --surface-strong: rgba(10,18,35,.94);
  --surface-soft: rgba(18,29,53,.72);
  --text: #edf3ff;
  --muted: #9fb1cc;
  --border: rgba(148,163,184,.18);
  --border-strong: rgba(59,130,246,.34);
  --primary: #60a5fa;
  --secondary: #a78bfa;
  --accent: #22d3ee;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 24px 54px rgba(2,6,23,.42);
  --grid: rgba(148,163,184,.09);
  --code-bg: rgba(2,6,23,.86);
  --theme-color: #07111f;
}

*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(circle at 10% -12%, rgba(96,165,250,.18), transparent 30%),
    radial-gradient(circle at 88% -20%, rgba(167,139,250,.16), transparent 32%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  font-family:"Inter","Segoe UI","PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  line-height:1.7;
  min-height:100vh;
  position:relative;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size:32px 32px;
  opacity:.55;
  mask-image:radial-gradient(circle at center, rgba(0,0,0,.92), transparent 92%);
}

body::after{
  content:"";
  position:fixed;
  inset:-20%;
  pointer-events:none;
  background:
    radial-gradient(circle at var(--pointer-x, 50%) var(--pointer-y, 0%), rgba(37,99,235,.16), transparent 17%),
    radial-gradient(circle at 15% 20%, rgba(6,182,212,.10), transparent 18%);
  transition:background .18s linear;
}

img,
svg,
iframe,
video{
  max-width:100%;
  height:auto;
}

a{
  color:inherit;
}

button,
input,
select,
textarea{
  font:inherit;
}

:focus-visible{
  outline:3px solid rgba(37,99,235,.28);
  outline-offset:3px;
}

.skip-link{
  position:absolute;
  left:-999px;
  top:0;
  z-index:999;
  padding:12px 16px;
  border-radius:12px;
  background:var(--surface-strong);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
}

.skip-link:focus{
  left:16px;
  top:16px;
}

.site-header{
  position:sticky;
  top:0;
  z-index:120;
  backdrop-filter:blur(16px);
  background:rgba(248,250,255,.72);
  border-bottom:1px solid rgba(148,163,184,.18);
}

:root[data-theme="dark"] .site-header{
  background:rgba(7,17,31,.78);
}

.header-shell{
  max-width:var(--max-width);
  margin:0 auto;
  min-height:var(--header-h);
  padding:0 20px;
  display:grid;
  grid-template-columns:auto 1fr auto auto;
  gap:16px;
  align-items:center;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:var(--text);
  min-width:0;
}

.brand-mark{
  width:42px;
  height:42px;
  border-radius:16px;
  background:
    linear-gradient(135deg, rgba(37,99,235,.18), rgba(124,58,237,.18)),
    linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow:0 12px 24px rgba(37,99,235,.18);
  position:relative;
  overflow:hidden;
  flex-shrink:0;
}

.brand-mark::before,
.brand-mark::after{
  content:"";
  position:absolute;
  border-radius:999px;
  background:#fff;
  opacity:.9;
}

.brand-mark::before{
  width:18px;
  height:18px;
  top:12px;
  left:12px;
}

.brand-mark::after{
  width:6px;
  height:6px;
  right:10px;
  bottom:10px;
  box-shadow:
    -11px -8px 0 0 rgba(255,255,255,.9),
    -3px -16px 0 0 rgba(255,255,255,.78);
}

.brand-text{
  min-width:0;
}

.brand-text strong{
  display:block;
  font-size:1rem;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.brand-text span{
  display:block;
  color:var(--muted);
  font-size:.86rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.site-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}

.nav-link{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border-radius:999px;
  text-decoration:none;
  color:var(--muted);
  border:1px solid transparent;
  transition:transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.nav-link:hover{
  color:var(--text);
  background:var(--surface-soft);
  border-color:var(--border);
  transform:translateY(-1px);
}

.nav-link[aria-current="page"]{
  color:var(--primary);
  background:rgba(37,99,235,.10);
  border-color:var(--border-strong);
  font-weight:700;
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.lang-switch{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface);
  box-shadow:var(--shadow);
}

.lang-switch a{
  min-width:44px;
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  text-decoration:none;
  color:var(--muted);
  font-weight:700;
  padding:0 12px;
}

.lang-switch a.active{
  color:#fff;
  background:linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow:0 10px 22px rgba(37,99,235,.24);
}

.icon-btn{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:var(--shadow);
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}

.icon-btn:hover{
  transform:translateY(-1px);
  border-color:var(--border-strong);
}

.menu-toggle{
  display:none;
}

.drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,.46);
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
  z-index:125;
}

.drawer{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  width:min(92vw, 380px);
  transform:translateX(100%);
  transition:transform .28s ease;
  background:var(--surface-strong);
  border-left:1px solid var(--border);
  box-shadow:-30px 0 60px rgba(15,23,42,.18);
  z-index:130;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:18px;
  overflow:auto;
}

body.menu-open{
  overflow:hidden;
}

body.menu-open .drawer{
  transform:none;
}

body.menu-open .drawer-backdrop{
  opacity:1;
  pointer-events:auto;
}

.drawer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.drawer-nav{
  display:grid;
  gap:10px;
}

.drawer-nav a{
  min-height:50px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-decoration:none;
  padding:0 16px;
  border-radius:18px;
  border:1px solid var(--border);
  background:var(--surface);
}

.drawer-nav a[aria-current="page"]{
  border-color:var(--border-strong);
  color:var(--primary);
  font-weight:700;
}

.drawer-group{
  padding-top:4px;
  border-top:1px solid var(--border);
}

.main-shell{
  max-width:var(--max-width);
  margin:0 auto;
  padding:34px 20px 84px;
}

.surface{
  position:relative;
  overflow:hidden;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
  backdrop-filter:blur(16px);
}

.surface::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:
    linear-gradient(135deg, rgba(255,255,255,.32), transparent 38%, transparent 72%, rgba(124,58,237,.08));
}

.surface-inner{
  position:relative;
  z-index:1;
}

.hero{
  display:grid;
  grid-template-columns:1.12fr .88fr;
  gap:24px;
  align-items:stretch;
}

.hero-copy{
  padding:34px;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(37,99,235,.16);
  color:var(--primary);
  font-weight:800;
  letter-spacing:.02em;
  font-size:.88rem;
}

.hero h1,
.page-hero h1{
  font-size:clamp(2.2rem, 4.8vw, 4.3rem);
  line-height:1.04;
  letter-spacing:-.035em;
  margin:18px 0 16px;
}

.gradient-text{
  background:linear-gradient(120deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.lead{
  margin:0;
  color:var(--muted);
  font-size:1.06rem;
  line-height:1.95;
}

.action-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.button{
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:0 18px;
  border-radius:16px;
  text-decoration:none;
  font-weight:800;
  border:1px solid var(--border);
  background:var(--surface-strong);
  color:var(--text);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  cursor:pointer;
}

.button:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 30px rgba(15,23,42,.12);
}

.button.primary{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow:0 16px 30px rgba(37,99,235,.25);
}

.button.ghost{
  background:transparent;
}

.button.subtle{
  background:var(--surface-soft);
}

.button.small{
  min-height:40px;
  padding:0 14px;
  border-radius:12px;
  font-size:.95rem;
}

.quick-stats{
  margin-top:26px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.metric{
  padding:18px;
  border-radius:22px;
  border:1px solid var(--border);
  background:var(--surface-soft);
}

.metric strong{
  display:block;
  font-size:1.65rem;
  line-height:1.1;
  margin-bottom:8px;
}

.metric span{
  display:block;
  color:var(--muted);
  font-size:.94rem;
}

.hero-side{
  padding:28px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.profile-card{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:16px;
  align-items:center;
  padding:18px;
  border-radius:24px;
  border:1px solid var(--border);
  background:var(--surface-soft);
}

.avatar{
  width:112px;
  aspect-ratio:3 / 4;
  border-radius:20px;
  overflow:hidden;
  border:1px solid var(--border);
  background:linear-gradient(135deg, rgba(37,99,235,.14), rgba(124,58,237,.14));
  flex-shrink:0;
}

.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.profile-body h2{
  margin:0 0 6px;
  font-size:1.4rem;
}

.profile-body p{
  margin:0;
  color:var(--muted);
}

.inline-list,
.chip-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.inline-list{
  margin-top:14px;
}

.tag,
.stat-pill,
.anchor-chip{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface-soft);
  color:var(--text);
  font-size:.92rem;
  text-decoration:none;
}

.stat-pill strong{
  color:var(--primary);
}

.meta-card{
  padding:18px;
  border-radius:22px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.20), transparent);
}

.meta-card h3{
  margin:0 0 12px;
  font-size:1rem;
}

.meta-list{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}

.meta-list li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color:var(--muted);
}

.meta-list li strong{
  min-width:84px;
  color:var(--text);
}

.link-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.link-inline{
  color:var(--primary);
  text-decoration:none;
  word-break:break-word;
}

.link-inline:hover{
  text-decoration:underline;
}

.tech-visual{
  position:relative;
  min-height:336px;
  border-radius:26px;
  border:1px solid var(--border);
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(37,99,235,.10), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0));
}

.tech-visual .ring{
  position:absolute;
  border-radius:50%;
  border:1px dashed rgba(37,99,235,.24);
}

.tech-visual .ring.r1{
  inset:44px;
}

.tech-visual .ring.r2{
  inset:82px;
}

.tech-visual .ring.r3{
  inset:122px;
}

.core-node{
  position:absolute;
  inset:50%;
  width:164px;
  height:164px;
  margin:-82px 0 0 -82px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border-radius:50%;
  background:linear-gradient(135deg, rgba(37,99,235,.16), rgba(124,58,237,.16));
  border:1px solid rgba(37,99,235,.24);
  box-shadow:0 24px 40px rgba(37,99,235,.18);
  font-weight:800;
  padding:24px;
}

.visual-node{
  position:absolute;
  min-width:122px;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
  font-weight:700;
  animation:float 7s ease-in-out infinite;
}

.visual-node:nth-child(5){ animation-delay:-1s; }
.visual-node:nth-child(6){ animation-delay:-2s; }
.visual-node:nth-child(7){ animation-delay:-3s; }
.visual-node:nth-child(8){ animation-delay:-4s; }
.visual-node:nth-child(9){ animation-delay:-5s; }
.visual-node:nth-child(10){ animation-delay:-2.5s; }

.visual-node.n1{ top:20px; left:50%; transform:translateX(-50%); }
.visual-node.n2{ top:82px; right:28px; }
.visual-node.n3{ bottom:80px; right:38px; }
.visual-node.n4{ bottom:18px; left:50%; transform:translateX(-50%); }
.visual-node.n5{ bottom:78px; left:28px; }
.visual-node.n6{ top:86px; left:28px; }

.section-block{
  margin-top:30px;
}

.section-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.section-title-wrap h2{
  margin:8px 0 0;
  font-size:clamp(1.55rem, 2.9vw, 2.35rem);
  line-height:1.15;
}

.section-title-wrap p,
.section-side-note{
  margin:10px 0 0;
  color:var(--muted);
  max-width:760px;
}

.kicker{
  display:inline-block;
  color:var(--primary);
  letter-spacing:.12em;
  font-size:.82rem;
  font-weight:800;
  text-transform:uppercase;
}

.grid-2,
.grid-3,
.grid-4{
  display:grid;
  gap:18px;
}

.grid-2{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.grid-3{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.grid-4{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.panel{
  position:relative;
  overflow:hidden;
  padding:24px;
  border-radius:26px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.panel h3{
  margin:0 0 12px;
  font-size:1.06rem;
}

.panel p{
  margin:0;
  color:var(--muted);
}

.panel ul{
  margin:0;
  padding-left:1.2rem;
}

.panel li{
  margin:0 0 .7rem;
}

.card-link{
  display:block;
  text-decoration:none;
  color:inherit;
  transition:transform .18s ease, box-shadow .18s ease;
}

.card-link:hover{
  transform:translateY(-3px);
}

.feature-icon{
  width:48px;
  height:48px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:1.08rem;
  margin-bottom:14px;
  background:linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.12));
  color:var(--primary);
  border:1px solid rgba(37,99,235,.18);
}

.flow{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:14px;
}

.flow-step{
  position:relative;
  padding:20px;
  border-radius:22px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.flow-step::after{
  content:"→";
  position:absolute;
  right:-11px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  font-weight:800;
}

.flow-step:last-child::after{
  display:none;
}

.flow-step h3{
  margin:0 0 10px;
  font-size:1rem;
}

.flow-step p{
  margin:0;
  color:var(--muted);
  font-size:.95rem;
}

.code-surface{
  background:var(--code-bg);
  color:#e2e8f0;
  border-radius:24px;
  border:1px solid rgba(96,165,250,.18);
  padding:24px;
  box-shadow:var(--shadow);
  overflow:auto;
}

.code-surface pre{
  margin:0;
  white-space:pre-wrap;
  font-family:"JetBrains Mono","SFMono-Regular","Consolas","Liberation Mono",monospace;
  font-size:.95rem;
  line-height:1.8;
}

.page-hero{
  padding:30px 32px;
  margin-bottom:22px;
}

.page-hero .lead{
  max-width:820px;
}

.anchor-bar{
  position:sticky;
  top:88px;
  z-index:60;
  margin-bottom:18px;
  padding:10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
  overflow:auto hidden;
}

.anchor-scroll{
  display:flex;
  gap:10px;
  min-width:max-content;
}

.anchor-chip{
  white-space:nowrap;
}

.anchor-chip:hover{
  border-color:var(--border-strong);
  color:var(--primary);
}

.timeline-stage{
  position:relative;
  padding-left:30px;
  margin-top:24px;
}

.timeline-stage::before{
  content:"";
  position:absolute;
  left:9px;
  top:0;
  bottom:-24px;
  width:2px;
  background:linear-gradient(180deg, rgba(37,99,235,.38), rgba(124,58,237,.18));
}

.timeline-stage::after{
  content:"";
  position:absolute;
  left:1px;
  top:12px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow:0 0 0 5px rgba(37,99,235,.10);
}

.timeline-stage:last-child::before{
  bottom:40px;
}

.stage-card{
  padding:26px;
  border-radius:28px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.stage-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

.stage-head h2{
  margin:8px 0 0;
  font-size:1.72rem;
}

.stage-meta{
  text-align:right;
  color:var(--muted);
  font-weight:700;
  min-width:140px;
}

.summary-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

.info-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.info-card{
  padding:20px;
  border-radius:22px;
  border:1px solid var(--border);
  background:var(--surface-soft);
}

.info-card h3{
  margin:0 0 12px;
  font-size:1rem;
}

.info-card ul{
  margin:0;
  padding-left:1.2rem;
}

.story-box{
  margin-top:16px;
  padding:22px;
  border-radius:24px;
  border:1px solid rgba(225,29,72,.16);
  background:linear-gradient(135deg, rgba(225,29,72,.08), rgba(124,58,237,.08));
}

.story-box h3{
  margin:0 0 10px;
  color:var(--danger);
}

.story-box p{
  margin:0 0 12px;
  color:var(--text);
}

.story-box p:last-child{
  margin-bottom:0;
}

.resume-layout{
  display:grid;
  grid-template-columns:380px 1fr;
  gap:18px;
}

.resume-sidebar{
  padding:24px;
}

.resume-main{
  padding:24px;
}

.resume-main section + section{
  margin-top:22px;
}

.resume-main h2{
  margin:0 0 10px;
  font-size:1.3rem;
}

.cv-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.preview-frame{
  width:100%;
  min-height:72vh;
  border:none;
  border-radius:24px;
  background:rgba(255,255,255,.94);
}

.pdf-preview{
  aspect-ratio:4 / 3;
  border-radius:22px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.46));
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.project-card{
  display:flex;
  flex-direction:column;
  gap:16px;
  height:100%;
}

.project-card .headline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.project-card .headline h3{
  margin:0;
  font-size:1.2rem;
}

.project-card .headline span{
  color:var(--muted);
  font-weight:700;
  white-space:nowrap;
}

.project-stack{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.project-stack span{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  padding:0 12px;
  border-radius:999px;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(37,99,235,.16);
  color:var(--primary);
  font-weight:700;
  font-size:.9rem;
}

.kv-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.kv-card{
  padding:16px;
  border-radius:20px;
  border:1px solid var(--border);
  background:var(--surface-soft);
}

.kv-card .key{
  color:var(--muted);
  font-size:.88rem;
  margin-bottom:6px;
}

.kv-card .value{
  font-weight:800;
}

.callout{
  padding:18px 20px;
  border-radius:20px;
  border:1px solid rgba(37,99,235,.16);
  background:linear-gradient(135deg, rgba(37,99,235,.08), rgba(6,182,212,.08));
  color:var(--text);
}

.callout p{
  margin:0;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.stats-grid.two{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.stat-card{
  padding:20px;
  border-radius:24px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.stat-label{
  color:var(--muted);
  font-size:.92rem;
  margin-bottom:10px;
}

.stat-value{
  font-size:2rem;
  font-weight:800;
  line-height:1.1;
  margin-bottom:8px;
}

.stat-tip{
  color:var(--muted);
  font-size:.9rem;
}

.status-note{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface-soft);
  color:var(--muted);
  margin-bottom:14px;
}

.status-note[data-state="ok"]{
  color:var(--success);
  border-color:rgba(5,150,105,.22);
  background:rgba(5,150,105,.08);
}

.status-note[data-state="warn"]{
  color:var(--warning);
  border-color:rgba(245,158,11,.24);
  background:rgba(245,158,11,.10);
}

.hidden-counter{
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
}

.note-list{
  margin:0;
  padding-left:1.1rem;
}

.note-list li{
  margin:0 0 .7rem;
}

.footer-shell{
  max-width:var(--max-width);
  margin:0 auto 28px;
  padding:0 20px;
}

.footer-card{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:22px 24px;
  border-radius:26px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.footer-card p{
  margin:0;
  color:var(--muted);
}

.footer-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.back-to-top{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:140;
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .2s ease, transform .2s ease;
}

.back-to-top.show{
  opacity:1;
  pointer-events:auto;
  transform:none;
}

.page-split{
  display:grid;
  grid-template-columns:1fr auto;
  gap:14px;
  align-items:start;
}

.notice-board{
  display:grid;
  gap:14px;
}

.notice{
  padding:16px 18px;
  border-radius:20px;
  border:1px solid var(--border);
  background:var(--surface-soft);
}

.notice strong{
  display:block;
  margin-bottom:6px;
}

[data-reveal]{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .55s ease, transform .55s ease;
}

[data-reveal].is-visible{
  opacity:1;
  transform:none;
}

.visually-hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

@keyframes float{
  0%,100%{ transform:translateY(0) }
  50%{ transform:translateY(-8px) }
}

@media (max-width: 1100px){
  .hero{
    grid-template-columns:1fr;
  }
  .grid-4{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .flow{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
  .flow-step:nth-child(3)::after{
    display:none;
  }
  .resume-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 920px){
  .header-shell{
    grid-template-columns:auto 1fr auto auto;
  }
  .site-nav{
    display:none;
  }
  .menu-toggle{
    display:inline-flex;
  }
  .grid-3,
  .grid-2,
  .info-grid,
  .cv-grid,
  .stats-grid,
  .stats-grid.two,
  .kv-grid{
    grid-template-columns:1fr;
  }
  .grid-4{
    grid-template-columns:1fr 1fr;
  }
  .quick-stats{
    grid-template-columns:1fr 1fr;
  }
  .flow{
    grid-template-columns:1fr 1fr;
  }
  .flow-step:nth-child(2)::after,
  .flow-step:nth-child(4)::after{
    display:none;
  }
}

@media (max-width: 680px){
  body::before,
  body::after{
    display:none;
  }
  .header-shell,
  .main-shell,
  .footer-shell{
    padding-left:14px;
    padding-right:14px;
  }
  .header-shell{
    gap:10px;
  }
  .hero-copy,
  .page-hero,
  .hero-side,
  .stage-card,
  .panel,
  .resume-sidebar,
  .resume-main{
    padding:22px;
  }
  .profile-card{
    grid-template-columns:1fr;
    text-align:left;
  }
  .quick-stats{
    grid-template-columns:1fr;
  }
  .flow{
    grid-template-columns:1fr;
  }
  .flow-step::after{
    display:none;
  }
  .grid-4{
    grid-template-columns:1fr;
  }
  .footer-card{
    flex-direction:column;
  }
  .page-split{
    grid-template-columns:1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  html{
    scroll-behavior:auto;
  }
  *,
  *::before,
  *::after{
    animation:none !important;
    transition:none !important;
  }
  [data-reveal]{
    opacity:1 !important;
    transform:none !important;
  }
}


.project-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.project-media-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:14px;
}

.media-card{
  margin:0;
  overflow:hidden;
  border-radius:22px;
  border:1px solid var(--border);
  background:var(--surface-soft);
  box-shadow:var(--shadow);
}

.media-card img{
  width:100%;
  aspect-ratio:16 / 9;
  object-fit:cover;
  display:block;
  background:linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.14));
}

.media-card figcaption{
  padding:14px 16px 16px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.media-card figcaption strong{
  font-size:1rem;
}

.media-card figcaption span{
  color:var(--muted);
  font-size:.95rem;
  line-height:1.75;
}


/* added: research-homepage-enhancements */
.hero-stats{
  margin-top:10px;
}

.compact-stat{
  min-height:unset;
  padding:18px 18px 16px;
}

.compact-stat .stat-value{
  font-size:clamp(1.5rem, 2.8vw, 2.15rem);
  line-height:1.2;
  margin-top:8px;
}

.small-value{
  font-size:1rem !important;
  line-height:1.55;
  word-break:break-word;
}

.figure-card{
  overflow:hidden;
}

.figure-card img{
  display:block;
  width:100%;
  border-radius:20px;
  border:1px solid var(--border);
  background:linear-gradient(135deg, rgba(37,99,235,.08), rgba(124,58,237,.10));
  box-shadow:var(--shadow);
}

.figure-caption{
  color:var(--muted);
  font-size:.96rem;
  margin-top:12px;
}

.table-wrap{
  overflow:auto;
  border-radius:24px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.result-table{
  width:100%;
  min-width:920px;
  border-collapse:collapse;
  font-size:.96rem;
  line-height:1.65;
}

.result-table th,
.result-table td{
  padding:16px 16px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
  text-align:left;
}

.result-table thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:linear-gradient(180deg, rgba(37,99,235,.14), rgba(37,99,235,.06));
  color:var(--text);
  font-weight:700;
  white-space:nowrap;
  border-bottom:1px solid var(--border-strong);
}

.result-table tbody tr:last-child td{
  border-bottom:none;
}

.result-table code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background:rgba(37,99,235,.10);
  color:var(--primary);
  padding:2px 6px;
  border-radius:8px;
  font-size:.93em;
}

.proof-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
}

.proof-grid-wide{
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
}

.proof-grid-compact{
  grid-template-columns:repeat(auto-fit, minmax(220px, 280px));
  justify-content:start;
}

.proof-grid-project{
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  margin-top:18px;
}

.proof-item{
  display:block;
  text-decoration:none;
  color:inherit;
  border-radius:22px;
  overflow:hidden;
  border:1px solid var(--border);
  background:var(--surface-soft);
  box-shadow:var(--shadow);
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.proof-item:hover{
  transform:translateY(-2px);
  border-color:var(--border-strong);
  box-shadow:0 18px 48px rgba(15,23,42,.16);
}

.proof-item img{
  display:block;
  width:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  background:linear-gradient(135deg, rgba(37,99,235,.10), rgba(124,58,237,.12));
}

.proof-caption{
  padding:14px 16px 16px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.proof-caption strong{
  font-size:1rem;
  line-height:1.45;
}

.proof-caption span{
  color:var(--muted);
  font-size:.94rem;
  line-height:1.65;
}

.doc-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
  gap:18px;
}

.doc-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  border-radius:24px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
}

.doc-preview{
  width:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  display:block;
  border-radius:18px;
  border:1px solid var(--border);
  background:linear-gradient(135deg, rgba(37,99,235,.10), rgba(124,58,237,.12));
}

.doc-card h3{
  margin:0;
  font-size:1.05rem;
}

.doc-card p{
  margin:0;
  color:var(--muted);
}

.lightbox{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(2,6,23,.82);
  backdrop-filter:blur(10px);
  z-index:240;
}

.lightbox.open{
  display:flex;
}

.lightbox-dialog{
  position:relative;
  max-width:min(1120px, 100%);
  max-height:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.lightbox-image{
  max-width:100%;
  max-height:calc(100vh - 120px);
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:18px;
  box-shadow:0 28px 80px rgba(0,0,0,.45);
  background:#fff;
}

:root[data-theme="dark"] .lightbox-image{
  background:#0b1220;
}

.lightbox-caption{
  color:#e5eefc;
  text-align:center;
  font-size:.96rem;
  line-height:1.65;
  max-width:920px;
  margin:0 auto;
}

.lightbox-close{
  position:absolute;
  top:12px;
  right:12px;
  width:42px;
  height:42px;
  border:none;
  border-radius:999px;
  background:rgba(15,23,42,.78);
  color:#fff;
  cursor:pointer;
  box-shadow:0 10px 30px rgba(2,6,23,.28);
}

body.lightbox-open{
  overflow:hidden;
}

@media (max-width: 900px){
  .proof-grid,
  .proof-grid-wide,
  .proof-grid-project,
  .doc-grid{
    grid-template-columns:1fr 1fr;
  }
  .result-table{
    min-width:780px;
  }
}

@media (max-width: 640px){
  .proof-grid,
  .proof-grid-wide,
  .proof-grid-project,
  .doc-grid{
    grid-template-columns:1fr;
  }
  .compact-stat .stat-value{
    font-size:1.45rem;
  }
  .lightbox{
    padding:12px;
  }
  .lightbox-image{
    max-height:calc(100vh - 96px);
  }
  .lightbox-caption{
    font-size:.92rem;
  }
}


#overview,
#graduate,
#undergraduate,
#highschool,
#junior,
#primary{
  scroll-margin-top:150px;
}

@media (max-width: 680px){
  #overview,
  #graduate,
  #undergraduate,
  #highschool,
  #junior,
  #primary{
    scroll-margin-top:170px;
  }
}