/* mmiddleton.com — design tokens and layout, mirroring the Figma file
   "mmiddleton.com — Personal website" (Colour collection, Dimensions, text styles).

   Contents
   1. Fonts and colour tokens
   2. Base and type styles
   3. Nav
   4. Sections, buttons, links and dropdown menus
   5. One-page panels (snap scrolling, fade, text bands)
   6. Page 01 — Home
   7. Page 02 — About
   8. Page 03 — Projects
   9. Pages 04 and 05 — Newsletter and Contact forms, footer
   10. Responsive: wide (1100px+), tablets and up (768px+), mid (768–1099px), phones (to 767px) */

/* ---------- 1. Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("../fonts/atkinson-hyperlegible-mono-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-petch-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Colour tokens: light by default; dark follows the visitor's system setting */
:root {
  --bg-page: #f4f1ec;
  --bg-surface: #ece8e1;
  --ink-primary: #111111;
  --ink-secondary: #5c5852;
  --ink-muted: #9a958d;
  --line-default: #d6d1c9;
  --line-strong: #111111;
  --accent: #f2573d;
  --on-accent: #f4f1ec;

  --font-sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --font-display: "Chakra Petch", var(--font-sans);

  --pad: 64px;
  --max: 1440px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #0b0b0b;
    --bg-surface: #161616;
    --ink-primary: #f4f1ec;
    --ink-secondary: #a8a39b;
    --ink-muted: #6e6a64;
    --line-default: #2a2a2a;
    --line-strong: #f4f1ec;
    --accent: #ff6a4d;
    --on-accent: #0b0b0b;
    color-scheme: dark;
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
p + p { margin-top: 1em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.skip-link {
  position: absolute; left: -9999px; top: 8px; padding: 8px 12px;
  background: var(--accent); color: var(--on-accent); z-index: 100;
}
.skip-link:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.nowrap { white-space: nowrap; }

/* Type styles (names match the Figma text styles) */
.display-xl, .display-lg, .display-md { font-family: var(--font-display); font-weight: 700; margin: 0; }
.display-xl { font-size: clamp(56px, 8.3vw, 120px); line-height: 0.96; letter-spacing: -0.01em; }
.display-lg { font-size: clamp(48px, 5.5vw, 80px); line-height: 1; letter-spacing: -0.005em; }
.display-md { font-size: 56px; line-height: 1.04; letter-spacing: -0.01em; }
/* Display type is drawn with a sketched hatch fill instead of solid ink (follows dark mode) */
.display-xl, .display-lg, .display-md {
  color: transparent;
  background-color: transparent;
  background-image: repeating-linear-gradient(-45deg, var(--ink-primary) 0 3.5px, transparent 3.5px 5px);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 0.7px var(--ink-primary);
}
.heading-lg { font-weight: 700; font-size: 36px; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
.heading-md { font-weight: 700; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
.body-lg { font-size: 20px; line-height: 1.5; }
.body-md { font-size: 17px; line-height: 1.6; }
.body-sm { font-size: 15px; line-height: 1.5; }
.label, .label-lg, .label-sm {
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}
.label { font-size: 13px; }
.label-lg { font-size: 20px; }
.label-sm { font-size: 11px; letter-spacing: 0.08em; }
.mono { font-family: var(--font-mono); font-weight: 400; font-size: 15px; line-height: 1.5; }
.accent { color: var(--accent); }
.secondary { color: var(--ink-secondary); }
.muted { color: var(--ink-muted); }
.measure { max-width: 720px; }

/* ---------- 3. Nav: sticky header on every screen size ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg-page); border-bottom: 1px solid var(--line-default); }
.nav .bar { display: flex; align-items: center; justify-content: flex-start; gap: 40px; padding-top: 24px; padding-bottom: 24px; }
.nav .links { display: flex; align-items: center; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav .links a { text-decoration: none; color: var(--ink-secondary); line-height: 1.8; white-space: nowrap; }
.nav .links a:hover, .nav .links a[aria-current="page"] { color: var(--ink-primary); }
.nav .links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); }
/* Menu button, phones only. No `font: inherit`: the shorthand would override the .label mono styling. */
.menu-toggle { display: none; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-primary); }

/* ---------- 4. Sections, buttons, links and dropdown menus ---------- */
.section { padding: 96px 0; }
.section + .section { padding-top: 0; }
/* Vertical rhythm between siblings. These come after the type styles so they win over the headings' zero margin. */
.stack > * + * { margin-top: 24px; }
.stack-lg > * + * { margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 24px; border: 1px solid transparent; text-decoration: none; cursor: pointer;
  font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.3; background: none; color: var(--ink-primary);
}
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(0.95); }
.btn[disabled] { opacity: 0.6; cursor: default; }
/* Chamfered outline button: 2px coral line, page-coloured inside, cut corners top-left and bottom-right.
   The accent background is the line; the ::before layer is the fill, inset by the line width. */
.btn-chamfer { position: relative; isolation: isolate; color: var(--accent); background: var(--accent); border: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.btn-chamfer::before { content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--bg-page);
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px); }
.btn-chamfer:hover { color: var(--on-accent); }
.btn-chamfer:hover::before { background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.text-link { font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Chamfered dropdown menus (project sort and filter; the role picker on phones) */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; min-width: 260px; padding: 14px 18px; display: grid; gap: 10px;
  background: var(--accent); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.dropdown-menu::before { content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--bg-page);
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px); }
.dropdown-menu[hidden] { display: none; }
.dropdown-menu .option { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink-secondary); font-size: 14px; }
.dropdown-menu .option input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.dropdown-menu .option:has(input:checked) { color: var(--accent); }
.dropdown-menu .clear { background: none; border: 0; padding: 8px 0 0; margin-top: 4px; border-top: 1px solid var(--line-default); cursor: pointer; font: inherit; color: var(--accent); text-align: left; }

