/* ==========================================================================
   SERGI MOLINA RIOLA · CV INTERACTIVO (MOLINA IT)
   Architecture: Bento Grid 2.0 + Swiss Modernism 2.0 (2027 WCAG AAA/AA)
   ========================================================================== */

:root {
  --bg-page: #050811;
  --bg-card: #091122;
  --bg-card-hover: #0e1930;
  --bg-subtle: #0d1629;
  --bg-pill: rgba(56, 189, 248, 0.09);
  --ink-primary: #f2f6fc;
  --ink-secondary: #c5d2e6;
  --ink-muted: #8ca1bf;
  --accent: #38bdf8;
  --accent-strong: #00f5ff;
  --accent-ink: #04101d;
  --emerald: #10b981;
  --border: rgba(148, 179, 219, 0.16);
  --border-strong: rgba(56, 189, 248, 0.45);
  --bar-bg: rgba(7, 13, 26, 0.84);
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.34);

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-card: 18px;
  --radius-pill: 10px;
}

html[data-theme="paper"] {
  --bg-page: #f4f6fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fbff;
  --bg-subtle: #edf2f8;
  --bg-pill: rgba(2, 132, 199, 0.08);
  --ink-primary: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #475569;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --accent-ink: #ffffff;
  --emerald: #059669;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(2, 132, 199, 0.48);
  --bar-bg: rgba(255, 255, 255, 0.88);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  min-height: 100dvh;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(56, 189, 248, 0.11), transparent 70%);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

html[data-theme="paper"] body {
  background-image: none;
}

a,
button {
  touch-action: manipulation;
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 120;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 700;
}

/* ==========================================================================
   FLOATING COMMAND BAR (Strict 1-Blur Surface Rule)
   ========================================================================== */
.command-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: max(12px, env(safe-area-inset-top)) 20px 12px;
  pointer-events: none;
}

.command-inner {
  pointer-events: auto;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px 8px 14px;
  background: var(--bar-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-text small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}

.bar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bar-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 8px 12px;
  border-radius: 9px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s, background-color 0.2s;
}
.bar-links a:hover {
  color: var(--ink-primary);
  background: var(--bg-pill);
}

.bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-utility,
.btn-primary-pill,
.btn-secondary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  white-space: nowrap;
  transition: transform 0.2s var(--ease-expo), border-color 0.2s, background-color 0.2s;
}
.btn-utility:hover,
.btn-secondary-pill:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-primary-pill {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.btn-primary-pill:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

/* ==========================================================================
   MAIN BENTO SHELL & TYPOGRAPHY
   ========================================================================== */
.dossier-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: border-color 0.22s ease, transform 0.25s var(--ease-expo), background-color 0.22s ease;
}

.eyebrow,
.eyebrow-muted {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-muted {
  color: var(--ink-muted);
}

/* ==========================================================================
   BENTO 01: HERO IDENTITY + TELEMETRY ASIDE
   ========================================================================== */
.bento-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(270px, 0.95fr);
  gap: 16px;
  align-items: stretch;
}

.hero-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.hero-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.36);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.meta-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.1vw, 3.1rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-role {
  margin-top: 8px;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 600;
  color: var(--accent);
}

/* Segmented Control (Enfoque Cliente vs CTO) */
.lens-bar {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 13px;
  width: fit-content;
  max-width: 100%;
}
.lens-btn {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.lens-btn.is-active {
  background: var(--bg-card);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.hero-summary {
  max-width: 66ch;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-summary strong {
  color: var(--ink-primary);
}
.lens-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lens-highlights li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
}
.lens-highlights li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.hero-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.kpi-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.kpi-label {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-secondary);
}

.info-mini-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.lang-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lang-list li {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-secondary);
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border);
}
.lang-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.lang-list strong {
  color: var(--ink-primary);
  font-weight: 600;
}
.mini-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.mini-sub {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   SECTIONS COMMON
   ========================================================================== */
.bento-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ==========================================================================
   BENTO 02: INTERACTIVE STACK MATRIX
   ========================================================================== */
.filter-status-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.filter-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}
.btn-clear-filter {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-pill);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.stack-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stack-pillar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pillar-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pillar-code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.pillar-top h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  min-height: 38px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s var(--ease-expo);
}
.skill-chip:hover {
  border-color: var(--border-strong);
  color: var(--ink-primary);
  transform: translateY(-1px);
}
.skill-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

/* ==========================================================================
   BENTO 03: PORTFOLIO SHOWCASE GRID
   ========================================================================== */
.projects-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: opacity 0.22s ease, transform 0.25s var(--ease-expo), border-color 0.22s ease;
}
.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.project-card.is-dimmed {
  opacity: 0.32;
}
.project-card.is-highlighted {
  border-color: var(--accent-strong);
}

