/* ------------------------------------------------------------
   Composer portfolio: ultramarine, white, black staff-line work
   Edit the colors and spacing in :root and everything follows.
------------------------------------------------------------ */
:root {
  --blue: #001b5f;          /* International Klein Blue */
  --maroon: #960000;        /* illuminated initials */
  --white: #f5f5f5;
  --black: #000000;
  --yellow:#f9ff7e;
  --gap: 12px;              /* distance between staff lines */
  --max: 1040px;
  --pad: clamp(20px, 5vw, 56px);
  --font: "Times New Roman", Times, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 1.125rem;   /* Times runs small, so the base is bumped up */
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { background: var(--maroon); color: var(--white); text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- staff: five black lines, the manuscript-paper motif ---------- */
.staff {
  position: relative;
  height: calc(var(--gap) * 4 + 1px);
  background:
    linear-gradient(var(--black), var(--black)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--black), var(--black)) 0 var(--gap) / 100% 1px no-repeat,
    linear-gradient(var(--black), var(--black)) 0 calc(var(--gap) * 2) / 100% 1px no-repeat,
    linear-gradient(var(--black), var(--black)) 0 calc(var(--gap) * 3) / 100% 1px no-repeat,
    linear-gradient(var(--black), var(--black)) 0 calc(var(--gap) * 4) / 100% 1px no-repeat;
}
.staff.small { --gap: 5px; }
.note {                      /* a notehead, with a stem */
  position: absolute;
  width: 15px; height: 11px;
  margin-top: -5px;
  background: var(--black);
  border-radius: 50%;
  transform: rotate(-15deg);
}
.note::after {
  content: ""; position: absolute;
  right: 0; bottom: 50%;
  width: 1px; height: 38px;
  background: var(--black);
}
.barline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--black); }

/* ---------- header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 12px 32px;
  padding: 26px var(--pad) 18px;
  max-width: var(--max); margin: 0 auto;
}
.site-title {
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--black); text-decoration: none;
}
.site-title:hover { background: none; color: var(--maroon); }
.site-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.site-nav a {
  color: var(--black); text-decoration: none; font-size: 0.95rem;
  padding: 2px 0; position: relative;
}
.site-nav a:hover { background: none; color: var(--maroon); }
.site-nav a[aria-current="page"]::before {   /* a notehead marks the current page */
  content: ""; position: absolute; left: -14px; top: 50%;
  width: 8px; height: 6px; margin-top: -3px;
  background: var(--blue); border-radius: 50%; transform: rotate(-20deg);
}
.header-rule { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 56px var(--pad) 96px; }
h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); line-height: 0.98; letter-spacing: -0.045em; font-weight: 700; color: var(--blue); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 700; margin: 22px 0 6px; }
p + p { margin-top: 1em; }
.page-title { margin-bottom: 8px; }
.page-intro { max-width: 52ch; margin: 20px 0 48px; }
.small { font-size: 0.875rem; }

/* ---------- home ---------- */
.hero { padding: 24px 0 64px; }
.hero .role { margin-bottom: 14px; }
.hero .staff { margin: 44px 0 30px; --gap: 11px; }
.lede { max-width: 36ch; font-size: 1.2rem; line-height: 1.5; }

.featured {
  background: var(--blue); color: var(--white);
  padding: clamp(24px, 5vw, 48px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end;
  min-height: 320px;
}
.featured h2 { font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.04em; }
.featured a { color: var(--white); }
.featured a:hover { background: var(--white); color: var(--maroon); }

.doors { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--black); border-top: 0; }
.doors a {
  color: var(--black); text-decoration: none; padding: 28px 24px 36px;
  border-left: 1px solid var(--black); font-size: 1.25rem; letter-spacing: -0.02em; font-weight: 700;
  display: flex; flex-direction: column; gap: 36px;
}
.doors a:first-child { border-left: 0; }
.doors a span { font-weight: 400; font-size: 0.9rem; letter-spacing: 0; }
.doors a:hover { background: var(--maroon); color: var(--white); }

