:root {
  --background: #303233;
  --card-width: 280px;
  --gutter: 12px;
  --outer-margin: 16px;
  --columns: 2;
  --grid-width: 572px;
  --pale-red: #b89b9c;
  --red: #963f43;
  font-family: Arial, Helvetica, sans-serif;
  color: #f6f5f1;
  background: var(--background);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.masthead { display: flex; align-items: center; flex-direction: column; padding: 32px 0 20px; }
.login-trigger { width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: var(--pale-red); transition: background-color 180ms ease; }
.portfolio-grid { width: min(calc(100% - 2 * var(--outer-margin)), var(--grid-width)); display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: var(--gutter); margin: 0 auto 32px; }
.card { position: relative; aspect-ratio: 5 / 4; min-width: 0; isolation: isolate; background: #525456; }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.55) saturate(.85); transition: filter 220ms ease; }
.card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(0 0 0 / 56%); transition: opacity 180ms ease; pointer-events: none; }
.card-copy { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: clamp(12px, 2.6vw, 24px); transition: opacity 180ms ease; pointer-events: none; }
.card h2 { margin: 0 0 8px; font-weight: 500; font-size: clamp(15px, 2.4vw, 22px); letter-spacing: -0.025em; line-height: 1.1; }
.card p { margin: 0; font-size: clamp(12px, 1.55vw, 13px); line-height: 1.45; color: #f3f2ee; }
.card:focus-visible, button:focus-visible { outline: 3px solid #ead1ba; outline-offset: 4px; }
/* Keyboard discovery reveals color while preserving readable card text. */
.card:focus-visible img { filter: grayscale(0) saturate(1); }
html.modal-open { overflow: hidden; }
.panel { position: fixed; inset: var(--panel-top, 104px) auto auto var(--panel-left, 16px); width: var(--panel-width, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - var(--panel-top, 104px) - 16px); margin: 0; padding: 28px 24px; overflow: auto; border: 0; background: #d8d8d5; color: #343637; color-scheme: light; box-shadow: 0 12px 36px rgb(0 0 0 / 20%); }
.panel::backdrop { background: rgb(16 18 19 / 38%); }
.panel form { width: 100%; max-width: 360px; margin: 0 auto; }
.panel h1 { margin: 0 0 26px; text-align: center; font-size: 26px; font-weight: 400; letter-spacing: -0.035em; }
.panel label { display: block; font-size: 12px; margin: 0 0 7px; }
.panel input, .panel textarea { width: 100%; min-width: 0; border: 1px solid #aeafab; border-radius: 0; padding: 10px 12px; background: #efefec; color: #303233; }
.panel input { height: 44px; margin: 0 0 16px; }
.panel input:focus-visible, .panel textarea:focus-visible { outline: 2px solid #743c40; outline-offset: 2px; }
.panel button:focus-visible { outline-color: #743c40; }
.panel button { min-height: 44px; width: 100%; letter-spacing: 0.12em; font-size: 11px; border-radius: 0; }
.enter { border: 1px solid #454747; background: #454747; color: #f6f5f1; margin-top: 6px; }
.create-account { margin-top: 10px; border: 1px solid #a4a6a2; background: transparent; color: #343637; }
.question-panel form { max-width: 480px; }
.question-panel h1 { text-align: left; margin-bottom: 18px; }
.question-panel h1 label { font-size: 19px; letter-spacing: -0.015em; line-height: 1.45; margin: 0; }
.question-panel textarea { display: block; resize: vertical; min-height: 132px; max-height: 45dvh; line-height: 1.5; }
.question-panel .enter { margin-top: 16px; }
@media (min-width: 624px) {
  :root { --gutter: 16px; --outer-margin: 24px; --grid-width: 576px; }
  .masthead { padding-top: 40px; padding-bottom: 24px; }
  .login-trigger { width: 58px; height: 58px; }
  .panel { padding: 34px 32px; }
}
@media (hover: hover) and (pointer: fine) {
  .login-trigger:hover { background: var(--red); }
  .card:hover:not(:focus-visible) .card-copy, .card:hover:not(:focus-visible)::after { opacity: 0; }
  .card:hover:not(:focus-visible) img { filter: grayscale(0) saturate(1); }
  .enter:hover { background: #333535; }
  .create-account:hover { background: #c8c9c5; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
