:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --paper-deep: #f0eee7;
  --ink: #20211e;
  --ink-soft: #4f4e49;
  --muted: #757067;
  --line: #d7d0c2;
  --accent: #315f53;
  --accent-warm: #9b6043;
  --radius: 8px;
  --timeline-line-solid: url("data:image/svg+xml,%3Csvg width='12' height='56' viewBox='0 0 12 56' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 1C3 10 9 18 6 27C3 36 8 45 6 55' stroke='%23A98D6D' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --timeline-line-dotted: url("data:image/svg+xml,%3Csvg width='12' height='56' viewBox='0 0 12 56' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 1C3 10 9 18 6 27C3 36 8 45 6 55' stroke='%23A98D6D' stroke-width='2' stroke-linecap='round' stroke-dasharray='4 7'/%3E%3C/svg%3E");
  --timeline-bullet-offset: 26px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(32, 33, 30, 0.075) 1px, transparent 0)
      0 0 / 28px 28px,
    var(--paper);
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(100% - 40px, 1060px);
  margin: 0 auto;
  padding: 76px 0 56px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 760px) 230px;
  column-gap: 35px;
  align-items: start;
}

.bio-social-box {
  position: fixed;
  top: 84px;
  left: clamp(calc(50% + 255px), 75vw, calc(100vw - 280px));
  z-index: 5;
  width: 260px;
  padding: 14px;
  border: 1px solid rgba(32, 33, 30, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 254, 248, 0.82);
  box-shadow: 0 14px 42px rgba(44, 42, 35, 0.06);
  backdrop-filter: blur(14px);
}

.bio-social-box__heading {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
  line-height: 1.25;
}

.bio-socials {
  display: grid;
  gap: 3px;
}

.social-link {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 6px;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  background: rgba(49, 95, 83, 0.08);
  color: var(--accent);
  transform: translateX(2px);
}

.social-link:focus-visible {
  outline: 2px solid rgba(49, 95, 83, 0.35);
  outline-offset: 2px;
}

.social-link__label {
  font-size: 0.9rem;
  font-weight: 760;
}

.social-link__handle {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intro {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 480px);
  gap: clamp(28px, 5vw, 52px);
  align-items: center;
  width: 100%;
}

.portrait-wrap {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(32, 33, 30, 0.14);
  border-radius: 50%;
  background: var(--paper-deep);
  box-shadow: 0 24px 70px rgba(42, 40, 34, 0.12);
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(2);
}

.portrait-doodle {
  position: absolute;
  inset: -18px -14px -12px -18px;
  width: calc(100% + 34px);
  height: calc(100% + 34px);
  color: var(--accent-warm);
  pointer-events: none;
  z-index: 100;
}

.intro-copy {
  animation: rise-in 620ms ease both;
}

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

h1 {
  margin-bottom: 14px;
  font-family:
    ui-serif,
    Georgia,
    Cambria,
    "Times New Roman",
    serif;
  font-size: clamp(2.35rem, 5vw, 3.4rem);
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1;
}

