/* Sanlab public site styles (from original index.html + projects.html) */

  :root {
    --blue-deep: #0A2540;
    --blue-mid: #185FA5;
    --blue-light: #E6F1FB;
    --blue-pale: #F0F7FF;
    --white: #ffffff;
    --gray-100: #F7F8FA;
    --gray-200: #EAEDF2;
    --gray-400: #9BA3B0;
    --gray-600: #4A5568;
    --gray-800: #1A202C;
    --accent: #1A7FE8;
    --accent-light: #D6EAFF;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body { font-family: 'DM Sans', sans-serif; background: var(--white); color: var(--gray-800); font-size: 16px; line-height: 1.7; overflow-x: hidden; }
  h1, h2, h3, h4, .logo { font-family: 'Syne', sans-serif; }

  nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.1rem 3rem;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
  }
  .logo { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; color: var(--blue-deep); text-decoration: none; }
  .logo span { color: var(--blue-mid); }
  .nav-links { display: flex; gap: 2.5rem; list-style: none; }
  .nav-links a { font-size: 14px; color: var(--gray-600); text-decoration: none; font-weight: 400; transition: color 0.2s; }
  .nav-links a:hover, .nav-links a.active { color: var(--blue-mid); }
  .nav-cta { padding: 9px 20px; background: var(--blue-mid); color: white; border: none; border-radius: 8px; font-size: 14px; font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.2s; }
  .nav-cta:hover { background: var(--blue-deep); }

  .hero { padding: 10rem 3rem 6rem; max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
  .hero-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--blue-mid); background: var(--blue-light); padding: 5px 14px; border-radius: 100px; margin-bottom: 1.5rem; letter-spacing: 0.3px; }
  .hero-tag::before { content: ''; width: 6px; height: 6px; background: var(--blue-mid); border-radius: 50%; }
  .hero h1 { font-size: 46px; font-weight: 700; line-height: 1.1; letter-spacing: -1px; color: var(--blue-deep); margin-bottom: 1.25rem; }
  .hero h1 em { font-style: normal; color: var(--blue-mid); }
  .hero p { font-size: 17px; color: var(--gray-600); line-height: 1.75; margin-bottom: 2rem; font-weight: 300; }
  .hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn-primary { padding: 12px 24px; background: var(--blue-mid); color: white; border: none; border-radius: 8px; font-size: 15px; font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.2s, transform 0.15s; }
  .btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
  .btn-outline { padding: 12px 24px; background: transparent; color: var(--blue-mid); border: 1.5px solid var(--blue-mid); border-radius: 8px; font-size: 15px; font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.2s; }
  .btn-outline:hover { background: var(--blue-light); }
  .hero-right { background: var(--blue-pale); border-radius: 20px; padding: 2.5rem; border: 1px solid var(--gray-200); }
  .hero-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-stat { background: white; border-radius: 12px; padding: 1.25rem; border: 1px solid var(--gray-200); }
  .hero-stat .val { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 700; color: var(--blue-mid); line-height: 1; margin-bottom: 4px; }
  .hero-stat .desc { font-size: 12px; color: var(--gray-400); font-weight: 400; line-height: 1.4; }
  .hero-pipeline { display: flex; align-items: center; gap: 8px; margin-top: 16px; background: white; border-radius: 12px; padding: 1rem 1.25rem; border: 1px solid var(--gray-200); }
  .pipe-item { flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: var(--blue-mid); font-family: 'Syne', sans-serif; }
  .pipe-sep { color: var(--gray-400); font-size: 14px; }

  section { padding: 5rem 3rem; }
  .section-inner { max-width: 1100px; margin: 0 auto; }
  .section-label { font-size: 11px; font-weight: 600; color: var(--blue-mid); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.75rem; }
  section h2 { font-size: 32px; font-weight: 700; color: var(--blue-deep); letter-spacing: -0.5px; margin-bottom: 1rem; line-height: 1.2; }
  .section-lead { font-size: 17px; color: var(--gray-600); max-width: 600px; line-height: 1.75; font-weight: 300; }

  .domains-bg { background: var(--gray-100); }
  .domains-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 3rem; }
  .domain-card { background: white; border-radius: 16px; padding: 1.75rem; border: 1px solid var(--gray-200); transition: box-shadow 0.2s, transform 0.2s; }
  .domain-card:hover { box-shadow: 0 8px 32px rgba(10,37,64,0.08); transform: translateY(-2px); }
  .domain-icon { width: 44px; height: 44px; background: var(--blue-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 20px; }
  .domain-card h3 { font-size: 16px; font-weight: 700; color: var(--blue-deep); margin-bottom: 0.5rem; line-height: 1.3; }
  .domain-card p { font-size: 13.5px; color: var(--gray-600); line-height: 1.65; font-weight: 300; }
  .domain-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }
  .tag { font-size: 11px; color: var(--blue-mid); background: var(--blue-light); padding: 3px 10px; border-radius: 100px; font-weight: 500; }

  .problem-bg { background: var(--blue-deep); color: white; }
  .problem-bg h2 { color: white; }
  .problem-bg .section-label { color: #7BBAFF; }
  .problem-bg .section-lead { color: rgba(255,255,255,0.7); }
  .barriers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 3rem; }
  .barrier { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 2rem; }
  .barrier-num { font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #7BBAFF; margin-bottom: 0.5rem; }
  .barrier h3 { font-size: 20px; font-weight: 700; color: white; margin-bottom: 0.4rem; }
  .barrier .barrier-sub { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 1.5rem; font-style: italic; }
  .barrier ul { list-style: none; padding: 0; }
  .barrier ul li { font-size: 14px; color: rgba(255,255,255,0.75); padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; font-weight: 300; }
  .barrier ul li:last-child { border-bottom: none; }
  .barrier ul li::before { content: '→'; color: #7BBAFF; flex-shrink: 0; margin-top: 1px; }
  .root-cause { margin-top: 2.5rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-left: 3px solid #7BBAFF; border-radius: 0 12px 12px 0; padding: 1.5rem 2rem; font-size: 16px; color: rgba(255,255,255,0.85); font-style: italic; line-height: 1.7; font-weight: 300; }

  .story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; margin-top: 3rem; }
  .story-text p { font-size: 16px; color: var(--gray-600); line-height: 1.8; margin-bottom: 1.25rem; font-weight: 300; }
  .story-highlights { display: flex; flex-direction: column; gap: 16px; }
  .highlight-card { background: var(--blue-pale); border-radius: 14px; padding: 1.5rem; border: 1px solid var(--gray-200); }
  .highlight-card h4 { font-size: 11px; font-weight: 700; color: var(--blue-mid); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
  .highlight-card p { font-size: 14px; color: var(--gray-600); line-height: 1.6; font-weight: 300; }

  .model-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 3rem; }
  .model-card { border-radius: 16px; padding: 2rem; border: 1px solid var(--gray-200); }
  .model-card.blue { background: var(--blue-mid); color: white; border-color: var(--blue-mid); }
  .model-card.light { background: var(--blue-pale); }
  .model-card.white { background: white; }
  .model-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 0.75rem; line-height: 1.2; }
  .model-card.blue h3 { color: white; }
  .model-card.light h3, .model-card.white h3 { color: var(--blue-deep); }
  .model-card p { font-size: 14px; line-height: 1.7; font-weight: 300; }
  .model-card.blue p { color: rgba(255,255,255,0.8); }
  .model-card.light p, .model-card.white p { color: var(--gray-600); }

  .cta-section { background: var(--blue-pale); text-align: center; padding: 6rem 3rem; }
  .cta-section h2 { font-size: 36px; color: var(--blue-deep); margin-bottom: 1rem; }
  .cta-section p { font-size: 17px; color: var(--gray-600); margin-bottom: 2.5rem; max-width: 500px; margin-left: auto; margin-right: auto; font-weight: 300; }
  .cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

  hr { border: none; border-top: 1px solid var(--gray-200); }

  @keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
  .hero-left { animation: fadeUp 0.7s ease both; }
  .hero-right { animation: fadeUp 0.7s 0.15s ease both; }

  @media (max-width: 900px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links { display: none; }
    .hero { grid-template-columns: 1fr; padding: 8rem 1.5rem 4rem; }
    .hero h1 { font-size: 34px; }
    section { padding: 4rem 1.5rem; }
    .domains-grid { grid-template-columns: 1fr; }
    .barriers-grid { grid-template-columns: 1fr; }
    .story-grid { grid-template-columns: 1fr; gap: 2rem; }
    .model-grid { grid-template-columns: 1fr; }
  }

/* ---- Projects page ---- */
.page-hero { padding: 8rem 3rem 3rem; max-width: 1100px; margin: 0 auto; }
  .section-label { font-size: 11px; font-weight: 600; color: var(--blue-mid); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.75rem; }
  .page-hero h1 { font-size: 42px; font-weight: 700; color: var(--blue-deep); letter-spacing: -0.8px; line-height: 1.15; margin-bottom: 1rem; }
  .page-hero p { font-size: 17px; color: var(--gray-600); font-weight: 300; max-width: 580px; line-height: 1.75; }

  .filters { max-width: 1100px; margin: 2.5rem auto 0; padding: 0 3rem; display: flex; gap: 10px; flex-wrap: wrap; }
  .filter-btn { padding: 7px 16px; border-radius: 100px; font-size: 13px; font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer; border: 1.5px solid var(--gray-200); background: white; color: var(--gray-600); transition: all 0.2s; }
  .filter-btn:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
  .filter-btn.active { background: var(--blue-mid); color: white; border-color: var(--blue-mid); }

  .projects-grid { max-width: 1100px; margin: 2.5rem auto 5rem; padding: 0 3rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

  .project-card { background: white; border-radius: 16px; border: 1px solid var(--gray-200); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column; }
  .project-card:hover { box-shadow: 0 8px 32px rgba(10,37,64,0.09); transform: translateY(-2px); }

  .card-slideshow { position: relative; height: 200px; background: var(--blue-pale); overflow: hidden; cursor: pointer; }
  .slide { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
  .slide.active { display: flex; }
  .slide img { width: 100%; height: 100%; object-fit: cover; }
  .slide-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; background: var(--blue-pale); }
  .slide-icon { font-size: 48px; opacity: 0.5; }
  .slide-label { font-size: 12px; color: var(--blue-mid); font-weight: 500; }
  .slide-nav { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
  .slide-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(24,95,165,0.3); cursor: pointer; transition: background 0.2s; }
  .slide-dot.active { background: var(--blue-mid); }
  .slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.85); border: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; color: var(--blue-mid); font-weight: 700; transition: background 0.15s; }
  .slide-arrow:hover { background: white; }
  .slide-arrow.prev { left: 10px; }
  .slide-arrow.next { right: 10px; }

  .card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
  .card-domain { font-size: 11px; font-weight: 600; color: var(--blue-mid); letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 6px; }
  .card-title { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 700; color: var(--blue-deep); margin-bottom: 8px; line-height: 1.2; }
  .card-desc { font-size: 13.5px; color: var(--gray-600); line-height: 1.65; font-weight: 300; flex: 1; }
  .card-status { display: inline-block; margin-top: 12px; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
  .status-progress { background: #E6F1FB; color: #185FA5; }
  .status-completed { background: #D1FAE5; color: #065F46; }
  .status-planned { background: #FEF3C7; color: #92400E; }

  .card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; align-items: center; }
  .btn-doc { flex: 1; padding: 9px 14px; background: var(--blue-mid); color: white; border: none; border-radius: 8px; font-size: 13px; font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer; text-decoration: none; text-align: center; transition: background 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .btn-doc:hover { background: var(--blue-deep); }
  .btn-slides { padding: 9px 14px; background: white; color: var(--blue-mid); border: 1.5px solid var(--blue-mid); border-radius: 8px; font-size: 13px; font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; gap: 6px; }
  .btn-slides:hover { background: var(--blue-light); }

  .modal-overlay { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(10,37,64,0.85); backdrop-filter: blur(4px); align-items: center; justify-content: center; }
  .modal-overlay.open { display: flex; }
  .modal { background: white; border-radius: 20px; width: 90%; max-width: 760px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
  .modal-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
  .modal-title { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; color: var(--blue-deep); }
  .modal-close { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--gray-200); background: white; cursor: pointer; font-size: 16px; color: var(--gray-600); display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
  .modal-close:hover { background: var(--gray-100); }
  .modal-body { flex: 1; overflow-y: auto; padding: 2rem; }
  .modal-slide-area { background: var(--blue-pale); border-radius: 12px; height: 380px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
  .modal-slide { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; flex-direction: column; gap: 12px; }
  .modal-slide.active { display: flex; }
  .modal-slide img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
  .modal-slide-icon { font-size: 72px; opacity: 0.4; }
  .modal-slide-text { font-size: 15px; color: var(--blue-mid); font-weight: 500; }
  .modal-slide-sub { font-size: 13px; color: var(--gray-400); }
  .modal-nav { display: flex; justify-content: center; align-items: center; gap: 16px; }
  .modal-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--gray-200); background: white; cursor: pointer; font-size: 14px; color: var(--blue-mid); display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
  .modal-arrow:hover { background: var(--blue-light); border-color: var(--blue-mid); }
  .modal-counter { font-size: 13px; color: var(--gray-400); min-width: 60px; text-align: center; }
  .modal-info { background: var(--gray-100); border-radius: 10px; padding: 1.25rem; margin-top: 1.5rem; }
  .modal-info h4 { font-size: 13px; font-weight: 600; color: var(--blue-mid); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
  .modal-info p { font-size: 14px; color: var(--gray-600); line-height: 1.6; font-weight: 300; }

  .card-status { align-self: flex-start; }
  .no-projects { grid-column: 1 / -1; color: var(--gray-400); padding: 3rem 0; text-align: center; }
  .btn-doc.disabled { background: var(--gray-200); color: var(--gray-400); cursor: default; }
  .btn-doc.disabled:hover { background: var(--gray-200); }
  .nl { white-space: pre-line; }
  @media (max-width: 900px) {
    .page-hero { padding: 7rem 1.5rem 2rem; } .page-hero h1 { font-size: 30px; }
    .filters { padding: 0 1.5rem; } .projects-grid { padding: 0 1.5rem; grid-template-columns: 1fr; }
  }

/* ===== Clickable project cards ===== */
.project-card[data-href] { cursor: pointer; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--blue-mid); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 12px; }
.card-meta .card-status { margin-top: 0; }
.meta-chip { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11.5px; font-weight: 500; background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.meta-chip.draft { background: #FFF6E0; color: #8A5A00; border-color: #F2D9A0; }
.card-footer a.btn-doc { text-decoration: none; }

/* ===== Project page ===== */
.project-hero { padding-bottom: 1.5rem; }
.back-link { display: inline-block; font-size: 13.5px; color: var(--blue-mid); text-decoration: none; margin-bottom: 1.25rem; font-weight: 500; }
.back-link:hover { text-decoration: underline; }
.project-hero .card-meta { margin: 0 0 1.25rem; }
.project-hero .lead { font-size: 18px; max-width: 720px; }
.project-layout { max-width: 1100px; margin: 1rem auto 3rem; padding: 0 3rem; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
.project-layout.no-side { grid-template-columns: minmax(0, 760px); }
.proj-section { margin-bottom: 3rem; }
.proj-section h2 { font-size: 22px; color: var(--blue-deep); letter-spacing: -0.3px; margin-bottom: 1.1rem; display: flex; align-items: center; gap: 10px; }
.proj-section h2 .count { font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 600; color: var(--blue-mid); background: var(--blue-light); padding: 2px 10px; border-radius: 100px; }
.muted { color: var(--gray-400); }

.richtext { font-size: 16.5px; line-height: 1.85; color: var(--gray-800); max-width: 70ch; }
.richtext p { margin-bottom: 1.1rem; font-weight: 300; }
.richtext h3 { font-size: 19px; color: var(--blue-deep); margin: 2rem 0 .6rem; }
.richtext ul { margin: 0 0 1.1rem 1.25rem; font-weight: 300; }
.richtext li { margin-bottom: .35rem; }
.richtext a { color: var(--blue-mid); text-decoration: underline; text-underline-offset: 3px; }
.richtext strong { font-weight: 600; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gallery-item { position: relative; padding: 0; border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; background: var(--blue-pale); cursor: zoom-in; aspect-ratio: 4 / 3; display: block; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:focus-visible, .slide-thumb-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 12px; text-align: left; color: #fff; background: linear-gradient(transparent, rgba(10,37,64,.8)); line-height: 1.35; }

.slides-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.slide-thumb-btn { flex: 0 0 200px; scroll-snap-align: start; padding: 0; border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; text-align: left; font: inherit; }
.slide-thumb-btn:hover { box-shadow: 0 6px 20px rgba(10,37,64,.1); }
.slide-thumb-btn img, .slide-thumb-btn .st-icon { width: 100%; height: 118px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--blue-pale); font-size: 40px; }
.slide-thumb-btn .st-label { display: block; padding: 8px 10px; font-size: 12.5px; color: var(--gray-600); line-height: 1.35; }

.project-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.side-card { border: 1px solid var(--gray-200); border-radius: 14px; padding: 1.25rem; background: #fff; }
.side-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--blue-mid); margin-bottom: .75rem; }
.res-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.res-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--gray-100); text-decoration: none; color: inherit; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.res-list a:hover { background: var(--blue-light); border-color: var(--accent-light); }
.res-icon { font-size: 22px; flex-shrink: 0; }
.res-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.res-text b { font-size: 14px; font-weight: 500; color: var(--blue-deep); overflow-wrap: anywhere; }
.res-text small { font-size: 12px; color: var(--gray-600); font-weight: 300; }
.res-go { color: var(--blue-mid); font-size: 15px; }

.project-pager { max-width: 1100px; margin: 0 auto 5rem; padding: 2rem 3rem 0; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--gray-200); }
.project-pager a { display: flex; flex-direction: column; text-decoration: none; color: var(--blue-deep); font-family: 'Syne', sans-serif; font-weight: 700; max-width: 45%; }
.project-pager a small { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 12px; color: var(--blue-mid); margin-bottom: 2px; }
.project-pager a.next { text-align: right; margin-left: auto; }
.project-pager a:hover { color: var(--blue-mid); }

.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10,37,64,.97); display: flex; align-items: center; justify-content: center; padding: 3.5rem 4rem 5rem; }
.lightbox[hidden] { display: none; }
.lb-stage { max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 9rem); border-radius: 8px; box-shadow: 0 12px 48px rgba(0,0,0,.5); }
.lb-icon { font-size: 120px; opacity: .6; }
.lb-caption { position: absolute; left: 0; right: 0; bottom: 1.25rem; text-align: center; color: #fff; font-size: 14px; display: flex; flex-direction: column; gap: 2px; padding: 0 4rem; }
.lb-caption span { color: #B9CDE4; font-size: 13px; font-weight: 300; }
.lb-caption em { font-style: normal; color: #7F9BBA; font-size: 12px; }
.lb-close, .lb-arrow { position: absolute; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.lb-close:hover, .lb-arrow:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 1rem; right: 1rem; width: 40px; height: 40px; font-size: 16px; }
.lb-arrow { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 26px; }
.lb-arrow[hidden] { display: none; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }

@media (max-width: 900px) {
  .project-layout, .project-layout.no-side { grid-template-columns: minmax(0, 1fr); padding: 0 1.5rem; gap: 2rem; }
  .project-side { position: static; }
  .project-pager { padding: 2rem 1.5rem 0; }
  .lightbox { padding: 3.5rem 1rem 5rem; }
  .lb-arrow { width: 38px; height: 38px; }
}

/* ===== Project websites: button, live preview, card chip ===== */
.site-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 1.5rem; }
.btn-site { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; background: var(--blue-mid); color: #fff; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500; text-decoration: none; transition: background .15s, transform .15s; }
.btn-site:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-site:focus-visible, .site-act:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.site-host { font-size: 13px; color: var(--gray-400); }
.site-wrap { max-width: 1100px; margin: 1.25rem auto 2.5rem; padding: 0 3rem; }
.site-block { border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 8px 30px rgba(10,37,64,.08); }
.site-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--gray-100); border-bottom: 1px solid var(--gray-200); }
.site-bar .dots { display: flex; gap: 6px; }
.site-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-200); display: block; }
.site-title { flex: 1; min-width: 0; font-size: 13px; color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-act { font: inherit; font-size: 12.5px; font-weight: 500; color: var(--blue-mid); background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; padding: 6px 12px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.site-act:hover { background: var(--blue-light); }
#site-frame { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
.site-block.is-full { position: fixed; inset: 0; z-index: 950; border-radius: 0; border: 0; display: flex; flex-direction: column; }
.site-block.is-full #site-frame { flex: 1; height: auto; }
.meta-chip.live { background: #E6F6EE; color: #146C43; border-color: #BFE5D0; }
.btn-site-card { text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 900px) {
  .site-wrap { padding: 0 1.5rem; }
  #site-frame { height: 520px; }
  .site-bar .dots { display: none; }
}


/* ===== Mobile fixes ===== */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero-left, .hero-right { min-width: 0; }
  .hero-right { padding: 1.25rem; }
  .hero-pipeline { flex-wrap: wrap; justify-content: center; }
  .hero-stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  nav { gap: 8px; }
  .logo { margin-right: auto; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; width: 44px; height: 44px; padding: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; cursor: pointer; }
  .nav-toggle span { display: block; width: 20px; height: 2px; margin: 2.5px 0; background: var(--blue-deep); border-radius: 1px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px 1.5rem 14px; background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: 0 12px 24px rgba(10,37,64,.08); }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--gray-200); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: flex; align-items: center; min-height: 48px; font-size: 16px; }
  .filter-btn { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
  .back-link { display: inline-block; padding: 10px 0; }
}
@media (max-width: 420px) {
  nav { padding: .7rem 1rem; }
  .nav-cta { padding: 8px 12px; font-size: 13px; }
  .hero { padding-left: 1rem; padding-right: 1rem; }
}


/* ===== Resource Lab ===== */
.lab-wrap { max-width: 1100px; margin: 2rem auto 5rem; padding: 0 3rem; }
.lab-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 3rem; }
.lab-type { display: flex; flex-direction: column; gap: 4px; padding: 1.5rem 1.75rem; background: #fff; border: 1.5px solid var(--gray-200); border-radius: 16px; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.lab-type:hover { border-color: var(--blue-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,37,64,.08); }
.lab-type.active { border-color: var(--blue-mid); background: var(--blue-pale); }
.lab-type-name { font-weight: 600; color: var(--blue-deep); font-size: 16px; }
.lab-type b { font-family: 'Syne', sans-serif; font-size: 40px; line-height: 1.1; color: var(--blue-deep); }
.lab-type-sub { font-size: 14px; color: var(--gray-600); }
.lab-type-go { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--blue-mid); }
.lab-sub { font-size: 22px; color: var(--blue-deep); margin-bottom: 1.25rem; }
.lab-sub small { font-size: 14px; font-weight: 400; color: var(--gray-600); }
.lab-envs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.env-card { display: flex; flex-direction: column; gap: 6px; padding: 1.4rem 1.5rem; min-height: 170px; background: #fff; border: 1.5px solid var(--gray-200); border-radius: 16px; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.env-card:hover { border-color: var(--blue-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,37,64,.08); }
.env-name { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; color: var(--blue-deep); }
.env-count { font-size: 14px; font-weight: 600; color: var(--blue-mid); }
.env-preview { font-size: 13px; color: var(--gray-600); line-height: 1.5; flex: 1; }
.env-go { font-size: 13px; font-weight: 600; color: var(--blue-mid); margin-top: 6px; }
.env-other { border-style: dashed; background: var(--gray-100); }
.lab-note { margin-top: 2rem; font-size: 14px; color: var(--gray-600); }
.lab-note a { color: var(--blue-mid); }
.kind-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 100px; background: var(--blue-light); color: var(--blue-deep); }
.kind-project { background: #E3F6E9; color: #1D7A44; }
a.filter-btn { text-decoration: none; display: inline-flex; align-items: center; }
.env-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: .75rem 0 0; }
.env-chip { font-size: 13px; padding: 5px 12px; border-radius: 100px; border: 1px solid var(--gray-200); background: #fff; color: var(--blue-deep); text-decoration: none; }
.env-chip:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
@media (max-width: 900px) {
  .lab-wrap { padding: 0 1.5rem; margin-bottom: 3rem; }
  .lab-types { gap: 12px; margin-bottom: 2rem; }
  .lab-type { padding: 1.1rem 1.25rem; }
  .lab-type b { font-size: 32px; }
  .lab-envs { grid-template-columns: 1fr; gap: 12px; }
  .env-card { min-height: 0; padding: 1.1rem 1.25rem; }
  .env-chip { padding: 8px 14px; }
}


/* ===== Accessibility ===== */
.hero-stat .desc { color: #566074; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 300; background: #fff; color: var(--blue-deep); padding: 10px 16px; border: 2px solid var(--blue-mid); border-radius: 8px; font-weight: 600; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
