:root {
  --bg: #fbfaf7;
  --panel: #ffffff;
  --text: #202326;
  --muted: #676d73;
  --line: #e3dfd8;
  --accent: #1f6f78;
  --accent-strong: #174e55;
  --ink-soft: #33383d;
  --shadow: 0 12px 36px rgba(42, 35, 24, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  color: #0a323b;
}

p {
  margin: 0;
}

.page-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 780px);
  gap: 48px;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0;
}

.profile-panel {
  align-self: start;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portrait-wrap {
  overflow: hidden;
  width: 224px;
  height: 224px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #d9e7ed;
  box-shadow: var(--shadow);
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% 38%;
  transform: scale(1.16);
  transform-origin: center;
}

.identity {
  padding: 22px 0 18px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  font-size: 1.58rem;
  font-weight: 720;
  line-height: 1.05;
}

.first-name,
.last-name {
  font-size: inherit;
  font-weight: inherit;
}

.tagline {
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  color: var(--ink-soft);
  max-width: 214px;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

.profile-links {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-link-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 10px;
  border: 1px solid rgba(23, 78, 85, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-strong);
  font-size: 0.93rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.profile-links a:hover {
  border-color: rgba(23, 78, 85, 0.28);
  background: #fff;
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  overflow: visible;
  color: var(--accent-strong);
}

.link-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
  fill: currentColor;
}

.icon-github {
  width: 17px;
  height: 17px;
}

.contact {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
  color: var(--muted);
  font-style: normal;
  font-size: 0.88rem;
  line-height: 1.5;
}

.content {
  display: grid;
  gap: 24px;
}

.hero {
  padding: 2px 0 12px;
}

.hero h2 {
  max-width: 720px;
  font-size: clamp(1.7rem, 3.6vw, 2.55rem);
  font-weight: 720;
}

.hero p:last-child {
  max-width: 680px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.section-block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.section-block > h2,
.section-heading h2 {
  font-size: 1.35rem;
  font-weight: 760;
}

.section-block > p {
  max-width: 720px;
  color: var(--ink-soft);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid rgba(222, 213, 200, 0.72);
}

.timeline li:first-child {
  border-top: 0;
}

.timeline time {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.publication {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 22px;
  row-gap: 10px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid rgba(222, 213, 200, 0.85);
}

.publication:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.pub-thumb {
  display: block;
  overflow: hidden;
  grid-column: 1;
  grid-row: 2;
  width: 112px;
  margin-top: 0;
  aspect-ratio: 1.45 / 1;
  border: 1px solid rgba(23, 78, 85, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(42, 35, 24, 0.07);
}

.pub-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-thumb-focus-top img {
  object-position: center 18%;
}

.pub-thumb-focus-center img {
  object-position: center center;
}

.pub-meta {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  align-content: start;
  gap: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.pub-meta strong {
  color: var(--accent-strong);
  font-size: 1rem;
}

.pub-body {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.publication h3 {
  margin-bottom: 8px;
  font-size: 1.04rem;
  font-weight: 720;
}

.publication p {
  margin-bottom: 8px;
  color: var(--ink-soft);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.pub-links a {
  font-weight: 700;
}

@media (max-width: 920px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(720px, calc(100% - 36px));
    padding: 28px 0 40px;
  }

  .profile-panel {
    position: static;
  }

  .portrait-wrap {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .page-shell {
    width: min(100% - 28px, 720px);
  }

  .profile-panel {
    padding: 16px;
  }

  .profile-link-row,
  .timeline {
    grid-template-columns: 1fr;
  }

  .publication {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .pub-meta,
  .pub-thumb,
  .pub-body {
    grid-column: auto;
    grid-row: auto;
  }

  .pub-thumb {
    width: 132px;
    margin-top: 2px;
  }

  .timeline li,
  .publication {
    gap: 8px;
  }

  .section-heading {
    display: block;
  }

  .section-heading span {
    display: block;
    margin-top: 4px;
  }
}

@media print {
  body {
    background: #fff;
    color: #222;
  }

  body::before,
  .portrait-wrap {
    display: none;
  }

  .page-shell {
    display: block;
    width: auto;
    padding: 0;
  }

  .profile-panel {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 20px;
  }
}