.intro-copy__text {
  max-width: 32rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.intro-copy__text p {
  margin: 0 0 10px;
}

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

.intro-copy__text a {
  border-bottom: 1px solid rgba(32, 33, 30, 0.24);
  color: var(--ink);
  font-weight: 650;
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

.intro-copy__text a:hover,
.intro-copy__text a:focus-visible {
  border-color: currentColor;
  color: var(--accent);
}

.timeline-section {
  grid-column: 1;
  margin-top: clamp(54px, 9vw, 86px);
}

.timeline-heading {
  max-width: 650px;
  margin-bottom: 18px;
}

.timeline-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.12;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  max-width: 820px;
  margin: 0;
  padding: 6px 0 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(92px, 150px) 44px minmax(0, 1fr);
  min-height: 138px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 460ms ease,
    transform 460ms ease;
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item__date {
  padding: 17px 22px 0 0;
  color: var(--muted);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: right;
}

.timeline-item__marker {
  position: relative;
  min-height: 100%;
  background-image: var(--timeline-line-solid);
  background-position: center top;
  background-repeat: repeat-y;
  background-size: 12px 56px;
}

.timeline-item__marker::before {
  position: absolute;
  z-index: 1;
  top: 19px;
  left: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 1px rgba(32, 33, 30, 0.18);
  content: "";
  transform: translateX(-50%);
}

.timeline-item:has(+ .timeline-item--birth) .timeline-item__marker::after {
  position: absolute;
  top: var(--timeline-bullet-offset);
  right: 0;
  bottom: 0;
  left: 0;
  background-image: var(--timeline-line-dotted);
  background-position: center top;
  background-repeat: repeat-y;
  background-size: 12px 56px;
  content: "";
  pointer-events: none;
}

.timeline-item--birth .timeline-item__marker {
  background-image: none;
}

.timeline-item--birth .timeline-item__marker::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: var(--timeline-bullet-offset);
  background-image: var(--timeline-line-dotted);
  background-position: center top;
  background-repeat: repeat-y;
  background-size: 12px 56px;
  content: "";
  pointer-events: none;
}

.timeline-item--current .timeline-item__marker::before {
  background: var(--accent);
  box-shadow:
    0 0 0 1px rgba(49, 95, 83, 0.24),
    0 0 0 8px rgba(49, 95, 83, 0.1);
}

.timeline-item__content {
  padding: 13px 0 32px 22px;
}

.timeline-item__topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}

.timeline-item h3 {
  margin-bottom: 0;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  font-weight: 740;
  letter-spacing: 0;
  line-height: 1.18;
}

.project-title-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.external-link-icon {
  display: inline-flex;
  width: 0.9em;
  height: 0.9em;
  color: var(--accent-warm);
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.external-link-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.project-title-link:hover,
.project-title-link:focus-visible {
  color: var(--accent);
  transform: translateY(-1px);
}

.project-title-link:hover .external-link-icon,
.project-title-link:focus-visible .external-link-icon {
  color: currentColor;
  transform: translate(2px, -2px);
}

.project-title-link:focus-visible {
  outline: 2px solid rgba(49, 95, 83, 0.32);
  outline-offset: 3px;
}

.timeline-item p {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: min(100% - 40px, 1060px);
  margin: 0 auto;
  padding: 0 0 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

.noscript {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 260px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100% - 32px, 760px);
    padding-top: 54px;
    display: block;
  }

  .intro {
    grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
    width: 100%;
  }

  .bio-social-box {
    position: static;
    width: min(100%, 320px);
    margin: 18px 0 0 232px;
  }
}

@media (max-width: 720px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .bio-social-box {
    width: 100%;
    margin: 0;
  }

  .portrait-wrap {
    width: min(56vw, 210px);
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .timeline-section {
    margin-top: 56px;
  }

  .timeline-heading {
    margin-bottom: 18px;
  }

  .timeline-item {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 0;
  }

  .timeline-item__date {
    grid-column: 2;
    grid-row: 1;
    padding: 22px 0 4px;
    text-align: left;
  }

  .timeline-item__marker {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  :root {
    --timeline-bullet-offset: 34px;
  }

  .timeline-item__marker::before {
    top: 28px;
  }

  .timeline-item__content {
    grid-column: 2;
    grid-row: 2;
    padding: 0 0 32px 16px;
  }

  .timeline-item__topline {
    gap: 8px;
  }
}

@media (max-width: 500px) {
  body {
    background:
      radial-gradient(circle at 1px 1px, rgba(32, 33, 30, 0.06) 1px, transparent 0)
        0 0 / 24px 24px,
      var(--paper);
  }

  .bio-socials {
    gap: 5px;
    justify-items: start;
  }

  .social-link {
    gap: 4px;
  }

  .social-link__handle {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