/* ---------- 5. One-page panels: full height, snap scrolling, fade in and out ---------- */
html { scroll-snap-type: y mandatory; scroll-padding-top: 73px; scroll-behavior: smooth; }
.panel { min-height: calc(100vh - 73px); min-height: calc(100svh - 73px); scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center; }
.panel .section { padding: 48px 0; }
.panel .section + .section { padding-top: 0; }
.panel .footer { margin-top: auto; }
.fade { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s ease; will-change: opacity, transform; }
.panel.is-visible .fade { opacity: 1; transform: none; }
.panel.is-leaving .fade { opacity: 0; transform: translateY(-40px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; scroll-behavior: auto; }
  .fade, .panel.is-leaving .fade { opacity: 1; transform: none; transition: none; }
}
/* Text bands: every heading, paragraph and list item carries a page-coloured band behind it, so text
   stays readable where it overlaps an image. Invisible elsewhere, and follows dark mode. */
.panel h1, .panel h2, .panel h3, .panel p, .panel li, .panel .roles {
  background: var(--bg-page); width: fit-content; max-width: 100%;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  padding-left: 0.15em; padding-right: 0.15em; margin-left: -0.15em;
}
.panel .label-lg { padding-right: 0.3em; }
.panel li { padding-left: 0; margin-left: 0; }
.panel .form-status, .panel .banner p, .panel .banner h2 { width: auto; }
/* Display headings keep their hatch fill and original measure: no band, no side padding */
.panel .display-xl, .panel .display-lg { background-color: transparent; padding-left: 0; padding-right: 0; margin-left: 0; }

/* ---------- 6. Page 01 — Home: the portrait sits behind the copy at the right and scales with the window ---------- */
.hero-layout { position: relative; }
.hero-layout .copy { position: relative; z-index: 1; isolation: isolate; }
.hero-portrait { position: absolute; top: 0; right: 0; margin: 0; z-index: -1; pointer-events: none; }
.hero-portrait img { width: clamp(260px, 39vw, 560px); height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-layout .display-xl { max-width: calc(100% - clamp(260px, 39vw, 560px) - 32px); }   /* the motto stops short of the portrait */
.hero-layout .intro { max-width: 720px; }

/* ---------- 7. Page 02 — About ---------- */
/* One grid; the portrait takes a different cell at each width (see section 10) */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 24px; align-items: start; }
.about-grid > .roles, .about-grid > .chamfer-frame, .about-grid > .about-prompt { grid-column: 1 / -1; }
.about-prompt { margin-top: 24px; }
.about-portrait { margin: 0; pointer-events: none; }
.about-portrait img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

