/* Portfolio gallery exploration. Shared tokens and existing destinations stay intact. */
@media (min-width: 901px) {
  .app { grid-template-columns: 280px minmax(0, 1fr); }
  .panel-hero { padding: 30px 26px 0; }
  .panel-hero-name { font-size: 2.8rem; }
  .panel-hero-title { font-size: .66rem; letter-spacing: .09em; }
  .panel-hero-mark { width: 34px; height: 34px; margin-bottom: 22px; }
  .context-content { padding: 12px 26px 20px; gap: 0; }
  .context-card { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; }
  .context-card:hover { box-shadow: none; }
  .context-card:not(.context-accordion) { padding: 18px 0; }
  .context-accordion.open { border-left: 0; }
  .context-accordion-toggle { padding: 18px 0; min-height: 56px; }
  .context-accordion-label { font-size: .67rem; letter-spacing: .05em; }
  .context-accordion.open .context-accordion-label { color: var(--accent-warm); }
  .context-accordion-panel { padding-inline: 0; }
  .context-accordion.open .context-accordion-panel { padding: 0 0 18px; }
  .context-metric { gap: 8px; }
  .context-metric-label { font-size: .73rem; }
  .context-metric-value { font-size: .78rem; }
  .context-footer { padding: 20px 18px; }
  .context-footer-line { font-size: .66rem; }
}
/* Let the opening decoration fade into the project section. */
.chat-panel.view-welcome::before { display: none; }
.landing-inner { --landing-max-width: 1300px; max-width: var(--landing-max-width); }
.landing-intro { position: relative; isolation: isolate; padding: 6px 0 28px; }
.landing-intro::before {
  --hero-line: color-mix(in srgb, var(--signal-line-strong) 95%, var(--accent));
  content: '';
  position: absolute;
  inset-block: -32px -80px;
  inset-inline: min(calc(-1 * var(--page-gutter)), calc((var(--landing-max-width) - 100cqi) / 2 - var(--page-gutter)));
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 71px, var(--hero-line) 72px 73px),
    linear-gradient(100deg, transparent 55%, var(--signal-wash));
  mask-image: linear-gradient(90deg, transparent 40%, #000),
    linear-gradient(to bottom, #000 65%, transparent);
  mask-composite: intersect;
  opacity: .85;
}
.landing-intro .page-title { font-size: clamp(2.4rem, 5.8cqi, 4.7rem); max-width: 1050px; margin-bottom: 22px; }
.landing-intro .landing-deck { max-width: 760px; font-size: .875rem; line-height: 1.75; }
.landing-intro .landing-deck + .landing-deck { margin-top: 8px; }
.landing-actions { align-items: flex-start; gap: 28px; margin-top: 26px; }
.landing-conversation { max-width: 440px; }
.landing-actions .landing-experience-button {
  min-height: 52px;
  padding: 14px 22px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--accent-warm) 9%, var(--bg));
  border-color: color-mix(in srgb, var(--accent-warm) 70%, var(--bg));
}
.landing-experience-button > span { color: var(--accent-warm); }
.landing-actions .landing-experience-button:hover {
  background: color-mix(in srgb, var(--accent-warm) 15%, var(--bg));
  border-color: var(--accent-warm);
}
.landing-experience-description {
  max-width: 385px;
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: .75rem;
  line-height: 1.6;
}
.landing-projects-link { min-height: 52px; gap: 14px; text-underline-offset: 5px; }
.selected-projects { margin-top: 20px; }
.landing-section-head { margin-bottom: 24px; }
.project-grid { grid-auto-rows: auto; gap: 24px; }
.project-card { border-radius: 14px; transition: border-color .18s, box-shadow .18s; }
.project-card:hover { transform: none; }
.project-featured { padding: 0; overflow: hidden; background: var(--bg-card); }
.project-stage { margin: 0; overflow: hidden; }
.project-feature-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.project-featured .project-logo { width: 40px; height: 40px; flex-basis: 40px; }
.project-featured .project-identity { margin-bottom: 14px; }
.project-featured h3 { font-size: 1.5rem; }
.project-featured .project-description { font-size: .85rem; }
.project-card .project-access { margin-top: 5px; }
.project-compact { padding: 24px; background: linear-gradient(120deg, color-mix(in srgb, var(--project-brand) 8%, var(--bg-card)),var(--bg-card) 65%); }
.project-compact .project-logo { width: 54px; height: 54px; flex-basis: 54px; }
.project-compact .project-description { max-width: 480px; margin-bottom: 12px; }
.project-compact .project-actions { border-top: 0; padding-top: 2px; }
.landing-career { margin-top: 42px; padding-block: 30px; }
.landing-thinking { margin-top: 42px; }
.thinking-grid { gap: 0 24px; }
.thinking-visual { padding-top: 0; }
.thinking-art { display: flex; align-items: center; justify-content: center; width: 100%; height: 200px; overflow: hidden; border-radius: 12px; margin-bottom: 10px; }
.book-shelf { background: #e8e3d9; gap: 13px; padding: 24px; }
.book-shelf img { width: auto; height: 140px; object-fit: contain; box-shadow: 4px 8px 12px #29231a30; transition: transform .2s; }
.product-object { background: #e5e5ec; }
.product-object img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
[data-theme="dark"] .book-shelf { background: #302d27; }
@media (hover:hover) and (pointer:fine) {
  .project-card:hover { box-shadow: 0 6px 22px #1717130b; }
  .thinking-books:hover .book-shelf img { transform: translateY(-4px); }
  .thinking-products:hover .product-object img { transform: scale(1.035); }
}
@container (max-width: 660px) {
  .project-grid { gap: 20px; }
  .project-stage { padding: 22px 22px 0; }
  .thinking-art { height: 168px; }
  .book-shelf { gap: 8px; padding: 18px 12px; }
  .book-shelf img { height: 110px; max-width: 23%; object-fit: contain; }
}
@container (max-width: 480px) {
  .landing-intro { padding-bottom: 20px; }
  .landing-intro .page-title { font-size: clamp(2rem, 9.7cqi, 2.75rem); margin-bottom: 16px; }
  .landing-intro .landing-deck { font-size: .84rem; line-height: 1.65; }
  .landing-intro .landing-deck + .landing-deck { font-size: .8rem; }
  .landing-actions { flex-direction: column; gap: 4px; margin-top: 22px; }
  .landing-conversation, .landing-actions .landing-experience-button { width: 100%; }
  .landing-actions .landing-experience-button { font-size: .82rem; }
  .landing-experience-description { font-size: .72rem; }
  .landing-projects-link { min-height: 44px; font-size: .75rem; }
  .landing-button { font-size: .75rem; padding: 10px 13px; gap: 12px; }
  .selected-projects { margin-top: 14px; }
  .project-stage { padding: 18px 16px 0; }
  .project-feature-body, .project-compact { padding: 20px; }
  .project-featured h3 { font-size: 1.35rem; }
  .thinking-art { height: 190px; }
  .book-shelf img { height: 132px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-card, .thinking-art img { transition: none; }
  .thinking-books:hover .book-shelf img, .thinking-products:hover .product-object img { transform: none; }
}

/* Featured projects share a neutral frame; screenshots retain their original colours. */
.project-featured { --project-stage-bg: #f7f7f4; --project-stage-border: #e4e4de; }
[data-theme="dark"] .project-featured { --project-stage-bg: #1c1b18; --project-stage-border: #38362f; }
.project-featured > .project-identity { padding: 22px 24px 20px; margin: 0; }
.project-stage { padding: 22px 22px 0; background: var(--project-stage-bg); }
.project-stage > img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #faf9f6; border: 1px solid var(--project-stage-border); border-radius: 9px; box-shadow: none; }
.project-theory .project-stage > img { background: #263f31; }
.project-example-label { color: var(--text-secondary); font: 500 .625rem/1.6 var(--mono); letter-spacing: .035em; margin: 0 0 12px; }
.project-stage figcaption { color: var(--text); font: 500 .8rem/1.5 var(--font); padding: 14px 0 17px; letter-spacing: 0; }
.project-stage figcaption span { display: block; color: var(--text-secondary); font: 400 .65rem/1.5 var(--font); margin-top: 4px; }
.landing-intro .landing-deck { max-width: 700px; }
@container (max-width: 480px) {
 .project-featured > .project-identity { padding: 20px; }
 .project-stage { padding: 16px 16px 0; }
 .project-stage figcaption { font-size: .78rem; }
}

/* Supporting projects: compact, conceptual illustrations in each project's palette. */
.project-compact { background: var(--bg-card); }
.project-compact .project-identity { margin-bottom: 20px; }
.project-compact .project-logo { width: 46px; height: 46px; flex-basis: 46px; }
.project-vignette { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; min-height: 132px; padding: 12px 0 12px 20px; margin: 0 0 20px; border-radius: 9px; overflow: hidden; }
.project-vignette p { font: 500 1.15rem/1.15 var(--serif); letter-spacing: -.02em; margin: 0; }
.project-vignette svg { display: block; width: 100%; height: auto; }
.project-atlas .project-vignette { background: #1e2761; color: #e5f1f5; }
.project-moments .project-vignette { background: #dfebe2; color: #24483c; }
.project-prompts .project-vignette { background: #ece5f6; color: #503878; }
.project-arcade .project-vignette { background: #eee5d2; color: #494331; }
.project-compact .project-description { margin-bottom: 18px; }
.project-compact .project-actions { border-top: 1px solid var(--border-light); padding-top: 8px; }
.project-compact .project-link > span[aria-hidden] { color: var(--project-brand); }
[data-theme="dark"] .project-moments .project-vignette { background: #284139; color: #e0eee5; }
[data-theme="dark"] .project-prompts .project-vignette { background: #362a49; color: #eee5fa; }
[data-theme="dark"] .project-arcade .project-vignette { background: #413b2e; color: #f0e7d0; }
@container (max-width: 480px) {
  .project-vignette { min-height: 116px; padding-left: 16px; }
  .project-vignette p { font-size: 1.1rem; }
}

/* A quieter closing chapter: reading and objects, followed by two short reading links. */
.landing-thinking .thinking-grid { gap: 24px; }
.thinking-link.thinking-visual { gap: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg-card); transition: border-color .18s, box-shadow .18s; }
.thinking-visual .thinking-art { height: 224px; margin: 0; border-radius: 0; }
.thinking-visual .book-shelf { gap: clamp(8px, 1.1cqi, 16px); padding: 28px 22px; background: #e9e1d2; align-items: flex-end; }
.thinking-visual .book-shelf img { width: calc((100% - 48px) / 4); height: auto; max-height: 158px; max-width: none; object-fit: contain; object-position: bottom; box-shadow: 3px 6px 12px #30271725; }
.thinking-visual .product-pair { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3px; background: var(--bg-card); padding: 0; }
.product-pair > span { display: block; height: 100%; min-width: 0; overflow: hidden; }
.product-pair img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-pair-clock img { object-position: 66% 50%; }
.product-pair > .product-pair-computer { background: #f4f1f2; display: flex; align-items: center; }
.product-pair-computer img { height: auto; object-fit: contain; }
.thinking-copy { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.thinking-copy .thinking-label { font: 400 .625rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.thinking-copy .thinking-title { display: block; font: 600 1.65rem/1.16 var(--serif); letter-spacing: -.025em; margin: 10px 0 12px; color: var(--text); }
.thinking-summary { display: block; color: var(--text-secondary); font: 400 .8rem/1.75 var(--font); margin-bottom: 22px; }
.thinking-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-light); color: var(--text); font: 600 .75rem/1.5 var(--font); }
.thinking-cta > span { color: var(--accent-warm); font-size: 1rem; }
.thinking-link.thinking-note { padding: 8px 0 20px; gap: 9px; }
.thinking-note-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.thinking-note .thinking-title { font: 500 1rem/1.4 var(--serif); }
.thinking-note-arrow { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border: 1px solid var(--border); border-radius: 50%; color: var(--accent-warm); }
.thinking-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[data-theme="dark"] .thinking-visual .book-shelf { background: #373126; }
@media (hover: hover) and (pointer: fine) {
  .thinking-link.thinking-visual:hover { border-color: var(--accent-warm); box-shadow: var(--shadow-sm); }
  .thinking-visual:hover .thinking-cta { color: var(--accent-warm); }
  .thinking-note:hover .thinking-note-arrow { border-color: var(--accent-warm); }
}
@container (max-width: 660px) {
  .landing-thinking .thinking-grid { grid-template-columns: 1fr; gap: 20px; }
  .thinking-visual .thinking-art { height: 210px; }
  .thinking-visual .book-shelf img { max-height: 150px; }
}
@container (max-width: 480px) {
  .thinking-copy { padding: 20px; }
  .thinking-copy .thinking-title { font-size: 1.5rem; }
  .thinking-visual .thinking-art { height: 190px; }
  .thinking-visual .book-shelf { padding: 24px 16px; gap: 8px; }
  .thinking-visual .book-shelf img { max-height: 142px; width: calc((100% - 24px) / 4); }
  .thinking-summary { font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  .thinking-link.thinking-visual { transition: none; }
}

/* Interaction borders stay neutral; product colour belongs to the content. */
.project-card:focus-within { border-color: #000; }
@media (hover: hover) and (pointer: fine) {
  .project-card:hover, .thinking-link.thinking-visual:hover { border-color: #000; }
}
