/* ---------------------------------------------------------------
   Joshua Little — personal site
   Minimal academic layout: serif body, sans-serif UI, single column.
   --------------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --rule: #e6e6e6;
  --link: #0076df;
  --link-hover: #00369f;
  --icon: #424242;
  --accent-red: #c62828;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 900px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e1e;
    --text: #e8e8e8;
    --muted: #a3a3a3;
    --rule: #3a3a3a;
    --link: #2698ba;
    --link-hover: #7ccce4;
    --icon: #cfcfcf;
    --accent-red: #ff7b72;
  }
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------------
   Header / nav
   --------------------------------------------------------------- */

.site-header {
  padding: 1.5rem 0 0.5rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-family: var(--sans);
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.site-title:hover {
  color: var(--link);
  text-decoration: none;
}

.nav-links a {
  color: var(--text);
  margin-left: 1.1rem;
  font-size: 1rem;
}

.nav-links a:first-child {
  margin-left: 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--link);
  text-decoration: none;
}

/* ---------------------------------------------------------------
   Profile
   --------------------------------------------------------------- */

main {
  flex: 1 0 auto;
  padding-bottom: 2rem;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0 1.75rem;
}

.profile-img {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.profile-name {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.profile-desc {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.profile-social a {
  color: var(--icon);
  font-size: 1.25rem;
  margin-right: 0.85rem;
}

.profile-social a:hover {
  color: var(--link);
}

/* ---------------------------------------------------------------
   Sections
   --------------------------------------------------------------- */

section {
  margin-bottom: 2.5rem;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-item {
  display: flex;
  gap: 1.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  flex: 0 0 6.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 0.15rem;
}

/* Publications ------------------------------------------------- */

.bibliography {
  margin: 0;
  padding-left: 1.5rem;
}

.bibliography > li {
  margin-bottom: 1.75rem;
}

.bibliography > li::marker {
  font-family: var(--sans);
  color: var(--muted);
}

.pub-entry {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.pub-thumbnail {
  flex: 0 0 180px;
}

.publication-img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--rule);
  display: block;
}

.pub-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.pub-title a {
  color: var(--text);
}

.pub-title a:hover {
  color: var(--link);
}

.pub-authors {
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.pub-venue {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
}

.pub-award {
  color: var(--accent-red);
  font-weight: 600;
}

.pub-links {
  font-family: var(--sans);
  font-size: 0.85rem;
}

.pub-link {
  display: inline-block;
  border: 1px solid var(--link);
  border-radius: 3px;
  padding: 0.05rem 0.5rem;
  margin: 0 0.3rem 0.3rem 0;
}

.pub-link:hover {
  background-color: var(--link);
  color: #fff;
  text-decoration: none;
}

.year-heading {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  margin: 2rem 0 1rem;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

footer {
  flex-shrink: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */

@media (max-width: 640px) {
  .profile-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .profile-name {
    font-size: 1.85rem;
  }

  .pub-entry {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pub-thumbnail {
    flex: 0 0 auto;
    width: 100%;
    max-width: 260px;
  }

  .news-item {
    flex-direction: column;
    gap: 0.1rem;
  }

  .news-date {
    flex: 0 0 auto;
  }
}