/* Roles line: clickable roles select a topic (bold coral when chosen). It sits in a page-coloured box
   the width of the frame, so there is clear space around the words where they meet the portrait. */
.roles .role { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.roles .role:hover { color: var(--ink-primary); }
.roles .role.is-active { color: var(--accent); font-weight: 700; }
.panel .roles { box-decoration-break: slice; -webkit-box-decoration-break: slice;
  padding: 14px 20px 14px 0; margin-left: 0; width: 100%; max-width: 640px; }
.role-select { display: none; }   /* the dropdown version of the roles line; phones only */
.dropdown-menu .role { display: block; text-align: left; color: var(--ink-secondary); background: none; border: 0; padding: 4px 0;
  cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: uppercase; }
.dropdown-menu .role.is-active, .dropdown-menu .role:hover { color: var(--accent); font-weight: 700; }

/* Expertise frame: a chamfered outline (same 2px coral line and cut corners as the buttons) filled with the page colour */
.chamfer-frame { position: relative; isolation: isolate; max-width: 640px; padding: 24px; }
.chamfer-frame::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--accent);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.chamfer-frame::after { content: ""; position: absolute; inset: 2px; z-index: -1; pointer-events: none; background: var(--bg-page);
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px); }
/* All three expertise blocks share one grid cell, so the frame keeps the height of the tallest
   and nothing jumps; the active one fades in over the others. */
.columns { display: grid; }
.columns .column { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateX(16px);
  transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s; }
.columns .column.is-active { opacity: 1; visibility: visible; transform: none;
  transition: opacity .4s ease, transform .4s ease, visibility 0s; }
@media (prefers-reduced-motion: reduce) { .columns .column, .columns .column.is-active { transition: none; transform: none; } }
.column > * + * { margin-top: 24px; }
.column .skills-label + .skills { margin-top: 24px; }
.column .skills-group { margin-top: 16px; }          /* "Product sustainability:" sits close to its own list */
.column .skills-group + .skills { margin-top: 8px; }

/* Bulleted lists with coral markers (About skills, Newsletter topics) */
.skills { list-style: disc; margin: 0; padding-left: 1.2em; }
.skills li { padding: 2px 0; }
.skills li::marker { color: var(--accent); }
.topics { margin-top: 12px; }

/* ---------- 8. Page 03 — Projects ---------- */
/* Grey chamfered cards (image, year, title, hashtags, description), two across on wide screens */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.project { background: var(--bg-surface); padding: 24px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.project figure { margin: 0; aspect-ratio: 1; display: grid; place-items: center; }
.project img { width: 100%; height: 100%; object-fit: contain; }
.project .info { margin-top: 24px; }
.project .info > * + * { margin-top: 12px; }
.project .desc { margin-top: 16px; }
.project .info h2, .project .info p { background: transparent; }   /* text sits on grey: no page-coloured bands */
.project.is-hidden { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 0.6em; }
.tag { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; }
.tag:hover, .tag.is-active { color: var(--accent); }
/* Sort and filter: each menu is as wide as its button, and an open dropdown is one continuous chamfered
   shape: the button keeps its top-left cut but loses its bottom edge; the menu sits flush beneath with
   square top corners and carries the bottom-right cut. */
#projects .actions .dropdown-menu { width: 100%; min-width: 0; }
#projects .actions .btn .count { display: none; }
#projects .dropdown:has(.dropdown-menu:not([hidden])) .btn-chamfer {
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px); }
#projects .dropdown:has(.dropdown-menu:not([hidden])) .btn-chamfer::before {
  inset: 2px 2px 0 2px; clip-path: polygon(11px 0, 100% 0, 100% 100%, 0 100%, 0 11px); }
