/* ==========================================================
   HOME PAGE
   Loaded after the live styles and system.css. Layout and
   components for the portfolio home page only.
========================================================== */

/* ----------------------------------------------------------
   1. HOME: HEADLINE LAYER
   Tokens, textures, and the accent split live in system.css.
---------------------------------------------------------- */

/* Pure white headline layer (dark theme), for contrast against body text. */
html[data-theme="dark"] .masthead__name,
html[data-theme="dark"] .rw-heading h2,
html[data-theme="dark"] .case-list h3,
html[data-theme="dark"] .shot h3,
html[data-theme="dark"] .bookshelf__list cite,
html[data-theme="dark"] .rw-about__lede {
  color: var(--headline);
}

/* Dark theme blurb a step brighter than the other soft grey text. */
html[data-theme="dark"] .masthead__intro {
  color: #dcdfe0;
}


/* ----------------------------------------------------------
   2. TYPE + SPACING SCALE
   Smaller display sizes and a steadier rhythm (8px-based).
---------------------------------------------------------- */

.masthead {
  --mast-pad-top: 72px;
  --name-size: clamp(3rem, 5vw, 4.25rem);
  /* Minimum room reserved for the portrait beside the blurb. */
  --portrait-col: 300px;
  --intro-max: 820px;

  position: relative;
  grid-template-columns: minmax(0, 1fr) var(--portrait-col);
  gap: 48px;
  min-height: 0;
  padding: var(--mast-pad-top) 0 40px;
}

/* On wide screens the portrait stays pinned to the right edge of the
   content column, in line with the menu band and sections below, so
   extra width falls between the blurb (capped at --intro-max) and the
   photo instead of leaving a heavy right margin. */
@media (min-width: 1051px) {
  .masthead__content {
    max-width: none;
  }
}

/* Portrait stands on the menu band and runs up to the top of the page.
   The PNG's transparent left margin sits in the 48px gap, so the
   visible silhouette still clears the bio. */
.masthead__portrait {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
}

/* Sized by height; width follows the image's 984:917 ratio. The grid
   column (--portrait-col) reserves room for it beside the text. */
.masthead__portrait .portrait-image {
  width: auto;
  height: 100%;
}

.masthead__name {
  margin-bottom: 20px;
  font-family: "Gloock", Georgia, serif;
  font-size: var(--name-size);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: none;
}


.masthead__intro {
  max-width: var(--intro-max);
  /* Avoid stranded last lines like a lone ":)". */
  text-wrap: pretty;
  margin-bottom: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.6;
}

/* Menu band under the header: a full-bleed 15% black tint instead of
   rules above and below. */
.masthead {
  border-bottom: 0;
}

.rw-nav {
  gap: 12px 28px;
  padding: 18px 0;
  background: rgba(0, 0, 0, 0.15);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.15);
  clip-path: inset(0 -100vmax);
}

.rw-nav + main > .rw-section:first-child {
  border-top: 0;
}

.rw-nav a,
.rw-nav .theme-toggle {
  top: 0;
}


/* Menu, contact links, and footer in the accent (text step). */
.rw-nav a,
.rw-nav .theme-toggle,
.about-panel__links a,
.site-footer {
  color: var(--accent-text);
}

/* Theme toggle in a lighter tint of the light theme's orange,
   softened so it doesn't vibrate against the dark band. */
.rw-nav .theme-toggle {
  color: #f5946f;
}

/* Light theme: toggle (reads "Dark theme") in the theme's muted grey,
   and the menu band is a soft, transparent dirty orange. */
html:not([data-theme="dark"]) .rw-nav .theme-toggle {
  color: var(--muted);
}

html:not([data-theme="dark"]) .rw-nav {
  background: rgba(190, 112, 62, 0.12);
  box-shadow: 0 0 0 100vmax rgba(190, 112, 62, 0.12);
}

.rw-nav .theme-toggle:hover,
.rw-nav .theme-toggle:focus-visible {
  color: var(--text);
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}


/* ----------------------------------------------------------
   3. SECTIONS
---------------------------------------------------------- */

.rw-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

/* Headings: the masthead's Gloock at section scale, no ornaments. */
.rw-heading {
  margin-bottom: 32px;
}

