/* ===============================
   Base variables
   =============================== */
:root {
  --bg: #FFF6F6;      /* your background color */
  --text: #222;
  --muted: #777;
  --link: #008939;    /* your green */
  --link-hover: #007730;
  --rule: #777;
  --ui: #d6d6d6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  line-height: 1.6;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
}

/* ===============================
   Header
   =============================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10vh 20vw 2rem;
  min-width: 500px;
}

header h1 {
  margin: 0;
  font-weight: 500;
  font-size: 1.5rem;
}

h1 a {
  color: #111;
  text-decoration: none;
  transition: color .3s ease;
}
h1 a:hover { color: #111; }

/* ===============================
   Navigation (kept in case you re-enable)
   =============================== */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}
nav ul li { margin: 0; }
nav ul li a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 500;
  font-size: .75rem;
  color: var(--muted);
  transition: color .3s ease;
}
nav ul li a:hover { color: #111; cursor: pointer; }
nav ul li a.current-page { color: #111; }

/* ===============================
   Main content
   =============================== */
main {
  padding: 2rem 20vw;
  min-width: 500px;
}

p {
  margin: 0 0 1.2rem 0;
  line-height: 1.8;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}

/* Links: global green */
a {
  color: var(--link);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}
a:hover { color: var(--link-hover); }

/* ===============================
   Profile image
   - Show full image (no crop) on desktop
   - On mobile we center it and move it above the text via .hero rules
   =============================== */
img[alt="Logo"],
img.profile {
  max-width: 200px;
  width: 80%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}


/* ===============================
   Research page elements
   =============================== */

/* Titles NOT bold */
.paper-title { font-weight: 400; }
.paper-title a { color: var(--link); font-weight: 400; }
.paper-title a:hover { color: var(--link-hover); }

/* Small inline button (Abstract / OSF) */
.inline-button {
  display: inline-block;
  padding: 2.5px 4.5px;
  margin-left: .25rem;
  font-size: .625rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--ui);
  border-radius: 0;
  transition: all .2s ease;
  vertical-align: 0.1rem;
  white-space: nowrap;
}
.inline-button:hover { border-color: #222; }

/* Small gray list with left rule (if used) */
.styled-list {
  font-size: .80rem;
  color: var(--muted);
  position: relative;
  padding-left: 1.25rem;
  list-style: none;
  margin: .25rem 0 0 0;
}
.styled-list::before {
  content: "";
  position: absolute;
  left: .5rem;
  top: 0;
  width: 1.5px;
  height: 100%;
  background: #d6d6d6;
}
.styled-list li { margin: .15rem 0; }
.styled-list a { color: currentColor; border-bottom: 1px solid #e1e1e1; }
.styled-list a:hover { color: #222; border-bottom: 1px solid #777; }

/* Section separators */
.solid-line {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

.section-divider {
  border: none;
  border-top: 1px solid #b8b8b8;
  margin: -0.2rem 0 1.75rem;
}

/* Bibliography spacing for legacy <p> items */
#bibliography p {
  margin-bottom: 1.2rem;
  font-size: .95rem;
}

/* ===============================
   Hero two-column + mobile reorder (photo first on mobile)
   =============================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 300px; /* wider right column for photo */
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
  grid-template-areas: "intro side";
}
.intro { grid-area: intro; }
.side  { grid-area: side; }

/* Right column (photo + links/text under it) */
.side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Stack contact links under the photo */
.social--stack {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: 1rem; /* adds space between the profile image and the first icon */
  width: 100%;
  align-items: flex-start; /* left align */
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: 1rem;
  width: 100%;
  align-items: flex-start;
}

.contact-row {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: .35rem;
  font-size: 0.9rem;
}

.contact-actions a {
  color: var(--text);
  line-height: 1;
}

.contact-actions a:hover {
  color: var(--text);
}

.contact-actions .icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.social-link--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-link--icon span {
  display: none;
}

/* Email line under the photo */
.side .email {
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

/* ===============================
   Paper header row & EXPANDING ABSTRACT
   =============================== */
.paper-header {
  margin-bottom: 1.5rem;  /* Spacing between papers */
  /* position: relative; was removed as it's no longer needed */
}

.paper-authors {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Make the <details> element itself not cause line breaks */
.paper-header details.abstract {
  display: inline;
}

/* Style the revealed abstract body to appear in the document flow */
.paper-header details[open] > .abstract-body {
  /* The abstract now appears in the normal flow, pushing content down. */
  display: block; /* Ensure it behaves like a block */
  margin-top: 10px; /* Add some space below the title line */

  /* Visual styling for the box */
  background: #f9f9f9;
  border: 1px solid var(--ui);
  border-radius: 4px;
  padding: 1em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Softened shadow for an inline block */
  
  /* Reset text styles that might be inherited */
  color: var(--text);
  font-size: 0.95rem;
  text-align: left;
}

/* Remove the default triangle/marker from the <summary> button */
.paper-header summary.inline-button {
  list-style: none; /* For Firefox/others */
}
.paper-header summary.inline-button::-webkit-details-marker {
  display: none; /* For Chrome/Safari */
}

/* ===============================
   Section titles
   =============================== */
.section-title {
  font-size: 1.5rem;   /* same as header h1 */
  font-weight: 500;
  margin: 2rem 0 1.25rem;
}

/* ===============================
   Responsive
   =============================== */
@media (max-width: 768px) {
  header, main { min-width: unset; }

  header {
    margin-top: 5vh;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 10vw 2rem;
  }

  nav ul { flex-direction: column; gap: .5rem; }
  main { padding: 2rem 10vw; }

  /* Mobile: show photo first, then intro */
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "side"
      "intro";
  }

  /* Center photo on small screens */
  img[alt="Logo"], img.profile {
    float: none;
    display: block;
    margin: 1rem auto 5vh;
  }
}

@media (max-width: 480px) {
  header { padding: 20px 5vw 2rem; }
  main { padding: 1.5rem 5vw; }
  p { font-size: .95rem; }
  nav ul li a { font-size: .85rem; }
}

.icon {
  width: 18px;   /* adjust this value */
  height: 18px;
}

.social-link span {
  font-size: 0.9rem;  /* text size next to the icon */
}

.social-link span {
  font-size: 0.9rem;  /* text size next to the icon */
}
