/* =========================================================
   Econ Academic Site (static HTML) - clean PaperMod-like vibe
   ========================================================= */

/* --- CSS reset-ish --- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; }

/* --- Theme tokens --- */
:root{
  /* Light (default) */
  --bg: #f5f5f5;
  --panel: #ffffff;

  --text: #111827;
  --muted: #4b5563;
  --faint: #6b7280;

  --border: #e5e7eb;
  --link: #111827;
  --link-hover: #000000;

  --shadow: 0 1px 0 rgba(17,24,39,.06);

  --radius: 14px;
  --maxw: 820px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --h1: 2.2rem;
  --h2: 1.25rem;
  --h3: 1.05rem;
  --base: 1.02rem;
  --small: .95rem;
  --xs: .84rem;
  --lh: 1.55;
}

/* manual override via html[data-theme="light"|"dark"] */
html[data-theme="light"]{
  --bg: #f5f5f5;
  --panel: #ffffff;

  --text: #111827;
  --muted: #4b5563;
  --faint: #6b7280;

  --border: #e5e7eb;
  --link: #111827;
  --link-hover: #000000;

  --shadow: 0 1px 0 rgba(17,24,39,.06);
}

html[data-theme="dark"]{
  --bg: #1d1e20;     /* your chosen dark background */
  --panel: #2e2e33;  /* your chosen panel color */

  --text: #e5e7eb;
  --muted: #c2c7d0;
  --faint: #9aa3b2;

  --border: #3a3a40;
  --link: #e5e7eb;
  --link-hover: #ffffff;

  --shadow: 0 1px 0 rgba(229,231,235,.06);
}


body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--base);
  line-height: var(--lh);
}

/* --- Layout --- */
.container{
  max-width: var(--maxw);
  padding: 0 18px;
  margin: 0 auto;
}

header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 12px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  letter-spacing: .2px;
}

.brand-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--text);
  opacity: .75;
}

.navlinks{
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlinks a{
  color: var(--muted);
  text-decoration: none;
  font-size: var(--small);
  padding: 8px 10px;
  border-radius: 10px;
}
.navlinks a:hover, .navlinks a[aria-current="page"]{
  color: var(--text);
  background: color-mix(in srgb, var(--border) 35%, transparent);
}

.iconbtn{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--small);
}
.iconbtn:hover{
  background: color-mix(in srgb, var(--border) 35%, transparent);
}

main{
  padding: 28px 0 50px;
}

/* --- Typography --- */
h1, h2, h3{
  margin: 0 0 10px 0;
  line-height: 1.18;
}
h1{ font-size: var(--h1); letter-spacing: -0.3px; }
h2{ font-size: var(--h2); margin-top: 28px; }
h3{ font-size: var(--h3); }

p{ margin: 0 0 14px 0; color: var(--muted); }
p strong{ color: var(--text); }
a{ color: var(--link); }
a:hover{ color: var(--link-hover); }

hr{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}

/* --- Hero --- */
.hero{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 6px;
}
@media (min-width: 720px){
  .hero{
    grid-template-columns: 1.2fr .8fr;
    align-items: start;
    gap: 26px;
  }
}

.hero-card{
  background: var(--panel); /* IMPORTANT: makes panel white */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
}

.hero-sub{
  color: var(--faint);
  font-size: var(--small);
  margin-top: 6px;
}

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

.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-size: var(--small);
  background: color-mix(in srgb, var(--border) 10%, transparent);
}
.btn:hover{
  background: color-mix(in srgb, var(--border) 30%, transparent);
}
.icon-row{
  display: flex;
  gap: 22px;
  margin-top: 14px;
  align-items: center;
}

.icon-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  text-decoration: none;
}

.icon-link:hover{
  background: transparent;
  opacity: 0.85;
}

.icon-link img{
  width: 28px;
  height: 28px;
  display: block;
}
html[data-theme="dark"] .icon-link img{
  filter: invert(1) brightness(1.05);
}

html[data-theme="light"] .icon-link img{
  filter: none;
}


.social{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.social a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 12px;
  font-size: var(--small);
}
.social a:hover{
  color: var(--text);
  background: color-mix(in srgb, var(--border) 30%, transparent);
}

/* --- Profile card --- */
.profile{
  background: var(--panel); /* IMPORTANT: makes panel white */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.avatar{
  width: 160px;
  height: 160px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--border) 18%, transparent);
}
.avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meta{
  color: var(--faint);
  font-size: var(--small);
}

/* --- Publication cards --- */
.section-title{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}
.section-title .note{
  color: var(--faint);
  font-size: var(--xs);
}

.publist{
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.pub{
  background: var(--panel); /* IMPORTANT: makes panel white */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  box-shadow: var(--shadow);
}
@media (min-width: 720px){
  .pub{
    grid-template-columns: 140px 1fr;
    align-items: start;
    gap: 16px;
  }
}
.pub-cover{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 140px;
  height: 100px;
  overflow: hidden;
}
.pub-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pub h3{
  margin: 0 0 6px 0;
}
.pub .summary{
  color: var(--muted);
  font-size: var(--small);
  margin: 0 0 10px 0;
}
.pub .authors, .pub .venue{
  color: var(--faint);
  font-size: var(--xs);
  margin: 0 0 8px 0;
}

.links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--xs);
  text-decoration: none;
  color: var(--text);
}
.pill:hover{
  background: color-mix(in srgb, var(--border) 30%, transparent);
}

/* --- Footer --- */
footer{
  border-top: 1px solid var(--border);
  padding: 22px 0 30px;
  color: var(--faint);
  font-size: var(--xs);
}
.footer-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.kbd{
  font-family: var(--mono);
  font-size: .78rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 8px;
  color: var(--muted);
}
/* =========================
   HOME HERO (no boxes)
   ========================= */
.home-hero{
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-top: 10px;
  padding-bottom: 10px;
  align-items: center;
}

@media (min-width: 720px){
  .home-hero{
    grid-template-columns: 1.55fr 0.45fr;
    gap: 34px;
  }
}

.home-left h1{
  margin: 0 0 8px 0;
  font-size: 2.6rem;
  letter-spacing: -0.4px;
}

.home-sub{
  color: var(--faint);
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.home-left p{
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 68ch;
}

.home-right{
  display: flex;
  justify-content: center;
}

@media (min-width: 720px){
  .home-right{
    justify-content: flex-end;
  }
}

.home-photo{
  width: 168px;
  height: 168px;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid color-mix(in srgb, var(--panel) 85%, transparent);
}

/* --- Utilities --- */
.hidden{ display: none !important; }
