/* ==========================================================================
   site.css -- design system for the ryanlitalien.com consulting pitch
   Phase 0 of the rebrand (see life-log/career/website-rebrand-plan.md, s.8).

   Scope: the site's only stylesheet. Every page renders through
   _layouts/base.html (posts wrap it via _layouts/post.html); the old
   Bootstrap/mediumish theme was deleted in Phase 1.

   Register: Swiss grotesque. White by default, dark on toggle. Helvetica-class
   system sans throughout, one green accent (Dartmouth green), granite gray
   muted. Contrast figures below are documented for /accessibility/ (Phase 1):
     body text   18.8:1 light / 16.5:1 dark   (AAA)
     accent      6.8:1 light / 7.1:1 dark     (AA+, normal text)
     muted       6.1:1 light / 7.0:1 dark     (AA+)
   ========================================================================== */

/* -- Tokens ------------------------------------------------------------- */
:root {
  /* light (default) */
  --ground: #FFFFFF;
  --surface: #F3F5F4;
  --text: #121413;
  --muted: #5C645F;
  --rule: #E2E6E3;
  --accent: #00693E;
  --accent-contrast: #FFFFFF;
  /* Hover shades stay in the accent hue: darker green in light theme,
     brighter green in dark. Both are AA+ as text on their own ground
     (9.3:1 light, 9.6:1 dark). */
  --accent-hover: #00522F;
  --accent-hover-contrast: #FFFFFF;
  --link-hover-color: var(--accent-hover);
  --btn-hover-text: var(--accent-hover);

  --font-sans: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;

  --col-content: 1320px;
  --col-rail: 190px;
  /* One card radius everywhere, matched to the rail portrait. */
  --radius-card: 12px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --focus-ring: 0 0 0 3px var(--ground), 0 0 0 5px var(--accent);
  /* Screenshot dimmer: no-op in light theme, dims light-UI screenshots in
     dark theme so they don't glare against the dark ground. */
  --shot-dim: none;
}

/* System preference, only when the visitor has not made an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0D0F0E;
    --surface: #151816;
    --text: #EBEEEC;
    --muted: #8FA098;
    --rule: #242A26;
    --accent: #34B27B;
    --accent-contrast: #0D0F0E;
    --accent-hover: #3ECF8E;
    --accent-hover-contrast: #0D0F0E;
    --link-hover-color: var(--accent-hover);
    --btn-hover-text: var(--accent-hover);
    --focus-ring: 0 0 0 3px var(--ground), 0 0 0 5px var(--accent);
    --shot-dim: brightness(0.82) contrast(1.03);
  }
}

/* Explicit dark choice wins regardless of OS setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0D0F0E;
  --surface: #151816;
  --text: #EBEEEC;
  --muted: #8FA098;
  --rule: #242A26;
  --accent: #34B27B;
  --accent-contrast: #0D0F0E;
  --accent-hover: #3ECF8E;
  --accent-hover-contrast: #0D0F0E;
  --link-hover-color: var(--accent-hover);
  --btn-hover-text: var(--accent-hover);
  --shot-dim: brightness(0.82) contrast(1.03);
}

/* -- Reset ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* color-scheme must track the ACTIVE theme, not advertise both: with
   "light dark" Chrome resolves the used scheme from the OS preference, so
   an explicit dark toggle under a light OS painted the canvas (and the
   sticky rail composited against it) light while the tokens were dark.
   The dark token blocks below override this to dark. */
html.pitch {
  color-scheme: light;
}

body.pitch {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 96px;
}

.pitch img {
  max-width: 100%;
  display: block;
}

/* Only h1 is styled; h2-h6 keep browser defaults (all smaller than h1). */
.pitch h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--space-3);
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

.pitch p {
  margin: 0 0 var(--space-3);
}

/* Smaller second line inside a heading, e.g. the aside under "Pick the
   sentence that sounds like you". */
.heading-aside {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: var(--space-1);
}

.pitch a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.15em;
}

.pitch a:hover {
  color: var(--link-hover-color);
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent-hover);
}

/* Visible focus ring on every interactive element: 2px accent, 3px offset. */
.pitch a:focus-visible,
.pitch button:focus-visible,
.pitch summary:focus-visible,
.pitch input:focus-visible,
.pitch textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Visually hidden but present for screen readers / heading navigation. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -- Skip link -------------------------------------------------------------
   First element in the DOM and in tab order. Visually hidden until focused.
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

