/* ========================================
   style1.css – FINAL: FOUNDATION WITH TOKENS
   Color system integrated into all UI elements
   ======================================== */

/* -------------------------
   RESET + ROOT
   ------------------------- */
html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: var(--header-height);
}

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

/* -------------------------
   COLOR SYSTEM – TOKENS
   ------------------------- */
:root {
  /* NEUTRAL PALETTE */
  --neutral-900: #191C1E;
  --neutral-800: #1E2224;
  --neutral-700: #272B2E;
  --neutral-600: #2E3236;
  --neutral-550: #31353F;
  --neutral-500: #333843;
  --neutral-400: #3A3E48;
  --neutral-300: #52565E;
  --neutral-200: #9C9C9C;
  --neutral-150: #C7C7C7;
  --neutral-50: #FAFAFA;

  /* GREEN/ACCENT SCALE */
  --green-700: #0B7F2F;
  --green-600: #2AB55E;
  --green-500: #4ECB74;
  --green-400: #6DD388;
  --green-300: #9AE4B0;

  /* SEMANTIC COLOR ROLES */
  --color-surface: var(--neutral-900);
  --color-card: var(--neutral-800);
  --color-nav-active: var(--neutral-700);
  --color-hover: var(--neutral-700);
  --color-ornament: var(--neutral-700);
  --color-ornament-alt: var(--neutral-300);

  --color-text-primary: var(--neutral-50);
  --color-text-secondary: var(--neutral-200);
  --color-text-tertiary: var(--neutral-300);

  --color-accent: var(--green-500);
  --color-accent-active: var(--green-600);
  --color-accent-hover: var(--green-400);
  --color-accent-shadow: var(--green-700);
  --color-accent-border: var(--neutral-900);
  --color-accent-text: var(--neutral-900);

  --color-divider: var(--neutral-600);
  --color-border: var(--neutral-500);
  --color-border-card: var(--neutral-500);
  --color-border-card-light: var(--neutral-300);

  /* UI ELEMENTS */
  --scrollbar-bg: var(--neutral-700);
  --scrollbar-tick-large: var(--neutral-150);
  --scrollbar-tick-small: var(--neutral-300);
  --scrollbar-thumb: var(--color-accent);

  --tooltip-bg: var(--neutral-700);

  /* GRADIENTS */
  --gradient-main: linear-gradient(90deg, #333843 0%, #191C1E 100%);

  /* SHADOWS */
  --shadow-button: 0px 5px 0px 0px var(--color-accent-shadow);
  --shadow-tooltip: 0px 0px 12px 0px rgba(25, 28, 30, 0.7);
  --shadow-scrollbar-thumb: 0px 0px 4px 0px var(--green-700);

  /* MISC */
  --accent-glow: rgba(100, 200, 255, 0.6);
  --header-height: 88px;
  --orbit-top: 18vh;
  --hero-text-top: 62vh;
  --outer-ring-size: 400px;
  --inner-ring-size: 260px;
  --outer-radius: 200px;
  --inner-radius: 130px;
  --orbit-duration: 20s;
  --avatar-width: 118px;
  --avatar-height: 146px;
  --ease-out: cubic-bezier(0.25, 0.8, 0.25, 1);

  /* =====================
     TYPOGRAPHY TOKENS — DESKTOP
     ===================== */

  /* Navigation */
  --fs-nav-item: clamp(18px, 2vw, 20px);
  --fs-nav-button: 20px;

  /* Hero */
  --fs-hero: clamp(20px, 3.2vw, 40px);

  /* Section Heading */
  --fs-section-heading: clamp(14px, 1.5vw, 18px);

  /* Project */
  --fs-project-title: clamp(20px, 2vw, 26px);
  --fs-project-desc: 16px;

  /* Button */
  --fs-button: clamp(14px, 1.2vw, 16px);

  /* Highlight */
  --fs-highlight: clamp(20px, 2.6vw, 32px);

  /* Bento */
  --fs-card-desc: clamp(16px, 2.3vw, 20px);
  --fs-card-title: clamp(14px, 2.3vw, 16px);

  --fs-pill: clamp(14px, 2.3vw, 16px);

  /* Metrics */
  --fs-metric-count: clamp(64px, 9vw, 112px);
  --fs-metric-plus: clamp(48px, 7vw, 96px);


  /* ---------- VARIABLES ---------- */

  --ornament-size: 10px;

  --header-height: 88px;

  /* Viewport range */
  --fluid-min-width: 375;
  --fluid-max-width: 1023;

  /* Fluid factor (0 → 1 between 360px and 1024px) */
  --fluid-factor: calc((100vw - (var(--fluid-min-width) * 1px)) / (var(--fluid-max-width) - var(--fluid-min-width)));

}

@media (max-width: 1023px) {
  :root {
    --ornament-size: 10px;
  }
}

@media (max-width: 767px) {
  :root {
    --ornament-size: 8px;
  }
}

@media (max-width: 720px) {
  :root {
    --outer-ring-size: 340px;
    --inner-ring-size: 210px;
    --outer-radius: 170px;
    --inner-radius: 105px;
    --header-height: 72px;
    --orbit-top: 14vh;
    --hero-text-top: 58vh;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
  }
}

/* -------------------------
   GLOBALS
   ------------------------- */
html,
body {
  display: block;
  /* was flex */
  flex-direction: column;
  /* remove or comment out */
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  height: auto;
  /* let height be content-driven */
  min-height: 0;

}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

.page-wrapper {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;

  padding-inline:
    clamp(16px,
      calc(16px + (40 - 16) * var(--fluid-factor)),
      40px);
}

/* -------------------------
   PRIMARY BUTTON
   ------------------------- */
.button-primary {
  background: var(--color-accent-active);
  color: var(--color-accent-text);
  border: 1.5px solid var(--color-accent-border);
  box-shadow: var(--shadow-button);
  transition: background 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.button-primary:hover,
.button-primary:focus {
  background: var(--color-accent-hover);
  color: var(--color-accent-text);
  border-color: var(--color-accent-border);
  box-shadow: var(--shadow-button);
}

/* =====================================================
   NAVBAR (FIXED HEADER)
===================================================== */

header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);

  display: flex;
  align-items: center;

  background: rgba(25, 28, 30, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid var(--color-divider);

  z-index: 10000;
  isolation: isolate;
}

/* Solid background when menu is open */
header.navbar.menu-open {
  background: var(--color-surface);
}

header.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  padding-left: clamp(24px, 4vw, 48px);
  padding-right: clamp(24px, 4vw, 48px);
}


/* =====================================================
   LOGO
===================================================== */

.logo-img {
  width: 160px;
  height: auto;
}


/* =====================================================
   DESKTOP NAV
===================================================== */

.nav-group {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid #2F3237;
  border-radius: 24px;
  height: 56px;
}

.nav-item {
  padding: 0 14px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 16px;
  font-size: var(--fs-nav-item);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all .2s ease;
}

.nav-item:hover {
  background: var(--color-hover);
}

.nav-item.active {
  background: var(--color-hover);
  color: var(--color-text-primary);
}


/* =====================================================
   NAV ACTIONS
===================================================== */

.nav-actions {
  display: flex;
  gap: 12px;
}

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px 0 16px;
  border-radius: 16px;
  background: rgba(25, 28, 30, .65);
  border: 1px solid #2F3237;
  text-decoration: none;
  color: var(--color-text-secondary);
  transition: all .2s ease;
  font-size: var(--fs-nav-button);
}

.nav-action {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(25, 28, 30, .65);
  border: 1px solid #2F3237;
  color: var(--color-text-secondary);
  transition: all .2s ease;
}

.nav-action:hover,
.btn-resume:hover {
  background: var(--color-hover);
}

.nav-icon {
  width: 20px;
}


/* =====================================================
   MOBILE TOGGLE BUTTON
===================================================== */

.menu-toggle {
  display: none;

  width: clamp(44px,
      calc(44px + (64 - 44) * var(--fluid-factor)),
      64px);

  height: clamp(40px,
      calc(40px + (56 - 40) * var(--fluid-factor)),
      56px);

  border-radius: clamp(12px,
      calc(12px + (16 - 12) * var(--fluid-factor)),
      16px);

  border: 1px solid #2F3237;
  background: var(--color-surface);

  align-items: center;
  justify-content: center;

  cursor: pointer;
  position: relative;
  padding: 0;
}

.menu-toggle img {
  width: 32px;
  height: 32px;
  transition: opacity .25s ease, transform .25s ease;
}

/* stack icons */
.menu-toggle .menu-icon {
  position: absolute;

  width: clamp(24px,
      calc(24px + (32 - 24) * var(--fluid-factor)),
      32px);

  height: clamp(24px,
      calc(24px + (32 - 24) * var(--fluid-factor)),
      32px);

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  transition: opacity .25s ease, transform .25s ease;
}

/* default state */
.menu-toggle .icon-close {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
}

/* active state */
.menu-toggle.active .icon-open {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
}

.menu-toggle.active .icon-close {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}


/* =====================================================
   MOBILE MENU PANEL
===================================================== */

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;

  height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  /* better mobile support */

  background: rgba(25, 28, 30, 1);

  display: flex;
  flex-direction: column;

  transform: translateY(-20%);
  opacity: 0;
  pointer-events: none;

  transition: transform .4s cubic-bezier(.2, .8, .2, 1),
    opacity .3s ease;

  z-index: -1;
  /* stays under header */
}

/* ACTIVE STATE */
header.navbar.menu-open .mobile-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}


/* =====================================================
   MOBILE NAV LINKS (VERTICALLY CENTERED)
===================================================== */

.mobile-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  padding-left: 48px;
  gap: 16px;
}

.mobile-link {
  font-size: 28px;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color .2s ease;
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--color-text-primary);
}


/* =====================================================
   MOBILE FOOTER SECTION
===================================================== */

