:root {
  --bg: #070707;
  --bg-2: #101010;
  --ink: #f4efe6;
  --muted: #b7aea3;
  --faint: #8c847a;
  --line: rgba(244, 239, 230, 0.14);
  --ivory: #f4efe6;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --header: 4.5rem;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.2rem;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.65;
  background-color: #050505;
  background-image:
    linear-gradient(180deg, rgba(5, 5, 5, 0.62), rgba(5, 5, 5, 0.78)),
    url("../img/piano.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

::selection {
  background: #f4efe6;
  color: #070707;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 90;
  padding: 0.55rem 0.85rem;
  background: var(--ivory);
  color: var(--bg);
}

.skip:focus { top: 0.75rem; }

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: 2px;
  pointer-events: none;
}

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ivory);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.4rem;
  min-height: var(--header);
  padding: 0 var(--pad);
  color: var(--ivory);
  background: linear-gradient(#070707, rgba(7, 7, 7, 0.2) 70%, transparent);
}

.site-header.is-scrolled,
.site-header:has(.nav-toggle:checked) {
  background: rgba(7, 7, 7, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.mark {
  display: grid;
  place-items: center;
  justify-self: start;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ivory);
  color: var(--ivory);
  font-family: var(--serif);
  text-decoration: none;
}

.site-nav {
  display: flex;
  justify-self: center;
  gap: 1.4rem;
}

.site-nav a,
.header-pill,
.text-link {
  position: relative;
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.site-nav a::after,
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.site-nav a:hover::after,
.text-link:hover::after,
.site-nav a:focus-visible::after,
.text-link:focus-visible::after { transform: scaleX(1); }

.header-pill {
  justify-self: end;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(244, 239, 230, 0.45);
}

.header-pill:hover {
  background: var(--ivory);
  color: var(--bg);
}

.nav-toggle,
.nav-button { display: none; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  min-height: 100svh;
  padding: calc(var(--header) + 2rem) var(--pad) 3rem;
  text-align: center;
  background: transparent;
}

.portrait {
  position: relative;
  isolation: isolate;
  order: -1;
  margin: 0;
  width: 12.5rem;
  height: 12.5rem;
  overflow: visible;
  background: transparent;
  border-radius: 50%;
}

.portrait::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 36%;
  width: 92%;
  height: 72%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(244, 239, 230, 0.22) 0%, rgba(244, 239, 230, 0.07) 38%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 50%;
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.8));
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.05rem;
  max-width: 46rem;
  text-align: center;
}

.eyebrow,
.section-index,
.when,
.note-sign,
.plaque-kicker {
  margin: 0;
  color: var(--faint);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-index { color: var(--ivory); }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.4rem, 7.4vw, 7.8rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

h1 span { display: block; }

.italic {
  font-style: italic;
  color: #ddd4c6;
}

.role-line {
  margin: 0.2rem 0 0;
  color: var(--ivory);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dek {
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.dek a { color: var(--ivory); }

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin-top: 0.3rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0 1.15rem;
  background: var(--ivory);
  color: var(--bg);
  text-decoration: none;
}

.button:hover { background: #fff; }

.piano {
  border-top: 1px solid var(--line);
}

.section {
  padding: clamp(4.5rem, 10vh, 7.5rem) var(--pad);
}

.piano,
.about,
.path,
.areas,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 40rem);
  justify-content: center;
  justify-items: center;
  gap: 1rem;
  width: 100%;
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

h2 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 36rem;
  margin: 0 auto 1.1rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--ivory);
}

.prose {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
  margin-inline: auto;
}

.prose p,
.section-lead,
.timeline p,
.cards p {
  margin: 0;
  color: var(--muted);
}

.prose p:first-child { color: var(--ink); }

.section-head {
  display: contents;
}

.section-lead {
  max-width: 34rem;
  margin-inline: auto;
}

.path,
.areas {
  background: rgba(5, 5, 5, 0.72);
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.timeline {
  margin: 0.6rem auto 0;
  padding: 0;
  list-style: none;
  max-width: 40rem;
}

.timeline li {
  display: grid;
  gap: 0.35rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.timeline li:last-child { border-bottom: 1px solid var(--line); }

.timeline h3,
.cards h3,
.contact-list span {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.role {
  margin: 0.2rem 0 0.55rem;
  color: var(--ivory);
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 40rem);
  justify-content: center;
  gap: 0;
  width: min(100%, 40rem);
  margin: 0.4rem auto 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  text-align: center;
}

.cards li {
  min-height: 0;
  padding: 1.4rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.cards span {
  color: var(--faint);
  font-family: var(--serif);
  font-style: italic;
}

.cards h3 { margin: 0.7rem 0 0.45rem; }

.note {
  padding: clamp(4.5rem, 10vw, 7rem) var(--pad);
  background: rgba(0, 0, 0, 0.72);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.note blockquote {
  margin: 0 auto;
  max-width: 40rem;
}

.note blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.note-sign { margin-top: 1.5rem; }

.contact-list {
  width: min(100%, 36rem);
  margin: 0.4rem auto 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.contact-list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.contact-list small { color: var(--faint); }

.contact-list a:hover span { font-style: italic; }

.site-footer {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.3rem var(--pad) 1.6rem;
  color: var(--faint);
  font-size: 0.86rem;
}

.site-footer p { margin: 0; }

a:focus-visible,
.nav-button:focus-visible {
  outline: 1px solid var(--ivory);
  outline-offset: 3px;
}

.hero-copy > * {
  animation: rise 0.85s var(--ease) both;
}

.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: calc(var(--d, 0) * 50ms);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero,
  .piano,
  .about,
  .path,
  .areas,
  .contact,
  .timeline li,
  .cards {
    grid-template-columns: 1fr;
  }

  body { background-attachment: scroll; }

  .hero {
    align-items: flex-start;
    min-height: auto;
    padding-top: calc(var(--header) + 1.6rem);
    text-align: left;
  }

  .hero-copy,
  .piano,
  .about,
  .path,
  .areas,
  .contact,
  .note,
  .timeline,
  .cards {
    text-align: left;
  }

  .hero-copy { align-items: flex-start; }
  .hero-actions { justify-content: flex-start; }
  .lead,
  .prose,
  .section-lead,
  .note blockquote,
  .timeline,
  .cards,
  .contact-list { margin-left: 0; margin-right: 0; }

  .site-header {
    display: flex;
  }

  .portrait {
    width: min(11rem, 48vw);
    height: min(11rem, 48vw);
  }

  .contact-list a {
    align-items: flex-start;
  }

  .site-footer { justify-content: space-between; }

  .timeline,
  .cards,
  .contact-list { grid-column: auto; }

  .path,
  .areas { grid-template-columns: 1fr; }

  .cards {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .header-pill { display: none; }

  .nav-button {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    min-height: 2.3rem;
    padding: 0 0.85rem;
    border: 1px solid rgba(244, 239, 230, 0.4);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
  }

  .nav-button-close { display: none; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: calc(100dvh - var(--header));
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--pad) 2rem;
    overflow: auto;
    background: #070707;
  }

  .site-nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 2.1rem;
    letter-spacing: 0;
  }

  .site-nav a::after { display: none; }

  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:checked ~ .nav-button .nav-button-open { display: none; }
  .nav-toggle:checked ~ .nav-button .nav-button-close { display: inline; }

  .contact-list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
}

@media (max-width: 640px) {
  h1 { font-size: clamp(3.4rem, 14vw, 4.6rem); }
  .timeline li { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