/* -- Layout ----------------------------------------------------------------
   One <header> holds the brand and the single <nav>; the theme control now
   lives in the floating .dock (see below), outside the header. The header
   is a plain top bar below 900px and becomes a sticky 190px left rail at
   900px and up -- same DOM, repositioned by CSS, so there is exactly one
   nav landmark and one set of links at every viewport. Content column
   capped at 1320px.
   -------------------------------------------------------------------------- */
.pitch-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (min-width: 900px) {
  .pitch-shell {
    flex-direction: row;
  }
}

.pitch-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule);
  /* Explicit ground: the rail is sticky (own compositor layer) and must
     never rely on the canvas behind it for its background. */
  background: var(--ground);
}

.pitch-main {
  flex: 1;
  padding: var(--space-5) var(--space-4) var(--space-6);
  min-width: 0;
}

.pitch-main > .col {
  max-width: var(--col-content);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .pitch-rail {
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    width: var(--col-rail);
    flex: 0 0 var(--col-rail);
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    padding: var(--space-4);
    border-bottom: none;
    border-right: 1px solid var(--rule);
  }

  .pitch-main {
    padding: var(--space-6) var(--space-5);
  }
}

.rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

@media (min-width: 900px) {
  .rail-top {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-5);
  }
}

/* Brand + portrait group inside the rail. The portrait only shows in the
   desktop rail; the mobile top bar stays slim. */
.rail-id {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.rail-photo-wrap,
.rail-photo {
  display: none;
}

@media (min-width: 900px) {
  .rail-id {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Easter egg: hovering the portrait swaps in the winking shot. Both
     images render stacked (so the wink is preloaded and the swap is
     instant); the wink sits on top at opacity 0 until hover. */
  .rail-photo-wrap {
    display: block;
    position: relative;
    width: 104px;
    height: 104px;
  }

  .rail-photo {
    display: block;
    width: 104px;
    height: 104px;
    object-fit: cover;
    border: 1px solid var(--rule);
    border-radius: var(--radius-card);
  }

  .rail-photo-wink {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 120ms ease;
  }

  .rail-photo-wrap:hover .rail-photo-wink {
    opacity: 1;
  }
}

/* .pitch a (0-1-1) would otherwise beat a bare .rail-brand (0-1-0) on color
   and text-decoration, rendering the brand as a green underlined link. */
.pitch a.rail-brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
  font-size: 1rem;
}

.pitch a.rail-brand:hover {
  color: var(--link-hover-color);
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-3);
}

@media (min-width: 900px) {
  .rail-nav ul {
    flex-direction: column;
    gap: var(--space-2);
  }
}

.rail-nav a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: var(--space-1) 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.rail-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.rail-nav a:hover {
  color: var(--link-hover-color);
}

.rail-nav a:focus-visible {
  color: var(--accent);
}

/* -- Buttons -------------------------------------------------------------
   Boxed mono-caps. One primary CTA per screen; secondary is outline-only.
   -------------------------------------------------------------------------- */
/* `.pitch a` (type + class, specificity 0-1-1) would otherwise beat these
   class-only selectors (0-1-0) and win on `color` and `text-decoration`
   regardless of source order -- that was the invisible-button-text bug
   (accent text on accent background) and the stray underline on buttons.
   Prefixing with `.pitch a` raises these to 0-2-1 / 0-3-1 so the button
   rules always win, while keeping the relative cascade between .btn,
   .btn-primary and their :hover states unchanged. */
.pitch a.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--text);
  color: var(--text);
  background: transparent;
}

.pitch a.btn:hover {
  border-color: var(--accent-hover);
  color: var(--btn-hover-text);
}

.pitch a.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.pitch a.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-hover-contrast);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

/* -- Sections -------------------------------------------------------------- */
.pitch section {
  margin: 0 0 var(--space-6);
}

.pitch section:last-of-type {
  margin-bottom: var(--space-4);
}

.hairline {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 0 var(--space-6);
}

/* Proof bar: four mono stats. */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .stat-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: var(--space-1);
}

/* "Pick the sentence that sounds like you" -- problem cards. */
.problem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.problem-card {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: var(--space-4);
  border-radius: var(--radius-card);
}

.problem-quote {
  font-weight: 700;
  margin: 0 0 var(--space-2);
}

.problem-answer {
  color: var(--muted);
  margin: 0;
}

/* Proof blocks. */
.proof-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.proof-block {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
}

