:root {
  --text: #2d2f30;
  --muted: #62676a;
  --line: #dedbd7;
  --accent: #bf5700;
  --accent-dark: #8e3b00;
  --accent-soft: #f8eee6;
  --background: #fffdfa;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  border-top: 4px solid var(--accent);
  color: var(--text);
  background: var(--background);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.container {
  width: min(820px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  padding: 0.5rem 0.75rem;
  color: #fff;
  background: var(--text);
  transform: translateY(-110%);
}

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

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 3rem;
  align-items: start;
  padding-block: 4.5rem 2.5rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.bio {
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.bio p {
  margin-bottom: 1rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

.job-market {
  color: var(--accent-dark);
  font-weight: 600;
}

.profile-links {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.profile-links a {
  color: var(--accent-dark);
}

.portrait {
  display: block;
  width: 210px;
  height: 265px;
  object-fit: cover;
  object-position: center 32%;
  box-shadow: 8px 8px 0 var(--accent-soft);
}

.content-section {
  padding-block: 2.5rem;
}

h2 {
  margin-bottom: 2rem;
  color: var(--accent-dark);
  font-size: 1.55rem;
  font-weight: 400;
}

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

.paper-status {
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.paper h3 {
  margin-bottom: 0.65rem;
  font-size: 1.15rem;
  line-height: 1.4;
}

.paper-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.paper-links a {
  color: var(--accent-dark);
  text-decoration: underline;
}

.paper p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}

.course-list {
  columns: 2;
  gap: 3rem;
  margin: 0;
  padding-left: 1.2rem;
}

.course-list li {
  margin-bottom: 0.45rem;
  break-inside: avoid;
}

.course-list li::marker {
  color: var(--accent);
}

.education-list {
  max-width: 720px;
}

.education-item {
  padding-block: 0.3rem;
}

.education-item + .education-item {
  margin-top: 1.5rem;
}

.education-degree {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
}

.education-item h3 {
  margin-bottom: 0.25rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
}

.education-degree p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.education-degree a {
  color: var(--accent-dark);
}

.education-year {
  white-space: nowrap;
}

footer {
  padding-block: 1.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 32px, 820px);
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-block: 3.5rem 2rem;
  }

  .portrait {
    width: 120px;
    height: 152px;
  }

  .course-list {
    columns: 1;
  }
}

@media (max-width: 420px) {
  .portrait {
    width: 110px;
    height: 139px;
  }

  h1 {
    font-size: 2.7rem;
  }
}

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

@media print {
  footer,
  .portrait {
    display: none;
  }

  .profile,
  .content-section {
    padding-block: 2rem;
  }
}
