/* ==========================================================================
   Shared styles for adrianasejfia.com
   Edit this file once; every page picks up the change.
   ========================================================================== */

:root {
  --text:        #615445;   /* body copy and headings */
  --text-strong: #615445;
  --text-muted:  #555555;   /* dates, captions, affiliation */
  --accent:      #b51700;   /* links */
  --accent-dark: #7d1000;   /* link hover */
  --bg:          #ffffff;
  --bg-panel:    #faf9f7;   /* sidebar */
  --rule:        #e6e2dc;   /* hairlines */

  --sidebar-w: 290px;
  --gap: 2rem;

  --font-sans: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------- typography */

/* All headings are the same size, as before. */
h1, h2, h3, h4 {
  color: var(--text-strong);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.25;
  margin: 0 0 0.4em;
}

h2, h3, h4 { margin-top: 2rem; }
h2:first-of-type { margin-top: 0; }

p { margin: 0 0 1.1em; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-dark); text-decoration: underline; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------------ sidebar */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  padding: 2.5rem 1.75rem;
  background: var(--bg-panel);
  border-right: 1px solid var(--rule);
}

.avatar {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  object-fit: cover;
}

.identity { text-align: center; }

.identity__name {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.identity__role {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

.identity__affil {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* menu — sits at the top of the main content, as before -------------------- */

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.6rem;
  max-width: none;
  margin-bottom: 2.5rem;
  padding: 10px 0;
}

.menu a {
  margin: 0 0.6rem;
  font-weight: bold;
  font-size: 1em;
}

.menu .sep { color: var(--rule); }

/* social icons ------------------------------------------------------------- */

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.75rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.social a {
  display: block;
  padding: 0.2rem;
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: color 0.15s ease;
}
.social a:hover { color: var(--accent); }

/* news --------------------------------------------------------------------- */

.news { margin-top: 2rem; }

.news__title {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-item { margin-bottom: 1.1rem; }

.news-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.news-text { font-size: 0.92rem; line-height: 1.5; }

/* ------------------------------------------------------------------- content */

.main {
  margin-left: var(--sidebar-w);
  padding: 3rem var(--gap) 5rem;
}

.main > * { max-width: 46rem; }

.page-title {
  margin: 0 0 1.5rem;
  letter-spacing: 0.01em;
}

.main ul { padding-left: 1.2rem; }
.main li { margin-bottom: 0.35rem; }

.lede { color: var(--text-muted); }

/* publications ------------------------------------------------------------- */

.pub-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.pub-list > li {
  padding: 0 0 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.pub-list > li:last-child { border-bottom: 0; }

.pub-citation { margin: 0; line-height: 1.5; }

.pub-authors .me { font-weight: 600; color: var(--text-strong); }

.pub-venue {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.pub-award {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.pub-links {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

/* teaching / misc ---------------------------------------------------------- */

.course-list { margin: 1rem 0 0; padding: 0; list-style: none; }

.course-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.course-list li:last-child { border-bottom: 0; }

.course-role { color: var(--text-muted); font-size: 0.9rem; }

.contact-list { margin: 1rem 0 0; padding: 0; list-style: none; }
.contact-list li { margin-bottom: 0.8rem; }
.contact-list .label {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* =============================================================== responsive */

@media (max-width: 860px) {
  body { font-size: 16px; }

  /* Sidebar becomes a compact bar pinned to the top of the page. */
  .sidebar {
    position: sticky;
    width: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0.6rem 1.25rem;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    z-index: 20;
  }

  .identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }

  .avatar {
    width: 44px;
    height: 44px;
    margin: 0;
    flex: none;
  }

  .identity__name { font-size: 1rem; line-height: 1.3; }
  .identity__role { font-size: 0.82rem; line-height: 1.3; }
  .identity__affil { font-size: 0.78rem; line-height: 1.3; }

  .main {
    margin-left: 0;
    padding: 1rem 1.25rem 2rem;
  }

  .menu {
    margin-bottom: 1.5rem;
    padding: 0;
  }

  .menu a { margin: 6px 10px; font-size: 0.9em; }

  /* site.js moves the news and the icons below the content on small screens,
     so the pinned bar stays short. */
  body > .news {
    margin: 0;
    padding: 1.5rem 1.25rem 0.5rem;
    border-top: 1px solid var(--rule);
  }
  body > .news > * { max-width: 46rem; }
  body > .news .news-text { font-size: 1rem; }

  body > .social {
    justify-content: flex-start;
    gap: 1.4rem;
    margin: 0;
    padding: 1rem 1.25rem 2.5rem;
    border-top: 0;
  }
  body > .social a { font-size: 1.25rem; }
}

/* Below this width the menu would wrap, leaving a dangling separator. */
@media (max-width: 480px) {
  .menu .sep { display: none; }
  .menu a { margin: 6px 7px; font-size: 0.85em; }
}

@media (max-width: 420px) {
  .identity__affil { display: none; }
}

/* ==================================================================== print */

@media print {
  .sidebar, .menu, .skip-link { display: none; }
  .main { margin: 0; padding: 0; }
  a { color: inherit; text-decoration: underline; }
}