/* Engagements. */
.engagement-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.engagement {
  border: 1px solid var(--rule);
  padding: var(--space-4);
  border-radius: var(--radius-card);
}

.engagement-name {
  font-weight: 700;
  margin: 0;
  display: inline;
}

.engagement-terms {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
  margin: var(--space-1) 0 var(--space-2);
}

/* How I work. */
.work-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.work-list li {
  padding-left: var(--space-4);
  position: relative;
}

.work-list li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.post-date {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: var(--space-2);
  font-variant-numeric: tabular-nums;
}

/* Social proof. */
.testimonial {
  margin: 0;
  border-left: 1px solid var(--rule);
  padding-left: var(--space-3);
  font-style: italic;
  color: var(--muted);
}

.testimonial + .testimonial {
  margin-top: var(--space-4);
}

.testimonial cite {
  display: block;
  margin-top: var(--space-2);
  font-style: normal;
  font-size: 0.85rem;
}

.testimonial-source {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.8rem;
}

/* Selected work: bordered cards with a media slot on top. The placeholder
   SVGs in assets/img/work/ are transparent, so the media slot's surface
   token supplies the ground in both themes; swap the src for a real
   screenshot when one exists. */
.work-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.work-card {
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  /* Clip the media slot to the rounded corners. */
  overflow: hidden;
}

.work-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

/* Image-only cards (no body below the media slot). */
.work-card > img:last-child {
  border-bottom: none;
}

/* Light-UI screenshots glare against a dark ground; dim them slightly. */
.work-card > img.shot-light {
  filter: var(--shot-dim);
}

/* Tall screenshots: crop from the top so the app chrome stays visible. */
.work-card > img.fit-top {
  object-position: top;
}

.work-card-body {
  padding: var(--space-3) var(--space-4) var(--space-4);
  /* Fill the card so the stack line can pin to the bottom edge, keeping
     the green tech lines aligned across a row of unequal blurbs. */
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-card-body h3 {
  margin-top: 0;
}

.work-card-body p {
  margin-bottom: 0;
  color: var(--muted);
}

/* Tech-stack line, pinned to the bottom of the card body. */
.work-card-body .stack {
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: 0.8rem;
  color: var(--accent);
}

.selected-writing {
  margin-top: var(--space-4);
}

/* FAQ, native <details>/<summary> so it is keyboard- and
   screen-reader-operable with zero JavaScript. */
.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  padding: var(--space-3) 0;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+ ";
  color: var(--accent);
}

.faq-item[open] summary::before {
  /* Literal minus sign: with the "\2212 " escape form, the trailing space
     only terminates the escape and never renders. */
  content: "\2212\a0";
}

.faq-item p {
  padding-bottom: var(--space-3);
  color: var(--muted);
}

/* -- Dock -------------------------------------------------------------------
   Floating bottom-center pill: segmented three-state theme control plus
   LinkedIn and GitHub links. In light theme it is an ink pill on the white
   ground; in dark theme an elevated surface pill with a hairline border.
   The only rounded and only shadowed element on the site, on purpose: it
   floats above the page rather than sitting in it.
   -------------------------------------------------------------------------- */
.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--space-4);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: #121413;
  color: #FFFFFF;
  border: 1px solid #121413;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

/* At 900px+ every other interactive element on the site (nav, CTAs, footer
   links) is left-aligned, so pinning the dock to the bottom-right corner
   instead of bottom-center keeps it out of that left-hand interactive lane
   and off content like the About page's email CTA. */
@media (min-width: 900px) {
  .dock {
    left: auto;
    right: var(--space-5);
    transform: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dock {
    background: #1B1F1D;
    color: #EBEEEC;
    border-color: #2E3531;
  }
}

:root[data-theme="dark"] .dock {
  background: #1B1F1D;
  color: #EBEEEC;
  border-color: #2E3531;
}

.dock-theme {
  display: flex;
  gap: 2px;
}

.dock button,
.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.dock svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}

/* Below 900px the dock stays centered (it has room under the single-column
   content) but shrinks so it cannot sit on top of short-page content, e.g.
   the About CTA or the homepage stat labels at first paint. Placed after
   the base .dock button/.dock a/.dock svg rules above so it wins the
   cascade: same specificity, later in source order. */
@media (max-width: 899px) {
  .dock {
    padding: var(--space-1);
  }

  .dock button,
  .dock a {
    width: 30px;
    height: 30px;
  }

  .dock svg {
    width: 15px;
    height: 15px;
  }
}

