/* DEFAULTS */

:root {
    --font-serif: "Noto Serif", sans-serif;
    --font-sans: "Inter", sans-serif;
    --rule: 1.5px dotted currentColor;
    --sidebar-bg: #d9e8e3;
}

[data-theme = "pink"] {
    --sidebar-bg: #fbe4e2;
}

body {
    font-family: var(--font-sans);
    margin: 0;
}

a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover {
    text-decoration-style: solid;
}

hr {
    border: 0;
    border-top: var(--rule);
    margin: 1rem 0;
    
}

/* headings */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin: 2rem 0 1rem;
}

h1, h2, h3 {
    font-family: var(--font-sans);
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 800;
}

h4, h5 {
    font-family: var(--font-serif);
}

h4 {
    font-size: 1.5rem;
    font-weight: 250;
}

h5 {
    font-size: 1.25rem;
    font-weight: 300;
}

/* adjust margins when heading follows an hr */
hr + h1,
hr + h2,
hr + h3,
hr + h4,
hr + h5,
hr + h6 {
  margin-top: 1rem;
}

/* block quote */
blockquote {
    margin: 2rem 0;
    padding-left: 2rem;
    border-left: var(--rule);
}

/* inline code */
code {
    font-family: monospace;
}

/* code block */

pre {
    padding: 1rem;
    background-color: #fbe4e2;
    border-radius: 0.4rem;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* centered text */

.centered {
    text-align: center;
}

/* MAIN CONTAINER */

.site-layout {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    min-height: 100vh;
}

/* MAIN MENU */

.sidebar {
    position: sticky;
    overflow: visible;
    top: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    /* z index for gradient */
    z-index: 2;

    align-self: start;
    height: 100vh;
    box-sizing: border-box;

    padding: 3rem;
    padding-right: 0.1rem;
    background: var(--sidebar-bg);

    text-align: right;
}

/* Gradient effect */
.sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    /* z index for gradient */
    z-index: 1;

    /* adjust width of effect: */
    right: -100px;
    width: 100px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(
        to right,
        var(--sidebar-bg) 0%,
        transparent 100%
    );
}

.site-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 150;
    font-style: italic;
    letter-spacing: -0.1rem;
    margin-bottom: 0.1rem;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-subtitle {
    font-family: var(--font-sans);
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.site-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.main-content {
    width: 100%;
    min-width: 0;
    /* z index for gradient */
    z-index: 3;
    box-sizing: border-box;
    padding: 3rem;
    padding-left: 5rem;
}

/* MOBILE */

@media (max-width: 700px) {
    .site-layout {
        display: block;
    }

    .sidebar {
        position: relative;
        height: auto;
        text-align: right;
        padding: 1rem;
        z-index: 1;
    }

    .sidebar::after {
        top: 100%;
        right: 0;
        bottom: auto;

        z-index: 1;
        width: 100%;
        height: 80px;

        background: linear-gradient(
            to bottom,
            var(--sidebar-bg) 0%,
            transparent 100%
        );
    }

    .site-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }

    .site-nav a {
        text-align: center;
    }

    .main-content {
        position: relative;
        padding: 1rem;
        z-index: 2;
    }
}

/* FRONTISPIECE IMAGE */

.frontispiece {
    width: 100%;
    max-width: 100%;
    margin-bottom: 2rem;
}

.frontispiece video {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

/* WORKS INDEX */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    /* border: 1px solid; */
}

@media (max-width: 800px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
}

.works-category {
    display: flex;
    flex-direction: column;
    /* border: 1px solid; */
}

.works-category-header {
    min-height: 3.5rem;
    display: flex;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    border-bottom: var(--rule);
}

.works-category-header h2 {
    margin: 0;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 800;
}

.work-index-item {
    margin-bottom: 1.5rem;
}

.work-index-title {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 200;
    font-style: italic;
}

.work-index-instrumentation {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 300;
}

/* PROGRAM NOTES */

.program-note.centered {
    text-align: center;
}

/* WORKS PAGES */

.work-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 2rem;
}

.work-back-arrow {
    text-decoration: none;
    user-select: none;
}

.work-back-link a {
    /* Usually unnecessary if your global link styles already do this */
    color: inherit;
    text-transform: uppercase;
    font-size: 0.9rem;
    /* font-weight: 200; */
}

.work-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;

  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: var(--rule);
}

.work-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 150;
  font-size: 3.25rem;
  font-style: italic;
  line-height: 1;
}

.work-heading-right {
  text-align: right;
}

@media (max-width: 700px) {
    .work-heading {
        grid-template-columns: 1fr;
    }

    .work-heading-right {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 1rem;
        align-items: end;

        text-align: left;
    }

    .work-purchase {
        text-align: right;
    }
}

.work-year {
  font-weight: 700;
}

.work-brief-instrumentation {
  margin-top: 0.25rem;
}

.work-purchase {
    margin-top: 0.5rem;
}

.work-purchase a {
    display: inline-block;
    color: inherit;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 0.25rem 0.75rem;
    background-color: #fbe4e2;
    border-radius: 0.4rem;
}

.purchase-right-arrow {
    text-decoration: none;
    user-select: none;
}

.work-media {
  width: 100%;
  margin-bottom: 0rem;
  padding-bottom: 1rem;
  border-bottom: var(--rule);
}

.work-media iframe,
.work-media img,
.work-media video {
  display: block;
  width: 100%;
  max-width: 100%;
}

.work-media iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* Work Meta (two columns) */

.work-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    margin: 1rem 0;
    padding-bottom: 1rem;
    border-bottom: var(--rule);
}

.work-meta-left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.work-meta-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.work-meta-purchase a {
    color: inherit;
    text-transform: uppercase;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.75rem 0.75rem;
    background-color: #fbe4e2;
    border-radius: 0.4rem;
}

/* FULL WIDTH MEDIA  */

.full-width-media {
    width: 100%
}

.full-width-media iframe,
.full-width-media img,
.full-width-media video {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* 16:9 video embeds */
.full-width-media iframe {
    aspect-ratio: 16 / 9;
}

/* Google Drive PDFs */
.score-preview iframe {
    height: 75vh;
}