#projects .dropdown .dropdown-menu:not([hidden]) {
  top: 100%; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); }
#projects .dropdown .dropdown-menu:not([hidden])::before {
  inset: 0 2px 2px 2px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%); }

/* ---------- 9. Pages 04 and 05 — forms (Newsletter and Contact), footer ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 560px) auto; justify-content: space-between; gap: 48px; align-items: start; }
.field { display: block; }
.field + .field { margin-top: 24px; }
.field span { display: block; margin-bottom: 8px; color: var(--ink-muted); }
.field input, .field textarea {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  padding: 14px 0; color: var(--ink-primary); font-family: var(--font-mono); font-size: 15px; line-height: 1.5;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.inline-form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 280px; margin: 0; }
.form-actions { margin-top: 24px; }
.form-status { margin-top: 16px; min-height: 1.5em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--ink-primary); }
.panel .form-note { max-width: 480px; }   /* outranks the panel paragraph rule's max-width: 100% */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot field, never shown */
/* Newsletter status banner (shown for ?status=…) and the dot-plot decoration */
.banner { border: 1px solid var(--line-strong); padding: 24px; margin-bottom: 48px; }
.banner h2 { margin: 0 0 8px; }
.dots { color: var(--line-default); }
.dots .hi { fill: var(--accent); }
/* Contact: the Elsewhere links */
.aside .links { list-style: none; margin: 16px 0 0; padding: 0; }
.aside .links li + li { margin-top: 12px; }
.aside .links a { text-decoration: none; }
.aside .links a:hover { color: var(--accent); }
/* Footer */
.footer { border-top: 2px solid var(--line-strong); padding: 24px 0 48px; }
.footer .row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- 10. Responsive ---------- */

/* Tablets and above */
@media (min-width: 768px) {
  /* About portrait mechanics shared by the mid and wide layouts: the box never adds height of its own
     (size containment), so the rows come from the text and frame; the <picture> wrapper takes the box's
     height so the image's percentage height can resolve. */
  .about-portrait { container-type: size; display: flex; justify-content: flex-end; align-items: flex-start; }
  .about-portrait picture { display: block; flex: none; height: 100%; }
  .about-portrait img { max-width: none; height: 100%; width: auto; }
  #projects .actions #filter-projects { min-width: 220px; }   /* room for the menu's longest tag */
}

/* Wide screens: the About portrait stands beside the frame, matching its height, out to the content's right margin */
@media (min-width: 1100px) {
  .about-grid { grid-template-columns: 640px minmax(0, 1fr); column-gap: 48px;
    grid-template-areas: "label ." "heading ." "sub ." "roles ." "frame portrait" "prompt ."; }
  .about-label { grid-area: label; } .about-heading { grid-area: heading; } .about-sub { grid-area: sub; }
  .about-grid > .roles { grid-area: roles; } .about-grid > .chamfer-frame { grid-area: frame; } .about-prompt { grid-area: prompt; }
  .about-portrait { grid-area: portrait; align-self: stretch; width: 100%; }
  .about-portrait picture { width: 100%; }
  .about-portrait img { width: 100%; height: 100%; aspect-ratio: auto; }
}

/* Mid widths (tablets, small laptops) */
@media (max-width: 1150px) { .nav .links { gap: 24px; } .nav .bar { gap: 24px; } }
@media (min-width: 768px) and (max-width: 1099px) {
  /* Nav shows only the section numbers ("01 /", "02 /"…); the names stay in the markup for screen readers */
  .nav .links { gap: 32px; }
  .nav .links .nav-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  /* About: the portrait sits top right beside the heading, spanning the label through the roles line, its right
     edge on the frame's right edge. A zero-width second column pins that edge; the image hangs leftwards from it. */
  .wrap.about-grid { max-width: calc(640px + 2 * var(--pad)); margin-left: 0; }
  .about-grid { grid-template-columns: minmax(0, 1fr) 0; column-gap: 0;
    grid-template-areas: "label portrait" "heading portrait" "sub portrait" "roles portrait" "frame frame" "prompt prompt"; }
  .about-label { grid-area: label; } .about-heading { grid-area: heading; } .about-sub { grid-area: sub; }
  .about-grid > .chamfer-frame { grid-area: frame; } .about-prompt { grid-area: prompt; }
  .about-grid > .roles { grid-area: roles; width: fit-content; position: relative; z-index: 1; }   /* in front of the image */
  .about-portrait { grid-area: portrait; align-self: stretch; width: 0; }
}