.rw-heading h2 {
  margin: 0;
  font-family: "Gloock", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.rw-heading--split {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: flex-end;
  justify-content: space-between;
}

.rw-heading--split .filter-bar {
  margin-bottom: 2px;
}


/* ----------------------------------------------------------
   4. CASE STUDIES: text-led 2x2, no fake image tiles
---------------------------------------------------------- */

.case-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-list a {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 16px;
  height: 100%;
  padding: 24px 0 28px;
}

/* Paired two-column lists (case studies, personal projects): no rule
   across each row; instead one short vertical rule between the two
   items of a pair, centred in a 48px gutter. */
.case-list > :nth-child(odd) > a,
.projects-grid > :nth-child(odd) > a {
  padding-right: 24px;
}

.case-list > :nth-child(even) > a,
.projects-grid > :nth-child(even) > a {
  padding-left: 24px;
}

.case-list > :nth-child(odd):not(:last-child),
.projects-grid > :nth-child(odd):not(:last-child) {
  position: relative;
}

.case-list > :nth-child(odd):not(:last-child)::after,
.projects-grid > :nth-child(odd):not(:last-child)::after {
  position: absolute;
  top: 24px;
  right: 0;
  bottom: 28px;
  width: 1px;
  background: var(--border);
  content: "";
}

.case-list a > * {
  grid-column: 2;
}

.case-list__icon {
  grid-column: 1 !important;
  grid-row: 1 / span 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
}

.case-list__icon svg {
  width: 14px;
  height: 14px;
}

/* One card text system for case studies, portfolio, and personal
   projects: caps label for meta and tags, Cormorant title, muted body. */
.case-list__meta,
.case-list__tags,
.shot__meta,
.shot__tags {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-list h3,
.shot h3 {
  margin: 8px 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  transition: color 180ms ease;
}

.case-list p {
  max-width: 52ch;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.case-list a:hover h3,
.case-list a:focus-visible h3 {
  color: var(--accent-text);
}



/* ----------------------------------------------------------
   5. PORTFOLIO: image-led; filter by what was built
---------------------------------------------------------- */

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
}

/* Current Personal Projects: the case-study rhythm (paired columns with
   a vertical rule between, 24/28px padding), each with a 2:1 banner
   image above the text. */
.projects-intro {
  /* One line on desktop; wraps naturally on narrower screens. */
  max-width: none;
  margin: -12px 0 8px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.project-row.shot a {
  display: block;
  height: 100%;
  padding-top: 24px;
  padding-bottom: 28px;
}

/* The last row ends on the section's own padding, no extra 28px. */
.projects-grid > :nth-last-child(-n + 2):nth-child(odd) > a,
.projects-grid > :nth-last-child(-n + 2):nth-child(odd) + * > a {
  padding-bottom: 0;
}

.projects-grid > :nth-last-child(-n + 2):nth-child(odd)::after {
  bottom: 0;
}

.project-row.shot a > .shot__img {
  aspect-ratio: 2 / 1;
  margin-bottom: 16px;
}

.shot__desc {
  max-width: 52ch;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.shot {
  min-width: 0;
}

.shot a {
  display: block;
}

/* Signature motif: the portrait's cut-paper offset. On hover the image
   lifts up and right, revealing an accent silhouette on the left. */
.shot__img {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 12px;
  border-radius: 2px;
  background: var(--surface-secondary);
  box-shadow: 0 0 0 var(--accent);
  transition:
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shot a:hover .shot__img,
.shot a:focus-visible .shot__img {
  transform: translate(4px, -4px);
  box-shadow: -8px 6px 0 var(--accent);
}

.shot__img img {
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shot a:hover .shot__img img {
  transform: scale(1.03);
}

.shot__meta,
.shot__tags {
  display: block;
}



.shot a:hover h3,
.shot a:focus-visible h3 {
  color: var(--accent-text);
}




/* ----------------------------------------------------------
   6. ABOUT + CONDENSED BOOKSHELF
---------------------------------------------------------- */

.rw-about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  padding-bottom: 80px;
}

.rw-about__lede {
  margin-bottom: 24px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-style: italic;
}

.rw-about__main > .section-body p:not(.eyebrow):not(.rw-about__lede) {
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

/* Photo grid left of the bio: three photos and one accent statement
   tile in a 2x2 square. Photos sit in grayscale until hovered so their
   mixed lighting doesn't compete. In the DOM the photos follow the bio,
   so phones read the bio first. */
.rw-about__main {
  display: grid;
  grid-template-columns: 520px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 64px;
}

.rw-about__main > .rw-heading,
.rw-about__main > .section-body {
  grid-column: 2;
}

.about-photos {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
  aspect-ratio: 1;
}

.about-photos__tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--surface-secondary);
}

.about-photos__tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 300ms ease;
}

.about-photos__tile:hover img {
  filter: none;
}

.about-photos__tile figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* One sentence: a small-caps lead-in and three Gloock words, with an
   italic Cormorant ampersand. Text is #141414 on teal (dark theme) and
   white on orange (light theme). */
.about-photos__statement {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  container-type: inline-size;
  padding: 24px;
  background: var(--accent);
  color: #141414;
}

html:not([data-theme="dark"]) .about-photos__statement {
  color: #ffffff;
}

.about-photos__lead {
  margin: 0 0 8px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-transform: uppercase;
}

.about-photos__words {
  margin: 0;
  font-family: "Gloock", Georgia, serif;
  /* 1.8rem on desktop; scales with the tile so "& Relationships" always
     fits on one line. */
  font-size: min(1.8rem, 14.2cqi);
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.about-photos__amp {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
}

/* Principles & Methodologies: a one-line-per-principle list beside the
   connected icons from the earlier site, redrawn as 2 columns x 3 rows. */
.principles,
.bookshelf {
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.principles__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
  align-items: center;
}

.principles__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles__list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0 14px;
  padding: 10px 14px 10px 10px;
  border-left: 3px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}

.principles__list svg {
  grid-row: span 2;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  fill: var(--accent-text);
}

.principles__list b {
  color: var(--headline);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}

.principles__list span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.principles__list li.is-lit {
  border-left-color: var(--accent);
  background: var(--surface);
}

.principles__net {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 120px);
  justify-content: space-between;
  row-gap: 48px;
  width: 280px;
}

.principles__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
}

.principles__lines path {
  vector-effect: non-scaling-stroke;
}

.principles__node {
  position: relative;
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--background);
  color: var(--headline);
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.principles__node svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

/* Lit: accent fill and the cut-paper offset, lifting up and right. */
.principles__node.is-lit {
  border-color: var(--accent);
  background: var(--accent);
  color: #141414;
  transform: translate(4px, -4px);
  box-shadow: -8px 6px 0 color-mix(in srgb, var(--accent) 35%, transparent);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bookshelf__list {
  margin: 0;
  list-style: none;
  columns: 2;
  column-gap: 56px;
}

.bookshelf__list li {
  break-inside: avoid;
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.bookshelf__list cite {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.02rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.25;
}

.bookshelf__list span {
  flex: none;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}


/* ----------------------------------------------------------
   7. RESPONSIVE
---------------------------------------------------------- */

@media (max-width: 1050px) {
  /* About: one column, bio first, then the photo grid. The icon network
     drops away and the principles list takes the full width. */
  .rw-about__main {
    display: block;
  }

  .about-photos {
    max-width: 520px;
    margin-top: 32px;
  }

  .principles__body {
    display: block;
  }

  .principles__net {
    display: none;
  }

  /* Portrait moves to the left and stays large; the name and blurb wrap
     around its cut-out silhouette (shape-outside follows the PNG's alpha).
     Flow layout instead of grid so the float can shape the text. */
  .masthead {
    --portrait-h: 280px;
    display: flow-root;
    padding-bottom: 0;
  }

  .masthead__portrait {
    display: contents;
  }

  .masthead__portrait .portrait-image {
    float: left;
    width: auto;
    height: var(--portrait-h);
    /* top: level with the name's letters; left: pull the PNG's transparent
       margin (~11% of its height) out so the green edge meets the gutter */
    margin: calc(var(--name-size) * 0.0875) 8px 0 calc(var(--portrait-h) * -0.113);
    object-fit: initial;
    shape-outside: url("../images/portrait3-dark.png");
    shape-image-threshold: 0.4;
    shape-margin: 20px;
  }

  .masthead__intro {
    margin-bottom: 40px;
  }

  .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  /* Stacked: no side padding or vertical rule; a rule between items. */
  .case-list > :nth-child(n) > a,
  .projects-grid > :nth-child(n) > a {
    padding-right: 0;
    padding-left: 0;
  }

  .case-list > ::after,
  .projects-grid > ::after {
    display: none;
  }

  .case-list > * + * > a,
  .projects-grid > * + * > a {
    border-top: 1px solid var(--border);
  }

  .projects-grid > :nth-child(n):not(:last-child) > a {
    padding-bottom: 28px;
  }

  .about-photos {
    gap: 10px;
  }

  .about-photos__statement {
    padding: 16px;
  }

  .masthead {
    --mast-pad-top: 48px;
    --name-size: clamp(2.4rem, 10.5vw, 3rem);
    --portrait-h: 200px;
    padding-bottom: 0;
  }

  .masthead__portrait .portrait-image {
    shape-margin: 12px;
  }

  .masthead__intro {
    margin-bottom: 28px;
  }

  .masthead__name {
    line-height: 1.02;
  }

  .masthead__intro {
    font-size: 0.95rem;
  }

  .rw-section {
    padding: 48px 0;
  }

  .rw-heading {
    margin-bottom: 24px;
  }

  .rw-heading h2 {
    font-size: 1.6rem;
  }

  /* live responsive.css hides filters outside its old accordion */
  .rw-heading--split .filter-bar {
    display: flex;
    justify-content: flex-start;
    margin: 0;
  }

  .case-list {
    grid-template-columns: 1fr;
  }

  .case-list h3,
  .project-row.shot h3 {
    font-size: 1.3rem;
  }

  .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }

  /* Portfolio stays two narrow columns on phones: one step smaller. */
  .shelf-grid .shot h3 {
    font-size: 1.1rem;
  }

  .bookshelf__list {
    columns: 1;
  }
}


/* ----------------------------------------------------------
   8. MOBILE MENU TRAY (≤760px)
   The menu band becomes a tray in the CTA color that lives above the
   top of the screen. A tab hangs from its bottom edge; tapping it
   pulls the tray (and the tab with it) down. mobile-menu.js closes it
   on any link, outside tap, or Escape.
   Text on the tray is #141414 in both themes: 10.3:1 on the teal,
   6.1:1 on the orange (white on the orange would be only 3.0:1).
---------------------------------------------------------- */

.menu-tab {
  display: none;
}

@media (max-width: 760px) {
  html[data-theme] .rw-nav--tray {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 20px var(--page-padding) 24px;
    background: var(--accent);
    box-shadow: none;
    clip-path: none;
    visibility: hidden;
    transform: translateY(-100%);
    transition:
      transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
      box-shadow 320ms ease,
      visibility 0s linear 320ms;
  }

  html[data-theme] .rw-nav--tray.is-open {
    visibility: visible;
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition:
      transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
      box-shadow 320ms ease,
      visibility 0s;
  }

  /* 48px rows: comfortably above the 44px minimum touch target. */
  html[data-theme] .rw-nav--tray a,
  html[data-theme] .rw-nav--tray .theme-toggle {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0;
    color: #141414;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
  }

  html[data-theme] .rw-nav--tray .theme-toggle {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(20, 20, 20, 0.2);
    width: 100%;
    text-align: left;
    opacity: 0.75;
  }

  html[data-theme] .rw-nav--tray a::after {
    display: none;
  }

  /* The tab hangs from the tray's bottom edge, so it rides along. */
  .menu-tab {
    position: absolute;
    top: 100%;
    right: var(--page-padding);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 120px;
    min-height: 52px;
    padding: 4px 22px 6px;
    border: 0;
    border-radius: 0 0 10px 10px;
    background: var(--accent);
    color: #141414;
    font: 600 0.82rem/1 "Inter", sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    visibility: visible;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .menu-tab__chevron {
    width: 8px;
    height: 8px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 220ms ease;
  }

  .rw-nav--tray.is-open .menu-tab__chevron {
    margin-top: 3px;
    transform: rotate(225deg);
  }

  .menu-tab:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
  }

  /* Room for the tab above the name. */
  .masthead {
    --mast-pad-top: 76px;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  html[data-theme] .rw-nav--tray,
  html[data-theme] .rw-nav--tray.is-open {
    transition: none;
  }
}


/* ----------------------------------------------------------
   9. COLLAPSIBLE SECTIONS (≤760px)
   Each heading is a button (mobile-sections.js). Above 760px the button
   is disabled and styled as plain heading text; on phones the whole
   heading row is the tap target, with a chevron that flips when open.
---------------------------------------------------------- */

.section-toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
}

.section-toggle:disabled {
  color: inherit;
  cursor: inherit;
  opacity: 1;
}

.section-toggle__chevron {
  display: none;
}

@media (max-width: 760px) {
  .section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 48px;
    cursor: pointer;
  }

  .section-toggle:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 4px;
  }

  .section-toggle__chevron {
    display: block;
    flex: none;
    width: 11px;
    height: 11px;
    margin: -6px 6px 0 0;
    border-right: 2px solid var(--accent-text);
    border-bottom: 2px solid var(--accent-text);
    transform: rotate(45deg);
    transition: transform 220ms ease, margin 220ms ease;
  }

  .section-toggle[aria-expanded="true"] .section-toggle__chevron {
    margin-top: 6px;
    transform: rotate(225deg);
  }

  /* Every collapsible unit gets the same rule and rhythm. */
  .rw-about {
    gap: 0;
    padding: 0;
  }

  .rw-section:not(.rw-about),
  .rw-about__main,
  .principles,
  .bookshelf {
    padding: 14px 0;
    border-top: 1px solid var(--border);
  }

  .rw-nav + main > .rw-section:first-child {
    border-top: 1px solid var(--border);
  }

  /* Jumps from the menu land below the pinned tab (52px). */
  .rw-section,
  .rw-about__main,
  .principles,
  .bookshelf {
    scroll-margin-top: 64px;
  }

  .rw-section:not(.rw-about):not(.is-collapsed),
  .rw-about__main:not(.is-collapsed),
  .principles:not(.is-collapsed),
  .bookshelf:not(.is-collapsed) {
    padding-bottom: 40px;
  }

  .is-collapsed > .rw-heading {
    margin-bottom: 0;
  }

  /* The portfolio heading shares a flex row with its filters. */
  .rw-heading--split h2 {
    flex: 1 1 100%;
  }

  .is-collapsed > .section-body,
  .is-collapsed > .about-photos,
  .is-collapsed > .rw-heading .filter-bar {
    display: none !important;
  }

  .site-footer {
    border-top: 1px solid var(--border);
  }
}


