:root {
  --ink: #111311;
  --paper: #fbfcf8;
  --green: #c5df7c;
  --green-deep: #71883e;
  --warm: #d98864;
  --muted: #646861;
  --line: #d8dbd3;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

main { position: relative; }

.intro {
  min-height: calc(100vh - 62px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
}

.content {
  width: min(680px, 100%);
  padding: clamp(30px, 5vh, 48px) clamp(28px, 7vw, 100px);
  align-self: center;
}

.botanical {
  grid-column: 2;
  grid-row: 1;
  min-height: 100%;
  background:
    linear-gradient(90deg, var(--paper) 0, transparent 18%),
    url("../images/hero-plants.webp") 52% center / cover no-repeat;
}

.portrait {
  display: block;
  width: 74px;
  height: 74px;
  margin-bottom: 22px;
  border-radius: 50%;
  object-fit: cover;
  outline: 1px solid var(--ink);
  outline-offset: 5px;
}

h1 {
  margin: 0;
  max-width: 570px;
  font-size: clamp(52px, 5.8vw, 84px);
  line-height: .94;
  letter-spacing: -.045em;
}

.lead {
  margin: 18px 0 0;
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 670;
}

.about {
  max-width: 510px;
  margin: 22px 0 26px;
  color: var(--muted);
  font: 17px/1.65 var(--serif);
}

.projects {
  max-width: 520px;
  border-top: 1px solid var(--ink);
}

.projects h2 {
  margin: 0;
  padding: 12px 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.projects a {
  display: grid;
  grid-template-columns: minmax(150px, .72fr) 1fr;
  align-items: baseline;
  gap: 20px;
  padding: 10px 3px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.projects span {
  font-size: 15px;
  font-weight: 680;
}

.projects small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.projects a::after {
  content: "↗";
  grid-column: 3;
  grid-row: 1;
  color: var(--green-deep);
  font-size: 14px;
}

.projects a:hover span,
.projects a:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }

nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(520px, 100%);
  gap: 8px;
  margin-top: 18px;
}

nav a {
  display: block;
  width: 100%;
  padding: 12px 18px;
  color: #fff;
  background: #3f433f;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible { background: #545954; }

footer {
  min-height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px clamp(28px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .04em;
}

footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .intro {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .botanical {
    order: 0;
    min-height: 170px;
    background:
      linear-gradient(0deg, var(--paper) 0, transparent 16%),
      url("../images/hero-plants.webp") center 74% / cover no-repeat;
  }

  .content {
    order: 1;
    padding: 0 24px 24px;
  }

  .portrait {
    position: relative;
    width: 70px;
    height: 70px;
    margin: -36px 0 24px 6px;
    border: 4px solid var(--paper);
    outline-offset: 1px;
  }

  h1 {
    max-width: 340px;
    font-size: clamp(50px, 15.2vw, 64px);
    line-height: .92;
  }

  .lead { max-width: 310px; }

  .about {
    margin: 20px 0 24px;
    font-size: 15px;
    line-height: 1.5;
  }

  .projects a {
    grid-template-columns: 1fr auto;
    gap: 4px 15px;
  }

  .projects small {
    grid-column: 1;
    grid-row: 2;
  }

  .projects a::after {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  nav { margin-top: 16px; }

  footer {
    display: block;
    padding: 13px 24px;
  }

  footer span,
  footer a {
    display: block;
    margin: 5px 0;
  }
}

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