.dock button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
}

.dock button:hover,
.dock a:hover {
  color: var(--accent-hover);
}

.dock button[aria-pressed="true"]:hover {
  color: var(--accent-contrast);
}

.dock button:focus-visible,
.dock a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.dock-sep {
  width: 1px;
  height: 20px;
  background: currentColor;
  opacity: 0.25;
}

/* -- Posts ---------------------------------------------------------------
   Article pages share the pitch shell but need document typography: real
   headings instead of the pitch's uppercase section labels, spaced prose,
   framed images.
   -------------------------------------------------------------------------- */
.post-header h1 {
  margin-bottom: var(--space-1);
}

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-5);
}

.post-content h2 {
  margin-top: var(--space-5);
}

.post-content h3 {
  margin-top: var(--space-4);
}

.post-content img {
  border: 1px solid var(--rule);
  margin: var(--space-4) 0;
}

/* Embedded video (e.g. a YouTube iframe with a fixed width attribute)
   must not force horizontal scroll on narrow viewports. */
.post-content iframe {
  width: 100%;
  max-width: 854px;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.2rem;
  margin: 0 0 var(--space-3);
}

.post-content li {
  margin-bottom: var(--space-1);
}

.post-content blockquote {
  margin: 0 0 var(--space-3);
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
  color: var(--muted);
}

.post-content pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--space-3);
  overflow-x: auto;
  font-size: 0.85rem;
}

.post-content code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.post-content p > code,
.post-content li > code {
  background: var(--surface);
  padding: 0.1em 0.3em;
  border: 1px solid var(--rule);
}

/* Front-matter hero image, rendered by _layouts/post.html when set. */
.post-hero {
  border: 1px solid var(--rule);
  margin: 0 0 var(--space-4);
}

.post-footer {
  margin-top: var(--space-6);
  border-top: 1px solid var(--rule);
  padding-top: var(--space-3);
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.post-list li {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
}

.post-list .post-date {
  flex: 0 0 5.5rem;
  margin-left: 0;
}

/* -- Footer ------------------------------------------------------------- */
.pitch-footer {
  border-top: 1px solid var(--rule);
  padding: var(--space-4);
  font-size: 0.85rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  .pitch-footer {
    padding: var(--space-4) var(--space-5);
  }
}

.pitch-footer a {
  color: var(--muted);
}

.pitch-footer .footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: 0;
  margin: var(--space-2) 0 0;
}

/* -- Certification ---------------------------------------------------------
   Small badge + linked credential line, used on /about/.
   -------------------------------------------------------------------------- */
.certification {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}

.certification .cert-badge {
  width: 64px;
  height: 64px;
  flex: none;
}

/* -- Simple / viewer pages --------------------------------------------------
   /simple/ and /simple/privacy/ keep the base layout and site.css tokens but
   are not part of the narrow "pitch" sales copy -- they are a content-dense
   download listing whose text is locked (App Store Connect + Gumroad link to
   it). This is a minimal, own-section variant: mono labels, hairline rules,
   a plain data table, no card/shadow treatment the rest of the design system
   does not otherwise use.
   -------------------------------------------------------------------------- */
.simple-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.screenshot {
  max-width: 346px;
  border: 1px solid var(--rule);
  margin: 0 0 var(--space-4);
}

.app-version {
  display: inline-block;
  margin-left: var(--space-2);
  color: var(--muted);
  font-size: 0.85rem;
}

.size-table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  max-width: 360px;
}

.size-table th,
.size-table td {
  border-bottom: 1px solid var(--rule);
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  text-align: left;
}

.size-table th {
  color: var(--muted);
  font-weight: 700;
}

.size-table td.size-cell,
.size-table th.size-cell {
  text-align: right;
  padding-right: 0;
}

/* -- Lightbox --------------------------------------------------------------
   Full-screen viewer for .work-card images. Card media is cropped (fit-top)
   and/or dimmed (shot-light) to sit inside the card grid; the lightbox
   shows the same image uncropped and undimmed at its natural aspect ratio.
   lightbox.js owns all open/close behavior -- this is presentation only. */
.work-card > img.lightbox-zoom {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(8, 10, 9, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox > img {
  max-width: min(1400px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--rule);
  background: var(--ground);
}

.lightbox-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  background: var(--ground);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 10px;
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* -- Motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
