:root {
  color-scheme: light;
  --paper: #f2efe8;
  --ink: #171714;
  --muted: #69675f;
  --line: #cbc6ba;
  --accent: #e4472f;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Avenir, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 22vw);
  gap: clamp(2rem, 8vw, 9rem);
  min-height: min(43svh, 29rem);
  padding: clamp(1.25rem, 2vw, 2rem) clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.hero-content {
  max-width: 60rem;
}

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

h1 {
  margin-bottom: clamp(0.75rem, 1.5vw, 1.15rem);
  font-size: clamp(3.4rem, 8vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.085em;
  line-height: 0.78;
  animation: rise 900ms 100ms both cubic-bezier(.16,1,.3,1);
}

.hero-content > p {
  max-width: 38ch;
  margin-bottom: 0;
  margin-left: clamp(0rem, 10vw, 8rem);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.4;
  animation: rise 900ms 280ms both cubic-bezier(.16,1,.3,1);
}

.hero-portrait {
  display: block;
  width: min(100%, 21rem);
  height: auto;
  aspect-ratio: 1;
  justify-self: end;
  object-fit: contain;
  clip-path: circle(45.2% at 50.1% 51.2%);
  filter: drop-shadow(0 1.2rem 2rem rgb(23 23 20 / 12%));
  animation: portrait-in 1100ms 180ms both cubic-bezier(.16,1,.3,1);
}

.about,
.experience,
.connect {
  display: grid;
  grid-template-columns: minmax(7rem, 0.7fr) 3fr;
  gap: clamp(1.5rem, 5vw, 6rem);
  padding: clamp(1rem, 1.6vw, 1.5rem) clamp(1.5rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.about > p {
  max-width: 28ch;
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.7vw, 2.75rem);
  font-weight: 450;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.experience-list {
  border-top: 1px solid var(--ink);
}

.experience article {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(14rem, 1.4fr) minmax(14rem, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding: 0.6rem 0 0.7rem;
  border-bottom: 1px solid var(--line);
  transition: padding 250ms ease, border-color 250ms ease;
}

.experience article:hover {
  padding-left: 0.75rem;
  border-color: var(--accent);
}

.years,
.role,
.note {
  font-size: 0.84rem;
  line-height: 1.5;
}

.years,
.note {
  color: var(--muted);
}

.years,
.role,
.note {
  margin-bottom: 0;
}

h3 {
  margin-bottom: 0.3rem;
  font-size: clamp(1.2rem, 1.7vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.note {
  max-width: 33ch;
}

.connect {
  flex: 1;
  min-height: 0;
  align-items: end;
  border-top: 0;
  color: var(--paper);
  background: var(--ink);
}

.connect h2 {
  align-self: start;
  color: rgb(242 239 232 / 55%);
}

.connect-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.18em 0 0.08em;
  border-top: 1px solid rgb(242 239 232 / 38%);
  color: var(--paper);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 1;
  text-decoration: none;
  transition: color 250ms ease;
}

.connect-link span:last-child {
  color: var(--accent);
  font-size: 0.65em;
  transition: transform 250ms cubic-bezier(.16,1,.3,1);
}

.connect-link:hover,
.connect-link:focus-visible {
  color: var(--accent);
}

.connect-link:hover span:last-child,
.connect-link:focus-visible span:last-child {
  transform: translate(0.12em, -0.12em);
}

.connect-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.25rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes portrait-in {
  from { opacity: 0; transform: translateY(1.5rem) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 780px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(1.5rem, 5vw, 2.5rem);
    min-height: 0;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .hero-content {
    width: 100%;
  }

  .hero-portrait {
    width: clamp(10.5rem, 50vw, 15rem);
    align-self: center;
    margin-top: 0;
  }

  .hero-content > p {
    max-width: 38ch;
    margin-left: 0;
  }

  .about,
  .experience,
  .connect {
    grid-template-columns: 1fr;
  }

  .experience article {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .experience article:hover {
    padding-left: 0;
  }
}

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