.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
  margin-top: 3rem;
}
.portfolio-card { min-width: 0; scroll-margin-top: 110px; }
.portfolio-cover { display: block; position: relative; color: #111827; background: #eeeade; border: 1px solid rgba(255,255,255,.24); text-decoration: none; }
.portfolio-browser-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem; font-size: .63rem; font-weight: 700; }
.portfolio-browser-bar > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-browser-bar > span:first-child { color: #929487; font-size: .45rem; letter-spacing: .1em; }
.portfolio-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 820; object-fit: contain; }
.portfolio-preview-label { display: flex; justify-content: space-between; padding: .7rem .9rem; background: #dff34d; color: #111827; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.portfolio-cover:hover .portfolio-preview-label { background: white; }
.portfolio-card-copy { display: flex; flex-direction: column; padding: 1.2rem 0 0; }
.portfolio-category { display: flex; gap: .8rem; color: #dff34d; font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.portfolio-category span { color: #87909e; }
.portfolio-card h3 { margin: .6rem 0 .75rem; color: white; font-family: var(--display); font-size: clamp(2rem, 2.8vw, 2.8rem); font-weight: 400; line-height: 1.05; text-transform: uppercase; }
.portfolio-description { color: #bec4cf; font-size: .85rem; line-height: 1.7; margin: 0; }
.portfolio-card .project-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; padding: .7rem 0; min-height: 44px; font-size: .64rem; border-color: #535b6b; }
.portfolio-cover:focus-visible, .portfolio-dialog button:focus-visible, .portfolio-dialog a:focus-visible { outline: 3px solid #4c9aff; outline-offset: 4px; }
.portfolio-dialog { width: min(1160px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 1.5rem; border: 1px solid #556073; background: #101625; color: #f4f4ef; overflow: auto; }
.portfolio-dialog::backdrop { background: rgba(3,7,16,.85); }
.portfolio-dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.portfolio-dialog-toolbar h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; margin: 0; }
.portfolio-close { flex: 0 0 auto; }
.portfolio-dialog button { min-height: 44px; padding: .6rem 1rem; color: white; background: #222c3f; border: 1px solid #63718a; cursor: pointer; font: inherit; font-size: .8rem; }
.portfolio-devices { display: flex; gap: .5rem; margin: 1.3rem 0; }
.portfolio-devices button[aria-pressed="true"] { color: #101625; background: #dff34d; border-color: #dff34d; }
#portfolio-dialog-content { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 1.5rem; align-items: start; }
.portfolio-detail-copy > p { color: #c4cbd5; margin-top: 0; font-size: .9rem; line-height: 1.7; }
.portfolio-detail-copy .project-highlights { margin: 1rem 0; }
.portfolio-detail-copy .project-highlights li { padding: .8rem 0; }
.portfolio-detail-screen { background: #080d17; padding: .5rem; }
.portfolio-detail-screen img { display: block; width: 100%; height: auto; }
.portfolio-detail-screen img[data-device-image="mobile"] { width: min(100%, 300px); margin: auto; }
.portfolio-detail-screen img[hidden] { display: none; }
.portfolio-visit { display: inline-flex; align-items: center; gap: 2rem; min-height: 44px; padding: .75rem 1rem; color: #101625; background: #dff34d; font-weight: 700; font-size: .85rem; text-decoration: none; }
html.portfolio-open { overflow: hidden; }
.software-section { background: var(--cream); color: var(--ink); scroll-margin-top: 100px; }
.software-layout { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 3rem; align-items: center; }
.software-copy h2 { margin: 1.2rem 0; font-family: var(--display); font-size: clamp(3.5rem, 5.7vw, 5.8rem); font-weight: 400; line-height: .95; text-transform: uppercase; }
.software-copy h2 em { color: var(--cobalt); font-style: normal; }
.software-project-name { font-weight: 800; font-size: 1.1rem; }
.software-project-name span { display: block; margin-top: .3rem; font-size: .73rem; font-weight: 600; color: #586071; }
.software-copy > p:not(.eyebrow):not(.software-project-name) { color: #4d5360; line-height: 1.75; }
.software-features { padding-left: 1.1rem; color: #333c51; font-size: .9rem; line-height: 1.9; }
.software-cta { display: inline-flex; gap: 1.5rem; align-items: center; min-height: 44px; padding: .8rem 0; border-bottom: 2px solid var(--cobalt); color: var(--navy); font-weight: 800; font-size: .9rem; text-decoration: none; }
.crm-demo { min-width: 0; background: #f7f9fc; border: 1px solid #cbd3e1; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px #0d105214; }
.crm-demo-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.25rem; background: #0d1052; color: white; }
.crm-demo-header strong { display: flex; gap: .55rem; align-items: center; font-size: .95rem; }
.crm-demo-header strong span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #ffffff70; border-radius: 6px; }
.crm-demo-badge { font-size: .63rem; color: #e0e6ff; }
.crm-demo-notice { margin: 0; padding: .55rem 1.25rem; font-size: .7rem; color: #5b4c22; background: #fff4cf; }
.crm-demo-nav { display: flex; gap: .25rem; padding: .8rem 1.25rem 0; }
.crm-demo-nav button { padding: .65rem 1rem; min-height: 44px; border: 1px solid transparent; border-radius: 6px; color: #4d5871; font: inherit; font-size: .8rem; font-weight: 700; background: transparent; cursor: pointer; }
.crm-demo-nav button[aria-pressed="true"] { color: #233faf; background: #e8edff; border-color: #c7d2ff; }
.crm-demo-nav button:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.crm-demo-panel { padding: 1.25rem; }
.crm-demo-panel[hidden] { display: none; }
.crm-demo-title { display: flex; justify-content: space-between; align-items: end; gap: .5rem; margin-bottom: 1.3rem; }
.crm-demo-title h3 { margin: 0; color: #192743; font-size: 1.4rem; line-height: 1.2; letter-spacing: -.03em; }
.crm-demo-title > span { font-size: .65rem; color: #59657b; white-space: nowrap; }
.crm-board { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .65rem; }
.crm-column { min-width: 0; }
.crm-column h4 { display: flex; align-items: center; gap: .3rem; margin: 0 0 .65rem; font-size: .64rem; color: #46526b; }
.crm-column h4 i { width: 6px; height: 6px; border-radius: 50%; background: #6286ed; }
.crm-column:nth-child(2) h4 i { background: #c99938; }
.crm-column:nth-child(3) h4 i { background: #429078; }
.crm-column h4 span { margin-left: auto; }
.crm-record { display: flex; flex-direction: column; gap: .65rem; min-height: 193px; padding: .85rem; background: white; border: 1px solid #dce2ec; border-radius: 8px; }
.crm-record-type { font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; color: #66738b; }
.crm-record strong { font-size: .85rem; color: #1f2d46; }
.crm-record p { margin: 0; color: #59657b; font-size: .72rem; line-height: 1.55; }
.crm-next { margin-top: auto; padding-top: .7rem; border-top: 1px solid #edf0f5; color: #405787; font-size: .63rem; }
.crm-follow-ups { list-style: none; padding: 0; margin: 0; }
.crm-follow-ups li { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; align-items: center; gap: .6rem; padding: 1rem 0; border-top: 1px solid #dce2ec; }
.crm-time, .crm-task-type { font-size: .65rem; color: #52617c; }
.crm-follow-ups strong { color: #1f2d46; font-size: .85rem; }
.crm-follow-ups p { color: #59657b; font-size: .75rem; margin: .3rem 0 0; }
.crm-demo-footer { border-top: 1px solid #dce2ec; padding: .9rem 1.25rem; margin: 0; font-size: .67rem; line-height: 1.5; color: #606a7b; background: white; }
@media (max-width: 1000px) { .software-layout { grid-template-columns: minmax(0,1fr); gap: 2rem; } }
@media (max-width: 520px) {
  .crm-board { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  .crm-record { min-height: 0; }
  .crm-demo-title { align-items: start; flex-direction: column; gap: .65rem; }
  .crm-follow-ups li { grid-template-columns: 52px minmax(0,1fr); }
  .crm-task-type { grid-column: 2; }
  .crm-demo-panel, .crm-demo-header { padding: 1rem; }
}
@media (max-width: 1050px) { .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-top: 2rem; }
  .portfolio-card h3 { font-size: 2.4rem; }
  .portfolio-dialog { padding: 1rem; width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  #portfolio-dialog-content { grid-template-columns: minmax(0, 1fr); }
  .portfolio-detail-screen { grid-row: 1; }
}
