:root{
  --teal:#0F6E5E;
  --teal-dark:#0A4F44;
  --ink:#101418;
  --bg:#ffffff;
  --grey:#5b6470;
  --chip:#EAF5F2;
  --line:#e7e9ec;
}

*{box-sizing:border-box;margin:0;padding:0;}

html{scroll-behavior:smooth;}

body{
  font-family:'Manrope',sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.5;
}

a{color:inherit;}

img{max-width:100%;display:block;}

/* ---------- NAV ---------- */
nav{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  padding:26px 40px;
}

nav ul{
  list-style:none;
  display:flex;
  gap:34px;
}

nav a.nav-link{
  text-decoration:none;
  color:var(--ink);
  font-size:14px;
  font-weight:600;
  padding-bottom:4px;
  border-bottom:2px solid transparent;
}

nav a.nav-link:hover,
nav a.nav-link.active{
  color:var(--teal);
  border-bottom-color:var(--teal);
}

.nav-home{
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:8px;
  color:var(--ink);
  transition:color .15s ease, background .15s ease;
}

.nav-home svg{display:block;}

.nav-home:hover,
.nav-home.active{
  color:var(--teal);
  background:var(--chip);
}

/* ---------- HERO (home page) ---------- */
.hero{
  background:linear-gradient(180deg,var(--chip) 0%,#ffffff 100%);
}

.hero-inner{
  max-width:1200px;
  margin:0 auto;
  padding:40px 40px 60px;
  display:grid;
  grid-template-columns:1.1fr 0.9fr;
  gap:40px;
  align-items:end;
}

.hero-text h1{
  font-size:50px;
  font-weight:800;
  line-height:1.05;
  margin-bottom:20px;
  letter-spacing:-1px;
}

.hero-text h1 .accent{color:var(--teal);}

.affiliation{
  border-left:4px solid var(--teal);
  background:var(--chip);
  border-radius:0 10px 10px 0;
  padding:16px 22px;
  margin-bottom:26px;
}

.affiliation .role{
  font-size:19px;
  font-weight:800;
  color:var(--teal-dark);
  margin-bottom:6px;
}

.affiliation .dept,
.affiliation .college{
  font-size:14.5px;
  font-weight:600;
  color:#2a2f35;
  line-height:1.5;
}

.affiliation .loc{
  font-size:13px;
  color:var(--grey);
  margin-top:6px;
}

.hero-text p{
  font-size:15.5px;
  line-height:1.7;
  color:#3a3f46;
  max-width:520px;
  margin-bottom:28px;
}

.cta-row{
  display:flex;
  gap:14px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.btn{
  padding:15px 26px;
  font-size:14px;
  font-weight:700;
  text-decoration:none;
  border-radius:8px;
  display:inline-block;
  border:2px solid transparent;
  cursor:pointer;
}

.btn-primary{background:var(--teal);color:#fff;}
.btn-primary:hover{background:var(--teal-dark);}

.btn-outline{border:2px solid var(--ink);color:var(--ink);background:transparent;}
.btn-outline:hover{background:var(--ink);color:#fff;}

.hero-photo{position:relative;}

.hero-photo::before{
  content:"";
  position:absolute;
  inset:14px -14px -14px 14px;
  background:var(--teal);
  border-radius:16px;
  z-index:0;
}

.hero-photo img{
  position:relative;
  z-index:1;
  width:100%;
  border-radius:16px;
}

/* ---------- CV SECTION ---------- */
.cv-section{
  max-width:1200px;
  margin:0 auto;
  padding:20px 40px 80px;
}

.cv-section .section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
  margin-bottom:20px;
}

.cv-section h3{
  font-size:22px;
  font-weight:800;
}

.cv-embed{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#f7f8f9;
  box-shadow:0 10px 30px rgba(16,20,24,0.06);
}

.cv-embed iframe{
  width:100%;
  height:900px;
  border:none;
  display:block;
}

.cv-fallback{
  padding:40px;
  text-align:center;
  color:var(--grey);
  font-size:14px;
}

/* ---------- GENERIC PAGE HEADER ---------- */
.page-header{
  max-width:1200px;
  margin:0 auto;
  padding:30px 40px 10px;
}

.page-header h1{
  font-size:38px;
  font-weight:800;
  letter-spacing:-0.5px;
  margin-bottom:10px;
}

.page-header p{
  color:var(--grey);
  font-size:15.5px;
  max-width:640px;
  line-height:1.7;
}

/* ---------- PACKAGE PAGE ---------- */
.pkg-hero{
  background:linear-gradient(180deg,var(--chip) 0%,#ffffff 100%);
  padding-bottom:20px;
}

.pkg-hero-inner{
  max-width:1200px;
  margin:0 auto;
  padding:30px 40px 20px;
}

.eyebrow{
  display:block;
  color:var(--teal);
  text-transform:uppercase;
  letter-spacing:2px;
  font-size:12.5px;
  font-weight:800;
  margin-bottom:16px;
}

.pkg-hero h1{
  font-size:44px;
  font-weight:800;
  letter-spacing:-0.5px;
  line-height:1.12;
  margin-bottom:10px;
}

.pkg-hero h2{
  font-size:17px;
  font-weight:600;
  color:var(--grey);
  margin-bottom:24px;
}

.pkg-hero h2 code{
  background:var(--chip);
  color:var(--teal-dark);
  font-family:'SFMono-Regular',Consolas,monospace;
  padding:2px 8px;
  border-radius:6px;
  font-size:15px;
}

.pkg-badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:26px;
}

.pkg-badge{
  background:#fff;
  border:1px solid var(--line);
  color:var(--ink);
  font-size:12.5px;
  font-weight:700;
  padding:8px 16px;
  border-radius:20px;
}

.pkg-badge strong{color:var(--teal-dark);}

.narrative{
  max-width:1200px;
  margin:0 auto;
  padding:10px 40px 10px;
}

.narrative p{
  font-size:15.5px;
  line-height:1.8;
  color:#333;
  max-width:780px;
  margin-bottom:18px;
}

.func-section{
  max-width:1200px;
  margin:0 auto;
  padding:30px 40px 90px;
}

.func-section h3{
  font-size:22px;
  font-weight:800;
  margin-bottom:20px;
}

.func-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}

.func-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:22px 24px;
}

.func-card code{
  background:var(--chip);
  color:var(--teal-dark);
  font-family:'SFMono-Regular',Consolas,monospace;
  font-size:14px;
  font-weight:700;
  padding:4px 10px;
  border-radius:6px;
}

.func-card p{
  font-size:14px;
  color:#3a3f46;
  line-height:1.65;
  margin-top:12px;
}

/* ---------- RESEARCH PAGE ---------- */
.pub-list{
  max-width:1200px;
  margin:0 auto;
  padding:20px 40px 80px;
}

.pub-list h2.group-title{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:1.5px;
  color:var(--teal);
  font-weight:800;
  margin:40px 0 18px;
}

.pub-list h2.group-title:first-child{margin-top:0;}

.pub-card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:26px 28px;
  margin-bottom:18px;
  transition:box-shadow .15s ease, transform .15s ease;
}