/* ----------------------------------------------------------
   10. DESIGN SYSTEM CALLOUT
   One link to the design-system page. Sits directly under the menu
   band on desktop and tablet; on phones it moves to the end of <main>,
   just above the footer. Icon tile matches the case-study icon,
   scaled up, with a palette glyph.
---------------------------------------------------------- */

.ds-callout {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
}

.ds-callout__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ds-callout__icon svg {
  width: 26px;
  height: 26px;
}

.ds-callout__text {
  display: grid;
  gap: 4px;
}

.ds-callout__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  transition: color 180ms ease;
}

.ds-callout__sub {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ds-callout:hover .ds-callout__title,
.ds-callout:focus-visible .ds-callout__title {
  color: var(--accent-text);
}

.ds-callout:hover .ds-callout__icon,
.ds-callout:focus-visible .ds-callout__icon {
  transform: rotate(15deg);
}

html[data-theme="dark"] .ds-callout__title {
  color: var(--headline);
}

html[data-theme="dark"] .ds-callout:hover .ds-callout__title,
html[data-theme="dark"] .ds-callout:focus-visible .ds-callout__title {
  color: var(--accent-text);
}

/* The callout takes the first slot, so Case Studies gets its rule back:
   a 3px strip in the menu band's color, echoing the band above. (At 1px
   the band tint is invisible on the dark background.) */
.ds-callout + .rw-section {
  border-top: 3px solid rgba(190, 112, 62, 0.12);
}

html[data-theme="dark"] .ds-callout + .rw-section {
  border-top-color: rgba(0, 0, 0, 0.15);
}

@media (max-width: 760px) {
  main:has(> .ds-callout) {
    display: flex;
    flex-direction: column;
  }

  main > .ds-callout {
    order: 99;
    align-items: flex-start;
    gap: 16px;
    padding: 28px 0 36px;
    border-top: 1px solid var(--border);
  }

  .ds-callout__title {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ds-callout__icon {
    transition: none;
  }
}