.mobile-footer {
  padding: 40px 48px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Resume Button */
.mobile-resume {
  display: flex;
  width: fit-content;
  gap: 4px;
  align-items: center;
  justify-content: space-between;

  padding:
    clamp(10px,
      calc(10px + (12 - 10) * var(--fluid-factor)),
      12px) clamp(12px,
      calc(12px + (16 - 12) * var(--fluid-factor)),
      16px);
  border-radius: 16px;
  border: 1px solid #2F3237;
  background: rgba(25, 28, 30, .65);

  text-decoration: none;
  font-size: 20px;
  color: var(--color-text-secondary);
}

/* Social containers */
.mobile-socials {
  display: flex;
  gap: 8px;
}

.mobile-socials a {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid #2F3237;
  background: rgba(25, 28, 30, .65);

  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-socials img {
  width: 22px;
  opacity: .8;
  transition: opacity .2s ease;
}

.mobile-socials a:hover img {
  opacity: 1;
}


/* =====================================================
   RESPONSIVE CONTROL
===================================================== */

.show-mob {
  display: none;
}

.hide-mob {
  display: flex;
}

@media (max-width: 1023px) {

  header.navbar .container {
    padding: clamp(16px,
        calc(16px + (40 - 16) * var(--fluid-factor)),
        40px);
  }

  .logo-img {
    width: clamp(140px,
        calc(140px + (160 - 140) * var(--fluid-factor)),
        160px);
  }

  .mobile-nav {
    padding: clamp(16px,
        calc(16px + (40 - 16) * var(--fluid-factor)),
        40px);
  }

  .nav-group,
  .nav-actions {
    display: none;
  }

  .mobile-resume {
    font-size: clamp(20px,
        calc(20px + (24 - 20) * var(--fluid-factor)),
        24px);
  }

  .show-mob {
    display: flex;
  }

  .hide-mob {
    display: none;
  }

  .mobile-link {
    font-size: clamp(24px,
        calc(24px + (28 - 24) * var(--fluid-factor)),
        28px);
  }

  .mobile-footer {
    padding: clamp(16px,
        calc(16px + (40 - 16) * var(--fluid-factor)),
        40px);
  }

  .mobile-socials a {
    width: clamp(48px,
        calc(48px + (64 - 48) * var(--fluid-factor)),
        64px);

    height: clamp(48px,
        calc(48px + (64 - 48) * var(--fluid-factor)),
        64px);

    border-radius: clamp(12px,
        calc(12px + (16 - 12) * var(--fluid-factor)),
        16px);
  }

  .mobile-socials img {
    width: clamp(30px,
        calc(30px + (40 - 30) * var(--fluid-factor)),
        40px);
  }
}


/* =====================================================
   HERO — MASTER CLAMP SCALE SYSTEM
===================================================== */

.hero {
  --orbit-size: clamp(252px, 50vw, 400px);
  --inner-ring-size: calc(var(--orbit-size) * 0.65);
  --avatar-size: calc(var(--orbit-size) * 0.35);
  --pill-size: calc(var(--orbit-size) * 0.15);

  width: 100vw;
  left: 50%;
  transform: translateX(-50%);

  min-height: 100vh;
  padding-top: calc(var(--header-height) + clamp(40px, 6vh, 100px));

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background:
    var(--color-surface) url('../assets/images/hero-bg-noise.svg') center / 140vmax no-repeat;

  position: relative;
  overflow: visible;
}

@media (min-width: 376px) and (max-width: 1023px) {
  .hero {
    background-size: clamp(140vmax, 60vw + 140vmax, 450vmax);
  }
}

@media (max-width: 375px) {
  .hero {
    background-size: 300vmax;
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center,
      transparent 25%,
      var(--color-surface) 100%);
  z-index: 1;
  pointer-events: none;
}


/* =====================================================
   ORBIT SYSTEM
===================================================== */

.orbit-system {
  position: relative;
  width: var(--orbit-size);
  height: var(--orbit-size);
  z-index: 20;
  overflow: visible;
}

.orbit-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.orbit-outer,
.orbit-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none !important;
  z-index: 2;
}

.orbit-outer {
  width: var(--orbit-size);
  height: var(--orbit-size);
  background: url("../assets/svg/orbit-outer.svg") center/contain no-repeat;
}

.orbit-inner {
  width: var(--inner-ring-size);
  height: var(--inner-ring-size);
  background: url("../assets/svg/orbit-inner.svg") center/contain no-repeat;
}

.orbit-rotator {
  position: absolute;
  inset: -50%;
  z-index: 5;
  pointer-events: none;
}

/* =====================================================
   PILLS — PERFECTLY SCALED
===================================================== */

.pill {
  width: var(--pill-size);
  height: var(--pill-size);

  border-radius: 50%;
  background: url("../assets/svg/orbit-pill.svg") center/contain no-repeat;

  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);
  transform-origin: center;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;

  will-change: transform;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
}

.pill::before {
  content: "";
  position: absolute;
  inset: -8px;
}

/* =========================================
   PURE CSS TOOLTIP
========================================= */

.pill::after {
  content: attr(data-tooltip);

  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  padding: 8px 12px;
  font-size: 16px;
  white-space: nowrap;

  background: var(--tooltip-bg);
  color: var(--color-text-primary);
  border-radius: 12px;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9999;
}

.pill:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Slight lift effect */
.pill:hover {
  box-shadow: 0 0 16px 4px var(--color-accent-shadow);
  z-index: 50;
}


/* Icon inside pill */

.icon-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.icon-wrapper img {
  width: 65%;
  height: auto;
}


/* =====================================================
   TOOLTIP
===================================================== */

.orbit-ccw {
  z-index: 10;
}

.orbit-cw {
  z-index: 20;
}

.orbit-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);

  padding: 8px 12px;
  font-size: 16px;

  background: var(--tooltip-bg);
  color: var(--color-text-primary);
  border-radius: 12px;

  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;

  pointer-events: none;
  z-index: 9999;
}

.orbit-container,
.orbit-rotator,
.pill {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}


/* =====================================================
   AVATAR
===================================================== */

.avatar-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--avatar-size);
  aspect-ratio: 1;
  z-index: 40;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* =====================================================
   HERO TEXT — FLUID
===================================================== */

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 0 16px;
  text-align: center;
  margin-top: clamp(24px, 4vw, 60px);
}

.hero-content h1 {
  font-size: clamp(20px, 4.2vw, 40px);
  line-height: 1.3;
  font-weight: 400;
  max-width: clamp(25ch, 85vw, 30ch);
  margin: 0 auto;
}


/* --------------
   Works Section
   -------------- */

/* ---------- SECTION ---------- */

.works-section {
  background: var(--color-surface);

  padding-block:
    clamp(96px,
      calc(96px + (160 - 96) * var(--fluid-factor)),
      160px) clamp(72px,
      calc(72px + (120 - 72) * var(--fluid-factor)),
      120px);
}

/* ---------- TITLE ---------- */

.works-title-container {
  position: relative;
  display: flex;
  justify-content: center;
  padding-block:
    clamp(16px,
      calc(16px + (24 - 16) * var(--fluid-factor)),
      24px);
}

.works-title-container::before,
.works-title-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
}

.works-title-container::before {
  left: 0;
  background: linear-gradient(to bottom, transparent, var(--color-border));
}

.works-title-container::after {
  right: 0;
  background: linear-gradient(to bottom, transparent, var(--color-border));
}

.works-title {
  font-family: 'Lexend', 'Space Grotesk', system-ui, sans-serif;
  font-size:
    clamp(14px,
      calc(14px + (18 - 14) * var(--fluid-factor)),
      18px);
  font-weight: 200;
  letter-spacing: 1.5px;
  color: var(--color-text-primary);
}

/* ---------- FRAME ---------- */

.work-frame {
  position: relative;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.work-item+.work-item .work-frame {
  border-top: none;
}

/* ---------- ORNAMENTS ---------- */

.ornament {
  position: absolute;
  width: var(--ornament-size);
  height: var(--ornament-size);
  background: var(--color-ornament-alt);
  border: 1px solid var(--color-border);
  z-index: 5;
}

/* Corners */

.ornament.tl {
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
}

.ornament.tr {
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
}

.ornament.bl {
  bottom: 0;
  left: 0;
  transform: translate(-50%, 50%);
}

.ornament.br {
  bottom: 0;
  right: 0;
  transform: translate(50%, 50%);
}

.ornament.top-middle {
  top: 0;
  left: calc(100% * 1.45 / (1.45 + 1));
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* ---------- MEDIA ---------- */

.work-media {
  position: relative;
  padding:
    clamp(12px,
      calc(12px + (24 - 12) * var(--fluid-factor)),
      24px);
  border-right: 1px solid var(--color-border);
  height: clamp(320px, 60vw, 600px);
  box-sizing: border-box;
}

.work-media-inner {
  position: relative;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--neutral-600), var(--neutral-900));
}

.work-media-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-border-card-light);
  border-radius: 8px;
  pointer-events: none;
  z-index: 3;
}

/* ---------- IMAGE BEHAVIOR ---------- */

.media-canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

.media-canvas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* fills height */
  object-position: left center;
  /* anchor left */
  transform: translateX(6%);
  /* subtle right shift */
}

/* ---------- JOINT ORNAMENTS (CLEAN FIX) ---------- */

.work-media::before,
.work-media::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: var(--ornament-size);
  height: var(--ornament-size);
  background: var(--color-ornament-alt);
  border: 1px solid var(--color-border);
  z-index: 6;
}

.work-media::before {
  left: 0;
  transform: translate(-50%, 50%);
}

.work-media::after {
  right: 0;
  transform: translate(50%, 50%);
}

/* ---------- CONTENT ---------- */

