    * { -webkit-font-smoothing: antialiased; }
    html { scroll-behavior: smooth; scroll-padding-top: calc(4rem + 4px); } /* h-16 + border-b-4 */
    body { font-family: 'Nunito', sans-serif; background: #f8f8f0; color: #2d2d2d; }
    
    /* Explicit Fredoka weight fix */
    .font-heading { font-weight: 600; }

    .heading-stamp { text-shadow: 3px 3px 0 #FFCB05; }

    /* Hero Background Grid — Restored Breathing Pulse Animation */
    .bg-grid-ink {
      background-image:
        repeating-linear-gradient(0deg, transparent, transparent 20px, #1a1a2e 20px, #1a1a2e 21px),
        repeating-linear-gradient(90deg, transparent, transparent 20px, #1a1a2e 20px, #1a1a2e 21px);
    }

    @keyframes gridPulseLife {
      0%, 100% {
        opacity: 0.04;
        transform: scale(1);
      }
      50% {
        opacity: 0.11;
        transform: scale(1.008);
      }
    }
    .animate-grid-pulse {
      animation: gridPulseLife 4.5s ease-in-out infinite;
      will-change: opacity, transform;
    }

    /* Sections Below Hero — Gold Background Grid with Scanning Light Line Sweep */
    .bg-grid-gold {
      background-image:
        linear-gradient(
          125deg,
          transparent 0%,
          transparent 35%,
          rgba(255, 255, 255, 0.70) 48%,
          rgba(255, 203, 5, 0.60) 52%,
          transparent 65%,
          transparent 100%
        ),
        repeating-linear-gradient(0deg, transparent, transparent 24px, #FFCB05 24px, #FFCB05 25px),
        repeating-linear-gradient(90deg, transparent, transparent 24px, #FFCB05 24px, #FFCB05 25px);
      background-size: 250% 250%, 100% 100%, 100% 100%;
      background-position: -150% -150%, 0 0, 0 0;
    }

    @keyframes gridLightSweep {
      0% {
        background-position: -150% -150%, 0 0, 0 0;
      }
      50% {
        background-position: 150% 150%, 0 0, 0 0;
      }
      100% {
        background-position: 250% 250%, 0 0, 0 0;
      }
    }
    .animate-grid-sweep {
      animation: gridLightSweep 6.5s linear infinite;
      will-change: background-position;
    }

    /* Animated Pokemon sprite styling */
    .pk-sprite {
      display: inline-block;
      vertical-align: middle;
      image-rendering: pixelated;
      image-rendering: -webkit-optimize-contrast;
      height: 22px;
      width: auto;
    }

    /* Sound toggle button styling */
    .sound-toggle-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: 12px;
      background: rgba(26, 26, 46, 0.06);
      border: 2px solid #1a1a2e;
      font-family: 'Press Start 2P', cursive;
      font-size: 9px;
      color: #1a1a2e;
      transition: all 0.2s ease;
    }
    .sound-toggle-btn:hover {
      background: #FFCB05;
      transform: translateY(-1px);
    }
    .sound-toggle-btn.is-active {
      background: #E3350D;
      color: #ffffff;
      border-color: #1a1a2e;
      box-shadow: 2px 2px 0px #1a1a2e;
    }

    /* Tactile physics for Type Pills */
    [class*="type-"] {
      transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, filter 0.15s ease;
    }
    [class*="type-"]:hover {
      transform: translateY(-2px) scale(1.05);
      box-shadow: 2px 2px 0px #1a1a2e;
    }
    .type-fire:hover { filter: drop-shadow(0 0 6px rgba(227, 53, 13, 0.6)); }
    .type-water:hover { filter: drop-shadow(0 0 6px rgba(59, 99, 200, 0.6)); }
    .type-electric:hover { filter: drop-shadow(0 0 6px rgba(255, 203, 5, 0.7)); }
    .type-grass:hover { filter: drop-shadow(0 0 6px rgba(0, 132, 61, 0.6)); }
    .type-psychic:hover { filter: drop-shadow(0 0 6px rgba(104, 48, 216, 0.6)); }
    .type-dragon:hover { filter: drop-shadow(0 0 6px rgba(108, 56, 216, 0.6)); }
    .type-steel:hover { filter: drop-shadow(0 0 6px rgba(112, 136, 144, 0.6)); }

    /* Tactile physics for Hero Dev Card Proof Point Badges */
    .proof-badge {
      transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, border-color 0.15s ease;
    }
    .proof-badge:hover {
      transform: translateY(-2px);
      box-shadow: 3px 3px 0px #FFCB05;
      border-color: #1a1a2e;
    }

    /* Tactile hover effect for About Me Card */
    .about-card {
      transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    }
    .about-card:hover {
      transform: translateY(-4px);
      box-shadow: 8px 8px 0px #1a1a2e;
    }

    /* Tactile hover & image zoom effect for Gallery Photos */
    .gallery-card {
      transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    }
    .gallery-card:hover {
      transform: translateY(-4px);
      box-shadow: 6px 6px 0px #1a1a2e;
      border-color: #E3350D;
    }
    .gallery-card .gallery-img {
      transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .gallery-card:hover .gallery-img {
      transform: scale(1.07);
    }

    /* Tactile hover for Education Card */
    .education-card {
      transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    }
    .education-card:hover {
      transform: translateY(-4px);
      box-shadow: 8px 8px 0px #1a1a2e;
      border-color: #3B4CCA;
    }

    /* Tactile hover for Research Publication Cards */
    .publication-card {
      transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    }
    .publication-card:hover {
      transform: translateY(-4px);
      box-shadow: 6px 6px 0px #1a1a2e;
      border-color: #E3350D;
    }

    /* Tactile hover for Recognitions & Credentials Cards */
    .award-card {
      transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    }
    .award-card:hover {
      transform: translateY(-4px);
      box-shadow: 6px 6px 0px #1a1a2e;
      border-color: #FFCB05;
    }

    /* Section Pokédex Scan Entrance Animations */
    .section-scan-subhead {
      opacity: 0;
      transform: translateY(6px);
      transition: opacity 0.35s ease, transform 0.35s ease;
    }
    .section-scan-heading {
      opacity: 0;
      transform: translateY(14px);
      transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .is-scanned .section-scan-subhead,
    .is-scanned .section-scan-heading {
      opacity: 1;
      transform: translateY(0);
    }

    /* Focus styles - Two-layer ring for visibility */
    button:focus-visible,
    a:focus-visible,
    input:focus-visible,
    textarea:focus-visible {
      outline: 3px solid #1a1a2e;
      outline-offset: 2px;
      box-shadow: 0 0 0 6px #FFCB05;
    }

    /* Spinning logo - hover only */
    @keyframes slowSpin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    .logo-spin { animation: none; }
    .group:hover .logo-spin { animation: slowSpin 3s linear infinite; }

    /* Profile avatar — face-centered crop */
    .profile-pic {
      object-fit: cover;
      object-position: center 30%;
    }

    /* Pokédex-styled tooltip */
    .pk-tip {
      position: relative;
      cursor: help;
    }
    .pk-tip::after {
      content: attr(data-tip);
      position: absolute;
      left: 50%;
      bottom: calc(100% + 8px);
      transform: translateX(-50%) translateY(4px);
      padding: 6px 10px;
      background: #f8f8f0;
      color: #1a1a2e;
      border: 3px solid #1a1a2e;
      border-radius: 8px;
      box-shadow: 3px 3px 0 #FFCB05;
      font-family: "Press Start 2P", cursive;
      font-size: 10px;
      letter-spacing: 0.06em;
      line-height: 1.4;
      white-space: nowrap;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
      z-index: 30;
    }
    .pk-tip:hover::after,
    .pk-tip:focus-within::after {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }
    @media (prefers-reduced-motion: reduce) {
      .pk-tip::after {
        transition: none;
      }
    }

    /* Classic pokeball — matches header logo */
    .pokeball {
      position: relative;
      flex-shrink: 0;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      border: 3px solid #1a1a2e;
      box-sizing: border-box;
      background: linear-gradient(to bottom, #E3350D 0 50%, #f8f8f0 50% 100%);
      cursor: pointer;
      transition: filter 0.3s ease, transform 0.3s ease;
      will-change: transform, filter;
    }
    .pokeball.absolute { position: absolute; }
    .pokeball.fixed { position: fixed; }
    .pokeball::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 6.25%;
      min-height: 2px;
      transform: translateY(-50%);
      background: #1a1a2e;
    }
    .pokeball::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 37.5%;
      height: 37.5%;
      transform: translate(-50%, -50%);
      border-radius: 50%;
      background: #f8f8f0;
      border: 3px solid #1a1a2e;
      box-sizing: border-box;
      z-index: 2;
      transition: background 0.3s ease, box-shadow 0.3s ease;
    }
    .pokeball-sm { width: 24px; height: 24px; border-width: 2px; }
    .pokeball-sm::after { border-width: 2px; }
    .pokeball-md { width: 32px; height: 32px; border-width: 2px; }
    .pokeball-md::after { border-width: 2px; }
    .pokeball-lg { width: 64px; height: 64px; border-width: 3px; }
    .pokeball-lg::after { border-width: 3px; }
    .pokeball-xl { width: 80px; height: 80px; border-width: 3px; }
    .pokeball-xl::after { border-width: 3px; }

    /* Authentic Pokéball 3-Wobble & Catch Flash Physics */
    @keyframes pokeballCapture {
      0% { transform: rotate(0deg) scale(1); }
      15% { transform: rotate(-18deg) scale(1.1); }
      30% { transform: rotate(18deg) scale(1.1); }
      45% { transform: rotate(-10deg) scale(1.05); }
      60% { transform: rotate(10deg) scale(1.05); }
      75% { transform: rotate(-4deg) scale(1.02); }
      90% { transform: rotate(4deg) scale(1.02); }
      100% { transform: rotate(0deg) scale(1); }
    }

    @keyframes pokeballCenterGlow {
      0%, 100% { box-shadow: 0 0 0px transparent; }
      50% { box-shadow: 0 0 10px #FFCB05, inset 0 0 6px #FFCB05; background: #FFCB05; }
    }

    .pokeball:hover {
      animation: pokeballCapture 1.1s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
      filter: drop-shadow(0 0 8px rgba(227, 53, 13, 0.7));
    }
    .pokeball:hover::after {
      animation: pokeballCenterGlow 1.1s ease-in-out infinite;
    }

    .js-section-header .pokeball {
      filter: drop-shadow(0 0 4px rgba(255, 203, 5, 0.5));
    }

    /* Glossy 3D Pokéball (SVG sprite) — replaces the flat CSS-drawn pokeball
       everywhere except the nav active-section indicator, which stays flat. */
    .pokeball-3d {
      background: none;
      border: none;
      vertical-align: middle;
    }
    .pokeball-3d::before,
    .pokeball-3d::after {
      content: none;
    }
    @keyframes pokeballCenterGlow3d {
      0%, 100% { fill: #f2f2e4; filter: drop-shadow(0 0 0 transparent); }
      50% { fill: #FFCB05; filter: drop-shadow(0 0 6px #FFCB05); }
    }
    .pokeball-3d:hover .pb-btn {
      animation: pokeballCenterGlow3d 1.1s ease-in-out infinite;
    }

    /* Type badges */
    .type-fire { background: #A84E0F; color: #fff; }
    .type-water { background: #3B63C8; color: #fff; }
    .type-grass { background: #5CA840; color: #1a1a2e; }
    .type-electric { background: #C8A820; color: #1a1a2e; }
    .type-psychic { background: #C8365A; color: #fff; }
    .type-ice { background: #70B8B8; color: #1a1a2e; }
    .type-dragon { background: #6830D8; color: #fff; }
    .type-fairy { background: #D87888; color: #1a1a2e; }
    .type-steel { background: #9098A8; color: #1a1a2e; }
    .type-flying { background: #9080D8; color: #1a1a2e; }
    .type-ghost { background: #604888; color: #fff; }
    .type-ground { background: #B89850; color: #1a1a2e; }
    .type-fighting { background: #A83828; color: #fff; }

    /* Pokemon Case Study Cards with Micro-Grain Texture, Darkened Edges & Holo Sheen */
    .pokemon-card {
      position: relative;
      background: #ffffff;
      border: 3px solid #1a1a2e;
      border-radius: 16px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: inset 0 0 14px rgba(26, 26, 46, 0.20);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .pokemon-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 20px rgba(26, 26, 46, 0.32), 6px 6px 0px #1a1a2e; }
    .pokemon-card:active { transform: translate(2px, 2px); box-shadow: inset 0 0 20px rgba(26, 26, 46, 0.32), 2px 2px 0px #1a1a2e; }
    .pokemon-card .card-pills { align-content: start; }

    /* Subtle Micro-Grain Paper Texture Layer (::before) — Restricted Strictly to .pokemon-card */
    .pokemon-card::before {
      content: '';
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
      opacity: 0.35;
      mix-blend-mode: multiply;
      z-index: 1;
    }

    /* Soft Pristine Silver Crystal Holo Sheen (::after) — Restricted Strictly to .pokemon-card */
    .pokemon-card::after {
      content: '';
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 35%,
        rgba(224, 242, 254, 0.10) 50%,
        rgba(241, 245, 249, 0.06) 65%,
        rgba(255, 255, 255, 0) 100%
      );
      background-size: 250% 250%;
      background-position: 0% 0%;
      box-shadow: inset 0 0 14px rgba(26, 26, 46, 0.20);
      transition: background-position 0.5s ease, opacity 0.3s ease, box-shadow 0.3s ease;
      opacity: 0.40;
      z-index: 2;
    }

    .pokemon-card:hover::after {
      background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.20) 0%,
        rgba(224, 242, 254, 0.12) 35%,
        rgba(241, 245, 249, 0.05) 65%,
        transparent 85%
      );
      opacity: 0.70;
      box-shadow: inset 0 0 20px rgba(26, 26, 46, 0.32);
    }
    
    .experience-poke { max-height: 100%; }

    /* Project Filter Buttons */
    .project-filter-btn {
      transition: all 0.2s ease;
    }
    .project-filter-btn.active {
      background-color: #E3350D !important;
      color: #ffffff !important;
      border-color: #FFCB05 !important;
      box-shadow: 2px 2px 0px #FFCB05;
    }

    /* Stat bar animation */
    .stat-bar-bg { background: #e0e0d0; border-radius: 4px; height: 8px; overflow: hidden; }
    .stat-bar-fill { height: 100%; border-radius: 4px; width: 0; transition: width 1s ease-out; }

    /* Button */
    .btn-pk {
      transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    }
    .btn-pk:hover { transform: translateY(-2px); }
    .btn-pk:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0px #1a1a2e !important; }

    /* Contact — tilted email arrow */
    .contact-arrow-tilt {
      display: inline-block;
      transform: rotate(12deg);
    }

    /* Contact — social icons */
    .contact-social {
      width: 3rem;
      height: 3rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: #fff;
      color: #1a1a2e;
      border: 3px solid #1a1a2e;
      border-radius: 0.75rem;
      box-shadow: 3px 3px 0 #1a1a2e;
    }
    .contact-social .iconify { color: inherit; }
    .contact-social--github:hover { background: #FFCB05; color: #1a1a2e; }
    .contact-social--linkedin:hover { background: #0A66C2; color: #fff; }

    /* Scanlines for dark section */
    .scanlines::after {
      content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.03;
      background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.3) 2px, rgba(0,0,0,0.3) 4px);
    }

    /* Nav active indicator — sliding mini Pokéball */
    .nav-link { position: relative; }
    .nav-pokeball {
      position: absolute;
      bottom: -10px;
      left: 0;
      width: 12px;
      height: 12px;
      border-width: 1.5px;
      opacity: 0;
      pointer-events: none;
      transition: transform 0.25s ease, opacity 0.15s ease;
      will-change: transform;
    }
    .nav-pokeball.is-visible { opacity: 1; }
    .nav-pokeball::before { height: 1.5px; min-height: 1px; }
    .nav-pokeball::after { width: 40%; height: 40%; border-width: 1.5px; }
    @media (prefers-reduced-motion: reduce) {
      .nav-pokeball { transition: none; }
    }

    /* Mobile menu */
    .mobile-menu {
      display: grid;
      grid-template-rows: 0fr;
      transition: grid-template-rows 0.3s ease-out;
    }
    .mobile-menu.open { grid-template-rows: 1fr; }
    .mobile-menu-inner {
      overflow-y: auto;
      max-height: calc(100dvh - 4rem);
    }

    /* Scrollbar */
    ::-webkit-scrollbar { width: 10px; }
    ::-webkit-scrollbar-track { background: #f8f8f0; }
    ::-webkit-scrollbar-thumb { background: #E3350D; border: 2px solid #1a1a2e; border-radius: 4px; }

    /* Subtle Pokédex Catch Particle Ripple on Click */
    .pb-click-flash {
      position: fixed;
      width: 20px;
      height: 20px;
      pointer-events: none;
      z-index: 9999;
      transform: translate(-50%, -50%) scale(0.2);
      opacity: 0;
      animation: pbClickFlash 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    @keyframes pbClickFlash {
      0% { transform: translate(-50%, -50%) scale(0.2) rotate(0deg); opacity: 0.9; filter: drop-shadow(0 0 4px #FFCB05); }
      50% { transform: translate(-50%, -50%) scale(1.1) rotate(15deg); opacity: 1; filter: drop-shadow(0 0 6px #E3350D); }
      100% { transform: translate(-50%, -50%) scale(1.4) rotate(-10deg); opacity: 0; filter: drop-shadow(0 0 0px transparent); }
    }

    /* GitHub Energy Matrix Grid Styling */
    .gh-matrix-cell {
      width: 12px;
      height: 12px;
      border-radius: 3px;
      border: 1px solid rgba(26, 26, 46, 0.15);
      transition: transform 0.15s ease, box-shadow 0.15s ease, z-index 0.15s ease;
      cursor: pointer;
    }
    .gh-matrix-cell:hover {
      transform: scale(1.45);
      z-index: 20;
      box-shadow: 0 0 8px rgba(255, 203, 5, 0.8), 0 0 0 1px #1a1a2e;
    }
    .gh-matrix-cell[data-level="0"] { background-color: #2a2a3c; }
    .gh-matrix-cell[data-level="1"] { background-color: #FFCB05; }
    .gh-matrix-cell[data-level="2"] { background-color: #FF9F43; }
    .gh-matrix-cell[data-level="3"] { background-color: #E3350D; }
    .gh-matrix-cell[data-level="4"] { background-color: #3B63C8; }

    /* Retro Matrix Floating Tooltip */
    #ghMatrixTooltip {
      position: fixed;
      pointer-events: none;
      z-index: 100;
      background: #1a1a2e;
      color: #ffffff;
      padding: 6px 10px;
      border-radius: 8px;
      border: 2px solid #FFCB05;
      font-family: 'Press Start 2P', monospace;
      font-size: 9px;
      box-shadow: 3px 3px 0px rgba(0,0,0,0.3);
      display: none;
      transform: translate(-50%, -120%);
      white-space: nowrap;
    }

    /* Reduced motion */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
      html { scroll-behavior: auto; }
    }
