/* ==========================================================================
   Jonas Mirlach — academic homepage
   Plain HTML + CSS. No JavaScript, no build step, no dependencies.
   ========================================================================== */

:root {
  --paper: #f2efe7;
  --paper-deep: #e7e1d5;
  --ink: #1b1c1a;
  --muted: #67675f;
  --line: #c9c3b7;
  --accent: #762a20;
  /* type scale — the small range had drifted to six sizes inside 1.6px */
  --fs-label: 0.72rem;  /* uppercase micro labels */
  --fs-sm: 0.86rem;     /* secondary prose and metadata */
  --fs-md: 0.9rem;      /* small text one step up */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

body {
  background:
    radial-gradient(circle at 6% 2%, rgba(161, 62, 45, 0.05), transparent 26rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  padding: 64px 24px 88px;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Single centered column — profile on top, research below. */
.page-container {
  max-width: 920px;
  margin: 0 auto;
}

/* ============================== Profile ================================= */

.profile-header {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--accent);
}

.profile-grid {
  display: flex;
  flex-direction: row-reverse;
  gap: clamp(2rem, 5vw, 3.25rem);
  align-items: flex-start;
}

.avatar-col {
  flex: none;
  width: 212px;
}

.profile-img {
  display: block;
  width: 200px;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 6px 0 1.9rem 6px;
  border-radius: 2px;
  object-fit: cover;
  /* paper gap, then a hairline accent ring */
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--accent);
  filter: saturate(0.92);
}

.info-col {
  flex: 1;
  min-width: 0;
}

.author-name {
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: clamp(2.0rem, 5.0vw, 3.0rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.author-role {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.5;
}

.author-role .affiliation {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.author-role .affiliation svg {
  flex: none;
  width: 0.98rem;
  height: 0.98rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.bio {
  max-width: 110ch;
  margin-bottom: 0.9rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.55;
}

.bio-secondary {
  max-width: 110ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* Contact row */
.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-links a {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.56rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.contact-links a:first-child {
  padding-top: 0;
}

/* no rule above the first link or below the last one */
.contact-links a:last-child {
  border-bottom: 0;
}

/* the label takes the slack, pushing the arrow to the right edge */
.contact-links .label {
  flex: 1;
}

.contact-links .arrow {
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-links svg {
  flex: none;
  width: 1.02rem;
  height: 1.02rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

/* solid accents inside otherwise stroked icons (the LinkedIn "i" dot) */
.contact-links svg .solid {
  fill: currentColor;
  stroke: none;
}

/* only the label and icon pick up the accent — the rules stay neutral */
.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--accent);
}

/* the arrow drops its own colour on hover so the whole row shifts together */
.contact-links a:hover .arrow,
.contact-links a:focus-visible .arrow {
  color: inherit;
}

/* ========================= Research section ============================= */

.section-title-wrap {
  margin-bottom: 2.5rem;
}

.section-title {
  margin-bottom: 0.45rem;
  font-family: var(--serif);
  font-size: clamp(2.0rem, 5.0vw, 3.0rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.section-desc {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.projects-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.project-entry {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(1.4rem, 3.5vw, 2.4rem);
  padding: 1.9rem 0 2.1rem;
  border-bottom: 1px solid var(--line);
}

/* Project graphic — swap the file in assets/ to replace a placeholder. */
.project-media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  align-self: start;
  background: var(--paper-deep);
  border-radius: 2px;
  transition: transform 200ms ease;
}

.projects-list li:last-child .project-entry {
  border-bottom: 0;
}

.project-entry:hover .project-media {
  transform: translateY(-3px);
}

.project-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.project-body {
  min-width: 0;
}

.project-header {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
}

.project-header .venue.student {
  color: var(--muted);
}

/* type deliberately inherited from .project-header so venue and year match —
   only the colour distinguishes them */
.project-year {
  flex: none;
  color: var(--muted);
}

/* published work carries the accent on the year as well; unpublished stays muted */
.project-header:has(.venue:not(.student)) .project-year {
  color: var(--accent);
}

.project-title {
  margin-bottom: 0.28rem;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

/* Byline between title and summary — currently the author list.
   Serif roman ties it to the title; the summary below stays sans. */
.venue-note {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: 1.45;
}

/* own name picked out of the author list */
.venue-note strong {
  color: var(--ink);
  font-weight: 600;
}

/* with no .venue-note between them, open up the gap under the title */
.project-title + .project-summary {
  margin-top: 0.25rem;
}

.project-summary {
  max-width: 88ch;
  margin-bottom: 1.15rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.project-links a {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-links svg {
  flex: none;
  width: 0.96rem;
  height: 0.96rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.project-links .dataset-icon {
  height: 0.92rem;
}

.project-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================== Footer ================================= */

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.3rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
}

.footer-link {
  text-decoration: none;
}

.footer-link:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ============================= Responsive =============================== */

@media (max-width: 680px) {
  body {
    padding: 36px 20px 64px;
  }

  .profile-grid {
    flex-direction: column;
    gap: 1.6rem;
  }

  /* let the portrait and the link list reorder around the bio */
  .avatar-col {
    display: contents;
  }

  .profile-img {
    order: 1;
    width: 148px;
    margin: 6px 0 0 6px;
  }

  .info-col {
    order: 2;
  }

  .contact-links {
    order: 3;
    max-width: 320px;
  }

  .bio {
    font-size: 1rem;
  }

  .project-entry {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 1.1rem;
    padding: 1.5rem 0 1.7rem;
  }

  .project-header {
    display: block;
  }

  .project-year {
    display: block;
    margin-top: 0.2rem;
  }

  .site-footer {
    display: block;
    text-align: center;
  }

  .footer-link {
    display: inline-block;
    margin-top: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* =============================== Print ================================== */

@media print {
  body {
    background: #fff;
    padding: 0;
  }

  .skip-link,
  .footer-link {
    display: none;
  }

  .project-entry {
    page-break-inside: avoid;
  }
}
