:root {
  --text: #4a4a4a;
  --heading: #1f1f1f;
  --muted: #8a8a8a;
  --link: #2a7ab0;
  --link-hover: #06527e;
  --rule: #e8e8e8;
}

* {
  box-sizing: border-box;
}

body {
  background-color: #fff;
  margin: 0;
  padding: 56px 24px 40px;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: var(--text);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 18px;
  font-weight: 600;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 17px;
  letter-spacing: 0.02em;
  margin-top: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

section > h2:first-child {
  margin-top: 0;
}

p, ul, ol {
  margin: 0 0 18px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.title {
  color: var(--heading);
  font-weight: 500;
}

/* Layout: fixed sidebar + scrolling content on wide screens */
.wrapper {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  gap: 64px;
  align-items: flex-start;
}

header {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 56px;
}

.portrait {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  display: block;
  margin-bottom: 18px;
}

.nickname {
  font-weight: 400;
  color: var(--muted);
}

.tagline {
  margin-bottom: 10px;
}

.contact-links {
  margin-bottom: 20px;
}

nav {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  font-size: 14px;
}

nav a {
  display: inline-block;
  margin-right: 14px;
  color: var(--muted);
}

nav a:hover {
  color: var(--link-hover);
}

main {
  flex: 1;
  min-width: 0;
}

section {
  padding-bottom: 28px;
}

section:target {
  scroll-margin-top: 40px;
}

ul {
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
}

footer {
  max-width: 920px;
  margin: 24px auto 0;
  color: var(--muted);
}

small {
  font-size: 12px;
}

img {
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

/* Single column on narrow screens */
@media print, screen and (max-width: 760px) {
  body {
    padding: 32px 20px;
  }

  .wrapper {
    flex-direction: column;
    gap: 8px;
  }

  header {
    position: static;
    width: auto;
  }

  .portrait {
    max-width: 220px;
  }

  main {
    border-top: 1px solid var(--rule);
    padding-top: 24px;
  }
}
