:root {
      --bg-main: #000000;
      --text-main: #ffffff;
      --text-soft: #e5e5e5;
      --accent: #7bada5;
    }

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

    html, body {
      width: 100%;
      height: 100%;
      background-color: var(--bg-main);
      color: var(--text-main);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Inter", "Segoe UI", sans-serif;
      scroll-behavior: smooth;
    }

    body {
      line-height: 1.6;
      overflow-x: hidden;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    /* Layout utility */
    .page-container {
      min-height: 100vh;
      background: radial-gradient(circle at top, #111 0%, #000 55%, #000 100%);
    }

    header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 20;
      backdrop-filter: blur(16px);
      background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.85),
        rgba(0, 0, 0, 0.3),
        transparent
      );
      border-bottom: 1px solid rgba(229, 229, 229, 0.03);
    }

    .nav-inner {
      max-width: 1120px;
      margin: 0 auto;
      padding: 0.75rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }

    .logo {
      font-size: 0.9rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--text-soft);
    }

    .logo span {
      color: var(--accent);
    }

    nav {
      display: flex;
      gap: 1.5rem;
      font-size: 0.9rem;
    }

    nav a {
      position: relative;
      color: var(--text-soft);
    }

    nav a::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -0.25rem;
      width: 0;
      height: 1px;
      background: var(--accent);
      transition: width 0.25s ease;
    }

    nav a:hover::after {
      width: 100%;
    }

    .nav-cta {
      padding: 0.35rem 0.9rem;
      border-radius: 999px;
      border: 1px solid rgba(229, 229, 229, 0.15);
      background: rgba(0, 0, 0, 0.6);
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--text-soft);
      cursor: pointer;
      transition: border 0.2s ease, background 0.2s ease, transform 0.15s ease;
    }

    .nav-cta:hover {
      border-color: var(--accent);
      background: rgba(123, 173, 165, 0.12);
      transform: translateY(-1px);
    }

    main {
      padding-top: 64px; /* for fixed header */
    }

    /* ---------- HERO ---------- */

    .hero {
      position: relative;
      height: 100vh;
      width: 100%;
      overflow: hidden;
    }

    #hero-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
    }

    .hero-overlay {
      position: relative;
      z-index: 2;
      height: 100%;
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 0 0vw 10vh;
      pointer-events: none;
    }

    .hero-topline {
      font-size: 0.8rem;
      letter-spacing: 0.25em;
      text-transform: uppercase;
      color: var(--text-soft);
      margin-bottom: 1.25rem;
    }

    .hero-title {
      max-width: 18ch;
      font-size: clamp(2.7rem, 5vw, 4rem);
      line-height: 1.05;
      margin-bottom: 1.5rem;
    }

    .hero-highlight {
      color: var(--accent);
    }

    .hero-subtitle {
      max-width: 40ch;
      font-size: 1rem;
      color: var(--text-soft);
      margin-bottom: 2.5rem;
    }

    .hero-ctas {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      pointer-events: auto;
    }

    .primary-btn,
    .ghost-btn {
      font-size: 0.9rem;
      border-radius: 999px;
      padding: 0.7rem 1.4rem;
      border: 1px solid transparent;
      cursor: pointer;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      font-weight: 500;
      transition: transform 0.18s ease, box-shadow 0.18s ease,
        background 0.18s ease, border 0.18s ease;
    }

    .primary-btn {
      background: linear-gradient(
        135deg,
        rgba(123, 173, 165, 1),
        rgba(229, 229, 229, 0.9)
      );
      color: #000;
      box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    }

    .primary-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
    }

    .ghost-btn {
      background: rgba(10, 12, 20, 0.85);
      color: var(--text-soft);
      border-color: rgba(229, 229, 229, 0.24);
    }

    .ghost-btn:hover {
      background: rgba(229, 229, 229, 0.06);
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .hero-meta {
      margin-top: 2.5rem;
      display: flex;
      flex-wrap: wrap;
      gap: 2.5rem;
      font-size: 0.8rem;
      color: var(--text-soft);
    }

    .hero-meta-item label {
      display: block;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      font-size: 0.7rem;
      margin-bottom: 0.4rem;
      color: #7a7f8c;
    }

    .hero-meta-item span {
      color: var(--text-main);
      font-size: 0.9rem;
    }

    .hero-gradient-edge {
      position: absolute;
      inset-inline: 0;
      bottom: 0;
      height: 4rem;
      background: linear-gradient(to bottom, transparent, var(--bg));
      pointer-events: none;
      z-index: 2;
    }

    @media (max-width: 900px) {
      .hero {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 5.5rem;
      }
    }

    /* HERO SECTION */

    .hero-copy {
      position: relative;
      z-index: 5;
    }

    .hero-title {
      font-size: clamp(2.4rem, 3.3vw + 1.2rem, 3.6rem);
      line-height: 1.1;
      letter-spacing: 0.01em;
      margin-bottom: 1.2rem;
    }

    .hero-title span {
      color: var(--accent);
    }

    .hero-subtitle {
      font-size: 1rem;
      color: var(--text-soft);
      max-width: 30rem;
      margin-bottom: 1.8rem;
    }

    .hero-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 1.1rem;
      margin-bottom: 2.2rem;
    }

    /* Section wrapper + parallax */

    section {
      max-width: 1120px;
      margin: 0 auto;
      padding: 2.5rem 1.5rem 4rem;
    }

    .section-label {
      font-size: 0.8rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 0.35rem;
    }

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 1.5rem;
      margin-bottom: 1.6rem;
    }

    .section-title {
      font-size: 1.4rem;
      font-weight: 500;
    }

    .section-subtitle {
      font-size: 0.9rem;
      color: var(--text-soft);
      max-width: 26rem;
    }

    /* Cards / grid */

    .grid {
      display: grid;
      gap: 1.2rem;
    }

    @media (min-width: 800px) {
      .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .card {
      border-radius: 1rem;
      padding: 1.2rem 1.2rem 1.1rem;
      background: radial-gradient(
          circle at top left,
          rgba(123, 173, 165, 0.1),
          transparent 55%
        ),
        rgba(12, 12, 12, 0.95);
      border: 1px solid rgba(229, 229, 229, 0.04);
      box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75);
      position: relative;
      overflow: hidden;
    }

    .card::before {
      content: "";
      position: absolute;
      inset: -40%;
      background: radial-gradient(
        circle at top right,
        rgba(123, 173, 165, 0.12),
        transparent 55%
      );
      opacity: 0;
      transition: opacity 0.25s ease;
      pointer-events: none;
    }

    .card:hover::before {
      opacity: 1;
    }

    .card-title {
      font-size: 0.95rem;
      margin-bottom: 0.5rem;
    }

    .card-body {
      font-size: 0.85rem;
      color: var(--text-soft);
      margin-bottom: 0.8rem;
    }

    .card-meta {
      font-size: 0.75rem;
      color: var(--text-soft);
      opacity: 0.8;
    }

    .tag-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      margin-top: 0.65rem;
      font-size: 0.7rem;
    }

    .tag {
      padding: 0.2rem 0.55rem;
      border-radius: 999px;
      border: 1px solid rgba(229, 229, 229, 0.12);
      color: var(--text-soft);
      background: rgba(0, 0, 0, 0.6);
    }

    /* Process */

    .process-step {
      display: flex;
      gap: 0.8rem;
      align-items: flex-start;
      padding: 0.8rem 0;
      border-bottom: 1px dashed rgba(229, 229, 229, 0.06);
    }

    .process-step:last-child {
      border-bottom: none;
    }

    .step-index {
      width: 1.4rem;
      height: 1.4rem;
      border-radius: 999px;
      border: 1px solid rgba(229, 229, 229, 0.18);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      color: var(--accent);
      flex-shrink: 0;
    }

    .step-body {
      font-size: 0.85rem;
      color: var(--text-soft);
    }

    .step-title {
      color: var(--text-main);
      margin-bottom: 0.2rem;
      font-size: 0.9rem;
    }

    /* CTA */

    .cta {
      text-align: center;
      padding-bottom: 5rem;
    }

    .cta h2 {
      font-size: 1.5rem;
      margin-bottom: 0.75rem;
    }

    .cta p {
      font-size: 0.95rem;
      color: var(--text-soft);
      margin-bottom: 1.6rem;
    }

    .cta-note {
      font-size: 0.75rem;
      color: var(--text-soft);
      opacity: 0.8;
      margin-top: 0.7rem;
    }

    /* Subtle parallax */

    [data-parallax] {
      will-change: transform;
      transition: transform 0.12s ease-out;
    }

        /* Section base */
    .section.projects-section {
      padding: 6rem 1.5rem;
      background: #000000;
      color: #ffffff;
    }

    .section-inner {
      max-width: 1100px;
      margin: 0 auto;
    }

    .section-header h2 {
      font-size: 2rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 0.5rem;
    }

    .section-header .section-subtitle {
      color: #e5e5e5;
      max-width: 640px;
    }

    /* Grid */
    .projects-grid {
      margin-top: 2.5rem;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 1.75rem;
    }

    /* Cards */
    .project-card {
      background: radial-gradient(circle at top left, #111111, #050505);
      border-radius: 1rem;
      padding: 1.5rem 1.4rem;
      border: 1px solid #111111;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      transition:
        transform 180ms ease-out,
        box-shadow 180ms ease-out,
        border-color 180ms ease-out,
        background 220ms ease-out;
    }

    .project-card::before {
      content: "";
      position: absolute;
      inset: 0;
      opacity: 0;
      background: radial-gradient(circle at top right, rgba(123, 173, 165, 0.25), transparent 60%);
      transition: opacity 200ms ease-out;
      pointer-events: none;
    }

    .project-card:hover {
      transform: translateY(-4px);
      border-color: #7bada5;
      box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7);
    }

    .project-card:hover::before {
      opacity: 1;
    }

    .project-card-header h3 {
      font-size: 1.1rem;
      margin-bottom: 0.15rem;
    }

    .project-type {
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: #e5e5e5;
    }

    .project-snippet {
      font-size: 0.9rem;
      color: #e5e5e5;
    }

    .project-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-top: 0.25rem;
    }

    .project-tag {
      border-radius: 999px;
      border: 1px solid rgba(229, 229, 229, 0.1);
      padding: 0.25rem 0.6rem;
      font-size: 0.75rem;
      color: #e5e5e5;
      background: rgba(255, 255, 255, 0.02);
    }

    .project-more-btn {
      align-self: flex-start;
      margin-top: 0.35rem;
      font-size: 0.8rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      border-radius: 999px;
      padding: 0.5rem 0.9rem;
      border: 1px solid #7bada5;
      background: transparent;
      color: #ffffff;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      cursor: pointer;
      transition:
        background 160ms ease-out,
        color 160ms ease-out,
        transform 120ms ease-out;
    }

    .project-more-btn:hover {
      background: #7bada5;
      color: #000000;
      transform: translateY(-1px);
    }

    /* Modal */
    .project-modal {
      position: fixed;
      inset: 0;
      display: none;
      z-index: 60;

      overscroll-behavior: contain;
    }

    .project-modal.is-open {
      display: block;
    }

    .project-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(8px);
    }

    .project-modal-dialog {
      position: relative;
      max-width: 900px;
      margin: 3.5rem auto;
      background: #050505;
      border-radius: 1.5rem;
      border: 1px solid #1a1a1a;
      padding: 2rem 2.1rem;
      box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
    }

    @media (max-width: 720px) {
      .project-modal-dialog {
        margin: 1.5rem;
        padding: 1.5rem;
      }
    }

    .project-modal-close {
      position: absolute;
      top: 1.2rem;
      right: 1.4rem;
      background: transparent;
      border: none;
      color: #e5e5e5;
      font-size: 1.4rem;
      cursor: pointer;
      line-height: 1;
    }

    .project-modal-eyebrow {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: #7bada5;
      margin-bottom: 0.4rem;
    }

    #project-modal-title {
      font-size: 1.5rem;
      margin-bottom: 0.2rem;
    }

    .project-modal-type {
      font-size: 0.85rem;
      color: #e5e5e5;
      margin-bottom: 1.3rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .project-modal-body {
      display: grid;
      grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
      gap: 1.75rem;
    }

    @media (max-width: 720px) {
      .project-modal-body {
        grid-template-columns: 1fr;
      }
    }

    .project-modal-description {
      font-size: 0.95rem;
      color: #e5e5e5;
      margin-bottom: 0.9rem;
    }

    .project-modal-bullets {
      padding-left: 1.1rem;
      margin-bottom: 1rem;
      font-size: 0.9rem;
      color: #e5e5e5;
    }

    .project-modal-bullets li + li {
      margin-top: 0.35rem;
    }

    .project-modal-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      margin-bottom: 1.2rem;
    }

    .project-modal-meta span {
      font-size: 0.8rem;
      border-radius: 999px;
      border: 1px solid rgba(229, 229, 229, 0.16);
      padding: 0.25rem 0.6rem;
      color: #e5e5e5;
    }

    .project-modal-deliverables h4 {
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      margin-bottom: 0.35rem;
    }

    .project-modal-deliverables-list {
      padding-left: 1.1rem;
      font-size: 0.85rem;
      color: #e5e5e5;
    }

    .project-modal-deliverables-list li + li {
      margin-top: 0.25rem;
    }

    /* Make the modal dialog scrollable on small screens */
    .project-modal-dialog{
      max-height: 90vh;          /* or 100dvh if you prefer */
      overflow: auto;
      -webkit-overflow-scrolling: touch; /* important for iOS momentum scroll */
    }

    /* Optional: prevent the backdrop area from scrolling */
    .project-modal{
      overscroll-behavior: contain;
    }

    .project-modal{
      overflow: hidden; /* ok */
    }

    .project-modal-dialog{
      overflow: auto;   /* the scroll happens here */
    }



    /* Media placeholder */
    .project-modal-media .project-media-placeholder {
      border-radius: 1rem;
      border: 1px dashed rgba(229, 229, 229, 0.25);
      min-height: 220px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: #e5e5e5;
      background: radial-gradient(circle at top left, rgba(123, 173, 165, 0.12), #020202);
    }

    .project-media-placeholder{
      display: grid; /* override flex */
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      padding: 12px;
      align-content: start;
    }

    .project-media-placeholder img{
      width: 100%;
      height: auto;
      display: block;
      border-radius: 0.5rem;
      object-fit: cover;
    }

    /* Masonry gallery inside your existing placeholder frame */
    #project-modal-gallery.project-media-placeholder{
      /* override your flex styles */
      display: block;
      padding: 12px;
      column-count: 1;
      column-gap: 12px;
    }

    /* Hero image spans all columns */
    .project-gallery-item.is-hero{
      column-span: all;        /* key line */
      margin-bottom: 16px;
    }

    /* Make hero visually stronger */
    .project-gallery-item.is-hero img{
      border-radius: 16px;
    }

    .project-gallery-item.is-hero img{
      max-height: 60vh;
      object-fit: cover;
    }



    /* Responsive columns */
    @media (min-width: 600px){
      #project-modal-gallery.project-media-placeholder{ column-count: 2; }
    }
    @media (min-width: 1000px){
      #project-modal-gallery.project-media-placeholder{ column-count: 3; }
    }

    /* Each image "tile" */
    .project-gallery-item{
      break-inside: avoid;
      margin: 0 0 12px 0;
      border-radius: 12px;
      overflow: hidden;
      cursor: zoom-in;
    }

    .project-gallery-item img{
      width: 100%;
      height: auto;
      display: block;
      transform: translateZ(0);
      transition: transform 0.2s ease;
    }

    .project-gallery-item:hover img{
      transform: scale(1.02);
    }

    .project-lightbox{
      position: fixed;
      inset: 0;
      display: none;
      z-index: 9999; /* above modal */
    }

    .project-lightbox.is-open{
      display: block;
    }

    .project-lightbox-backdrop{
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.75);
    }

    .project-lightbox-figure{
      position: absolute;
      inset: 24px;
      margin: 0;
      display: grid;
      place-items: center;
    }

    .project-lightbox-img{
      max-width: min(1100px, 96vw);
      max-height: 86vh;
      width: auto;
      height: auto;
      border-radius: 14px;
      display: block;
    }

    .project-lightbox-close{
      position: absolute;
      top: 18px;
      right: 18px;
      width: 44px;
      height: 44px;
      border-radius: 999px;
      border: 0;
      cursor: pointer;
      font-size: 26px;
      line-height: 44px;
    }








    