/* ---------- Colors, sizes, spacing (change these to restyle the site) ---------- */
:root {
  --gap: 24px;
  --main-width: 720px;

  --background: #f5f5f5;
  --text: #1e1e1e;
  --text-muted: #6c6c6c;    /* coauthors */
  --heading: #606060;       /* "WORKING PAPERS", "WORKS IN PROGRESS" */
  --rule: #d6d6d6;          /* section underlines, link dividers */
  --border: #e4e4e4;        /* line beside an open abstract */
  --accent: #2774ae;        /* UCLA blue: links, icon hover */
}

@media (max-width: 768px) {
  :root { --gap: 16px; }
}

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

html { overflow-y: scroll; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  word-break: break-word;
  color: var(--text);
  background: var(--background);
}

h1, h2, h3, p { margin: 0; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.main {
  max-width: calc(var(--main-width) + var(--gap) * 2);
  margin: auto;
  padding: var(--gap) var(--gap) 80px;
}

/* ---------- Photo, name, introduction, icons ---------- */

/* Photo on the left, name / introduction / icons on the right */
.profile {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 72px;
  font-size: 16px;
  line-height: 1.45;
}

.profile img {
  flex: none;            /* keep the photo its full size */
  border: 1px solid var(--border);
  border-radius: 16px;   /* rounded square; 50% makes a circle */
}

/* Phones: not enough width for side by side, so the photo goes on top */
@media (max-width: 640px) {
  .profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
}

.profile h1 {
  padding: 12px 0;
  font-size: 40px;
}

.profile p { line-height: 1.45; }

.icons {
  display: flex;
  gap: 20px;
  padding: 12px 0;
}

.icons a { display: block; }
.icons a:hover { color: var(--accent); }
.icons svg { display: block; width: 34px; height: 34px; }

/* ---------- Research ---------- */

/* "WORKING PAPERS", "WORKS IN PROGRESS" */
#research h2 {
  margin: 44px 0 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  color: var(--heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.paper { margin-bottom: 28px; }

.paper h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.paper p {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.5;
}

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

/* abstract | draft | online appendix */
.paper .links { margin-top: 6px; }

.paper .links a,
.paper .links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.paper .links a:hover,
.paper .links button:hover { text-decoration: underline; }

.paper .links > :is(a, button) + :is(a, button) {
  margin-left: 0.5em;
  padding-left: 0.6em;
  border-left: 1px solid var(--rule);
}

.paper .abstract {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--border);
}

.paper .abstract p { line-height: 1.55; }