.pub-card:hover{
  box-shadow:0 10px 24px rgba(16,20,24,0.08);
  transform:translateY(-2px);
}

.pub-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

.pub-card .pub-link{
  display:block;
  flex:1;
  min-width:0;
  text-decoration:none;
  color:inherit;
  cursor:pointer;
}

.pub-card .pub-title{
  font-size:17.5px;
  font-weight:700;
  margin-bottom:6px;
}

.pub-card .pub-meta{
  font-size:13.5px;
  color:var(--teal);
  font-weight:600;
}

.pub-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  flex-shrink:0;
  margin-top:2px;
  background:var(--chip);
  border:1px solid var(--line);
  border-radius:50%;
  padding:0;
  cursor:pointer;
}

.pub-toggle:hover{
  background:var(--teal);
}

.pub-toggle:hover .chevron{
  color:#fff;
}

.pub-toggle .chevron{
  display:inline-block;
  transition:transform .2s ease;
  font-size:13px;
  color:var(--teal-dark);
  line-height:1;
}

.pub-toggle.open .chevron{
  transform:rotate(180deg);
}

.pub-card .pub-abstract{
  display:none;
  font-size:14.5px;
  color:#3a3f46;
  line-height:1.7;
  margin-top:14px;
}

.pub-card .pub-abstract.open{
  display:block;
}

.pub-card .pub-abstract .label{
  font-weight:700;
  color:var(--ink);
}

/* ---------- HOBBY / GALLERY PAGE ---------- */
.gallery{
  max-width:1200px;
  margin:0 auto;
  padding:20px 40px 90px;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:28px;
}

.gallery-item{
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--line);
  cursor:pointer;
  background:#f7f8f9;
}

.gallery-item img{
  width:100%;
  height:460px;
  object-fit:cover;
  transition:transform .25s ease;
}

.gallery-item:hover img{transform:scale(1.05);}

.gallery-item .cap{
  padding:12px 16px 16px;
  font-size:13.5px;
  font-weight:700;
}

/* lightbox */
.lightbox{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(16,20,24,0.9);
  z-index:100;
  align-items:center;
  justify-content:center;
  padding:40px;
}

.lightbox.open{display:flex;}

.lightbox img{
  max-width:100%;
  max-height:90vh;
  border-radius:8px;
}

.lightbox .close-btn{
  position:absolute;
  top:24px;
  right:34px;
  color:#fff;
  font-size:32px;
  cursor:pointer;
  font-weight:300;
}

/* ---------- FOOTER ---------- */
footer{
  border-top:1px solid var(--line);
  padding:30px 40px;
  text-align:center;
  color:var(--grey);
  font-size:13px;
}

footer a{color:var(--teal);text-decoration:none;font-weight:600;}

/* ---------- RESPONSIVE ---------- */
@media (max-width:900px){
  .hero-inner{grid-template-columns:1fr;}
  .hero-photo{order:-1;max-width:340px;margin:0 auto;}
  .gallery{grid-template-columns:1fr;}
  .gallery-item img{height:380px;}
  .cv-embed iframe{height:600px;}
  .func-grid{grid-template-columns:1fr;}
}

@media (max-width:560px){
  nav{padding:20px;justify-content:center;}
  nav ul{gap:20px;}
  .hero-inner,.page-header,.pub-list,.gallery,.cv-section{padding-left:20px;padding-right:20px;}
  .hero-text h1{font-size:36px;}
  .gallery-item img{height:300px;}
}
