/* ---------- Academicpages-like base ---------- */
:root {
  --bg: #ffffff;
  --text: #24292e;
  --muted: #57606a;
  --link: #0366d6;
  --rule: #e5e7eb;
  --shadow: 0 2px 16px rgba(0,0,0,.08);
}

html[data-theme="dark"] {
  --bg: #0f1115;
  --text: #e6e6e6;
  --muted: #b6bdc7;
  --link: #89b4ff;
  --rule: #2a3142;
  --shadow: 0 2px 16px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

h1, h2, h3 { font-weight: 600; line-height: 1.25; margin-top: 0; }
h1 { font-size: 1.6rem; margin-bottom: 0.6rem; }  /* smaller About */
h2 { font-size: 1.4rem; margin-top: 1.6rem; margin-bottom: 0.4rem; }
h3 { font-size: 1.1rem; margin-top: 1rem; margin-bottom: 0.3rem; }
p  { margin: 0.6rem 0; }
a  { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 24px 0; }

/* ---------- Dark mode button (TOP RIGHT, larger & neutral) ---------- */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 28px;
  z-index: 999;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
  padding: 8px;
  transition: color 0.2s ease, transform 0.15s ease;
}
#theme-toggle:hover {
  color: var(--text);
  transform: scale(1.15);
}

/* ---------- Left-anchored container, wider main text ---------- */
.container {
  max-width: 1200px;    
  margin-left: 30px;    
  margin-right: 0;
  margin-top: 40px;
  padding-left: 0;
  padding-right: 12px;  /* minimal right padding */
}

/* ---------- Two-column layout (photo + text) ---------- */
.about {
  display: grid;
  grid-template-columns: 440px 1fr;  /* large photo column; text remains wide */
  gap: 36px;
  align-items: start;
  padding-bottom: 60px;
}

/* Left column: photo + caption */
.about-left { text-align: left; }
.photo {
  width: 100%;
  max-width: 440px;     /* larger photo */
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: block;
  margin-bottom: 12px;
}
.photo-caption .name   { font-size: 1.35rem; font-weight: 600; margin-bottom: 4px; }
.photo-caption .dept,
.photo-caption .school { font-size: 1.05rem; color: var(--muted); margin: 2px 0; }

/* Right column: text */
.about-right { padding-right: 6px; }

/* Subtitle style (Job Market Paper, etc.) */
.subtitle { color: var(--muted); margin-top: -6px; }

/* Teaching section helpers */
.teaching { font-size: 14px; }
.teaching .spacer { display: block; height: 4px; }
.teaching .mini-gap { margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .container {
    margin-left: 20px;
    padding-right: 10px;
    margin-top: 70px;   /* extra top space so the moon button doesn’t touch photo */
  }
  .about { grid-template-columns: 1fr; gap: 22px; }
  .photo { max-width: 340px; }
  .about-right { padding-right: 0; }
}

#theme-toggle {
  font-size: 1.2rem;              /* Resize if needed */
  filter: grayscale(100%) brightness(0.6);  /* Makes emoji gray */
  background: none;               /* Remove background */
  border: none;                   /* Remove border */
  cursor: pointer;                /* Cursor changes on hover */
  padding: 0.5em;
}


