#projects {
  scroll-margin-top: 76px;
}
/* CabinWise additions are scoped to avoid changing existing portfolio content. */
.cw,
.cw * {
  box-sizing: border-box;
}
.cw {
  --cw-blue: #416c98;
  --cw-muted: #405367;
  --cw-line: #d8e0e7;
  color: #283b4d;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 18px;
  font-weight: 450;
  line-height: 1.65;
  text-align: left;
}
.cw a {
  color: var(--cw-blue);
  text-underline-offset: 5px;
}
.cw a:hover {
  color: #283b4d;
}
.cw a:focus-visible,
.cw button:focus-visible,
.cw select:focus-visible {
  outline: 3px solid #416c98;
  outline-offset: 5px;
}
.cw p {
  margin: 0 0 1.2rem;
}
.cw h1,
.cw h2,
.cw h3 {
  color: #283b4d;
  line-height: 1.13;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0 0 1.2rem;
}
.cw h2 {
  font-size: clamp(30px, 3.6vw, 46px);
}
.cw h3 {
  font-size: 23px;
  letter-spacing: -0.02em;
}
.cw .cw-eyebrow {
  color: var(--cw-blue);
  font:
    600 11px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.cw .cw-muted {
  color: var(--cw-muted);
}
.cw .cw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #416c98;
  border: 1px solid #416c98;
  color: #0a1422;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}
.cw .cw-button:hover {
  background: #416c98;
  color: #0a1422;
}
.cw .cw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.cw .cw-tags li {
  border: 1px solid #d8e0e7;
  border-radius: 5px;
  padding: 5px 10px;
  color: #405367;
  font-size: 14px;
}
.cw-feature {
  margin: 24px 4% 48px;
  padding: clamp(24px, 4vw, 60px);
  border: 1px solid #d8e0e7;
  border-radius: 12px;
  background: linear-gradient(125deg, #f2f6fa, #ffffff 75%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  box-shadow: 0 20px 60px #263b4d0a;
}
.cw-feature h2 {
  font-size: clamp(42px, 5vw, 66px);
  margin-bottom: 12px;
}
.cw-feature .cw-feature-lead {
  font-size: 23px;
  line-height: 1.4;
  color: #416c98;
}
.cw-visual {
  border: 1px solid #d8e0e7;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 50%, #eaf1f8, #ffffff 75%);
  overflow: hidden;
}
.cw-visual-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 24px 0;
  font-size: 14px;
  color: #405367;
}
.cw-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 24px 24px;
  gap: 16px;
}
.cw-mini-stats span {
  display: block;
  color: var(--cw-muted);
  font-size: 13px;
}
.cw-mini-stats strong {
  font-size: clamp(21px, 2vw, 30px);
  font-weight: 500;
}
.cw-page {
  margin: 0;
  background: #faf9f6;
}
.cw-page .cw-nav {
  max-width: 1200px;
  margin: auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--cw-line);
}
.cw-nav a {
  font-size: 16px;
  text-decoration: none;
}
.cw-nav .cw-brand {
  color: #283b4d;
  font-weight: 600;
}
.cw-wrap {
  max-width: 1200px;
  margin: auto;
  padding: 0 32px;
}
.cw-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 80px 0 64px;
}
.cw-hero h1 {
  font-size: clamp(58px, 7vw, 88px);
  margin-bottom: 18px;
}
.cw-hero .cw-lead {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #416c98;
}
.cw-hero .cw-intro {
  max-width: 470px;
  color: var(--cw-muted);
}
.cw-caption {
  font-size: 14px;
  color: var(--cw-muted);
  margin-top: 12px !important;
}
.cw-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-block: 1px solid var(--cw-line);
  padding: 26px 0;
  margin: 0;
}
.cw-meta dt {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--cw-muted);
  text-transform: uppercase;
}
.cw-meta dd {
  margin: 5px 0 0;
  font-size: 17px;
}
.cw-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--cw-line);
  scroll-margin-top: 24px;
}
.cw-section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.cw-section-header p:last-child {
  color: var(--cw-muted);
}
.cw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cw-panel {
  background: #ffffff;
  border: 1px solid var(--cw-line);
  border-radius: 9px;
  padding: 26px;
}
.cw-panel p {
  color: #405367;
  margin-bottom: 0;
  font-size: 17px;
}
.cw-panel .cw-number {
  font:
    12px ui-monospace,
    monospace;
  color: #416c98;
  display: block;
  margin-bottom: 30px;
}
.cw-demo {
  background: linear-gradient(120deg, #edf3f9, #ffffff);
  border: 1px solid #d8e0e7;
  border-radius: 10px;
  padding: 32px;
}
.cw-demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.cw-demo label {
  display: block;
  font-size: 14px;
  color: #405367;
  margin-bottom: 7px;
}
.cw-demo select {
  color: #283b4d;
  background: #ffffff;
  border: 1px solid #d8e0e7;
  padding: 10px 32px 10px 12px;
  border-radius: 5px;
  font: inherit;
  max-width: 100%;
}
.cw-demo .cw-eyebrow {
  margin-bottom: 6px;
}
.cw-demo .cw-mini-stats {
  padding: 0 0 28px;
  border-bottom: 1px solid var(--cw-line);
}
.cw-demo .cw-mini-stats strong {
  font-size: clamp(28px, 4vw, 44px);
}
.cw-demo .cw-mini-stats span {
  font-size: 14px;
}
.cw-state {
  color: #416c98;
  margin-top: 24px !important;
  margin-bottom: 0 !important;
}
.cw-flow {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.cw-flow li {
  border-top: 2px solid #5f8bc7;
  padding-top: 18px;
  counter-increment: step;
}
.cw-flow li:before {
  content: '0' counter(step);
  display: block;
  color: #416c98;
  font:
    12px ui-monospace,
    monospace;
  margin-bottom: 18px;
}
.cw-flow strong {
  display: block;
  font-size: 17px;
}
.cw-flow span {
  display: block;
  font-size: 16px;
  color: var(--cw-muted);
  margin-top: 8px;
}
.cw-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.cw-architecture {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  align-items: center;
  gap: 8px;
  margin: 36px 0;
}
.cw-node {
  padding: 24px 16px;
  text-align: center;
  border: 1px solid #d8e0e7;
  border-radius: 8px;
  background: #ffffff;
}
.cw-node strong,
.cw-node span {
  display: block;
}
.cw-node span {
  font-size: 14px;
  color: var(--cw-muted);
  margin-top: 7px;
}
.cw-arrow {
  text-align: center;
  color: #416c98;
  font-size: 24px;
}
.cw-list {
  color: #405367;
  padding-left: 20px;
}
.cw-list li {
  padding-left: 5px;
  margin-bottom: 12px;
}
.cw-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding: 40px 0 56px;
  font-size: 16px;
}
.cw-skip {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px;
  background: #faf9f6;
  z-index: 10;
}
.cw-skip:focus {
  top: 12px;
}
@media (max-width: 800px) {
  .cw-feature,
  .cw-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cw-hero {
    padding: 48px 0;
  }
  .cw-section-header,
  .cw-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cw-grid {
    grid-template-columns: 1fr;
  }
  .cw-panel .cw-number {
    margin-bottom: 16px;
  }
  .cw-flow {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .cw-section {
    padding: 48px 0;
  }
}
@media (max-width: 480px) {
  .cw-wrap {
    padding: 0 20px;
  }
  .cw-page .cw-nav {
    padding: 18px 20px;
  }
  .cw-meta {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .cw-feature {
    margin-inline: 4%;
    padding: 24px;
  }
  .cw-demo {
    padding: 22px;
  }
  .cw-mini-stats {
    gap: 10px;
    padding-inline: 16px;
  }
  .cw-architecture {
    grid-template-columns: 1fr;
  }
  .cw-arrow {
    transform: rotate(90deg);
  }
  .cw-flow {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cw * {
    scroll-behavior: auto;
    transition: none;
  }
}

.cw-model-stage {
  position: relative;
  height: 330px;
  width: 100%;
}
.cw-model-stage model-viewer {
  display: block;
  width: 100%;
  height: 100%;
  --progress-bar-color: #416c98;
  --progress-bar-height: 2px;
}
.cw-model-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 28px;
  text-align: center;
  font-size: 14px;
  color: #405367;
  pointer-events: none;
}
.cw-model-status[hidden] {
  display: none;
}
.cw-model-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 22px;
  color: #405367;
  font-size: 13px;
}
.cw-model-reset {
  border: 1px solid #d8e0e7;
  border-radius: 5px;
  background: #edf3f9;
  color: #416c98;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.cw-model-reset:disabled {
  opacity: 0.45;
  cursor: default;
}
.cw-model-credit {
  font-size: 14px;
  color: #405367;
  margin-top: 12px;
}
.cw-model-credit summary {
  cursor: pointer;
  color: #416c98;
  padding: 8px 0;
}
.cw-model-credit p {
  margin-top: 10px;
}
.cw-visual > .cw-model-credit {
  margin: 0;
  padding: 0 24px 16px;
}
@media (max-width: 480px) {
  .cw-model-stage {
    height: 260px;
  }
  .cw-model-toolbar {
    padding-inline: 16px;
  }
}

/* Shared light theme */
.cw .cw-button {
  background: #dce9f5;
  border-color: #dce9f5;
  color: #2e5175;
  border-radius: 9px;
}
.cw .cw-button:hover {
  background: #ccdfef;
  color: #233e58;
}
.cw .cw-eyebrow {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  margin-bottom: 14px;
}
.cw h2 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.025em;
}
.cw h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.cw-hero h1 {
  font-size: clamp(48px, 6vw, 72px);
}
.cw-hero .cw-lead {
  font-size: clamp(23px, 2.5vw, 29px);
}
.cw-visual {
  background: radial-gradient(ellipse at 50% 45%, #fff, #edf3f8);
}
.cw-model-reset {
  background: #e3edf6;
  color: #355675;
  border-color: #c6d6e4;
}
.cw-demo select {
  background: #fff;
  color: #283b4d;
}
.cw .cw-tags li {
  color: #456684;
  border-color: #cedce8;
  background: #f4f8fb;
}
.cw-panel,
.cw-demo {
  border-radius: 13px;
}
@media (min-width: 801px) {
  #features .cw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
