:root {
      --cream: #EFECE4;
      --orange: #EC6B15;
      --dark-brown: #3B2110;
    }

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

    html {
      scroll-behavior: auto;
    }

    body {
      background-color: #EFECE4;
      color: #161616;
      font-family: 'Poppins', 'Plus Jakarta Sans', sans-serif;
      overflow-x: clip;
      -webkit-font-smoothing: antialiased;
    }

    /* Fixed Dynamic Background Layer for Smooth Color Cross-Fading */
    #bg-transition-layer {
      position: fixed;
      inset: 0;
      z-index: -1;
      background-color: #EFECE4;
      pointer-events: none;
    }

    /* Top Scroll Progress Bar */
    #scroll-progress {
      position: fixed;
      top: 0;
      left: 0;
      height: 3px;
      width: 100%;
      background: linear-gradient(90deg, #EC6B15, #C8A97E, #161616);
      z-index: 9999;
      pointer-events: none;
      transform: scaleX(0);
      transform-origin: left center;
      will-change: transform;
    }

    /* Custom Animated Cursor + Invert Scanner Ring */
    #cursor-dot, #cursor-ring, #cursor-scanner-hud {
      position: fixed;
      top: 0;
      left: 0;
      pointer-events: none;
      z-index: 9998;
      /* Centering lives in the independent `translate` property so the ring's
         rotate keyframes and the HUD's scale can never override it again
         (previously `transform: translate(-50%,-50%)` was wiped out by the
         spin animation, leaving the ring offset down-right of the pointer). */
      translate: -50% -50%;
      will-change: transform;
    }
    #cursor-dot, #cursor-ring {
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    body.cursor-ready #cursor-dot, body.cursor-ready #cursor-ring {
      opacity: 1;
    }
    #cursor-dot {
      width: 8px;
      height: 8px;
      background: #EC6B15;
      border-radius: 50%;
      box-shadow: 0 0 10px rgba(236, 107, 21, 0.8);
      transition: opacity 0.3s ease, background-color 0.2s ease;
    }
    #cursor-ring {
      width: 38px;
      height: 38px;
      border: 1.8px dashed rgba(236, 107, 21, 0.75);
      border-radius: 50%;
      /* Rotation is driven by the JS rAF loop together with position —
         a CSS keyframe here would override the whole transform. */
      transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), height 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, background-color 0.25s ease, opacity 0.3s ease;
    }
    #cursor-scanner-hud {
      width: 136px;
      height: 136px;
      border-radius: 50%;
      opacity: 0;
      transform: scale(0.55);
      transition: opacity 0.25s ease;
      border: 2px solid rgba(236, 107, 21, 0.9);
      box-shadow: 0 0 24px rgba(236, 107, 21, 0.45), inset 0 0 18px rgba(255, 255, 255, 0.35);
      backdrop-filter: invert(0.08) contrast(1.08);
    }
    #cursor-scanner-hud::before {
      content: '';
      position: absolute;
      inset: -6px;
      border-radius: 50%;
      border: 1.5px dashed rgba(255, 255, 255, 0.85);
      animation: spinReverse 6s linear infinite;
    }
    body.cursor-active #cursor-ring {
      width: 56px;
      height: 56px;
      border-style: solid;
      border-color: #EC6B15;
      background-color: rgba(236, 107, 21, 0.12);
    }
    body.portrait-hover #cursor-ring {
      width: 136px;
      height: 136px;
      border-color: #FFFFFF;
      border-width: 2px;
      background-color: transparent;
    }
    body.portrait-hover #cursor-scanner-hud {
      opacity: 1;
    }
    @media (max-width: 1024px), (hover: none), (pointer: coarse) {
      #cursor-dot, #cursor-ring, #cursor-scanner-hud { display: none; }
    }

    /* 3-Line Stacked Hero Background Watermark ("Ahmad / Yusuf / Fahrezzi") — Ultra Transparent & Animated */
    .hero-giant-stack {
      font-family: 'Poppins', sans-serif;
      font-weight: 800;
      color: rgba(120, 113, 102, 0.095);
      letter-spacing: -0.045em;
      line-height: 0.86;
      user-select: none;
      pointer-events: none;
      will-change: transform;
    }
    .giant-char {
      display: inline-block;
      animation: giantCharWave 5.2s ease-in-out infinite;
    }
    @keyframes giantCharWave {
      0%, 100% { transform: translateY(0px); opacity: 0.78; }
      50% { transform: translateY(-9px); opacity: 1; }
    }

    /* 2 Dynamic Animated Outer Outline Lines Strictly Behind/Outside User Photo & Cards */
    @keyframes dashStreamForward {
      0% { stroke-dashoffset: 260; }
      100% { stroke-dashoffset: 0; }
    }
    @keyframes outlinePulseWave {
      0%, 100% { transform: scale(1) rotate(0deg); }
      50% { transform: scale(1.015) rotate(0.4deg); }
    }
    .outline-ring-1 {
      filter: drop-shadow(0 8px 20px rgba(0,0,0,0.09));
    }
    .outline-ring-2 {
      stroke-dasharray: 24 12 6 12;
      animation: dashStreamForward 2.4s linear infinite, outlinePulseWave 4s ease-in-out infinite;
      transform-origin: center center;
    }

    /* Animated 2-Line Outline on the 4 Service Cards */
    .card-outline-dash {
      stroke-dasharray: 22 10 6 10;
      animation: dashStreamForward 2.8s linear infinite;
    }

    /* Portrait Cursor Spotlight / Invert Reveal Layer (Radius 68px) */
    #portrait-reveal-layer {
      clip-path: circle(0px at 50% 35%);
      will-change: clip-path;
    }
    #portrait-invert-rim {
      clip-path: circle(0px at 50% 35%);
      filter: invert(1) hue-rotate(180deg) contrast(1.25);
      opacity: 0.85;
      will-change: clip-path;
    }

    /* Continuous Keyframe Animations */
    @keyframes floatObj1 {
      0%, 100% { transform: translateY(0px) rotate(0deg); }
      50% { transform: translateY(-12px) rotate(3.5deg); }
    }
    @keyframes floatObj2 {
      0%, 100% { transform: translateY(0px) rotate(0deg); }
      50% { transform: translateY(11px) rotate(-4deg); }
    }
    @keyframes floatObj3 {
      0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
      50% { transform: translateY(-9px) rotate(-2.5deg) scale(1.03); }
    }
    @keyframes spinSlow {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    @keyframes spinReverse {
      from { transform: rotate(360deg); }
      to { transform: rotate(0deg); }
    }
    @keyframes portraitFloat {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-6px); }
    }

    /* Floating hero assets start hidden behind the portrait; the JS choreography
       loop spreads them outward on load and retracts them on scroll */
    .hero-arch-item {
      opacity: 0;
      will-change: transform, opacity;
    }

    .arch-float-1 { animation: floatObj1 5.0s ease-in-out infinite; }
    .arch-float-2 { animation: floatObj2 5.8s ease-in-out infinite 0.3s; }
    .arch-float-3 { animation: floatObj3 4.6s ease-in-out infinite 0.7s; }
    .arch-float-4 { animation: floatObj2 5.4s ease-in-out infinite 1.1s; }
    .spin-slow { animation: spinSlow 18s linear infinite; transform-origin: center; }
    .spin-rev { animation: spinReverse 22s linear infinite; transform-origin: center; }
    .portrait-levitate { animation: portraitFloat 4.8s ease-in-out infinite; }

    /* Light-Mode Floating Asset Card Shadow */
    .light-asset-shadow {
      filter: drop-shadow(0 16px 28px rgba(24, 20, 14, 0.13));
      transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
    }

    /* Universal Item Scroll Reveal */
    .reveal-item {
      opacity: 0;
      transform: translateY(34px) scale(0.97);
      transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
      will-change: opacity, transform;
    }
    .reveal-item.visible {
      opacity: 1;
      transform: translateY(0px) scale(1);
    }

    /* Word-by-Word Scroll Reveal in Philosophy Section */
    .phil-word {
      display: inline-block;
      color: #161616;
      opacity: 0.2;
      transform: translateY(5px);
      transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
      margin-right: 0.25em;
    }
    .phil-word.lit {
      opacity: 1;
      transform: translateY(0px);
    }
    .phil-word.accent.lit {
      color: #EC6B15;
      font-weight: 700;
    }

    /* 4 Elegant Service Cards ("What I can Help you with?") — Clean Illustrations + 2-Line Animated Box Outlines */
    .help-card-wrap {
      position: relative;
      width: 274px;
      height: 368px;
      padding: 8px;
      will-change: transform;
      cursor: pointer;
      flex-shrink: 0;
    }
    .help-card-wrap:hover {
      z-index: 30 !important;
    }
    .help-card {
      width: 100%;
      height: 100%;
      border-radius: 20px;
      overflow: hidden;
      background: #161514;
      display: flex;
      flex-direction: column;
      position: relative;
      z-index: 10;
      box-shadow: 0 20px 44px rgba(20, 18, 15, 0.16);
      border: 1px solid rgba(214, 199, 178, 0.22);
    }
    .help-card-top {
      flex: 1;
      background: #161514;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      padding: 20px;
    }
    .help-card-bottom {
      height: 82px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 0 16px;
      color: #F5F2EB;
      font-weight: 600;
      font-size: 15px;
      line-height: 1.3;
      letter-spacing: -0.01em;
      border-top: 1px solid rgba(214, 199, 178, 0.16);
    }

    /* Official Software Logo Badge in Visual Archive */
    .software-logo-badge {
      background: #FFFFFF;
      border: 1.5px solid #EAE6DF;
      border-radius: 22px;
      padding: 14px 18px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
      display: inline-flex;
      align-items: center;
      gap: 12px;
      transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
      cursor: pointer;
    }
    .software-logo-badge:hover {
      transform: translateY(-6px) scale(1.04);
      border-color: #EC6B15;
      box-shadow: 0 24px 48px rgba(236, 107, 21, 0.20);
    }

    /* Polaroid Toolkit Cards */
    .polaroid-card {
      background: #FFFFFF;
      border-radius: 14px;
      padding: 14px 14px 36px 14px;
      width: 175px;
      height: 205px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
      display: flex;
      align-items: center;
      justify-content: center;
      will-change: transform;
      cursor: pointer;
      transition: box-shadow 0.3s ease, filter 0.3s ease;
    }
    .polaroid-card:hover {
      box-shadow: 0 25px 60px rgba(236, 107, 21, 0.55);
      z-index: 40 !important;
      filter: brightness(1.05);
    }
    .polaroid-inner {
      width: 100%;
      height: 100%;
      border-radius: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
    }

    /* Visual Archive Poster Cards */
    .archive-poster {
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.14);
      background: #FFFFFF;
      will-change: transform;
      cursor: pointer;
      transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
    }
    .archive-poster:hover {
      transform: translateY(-10px) scale(1.02);
      box-shadow: 0 32px 64px rgba(236, 107, 21, 0.25);
    }

    /* Outward Arrow Hover */
    .arrow-diag {
      display: inline-block;
      transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    }
    button:hover .arrow-diag, a:hover .arrow-diag {
      transform: translate(3px, -3px) scale(1.15);
    }

    /* Reduced motion: calm everything, restore the native cursor */
    @media (prefers-reduced-motion: reduce) {
      .giant-char, .outline-ring-2, .card-outline-dash,
      .arch-float-1, .arch-float-2, .arch-float-3, .arch-float-4,
      .spin-slow, .spin-rev, .portrait-levitate,
      #cursor-ring, #cursor-scanner-hud::before {
        animation: none !important;
      }
      .reveal-item {
        transition: none;
        opacity: 1;
        transform: none;
      }
      .hero-arch-item { opacity: 1; }
      #cursor-dot, #cursor-ring, #cursor-scanner-hud { display: none; }
    }
