/* Adam Jozefiak — academic homepage
   Single stylesheet. Replaces normalize.css + skeleton.css. */

:root {
  --ink:        #1b1b1b;
  --ink-muted:  #6a6a6a;
  --rule:       #dcdcdc;
  --accent:     #8f1d2c;   /* links */
  --paper:      #fdfdfc;
  --measure:    36rem;     /* ~69 characters at 17px; also the width of the bio column */
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Charter", "Bitstream Charter", "Iowan Old Style", "Palatino Linotype",
               Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.62;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

p { margin: 0 0 0.85em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 29, 44, 0.28);
}

a:hover { border-bottom-color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-bottom-color: transparent;
}

em { font-style: italic; }


/* Page frame
   ------------------------------------------------------------------ */

/* 57rem = photo (16rem) + gap (2rem) + measure (36rem) + padding (3rem),
   so the bio beside the photo wraps at the same measure as the sections. */
.page {
  max-width: 57rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
}

section {
  margin-top: 5rem;
  max-width: var(--measure);
}


/* Headings
   ------------------------------------------------------------------ */

h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.15;
}

h2 {
  margin: 0 0 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

h3 {
  margin: 2.25rem 0 0.6rem;
  font-size: 1rem;
  font-weight: 600;
}


/* Header block: photo beside the bio
   ------------------------------------------------------------------ */

.intro {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.intro__photo {
  flex: 0 0 16rem;
  width: 16rem;
  height: auto;
  border-radius: 2px;
}

.intro__text { max-width: var(--measure); }

.intro__role {
  margin: 0.4rem 0 1.2rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.contact {
  margin: 1.2rem 0 0.5rem;
  font-size: 0.97rem;
}

.contact dt {
  display: inline;
  color: var(--ink-muted);
}

.contact dt::after { content: ":"; }

.contact dd {
  display: inline;
  margin: 0 0 0 0.3em;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0;
  font-size: 0.97rem;
}


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

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

.paper + .paper { margin-top: 2rem; }

.paper__title {
  display: block;
  max-width: var(--measure);
  color: var(--ink);
  border-bottom: none;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

/* Titles are plain black; the accent appears on hover so they still read as links. */
.paper__title:hover { color: var(--accent); }

.paper__authors,
.paper__venue {
  max-width: var(--measure);
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.paper__authors .me { color: var(--ink); }


/* Teaching
   ------------------------------------------------------------------ */

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

.courses li + li { margin-top: 1.15rem; }

.course__name {
  margin: 0 0 0.15rem;
  max-width: var(--measure);
}

.course__meta {
  margin: 0;
  max-width: var(--measure);
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.supervision { max-width: var(--measure); }


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

footer {
  margin-top: 5rem;
  padding-top: 1.25rem;
  max-width: var(--measure);
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 0.9rem;
}


/* Narrow screens
   ------------------------------------------------------------------ */

@media (max-width: 40rem) {
  body { font-size: 16.5px; }

  .page { padding: 2.75rem 1.25rem 3.5rem; }

  .intro {
    flex-direction: column;
    gap: 1.5rem;
  }

  .intro__photo {
    flex: none;
    width: 160px;
  }
}


@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
