:root {
  color-scheme: light;
  --ink: #2b2032;
  --muted: #625869;
  --plum: #231831;
  --plum-dark: #1b1327;
  --accent: #604784;
  --lavender: #d7c9f1;
  --paper: #fbf8f2;
  --ivory: #fffdf8;
  --line: #ded6df;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, sans-serif;
  font-family: var(--body);
  font-size: 100%;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; }
::selection { background: #e1d2f9; color: var(--plum); }
:focus-visible { outline: 2px solid #956bc5; outline-offset: 4px; }
.shell { width: min(100% - 76px, 1260px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 4; top: 8px; left: 8px; padding: 10px 16px; background: var(--ivory); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1; }

.site-header { background: var(--plum-dark); color: var(--paper); border-bottom: 1px solid #ffffff25; }
.header-content { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 26px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font: 1.63rem/1 var(--display); text-decoration: none; white-space: nowrap; }
.wordmark em { color: #f0d8ae; }
.mark { width: 30px; height: 30px; display: inline-flex; justify-content: center; align-items: center; gap: 3px; border: 1px solid #a89ab8; border-radius: 50%; }
.mark i { height: 11px; width: 1px; background: #f0d8ae; border-radius: 1px; transform: rotate(18deg); }
.mark i:nth-child(2) { height: 16px; }
.header-content nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.header-content nav a { text-decoration: none; white-space: nowrap; font-size: .93rem; color: #e4dce9; padding-block: 5px; }
.header-content nav a:hover, .header-content nav a:focus-visible { color: #f0d8ae; }

.hero { position: relative; isolation: isolate; overflow: hidden; color: #faf5ec; background: var(--plum); }
.hero-visual { position: absolute; z-index: -1; inset: 0 0 0 37%; overflow: hidden; background: #4d3b61 url("parliament-house-fallback.jpg") center / cover no-repeat; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 48% 51%; }
.hero-visual::after { position: absolute; content: ""; inset: 0; background: linear-gradient(90deg, var(--plum) 0%, rgba(35,24,49,.88) 10%, rgba(35,24,49,.24) 45%, rgba(35,24,49,.10) 100%), linear-gradient(0deg, #211729a8, transparent 48%); }
.hero-content { min-height: 512px; padding-block: 64px; display: flex; align-items: center; position: relative; }
.hero-copy { max-width: 580px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: #ecce9b; font-size: .82rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow span { width: 24px; height: 1px; background: currentColor; }
.hero h1 { margin: 17px 0 22px; font-size: clamp(6rem, 9.4vw, 9.05rem); line-height: .77; letter-spacing: -.036em; }
.hero h1 em { color: #dfd0f9; font-weight: 400; }
.hero-intro { max-width: 433px; color: #f5edf5; font-size: clamp(1rem, 1.34vw, 1.16rem); line-height: 1.58; margin-top: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 27px; margin-top: 27px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 4px; text-decoration: none; font-weight: 700; font-size: .95rem; }
.button-primary { background: var(--lavender); color: var(--plum); border-color: var(--lavender); }
.button-primary:hover { background: #e9ddff; border-color: #e9ddff; }
.text-link { color: #f9f3fa; text-underline-offset: 5px; text-decoration-color: #c4adce; font-size: .95rem; }
.text-link:hover { color: #f0d8ae; }
.photo-caption { position: absolute; right: 0; bottom: 21px; color: white; background: #181021b8; border: 1px solid #ffffff38; padding: 5px 10px; border-radius: 3px; font-size: .78rem; text-decoration: none; }

.stats-band { background: #eee7f5; border-bottom: 1px solid #e4dbea; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 20px 23px; }
.stats div { display: flex; flex-direction: column-reverse; padding: 0 22px 0 31px; border-left: 1px solid #d4c8dd; gap: 3px; }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats dd { font: 3.05rem/.94 var(--display); color: #4a345e; }
.stats dt { font-size: .89rem; font-weight: 600; color: #574961; }

.featured-section { padding-block: 59px 66px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px 23px; margin-bottom: 24px; }
.section-heading h2, .about-section h2 { font-size: clamp(2.85rem, 5vw, 4.3rem); letter-spacing: -.035em; }
.subtle-link { color: var(--accent); font-size: .93rem; font-weight: 700; text-underline-offset: 4px; padding-bottom: 4px; }
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }
.featured-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--ivory); text-decoration: none; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; transition: border-color .16s, box-shadow .16s; }
.featured-card:hover, .person-card:hover { border-color: #aa94c5; box-shadow: 0 8px 22px #39234611; }
.featured-image { height: clamp(180px, 19vw, 250px); position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(135deg, #c9b8df, #8e74a8); }
.featured-image::before { position: absolute; inset: 0; display: grid; place-content: center; z-index: -1; content: attr(data-initials); color: #faf3fec9; font: clamp(5rem, 9vw, 8rem)/1 var(--display); }
.featured-image img { width: 100%; height: 100%; object-fit: cover; object-position: var(--position, center 30%); }
.featured-image::after { position: absolute; content: ""; inset: 55% 0 0; background: linear-gradient(0deg, #1a112f72, transparent); pointer-events: none; }
.featured-body { padding: 16px 18px 19px; display: grid; gap: 6px; }
.featured-body h3 { font-size: clamp(2rem, 2.6vw, 2.58rem); letter-spacing: -.022em; }
.featured-body .profile-meta { color: var(--muted); font-size: .91rem; }
.featured-body .profile-meta span + span::before { content: " · "; color: var(--accent); }
.feature-tag { position: absolute; z-index: 1; left: 13px; bottom: 12px; font-size: .76rem; color: white; background: #241831d9; padding: 4px 8px; border: 1px solid #ffffff3d; border-radius: 3px; }

.directory-section { border-block: 1px solid #e5dce8; background: #f2edf4; padding-block: 60px 62px; scroll-margin-top: 15px; }
.directory-heading p { color: var(--muted); margin-top: 9px; font-size: 1rem; }
.snapshot { display: inline-flex; align-items: center; gap: 8px; color: #514358; background: #e8deee; border: 1px solid #ded1e5; padding: 6px 10px; border-radius: 3px; font-size: .83rem; font-weight: 600; }
.snapshot span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.directory-controls { display: grid; grid-template-columns: minmax(240px, 1.65fr) minmax(165px, 1fr) minmax(170px, 1fr) minmax(155px, .8fr); gap: 12px; margin-top: 24px; }
.control { min-width: 0; display: grid; gap: 5px; }
.control label { font-size: .86rem; font-weight: 700; }
.control input, .control select { width: 100%; min-width: 0; min-height: 45px; padding: 10px 11px; border: 1px solid #cbbfd3; border-radius: 4px; background: var(--ivory); color: var(--ink); font-size: .95rem; }
.control input::placeholder { color: #6c6273; }
.control select { appearance: none; padding-right: 33px; background-image: linear-gradient(45deg, transparent 50%, #62506d 50%), linear-gradient(135deg, #62506d 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.search-input { position: relative; }
.search-input input { padding-left: 39px; }
.search-icon { position: absolute; width: 13px; height: 13px; border: 1.5px solid #67536d; border-radius: 50%; top: 15px; left: 14px; pointer-events: none; }
.search-icon::after { position: absolute; content: ""; width: 6px; height: 1.5px; background: #67536d; transform: rotate(45deg); top: 10px; left: 8px; }
.archive-note { margin-top: 17px; padding: 12px 14px; background: #f9f0dd; color: #574735; border-left: 3px solid #a87b3e; }
.directory-summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 54px; color: #564a60; font-size: .9rem; }
.text-button { padding: 3px 0; border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.person-card { display: grid; position: relative; gap: 8px; padding: 17px 17px 18px; min-width: 0; min-height: 163px; background: var(--ivory); border: 1px solid var(--line); border-radius: 4px; text-decoration: none; align-content: start; transition: border-color .16s, box-shadow .16s; }
.card-top { display: flex; justify-content: space-between; gap: 8px 13px; align-items: center; flex-wrap: wrap; }
.card-parliament { color: var(--accent); font-size: .76rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 3px; color: #425645; background: #e8efe6; font-size: .75rem; line-height: 1.25; font-weight: 700; white-space: nowrap; }
.status.archived { background: #f4ead7; color: #72502a; }
.person-card h3 { font-size: clamp(1.8rem, 2.6vw, 2.23rem); letter-spacing: -.018em; overflow-wrap: break-word; }
.person-card .profile-meta { color: #5e5365; font-size: .88rem; line-height: 1.36; }
.person-card .card-bio { color: var(--muted); font-size: .9rem; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty-state { grid-column: 1 / -1; padding: 31px 22px; background: var(--ivory); border: 1px solid var(--line); }
.empty-state h3 { font-size: 2rem; margin-bottom: 7px; }
.empty-state p { color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 23px; }
.pagination p { color: var(--muted); font-size: .88rem; }
.pagination button { background: var(--ivory); color: var(--accent); border: 1px solid #cbbfd3; padding: 7px 13px; border-radius: 4px; font-weight: 700; font-size: .89rem; }
.pagination button:disabled { opacity: .50; cursor: default; }
.pagination button:not(:disabled):hover { background: #e8deee; }

.about-section { padding-block: 68px; display: grid; grid-template-columns: minmax(240px, .8fr) 1.2fr; gap: 40px; }
.dark-eyebrow { color: var(--accent); margin-bottom: 11px; }
.about-copy { max-width: 670px; color: var(--muted); font-size: 1.04rem; }
.about-copy p + p { margin-top: 14px; }
.about-copy details { margin-top: 19px; }
.about-copy summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 700; }
.about-copy ul { margin: 10px 0 0; padding-left: 18px; font-size: .88rem; }
.about-copy li + li { margin-top: 5px; }
.about-copy a { text-underline-offset: 3px; }
.site-footer { color: #ecdfef; background: var(--plum-dark); }
.footer-content { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 17px 22px; flex-wrap: wrap; padding-block: 16px; }
.footer-content > span { font-size: .87rem; color: #c9becf; }

.gallery-heading { background: var(--plum); color: var(--paper); border-bottom: 5px solid #dacaed; padding-block: 46px 50px; }
.gallery-heading h1 { margin-block: 10px 15px; font-size: clamp(3.65rem, 8vw, 7.6rem); letter-spacing: -.034em; }
.gallery-heading h1 em { color: #dfd0f9; }
.gallery-heading p:not(.eyebrow) { font-size: clamp(1rem, 1.56vw, 1.17rem); color: #e9dff0; }
.gallery-content { padding-block: 31px 65px; }
.gallery-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr); gap: 13px; width: min(100%, 660px); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.gallery-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: var(--ivory); border-radius: 5px; overflow: hidden; }
.gallery-card:focus-within, .gallery-card:hover { border-color: #aa94c5; }
.gallery-card-link { flex: 1; display: flex; flex-direction: column; text-decoration: none; }
.gallery-card-link:focus-visible { outline-offset: -3px; }
.gallery-photo { display: block; aspect-ratio: 1 / 1; background: #ede6ef; overflow: hidden; }
.gallery-photo img { width: 100%; height: 100%; object-fit: contain; }
.gallery-photo:not(:has(img)) { display: grid; place-content: center; }
.gallery-photo:not(:has(img))::after { content: "Portrait unavailable"; font-size: .86rem; color: var(--muted); }
.profile-portrait:not(:has(img))::after { color: var(--paper); }
.gallery-card-text { display: grid; gap: 6px; padding: 13px 14px 15px; }
.gallery-card h2 { font-size: clamp(1.65rem, 2.5vw, 2.25rem); overflow-wrap: anywhere; }
.gallery-card-link:hover h2 { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.gallery-seat { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.portrait-credit { display: grid; gap: 2px; color: var(--muted); font-size: .81rem; line-height: 1.35; overflow-wrap: anywhere; }
.gallery-card .portrait-credit { border-top: 1px solid var(--line); padding: 9px 14px 11px; }
.portrait-credit a { text-underline-offset: 3px; }
.profile-credit { margin-top: 13px; }
#gallery-empty h2 { font-size: 2rem; margin-bottom: 7px; }

.profile-breadcrumb { display: flex; flex-wrap: wrap; gap: 9px 18px; padding-block: 18px; font-size: .91rem; color: var(--accent); }
.profile-breadcrumb a { text-underline-offset: 4px; font-weight: 700; }
.profile-heading-band { color: var(--paper); background: var(--plum); border-bottom: 5px solid #dacaed; }
.profile-heading { display: grid; grid-template-columns: 1fr minmax(0, 245px); gap: 32px; align-items: center; min-height: 310px; padding-block: 34px; }
.profile-heading.no-photo { grid-template-columns: minmax(0, 1fr); }
.profile-heading .eyebrow { margin-bottom: 12px; }
.profile-heading h1 { font-size: clamp(3.8rem, 8vw, 7rem); letter-spacing: -.038em; line-height: .92; color: var(--paper); overflow-wrap: break-word; }
.profile-heading .headline-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: 1.03rem; color: #e9dff0; }
.profile-heading .headline-meta .status { font-size: .82rem; }
.profile-image { height: 237px; border-radius: 5px; border: 1px solid #8c759b; object-fit: cover; object-position: var(--position, 50% 30%); }
.profile-portrait { height: 237px; aspect-ratio: auto; border-radius: 5px; border: 1px solid #8c759b; background: #352742; }
.profile-portrait .profile-image { border: 0; border-radius: 0; }
.profile-body { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(270px, .86fr); align-items: start; gap: 43px; padding-block: 47px 64px; }
.profile-body h2 { font-size: clamp(2.6rem, 4.4vw, 3.5rem); letter-spacing: -.024em; margin-bottom: 14px; }
.profile-biography { color: #403345; font-size: clamp(1.1rem, 1.68vw, 1.32rem); line-height: 1.65; }
.profile-sources { margin-top: 31px; }
.profile-sources h2 { font-size: 2.25rem; }
.profile-sources p, .profile-sources li { color: var(--muted); }
.profile-sources ul { margin: 0; padding-left: 19px; display: grid; gap: 5px; }
.profile-sources a { color: var(--accent); text-underline-offset: 4px; overflow-wrap: anywhere; }
.profile-note { border-left: 3px solid #ab8ebf; padding: 10px 14px; background: #f0e8f4; color: #55455e; margin-top: 19px; font-size: .92rem; }
.facts-card { padding: 20px; background: #f1eaf5; border: 1px solid #e3d9ea; border-radius: 4px; }
.facts-card h2 { font-size: 2.25rem; }
.facts-card dl div { display: grid; gap: 1px; padding: 9px 0; border-top: 1px solid #ddcfe4; }
.facts-card dt { font-size: .8rem; font-weight: 700; color: #615166; }
.facts-card dd { font-size: .99rem; color: #33273b; }
.facts-card .button { margin-top: 11px; background: var(--ivory); border-color: #cdbdd8; color: var(--accent); }
.facts-card .button:hover { background: #e9ddf3; }
.missing-profile { min-height: 430px; padding-block: 58px; }
.missing-profile h1 { font-size: 3.6rem; margin-bottom: 14px; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 52px); }
  .directory-controls { grid-template-columns: 1.35fr 1fr 1fr; }
  .sort-control { grid-column: 1 / 2; }
  .hero-content { min-height: 475px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .wordmark { font-size: 1.4rem; }
  .header-content { min-height: 65px; gap: 8px 16px; align-content: center; flex-wrap: wrap; padding-block: 10px; }
  .header-content nav { gap: 10px 17px; flex-wrap: wrap; }
  .header-content nav a { font-size: .84rem; }
  .hero-content { padding-block: 50px 75px; min-height: 445px; }
  .hero-visual { inset: 0; opacity: .8; }
  .hero-visual::after { background: linear-gradient(90deg, rgba(35,24,49,.95) 0%, rgba(35,24,49,.83) 35%, rgba(35,24,49,.5) 100%), linear-gradient(0deg, #21172987, transparent 55%); }
  .hero h1 { font-size: clamp(3.9rem, 15vw, 6.4rem); }
  .hero-intro { max-width: 360px; margin-top: 25px; }
  .hero-actions { margin-top: 21px; }
  .photo-caption { bottom: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 14px; padding-block: 17px; }
  .stats div { padding-inline: 13px 1px; }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats dd { font-size: 2.52rem; }
  .stats dt { font-size: .83rem; }
  .featured-section, .directory-section, .about-section { padding-block: 42px; }
  .featured-grid { gap: 11px; }
  .featured-image { height: clamp(110px, 22vw, 155px); }
  .featured-body { padding: 11px; }
  .featured-body h3 { font-size: 1.7rem; }
  .featured-body .profile-meta { font-size: .80rem; }
  .feature-tag { font-size: .68rem; left: 7px; bottom: 7px; }
  .directory-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-control { grid-column: 1 / -1; }
  .people-grid, .profile-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-section { grid-template-columns: 1fr; gap: 18px; }
  .about-section h2 br { display: none; }
  .profile-heading { grid-template-columns: 1fr minmax(0, 125px); gap: 16px; min-height: 240px; }
  .profile-image, .profile-portrait { height: 150px; }
  .profile-body { gap: 23px; }
  .gallery-heading { padding-block: 34px 39px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .gallery-controls .search-control { grid-column: auto; }
}
@media (max-width: 450px) {
  .featured-grid, .people-grid, .profile-body { grid-template-columns: 1fr; }
  .featured-card { display: grid; grid-template-columns: 35% 1fr; }
  .featured-image { height: 108px; }
  .feature-tag { display: none; }
  .featured-body { align-content: center; }
  .person-card { min-height: 135px; }
  .profile-heading h1 { font-size: clamp(2.9rem, 11vw, 4.3rem); }
  .gallery-controls { grid-template-columns: 1fr; }
  .gallery-card-text, .gallery-card .portrait-credit { padding-inline: 9px; }
  .gallery-card h2 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