/* ---------- compositions ---------- */
.work {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px 48px;
  padding: 36px 0 44px; border-top: 1px solid var(--black);
}
.work-meta dt { font-weight: 700; font-size: 0.8rem; margin-top: 10px; }
.work-meta dt:first-child { margin-top: 0; }
.work-meta dd { font-size: 0.9rem; }
.work h2 { margin-bottom: 16px; color: var(--blue); }
.player { border: 1px solid var(--black); background: var(--white); margin-bottom: 8px; }
audio { display: block; width: 100%; height: 44px; }
.work .note-text { max-width: 62ch; }
.work .links { margin-top: 18px; font-size: 0.9rem; }

/* ---------- writings ---------- */
.piece {
  display: grid; grid-template-columns: 90px 1fr; gap: 8px 32px;
  padding: 26px 0; border-top: 1px dotted var(--black);
}
.piece:last-of-type { border-bottom: 1px dotted var(--black); }
.piece .year { font-size: 0.9rem; }
.piece h2 { font-size: 1.35rem; margin-bottom: 4px; }
.piece .where { font-size: 0.9rem; margin-bottom: 8px; }
.piece p:last-child { max-width: 58ch; }

/* ---------- bio ---------- */
.bio { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; margin-top: 40px; }
.portrait { background: var(--blue); color: var(--white); aspect-ratio: 4 / 5; display: flex; align-items: flex-end; padding: 16px; font-size: 0.85rem; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.bio-text { max-width: 58ch; }
.bio-text .big { font-size: 1.35rem; line-height: 1.45; letter-spacing: -0.015em; margin-bottom: 1.2em; }
.facts { margin-top: 40px; border-top: 1px solid var(--black); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px dotted var(--black); font-size: 0.95rem; }
.facts dt { font-weight: 700; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact h2 { margin-bottom: 14px; }
.email-link { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.03em; word-break: break-word; }
.social { list-style: none; margin-top: 28px; }
.social li { border-top: 1px dotted var(--black); }
.social li:last-child { border-bottom: 1px dotted var(--black); }
.social a { display: block; padding: 12px 0; color: var(--black); text-decoration: none; font-size: 1.05rem; }
.social a:hover { background: var(--maroon); color: var(--white); padding-left: 10px; }
form label { display: block; font-size: 0.85rem; font-weight: 700; margin-top: 18px; }
form input, form textarea {
  width: 100%; font: inherit; padding: 10px 12px; margin-top: 6px;
  border: 1px solid var(--black); border-radius: 0; background: var(--white);
}
form textarea { min-height: 150px; resize: vertical; }
form input:focus, form textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
button {
  margin-top: 22px; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--blue); color: var(--white); border: 1px solid var(--blue);
  padding: 12px 28px; border-radius: 0;
}
button:hover { background: var(--white); color: var(--yellow); }

/* ---------- footer ---------- */
.site-footer { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 40px; font-size: 0.85rem; }
.site-footer .staff { margin-bottom: 18px; }
.site-footer .final { right: 0; }                 /* final double barline */
.site-footer .final + .final { right: 6px; width: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .featured, .contact, .bio, .work { grid-template-columns: 1fr; }
  .bio { gap: 32px; }
  .portrait { aspect-ratio: 1 / 1; max-width: 320px; }
  .doors { grid-template-columns: 1fr; }
  .doors a { border-left: 0; border-top: 1px solid var(--black); gap: 12px; }
  .doors a:first-child { border-top: 0; }
  .piece { grid-template-columns: 1fr; }
  .work-meta { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; }
  .work-meta dt { margin-top: 0; }
  .site-nav { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ------------------------------------------------------------
   Times New Roman adjustments + subtle medieval ornament
   (delete this whole block to remove the ornament)
------------------------------------------------------------ */
/* Serif type wants looser tracking and lighter headings than the sans did */
h1 { font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
h2 { font-weight: 400; letter-spacing: -0.01em; }
.site-title { font-family: "UnifrakturMaguntia", "Old English Text MT", "Times New Roman", serif; font-weight: 400; font-size: 1.8rem; letter-spacing: 0; line-height: 1; }
.site-nav a { font-variant: small-caps; letter-spacing: 0.05em; font-size: 1.1rem; }
.doors a, .email-link { letter-spacing: 0; font-weight: 400; }
.doors a span { font-style: italic; }
.lede, .page-intro { font-style: italic; }

/* Illuminated initial: maroon drop cap on the home intro, bio, and each program note */
.bio-text .big::first-letter,
.note-text p:first-child::first-letter,
.lede::first-letter {
  float: left; color: var(--yellow);
  font-size: 3.6em; line-height: 0.8; padding: 0.06em 0.1em 0 0;
}

/* Pilcrow before small headings, like a rubricated paragraph mark */
h3::before { content: "\00B6\00A0"; color: var(--maroon); }

/* Double ruling between works, as on ruled manuscript pages */
.work { border-top: 3px double var(--black); }
.work:first-of-type { border-top: 0; }

/* Inset keyline frame inside the blue block, and an offset frame on the portrait */
.featured { outline: 1px solid rgba(255, 255, 255, 0.75); outline-offset: -12px; }
.portrait { outline: 1px solid var(--black); outline-offset: 7px; }

/* A fleuron closes every page */
main::after {
  content: "\2767"; display: block; text-align: center;
  color: var(--maroon); font-size: 3.8rem; line-height: 1; margin-top: 72px;
}

/* Home page photo behind the header and intro */
.top { position: relative; isolation: isolate; }
.top::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url("../images/hero.jpg") center / cover no-repeat;
  opacity: 0.25;             /* lower this for a fainter photo */
}
.hero-main { max-width: var(--max); margin: 0 auto; padding: 56px var(--pad) 0; }
.top + main { padding-top: 0; }   /* the blue box sits flush under the photo */

/* Footer staff ends at the page margin with a proper final barline */
.site-footer .staff {
  width: calc(50% + 50vw);   /* from the left window edge to the right text margin */
  margin-right: 0;
}
.site-footer .final + .final { right: 0; width: 4px; }       /* thick line, outer */
.site-footer .final:first-child { right: 8px; width: 1px; }  /* thin line, inner */

/* Staff lines run to the window edges; text keeps its margins */
.header-rule { max-width: none; padding: 0; }

.hero .staff,
.site-footer .staff {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

body { overflow-x: hidden; }   /* stops a sideways scrollbar from 100vw */

/* Blue box runs edge to edge; its text stays aligned with the page column */
.featured {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  padding-right: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
}

/* Bordered links run edge to edge, with the first label aligned to the page column */
.doors {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-left: 0;
  border-right: 0;
}
.doors a:first-child {
  padding-left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
}

@media (max-width: 760px) {
  .doors a,
  .doors a:first-child { padding-left: var(--pad); padding-right: var(--pad); }
}

/* Center the text in the three bordered links */
.doors a,
.doors a:first-child {
  text-align: center;
  padding-left: 24px;
  padding-right: 24px;
}

/* Stems down for notes on or above the middle line */
.note.down::after { right: auto; left: 0; bottom: auto; top: 50%; }

/* Open notehead (half note) and whole note */
.note.open { background: transparent; border: 2px solid var(--black); }
.note.whole { background: transparent; border: 2px solid var(--black); }
.note.whole::after { display: none; }

/* Sharp sign, placed to the left of a notehead */
.note.sharp::before {
  content: "";
  position: absolute;
  left: -17px; top: 50%;
  width: 10px; height: 24px; margin-top: -19px;
  transform: rotate(20deg);   /* cancels the notehead's tilt so the sharp stands upright */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 24'%3E%3Cg stroke='black' fill='none'%3E%3Cpath d='M3 2V22M7 1V21' stroke-width='1'/%3E%3Cpath d='M0 11L10 8M0 18L10 15' stroke-width='2.4'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.group { font-size: 1rem; font-style: italic; margin: 48px 0 12px; }