:root{
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-head: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-sub: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --bg:#0b0d10;
  --card:#11151b;
  --text:#e8eef7;
  --muted:#a7b3c6;
  --line:rgba(255,255,255,.10);
  --chip:rgba(255,255,255,.06);
  --shadow: 0 12px 32px rgba(0,0,0,.40);
  --radius:18px;
}

html[data-theme="dark"]{
  --bg:#0b0d10;
  --card:#11151b;
  --text:#e8eef7;
  --muted:#a7b3c6;
  --line:rgba(255,255,255,.10);
  --chip:rgba(255,255,255,.06);
  --shadow: 0 12px 32px rgba(0,0,0,.40);
}

html[data-theme="light"]{
  --bg:#f7f8fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line:rgba(15,23,42,.10);
  --chip:rgba(15,23,42,.06);
  --shadow: 0 12px 28px rgba(2,6,23,.10);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.55 var(--font-body);
  transition: background .15s ease, color .15s ease;
}

.container{
  width:min(1080px, 92vw);
  margin:0 auto;
}

.header{
  padding:28px 0 12px;
  display:flex;
  gap:18px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}

.brand{
  display:flex;
  gap:16px;
  align-items:center;
  min-width:min(560px, 100%);
}

.brand-text{ min-width: 280px; }

.avatar{
  width:118px; height:118px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
  flex: 0 0 auto;
}

h1{
  font-family: var(--font-head);
  font-size:30px;
  margin:0;
  letter-spacing:.2px;
}
.subtitle{
  font-family: var(--font-sub);
  margin:6px 0 0;
  color:var(--muted);
}
.meta-line{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
  display:flex;
  gap:8px;
  align-items:center;
  font-family: var(--font-sub);
}
.dot{ opacity:.75; }

.links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding-top: 2px;
}

.icon-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  text-decoration:none;
  color:var(--text);
  background: rgba(255,255,255,.02);
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
  cursor: pointer;
}
html[data-theme="light"] .icon-link{ background: rgba(15,23,42,.02); }
.icon-link:hover{ transform: translateY(-1px); background: rgba(255,255,255,.04); }
html[data-theme="light"] .icon-link:hover{ background: rgba(15,23,42,.04); }
.icon-link:focus{ outline: 2px solid rgba(255,255,255,.25); outline-offset: 2px; }
html[data-theme="light"] .icon-link:focus{ outline-color: rgba(15,23,42,.20); }

.icon{
  width:18px; height:18px;
  display:inline-flex;
}
.icon svg{
  width:18px; height:18px;
  fill: currentColor;
  opacity:.92;
}

.theme-toggle{
  border-style: dashed;
}
.toggle-text{
  font-family: var(--font-sub);
  font-weight: 500;
}

main{ padding: 10px 0 36px; }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:18px 18px;
  box-shadow: var(--shadow);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.card h2{
  font-family: var(--font-head);
  margin:0 0 10px;
  font-size:18px;
  letter-spacing:.2px;
}

.grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1.35fr .95fr;
  gap:14px;
}
@media (max-width: 920px){
  .grid{ grid-template-columns: 1fr; }
  .brand{ min-width: 100%; }
}

.item{ padding:10px 0; }
.item + .item{ border-top:1px solid var(--line); }
.item-head{
  display:flex;
  gap:10px;
  align-items:baseline;
  justify-content:space-between;
  flex-wrap:wrap;
}
.item h3{
  font-family: var(--font-sub);
  margin:0;
  font-size:16px;
}
.meta{
  color:var(--muted);
  font-size:13px;
  font-family: var(--font-sub);
}
.muted{ color:var(--muted); }

.advisor{
  display:inline-block;
  margin-top: 4px;
}

ul{ margin:10px 0 0 18px; padding:0; }
li{ margin:6px 0; }

.compact{ margin-top: 8px; }
.compact li{ margin: 4px 0; }

.chips{
  margin-top:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.chip{
  padding:6px 10px;
  border-radius:999px;
  background:var(--chip);
  border:1px solid var(--line);
  font-size:13px;
  color:var(--text);
  opacity:.95;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.two-col{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width: 560px){
  .two-col{ grid-template-columns: 1fr; }
}
.small{
  font-family: var(--font-sub);
  font-size:14px;
  margin:0 0 4px;
}

.spaced{ margin-top: 18px !important; }

.projects{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 820px){
  .projects{ grid-template-columns: 1fr; }
}
.project{
  display:block;
  text-decoration:none;
  color:inherit;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
html[data-theme="light"] .project{ background: rgba(15,23,42,.02); }
.project:hover{ transform: translateY(-1px); background: rgba(255,255,255,.04); }
html[data-theme="light"] .project:hover{ background: rgba(15,23,42,.04); }
.project:focus{ outline: 2px solid rgba(255,255,255,.25); outline-offset: 2px; }
html[data-theme="light"] .project:focus{ outline-color: rgba(15,23,42,.20); }

.project-title{
  font-family: var(--font-sub);
  font-weight:700;
  margin-bottom:6px;
}
.tags{ margin-top: 10px; display:flex; flex-wrap: wrap; gap: 6px; }
.tag{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--text);
  opacity: .95;
}

.other-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 820px){
  .other-grid{ grid-template-columns: 1fr; }
}

.footnote{
  margin-top: 12px;
  font-size: 13px;
}

.footer{
  margin-top:14px;
  padding:14px 2px 0;
  text-align:center;
  font-family: var(--font-sub);
}
