/* ============================================================
   Brown / cream academic theme
   Adapted from Jon Barron's website template.
   Color palette (edit these hex values to tweak the theme):
     --bg        cream page background        #f6f0e6
     --text      coffee brown body text       #3a2e26
     --link      burnt sienna links           #9c5a2d
     --link-hover  warm tan hover             #c98a4b
     --highlight   soft tan highlight band    #ead9ba
     --box-border  muted divider              #d9c9ad
   ============================================================ */

/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;          /* white page background */
  --text: #2e2620;        /* near-black brown body text */
  --muted: #7a6c5d;       /* muted brown (venue, footer) */
  --link: #8a4b26;        /* rich coffee-brown links */
  --link-hover: #b9713d;  /* warm brown hover */
  --accent: #8a4b26;      /* headings / accent bar */
  --highlight: #f4e9d9;   /* faint brown highlight band */
  --card-border: #ece2d3; /* publication card outline */
  --ring: #e7d8c4;        /* photo ring / heading rule */
  --box-border: #e5d9c6;  /* light brown divider */
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
}

body {
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0 16px 48px;
  line-height: 1.65;
  border-top: 4px solid var(--accent);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- base type ---------- */
body,
td,
th,
tr,
p,
a,
li {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Verdana, Helvetica, sans-serif;
  font-size: 15px;
  color: var(--text);
}

p {
  margin: 0 0 14px;
}

strong {
  color: var(--text);
  font-weight: 700;
}

em {
  color: var(--muted);
  font-style: italic;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

a:focus,
a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* ---------- headings ---------- */
h2 {
  margin: 4px 0 16px;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ring);
}

.name {
  padding-top: 16px;
  margin: 0 0 6px;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #3d2c1d;
}

/* ---------- hero / header ---------- */
.hero td {
  vertical-align: middle;
}

.profile-photo {
  display: block;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;      /* lock a square box so the crop is a true circle */
  object-fit: cover;        /* fill the square, cropping (never squashing) the photo */
  object-position: center 25%;  /* bias the crop slightly upward toward the face */
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--ring), 0 10px 28px rgba(90, 55, 20, .18);
}

/* ---------- quick links row (pill buttons) ---------- */
.links {
  text-align: center;
  margin: 10px 0 0;
}

.links a {
  display: inline-block;
  margin: 5px 4px;
  padding: 6px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: #fdfaf6;
  color: var(--link);
  font-size: 13px;
  letter-spacing: .03em;
}

.links a:hover,
.links a:focus {
  background: var(--link);
  border-color: var(--link);
  color: #fff;
}

/* ---------- publications / cards ---------- */
.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--link);
  line-height: 1.35;
}

.pubs td {
  background: #fff;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
  transition: background-color .15s ease;
}

.pubs td:first-child {
  border-left: 1px solid var(--card-border);
  border-radius: 10px 0 0 10px;
}

.pubs td:last-child {
  border-right: 1px solid var(--card-border);
  border-radius: 0 10px 10px 0;
}

.pubs tr:hover td {
  background: #fdf8f1;
}

.pubs a {
  border-bottom: none;
}

.pubs a:hover .papertitle,
.pubs a:hover {
  color: var(--link-hover);
}

.pubs img {
  display: block;
  border-radius: 8px;
}

/* featured publication */
.highlight-row td {
  background: var(--highlight);
}

.highlight-row:hover td {
  background: #f0e2cd;
}

.highlight-row td:first-child {
  border-left: 3px solid var(--accent);
}

/* soft highlight band for inline emphasis */
span.highlight {
  background-color: var(--highlight);
  padding: 0 3px;
  border-radius: 3px;
}

/* ---------- footer ---------- */
.footer {
  margin: 34px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  text-align: right;
  font-size: 12.5px;
  color: var(--muted);
}

/* legacy classes kept for compatibility with the original template */
.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
}

.fade {
  transition: opacity .2s ease-in-out;
}

.colored-box {
  color: #3a2e26;
  padding: 20px;
  display: inline-block;
  border-radius: 10px;
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .name {
    font-size: 28px;
  }

  /* stack the header: photo on top, then name / bio / links */
  .hero > tbody > tr {
    display: flex;
    flex-direction: column-reverse;
  }

  .hero > tbody > tr > td {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center;
    padding: 12px 6% !important;
  }

  .profile-photo {
    max-width: 200px !important;
    margin: 0 auto;
  }

  /* stack each publication card: thumbnail on top, text below */
  .pubs > tbody > tr {
    display: block;
  }

  .pubs td {
    display: block;
    width: 100% !important;
    text-align: center;
  }

  .pubs td:first-child {
    border-radius: 10px 10px 0 0;
    border-right: 1px solid var(--card-border);
    border-bottom: none;
  }

  .pubs td:last-child {
    border-radius: 0 0 10px 10px;
  }

  .highlight-row td:first-child {
    border-left: 1px solid var(--card-border);
    border-top: 3px solid var(--accent);
  }

  .pubs img {
    margin: 0 auto;
  }
}