.work-content {
  padding:
    /* TOP */
    clamp(24px,
      calc(24px + (40 - 24) * var(--fluid-factor)),
      40px)
    /* RIGHT */
    clamp(16px,
      calc(16px + (40 - 16) * var(--fluid-factor)),
      40px)
    /* BOTTOM */
    clamp(32px,
      calc(32px + (40 - 32) * var(--fluid-factor)),
      40px)
    /* LEFT */
    clamp(16px,
      calc(16px + (40 - 16) * var(--fluid-factor)),
      40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.work-card-title {
  font-size:
    clamp(20px,
      calc(20px + (24 - 20) * var(--fluid-factor)),
      24px);
  font-weight: 500;
  color: var(--color-text-primary);
}

.work-card-desc {
  font-size: var(--fs-project-desc);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.work-card-link {
  align-self: flex-start;
  height: 40px;
  padding: 0 20px;
  display: inline-flex;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-radius: 20px;
  border: 1.5px solid var(--color-accent-border);
  box-shadow: 0 5px 0 var(--color-accent-shadow);
}

/* ---------- END BORDER ---------- */

.works-end-border {
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.works-end-border::before,
.works-end-border::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
}

.works-end-border::before {
  left: 0;
  background: linear-gradient(to top, transparent, var(--color-border));
}

.works-end-border::after {
  right: 0;
  background: linear-gradient(to top, transparent, var(--color-border));
}


/* ---------- RESPONSIVE ---------- */

@media (max-width: 1023px) {

  .work-frame {
    grid-template-columns: 1fr;
  }

  .work-media {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .ornament.top-middle {
    display: none;
  }
}

@media (max-width: 767px) {

  .works-section {
    padding: 96px 0;
  }

  .work-card-link {
    align-self: stretch;
  }

  .ornament.top-middle {
    display: none;
  }

}


/* -----------------
   I Believe Section
   ----------------- */

.ibelieve-section {
  background: var(--color-surface);
  padding-block:
    clamp(96px,
      calc(96px + (168 - 96) * var(--fluid-factor)),
      168px);
}

/* SECTION TITLE */

.ibelieve-section-title {
  text-align: center;
  font-family: 'Lexend', 'Space Grotesk', system-ui, sans-serif;
  font-size:
    clamp(14px,
      calc(14px + (18 - 14) * var(--fluid-factor)),
      18px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-primary);
  margin-bottom:
    clamp(24px,
      calc(24px + (48 - 24) * var(--fluid-factor)),
      48px);
}

/* OUTER WRAPPER (aligned with page container) */

.ibelieve-container-outer {
  position: relative;

  width: 100vw;
  left: 50%;
  transform: translateX(-50%);

  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);

  display: flex;
  justify-content: center;
}

/* INNER CARD */

.ibelieve-container-inner {
  position: relative;
  max-width: 960px;
  margin-inline: auto;

  background: var(--color-card);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);

  padding:
    clamp(24px,
      calc(24px + (64 - 24) * var(--fluid-factor)),
      64px);

  margin-inline:
    clamp(24px,
      calc(24px + (40 - 24) * var(--fluid-factor)),
      40px);

  display: flex;
  justify-content: center;
  align-items: center;
}

/* TEXT */

.ibelieve-text {
  text-align: center;
  font-family: "Space Grotesk", system-ui, sans-serif;

  font-size:
    clamp(20px,
      calc(20px + (32 - 20) * var(--fluid-factor)),
      32px);

  line-height: 1.5;
  color: var(--color-text-primary);

  max-width:
    clamp(480px,
      calc(480px + (800 - 480) * var(--fluid-factor)),
      800px);

  margin-inline: auto;
}


/* -----------------
   CORNER ORNAMENTS
   (Works-style positioning)
   ----------------- */

.ibelieve-ornament {
  position: absolute;

  width:
    clamp(10px,
      calc(10px + (12 - 10) * var(--fluid-factor)),
      12px);

  height:
    clamp(10px,
      calc(10px + (12 - 10) * var(--fluid-factor)),
      12px);

  background: var(--color-ornament);
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
}

/* TOP LEFT */
.ibelieve-ornament.top-left {
  top: 0;
  left: 0;
  transform: translate(clamp(12px,
        calc(12px + (16 - 12) * var(--fluid-factor)),
        16px),
      clamp(12px,
        calc(12px + (16 - 12) * var(--fluid-factor)),
        16px));
}

/* TOP RIGHT */
.ibelieve-ornament.top-right {
  top: 0;
  right: 0;
  transform: translate(clamp(-12px,
        calc(-12px + (-16 + 12) * var(--fluid-factor)),
        -16px),
      clamp(12px,
        calc(12px + (16 - 12) * var(--fluid-factor)),
        16px));
}

/* BOTTOM LEFT */
.ibelieve-ornament.bottom-left {
  bottom: 0;
  left: 0;
  transform: translate(clamp(12px,
        calc(12px + (16 - 12) * var(--fluid-factor)),
        16px),
      clamp(-12px,
        calc(-12px + (-16 + 12) * var(--fluid-factor)),
        -16px));
}

/* BOTTOM RIGHT */
.ibelieve-ornament.bottom-right {
  bottom: 0;
  right: 0;
  transform: translate(clamp(-12px,
        calc(-12px + (-16 + 12) * var(--fluid-factor)),
        -16px),
      clamp(-12px,
        calc(-12px + (-16 + 12) * var(--fluid-factor)),
        -16px));
}


/* --------------
   About Section
   -------------- */

:root {
  --bento-border: 2px;
  --bento-side-w: 24px;
  --bento-tall-h: 480px;
  --bento-short-h: 148px;
  --bento-card-w: 273px;
  --bento-card-h: 480px;
  --bento-map-h: 148px;
  --bento-right-card-w: 258px;
  --bento-right-card-h: 314px;
  --bento-mid-card-w: 546px;
  --bento-mid-card-h: 314px;
}

/* === Container & Structure === */
.about-section {
  padding: 120px 0;
  background: var(--color-surface);
}

.about-section-title {
  text-align: center;
  font-family: 'Lexend', system-ui, sans-serif;
  font-size: var(--fs-section-heading);
  color: var(--color-text-primary);
  margin-bottom: 56px;
  letter-spacing: 2px;
}

.about-bento {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 1200px;
  /* fixed overall width */
  max-width: 100%;
  margin: 0 auto;
  gap: 0;
}

.bento-side {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  width: var(--bento-side-w);
  margin: 0;
}

.bento-rect {
  width: 100%;
  background: none;
  border: none;
  border-radius: 0 !important;
}

/* Borders for left bento-side containers */
.about-bento>.bento-side:first-child .bento-rect.tall {
  border-top: var(--bento-border) solid var(--color-border);
  height: var(--bento-tall-h) !important;
}

.about-bento>.bento-side:first-child .bento-rect.short {
  border-top: var(--bento-border) solid var(--color-border);
  border-bottom: var(--bento-border) solid var(--color-border);
  height: var(--bento-short-h) !important;
}

/* Borders for right bento-side containers */
.about-bento>.bento-side:last-child .bento-rect.tall {
  border-top: var(--bento-border) solid var(--color-border);
  border-bottom: var(--bento-border) solid var(--color-border);
  border-left: none;
  border-right: none;
  height: 314px !important;
  background: none;
}

.about-bento>.bento-side:last-child .bento-rect.short {
  border-bottom: var(--bento-border) solid var(--color-border);
  border-top: none;
  border-left: none;
  border-right: none;
  height: 314px !important;
  background: none;
}

/* === Bento Columns/Rows === */
.bento-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 290px;
  /* column width */
  flex: 0 0 290px;
  border-radius: 0;
}

.bento-vertical.bento-wide {
  border: none;
  padding: 0px;
  width: 862px;
  flex: 0 0 862px;
}

.bento-row {
  display: flex;
  width: 100%;
  border: none;
}

.bento-wrap {
  display: flex;
  width: 100%;
  border: none;
}

.bento-card-outer {
  border-left: var(--bento-border) solid var(--color-border);
  border-right: var(--bento-border) solid var(--color-border);
  flex-direction: column;
  align-items: center;
}

.bento-card-outer.bento-top {
  padding-top: 24px;
}

.bento-card-outer.bento-bottom {
  padding-bottom: 24px;
}

/* === Cards & Borders === */
.bento-card,
.bento-card.gradient {
  background: var(--color-card);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.bento-card.gradient {
  background: linear-gradient(135deg, var(--neutral-500, #333843) 0%, var(--neutral-900, #191C1E) 38%, transparent 100%);
}

/* Avatar Card: top & bottom border */
.bento-card.avatar-card.gradient {
  border-top: 2px solid var(--color-border);
  border-bottom: 2px solid var(--color-border);
  border-left: none;
  border-right: none;
  padding: 24px 16px;
  min-height: var(--bento-card-h);
  height: auto;
  width: 290px;
}

/* Map Card: only bottom border */
.bento-card.map-card.gradient {
  border-bottom: 2px solid var(--color-border);
  border-left: none;
  border-right: none;
  width: 290px;
  height: var(--bento-map-h) !important;
}

/* Exp & Skills: top & bottom border */
.bento-card.exp-card.gradient {
  border-top: 2px solid var(--color-border);
  border-bottom: 2px solid var(--color-border);
  border-left: none;
  border-right: none;
  height: var(--bento-right-card-h);
  padding-top: 24px;
  padding-bottom: 24px;
  width: 276px;
  flex: 0 0 276px;
}

.bento-card.skills-card.gradient {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Horizontal centering */
  justify-content: center;
  /* Vertical centering */
  height: var(--bento-mid-card-h);
  width: var(--bento-mid-card-w);
  padding: 24px, 0px, 24px, 0px;
  background: linear-gradient(135deg, var(--neutral-500, #333843) 0%, var(--neutral-900, #191C1E) 38%, transparent 100%);
  border-top: 2px solid var(--color-border, #333843);
  border-bottom: 2px solid var(--color-border, #333843);
  box-sizing: border-box;
  width: 586px;
  flex: 0 0 314px;
}

/* Tools & Projects: only bottom border */
.bento-card.projects-card.gradient {
  border-top: none;
  border-bottom: 2px solid var(--color-border);
  border-left: none;
  border-right: none;
  height: var(--bento-right-card-h);
  width: 276px;
  flex: 0 0 314px;
  position: relative;
}

.bento-card.tools-card.gradient {
  border-top: none;
  border-bottom: 2px solid var(--color-border);
  border-left: none;
  border-right: none;
  height: var(--bento-right-card-h);
  width: 586px;
  flex: 0 0 314px;
}

/* Card widths */
.avatar-card {
  width: var(--bento-card-w);
}

.map-card {
  width: var(--bento-card-w);
}

.exp-card,
.projects-card {
  width: var(--bento-right-card-w);
}

.skills-card,
.tools-card {
  width: var(--bento-mid-card-w);
}

/* Remove double inside-borders between cards */
.bento-row>.bento-card:not(:last-child),
.bento-row>.bento-card-outer:not(:last-child) {
  border-right-width: 0 !important;
}

.bento-vertical>.bento-card:not(:last-child),
.bento-vertical>.bento-card-outer:not(:last-child) {
  border-bottom-width: 0 !important;
}

/* Sharp corners everywhere */
.bento-card,
.bento-card.gradient,
.bento-rect,
.bento-card-outer,
.bento-vertical,
.bento-row,
.bento-side,
.bento-wide,
.avatar-card,
.skills-card,
.tools-card,
.projects-card,
.exp-card,
.map-card {
  border-radius: 0 !important;
}

/* === Card Content Styling === */
.bento-card.avatar-card .avatar-img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

.bento-card.avatar-card .avatar-text-container {
  margin-top: 24px;
  text-align: center;
}

.bento-card.avatar-card .avatar-desc {
  font-size: var(--fs-card-desc);
  color: var(--color-text-primary);
  line-height: 1.4;
  margin: 0;
  font-weight: 400;
}

/* --- Map Card --- */
.bento-card.map-card.gradient {
  position: relative;
  overflow: hidden;
  /* height, width, borders still controlled by --bento-map-h and bento layout */
}

/* Background map image */
.map-card-bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/kochi-map.png");
  background-size: cover;
  background-position: center;
  /* darken + slightly transparent so gradient shows through */
  opacity: 0.7;
  /* adjust 0.4–0.7 until it feels right */
  filter: brightness(1) contrast(1);
  mix-blend-mode: normal;
  /* lets the gradient color influence the map */
  pointer-events: none;
  z-index: 0;
}

/* Text block (bottom-left) */
.map-card-content {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
}

.map-based-in {
  margin: 0 0 4px 0;
  font-size: var(--fs-card-title);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 400;
  color: var(--color-text-secondary);
}

.map-location {
  margin: 0;
  font-size: var(--fs-card-desc);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 400;
  color: var(--color-text-primary);
}

/* Pin wrapper (right center) */
.map-pin-wrap {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  /* group above map background, below other UI */
}

/* Accent glow with noise and subtle animation */
.map-pin-glow {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(var(--green-400-rgb, 77, 211, 136), 0.85) 0%,
      rgba(var(--green-400-rgb, 77, 211, 136), 0.35) 35%,
      transparent 70%);
  opacity: 1;
  filter: blur(15px);
  z-index: 0;
  overflow: hidden;
}

/* Noise layer to reduce banding */
.map-pin-glow::after {
  content: "";
  position: absolute;
  inset: -40%;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.12) 0,
      rgba(0, 0, 0, 0.12) 0.5px,
      transparent 0.5px,
      transparent 1px),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.10) 0,
      rgba(0, 0, 0, 0.10) 0.5px,
      transparent 0.5px,
      transparent 1px),
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 0.5px,
      transparent 0.5px,
      transparent 1px);
  mix-blend-mode: soft-light;
  opacity: 0.45;
  pointer-events: none;
  animation: glowNoiseDrift 6s linear infinite;
}

@keyframes glowNoiseDrift {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

/* Icon above glow */
.map-pin-icon {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  /* above glow */
}

.map-pin-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}


/* --- Experience Card Layout --- */
.bento-card.exp-card.gradient {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: var(--bento-right-card-h, 314px);
  background: linear-gradient(135deg, var(--neutral-500, #333843) 0%, var(--neutral-900, #191C1E) 38%, transparent 100%);
  border-top: 2px solid var(--color-border, #333843);
  border-bottom: 2px solid var(--color-border, #333843);
}

.exp-illustration-wrap {
  position: relative;
  width: clamp(160px, 14vw, 170px);
  height: clamp(160px, 14vw, 170px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.coin-static {
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.sparkle-svg {
  position: absolute;
  pointer-events: none;
  opacity: 1;
  /* Always visible */
  filter: drop-shadow(0 0 8px #fff7);
  z-index: 4;
  animation: sparkle-shine 1.5s cubic-bezier(.36, 1.18, .7, .73) infinite;
}

.sparkle-large {
  width: 68px;
  height: 68px;
  top: -14px;
  right: 8px;
  animation-delay: 0s;
}

.sparkle-medium {
  width: 54px;
  height: 54px;
  left: -4px;
  bottom: 8px;
  animation-delay: 0.3s;
}

.sparkle-small {
  width: 40px;
  height: 40px;
  top: 82px;
  right: 32px;
  animation-delay: 0.7s;
}

@keyframes sparkle-shine {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  30% {
    opacity: 0.7;
    transform: scale(0.78);
  }

  55% {
    opacity: 1;
    transform: scale(1.18);
  }

  80% {
    opacity: 0.9;
    transform: scale(0.93);
  }
}

/* --- Exp Card Info and Centered Text --- */
.bento-card.exp-card .exp-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  width: 100%;
}

.bento-card.exp-card .exp-title {
  font-size: var(--fs-card-title);
  font-weight: 400;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0;
  letter-spacing: 0.2px;
}

.bento-card.exp-card .exp-desc {
  font-size: var(--fs-card-desc);
  color: var(--color-text-primary);
  text-align: center;
  margin: 4px 0 0 0;
  line-height: 135%;
  max-width: 60%;
}

/* Skills Card Title */
.bento-card.skills-card .skills-title {
  font-size: var(--fs-card-title);
  color: var(--color-text-primary);
  font-weight: 500;
  margin-bottom: 16px;
  text-align: center;
  width: 100%;
}

.skills-pills-container {
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  padding: 0px 12px;
  height: 48px;
  display: flex;
  align-items: center;
  user-select: none;
  outline: none;
}

.skills-pills-scroll {
  display: flex;
  white-space: nowrap;
  /* Width set dynamically by JS for perfect alignment */
}

.pills-row {
  display: flex;
  gap: 8px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: var(--fs-pill);
  font-weight: 500;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  white-space: nowrap;
  cursor: default;
  transition: background-image 0.3s ease, color 0.3s ease;
}

.bento-card.skills-card .skill-pill.style-1 {
  color: #191C1E;
  background-image: linear-gradient(#C4C4C4, #C4C4C4), linear-gradient(135deg, #FFFFFF, #C4C4C4);
}

.bento-card.skills-card .skill-pill.style-2 {
  color: #FFFFFF;
  background-image: linear-gradient(#0174E0, #0174E0), linear-gradient(135deg, #7BBFFE, #0174E0);
}

.bento-card.skills-card .skill-pill.style-3 {
  color: #2D0827;
  background-image: linear-gradient(#C369B9, #C369B9), linear-gradient(135deg, #F7BFF0, #C369B9);
}

.bento-card.skills-card .skill-pill.style-4 {
  color: #3A2C02;
  background-image: linear-gradient(#DBB60F, #DBB60F), linear-gradient(135deg, #FAEFBC, #DBB60F);
}

.bento-card.skills-card .skill-pill.style-5 {
  color: #F5F1FF;
  background-image: linear-gradient(#583B97, #583B97), linear-gradient(135deg, #A995D5, #583B97);
}

.bento-card.skills-card .skill-pill.style-6 {
  color: #E5E7EC;
  background-image: linear-gradient(#474D5C, #474D5C), linear-gradient(135deg, #A6ACBA, #4B4D54);
}

.bento-card.skills-card .skill-pill.highlight {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.skills-pills-container:focus-visible {
  outline: 2px solid var(--color-accent);
}

/* Tools Card */
/* Card container */
.bento-card.tools-card.gradient {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Title */
.tools-title {
  font-size: var(--fs-card-title);
  color: var(--color-text-primary);
  font-weight: 500;
  margin: 0 0 24px 0;
}

/* 7×3 grid, 60px cells, 4px gaps */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(7, 60px);
  grid-auto-rows: 60px;
  gap: 4px;
  justify-content: center;
}

/* SVG containers (empty slots) */
.tool-slot-svg {
  width: 60px;
  height: 60px;
  display: block;
  pointer-events: none;
}

/* Filled slots (with icons) */
.tool-slot {
  width: 60px;
  height: 60px;
  box-sizing: border-box;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Frame: always a little on, brighter in window */
.tool-slot.is-filled {
  border: 1px solid var(--border-subtle, #2A2E32);
  box-shadow: 0 0 2px rgba(148, 153, 158, 0.4);
  /* base soft glow */
  background-color: transparent;
  justify-items: center;
  animation: toolsTileOnFrame 4s ease-out infinite;
  animation-fill-mode: both;
}

/* Inner tile: always visible, just brightens in window */
.tool-tile {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1A1D1F 0%, #23272A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 2px rgba(88, 98, 105, 0.6),
    inset 0 0 10px rgba(65, 72, 78, 0.7);
  /* base inner glow */
  animation: toolsTileOnInner 4s ease-out infinite;
  animation-delay: inherit;
  animation-fill-mode: both;
  /* keep initial and final states */
}

/* Icons: always fully visible */
.tool-tile img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

/* Staggered delays: 9 filled tiles in visual order */
.tools-grid .tool-slot.is-filled:nth-of-type(1) {
  animation-delay: 0s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(2) {
  animation-delay: 0.15s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(3) {
  animation-delay: 0.5s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(4) {
  animation-delay: 0.85s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(5) {
  animation-delay: 1.2s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(6) {
  animation-delay: 1.55s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(7) {
  animation-delay: 1.9s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(8) {
  animation-delay: 2.25s;
}

.tools-grid .tool-slot.is-filled:nth-of-type(9) {
  animation-delay: 2.6s;
}

/* FRAME: base glow → brighter window → back to base */
@keyframes toolsTileOnFrame {
  0% {
    border-color: var(--border-subtle, #2A2E32);
    box-shadow: 0 0 1px rgba(148, 153, 158, 0.2);
    /* dimmer base */
    background-color: transparent;
  }

  35% {
    border-color: var(--border-subtle, #2A2E32);
    box-shadow: 0 0 1px rgba(148, 153, 158, 0.2);
    background-color: transparent;
  }

  60% {
    /* ON window */
    border-color: #909AA2;
    box-shadow: 0 0 6px #94999e;
    background-color: transparent;
  }

  85% {
    border-color: #909AA2;
    box-shadow: 0 0 4px rgba(148, 153, 158, 0.8);
    background-color: transparent;
  }

  100% {
    border-color: var(--border-subtle, #2A2E32);
    box-shadow: 0 0 1px rgba(148, 153, 158, 0.2);
    background-color: transparent;
  }
}

/* INNER: base glow → stronger glow window → base glow */
@keyframes toolsTileOnInner {
  0% {
    filter: brightness(0.85);
    /* darker base */
    box-shadow:
      inset 0 0 1px rgba(88, 98, 105, 0.4),
      inset 0 0 6px rgba(65, 72, 78, 0.4);
  }

  35% {
    filter: brightness(0.88);
    box-shadow:
      inset 0 0 1px rgba(88, 98, 105, 0.4),
      inset 0 0 6px rgba(65, 72, 78, 0.4);
  }

  60% {
    /* ON window */
    filter: brightness(1.12);
    box-shadow:
      inset 0 0 3px #586269,
      inset 0 0 16px #41484E;
  }

  85% {
    filter: brightness(1.05);
  }

  100% {
    filter: brightness(0.85);
    box-shadow:
      inset 0 0 1px rgba(88, 98, 105, 0.4),
      inset 0 0 6px rgba(65, 72, 78, 0.4);
  }
}

/* Projects Card */
.projects-box-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: visible;
}

.bento-card.projects-card.gradient {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: var(--bento-right-card-h, 314px);
  padding-top: 24px;
  padding-bottom: 0;
  box-sizing: border-box;
}

/* Wrapper for count row and label */
.projects-info-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

.projects-count-row {
  display: flex;
  margin-left: 8px;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

/* Project count number */
.projects-count-num {
  font-size: var(--fs-metric-count);
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -6px;
  margin: 0;
  padding: 0;
  text-align: center;
  display: inline-block;
}

/* Plus sign */
.projects-count-plus {
  font-size: var(--fs-metric-plus);
  font-weight: 300;
  color: var(--color-text-primary);
  letter-spacing: -6px;
  margin-left: 0;
  margin-bottom: -12px;
  padding: 0;
  text-align: center;
  display: inline-block;
}

/* Project label */
.projects-text {
  font-size: var(--fs-card-desc);
  color: var(--color-text-primary);
  text-align: center;
  margin: 0;
  line-height: 1.2;
  padding: 0;
}

.projects-card.gradient {
  position: relative;
}

/* Wrapper */
.projects-ray-effect {
  position: absolute;
  left: 50%;
  bottom: 66%;
  /* aligns with lid */
  transform: translateX(-50%);
  width: 150%;
  height: 115%;
  pointer-events: none;
  z-index: 2;
}

/* === BACK CONE (big, soft) ================= */
.projects-ray-effect::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(255, 255, 255, 0.40) 0%,
      rgba(255, 255, 255, 0.18) 22%,
      rgba(255, 255, 255, 0.00) 67%);
  clip-path: polygon(26.25% 88.45%,
      73.75% 88.45%,
      82% 35%,
      18% 35%);
  animation: rayGlow 3.2s ease-in-out infinite;
}

/* === SIDE RAYS (narrower, sharper) ========= */
.projects-ray-effect::after {
  content: "";
  position: absolute;
  inset: 0;
  /* two rays: left and right */
  background:
    linear-gradient(to top,
      rgba(255, 255, 255, 0.80) 0%,
      rgba(255, 255, 255, 0.32) 24%,
      rgba(255, 255, 255, 0.00) 60%) left 0 top 0 / 50% 100% no-repeat,
    linear-gradient(to top,
      rgba(255, 255, 255, 0.80) 0%,
      rgba(255, 255, 255, 0.32) 24%,
      rgba(255, 255, 255, 0.00) 60%) right 0 top 0 / 50% 100% no-repeat;
  clip-path: polygon(29.25% 88.45%,
      70.75% 88.45%,
      78% 40%,
      22% 40%);
  animation: rayGlow 3.2s ease-in-out infinite;
}


/* Light travels upward inside the fixed ray shapes */
@keyframes rayGlow {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  /* rays brightest while sparks are mid‑air */
  100% {
    opacity: 0.7;
  }
}

.projects-spark {
  position: absolute;
  bottom: 110px;
  /* your tuned value */
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 14px rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 11;
  animation: projectsSpark 2.4s ease-out infinite;
  animation-fill-mode: both;
  /* respect 0% opacity before first run */
}

/* individual offsets + delays */
.spark-1 {
  left: 40%;
  transform: translateX(-50%);
  animation-delay: 0s;
}

.spark-2 {
  left: 45%;
  transform: translateX(-50%);
  animation-delay: 0.4s;
}

.spark-3 {
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 0.8s;
}

.spark-4 {
  left: 55%;
  transform: translateX(-50%);
  animation-delay: 1.2s;
  width: 4px;
  height: 4px;
}

.spark-5 {
  left: 60%;
  transform: translateX(-50%);
  animation-delay: 1.6s;
  width: 5px;
  height: 5px;
}

/* Travelling + fading light particle */
@keyframes projectsSpark {
  0% {
    opacity: 0;
    /* invisible at start */
    transform: translateX(-50%) translateY(0) scale(0.4);
  }

  10% {
    opacity: 1;
    /* appears at ray bottom */
  }

  60% {
    transform: translateX(-50%) translateY(-110px) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) translateY(-150px) scale(0.2);
    opacity: 0;
    /* gone at top */
  }
}

/* Projects image at bottom */
.projects-img {
  width: clamp(200px, 18vw, 240px);
  height: auto;
  margin: 0 !important;
  align-self: center;
  display: block;
}

/* Hide all bento layouts by default */
.about-bento--desktop,
.about-bento--tablet,
.about-bento--mobile {
  display: none;
}

.about-bento--desktop,
.about-bento--tablet,
.about-bento--mobile {
  pointer-events: none;
}

/* ==========================================
   DESKTOP — RIGHT SIDE STRIPES
========================================== */

/* Top side container */
.about-bento--desktop .bento-side.top {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  /* top padding */
  border-left: var(--bento-border) solid var(--color-border);
  /* left border */
}

/* Tall stripe inside top */
.about-bento--desktop .bento-side.top .bento-rect.tall {
  flex: 1;
  border-top: var(--bento-border) solid var(--color-border);
  border-bottom: var(--bento-border) solid var(--color-border);
}

/* Bottom side container */
.about-bento--desktop .bento-side.bottom {
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
  /* bottom padding */
  border-left: var(--bento-border) solid var(--color-border);
  /* left border */
}

/* Short stripe inside bottom */
.about-bento--desktop .bento-side.bottom .bento-rect.short {
  flex: 1;
  border-bottom: var(--bento-border) solid var(--color-border);
}

/* ==========================================
   DESKTOP — RIGHT SIDE STRIPES
========================================== */

/* Top side container */
.about-bento--desktop .bento-side.top {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  /* top padding */
  border-left: var(--bento-border) solid var(--color-border);
  /* left border */
}

/* Tall stripe inside top */
.about-bento--desktop .bento-side.top .bento-rect.tall {
  flex: 1;
  border-top: var(--bento-border) solid var(--color-border);
  border-bottom: var(--bento-border) solid var(--color-border);
}

/* Bottom side container */
.about-bento--desktop .bento-side.bottom {
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
  /* bottom padding */
  border-left: var(--bento-border) solid var(--color-border);
  /* left border */
}

/* Short stripe inside bottom */
.about-bento--desktop .bento-side.bottom .bento-rect.short {
  flex: 1;
  border-bottom: var(--bento-border) solid var(--color-border);
}

/* ==========================================
   DESKTOP — FIX RIGHT STRIPE WIDTH (24px)
========================================== */

.about-bento--desktop .bento-side.top,
.about-bento--desktop .bento-side.bottom {
  flex: 0 0 var(--bento-side-w);
  width: var(--bento-side-w);
  min-width: var(--bento-side-w);
  box-sizing: border-box;
}

/* ==========================================
   DESKTOP — STRIPES FILL FULL HEIGHT
========================================== */

.about-bento--desktop .bento-side {
  display: flex;
  flex-direction: column;
}

.about-bento--desktop .bento-side {
  display: flex;
  flex-direction: column;
}

.about-bento--desktop .bento-side .bento-rect {
  flex: 1;
}

.about-bento--desktop .bento-card-outer {
  display: flex;
  align-items: stretch;
}

.about-bento--desktop .bento-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}


/* =====================================================
   DESKTOP BENTO — CLEAN STRUCTURE
   1024px and above
===================================================== */

@media (min-width: 1024px) {

  /* ---------------------------------
     ACTIVATE DESKTOP
  --------------------------------- */
  .about-bento--desktop {
    display: flex;
    pointer-events: auto;
    width: 100%;
  }

  .about-bento {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
  }

  /* ---------------------------------
     COLUMN STRUCTURE
  --------------------------------- */
  .bento-vertical {
    flex: 24 1 0;
    min-width: 0;
  }

  .bento-vertical.bento-wide {
    flex: 72 1 0;
    min-width: 0;
  }

  /* ---------------------------------
     GLOBAL FLEX SAFETY
  --------------------------------- */
  .bento-row,
  .bento-card-outer,
  .bento-card,
  .bento-vertical {
    min-width: 0;
    box-sizing: border-box;
  }

  /* =====================================================
     LEFT COLUMN — FLEX ALIGNMENT (NEW HTML STRUCTURE)
  ===================================================== */

  /* Left column vertical stack */
  .about-bento--desktop>.bento-vertical:first-child {
    display: flex;
    flex-direction: column;
  }

  /* Top & Bottom rows */
  .about-bento--desktop .bento-left.top,
  .about-bento--desktop .bento-left.bottom {
    display: flex;
    align-items: stretch;
    width: 100%;
  }

  /* Stripe wrapper width */
  .about-bento--desktop .bento-rect.left-top,
  .about-bento--desktop .bento-rect.left-bottom {
    flex: 0 0 var(--bento-side-w);
    display: flex;
  }

  /* Stripe inner stretches to match card height */
  .about-bento--desktop .bento-rect.left-top>.bento-rect.tall,
  .about-bento--desktop .bento-rect.left-bottom>.bento-rect.short {
    flex: 1;
    height: auto !important;
  }

  /* Avatar + Map wrapper fill remaining width */
  .about-bento--desktop .bento-avatar.wrapper,
  .about-bento--desktop .bento-map.wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
  }

  /* Cards fill wrapper */
  .about-bento--desktop .bento-avatar.wrapper>.avatar-card,
  .about-bento--desktop .bento-map.wrapper>.map-card {
    flex: 1;
    width: 100% !important;
    max-width: 100%;
  }

  /* Avatar image constraint */
  .about-bento--desktop .avatar-img {
    width: 100%;
    max-width: 240px;
    height: auto;
    margin-inline: auto;
    display: block;
  }

  /* Map clipping safety */
  .about-bento--desktop .map-card {
    overflow: hidden;
  }

  /* =====================================================
     CENTER COLUMN STRUCTURE
  ===================================================== */

  .bento-vertical.bento-wide .bento-row {
    display: flex;
    width: 100%;
  }

  .bento-vertical.bento-wide .bento-row>.bento-card-outer {
    display: flex;
    min-width: 0;
  }

  /* ==========================================
   DESKTOP — TRUE 35 / 65 SYSTEM
  ========================================== */

  /* Make wrappers flex containers */
  .bento-vertical.bento-wide .bento-card-outer {
    display: flex;
    min-width: 0;
    align-items: stretch;
  }

  /* 35% column */
  .bento-vertical.bento-wide .bento-card-outer:has(.exp-card),
  .bento-vertical.bento-wide .bento-card-outer:has(.projects-card) {
    flex: 35 1 0;
  }

  /* 65% column */
  .bento-vertical.bento-wide .bento-card-outer:has(.skills-card),
  .bento-vertical.bento-wide .bento-card-outer:has(.tools-card) {
    flex: 65 1 0;
  }

  /* Cards fill wrapper */
  .bento-vertical.bento-wide .bento-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    flex: 1;
  }

  /* Cards follow wrapper width */
  .bento-vertical.bento-wide .bento-card {
    width: 100%;
    max-width: 100%;
  }

  /* ---------------------------------
     SKILLS OVERFLOW FIX
  --------------------------------- */
  .skills-card {
    overflow: hidden;
  }

  .skills-pills-container,
  .skills-pills-scroll {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  /* ==========================================
   DESKTOP — LEFT COLUMN PADDING ADJUSTMENTS
  ========================================== */

  /* Top row padding */
  .about-bento--desktop .bento-rect.left-top {
    padding-top: 24px;
    border-right: var(--bento-border) solid var(--color-border);
  }

  .about-bento--desktop .bento-avatar.wrapper {
    padding-top: 24px;
  }

  /* Bottom row padding */
  .about-bento--desktop .bento-rect.left-bottom {
    padding-bottom: 24px;
    border-right: var(--bento-border) solid var(--color-border);
  }

  .about-bento--desktop .bento-map.wrapper {
    padding-bottom: 24px;
  }

  .about-bento--desktop .bento-rect.bottom .bento-rect.short {
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
  }

  .about-bento--desktop .bento-rect.left-top>.bento-rect.tall {
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
  }

  .about-bento--desktop .bento-rect.left-bottom>.bento-rect.short {
    border-bottom: 2px solid var(--color-border);
  }

  /* ==========================================
   DESKTOP — FORCE ROWS EQUAL HEIGHT
  ========================================== */

  .about-bento--desktop .bento-vertical.bento-wide {
    display: flex;
    flex-direction: column;
  }

  /* Make entire about-bento stretch evenly */
  .about-bento {
    align-items: stretch;
  }

  /* Make center column stretch */
  .about-bento--desktop .bento-vertical.bento-wide {
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }

  .about-bento--desktop .bento-card.exp-card,
  .about-bento--desktop .bento-card.projects-card,
  .about-bento--desktop .bento-card.skills-card,
  .about-bento--desktop .bento-card.tools-card {
    height: auto !important;
    min-height: 0;
  }

  /* ==========================================
   DESKTOP — TRUE EQUAL ROW HEIGHT
  ========================================== */

  .about-bento--desktop .bento-vertical.bento-wide {
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }

  .about-bento--desktop .bento-card-outer {
    display: flex;
    align-items: stretch;
  }

  .about-bento--desktop .bento-card {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  /* ==========================================
   DESKTOP — DEFINE TOTAL HEIGHT
  ========================================== */

  .about-bento--desktop .bento-vertical.bento-wide {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .about-bento--desktop .bento-card-outer {
    display: flex;
    align-items: stretch;
  }

  .about-bento--desktop .bento-card {
    flex: 1;
  }

  /* ==========================================
   FIX CENTER COLUMN HEIGHT WITHOUT BREAKING WIDTHS
  ========================================== */

  /* Force center column to obey parent */
  .about-bento--desktop .bento-vertical.bento-wide {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* VERY IMPORTANT — stop cards from expanding */
  .about-bento--desktop .bento-card {
    height: auto !important;
    min-height: 0;
  }

  /* Ensure wrappers stretch */
  .about-bento--desktop .bento-card-outer {
    display: flex;
    align-items: stretch;
  }

  /* ==========================================
   FORCE ALL COLUMNS TO SAME HEIGHT
  ========================================== */

  /* ALL vertical columns must inherit full height */
  .about-bento--desktop>.bento-vertical {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* Center column rows split evenly */
  .about-bento--desktop .bento-vertical.bento-wide>.bento-row {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
  }

  /* Prevent cards from forcing expansion */
  .about-bento--desktop .bento-card {
    height: auto !important;
    min-height: 0;
  }


}


/* =====================================================
   TABLET BENTO — FINAL CLEAN SYSTEM
   768px – 1023px
===================================================== */

@media (min-width: 768px) and (max-width: 1023px) {

  /* =============================
     VISIBILITY
  ============================= */
  .about-bento--desktop,
  .about-bento--mobile {
    display: none !important;
  }

  .about-bento--tablet {
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: 0;
  }

  .about-bento--tablet>.bento-side {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .about-bento--tablet>.bento-vertical {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .about-bento--tablet>.bento-side.bento-side {
    padding-top: clamp(12px, 2vw, 24px);
    padding-bottom: clamp(12px, 2vw, 24px);
  }

  /* =============================
     REMOVE DESKTOP HEIGHT/WIDTH
  ============================= */
  .about-bento--tablet .bento-card,
  .about-bento--tablet .bento-card-outer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    box-sizing: border-box;
    height: auto !important;
  }

  .about-bento--tablet .bento-row {
    flex: 0 0 auto;
    height: auto;
    align-items: stretch;
  }

  /* =============================
     LEFT COLUMN
  ============================= */

  .about-bento--tablet .bento-rect.tall {
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
  }

  .about-bento--tablet .bento-avatar.wrapper {
    padding-top: clamp(12px, 2vw, 24px);
    flex: 1 1 auto;
    min-width: 0;
  }

  .about-bento--tablet .avatar-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* vertical center */
    align-items: center;
    /* horizontal center */
    text-align: center;
    padding: 24px 20px;
  }

  .about-bento--tablet .bento-card.avatar-card .avatar-img {
    width: clamp(220px, 26vw, 300px);
    max-width: 100%;
    height: auto;
  }

  .about-bento--tablet .bento-rect.left-top {
    padding-top: clamp(12px, 2vw, 24px);
    border-right: 2px solid var(--color-border);
  }

  .about-bento--tablet>.bento-vertical:not(.bento-wide) .bento-rect.short {
    border-bottom: 2px solid var(--color-border);
  }

  .about-bento--tablet .map-card {
    border-top: none !important;
    border-left: 2px solid var(--color-border);
    flex: 0 0 auto;
  }

  .about-bento--tablet .bento-map.wrapper>.map-card {
    flex: 1;
    height: auto !important;
  }

  /* LEFT COLUMN WIDTH */
  .about-bento--tablet>.bento-vertical:not(.bento-wide) {
    flex: 0 0 36%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-left: none;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* LEFT TOP + BOTTOM ROWS */
  .about-bento--tablet .bento-left.top,
  .about-bento--tablet .bento-left.bottom {
    display: flex;
    align-items: stretch;
  }

  /* STRIPE WIDTH */
  .about-bento--tablet .bento-rect.left-top,
  .about-bento--tablet .bento-rect.left-bottom {
    flex: 0 0 clamp(12px, 2.26vw, 24px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  /* CONTENT FILL */
  .about-bento--tablet .bento-avatar.wrapper {
    flex: 1;
    min-width: 0;
  }

  .about-bento--tablet .bento-left.top {
    flex: 2.5 1 0;
    /* top grows */
  }

  .about-bento--tablet .bento-left.bottom {
    display: flex;
    align-items: stretch;
    width: 100%;
    flex: 1 1 0;
    /* bottom hugs content */
  }

  .about-bento--tablet .bento-rect.left-bottom {
    padding-bottom: clamp(12px, 2vw, 24px);
    border-right: 2px solid var(--color-border);
  }

  /* Map wrapper must fill remaining */
  .about-bento--tablet .bento-map.wrapper {
    padding-bottom: clamp(12px, 2vw, 24px);
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
  }

  /* Map card must fill wrapper */
  .about-bento--tablet .bento-map.wrapper .map-card {
    width: 100%;
  }

  .about-bento--tablet .bento-rect.left-top,
  .about-bento--tablet .bento-rect.left-bottom,
  .about-bento--tablet .bento-avatar.wrapper,
  .about-bento--tablet .bento-map.wrapper {
    display: flex;
    align-items: stretch;
  }

  .about-bento--tablet .bento-avatar.wrapper>.avatar-card,
  .about-bento--tablet .bento-map.wrapper>.map-card {
    flex: 1;
  }

  .about-bento--tablet .bento-rect.left-top>.bento-rect.tall,
  .about-bento--tablet .bento-rect.left-bottom>.bento-rect.short {
    flex: 1;
    width: 100%;
  }

  /* =============================
     CENTER COLUMN
  ============================= */
  .about-bento--tablet>.bento-vertical.bento-wide {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
    border-top: none !important;
    border-left: 2px solid var(--color-border);
    align-items: stretch;
    min-width: 0;
  }

  /* =============================
     ROW 1 — EXP + PROJECTS
  ============================= */

  /* Row 1 (Experience + Projects) */
  .about-bento--tablet .bento-r1>.bento-row {
    border-right: 2px solid var(--color-border);
    padding-top: clamp(12px, 2vw, 24px);
  }

  /* Top border for Exp + Projects */
  .about-bento--tablet .exp-card,
  .about-bento--tablet .projects-card {
    border-top: 2px solid var(--color-border) !important;
  }

  .about-bento--tablet .bento-row:first-child .exp-card {
    border-right: 2px solid var(--color-border) !important;
  }

  .about-bento--tablet .bento-row:first-child .exp-card,
  .about-bento--tablet .bento-row:first-child .projects-card {
    flex: 1 1 0;
  }

  .about-bento--tablet .projects-info-container {
    position: relative;
    top: clamp(-8px, -1.2vw, -18px);
  }

  /* =============================
   ADD: Tall Rect (Top Wrapper)
  ============================= */

  .about-bento--tablet .bento-rect.top {
    padding-top: clamp(12px, 2vw, 24px);
    display: flex;
  }

  .about-bento--tablet .bento-rect.top>.bento-rect.tall {
    flex: 1;
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
  }

  /* Tools wrapper full width */
  .about-bento--tablet .bento-tool.wrapper {
    flex: 1;
  }

  /* Tools card full width */
  .about-bento--tablet .tools-card {
    width: 100%;
  }

  /* =============================
     ROW 2 — SKILLS
  ============================= */

  .about-bento--tablet .skills-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 0 32px 0;
    border-top: none !important;
    border-bottom: none !important;
    border-right: 2px solid var(--color-border);
  }

  .about-bento--tablet .skills-pills-container {
    height: auto;
  }

  .about-bento--tablet .skill-pill {
    font-size: clamp(13px, 1.1vw, 15px);
    padding: clamp(6px, 0.8vw, 8px) clamp(10px, 1.4vw, 14px);
  }

  /* =============================
     ROW 3 — TOOLS
  ============================= */

  /* Right border for tools wrapper */
  .about-bento--tablet .bento-tool.wrapper {
    border-right: 2px solid var(--color-border);
    padding-bottom: clamp(12px, 2vw, 24px);
  }

  .about-bento--tablet .tools-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .about-bento--tablet .bento-card.tools-card.gradient {
    padding: 32px 0;
    border-top: 2px solid var(--color-border);
  }

  /* Tools grid */
  .about-bento--tablet .tools-grid {
    grid-template-columns: repeat(7, clamp(52px, 5.5vw, 64px));
    grid-auto-rows: clamp(52px, 5.5vw, 64px);
    gap: clamp(2px,
        calc(2px + ((100vw - 768px) * 8 / 232)),
        10px);
  }

  .about-bento--tablet .tool-slot,
  .about-bento--tablet .tool-slot-svg {
    width: clamp(48px, 6vw, 60px);
    height: clamp(48px, 6vw, 60px);
  }

  .about-bento--tablet .tool-tile {
    width: clamp(40px, 5vw, 52px);
    height: clamp(40px, 5vw, 52px);
  }

  .about-bento--tablet .tool-tile img {
    width: clamp(26px, 3vw, 38px);
    height: clamp(26px, 3vw, 38px);
  }

  /* =============================
   ADD: Bottom Short Rect Wrapper
  ============================= */

  .about-bento--tablet .bento-rect.bottom {
    padding-bottom: clamp(12px, 2vw, 24px);
    display: flex;
  }

  .about-bento--tablet .bento-rect.bottom>.bento-rect.short {
    border-top: 2px solid var(--color-border);
    border-bottom: 2px solid var(--color-border);
    flex: 1;
  }

  /* =============================
     EXPERIENCE ILLUSTRATION
  ============================= */
  .about-bento--tablet .exp-illustration-wrap {
    width: clamp(140px, 15vw, 180px);
    height: clamp(140px, 15vw, 180px);
  }

  .about-bento--tablet .coin-static {
    width: 100%;
    height: 100%;
  }

  .about-bento--tablet .sparkle-large {
    width: clamp(50px, 6vw, 68px);
    height: clamp(50px, 6vw, 68px);
  }

  .about-bento--tablet .sparkle-medium {
    width: clamp(40px, 5vw, 54px);
    height: clamp(40px, 5vw, 54px);
  }

  .about-bento--tablet .sparkle-small {
    width: clamp(30px, 4vw, 40px);
    height: clamp(30px, 4vw, 40px);
  }

  /* =============================
     PROJECT IMAGE
  ============================= */
  .about-bento--tablet .projects-img {
    width: clamp(80px, 25vw, 260px);
    height: auto;
  }

  /* =============================
     MAP ICON
  ============================= */
  .about-bento--tablet .map-pin-icon img {
    width: clamp(28px, 4vw, 40px);
    height: clamp(28px, 4vw, 40px);
  }

  /* =============================
     FLEX SAFETY
  ============================= */
  .about-bento--tablet .bento-vertical,
  .about-bento--tablet .bento-row,
  .about-bento--tablet .bento-card {
    min-width: 0;
    min-height: 0;
  }

  /* =====================================================
   TABLET — PROJECT RAY ALIGNMENT FIX
  ===================================================== */

  /* Ray wrapper scales proportionally to image */
  .about-bento--tablet .projects-ray-effect {
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 115%;
    bottom: 66%;
    pointer-events: none;
  }

  /* Sparks starting position matches ray base */
  .about-bento--tablet .projects-spark {
    bottom: 45%;
  }

  /* =============================
   FIX: Skills & Tools Hug Height
  ============================= */

  .about-bento--tablet>.bento-vertical.bento-wide {
    justify-content: flex-start;
  }


  /* Let right stripe stretch full height */
  .about-bento--tablet>.bento-side:last-child {
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }


  .about-bento--tablet .skills-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .about-bento--tablet .tools-card {
    justify-content: flex-start;
  }

  /* =============================
   NEW: Row-Level Height Sync
  ============================= */

  /* Row 1 (Experience + Projects + Tall Rect) */
  .about-bento--tablet .bento-r1 {
    display: flex;
    align-items: stretch;
  }

  .about-bento--tablet .bento-r1>.bento-row {
    flex: 1;
  }

  .about-bento--tablet .bento-r1>.bento-rect {
    flex: 0 0 clamp(12px, 2vw, 24px);
    display: flex;
  }

  /* Row 2 (Skills + Short Rect) */
  .about-bento--tablet .bento-r2 {
    display: flex;
    align-items: stretch;
  }

  .about-bento--tablet .bento-r2>.skills-card {
    flex: 1;
  }

  .about-bento--tablet .bento-r2>.bento-rect {
    flex: 0 0 clamp(12px, 2vw, 24px);
    display: flex;
  }

  /* Row 3 (Tools + Short Rect) */
  .about-bento--tablet .bento-wide>div:last-child {
    display: flex;
    align-items: stretch;
  }

  .about-bento--tablet .bento-wide>div:last-child>.tools-card {
    flex: 1;
  }

  .about-bento--tablet .bento-wide>div:last-child>.bento-rect {
    flex: 0 0 clamp(12px, 2vw, 24px);
    display: flex;
  }

  /* Make inner stripe fill wrapper height */
  .about-bento--tablet .bento-rect>.bento-rect {
    flex: 1;
  }

  .projects-spark.spark-1 {
    right: 12%;
    top: -6%;
  }

  .projects-spark.spark-2 {
    right: 4%;
    top: 10%;
  }

  .projects-spark.spark-3 {
    top: -6%;
    right: 10%;
  }

  .projects-spark.spark-4 {
    top: 8%;
    right: 6%;
  }

  .projects-spark.spark-5 {
    top: 8%;
    right: 6%;
  }

}


/* =====================================================
   MOBILE BENTO LAYOUT & BORDERS
   (≤ 767px)
===================================================== */

@media (max-width: 767px) {

  /* ---------------------------------
     TOGGLE LAYOUTS
  --------------------------------- */

  .about-bento--desktop,
  .about-bento--tablet {
    display: none !important;
  }

  .about-bento--mobile {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--color-border, #333843);
    border-right: 2px solid var(--color-border, #333843);
  }

  /* ---------------------------------
     TOP & BOTTOM BORDER STRIPS
  --------------------------------- */
  .about-bento--mobile .bento-border-top,
  .about-bento--mobile .bento-border-bottom {
    width: 100%;
    height: 24px;
  }

  /* ---------------------------------
     CONTENT STACK
  --------------------------------- */
  .about-bento--mobile .bento-vertical {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch !important;
  }

  /* ---------------------------------
     CARDS (BASE)
  --------------------------------- */
  .about-bento--mobile .bento-card {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* ---------------------------------
     AVATAR
  --------------------------------- */

  .about-bento--mobile .bento-card.avatar-card .avatar-img {
    width: clamp(250px, 45vw, 20px);
  }

  /* 2️⃣ Let text container expand */
  .about-bento--mobile .avatar-text-container {
    width: clamp(60%,
        calc(80% - ((100vw - 320px) * 20 / 447)),
        80%);
  }

  /* ---------------------------------
     EXPERIENCE + PROJECTS
  --------------------------------- */

  /* Two-column row */
  .about-bento--mobile .mobile-row-2col {
    display: flex;
  }

  .about-bento--mobile .mobile-row-2col>.bento-card {
    flex: 1;
  }

  /* Remove individual borders */
  .about-bento--mobile .exp-card,
  .about-bento--mobile .projects-card {
    border: none !important;
  }

  .about-bento--mobile .bento-card.exp-card .exp-desc {
    max-width: 85%;
  }

  /* 🔥 CORRECT shared divider */
  .about-bento--mobile .mobile-row-2col {
    border-bottom: 2px solid var(--color-border, #333843);
    align-items: flex-start;
  }

  .about-bento--mobile .exp-card {
    height: auto !important;
    align-self: flex-start;
    /* ensure it hugs */
  }

  .about-bento--mobile .mobile-row-2col>.exp-card {
    border-right: 2px solid var(--color-border, #333843) !important;
  }

  .sparkle-svg {
    position: absolute;
    pointer-events: none;
    z-index: 4;
    animation: sparkle-shine 1.5s cubic-bezier(.36, 1.18, .7, .73) infinite;
  }

  /* Large */
  .sparkle-large {
    width: 34%;
    height: 34%;
    top: -8%;
    right: 6%;
  }

  /* Medium */
  .sparkle-medium {
    width: 27%;
    height: 27%;
    left: -3%;
    bottom: 5%;
  }

  /* Small */
  .sparkle-small {
    width: 20%;
    height: 20%;
    top: 55%;
    right: 22%;
  }

  /* ---------------------------------
   MOBILE — EXP ILLUSTRATION
  --------------------------------- */

  .about-bento--mobile .exp-illustration-wrap {
    width: clamp(120px, 35vw, 180px);
    height: clamp(120px, 35vw, 180px);
  }

  /* ---------------------------------
   MOBILE — PROJECTS ILLUSTRATION
  --------------------------------- */

  /* Two-column row */
  .about-bento--mobile .mobile-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    /* stop stretch */
    border-bottom: 2px solid var(--color-border, #333843);
  }

  .projects-count-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    line-height: 1;
  }

  .projects-count-num {
    letter-spacing: clamp(-0.05em, -0.04em, -0.06em);
  }

  .about-bento--mobile .mobile-row-2col>.bento-card {
    flex: 0 0 auto;
    /* allow hugging */
  }

  .about-bento--mobile .bento-card.exp-card.gradient,
  .about-bento--mobile .bento-card.projects-card.gradient {
    height: auto !important;
  }

  .about-bento--mobile .projects-img {
    width: clamp(140px, 42vw, 220px);
  }

  .about-bento--mobile .projects-ray-effect {
    width: 150%;
    height: 150%;
    left: 50%;
    bottom: 62%;
    transform: translateX(-50%);
  }

  .about-bento--mobile .projects-info-container {
    transform: translateY(-2%);
  }

  .projects-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2px, 2vw, 0px);
  }

  .projects-text {
    max-width: clamp(120px, 40%, 240px);
  }

  .projects-spark.spark-1 {
    right: 12%;
    top: -6%;
  }

  .projects-spark.spark-2 {
    right: 4%;
    top: 10%;
  }

  .projects-spark.spark-3 {
    top: -6%;
    right: 10%;
  }

  .projects-spark.spark-4 {
    top: 8%;
    right: 6%;
  }

  .projects-spark.spark-5 {
    top: 8%;
    right: 6%;
  }

  /* ---------------------------------
     SKILLS
  --------------------------------- */
  .about-bento--mobile .skills-card {
    padding-top: clamp(32px, calc(32px + ((100vw - 320px) * 16 / 447)), 48px);
    padding-bottom: clamp(48px, calc(48px + ((100vw - 320px) * 24 / 447)), 72px);
    border-top: none !important;
    gap: clamp(6px, 2.5vw, 8px);
  }

  .about-bento--mobile .bento-card.skills-card.gradient {
    flex: 0 0 auto !important;
    /* remove 314px basis */
    height: auto !important;
    width: 100% !important;
  }

  .about-bento--mobile .skill-pill {
    white-space: nowrap;
  }

  .skill-pill {
    padding: clamp(6px, 1.5vw, 10px) clamp(10px, 2.5vw, 16px);
    border-radius: 999px;
  }

  .skills-pills-container {
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    padding: 0 12px;
    display: flex;
    align-items: center;
    height: auto;
    /* remove fixed height */
    align-self: flex-start;
    /* prevent stretch */
  }

  .skills-pills-scroll {
    width: fit-content;
  }

  .pills-row {
    gap: clamp(6px, 2vw, 12px);
  }

  /* ---------------------------------
     TOOLS
  --------------------------------- */
  .about-bento--mobile .tools-card {
    padding-block: 16px;
  }

  .about-bento--mobile .bento-card.tools-card.gradient {
    flex: 0 0 auto !important;
    /* remove fixed flex-basis */
    height: auto !important;
    /* remove fixed height */
    width: 100% !important;
    /* keep full width */
  }

  /* ---------------------------------
   MOBILE — TOOLS (CLAMPED)
  --------------------------------- */

  .about-bento--mobile .tools-grid {
    display: grid;
    grid-template-columns: repeat(7, clamp(36px, 10vw, 48px));
    grid-auto-rows: clamp(36px, 10vw, 48px);
    gap: clamp(4px, 2.5vw, 10px);
    justify-content: center
  }

  .about-bento--mobile .tool-slot,
  .about-bento--mobile .tool-slot-svg {
    width: clamp(40px,
        calc(40px + ((100vw - 320px) * 12 / 447)),
        56px);
    height: clamp(40px,
        calc(40px + ((100vw - 320px) * 12 / 447)),
        56px);
  }

  .about-bento--mobile .tool-tile {
    width: clamp(34px,
        calc(34px + ((100vw - 320px) * 10 / 447)),
        48px);
    height: clamp(34px,
        calc(34px + ((100vw - 320px) * 10 / 447)),
        48px);
  }

  .about-bento--mobile .tool-tile img {
    width: clamp(24px,
        calc(24px + ((100vw - 320px) * 8 / 447)),
        28px);
    height: clamp(24px,
        calc(24px + ((100vw - 320px) * 8 / 447)),
        28px);
  }

  /* ---------------------------------
     MAP
  --------------------------------- */
  .about-bento--mobile .map-card {
    min-height: 180px;
    border-top: none !important;
  }

  .about-bento--mobile {
    --fs-card-desc: clamp(14px, 4vw, 20px);
    --fs-card-title: clamp(14px, 3vw, 16px);
    --fs-pill: clamp(14px, 2.5vw, 16px);
    --fs-metric-count: clamp(60px, 11vw, 86px);
    --fs-metric-plus: clamp(48px, 10vw, 76px);
  }
}


/* ========================================
   CONTACT SECTION
======================================== */

.contact-section {
  padding-top: clamp(120px, 12vw, 200px);
  background: var(--color-surface);
}

/* ========================================
   VISUAL WRAPPER (SVG + CONTENT)
======================================== */

.contact-visual {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}

/* ========================================
   BACKGROUND LAYER
======================================== */

.contact-section {
  position: relative;
}

.contact-svg {
  position: relative;
  display: block;
  width: 100%;
}

/* Move grid background up */
.contact-svg-desktop,
.contact-svg-tablet,
.contact-svg-mobile {
  transform: translateY(-80px);
  /* adjust this */
}

/* Hide tablet & mobile by default */
.contact-svg-tablet,
.contact-svg-mobile {
  display: none;
}

/* Tablet */
@media (max-width: 1023px) {
  .contact-svg-desktop {
    display: none;
  }

  .contact-svg-tablet {
    display: block;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .contact-svg-tablet {
    display: none;
  }

  .contact-svg-mobile {
    display: block;
  }
}

/* ========================================
   CONTENT LAYER
======================================== */

.contact-content {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  transform: translateY(clamp(-185px,
        calc(-130px + -0.1403 * (100vw - 375px)),
        -130px));
}

/* ========================================
   HEADER
======================================== */

.contact-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-label {
  font-family: 'Lexend', system-ui, sans-serif;
  font-size:
    clamp(12px,
      calc(12px + (18 - 12) * var(--fluid-factor)),
      18px);
  font-weight: 200;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.contact-title {
  margin-top:
    clamp(12px,
      calc(12px + (26 - 12) * var(--fluid-factor)),
      26px);

  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size:
    clamp(22px,
      calc(22px + (40 - 22) * var(--fluid-factor)),
      40px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-text-primary);
}

@media (max-width: 767px) {
  .contact-header {
    top: clamp(-18px, 2vw, 180px);
    gap: clamp(4px,
        calc(4px + 0.0918 * (100vw - 375px)),
        40px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .contact-header {
    gap: clamp(16px,
        calc(16px + 0.0549 * (100vw - 768px)),
        30px);
  }

  .contact-content {
    transform: translateY(clamp(-210px,
          calc(-170px + -0.1373 * (100vw - 768px)),
          -170px));
  }
}

@media (min-width: 1024px) {
  .contact-header {
    transform: translateY(-26px); /* moves header up */
    gap: 32px;                    /* stable desktop gap */
  }
}

/* ========================================
   ENVELOPE
======================================== */

.contact-envelope-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);

  width:
    clamp(320px,
      calc(320px + (554 - 320) * var(--fluid-factor)),
      554px);
}

.contact-envelope-wrap::before,
.contact-envelope-wrap::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;

  width: 30%;
  height: 65%;

  bottom: 20%;

  background: radial-gradient(ellipse at center,
      rgba(171, 171, 171, 0.45) 0%,
      rgba(171, 171, 171, 0.35) 25%,
      rgba(171, 171, 171, 0.18) 45%,
      rgba(171, 171, 171, 0.08) 60%,
      transparent 100%);

  filter: blur(25px);
  transform-origin: center;
}

.contact-envelope-wrap::before {
  left: -10%;
  transform: rotate(-120deg);
}

.contact-envelope-wrap::after {
  right: -10%;
  transform: rotate(120deg);
}

/* Envelope Base */

.contact-envelope-base {
  width: 100%;
  display: block;
  position: relative;
  z-index: 1;
}

/* Icons (inside envelope, below flap) */

.contact-icons {
  position: absolute;
  left: 50%;
  bottom: 18%;
  /* anchor to pocket depth */
  transform: translateX(-50%);
  width: 82%;
  /* control horizontal spread */
  height: 38%;
  /* pocket height */
  z-index: 2;
}

/* ICON BASE */

.contact-icon {
  position: absolute;
  width: clamp(56px,
      calc(56px + (102 - 56) * var(--fluid-factor)),
      102px);
  cursor: pointer;
}

.contact-icon img {
  width: 100%;
  display: block;

  transform: rotate(var(--rot)) translateY(0) scale(1);
  transform-origin: center bottom;

  transition:
    transform 0.55s cubic-bezier(.16, 1, .3, 1),
    filter 0.4s ease;

  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.65));
  will-change: transform;
}

/* Hover Pop */
.contact-icon:hover img {
  transform:
    translateY(-65%) scale(1.1) rotate(calc(var(--rot) * 0.6));

  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.9));
}


/* Positions */

.icon-linkedin {
  left: 0%;
  bottom: 30%;
  --rot: 22deg;
}

.icon-behance {
  left: 18%;
  bottom: 2%;
  --rot: 18deg;
}

.icon-medium {
  left: 40%;
  bottom: -10%;
  --rot: 0deg;
}

.icon-instagram {
  right: 17%;
  bottom: 2%;
  --rot: -12deg;
}

.icon-gmail {
  right: 0%;
  bottom: 25%;
  --rot: -17deg;
}

/* ========================================
   FLAP (always above icons)
======================================== */

.contact-envelope-flap {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 3;
  pointer-events: none;
}


/* ----------- CUSTOM SCROLLBAR ----------- */
.custom-scrollbar-float {
  right: 36px;
  bottom: 36px;
  width: 38px;
  height: 220px;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.35s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translateY(0);
  position: absolute;
}

.custom-scrollbar-float.active,
.custom-scrollbar-float:hover {
  opacity: 1;
  pointer-events: auto;
}

.scrollbar-track {
  background: var(--scrollbar-bg);
  width: 100%;
  height: 100%;
  border-radius: 15px;
  box-shadow: var(--shadow-tooltip);
  padding: 16px 8px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

.scrollbar-ticks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 22px;
  height: 188px;
  z-index: 1;
  pointer-events: none;
  box-sizing: border-box;
}

.tick-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  pointer-events: auto;
}

.tick.section {
  width: 16px;
  height: 2.2px;
  background: var(--scrollbar-tick-large);
  border-radius: 2px;
  margin: 0 auto;
  z-index: 2;
}

.tick.content {
  width: 14px;
  height: 1.9px;
  background: var(--scrollbar-tick-small);
  border-radius: 2px;
  margin: 0 auto;
}

.scrollbar-thumb {
  position: absolute;
  left: 8px;
  width: 22px;
  height: 3px;
  background: var(--scrollbar-thumb);
  border-radius: 4px;
  z-index: 2;
  box-shadow: var(--shadow-scrollbar-thumb);
  transition: top 0.15s var(--ease-out);
  pointer-events: none;
}

.tick-tooltip {
  position: fixed;
  background: var(--tooltip-bg);
  color: var(--color-text-primary);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 15px;
  opacity: 0.96;
  z-index: 10000;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-tooltip);
  transition: opacity 0.23s;
}

/* Hide native scrollbars everywhere. */
body,
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}