:root {
      --bg-dark: #000000;
      --text-light: #f0f0f0;
      --bg-light: #ffffff;
      --text-dark: #111111;
      --font-serif: 'Cormorant Garamond', Georgia, serif;
      --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: var(--font-sans); font-weight: 300; overflow-x: hidden; background-color: var(--bg-dark); color: var(--text-light); }
    img { max-width: 100%; display: block; object-fit: cover; }
    a { text-decoration: none; color: inherit; }
    .serif { font-family: var(--font-serif); font-weight: 300; }
    .italic { font-style: italic; }

    /* Cinematic background */
    .bg-flicker {
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
      background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
      z-index: 0; pointer-events: none;
      animation: cinematicFlicker 8s infinite alternate ease-in-out;
    }
    @keyframes cinematicFlicker {
      0%{opacity:.3} 20%{opacity:.8} 40%{opacity:.4} 60%{opacity:.9} 80%{opacity:.5} 100%{opacity:1}
    }

    /* Side menu trigger */
    .nav-menu-btn {
      position: fixed; top: 40px; left: 40px; font-family: var(--font-sans);
      font-size: .85rem; letter-spacing: 4px; color: #aaa; cursor: pointer;
      z-index: 10000; transition: color .4s, transform .4s; mix-blend-mode: difference;
    }
    .nav-menu-btn:hover { color: #fff; transform: scale(1.1); }

    .menu-backdrop {
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
      background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
      z-index: 9998; opacity: 0; pointer-events: none; transition: opacity .6s;
    }
    .menu-backdrop.active { opacity: 1; pointer-events: auto; }

    .side-menu {
      position: fixed; top: 0; left: -450px; width: 450px; max-width: 100vw; height: 100vh;
      background: rgba(10,10,10,.98); border-right: 1px solid rgba(255,255,255,.05);
      box-shadow: 20px 0 50px rgba(0,0,0,.5); z-index: 9999;
      display: flex; flex-direction: column; justify-content: center;
      padding: 100px 40px; transition: transform .6s cubic-bezier(.25,1,.5,1);
    }
    .side-menu.active { transform: translateX(450px); }

    .menu-nav-list { display: flex; flex-direction: column; gap: 20px; list-style: none; }
    .menu-item { opacity: 0; transform: translateX(-30px); transition: opacity .6s, transform .6s; }
    .side-menu.active .menu-item { opacity: 1; transform: translateX(0); }
    .side-menu.active .menu-item:nth-child(1){transition-delay:.1s}
    .side-menu.active .menu-item:nth-child(2){transition-delay:.2s}
    .side-menu.active .menu-item:nth-child(3){transition-delay:.3s}
    .side-menu.active .menu-item:nth-child(4){transition-delay:.4s}
    .side-menu.active .menu-item:nth-child(5){transition-delay:.5s}

    .menu-link {
      font-family: var(--font-serif); font-size: clamp(2.5rem,4vw,3.5rem);
      color: #fff; display: inline-flex; align-items: center;
      transition: color .3s, padding-left .3s;
    }
    .menu-link:hover { color: #888; padding-left: 15px; font-style: italic; }
    .toggle-icon { font-family: var(--font-sans); font-size: clamp(1.2rem,2vw,1.8rem); font-style: normal; margin-left: 20px; color: #666; transition: transform .3s; }

    .submenu {
      max-height: 0; overflow: hidden; transition: max-height .5s cubic-bezier(.25,1,.5,1);
      display: flex; flex-direction: column; gap: 15px; padding-left: 20px;
    }
    .submenu.open { max-height: 200px; margin-top: 15px; }
    .submenu a { font-family: var(--font-sans); font-size: .9rem; color: #888; text-transform: uppercase; letter-spacing: 3px; transition: color .3s; }
    .submenu a:hover { color: #fff; }


    /* Horizontal scroll-jacking intro */
    .scroll-intro-wrapper { height: 400vh; position: relative; z-index: 2; }
    .scroll-intro { height: 100vh; position: sticky; top: 0; overflow: hidden; }
    #network-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none; }
    .scroll-track { display: flex; width: 400vw; height: 100vh; will-change: transform; }
    .scroll-intro { background: #000; }
    .scroll-slide { width: 100vw; height: 100vh; position: relative; overflow: hidden; flex-shrink: 0; background: #000; }

    .scatter-item { position: absolute; pointer-events: auto; }
    .scatter-img-wrapper { position: absolute; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 10; pointer-events: auto; }
    .scatter-img-wrapper img { width: 100%; height: 100%; filter: grayscale(100%) brightness(0.7); transition: filter 0.8s ease, transform 0.8s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
    .scatter-img-wrapper:hover { z-index: 20; }
    .scatter-img-wrapper:hover img { filter: grayscale(0%) brightness(1); transform: scale(1.05); }
    .bracket-tag { font-size: 0.7rem; letter-spacing: 3px; color: #ccc; font-style: italic; }
    .floating-word { font-size: 0.8rem; letter-spacing: 2px; color: #aaa; text-transform: lowercase; z-index: 1; pointer-events: auto; mix-blend-mode: difference; padding: 4px; }
    .huge-title { font-size: clamp(3.5rem, 8vw, 8rem); line-height: 0.85; text-align: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; z-index: 15; mix-blend-mode: difference; pointer-events: none; padding: 20px; }
    .medium-title { font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1.2; max-width: 600px; z-index: 15; pointer-events: none; mix-blend-mode: difference; padding: 20px; }

    .s1-img1{width:clamp(140px,15vw,200px);top:12%;left:10%} .s1-img2{width:clamp(160px,18vw,240px);bottom:12%;left:20%}
    .s1-img3{width:clamp(120px,12vw,180px);top:15%;right:15%} .s1-img4{width:clamp(180px,20vw,280px);bottom:15%;right:10%}
    .s1-word1{top:25%;left:30%} .s1-word2{bottom:35%;left:12%} .s1-word3{bottom:25%;right:35%} .s1-word4{top:35%;right:12%}
    .s2-text{top:35%;left:10%} .s2-img1{width:clamp(200px,22vw,320px);top:15%;right:15%} .s2-img2{width:clamp(150px,15vw,220px);bottom:15%;right:35%}
    .s2-word1{top:20%;left:40%} .s2-word2{bottom:30%;left:15%}
    .s3-text{top:35%;right:10%;text-align:right} .s3-img1{width:clamp(180px,18vw,260px);top:15%;left:15%} .s3-img2{width:clamp(200px,20vw,300px);bottom:15%;left:30%} .s3-word1{bottom:40%;right:40%}
    .center-text-block{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:90%;max-width:700px;display:flex;flex-direction:column;align-items:center;text-align:center;z-index:10;pointer-events:none}
    .s4-text{font-size:clamp(1.8rem,3vw,3rem);line-height:1.2;margin-bottom:40px;pointer-events:none;mix-blend-mode:difference}
    .s4-img1{width:clamp(140px,15vw,220px);top:10%;left:10%} .s4-img2{width:clamp(140px,15vw,220px);bottom:10%;right:10%}
    .slide4-bg-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.35; z-index:0; }
    .slide4-overlay { position:absolute; inset:0; background:rgba(0,0,0,.55); z-index:1; }
    .slide4-video .scatter-img-wrapper, .slide4-video .center-text-block { z-index: 2; }
    /* Left-edge fade slide 3 → slide 4 video */
    .slide4-video::before {
      content: ''; position: absolute; top: 0; left: 0; width: 25%; height: 100%;
      background: linear-gradient(to right, #000, transparent);
      z-index: 3; pointer-events: none;
    }

    /* Scroll-triggered enter animations */
    .scatter-img-wrapper,.floating-word,.medium-title,.huge-title,.center-text-block{opacity:0;transform:translateY(30px) scale(0.98);transition:opacity 1s cubic-bezier(.25,1,.5,1),transform 1s cubic-bezier(.25,1,.5,1)}
    .scroll-slide.active .scatter-img-wrapper,.scroll-slide.active .floating-word,.scroll-slide.active .medium-title,.scroll-slide.active .center-text-block{opacity:1;transform:translateY(0) scale(1)}
    .scroll-slide.active .huge-title{opacity:1;transform:translate(-50%,-50%) scale(1)}
    .scroll-slide.active .huge-title,.scroll-slide.active .medium-title,.scroll-slide.active .center-text-block{transition-delay:.1s}
    .scroll-slide.active .scatter-img-wrapper:nth-of-type(1){transition-delay:.3s}
    .scroll-slide.active .scatter-img-wrapper:nth-of-type(2){transition-delay:.5s}
    .scroll-slide.active .scatter-img-wrapper:nth-of-type(3){transition-delay:.7s}
    .scroll-slide.active .scatter-img-wrapper:nth-of-type(4){transition-delay:.9s}
    .scroll-slide.active .floating-word{transition-delay:.6s}

    /* Archive / weeks section */
    #archive-wrapper { position: relative; z-index: 5; }
    .blur-transition-zone {
      width: 100vw; height: 20vh; pointer-events: none;
      background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
      backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    }
    #archive-section { width: 100vw; min-height: 100vh; background-color: var(--bg-light); color: var(--text-dark); padding: 50px 60px 120px 60px; }
    .archive-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #e0e0e0; padding-bottom: 20px; margin-bottom: 60px; }
    .archive-header h1 { font-size: 2.8rem; font-weight: 300; letter-spacing: -1px; }
    .archive-meta { font-size: .75rem; text-transform: uppercase; letter-spacing: 2px; color: #999; }

    .sem-section { margin-bottom: 80px; }
    .sem-label { font-size: .7rem; text-transform: uppercase; letter-spacing: 4px; color: #999; margin-bottom: 30px; padding-bottom: 12px; border-bottom: 1px solid #eee; }

    /* Semester 2 cards */
    .sem2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
    .week-card {
      border: 1px solid #e5e5e5; padding: 32px;
      display: flex; flex-direction: column; justify-content: space-between;
      min-height: 220px; cursor: pointer;
      transition: background-color .4s, transform .4s, border-color .4s;
      color: var(--text-dark); position: relative; overflow: hidden;
    }
    .week-card::before {
      content: ''; position: absolute; inset: 0;
      background-image: var(--card-img); background-size: cover; background-position: center;
      opacity: 0; transition: opacity .5s;
    }
    .week-card:hover::before { opacity: .12; }
    .week-card:hover { background-color: #f6f6f6; transform: translateY(-4px); border-color: #ccc; }
    .week-card:hover .card-arrow { color: #111; }
    .card-num { font-family: var(--font-serif); font-size: 3rem; font-weight: 300; line-height: 1; color: #ddd; position: relative; }
    .card-body { position: relative; }
    .card-title { font-size: 1.1rem; font-weight: 400; margin-bottom: 8px; }
    .card-tags { font-size: .7rem; text-transform: uppercase; letter-spacing: 1.5px; color: #aaa; line-height: 1.8; }
    .card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #eee; padding-top: 14px; margin-top: 20px; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: #bbb; position: relative; }
    .card-arrow { transition: color .3s; }

    /* Semester 1 compact */
    .sem1-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; border: 1px solid #eee; }
    .week-card-sm { padding: 20px 18px; border-right: 1px solid #eee; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color .3s; color: var(--text-dark); display: block; }
    .week-card-sm:hover { background-color: #f3f3f3; }
    .card-sm-num { font-family: var(--font-serif); font-size: 2rem; font-weight: 300; color: #ddd; line-height: 1; margin-bottom: 6px; }
    .card-sm-label { font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px; color: #bbb; }

    .archive-footer { margin-top: 80px; padding-top: 30px; border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; font-size: .7rem; text-transform: uppercase; letter-spacing: 2px; color: #bbb; }

    /* ---- Hero Section ---- */
    .hero-section { position: relative; width: 100vw; height: 100vh; overflow: hidden; z-index: 2; background: #000; }
    /* Scattered hero text */
    .hero-text-scatter {
      position: absolute; inset: 0; z-index: 3; pointer-events: none;
      display: flex; flex-direction: column; justify-content: center;
      padding: clamp(40px, 6vw, 80px);
      gap: 0;
      mix-blend-mode: difference;
    }
    .ht { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 300; line-height: 0.88; color: #fff; }
    .ht-xl  { font-size: clamp(4.5rem, 14vw, 14rem); }
    .ht-sm  { font-size: clamp(0.65rem, 1vw, 0.85rem); letter-spacing: 3px; text-transform: uppercase; font-style: normal; font-family: var(--font-sans); }
    .ht-left  { align-self: flex-start; text-align: left; }
    .ht-right { align-self: flex-end;   text-align: right; }
    .ht-mid   { opacity: 0.55; }
    .ht-gap-sm { margin-top: clamp(4px, 1vw, 12px); }
    .ht-gap-lg { margin-top: clamp(16px, 3vw, 40px); }
    /* 3D canvas — behind title text */
    #hero-3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
    /* Bottom fade hero → explanation */
    .hero-section::after {
      content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 30%;
      background: linear-gradient(to bottom, transparent, #000);
      z-index: 25; pointer-events: none;
    }
    /* Scroll arrow — always on top */
    .scroll-arrow { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); animation: arrowBounce 2s infinite ease-in-out; z-index: 20; }
    .scroll-arrow svg { width: 22px; height: 22px; fill: rgba(255,255,255,.45); }
    @keyframes arrowBounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }
    /* Skip to CPJ */
    .skip-to-cpj {
      position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
      z-index: 30; font-family: var(--font-sans); font-size: .65rem;
      letter-spacing: 3px; text-transform: uppercase;
      color: rgba(255,255,255,.45); cursor: pointer;
      background: none; border: none; padding: 0; white-space: nowrap;
      transition: color .3s;
    }
    .skip-to-cpj:hover { color: rgba(255,255,255,.9); }

    /* ---- Archive preview layout ---- */
    .sem-with-preview { display: flex; gap: 60px; align-items: flex-start; }
    .sem-preview-col { width: 36%; position: sticky; top: 80px; }
    .sem-preview-col img { width: 100%; aspect-ratio: 3/4; object-fit: cover; transition: opacity .35s ease; }
    .sem-links-col { flex: 1; }
    .week-link-item { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid #eee; color: var(--text-dark); transition: padding-left .3s; }
    .week-link-item:hover { padding-left: 12px; }
    .week-link-item:hover .wl-arrow { color: #111; }
    .wl-num { font-family: var(--font-serif); font-size: 1.8rem; color: #ddd; min-width: 52px; line-height: 1; }
    .wl-body { flex: 1; }
    .wl-title { display: block; font-size: .95rem; font-weight: 400; }
    .wl-tags { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px; color: #bbb; margin-top: 3px; }
    .wl-date { font-size: .65rem; text-transform: uppercase; letter-spacing: 1px; color: #ccc; white-space: nowrap; }
    .wl-arrow { color: #ddd; transition: color .3s; font-size: .9rem; }

    @media(max-width:768px){
      .nav-menu-btn{top:20px;left:20px}
      .side-menu{width:85vw;padding:80px 30px}
      .side-menu.active{transform:translateX(85vw)}
      .scatter-img-wrapper{transform:scale(.75)!important}
      .floating-word{display:none}
      #archive-section{padding:30px 24px 80px 24px}
      .archive-header{flex-direction:column;gap:10px}
      .sem2-grid{grid-template-columns:1fr}
      .archive-header h1{font-size:2rem}
    }
