/* Minimal, refined Miniport-style for academic page */
:root{
  --bg:#ffffff;
  --text:#0a0a0a;
  --muted:#555;
  --accent:#111;
  --accent-ghost:#f2f2f2;
  --border:#eaeaea;
  --maxw:900px;
}

html{scroll-behavior:smooth}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji','Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.container{max-width:var(--maxw); margin:0 auto; padding:0 1.2rem}
.narrow{max-width:760px}

.site-header{
  position:sticky; top:0; z-index:10;
  background:#fff; border-bottom:1px solid var(--border);
}
.site-header nav{
  display:flex; align-items:center; justify-content:center;
  height:64px;
}
.brand{font-weight:700; color:var(--text); text-decoration:none}
.nav-links{display:flex; gap:1rem; list-style:none; margin:0; padding:0}
.nav-links a{color:var(--text); text-decoration:none; padding:.25rem .5rem; border-radius:.5rem}
.nav-links a:hover{background:var(--accent-ghost)}
.nav-toggle{display:none; font-size:1.25rem; background:transparent; border:none}

.hero{
  padding:5.5rem 0 3rem;
  text-align:center;
}
h1{font-size:clamp(2rem, 4vw, 3rem); line-height:1.15; margin:.25rem 0}
.subtitle{color:var(--muted); margin:.25rem 0 0}
.tags{color:var(--muted); margin:.4rem 0 1.5rem}
.button{
  display:inline-block; padding:.75rem 1rem; border-radius:.75rem;
  background:var(--accent); color:#fff; text-decoration:none; font-weight:600;
  border:1px solid var(--accent);
}
.button.ghost{
  background:transparent; color:var(--text); border:1px solid var(--border);
}

.section{padding:3.5rem 0; border-top:1px solid var(--border)}
.section.alt{background:#fafafa}
h2{font-size:1.6rem; margin:0 0 1rem}
h3{margin:1rem 0 .5rem; font-size:1.1rem}
p{margin:.6rem 0}
ul{padding-left:1.2rem}
.bullets li{margin:.5rem 0}

.pubs{padding-left:1.2rem}
.pubs li{margin: .9rem 0}
.pub-title{display:block; font-weight:600}
.pub-authors, .pub-venue{display:block; color:var(--muted); font-size:.95rem}
.pub-link{display:inline-block; margin-top:.25rem; font-size:.95rem}

.cv-grid{
  display:grid; gap:1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.cv-actions{margin-top:1rem}

.contact-list{list-style:none; padding:0; margin:0}
.contact-list li{margin:.4rem 0}

.site-footer{border-top:1px solid var(--border); padding:2rem 0; text-align:center; color:var(--muted)}

@media (max-width: 760px){
  .nav-toggle{display:block}
  .nav-links{display:none; position:absolute; top:64px; right:0; background:#fff; padding:.5rem; border:1px solid var(--border); border-right:none; border-top:none; border-radius:0 0 0 .75rem; flex-direction:column}
  .nav-links.show{display:flex}
}

.hero-flex{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2rem;
  margin:1.25rem auto 0;
}

 /* placeholder to keep structure simple */
.intro{max-width:760px; margin:1rem auto 0; color:var(--muted)}
.site-header .brand{display:none}

/* Avatar-left hero layout */
.hero{ text-align:left; }
.hero-flex{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:2rem;
  margin:0 auto;
  max-width: var(--maxw);
}


.hero .subtitle{ color:var(--muted); margin:.25rem 0 0 }
.hero .tags{ color:var(--muted); margin:.4rem 0 1rem }
.intro{ color:var(--muted); margin-top:.5rem }

@media (max-width: 760px){
  .hero-flex{ flex-direction:column; text-align:center }
}


.hero{ text-align:left; }
.hero-flex{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:2rem;
  margin:0 auto;
  max-width: var(--maxw);
}

.hero-text{ display:block; max-width:700px; }
@media (max-width: 760px){
  .hero-flex{ flex-direction:column; text-align:center }
}


/* --- Dark theme support --- */
:root[data-theme="dark"]{
  --bg:#0e0f12;
  --text:#f2f3f5;
  --muted:#b2b7c2;
  --accent:#e6e8eb;
  --accent-ghost:#1a1c21;
  --border:#23252b;
}
.section.alt{ background: #fafafa; }
:root[data-theme="dark"] .section.alt{ background:#121318; }
:root[data-theme="dark"] .site-header{ background: var(--bg); border-bottom-color: var(--border); }
:root[data-theme="dark"] .site-footer{ border-top-color: var(--border); color: var(--muted); }
:root[data-theme="dark"] a{ color: var(--text); }

/* Theme toggle button */
.theme-switch{
  position:absolute;
  right:1rem;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px; height:38px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--text);
  cursor:pointer;
  font-size:18px;
  line-height:1;
}
.theme-switch:hover{ background:var(--accent-ghost); }

@media (max-width: 760px){
  .theme-switch{ right:.75rem; }
}

.hero-avatar{
  width:220px;
  height:220px;
  border-radius:50%;
  object-fit:cover;
  object-position:50% 25%;
  border:2px solid var(--border);
  flex-shrink:0;
}
.hero-left{ display:flex; flex-direction:column; align-items:center; gap:.6rem; }
.hero-icons{ display:flex; gap:.8rem; align-items:center; justify-content:center; flex-wrap:wrap; }
.hero-icons img{ width:30px; height:30px; display:block; }
.hero-icons a{ display:inline-flex; padding:.25rem; border-radius:.5rem; transition:transform .1s ease; }
.hero-icons a:hover{ transform:translateY(-2px); }

@media (max-width: 760px){
  .hero-flex{ flex-direction:column; text-align:center; }
}

.pub-button-wrap{text-align:center; margin-top:1.5rem;}
.pub-button{
  display:inline-block;
  background:linear-gradient(to bottom, #4db2db, #2a93b8);
  color:white;
  font-weight:600;
  padding:.75rem 1.5rem;
  border-radius:.5rem;
  text-decoration:none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 4px rgba(0,0,0,0.2);
}
.pub-button:hover{
  background:linear-gradient(to bottom, #5ec2ea, #2ea2c7);
}


.pubs-cta{ margin-top:1rem; }
.cta-button{
  display:inline-block;
  padding:.85rem 1.2rem;
  border-radius:1rem;
  background: linear-gradient(180deg, #4cb4df 0%, #2a83ad 100%);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  box-shadow: 0 2px 0 rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.35);
  border:1px solid rgba(0,0,0,0.1);
}
.cta-button:hover{ filter:brightness(1.05); transform:translateY(-1px); }
.cta-button:active{ transform:translateY(0); }

/* Center section headings only */
.section h2{ text-align:center; }


/* CV PDF viewer */
.cv-viewer{ margin-top:.5rem; }
.cv-toolbar{ display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; margin-bottom:.6rem; }
.pdf-embed{
  width:100%;
  height:75vh;
  min-height:520px;
  border:1px solid var(--border);
  border-radius:.75rem;
  background:#fff;
}
:root[data-theme="dark"] .pdf-embed{ background:#fff; } /* keep white page behind PDF */
.small-note{ color:var(--muted); margin-top:.4rem; font-size:.95rem; }
@media (max-width: 760px){
  .pdf-embed{ height:65vh; min-height:420px; }
}
