/* ==========================================================
   Academic Personal Page — journal (PRL / RevTeX) style
   Serif body, small-caps section heads, hairline rules,
   restrained ink-blue links.
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=STIX+Two+Text:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

* { box-sizing: border-box; }

body {
  font-family: "STIX Two Text", "Times New Roman", Times, serif;
  font-size: 17.5px;
  line-height: 1.5;
  color: #1a1a1a;
  background-color: #fff;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-kerning: normal;
  font-feature-settings: "liga", "kern";
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 24px 56px;
}

/* ============ Top navigation ============ */
.nav-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 0.5px solid #999;
  padding: 0.4rem 0 0.8rem;
  margin-bottom: 2.4rem;
}

/* Page links set as small caps, like a running head */
.nav-top a {
  margin-right: 1.3rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555;
}

.nav-top a:hover { color: #1f3f7a; }

.nav-top a.current {
  color: #1a1a1a;
  font-weight: 600;
}

/* The TAMU SVG carries extra clear space; negative margins pull it back. */
.nav-top a.nav-mark-link {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 0;
}

.nav-mark {
  display: block;
  height: 56px;
  width: auto;
  margin-top: -12px;
  margin-bottom: -12px;
}

/* ============ Masthead ============ */
.masthead {
  margin-bottom: 1.6rem;
}

.name {
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  margin: 0;
}

/* ============ Profile section: text left, photo right ============ */
.profile-section {
  display: flex;
  flex-direction: row-reverse;
  gap: 2.2rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.profile-main {
  flex: 1 1 0;
  min-width: 0;
}

.profile-main > :first-child { margin-top: 0; }

.profile-side {
  flex: 0 0 210px;
  text-align: center;
}

.profile-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin-bottom: 0.8rem;
}

.contact-block {
  font-size: 0.93rem;
  line-height: 1.45;
  color: #333;
}

.email-line {
  font-size: 0.92rem;
  color: #1a1a1a;
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
}

.cv-button {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.profile-links { margin-top: 0.7rem; white-space: nowrap; }

.profile-links .cv-button { margin-top: 0; }

.cv-updated {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #999;
}

.link-sep {
  margin: 0 0.5em;
  color: #999;
}

/* ============ Headings: RevTeX-like small caps ============ */
h1, h2 {
  font-family: inherit;
  color: #1a1a1a;
  line-height: 1.25;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2.4rem;
  margin-bottom: 0.9rem;
}

/* ============ Body text ============ */
p { margin: 0 0 0.9rem 0; }

ul {
  padding-left: 1.4rem;
  margin: 0 0 1rem 0;
}

li { margin-bottom: 0.45rem; }

/* ============ Links ============ */
a {
  color: #1f3f7a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 2px;
}

.nav-top a:hover { text-decoration: none; }

/* ============ Publications ============ */
.pubs {
  list-style: none;
  counter-reset: ref;
  padding-left: 2.6rem;
}

.pubs > li {
  position: relative;
  counter-increment: ref;
  margin-bottom: 0.8rem;
}

.pubs > li::before {
  content: "[" counter(ref) "]";
  position: absolute;
  left: -2.6rem;
  width: 2.2rem;
  text-align: right;
  white-space: nowrap;
  color: #777;
  font-variant-numeric: lining-nums;
}

/* Full list: grouped by type, hanging indent, no numbers */
.pub-group {
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  font-variant-numeric: lining-nums;
}

.masthead + .pub-group { margin-top: 0; }

.pubs-plain {
  list-style: none;
  padding-left: 0;
}

.pubs-plain > li {
  padding-left: 1.5em;
  text-indent: -1.5em;
  margin-bottom: 0.7rem;
}

/* Own name in author lists: a touch heavier than the text, not full bold */
.pubs strong,
.pubs-plain strong { font-weight: 500; }

sup { font-size: 0.7em; }

.footnote {
  font-size: 0.88rem;
  color: #666;
}

details { margin-top: 0.2rem; }

details summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #777;
}

details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+\2009"; }
details[open] summary::before { content: "\2212\2009"; }
details summary:hover { color: #1f3f7a; }

details p {
  margin: 0.4rem 0 0;
  padding-left: 0.9rem;
  border-left: 0.5px solid #bbb;
  font-size: 0.94rem;
  color: #333;
}

/* ============ Openings ============ */
/* Set apart like a boxed note in a journal: paper tint, hairline frame,
   a single Aggie-maroon rule on top. */
.openings {
  margin: 2.6rem 0 0.5rem;
  padding: 1.5rem 1.8rem 1.6rem;
  background: #fbf9f6;
  border: 0.5px solid #ddd3c8;
  border-top: 2px solid #500000;
}

.openings h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #500000;
}

.openings p:last-child { margin-bottom: 0; }

/* Homepage version: a short notice pointing to openings.html */
.openings-brief {
  margin-top: 2rem;
  padding: 1.1rem 1.8rem 1.2rem;
}

.openings-brief h2 { margin-bottom: 0.5rem; }

.more-arrow {
  white-space: nowrap;
  font-weight: 600;
}

.openings strong,
.openings-page strong { font-weight: 600; }

/* Run-in heads, as in a journal paragraph */
.lead-in {
  font-variant: small-caps;
  letter-spacing: 0.03em;
  color: #500000;
}

.compute-note {
  margin: 1.2rem 0;
  padding: 0.9rem 0;
  border-top: 0.5px solid #d4c5b8;
  border-bottom: 0.5px solid #d4c5b8;
  font-size: 0.95rem;
  text-align: left;
}

.compute-note p { margin-bottom: 0; }

/* ============ Research interests ============ */
.interests {
  list-style: none;
  padding-left: 1.2rem;
  margin: 0.5rem 0 0.4rem;
  text-align: left;
}

.interests li {
  position: relative;
  margin-bottom: 0.15rem;
}

.interests li::before {
  content: "\2013";
  position: absolute;
  left: -1.1rem;
  color: #888;
}

/* Pointer from a shortened list to the full one */
.more-link {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============ Blog ============ */
.blog-subtitle {
  margin: 0.4rem 0 0;
  font-style: italic;
  color: #666;
}

.blog-intro {
  font-style: italic;
  color: #666;
  margin-bottom: 2.4rem;
}

.post {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 0.5px solid #bbb;
}

.post:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.post h2,
.post h3 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
  text-transform: none;
  letter-spacing: 0;
}

.post h2 a,
.post h3 a { color: #1a1a1a; }

.post-date {
  font-size: 0.88rem;
  font-style: italic;
  color: #777;
  margin-bottom: 1rem;
}

.post-body p:last-child { margin-bottom: 0; }

.post-refs {
  margin-top: 1.4rem;
  padding-top: 0.7rem;
  border-top: 0.5px solid #ccc;
  font-size: 0.88rem;
  color: #666;
}

/* Long display equations scroll inside the post instead of widening the page */
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0;
}

/* ============ Footer ============ */
hr {
  border: 0;
  border-top: 0.5px solid #999;
  margin: 2.4rem 0 0.6rem;
}

.footer {
  font-size: 0.88rem;
  font-style: italic;
  color: #666;
}

::selection { background: #dbe3f0; }

/* Long titles and URLs must never push the page sideways on phones */
.pubs, .contact-block { overflow-wrap: break-word; }

/* ============ Responsive ============ */
/* Tablets (iPad portrait etc.): keep side-by-side but give text more room */
@media (min-width: 701px) and (max-width: 999px) {
  .profile-section { gap: 1.6rem; }
  .profile-side { flex-basis: 190px; }
  .cv-button { letter-spacing: 0.06em; }
  .openings { padding: 1.3rem 1.4rem 1.4rem; }
}

@media (max-width: 700px) {
  .profile-section {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }
  .profile-side {
    flex: 0 0 auto;
    width: 200px;
  }
  .profile-main { width: 100%; }
  .openings { padding: 1.1rem 1rem 1.2rem; }
  .name { font-size: 1.8rem; }
  .container { padding: 14px 16px 40px; }
  .nav-top a { margin-right: 1rem; font-size: 0.74rem; letter-spacing: 0.07em; }
  .nav-top a.nav-mark-link { order: -1; width: 100%; margin: 0 0 0.6rem; }
  .nav-mark { height: 44px; margin-top: -8px; margin-bottom: -8px; }
}

/* ============ Print ============ */
@media print {
  .container { max-width: 100%; padding: 0.5in; }
  a { color: #000; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
  .nav-top { display: none !important; }
}
