:root{
  --bg:#0B0D12;
  --surface:#12151C;
  --surface-2:#171B24;
  --line:#232837;
  --text:#E9EDF3;
  --text-dim:#8A93A6;
  --accent:#5B8CFF;
  --accent-warm:#F0A93A;
  --radius:2px;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'IBM Plex Sans', sans-serif;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--accent); text-decoration:none;}
a:hover{text-decoration:underline;}
a:focus-visible, button:focus-visible{outline:2px solid var(--accent-warm); outline-offset:3px;}

.mono{font-family:'IBM Plex Mono', monospace;}
.eyebrow{
  font-family:'IBM Plex Mono', monospace;
  font-size:12px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--accent);
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}
.eyebrow::before{content:""; width:16px; height:1px; background:var(--accent);}

h1,h2,h3,h4{font-family:'Space Grotesk', sans-serif; font-weight:600; letter-spacing:-0.01em;}

/* ---------- Language switch ---------- */
.lang-switch{
  position:fixed; top:24px; right:24px; z-index:10;
  font-family:'IBM Plex Mono',monospace; font-size:12px;
  border:1px solid var(--line); background:var(--surface);
  padding:8px 12px; border-radius:var(--radius); color:var(--text-dim);
}
.lang-switch a{ color:var(--text-dim); }
.lang-switch a.current{ color:var(--accent); }

/* ---------- Layout shell ---------- */
.rail{
  position:fixed; top:0; left:0; height:100vh; width:34px;
  border-right:1px solid var(--line);
  display:none;
  z-index:5;
}
.rail-track{position:relative; height:100%; margin:32px 0;}
.rail-tick{
  position:absolute; left:0; width:12px; height:1px; background:var(--line);
}
.rail-tick.active{background:var(--accent); width:20px; height:2px;}

.page{ display:flex; min-height:100vh; }

.sidebar{
  width:340px;
  flex-shrink:0;
  padding:56px 40px;
  border-right:1px solid var(--line);
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
}
.sidebar::-webkit-scrollbar{width:0;}

.main{
  flex:1;
  min-width:0;
  padding:56px 64px 120px;
  max-width:880px;
}

/* ---------- Sidebar contents ---------- */
.photo-frame{
  position:relative;
  width:120px; height:120px;
  margin-bottom:24px;
}
.photo-frame img{
  width:100%; height:100%; object-fit:cover;
  filter:grayscale(15%) contrast(1.05);
  border:1px solid var(--line);
  background:var(--surface-2);
}
.photo-frame::before,
.photo-frame::after,
.photo-frame span::before,
.photo-frame span::after{
  content:""; position:absolute; width:12px; height:12px;
  border-color:var(--accent-warm); pointer-events:none;
}
.photo-frame::before{ top:-6px; left:-6px; border-top:2px solid; border-left:2px solid;}
.photo-frame::after{ top:-6px; right:-6px; border-top:2px solid; border-right:2px solid;}
.photo-frame span::before{ bottom:-6px; left:-6px; border-bottom:2px solid; border-left:2px solid;}
.photo-frame span::after{ bottom:-6px; right:-6px; border-bottom:2px solid; border-right:2px solid;}

.name{font-size:24px; line-height:1.2; margin-bottom:6px;}
.role{color:var(--text-dim); font-size:14px; margin-bottom:28px;}

.side-block{margin-bottom:28px;}
.side-block h4{
  font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:0.1em;
  text-transform:uppercase; color:var(--text-dim); margin-bottom:10px; font-weight:500;
}
.side-block ul{list-style:none;}
.side-block li{font-size:14px; margin-bottom:6px; color:var(--text);}
.side-block a{color:var(--text);}
.side-block a:hover{color:var(--accent);}

.tag-row{display:flex; flex-wrap:wrap; gap:6px;}
.tag{
  font-family:'IBM Plex Mono',monospace; font-size:11px;
  border:1px solid var(--line); padding:4px 8px; color:var(--text-dim);
  border-radius:var(--radius);
}

.side-nav{margin-top:32px;}
.side-nav a{
  display:block; font-size:13px; padding:6px 0; color:var(--text-dim);
  border-left:2px solid transparent; padding-left:10px; margin-left:-12px;
}
.side-nav a.active{color:var(--text); border-left-color:var(--accent);}