/* Phones */
@media (max-width: 767px) {
  :root { --pad: 24px; }
  .section { padding: 48px 0; }
  .panel { min-height: calc(100vh - 65px); min-height: calc(100svh - 65px); }
  html { scroll-padding-top: 65px; }
  .display-xl, .display-lg { font-size: 56px; line-height: 1.04; letter-spacing: -0.01em; }

  /* Nav collapses into a menu */
  .nav .bar { gap: 16px; }
  .nav .links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-page); border-bottom: 1px solid var(--line-default); padding: 8px var(--pad) 16px; }
  .nav .links.open { display: flex; }
  .nav .links li { width: 100%; }
  .nav .links a { display: block; padding: 12px 0; line-height: 1.3; }
  .menu-toggle { display: inline; }

  /* Buttons fill the width; a scroll prompt sits centred on its own line */
  .actions .btn { width: 100%; }
  .actions .text-link { width: 100%; text-align: center; }
  .inline-form .btn { width: 100%; }

  /* Home: tighter label and subtitle; the portrait returns to the flow below them, full width */
  .hero-layout .copy > .label.secondary { margin-top: 8px; }
  .hero-layout .display-xl { max-width: 100%; }
  .hero-layout .copy > .hero-portrait { position: static; margin: 40px 0 0; }
  .hero-portrait img { width: 100%; aspect-ratio: 342 / 420; }

  /* About: one column with the portrait between the heading and the subtitle; the roles line becomes a
     dropdown that forms the header of the expertise frame, sharing its chamfered outline */
  .about-label { order: 1; } .about-heading { order: 2; } .about-portrait { order: 3; }
  .about-sub { order: 4; } .about-grid > .chamfer-frame { order: 5; } .about-prompt { order: 6; }
  .roles { display: none; }
  .role-select { display: block; max-width: 640px; }
  .role-select .btn { width: 100%; clip-path: none; background: none; color: var(--accent);
    justify-content: space-between; text-align: left; padding: 16px 24px; border-bottom: 2px solid var(--accent); }
  .role-select .btn::before { display: none; }
  .role-select .btn:hover { color: var(--accent); }
  .role-select .dropdown-menu { width: 100%; min-width: 0; top: 100%; clip-path: none; }   /* a plain rectangle inside the frame */
  .role-select .dropdown-menu::before { clip-path: none; }
  .chamfer-frame { padding: 0; }
  .chamfer-frame .columns { padding: 24px; }

  /* Projects: one card per row. Sort and Filter share the row at equal width and height, with short labels
     ("Sort ▾", "Filter (2) ▾"); the filter menu hangs from the right edge so it stays on the page. */
  .project-grid { grid-template-columns: 1fr; gap: 24px; }
  .project { padding: 16px; }
  #projects .actions { gap: 16px; align-items: stretch; }
  #projects .actions .dropdown { flex: 1 1 0; min-width: 0; }
  #projects .actions .dropdown .btn { height: 100%; padding-left: 16px; padding-right: 16px; }
  #projects .actions .dropdown:last-child .dropdown-menu { left: auto; right: 0; }
  #projects .actions .btn .detail { display: none; }
  #projects .actions .btn .count { display: inline; }
  #projects .actions .dropdown-menu { padding: 12px 12px; gap: 8px; }
  #projects .actions .dropdown-menu .option { font-size: 11px; gap: 8px; white-space: nowrap; }

  /* Forms and footer stack */
  .two-col { grid-template-columns: 1fr; }
  .footer .row { flex-direction: column; }
}