.project-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.project-card--featured .project-thumb {
  aspect-ratio: auto;
  min-height: 290px;
  border-bottom: none;
  border-right: 1px solid var(--border);
}
.project-card--featured .project-body {
  padding: 24px;
  gap: 12px;
}
.project-card--featured .project-title {
  font-size: 21px;
}

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.38s var(--ease-expo);
}
.project-card:hover .project-thumb img {
  transform: scale(1.03);
}
.project-cat-badge {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(5, 8, 17, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #f2f6fc;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
}

.project-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.project-title {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 700;
}
.project-desc {
  font-size: 13.8px;
  line-height: 1.55;
  color: var(--ink-secondary);
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-muted);
}
.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}
.btn-card-inspect,
.btn-card-live {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
}
.btn-card-inspect {
  flex: 1;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--bg-pill);
  color: var(--accent);
}
.btn-card-inspect:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-card-live {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--ink-primary);
}
.btn-card-live:hover {
  border-color: var(--border-strong);
}

/* ==========================================================================
   BENTO 04: TIMELINE ACCORDION
   ========================================================================== */
.timeline-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  overflow: hidden;
}
.timeline-trigger {
  width: 100%;
  padding: 20px 22px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  min-height: 64px;
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.timeline-heading h3 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}
.timeline-org {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--ink-muted);
}
.timeline-chevron {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 18px;
}

.timeline-panel {
  padding: 0 22px 22px;
  border-top: 1px solid var(--border);
}
.timeline-bullets {
  margin-top: 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--ink-secondary);
}
.timeline-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.timeline-bullets strong {
  color: var(--ink-primary);
}

/* ==========================================================================
   CLOSING CTA & BRIDGE
   ========================================================================== */
.closing-cta-card {
  padding: 26px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.closing-copy h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
}
.closing-copy p {
  margin-top: 4px;
  color: var(--ink-secondary);
  font-size: 14px;
}
.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   MODAL DIALOG & TOAST
   ========================================================================== */
.project-dialog {
  margin: auto;
  width: min(820px, calc(100vw - 24px));
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--ink-primary);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}
.project-dialog::backdrop {
  background: rgba(4, 7, 15, 0.8);
  backdrop-filter: blur(8px);
}
.dialog-shell {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.dialog-title {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
}
.btn-dialog-close {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.dialog-figure {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
}
.dialog-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.dialog-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}
.dialog-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dialog-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: max(76px, calc(64px + env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

/* Mobile Dock hidden on desktop */
.mobile-bottom-dock {
  display: none;
}

/* ==========================================================================
   MOBILE 2027 RESPONSIVE RULES (<= 960px & <= 640px)
   ========================================================================== */
@media (max-width: 960px) {
  .bar-links {
    display: none;
  }
  .bento-hero {
    grid-template-columns: 1fr;
  }
  .stack-bento-grid,
  .projects-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skill-chip {
    min-height: 44px;
    padding: 8px 12px;
  }
}

@media (max-width: 640px) {
  .command-bar {
    padding: max(10px, env(safe-area-inset-top)) 12px 8px;
  }
  .command-inner {
    padding: 6px 8px 6px 10px;
    gap: 8px;
  }
  .brand-text small {
    display: none;
  }
  .btn-utility span#theme-label {
    display: none;
  }
  .btn-utility {
    padding: 0 10px;
  }
  .dossier-shell {
    padding: 10px 14px max(92px, calc(82px + env(safe-area-inset-bottom)));
    gap: 28px;
  }
  .hero-card {
    padding: 18px;
    gap: 16px;
  }
  .lens-bar {
    width: 100%;
  }
  .lens-btn {
    min-height: 44px;
    padding: 6px 6px;
    font-size: 11px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }
  .hero-contact-strip .btn-primary-pill,
  .hero-contact-strip .btn-secondary-pill {
    flex: 1 1 auto;
  }
  .stack-bento-grid,
  .projects-bento-grid {
    grid-template-columns: 1fr;
  }
  .project-card--featured {
    grid-template-columns: 1fr;
  }
  .project-card--featured .project-thumb {
    aspect-ratio: 16 / 10;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .project-card--featured .project-body {
    padding: 18px;
  }
  .project-card--featured .project-title {
    font-size: 18px;
  }
  .skill-chip {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .closing-cta-card {
    padding: 20px 18px;
  }
  .closing-actions,
  .closing-actions a {
    width: 100%;
  }

  /* Thumb-Zone Mobile Dock */
  .mobile-bottom-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: var(--bar-bg);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
  }
  .dock-item {
    min-height: 44px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-secondary);
  }
  .dock-item.is-active,
  .dock-item.dock-pdf {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
  }
  .dock-item.dock-pdf {
    background: var(--bg-pill);
    color: var(--accent);
    border: 1px solid var(--border-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   PRINT / A4 PDF EXPORT SHEET
   ========================================================================== */
@media print {
  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .command-bar,
  .mobile-bottom-dock,
  .lens-bar,
  .print-hide,
  .filter-status-box,
  .project-foot,
  .closing-actions {
    display: none !important;
  }
  .bento-card {
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    break-inside: avoid;
  }
  .timeline-panel[hidden] {
    display: block !important;
  }
  .projects-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
