/* =========================
   Base
========================= */

:root{
  --bg: #f7f8f9;
  --panel: #ffffff;
  --text: #2a2a2a;
  --muted: #7a7a7a;

  /* Theme surfaces */
  --chrome: #e2e4e7;        /* header/footer background */
  --chrome-border: #d6d9dd; /* header/footer border */
  --contact-bg: #e6e8ea;    /* contact panel background */
  --contact-border: #d2d6da;

  /* Links */
  --accent: #4f4f4f;        /* default link color */
  --link-strong: #111;      /* in-text "academic" links */
  --link-hover: #1a73e8;

  --border: #e6e8eb;
  --max-width: 1100px;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
}

*{ box-sizing: border-box; }

/* ✅ Sticky footer foundation */
html, body{
  height: 100%;
}

body{
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;

  /* ✅ make footer stick to bottom */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ✅ main grows to fill remaining space */
main{
  flex: 1;
}

/* Default links (nav/contact/footer etc.) */
a{ color: var(--accent); }
a:hover{ text-decoration: underline; }

/* =========================
   Layout
========================= */

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================
   Header / Nav
========================= */

.site-header{
  background: var(--chrome);
  border-bottom: 1px solid var(--chrome-border);
}

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

.site-title h1{
  margin: 0;
  font-size: 26px;
  font-weight: 600;
}

.site-title p{
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.nav a {
  margin-left: 22px;
  padding-bottom: 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  border-bottom-color: var(--muted);
}

.nav a.active {
  border-bottom-color: var(--text);
  font-weight: 500;
}

.site-name a {
  color: var(--text);
  text-decoration: none;
}

.site-name a:hover {
  opacity: 0.85;
}

/* =========================
   Main content (Home)
========================= */

.main-grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  padding: 64px 0;
}

.photo img{
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

/* Contact block under the photo */
.profile-contact{
  margin-top: 18px;
  font-size: 14px;
}

.profile-contact h3{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.profile-contact p{
  margin: 6px 0;
}

.profile-contact a{
  color: var(--text);
  text-decoration: none;
}

.profile-contact a:hover{
  text-decoration: underline;
}

/* Contact panel */
.contact-panel{
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--contact-bg);
  border: 1px solid var(--contact-border);
  border-radius: var(--radius);
}

.welcome{
  font-style: italic;
  margin-top: 0;
}

.content p{
  margin: 0 0 18px;
}

/* Main-page links: neutral by default, blue on hover */
.content a,
.profile-contact a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.content a:hover,
.profile-contact a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

/* =========================
   Subpages (Publications / Teaching / Contact)
========================= */

.page-main{
  padding: 42px 0 72px;
}

.page-title{
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
}

.page-card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.placeholder{
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* =========================
   Buttons (optional)
========================= */

.btn{
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,.35);
}

.btn:hover{
  background: rgba(255,255,255,.55);
  text-decoration: none;
}

/* =========================
   Footer
========================= */

.footer {
  background: var(--chrome);
  border-top: 1px solid var(--chrome-border);

  /* ✅ remove margin-top so footer can “stick” properly */
  margin-top: 0;

  padding: 28px 0;
  font-size: 13px;
  color: #555;
  width: 100%;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-text{
  margin: 0;
}

/* =========================
   Responsive
========================= */

@media (max-width: 900px){
  .header-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav a{
    margin-left: 0;
    margin-right: 18px;
  }

  .main-grid{
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 42px 0;
  }

  .photo{
    max-width: 320px;
  }

  .footer-inner{
    flex-direction: column;
    align-items: flex-start;
  }
}

.pub-card {
  margin-bottom: 28px;
}

.pub-section {
  margin-top: 0;
}