/* ---------- Hero ---------- */
.hero{ padding-top:8px; margin-bottom:72px; position:relative; overflow:hidden;}
.hero-beam{
  position:absolute; top:44px; left:0; width:100%; height:1px;
  background:linear-gradient(90deg, transparent, var(--accent), transparent);
  transform:scaleX(0); transform-origin:left; opacity:0.8;
  animation:sweep 1.4s ease-out 0.2s forwards;
}
@keyframes sweep{ to { transform:scaleX(1); } }
.hero h1{ font-size:38px; line-height:1.15; max-width:620px; margin-bottom:22px;}
.hero p.lede{ color:var(--text-dim); font-size:16px; max-width:560px; }

/* ---------- Sections ---------- */
section{ margin-bottom:76px; scroll-margin-top:40px;}
section h2{font-size:22px; margin-bottom:24px;}

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px 30px;
}
.role-block + .role-block{ margin-top:28px; }
.role-head{ display:flex; justify-content:space-between; align-items:baseline; gap:16px; flex-wrap:wrap; margin-bottom:4px;}
.role-head .period{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--accent); white-space:nowrap;}
.role-head h3{font-size:17px;}
.role-org{color:var(--text-dim); font-size:14px; margin-bottom:14px;}
.role-block ul{ padding-left:18px; }
.role-block li{ margin-bottom:8px; font-size:15px; }
.role-block li::marker{ color:var(--accent-warm); }

.skill-grid{ display:grid; grid-template-columns:1fr 1fr; gap:28px; }
.skill-grid h4{
  font-family:'IBM Plex Mono',monospace; font-size:12px; letter-spacing:0.08em;
  text-transform:uppercase; color:var(--text-dim); margin-bottom:14px;
}
.skill-grid .tag-row{ gap:8px; }
.skill-grid .tag{ font-size:12px; padding:6px 10px; }

.timeline{ position:relative; padding-left:28px; border-left:1px solid var(--line);}
.tl-item{ position:relative; margin-bottom:40px;}
.tl-item:last-child{ margin-bottom:0; }
.tl-item::before{
  content:""; position:absolute; left:-33px; top:4px;
  width:9px; height:9px; border-radius:50%;
  background:var(--bg); border:2px solid var(--accent);
}
.tl-period{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--accent); margin-bottom:6px; display:block;}
.tl-item h3{ font-size:16px; margin-bottom:2px;}
.tl-org{ color:var(--text-dim); font-size:14px; margin-bottom:4px;}
.tl-focus{ font-size:13px; color:var(--text-dim); margin-bottom:10px; font-style:italic;}
.tl-item ul{ padding-left:18px; }
.tl-item li{ font-size:14.5px; margin-bottom:6px; }
.tl-item li::marker{ color:var(--accent-warm); }

.talk{ border-bottom:1px solid var(--line); padding:20px 0; }
.talk:first-child{ padding-top:0; }
.talk:last-child{ border-bottom:none; padding-bottom:0; }
.talk-meta{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:6px;}
.talk-date{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--accent); }
.talk-place{ font-size:14px; font-weight:500; }
.talk-title{ font-size:14.5px; color:var(--text-dim); font-style:italic; }

.pub{ font-size:14.5px; color:var(--text-dim); line-height:1.7; }
.pub .authors{ color:var(--text); }

footer{
  border-top:1px solid var(--line);
  padding-top:32px;
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:16px;
  color:var(--text-dim); font-size:13px;
}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:'IBM Plex Mono',monospace; font-size:13px;
  border:1px solid var(--accent); color:var(--accent);
  padding:10px 18px; border-radius:var(--radius);
  text-decoration:none;
}
.btn:hover{ background:var(--accent); color:var(--bg); text-decoration:none; }

@media (min-width:900px){ .rail{display:block;} }
@media (max-width:900px){
  .page{ flex-direction:column; }
  .sidebar{ position:relative; height:auto; width:100%; border-right:none; border-bottom:1px solid var(--line); }
  .main{ padding:40px 24px 100px; max-width:none; }
  .skill-grid{ grid-template-columns:1fr; }
  .lang-switch{ top:16px; right:16px; }
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .hero-beam{ animation:none; transform:scaleX(1); }
}
