:root {

  --bg-gradient-onyx: linear-gradient(to bottom right,
      hsl(240, 1%, 25%) 3%,
      hsl(0, 0%, 19%) 97%);
  --bg-gradient-jet: linear-gradient(to bottom right,
      hsla(240, 1%, 18%, 0.251) 0%,
      hsla(240, 2%, 11%, 0) 100%), hsl(240, 2%, 13%);
  --bg-gradient-yellow-1: linear-gradient(to bottom right,
      hsl(45, 100%, 71%) 0%,
      hsla(36, 100%, 69%, 0) 50%);
  --bg-gradient-yellow-2: linear-gradient(135deg,
      hsla(45, 100%, 71%, 0.251) 0%,
      hsla(35, 100%, 68%, 0) 59.86%), hsl(240, 2%, 13%);
  --border-gradient-onyx: linear-gradient(to bottom right,
      hsl(0, 0%, 25%) 0%,
      hsla(0, 0%, 25%, 0) 50%);
  --text-gradient-yellow: linear-gradient(to right,
      hsl(45, 100%, 72%),
      hsl(35, 100%, 68%));

  --jet: hsl(0, 0%, 22%);
  --onyx: hsl(240, 1%, 17%);
  --eerie-black-1: hsl(240, 2%, 13%);
  --eerie-black-2: hsl(240, 2%, 12%);
  --smoky-black: hsl(0, 0%, 7%);
  --white-1: hsl(0, 0%, 100%);
  --white-2: hsl(0, 0%, 98%);
  --orange-yellow-crayola: hsl(45, 100%, 72%);
  --vegas-gold: hsl(45, 54%, 58%);
  --light-gray: hsl(0, 0%, 84%);
  --light-gray-70: hsla(0, 0%, 84%, 0.7);
  --bittersweet-shimmer: hsl(0, 43%, 51%);

  --ff-poppins: 'Poppins', sans-serif;

  --fs-1: 24px;
  --fs-2: 18px;
  --fs-3: 17px;
  --fs-4: 16px;
  --fs-5: 15px;
  --fs-6: 14px;
  --fs-7: 13px;
  --fs-8: 11px;

  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;

  --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.25);
  --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.25);
  --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.25);
  --shadow-4: 0 25px 50px hsla(0, 0%, 0%, 0.15);
  --shadow-5: 0 24px 80px hsla(0, 0%, 0%, 0.25);

  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease-in-out;

}


#particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

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

/* Mobile touch improvements */
* {
  -webkit-tap-highlight-color: rgba(255, 219, 112, 0.2);
  -webkit-touch-callout: none;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}

img,
ion-icon,
a,
button,
time,
span {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea {
  display: block;
  width: 100%;
  background: none;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth scrolling for mobile */
html {
  scroll-behavior: smooth;
}

/* Prevent pull-to-refresh on mobile Chrome */
body {
  overscroll-behavior-y: contain;
}


::selection {
  background: var(--orange-yellow-crayola);
  color: var(--smoky-black);
}

html {
  font-family: var(--ff-poppins);
}

body {
  background: var(--smoky-black);
}

.sidebar,
article {
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 20px;
  padding: 15px;
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.separator {
  width: 100%;
  height: 1px;
  background: var(--jet);
  margin: 16px 0;
}

.icon-box {
  position: relative;
  background: var(--border-gradient-onyx);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--orange-yellow-crayola);
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.icon-box::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--eerie-black-1);
  border-radius: inherit;
  z-index: -1;
}

.icon-box ion-icon {
  --ionicon-stroke-width: 35px;
}

article {
  display: none;
}

article.active {
  display: block;
  /* Do not animate the initial page from opacity: 0. Fully transparent
     ancestors make visible content ineligible as an LCP candidate. */
  animation: none;
}

@keyframes slideFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.page-leave {
  animation: slideFadeOut 0.18s ease-in forwards;
}

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

  article.active,
  .page-leave {
    animation: none !important;
  }
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.h2,
.h3,
.h4,
.h5 {
  color: var(--white-2);
  text-transform: capitalize;
}

.h2 {
  font-size: var(--fs-1);
}

.h3 {
  font-size: var(--fs-2);
}

.h4 {
  font-size: var(--fs-4);
}

.h5 {
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
}

.article-title {
  position: relative;
  padding-bottom: 7px;
}

.article-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 3px;
}

.content-card {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 15px;
  padding-top: 45px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  cursor: pointer;
  z-index: 1;
}

.content-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}


main {
  margin: 15px 12px;
  margin-bottom: 75px;
  min-width: 259px;
}

.resume {
  text-align: center;
  color: hsl(45, 54%, 58%);
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
}

.resume-preview-open {
  overflow: hidden;
}

.resume-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 22px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.resume-preview-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.resume-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 10, 12, 0.78);
  backdrop-filter: blur(10px);
}

.resume-preview-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, 100%);
  height: min(88vh, 980px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--polish-border-strong, var(--jet));
  border-radius: var(--polish-radius, 14px);
  background: #17191d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(10px) scale(0.985);
  transition: transform 180ms ease;
}

.resume-preview-modal.active .resume-preview-panel {
  transform: translateY(0) scale(1);
}

.resume-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--polish-border, var(--jet));
  background: rgba(255, 255, 255, 0.025);
}

.resume-preview-eyebrow {
  margin-bottom: 4px;
  color: var(--polish-accent, var(--orange-yellow-crayola));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.resume-preview-header h2 {
  color: var(--white-2);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.resume-preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.resume-preview-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--polish-border, var(--jet));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--light-gray);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.resume-preview-action:hover,
.resume-preview-action:focus-visible {
  color: var(--polish-accent, var(--orange-yellow-crayola));
  border-color: var(--polish-border-strong, var(--jet));
  background: rgba(255, 255, 255, 0.075);
  transform: translateY(-1px);
}

.resume-preview-frame-wrap {
  min-height: 0;
  background: #101115;
}

.resume-preview-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #24262b;
}

.sidebar {
  margin-bottom: 15px;
  max-height: none;
  overflow: visible;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  position: relative;
  height: fit-content;
  align-self: flex-start;
  background: linear-gradient(135deg,
      hsl(240, 2%, 13%) 0%,
      hsl(240, 1%, 17%) 25%,
      hsl(240, 2%, 13%) 50%,
      hsl(240, 1%, 17%) 75%,
      hsl(240, 2%, 13%) 100%);
  background-size: 400% 400%;
  animation: sidebarGradient 15s ease infinite;
  box-shadow:
    0 0 20px rgba(255, 219, 112, 0.1),
    inset 0 0 30px rgba(255, 219, 112, 0.02);
}

/* Removed :has() overflow toggle to prevent sidebar width jump */
/* (Tooltips now render via a body-level portal) */

@keyframes sidebarGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Subtle overlay gradient for depth */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(255, 219, 112, 0.03) 0%,
      rgba(255, 184, 77, 0.02) 25%,
      transparent 50%,
      rgba(255, 219, 112, 0.02) 75%,
      rgba(255, 184, 77, 0.03) 100%);
  background-size: 400% 400%;
  animation: sidebarOverlay 20s ease infinite;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes sidebarOverlay {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.sidebar.active {
  opacity: 1;
}

/* Bounce effect on expand/collapse */
.sidebar-bounce {
  animation: sidebarBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

  30% {
    transform: scale(1.05);
  }

  50% {
    transform: scale(0.98);
  }

  70% {
    transform: scale(1.02);
  }

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

/* Ripple effect */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 219, 112, 0.4);
  transform: scale(0);
  animation: rippleAnimation 0.6s ease-out;
  pointer-events: none;
  z-index: 10;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===== SKELETON LOADER STYLES ===== */

/* Sidebar Skeleton */
.sidebar-skeleton {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0;
  position: relative;
  z-index: 100;
}

.skeleton-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.02) 100%);
  position: relative;
  overflow: hidden;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.02) 100%);
  position: relative;
  overflow: hidden;
}

.skeleton-line-title {
  width: 140px;
  height: 16px;
}

.skeleton-line-subtitle {
  width: 100px;
  height: 12px;
}

.skeleton-line-text {
  width: 100%;
  height: 10px;
}

.skeleton-line-full {
  width: 100%;
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.02) 100%);
  position: relative;
  overflow: hidden;
}

/* Skeleton Image */
.skeleton-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.02) 100%);
  position: relative;
  overflow: hidden;
}

/* Shimmer Animation */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 219, 112, 0.15) 50%,
      transparent 100%);
  animation: shimmerMove 2s infinite;
}

@keyframes shimmerMove {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Loaded State - Fade out skeleton elements */
.skeleton-avatar.loaded,
.skeleton-line.loaded,
.skeleton-button.loaded {
  animation: fadeOutSkeleton 0.3s ease-out forwards;
}

@keyframes fadeOutSkeleton {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Progressive Loading States */
.content-loading {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-loaded {
  opacity: 1;
  transform: translateY(0);
}

.content-loading-active {
  position: relative;
  pointer-events: none;
}

/* Dynamic Content Spinner */
.dynamic-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  transition: opacity 0.3s ease-out;
}

.spinner-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange-yellow-crayola);
  animation: spinnerBounce 1.4s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(255, 219, 112, 0.4);
}

.spinner-ring:nth-child(1) {
  animation-delay: -0.32s;
}

.spinner-ring:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes spinnerBounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Spinner Sizes */

/* Loading State Overlay */
.loading-state {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading-dynamic-content {
  position: relative;
  min-height: 100px;
}

/* Skeleton Placeholders */
.skeleton-placeholder {
  padding: 15px;
  border-radius: 12px;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
}

/* Shimmer Overlay for Content Sections */
.shimmer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* Global Loading Indicator */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.global-loader.active {
  opacity: 1;
}

.global-loader-spinner {
  display: flex;
  gap: 8px;
  align-items: center;
}

.global-loader-spinner .spinner-ring {
  width: 16px;
  height: 16px;
  background: var(--orange-yellow-crayola);
  border-radius: 50%;
  animation: spinnerBounce 1.4s infinite ease-in-out;
}

.global-loader-spinner .spinner-ring:nth-child(2) {
  animation-delay: 0.2s;
}

.global-loader-spinner .spinner-ring:nth-child(3) {
  animation-delay: 0.4s;
}

.global-loader-text {
  color: var(--light-gray);
  font-size: var(--fs-4);
  font-weight: var(--fw-500);
  letter-spacing: 0.5px;
}

/* Element-specific loader */
.element-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: inherit;
  z-index: 100;
}

.element-loader-spinner {
  display: flex;
  gap: 6px;
}

.element-loader-spinner .spinner-ring {
  width: 10px;
  height: 10px;
  background: var(--orange-yellow-crayola);
  border-radius: 50%;
  animation: spinnerBounce 1.4s infinite ease-in-out;
}

.element-loader-text {
  color: var(--light-gray);
  font-size: var(--fs-7);
}

/* Image Loading States */
.image-skeleton {
  pointer-events: none;
}

.image-skeleton.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.image-loaded {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.image-error {
  opacity: 0.3;
}

.image-error-placeholder {
  pointer-events: none;
}

.image-error-placeholder svg {
  opacity: 0.5;
}

.image-error-placeholder span {
  margin-top: 8px;
  font-size: var(--fs-8);
}

/* ===== END SKELETON LOADER STYLES ===== */

.sidebar-info {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.avatar-box {
  background: var(--bg-gradient-onyx);
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
  animation: avatarPulse 3s ease-in-out infinite;
  width: 80px;
  height: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle pulse animation */
@keyframes avatarPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 219, 112, 0.4);
  }

  50% {
    box-shadow: 0 0 20px 5px rgba(255, 219, 112, 0.2);
  }
}

/* Hover effect with 3D tilt */
.avatar-box:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 219, 112, 0.3);
  animation: none;
  /* Stop pulse on hover */
}

.avatar-box picture {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-box img {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.avatar-box:hover img {
  transform: scale(1.05);
}

/* Status Badge */

/* Pulsing green dot */

@keyframes statusPulse {

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

  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.info-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.info-content .name {
  color: var(--white-2);
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
  letter-spacing: -0.25px;
  margin-bottom: 10px;
}

.info-content .title {
  color: var(--white-1);
  background: var(--onyx);
  font-size: var(--fs-8);
  font-weight: var(--fw-300);
  width: max-content;
  padding: 3px 12px;
  border-radius: 8px;
  margin: 0 auto;
}

.info_more-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  border-radius: 0 15px;
  font-size: 13px;
  color: var(--orange-yellow-crayola);
  background: var(--border-gradient-onyx);
  padding: 10px;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
  z-index: 1;
}

.info_more-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-gradient-jet);
  transition: var(--transition-1);
  z-index: -1;
}

.info_more-btn:hover,
.info_more-btn:focus {
  background: var(--bg-gradient-yellow-1);
}

.info_more-btn:hover::before,
.info_more-btn:focus::before {
  background: var(--bg-gradient-yellow-2);
}

.info_more-btn span {
  display: none;
}

.sidebar-info_more {
  opacity: 1;
  visibility: visible;
  transition: var(--transition-2);
}

.sidebar.active .sidebar-info_more {
  opacity: 1;
  visibility: visible;
}

.contacts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  justify-items: stretch;
  overflow: hidden;
  max-width: 100%;
}

.contact-item {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  overflow: hidden;
}

.contact-info {
  max-width: 100%;
  width: 100%;
  min-width: 0;
}

.contact-title {
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact-info :is(.contact-link, time, address) {
  color: var(--white-2);
  font-size: var(--fs-7);
}

.contact-info .contact-link:not(.resume) {
  white-space: nowrap;
  overflow: visible;
  font-size: clamp(11px, 3.8vw, 14px);
  line-height: 1.2;
  display: block;
}

.contact-info address {
  font-style: normal;
}

.sidebar .contacts-list>.contact-item:first-child {
  justify-content: center;
}

.sidebar .contacts-list>.contact-item:first-child .contact-info {
  display: flex;
  justify-content: center;
}

.social-list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 6px 4px;
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.social-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.social-item .social-link {
  color: var(--light-gray-70);
  font-size: 18px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 8px;
  background: rgba(255, 219, 112, 0.05);
}

.social-item .social-link:hover {
  color: var(--orange-yellow-crayola);
  transform: translateY(-3px) scale(1.1);
  background: rgba(255, 219, 112, 0.15);
  box-shadow: 0 5px 15px rgba(255, 219, 112, 0.3);
  animation: socialBounce 0.5s ease;
}

@keyframes socialBounce {

  0%,
  100% {
    transform: translateY(-3px) scale(1.1);
  }

  50% {
    transform: translateY(-5px) scale(1.15);
  }
}

/* Tooltip Styles */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  transform: translateY(-5px);
  background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 219, 112, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 12px;
  transform: none;
  border: 6px solid transparent;
  border-top-color: #2c2c2c;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10000;
}

[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateY(0);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: none;
}

/* Disable pseudo-element tooltips when portal is active */
body.has-tooltip-portal .sidebar [data-tooltip]::before,
body.has-tooltip-portal .sidebar [data-tooltip]::after {
  content: none !important;
}

.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: hsla(240, 1%, 17%, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--jet);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-2);
  z-index: 5;
}

.navbar-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0 5px;
  gap: 0;
}

.navbar-link {
  color: var(--light-gray);
  font-size: var(--fs-8);
  padding: 20px 6px;
  transition: color var(--transition-1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.navbar-link:hover,
.navbar-link:focus {
  color: var(--light-gray-70);
}

.navbar-link.active {
  color: var(--orange-yellow-crayola);
}

.navbar-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: var(--orange-yellow-crayola);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

.about .article-title {
  margin-bottom: 15px;
}

/* First decision point for recruiters before exploratory portfolio content. */
.recruiter-cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 20px 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 219, 112, 0.3);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 219, 112, 0.12), rgba(255, 255, 255, 0.025) 58%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.recruiter-cta-eyebrow {
  margin-bottom: 8px;
  color: var(--orange-yellow-crayola);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.recruiter-cta-title {
  max-width: none;
  color: var(--white-2);
  font-size: clamp(1.1rem, 2vw, 1.65rem);
  line-height: 1.25;
}

.recruiter-cta-copy > p:last-child {
  max-width: 620px;
  margin-top: 10px;
  color: var(--light-gray-70);
  line-height: 1.55;
}

.recruiter-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.recruiter-cta-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: var(--white-2);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.recruiter-cta-primary {
  gap: 7px;
  background: var(--orange-yellow-crayola);
  border-color: var(--orange-yellow-crayola) !important;
  color: var(--smoky-black) !important;
}

.recruiter-cta-secondary {
  background: rgba(255, 255, 255, 0.045);
}

.recruiter-cta-actions .recruiter-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  color: var(--white-2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.recruiter-cta-actions .recruiter-cta-secondary:hover,
.recruiter-cta-actions .recruiter-cta-secondary:focus-visible {
  color: var(--white-2);
  border-color: var(--orange-yellow-crayola);
  background: rgba(255, 219, 112, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.pwa-install-button[hidden] { display: none !important; }

.recruiter-cta-actions a:hover,
.recruiter-cta-actions a:focus-visible {
  border-color: var(--orange-yellow-crayola);
  transform: translateY(-1px);
}

.service {
  margin-bottom: 35px;
}

.github-heatmap {
  position: relative;
  margin-bottom: 34px;
  padding: 18px;
  --heatmap-column-gap: clamp(4px, 0.42vw, 8px);
  --heatmap-row-gap: clamp(3px, 0.34vw, 6px);
  background: var(--polish-panel-soft, var(--eerie-black-1));
  border: 1px solid var(--polish-border, var(--jet));
  border-radius: var(--polish-radius, 14px);
  overflow: hidden;
}

.github-heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.github-heatmap-title,
.github-heatmap-link,
.github-heatmap-summary {
  color: var(--light-gray-70);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.github-heatmap-title {
  color: var(--light-gray);
}

.github-heatmap-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
  color: var(--light-gray);
  transition: color 160ms ease;
}

.github-heatmap-link:hover,
.github-heatmap-link:focus-visible {
  color: var(--orange-yellow-crayola);
}

.github-heatmap-link ion-icon {
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
}

.github-heatmap-board {
  max-width: 100%;
  overflow: visible;
  overflow-y: hidden;
  padding: 6px 0 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--jet) transparent;
}

.github-heatmap-board::-webkit-scrollbar {
  height: 6px;
}

.github-heatmap-board::-webkit-scrollbar-thumb {
  background: var(--jet);
  border-radius: 999px;
}

.github-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(var(--week-count, 53), minmax(0, 1fr));
  grid-template-rows: repeat(7, clamp(12px, 1.05vw, 16px));
  column-gap: var(--heatmap-column-gap);
  row-gap: var(--heatmap-row-gap);
  width: 100%;
  align-items: center;
}

.github-heatmap-months {
  display: grid;
  grid-template-columns: repeat(var(--week-count, 53), minmax(0, 1fr));
  column-gap: var(--heatmap-column-gap);
  width: 100%;
  min-height: 13px;
  margin-bottom: 7px;
  color: var(--light-gray-70);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.github-heatmap-month {
  display: block;
  justify-self: start;
  white-space: nowrap;
  transform: translateX(-1px);
}

.github-heatmap-cell {
  width: clamp(6px, 0.58vw, 9px);
  height: clamp(6px, 0.58vw, 9px);
  align-self: center;
  justify-self: center;
  border-radius: 999px;
  background: hsla(0, 0%, 100%, 0.11);
  opacity: 1;
  transform: none;
  animation: none;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.github-heatmap-cell:hover {
  box-shadow: 0 0 0 4px hsla(0, 0%, 100%, 0.08);
  transform: scale(1.22);
}

.github-heatmap-cell[data-level="1"] {
  width: clamp(7px, 0.68vw, 10px);
  height: clamp(7px, 0.68vw, 10px);
  background: hsla(0, 0%, 100%, 0.44);
}

.github-heatmap-cell[data-level="2"] {
  width: clamp(8px, 0.78vw, 11px);
  height: clamp(8px, 0.78vw, 11px);
  background: hsla(0, 0%, 100%, 0.68);
}

.github-heatmap-cell[data-level="3"] {
  width: clamp(9px, 0.88vw, 12px);
  height: clamp(9px, 0.88vw, 12px);
  background: hsla(0, 0%, 100%, 0.86);
}

.github-heatmap-cell[data-level="4"] {
  width: clamp(10px, 0.98vw, 13px);
  height: clamp(10px, 0.98vw, 13px);
  background: var(--white-2);
}

.github-heatmap-tooltip {
  position: absolute;
  z-index: 4;
  max-width: min(280px, calc(100% - 24px));
  padding: 7px 10px;
  border: 1px solid var(--polish-border-strong, var(--jet));
  border-radius: 8px;
  background: #111317;
  color: var(--white-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.github-heatmap-tooltip.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.github-heatmap-summary {
  margin-top: 16px;
  color: var(--light-gray-70);
}

.web-destinations {
  margin-bottom: 35px;
  padding: 18px;
  background: var(--polish-panel-soft, var(--eerie-black-1));
  border: 1px solid var(--polish-border, var(--jet));
  border-radius: var(--polish-radius, 14px);
}

.web-destinations-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.web-destinations-kicker,
.web-destination-url {
  color: var(--orange-yellow-crayola);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: var(--fw-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.web-destinations-title {
  margin-top: 4px;
}

.web-destinations-intro {
  max-width: 260px;
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  line-height: 1.5;
  text-align: right;
}

.web-destination-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--polish-border, var(--jet));
  border-radius: 12px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.web-destination-card:hover,
.web-destination-card:focus-visible {
  background: rgba(255, 219, 112, 0.06);
  border-color: var(--polish-border-strong, rgba(255, 219, 112, 0.4));
  outline: none;
  transform: translateY(-2px);
}

.web-destination-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--orange-yellow-crayola);
  background: rgba(255, 219, 112, 0.1);
  border: 1px solid rgba(255, 219, 112, 0.22);
  border-radius: 10px;
}

.web-destination-icon ion-icon {
  font-size: 21px;
}

.web-destination-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.web-destination-title {
  color: var(--white-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-600);
}

.web-destination-description {
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  line-height: 1.45;
}

.web-destination-url {
  margin-top: 4px;
}

.web-destination-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--orange-yellow-crayola);
  font-size: 19px;
  transform: rotate(45deg);
}

/* Avoid rendering long, below-the-fold collections until the visitor approaches them. */
.github-heatmap,
.service,
.tech-stack-section,
.achievements,
.gear-section:not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

.achievements {
  contain-intrinsic-size: auto 1200px;
}

@media (max-width: 580px) {
  .web-destinations-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .web-destinations-intro {
    max-width: none;
    text-align: left;
  }

  .resume-preview-modal {
    padding: 0;
    place-items: stretch;
  }

  .resume-preview-panel {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
  }

  .resume-preview-header {
    padding: 12px;
  }

  .resume-preview-header h2 {
    font-size: 0.92rem;
  }

  .resume-preview-actions {
    gap: 6px;
  }

  .resume-preview-action {
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .github-heatmap {
    padding: 16px;
    --heatmap-column-gap: 2px;
    --heatmap-row-gap: 2px;
  }

  .github-heatmap-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .github-heatmap-grid {
    grid-template-columns: repeat(var(--week-count, 53), minmax(0, 1fr));
    grid-template-rows: repeat(7, 8px);
    column-gap: var(--heatmap-column-gap);
    row-gap: var(--heatmap-row-gap);
  }

  .github-heatmap-months {
    min-height: 11px;
    margin-bottom: 6px;
    font-size: 0.5rem;
  }

  .github-heatmap-cell,
  .github-heatmap-cell[data-level="1"],
  .github-heatmap-cell[data-level="2"],
  .github-heatmap-cell[data-level="3"],
  .github-heatmap-cell[data-level="4"] {
    width: 5px;
    height: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .github-heatmap-cell {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@keyframes heatmapDotIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.service-title {
  margin-bottom: 20px;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  z-index: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow: hidden;
}

.service-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
  transition: background 0.3s ease;
}

.service-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), hsla(45, 100%, 72%, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.service-item:hover::after {
  opacity: 1;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--elevation-2);
}

.service-icon-box {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.service-icon {
  font-size: 2.5rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.service-item:hover .service-icon {
  transform: rotateY(360deg);
}

.service-content-box {
  flex: 1;
}

.service-item-title {
  margin-bottom: 7px;
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-500);
  font-size: var(--type-sm);
  line-height: var(--lh-tight);
}

.service-item-text {
  color: var(--light-gray);
  font-size: var(--type-xs);
  font-weight: var(--fw-300);
  line-height: var(--lh-relaxed);
}


.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: hsl(0, 0%, 5%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition: var(--transition-1);
}

.overlay.active {
  opacity: 0.8;
  visibility: visible;
  pointer-events: all;
}

.article-title {
  margin-bottom: 30px;
}

/* Enhanced Timeline Section */
.timeline {
  margin-bottom: 30px;
}

.timeline-list {
  font-size: var(--fs-6);
  margin-left: 45px;
}

.timeline-item {
  position: relative;
}

.timeline-item:not(:last-child) {
  margin-bottom: 20px;
}

.org-name {
  font-size: var(--type-xs);
  padding-top: -50vh;
}

.timeline-list span {
  color: var(--vegas-gold);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -30px;
  width: 1px;
  height: calc(100% + 50px);
  background: var(--jet);
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -33px;
  height: 6px;
  width: 6px;
  background: var(--text-gradient-yellow);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--jet);
}

.timeline-text {
  color: var(--light-gray);
  font-weight: var(--fw-300);
  font-size: var(--type-sm);
  line-height: var(--lh-relaxed);
}

/* New Enhanced Timeline Styles */
.timeline-section {
  margin-bottom: 50px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 35px;
  position: relative;
}

.section-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  color: var(--orange-yellow-crayola);
}

.section-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.section-icon svg {
  width: 32px;
  height: 32px;
  display: block;
  fill: currentColor;
}

.section-title {
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-600);
}

.section-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg,
      var(--orange-yellow-crayola),
      transparent);
  margin-left: 20px;
}

/* Timeline Container */
.timeline-container {
  position: relative;
  padding-left: 40px;
}

/* Timeline Item */
.timeline-container .timeline-item {
  position: relative;
  display: flex;
  gap: 25px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInTimeline 0.6s ease-out forwards;
}

.timeline-container .timeline-item:nth-child(1) {
  animation-delay: 0.1s;
}

.timeline-container .timeline-item:nth-child(2) {
  animation-delay: 0.2s;
}

.timeline-container .timeline-item:nth-child(3) {
  animation-delay: 0.3s;
}

.timeline-container .timeline-item:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInTimeline {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Timeline Marker */

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px var(--jet),
      0 0 20px var(--orange-yellow-crayola);
  }

  50% {
    box-shadow: 0 0 0 3px var(--jet),
      0 0 30px var(--orange-yellow-crayola);
  }
}

/* Timeline Content */
.timeline-content {
  flex: 1;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 16px;
  padding: 25px;
  position: relative;
  transition: all 0.3s ease;
}

.timeline-container .timeline-item:hover .timeline-content,
.timeline-item .timeline-content:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35),
    0 8px 24px rgba(255, 215, 0, 0.18),
    0 0 16px rgba(255, 215, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.4);
}

.timeline-item .timeline-content:focus-visible {
  outline: 2px solid #ffdb70;
  outline-offset: 4px;
}

.timeline-content>* {
  position: relative;
  z-index: 1;
}

.timeline-badge {
  display: inline-block;
  background: var(--text-gradient-yellow);
  color: var(--eerie-black-1);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: var(--fs-8);
  font-weight: var(--fw-600);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {

  0%,
  100% {
    box-shadow: 0 0 10px hsla(45, 100%, 72%, 0.3);
  }

  50% {
    box-shadow: 0 0 20px hsla(45, 100%, 72%, 0.6);
  }
}

.timeline-title {
  color: var(--white-2);
  margin-bottom: 8px;
  font-weight: var(--fw-600);
}

.company-name {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-3);
  font-weight: var(--fw-600);
  margin-bottom: 8px;
}

.timeline-period {
  display: inline-block;
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  margin-bottom: 12px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.timeline-tags .tag {
  background: hsla(45, 100%, 72%, 0.1);
  color: var(--orange-yellow-crayola);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  border: 1px solid hsla(45, 100%, 72%, 0.2);
  transition: all 0.3s ease;
}

.timeline-tags .tag:hover {
  background: hsla(45, 100%, 72%, 0.2);
  transform: translateY(-2px);
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 10px;
}

.project-groups {
  display: grid;
  gap: 44px;
}

.project-group {
  display: grid;
  gap: 18px;
}

.project-group-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 720px;
}

.project-group-eyebrow {
  color: var(--orange-yellow-crayola);
  font-size: var(--type-xs);
  font-weight: var(--fw-500);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.project-group-title {
  margin-bottom: 8px;
}

.project-group-description {
  color: var(--light-gray-70);
  font-size: var(--type-sm);
  line-height: var(--lh-base);
}

.project-list--featured {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-list--featured .project-item>a {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 219, 112, 0.12);
  border-radius: 18px;
  display: block;
  height: 100%;
  padding: 8px;
}

.project-list--featured .project-img {
  margin-bottom: 13px;
}

.project-list--experiments {
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.project-list--experiments .project-img {
  border-radius: 12px;
  margin-bottom: 10px;
}

.project-list--experiments .project-title {
  font-size: var(--type-xs);
  line-height: var(--lh-base);
}

.project-item {
  display: none;
}

.project-item.active {
  display: block;
  animation: scaleUp 0.25s ease forwards;
}

@keyframes scaleUp {
  0% {
    transform: scale(0.5);
  }

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

.project-item>a {
  width: 100%;
  outline: none;
}

.project-item>a:focus-visible {
  outline: 2px solid #ffdb70;
  outline-offset: 4px;
  border-radius: 12px;
}

.project-img {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 15px;
}

.project-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
  transition: var(--transition-1);
}

.project-item>a:hover .project-img::before {
  background: hsla(0, 0%, 0%, 0.5);
}

.project-item>a:focus-visible .project-img::before {
  background: hsla(0, 0%, 0%, 0.5);
}

.project-item-icon-box {
  --scale: 0.8;

  background: var(--jet);
  color: var(--orange-yellow-crayola);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--scale));
  font-size: 20px;
  padding: 18px;
  border-radius: 12px;
  opacity: 0;
  z-index: 1;
  transition: var(--transition-1);
}

.project-item>a:hover .project-item-icon-box,
.project-item>a:focus-visible .project-item-icon-box {
  --scale: 1;
  opacity: 1;
}

.project-item-icon-box ion-icon {
  --ionicon-stroke-width: 50px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-2);
}

/* Ensure video previews in project cards match image styling */
.project-img video,
.project-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  /* do not interfere with hover overlay and clicks */
}

.project-item>a:hover .project-img img,
.project-item>a:focus-visible .project-img img {
  transform: scale(1.1);
}

/* Match hover zoom effect for video previews */
.project-item>a:hover .project-img video,
.project-item>a:hover .project-card-video,
.project-item>a:focus-visible .project-img video,
.project-item>a:focus-visible .project-card-video {
  transform: scale(1.1);
  transition: transform var(--transition-2);
}

.project-title,
.project-category {
  margin-left: 10px;
}

.project-title {
  color: var(--white-2);
  font-size: var(--type-sm);
  font-weight: var(--fw-400);
  text-transform: capitalize;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
}

.project-category {
  color: var(--light-gray-70);
  font-size: var(--type-xs);
  font-weight: var(--fw-300);
  line-height: var(--lh-base);
}

/* Enhanced Organizations Section */
.organization-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Organization Card */
.organization-card {
  background: var(--eerie-black-2);
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
  animation: slideUpCard 0.6s ease-out forwards;
}

.organization-card:nth-child(1) {
  animation-delay: 0.1s;
}

.organization-card:nth-child(2) {
  animation-delay: 0.2s;
}

.organization-card:nth-child(3) {
  animation-delay: 0.3s;
}

.organization-card:nth-child(4) {
  animation-delay: 0.4s;
}

.organization-card:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes slideUpCard {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.organization-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-border);
  box-shadow: var(--elevation-2);
}

/* Card Header */
.org-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: linear-gradient(135deg,
      hsla(45, 100%, 72%, 0.05) 0%,
      transparent 100%);
  border-bottom: 1px solid var(--jet);
  position: relative;
}

.org-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25px;
  right: 25px;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      var(--orange-yellow-crayola),
      transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.organization-card:hover .org-card-header::after {
  opacity: 1;
}

/* Organization Logo */
.org-logo {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-gradient-jet);
  border: 2px solid var(--jet);
  padding: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.org-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      hsla(45, 100%, 72%, 0.1),
      transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.organization-card:hover .org-logo {
  border-color: var(--orange-yellow-crayola);
  transform: scale(1.05);
}

.organization-card:hover .org-logo::before {
  opacity: 1;
}

.org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Header Content */
.org-header-content {
  flex: 1;
  min-width: 0;
}

.org-name {
  color: var(--white-2);
  font-size: var(--type-base);
  font-weight: var(--fw-600);
  margin-bottom: 8px;
  line-height: var(--lh-tight);
  transition: color 0.3s ease;
}

.organization-card:hover .org-name {
  color: var(--orange-yellow-crayola);
}

/* Card Body */
.org-card-body {
  padding: 25px;
}

.org-desc {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 20px;
}

/* Organization Actions */

/* Media query for larger screens */
@media (max-width: 767px) {
  .organization-container {
    padding: 8px;
  }

  /* Organization title and description */
}

/* Extra small devices - organizations */
@media (max-width: 479px) {
  .organization-container {
    padding: 6px;
  }
}

/* ===== MOBILE SIDEBAR COMPACT LAYOUT ===== */
@media (max-width: 579px) {
  .sidebar {
    padding: 20px 15px;
  }

  .sidebar-info {
    flex-direction: row;
    gap: 15px;
    text-align: left;
    align-items: center;
  }

  .avatar-box {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 16px;
  }

  .avatar-box img {
    border-radius: 16px;
  }

  .info-content {
    align-items: flex-start;
    text-align: left;
  }

  .info-content .name {
    font-size: 1.25rem;
    margin-bottom: 5px;
  }

  .info-content .title {
    font-size: 11px;
    padding: 2px 10px;
  }

  .sidebar-info_more .separator {
    margin: 12px 0;
  }

  .contacts-list {
    gap: 10px;
  }

  .contact-item {
    gap: 12px;
  }

  .icon-box {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .contact-title {
    font-size: 10px;
    margin-bottom: 1px;
  }

  .contact-info :is(.contact-link, time, address) {
    font-size: 13px;
  }

  /* Resume button - keep centered */
  .contact-link.resume {
    font-size: 12px;
  }

  /* Social links compact row */
  .social-list {
    justify-content: center;
    gap: 8px;
    padding: 0;
  }

  .social-item .social-link {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

@media (min-width: 580px) {

  :root {

    --fs-1: 32px;
    --fs-2: 24px;
    --fs-3: 26px;
    --fs-4: 18px;
    --fs-6: 15px;
    --fs-7: 15px;
    --fs-8: 12px;

  }

  .sidebar,
  article {
    width: 520px;
    margin-inline: auto;
    padding: 30px;
  }

  .article-title {
    font-weight: var(--fw-600);
    padding-bottom: 15px;
  }

  .article-title::after {
    width: 40px;
    height: 5px;
  }

  .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 18px;
  }

  main {
    margin-top: 60px;
    margin-bottom: 100px;
  }

  .sidebar {
    max-height: none;
    margin-bottom: 30px;
    height: fit-content;
    align-self: flex-start;
  }

  .sidebar.active {
    max-height: none;
  }

  .sidebar-info {
    gap: 25px;
    flex-direction: column;
    align-items: center;
  }

  .avatar-box {
    border-radius: 30px;
    width: 120px;
    height: 120px;
  }

  .avatar-box img {
    width: 100%;
    height: 100%;
  }

  .info-content .name {
    margin-bottom: 15px;
  }

  .info-content .title {
    padding: 5px 18px;
  }

  .info_more-btn {
    top: -30px;
    right: -30px;
    padding: 10px 15px;
  }

  .info_more-btn span {
    display: block;
    font-size: var(--fs-8);
  }

  .info_more-btn ion-icon {
    display: none;
  }

  .separator {
    margin: 32px 0;
  }

  .contacts-list {
    gap: 20px;
  }

  .contact-info {
    flex: 1;
    max-width: 100%;
    width: auto;
    min-width: 0;
  }

  .navbar {
    border-radius: 20px 20px 0 0;
  }

  .navbar-list {
    gap: 20px;
  }

  .navbar-link {
    --fs-8: 14px;
  }

  .about .article-title {
    margin-bottom: 20px;
  }

  .content-card {
    padding: 30px;
    padding-top: 25px;
  }

  .timeline-list {
    margin-left: 65px;
  }

  .timeline-item:not(:last-child)::before {
    left: -40px;
  }

  .timeline-item::after {
    height: 8px;
    width: 8px;
    left: -43px;
  }

  .project-img {
    border-radius: 16px;
  }

}


@media (min-width: 768px) {

  .sidebar,
  article {
    width: 700px;
  }

  .contacts-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }



  .navbar-link {
    --fs-8: 15px;
  }

  .article-title {
    padding-bottom: 20px;
  }

  .project-list {
    grid-template-columns: 1fr 1fr;
  }

}


@media (min-width: 1024px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
    * shadow
    */

    --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.125);
    --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.125);
    --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.125);

  }

  .sidebar,
  article {
    width: 950px;
    box-shadow: var(--shadow-5);
  }




  main {
    margin-bottom: 60px;
  }

  .main-content {
    position: relative;
    width: max-content;
    margin: auto;
  }

  .navbar {
    position: absolute;
    bottom: auto;
    top: 0;
    left: auto;
    right: 0;
    width: max-content;
    border-radius: 0 20px;
    padding: 0 20px;
    box-shadow: none;
  }

  .navbar-list {
    gap: 30px;
    padding: 0 20px;
  }

  .navbar-link {
    font-weight: var(--fw-500);
  }


  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
  }

  .project-list {
    grid-template-columns: repeat(3, 1fr);
  }


}

@media (min-width: 1250px) {

  body::-webkit-scrollbar {
    width: 20px;
  }

  body::-webkit-scrollbar-track {
    background: var(--smoky-black);
  }

  body::-webkit-scrollbar-thumb {
    border: 5px solid var(--smoky-black);
    background: hsla(0, 0%, 100%, 0.1);
    border-radius: 20px;
    box-shadow: inset 1px 1px 0 hsla(0, 0%, 100%, 0.11),
      inset -1px -1px 0 hsla(0, 0%, 100%, 0.11);
  }

  body::-webkit-scrollbar-thumb:hover {
    background: hsla(0, 0%, 100%, 0.15);
  }

  body::-webkit-scrollbar-button {
    height: 60px;
  }

  .sidebar,
  article {
    width: auto;
  }

  article {
    min-height: 100%;
  }


  main {
    max-width: 95%;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
  }

  .main-content {
    flex-grow: 1;
    width: auto;
    min-width: 0;
    margin: 0;
  }

  .sidebar {
    position: sticky;
    top: 60px;
    max-height: max-content;
    height: 100%;
    margin-bottom: 0;
    padding-top: 60px;
    z-index: 1;
    width: 300px;
    min-width: 300px;
    flex-shrink: 0;
  }

  .sidebar-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .avatar-box {
    width: 150px;
    height: 150px;
  }

  .avatar-box img {
    width: 100%;
    height: 100%;
  }

  .info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .info-content .name {
    white-space: nowrap;
    text-align: center;
  }

  .info-content .title {
    margin: auto;
  }

  .info_more-btn {
    display: none;
  }

  .sidebar-info_more {
    opacity: 1;
    visibility: visible;
  }

  .contacts-list {
    display: grid;
    grid-template-columns: 1fr;
  }



  .contact-info .contact-link,
  .contact-info time,
  .contact-info address {
    font-size: var(--fs-7, 14px);
    /* Sets default to 14px if --fs-7 is undefined */
    font-weight: var(--fw-300, 300);
    /* Sets default to 300 if --fw-300 is undefined */
  }

  .separator:last-of-type {
    margin: 15px 0;
    opacity: 0;
  }

  .social-list {
    display: flex;
    justify-content: center;
  }

  .timeline-text {
    /* max-width removed to maximize space */
  }
}

/* NEW ANIMATIONS & UI/UX UPDATES */

/* Smooth slide & fade in animation */
@keyframes slideFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* A pulse effect for interactive elements */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

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

/* Apply slide & fade to articles when activated */
article.active {
  display: block;
  animation: none;
}

/* Add an animated underline effect to navigation links */
.navbar-link {
  position: relative;
  overflow: hidden;
}

.navbar-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: var(--orange-yellow-crayola);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

/* Enhanced Chatbot Features */
.chatbot-btn {
  position: fixed;
  right: calc(30px + env(safe-area-inset-right));
  bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 219, 112, 0.28);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  animation: pulse 2s infinite;
}

.chatbot-btn svg {
  width: 27px;
  height: 27px;
}

.chatbot-btn:hover {
  animation: pulse 0.8s ease-in-out;
  transform: scale(1.1);
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  50% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(0, 123, 255, 0.1);
  }

  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

/* Smart Suggestions */

/* Enhanced suggestion container for better visibility */

/* Make suggestions more prominent in dark theme */

/* Enhanced Typing Indicator */
.typing-indicator {
  opacity: 0.8;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Enhanced Message Formatting */

/* Sidebar toggle transition update */
.sidebar {
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.sidebar.active {
  opacity: 1;
}

/* Filter select dropdown now uses a slideFadeIn effect */

/* Timeline items get a gentle hover lift & shadow */
.timeline-list .timeline-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-list .timeline-item:hover,
.timeline-list .timeline-item:focus-within {
  transform: translateX(5px);
  box-shadow: none;
}

/* Organization buttons lift on hover */

/* FAQ answer expand/collapse animation */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.faq-answer.show {
  max-height: 200px;
  /* Adjust as needed */
  opacity: 1;
}

/* ===== Additional Animation & UI/UX Improvements ===== */

/* Fade in up for reveal animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
}

.reveal.animate {
  animation: fadeInUp 0.6s ease forwards;
}

/* Zoom effect for project items on hover */
.project-item {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--elevation-0);
  transition: transform 0.3s ease, box-shadow var(--duration-2) var(--ease-standard);
}

.project-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--elevation-1);
}

/* Back-to-top button styles */
.back-to-top {
  position: fixed;
  bottom: 90px;
  right: 37px;
  background: var(--orange-yellow-crayola);
  color: var(--smoky-black);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(-10px);
}

.back-to-top:hover {
  transform: translateY(-15px);
}

/* Mobile-specific tweaks */
@media (max-width: 767px) {

  /* Center the RESUME link within the sidebar contacts */
  .contacts-list .resume {
    display: block;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .contacts-list>.contact-item:first-child .contact-info {
    width: 100%;
    max-width: 100%;
  }

  /* Hide back-to-top on mobile to avoid overlapping chatbot */
  .back-to-top {
    display: none !important;
  }
}

/* Enhanced sliding animation for FAQ answers */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  padding: 0 10px;
}

.faq-answer.show {
  max-height: 200px;
  /* Adjust as needed */
  opacity: 1;
  padding: 10px;
}

/* Bounce effect for avatar image on page load */
@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-20px);
  }

  60% {
    transform: translateY(-10px);
  }
}

.avatar-box img {
  animation: bounce 2s;
}

/* Project Modal Styles (Dark Mode with Animation) */
/* ============================================
   PROJECT MODAL STYLES - Vertical Layout
   Images on top (70%), Info at bottom (30%)
   ============================================ */

.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  padding: clamp(8px, 3vw, 20px);
  overflow: hidden;
}

.project-modal.active {
  display: flex;
}

.project-modal-wrapper {
  background: linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%);
  border-radius: 12px;
  max-width: min(1280px, 100%);
  width: min(96vw, 1280px);
  max-height: 96vh;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 219, 112, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: projectModalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 215, 0, 0.35) rgba(255, 255, 255, 0.03);
}

.project-modal-wrapper::-webkit-scrollbar {
  width: 10px;
}

.project-modal-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-modal-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.35), rgba(255, 215, 0, 0.25));
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.project-modal-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.55), rgba(255, 215, 0, 0.4));
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.35), inset 0 1px 3px rgba(255, 255, 255, 0.25);
  transform: scaleY(1.05);
}

.project-modal-wrapper::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.65), rgba(255, 215, 0, 0.5));
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes projectModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid rgba(255, 219, 112, 0.4);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  line-height: 1;
  font-size: 28px;
  cursor: pointer;
  color: #ffdb70;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.project-modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: rgba(255, 219, 112, 0.2);
  border-color: #ffdb70;
}

/* ============================================
   IMAGE GALLERY SECTION (TOP 70%)
   ============================================ */

.project-gallery-slider {
  width: 100%;
  height: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.project-gallery-image-container {
  width: 100%;
  height: auto;
  display: grid;
  place-items: center;
  padding: 68px clamp(20px, 4vw, 56px) 18px;
  /* extra horizontal space so buttons don’t overlap media */
  position: relative;
  box-sizing: border-box;
}

.project-modal-picture {
  width: 100%;
  height: auto;
  display: grid;
  place-items: center;
}

.project-gallery-image {
  display: block;
  max-width: none;
  max-height: min(72vh, 860px);
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: none;
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.15s ease;
}

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

/* Video element styles for project modal */
.project-gallery-video {
  position: relative;
  z-index: 1;
  display: block;
  max-width: none;
  width: 100%;
  height: auto;
  max-height: min(72vh, 860px);
  border-radius: 8px;
  box-shadow: none;
  object-fit: contain;
  background: #000;
}

.project-gallery-counter {
  position: static;
  margin-top: 12px;
  background: rgba(26, 26, 26, 0.9);
  color: #ffdb70;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 219, 112, 0.3);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.project-gallery-prev,
.project-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.85), rgba(26, 26, 26, 0.6));
  border: 1px solid rgba(255, 219, 112, 0.35);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffdb70;
  font-size: 1.6rem;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.project-gallery-prev span,
.project-gallery-next span {
  line-height: 1;
  display: block;
}

.project-gallery-prev:focus-visible,
.project-gallery-next:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 219, 112, 0.5), 0 6px 18px rgba(0, 0, 0, 0.4);
}

.project-gallery-prev {
  left: 16px;
}

.project-gallery-next {
  right: 16px;
}

.project-gallery-prev:hover,
.project-gallery-next:hover {
  background: rgba(255, 219, 112, 0.16);
  border-color: #ffdb70;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 22px rgba(255, 219, 112, 0.18), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.project-gallery-prev:active,
.project-gallery-next:active {
  transform: translateY(-50%) scale(0.96);
}

/* ============================================
   PROJECT INFO SECTION (BOTTOM 30%)
   ============================================ */

.project-modal-info {
  flex: 0 0 30%;
  padding: 25px 30px;
  background: #1a1a1a;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chatbox-input button {
  display: grid;
  place-items: center;
  line-height: 1;
}

.chatbox-input button > span {
  display: block;
  line-height: 1;
}

/* Custom scrollbar for info section */
.project-modal-info::-webkit-scrollbar {
  width: 8px;
}

.project-modal-info::-webkit-scrollbar-track {
  background: rgba(255, 219, 112, 0.05);
  border-radius: 10px;
}

.project-modal-info::-webkit-scrollbar-thumb {
  background: rgba(255, 219, 112, 0.3);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.project-modal-info::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 219, 112, 0.5);
}

.project-info-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffdb70;
  margin: 0;
  line-height: 1.3;
}

.project-info-description {
  font-size: 1rem;
  color: #e0e0e0;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

/* Rich description styling for enhanced formatting */
.project-info-description.rich {
  white-space: normal;
}

.project-info-description.rich h4,
.project-info-description.rich h5 {
  margin: 8px 0 6px;
  font-weight: 700;
  color: #ffdb70;
}

.project-info-description.rich h4 {
  font-size: 1.1rem;
}

.project-info-description.rich h5 {
  font-size: 1rem;
  color: #ffd35a;
}

.project-info-description.rich ol,
.project-info-description.rich ul {
  margin: 6px 0 8px 18px;
}

.project-info-description.rich li {
  margin: 4px 0;
}

.project-info-description.rich .desc-divider {
  border: 0;
  border-top: 1px solid rgba(255, 219, 112, 0.25);
  margin: 10px 0;
}

.project-info-description.rich .desc-section {
  margin-bottom: 6px;
}

.project-info-description.rich code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.project-info-description.rich em {
  color: #c8e6ff;
  font-style: normal;
}

.structured-description {
  display: grid;
  gap: 10px;
}

.structured-description-item {
  padding: 12px 14px;
  border: 1px solid rgba(255, 219, 112, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.structured-description-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 219, 112, 0.1);
  color: var(--orange-yellow-crayola);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.structured-description-item p {
  margin: 0;
  color: var(--light-gray);
  font-size: 0.95rem;
  line-height: 1.55;
}

.achievement-description.rich {
  white-space: normal;
}

.project-info-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 219, 112, 0.2);
  border-bottom: 1px solid rgba(255, 219, 112, 0.2);
}

.tech-label {
  font-weight: 600;
  color: #ffdb70;
  font-size: var(--type-sm);
}

.tech-stack {
  color: #b0b0b0;
  font-size: var(--type-sm);
  display: block;
  width: 100%;
}

.tech-stack .section-title {
  display: block;
  margin: 8px 0 6px;
  color: #ffdb70;
  font-weight: 600;
}

.tech-stack .tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 10px;
}

.tech-stack .tech-table th,
.tech-stack .tech-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 219, 112, 0.15);
  color: #e0e0e0;
  text-align: left;
  font-size: var(--type-xs);
}

.tech-stack .tech-table th {
  color: #ffdb70;
  font-weight: 600;
}

/* Tech Stack List & References Styling */
.tech-stack .tech-list {
  list-style: disc;
  padding-left: 20px;
  margin: 6px 0 15px;
  color: var(--light-gray);
}

.tech-stack .tech-list li {
  margin-bottom: 5px;
  line-height: 1.5;
}

.tech-stack .tech-list a {
  display: inline;
  color: var(--orange-yellow-crayola);
  font-weight: 500;
  transition: color var(--transition-1);
}

.tech-stack .tech-list a:hover {
  color: var(--vegas-gold);
  text-decoration: underline;
}

.project-info-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 5px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffdb70;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border: 2px solid rgba(255, 219, 112, 0.4);
  border-radius: 8px;
  background: rgba(255, 219, 112, 0.05);
  transition: all 0.3s ease;
}

.project-link:hover {
  background: #ffdb70;
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 219, 112, 0.3);
}

.project-link:active {
  transform: translateY(0);
}

.link-icon {
  font-size: 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .project-modal-wrapper {
    max-height: calc(100dvh - 18px);
    width: 100%;
  }

  .project-modal-info {
    flex: 0 0 40%;
    padding: 20px;
  }

  .project-info-title {
    font-size: 1.5rem;
  }

  .project-gallery-image-container {
    padding: 14px 64px;
  }

  .project-gallery-image,
  .project-gallery-video {
    max-height: 42dvh;
  }

  .project-gallery-prev,
  .project-gallery-next {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    border-radius: 10px;
  }

  .project-gallery-prev {
    left: 10px;
  }

  .project-gallery-next {
    right: 10px;
  }

  .project-info-links {
    flex-direction: column;
    gap: 10px;
  }

  .project-link {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .project-modal {
    align-items: stretch;
    padding: 8px;
  }

  .project-modal-wrapper {
    border-radius: 8px;
    max-height: calc(100dvh - 16px);
  }

  .project-modal-info {
    flex: 0 0 45%;
    padding: 15px;
    gap: 12px;
  }

  .project-info-title {
    font-size: 1.3rem;
  }

  .project-info-description {
    font-size: 0.9rem;
  }

  .project-gallery-image-container {
    padding: 96px 10px 12px;
  }

  .project-gallery-image,
  .project-gallery-video {
    max-height: 34dvh;
  }

  .project-gallery-prev,
  .project-gallery-next {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
    border-radius: 10px;
    top: 32px;
    transform: none;
  }

  .project-gallery-prev:hover,
  .project-gallery-next:hover {
    transform: scale(1.05);
  }

  .project-gallery-prev:active,
  .project-gallery-next:active {
    transform: scale(0.96);
  }

  .project-gallery-prev {
    left: 12px;
  }

  .project-gallery-next {
    right: 68px;
  }

  .project-modal-close {
    width: 35px;
    height: 35px;
    font-size: 24px;
  }
}

/* ============================================
   ACHIEVEMENT MODAL (POLISHED DYNAMIC LAYOUT)
   - Default / Portrait: Side-by-side 2-column layout (Left media, Right info)
   - Landscape (>= 1.35 aspect ratio / 16:9): Stacked layout (Top media, Bottom info)
   ============================================ */

.achievement-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1002;
  padding: clamp(8px, 3vw, 20px);
  overflow: hidden; /* prevents page scrollbar showing behind the modal */
}

.achievement-modal.active {
  display: flex;
}

.achievement-modal-content {
  position: relative;
  width: min(1040px, 94vw);
  max-height: min(88vh, 850px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  padding: 16px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)), rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modalPopIn 350ms ease both;
  overflow: hidden;
  box-sizing: border-box;
}

.achievement-modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 15;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
  background: #1c1c1f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.achievement-modal-close {
  position: static;
  flex: 0 0 36px;
  margin: 0;
  width: 36px;
  height: 36px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 0 !important;
  border-radius: 10px;
  color: var(--orange-yellow-crayola);
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.achievement-modal-close svg,
.achievement-modal-close ion-icon,
.achievement-modal-close span {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
  stroke: currentColor;
}

.achievement-modal-close:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 8px 22px rgba(255, 215, 0, 0.12);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.04));
}

.achievement-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

.achievement-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  height: 100%;
}

.achievement-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(76vh, 740px);
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.achievement-slider picture,
.achievement-slide-picture {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-slider picture img,
.achievement-slide-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(76vh, 740px);
  object-fit: contain;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: opacity 250ms ease;
  opacity: 1;
}

.achievement-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}

.achievement-slider-prev,
.achievement-slider-next {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--orange-yellow-crayola);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.03));
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 0 !important;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  line-height: 1;
}

.achievement-slider-prev svg,
.achievement-slider-next svg,
.achievement-slider-prev ion-icon,
.achievement-slider-next ion-icon {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
  stroke: currentColor;
}

.achievement-slider-prev:hover,
.achievement-slider-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.14);
}

.achievement-info {
  padding: 2px 6px 6px 2px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 215, 0, 0.35) rgba(255, 255, 255, 0.03);
}

.achievement-title-modal {
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  background: var(--text-gradient-yellow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 12px;
}

.achievement-title-modal::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.achievement-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.04), rgba(255, 215, 0, 0.01));
  border: 1px solid rgba(255, 215, 0, 0.12);
}

.achievement-organizer {
  color: var(--white-2);
  opacity: 0.9;
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 0;
}

.achievement-date-location {
  color: var(--orange-yellow-crayola);
  opacity: 0.95;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.01em;
}

.achievement-description {
  color: #e0e0e0;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.achievement-details .section-title,
.achievement-details strong {
  color: #ffdb70;
  font-weight: 600;
}

/* Teammates Section Styling */
.achievement-teammates {
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 215, 0, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.teammates-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange-yellow-crayola);
  margin: 0 0 10px 0;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.teammates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teammate-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease;
}

.teammate-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 215, 0, 0.2);
  transform: translateX(3px);
}

.teammate-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text-gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--smoky-black);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.25);
}

.teammate-info {
  flex: 1;
}

.teammate-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--white-2);
  margin: 0 0 2px 0;
  line-height: 1.2;
}

.teammate-role {
  font-size: 0.8rem;
  color: var(--light-gray);
  opacity: 0.8;
  margin: 0;
  line-height: 1.2;
}

/* Action Buttons */
.achievement-github,
.achievement-links {
  margin-top: 6px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.github-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #24292e 0%, #1a1e22 100%);
  color: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.github-button:hover {
  background: linear-gradient(135deg, #2c3136 0%, #24292e 100%);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.related-project-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--orange-yellow-crayola);
  background: transparent;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  align-self: flex-start;
  font-size: 0.9rem;
}

.related-project-button:hover {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.03));
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.12);
}

/* ============================================
   2. PORTRAIT MODIFIER: 2-Column Side-by-Side with Full Image Resolution
   ============================================ */

.achievement-modal.is-portrait .achievement-modal-content {
  width: min(1080px, 94vw);
  max-height: min(90vh, 880px);
}

.achievement-modal.is-portrait .achievement-modal-body {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 22px;
}

.achievement-modal.is-portrait .achievement-media {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.achievement-modal.is-portrait .achievement-slider {
  width: auto;
  max-width: 100%;
  max-height: min(76vh, 740px);
}

.achievement-modal.is-portrait .achievement-slider picture img,
.achievement-modal.is-portrait .achievement-slide-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(76vh, 740px);
  object-fit: contain;
}

/* ============================================
   3. LANDSCAPE (16:9) MODIFIER: Top Image / Bottom Info
   ============================================ */

.achievement-modal.is-landscape .achievement-modal-content {
  width: min(1140px, 94vw);
  max-height: min(92vh, 920px);
  padding: 20px clamp(16px, 3.5vw, 32px);
  overflow-y: auto;
  overflow-x: hidden;
  /* dark scrollbar so it blends with dark modal background */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.achievement-modal.is-landscape .achievement-modal-content::-webkit-scrollbar {
  width: 5px;
}

.achievement-modal.is-landscape .achievement-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.achievement-modal.is-landscape .achievement-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Keep the close toolbar inside the scrolling panel. A fixed control becomes
   relative to the animated (transformed) panel and drifts outside its edge. */
.achievement-modal.is-landscape .achievement-modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 1010;
}

.achievement-modal.is-landscape .achievement-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
  height: auto;
}

.achievement-modal.is-landscape .achievement-media {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: auto;
}

.achievement-modal.is-landscape .achievement-slider {
  width: 100%;
  height: auto;
  max-height: min(60vh, 580px);
  background: transparent;
  border: none;
  box-shadow: none;
}

.achievement-modal.is-landscape .achievement-slide-image {
  width: 100%;
  max-height: min(60vh, 580px);
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.achievement-modal.is-landscape .achievement-info {
  width: 100%;
  padding: 0;
  overflow: visible;
  gap: 14px;
}

.achievement-modal.is-landscape .teammates-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Responsive adjustments */
@media (max-width: 880px) {
  .achievement-modal .achievement-modal-content {
    width: 96vw;
    max-height: 96vh;
    padding: 18px;
    overflow-y: auto;
  }

  .achievement-modal .achievement-modal-body {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .achievement-modal .achievement-slider {
    width: 100%;
    max-height: min(55vh, 480px);
  }

  .achievement-modal .achievement-slider picture img,
  .achievement-modal .achievement-slide-image {
    max-height: min(55vh, 480px);
  }

  .achievement-modal .achievement-info {
    padding: 0;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .achievement-modal-content {
    animation: none;
  }

  .achievement-slide-image {
    transition: opacity 160ms ease;
  }
}

/* Service Section */
.service {
  margin-bottom: 35px;
}

.service-title {
  margin-bottom: 20px;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  z-index: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow: hidden;
}

.service-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
  transition: background 0.3s ease;
}

.service-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), hsla(45, 100%, 72%, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.service-item:hover::after {
  opacity: 1;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--elevation-2);
}

.service-icon-box {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.service-icon {
  font-size: 2.5rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.service-item:hover .service-icon {
  transform: rotateY(360deg);
}

.service-content-box {
  flex: 1;
}

.service-item-title {
  margin-bottom: 7px;
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-500);
  font-size: var(--type-sm);
  line-height: var(--lh-tight);
}

.service-item-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

/* Skills Section */
.skills {
  margin-bottom: 35px;
}

.skill-progress-fill {
  background: var(--text-gradient-yellow);
  height: 100%;
  border-radius: inherit;
  position: relative;
  animation: skillProgress 1.5s ease-out forwards;
  transform-origin: left;
}

.skill-progress-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes skillProgress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Achievements Section Styles */
.achievements {
  margin-bottom: 30px;
}

.achievements-title {
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 7px;
}

.achievements-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 3px;
}

/* Awards Timeline Accordion */
.awards-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.year-group {
  background: var(--border-gradient-onyx);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.year-group::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: 0;
}

.year-header {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  background: linear-gradient(135deg,
      hsla(45, 100%, 72%, 0.1),
      hsla(35, 100%, 68%, 0.05));
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--white-2);
}

.year-header:hover {
  background: linear-gradient(135deg,
      hsla(45, 100%, 72%, 0.15),
      hsla(35, 100%, 68%, 0.08));
}

.year-header.active {
  background: linear-gradient(135deg,
      hsla(45, 100%, 72%, 0.2),
      hsla(35, 100%, 68%, 0.1));
}

.year-title {
  font-size: var(--fs-1);
  font-weight: var(--fw-600);
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.award-count {
  font-size: var(--fs-6);
  color: var(--light-gray);
  padding: 5px 15px;
  background: hsla(0, 0%, 22%, 0.5);
  border-radius: 20px;
  margin-left: auto;
  margin-right: 15px;
}

.toggle-icon {
  font-size: var(--fs-4);
  color: var(--orange-yellow-crayola);
  transition: transform 0.3s ease;
  display: inline-block;
}

.year-header.active .toggle-icon {
  transform: rotate(180deg);
}

.year-content {
  position: relative;
  z-index: 1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 25px;
}

.year-content.active {
  max-height: 5000px;
  padding: 25px;
}

.achievements-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  list-style: none;
  padding: 0;
}

.achievement-card.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

.achievement-card {
  background: linear-gradient(145deg, var(--eerie-black-2), var(--eerie-black-1));
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
  border-radius: 20px;
  padding: 30px 25px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px) rotateX(-10deg);
  animation: awardEntrance 0.8s ease-out forwards;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.achievement-card:nth-child(1) {
  animation-delay: 0.1s;
}

.achievement-card:nth-child(2) {
  animation-delay: 0.3s;
}

.achievement-card:nth-child(3) {
  animation-delay: 0.5s;
}

/* Glowing border effect */
.achievement-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg,
      hsla(45, 100%, 72%, 0.1),
      hsla(35, 100%, 68%, 0.05));
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

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

/* Inner glow */
.achievement-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      hsla(45, 100%, 72%, 0.15),
      transparent 60%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.achievement-card:hover::after {
  opacity: 1;
}

.achievement-card:hover {
  transform: translateY(-10px) scale(1.03) rotateX(0deg);
  box-shadow: var(--elevation-2), 0 0 0 1px var(--color-accent-weak);
}



/* Award Ribbon */
.award-ribbon {
  position: relative;
  top: auto;
  left: auto;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 219, 112, 0.1);
  border: 1px solid var(--polish-border-strong, rgba(255, 219, 112, 0.28));
  border-radius: 999px;
  color: var(--orange-yellow-crayola);
  padding: 6px 10px;
  font-size: var(--type-xs);
  font-weight: var(--fw-600);
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: none;
  clip-path: none;
  z-index: 2;
}

.achievement-card .card-content {
  transform: translateZ(20px);
  margin-top: 12px;
}

.achievement-card .card-title {
  color: var(--white-2);
  font-size: var(--fs-4);
  margin-bottom: 10px;
  line-height: 1.4;
  background: var(--text-gradient-yellow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: var(--fw-600);
}

.achievement-card .card-subtitle {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  margin-bottom: 12px;
  font-style: italic;
}

.achievement-card .card-date,
.achievement-card .card-location {
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  margin: 5px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Animations */
@keyframes awardEntrance {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Optional scrollbar styling similar to your "has-scrollbar" class */

.achievement-item {
  background: #2c2c2c;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  width: 400px;
  /* Fixed width */
  min-width: 600px;
  /* Fixed minimum width */
  height: auto;
  /* Allow card content to be fully visible */
  overflow: visible;
  /* Show full content */
  box-sizing: border-box;
  width: auto !important;
  min-width: 0 !important;
  /* Let width adapt to content */
  flex: 0 0 auto;
  /* New line: prevent the panel from shrinking */
}

.achievement-item:hover,
.achievement-item:focus,
.achievement-item:active {
  transform: scale(1.05);
  box-shadow: 0px 4px 15px rgba(255, 215, 0, 0.5);
  border-color: var(--orange-yellow-crayola);
  outline: none;
}

.achievement-item h4 {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.1rem;
  color: #fff;
  /* Default color: white */
  text-align: center;
  /* Center the title inside the panel */
  padding: 0 1em;
}

.achievement-item:hover h4 {
  color: #FFD700;
  /* On hover: gold */
}

.achievement-item p {
  font-family: inherit;
  font-size: 0.9rem;
  color: inherit;
  margin: 0;
  overflow: visible;
  text-overflow: clip;
  display: block;
  line-clamp: unset;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

/* Ensure the chatbox is always above the theme toggle */
.chatbox {
  z-index: 1100 !important;
}

/* The full chat presentation is loaded only when it is requested. Keep the
   server-rendered dialog invisible until that stylesheet is ready. */
.chatbox[aria-hidden="true"] {
  display: none;
}

/* ===== IMAGE OPTIMIZATION STYLES ===== */

/* Lazy loading and responsive images */
img {
  transition: opacity 0.3s ease;
}

img[data-src] {
  opacity: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

img.loaded {
  opacity: 1;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Picture element responsive behavior */
picture {
  display: block;
  width: 100%;
}

picture img {
  width: 100%;
  height: auto;
  display: block;
}

/* Optimized avatar styles */
.avatar-box img {
  object-fit: cover;
  border-radius: inherit;
}

/* Organization images optimization */

/* Achievement images optimization */
.achievement-slider picture img,
.achievement-slide-image {
  object-fit: contain;
  max-width: 100%;
  width: auto;
  height: auto;
}

/* Project images optimization */
.project-img img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Certification images optimization */

/* Loading placeholder for images */

/* WebP support styles */

/* ===== COMPREHENSIVE MOBILE RESPONSIVE STYLES ===== */

/* Extra small devices (phones, less than 480px) */
@media (max-width: 479px) {
  :root {
    --fs-1: var(--type-xl);
    --fs-2: var(--type-base);
    --fs-3: var(--type-sm);
    --fs-4: var(--type-sm);
    --fs-5: var(--type-xs);
    --fs-6: var(--type-xs);
    --fs-7: var(--type-xs);
    --fs-8: var(--type-xs);
  }

  main {
    margin: 10px 8px;
    margin-bottom: 60px;
  }

  .sidebar,
  article {
    padding: 12px;
    border-radius: 16px;
  }

  .article-title {
    font-size: var(--fs-2);
    padding-bottom: 10px;
  }

  .h2 {
    font-size: var(--type-xl);
  }

  .h3 {
    font-size: var(--type-base);
  }

  .h4 {
    font-size: var(--type-sm);
  }

  /* Sidebar adjustments */
  .sidebar-info {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* Ensure avatar is perfectly centered on small screens */
  .avatar-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .avatar-box img {
    width: 100% !important;
    height: 100% !important;
  }

  .info-content .name {
    font-size: var(--type-base);
    text-align: center;
  }

  .info-content .title {
    font-size: var(--type-xs);
    padding: 3px 10px;
  }

  /* Contact info */
  .contact-item {
    padding: 10px;
  }

  .contact-title {
    font-size: var(--type-xs);
  }

  .contact-info {
    font-size: var(--type-xs);
  }

  /* Navigation */
  .navbar {
    padding: 0 8px;
  }

  .navbar-list {
    gap: 8px;
    padding: 0 8px;
  }

  .navbar-link {
    font-size: var(--type-xs);
    padding: 12px 10px;
  }

  /* Filter buttons */

  /* Cards and content */
  .content-card {
    padding: 12px;
    padding-top: 35px;
  }

  /* Form inputs */

  /* Icon boxes */
  .icon-box {
    width: 24px;
    height: 24px;
    font-size: var(--type-sm);
  }

  /* Scrollbar adjustments */

  /* Achievement cards */
  .achievement-card {
    padding: 12px;
  }

  .award-ribbon {
    font-size: var(--type-xs);
    padding: 5px 9px;
  }

  .card-content {
    padding: 8px;
  }

  .card-title {
    font-size: var(--type-xs);
  }

  .card-subtitle {
    font-size: var(--type-xs);
  }

  .card-date,
  .card-location {
    font-size: var(--type-xs);
    line-height: var(--lh-tight);
  }
}

/* Small devices (phones, 480px to 579px) */
@media (max-width: 579px) {
  .sidebar {
    margin-bottom: 10px;
  }

  .sidebar-info {
    gap: 12px;
  }

  /* Social links */
  .social-list {
    gap: 12px;
  }

  .social-item {
    padding: 8px;
  }

  /* Timeline adjustments */
  .timeline-list {
    margin-left: 25px;
  }

  .timeline-item:not(:last-child) {
    margin-bottom: 15px;
  }

  .timeline-text {
    font-size: var(--type-xs);
  }

  /* Service items */
  .service-item {
    padding: 15px;
    gap: 12px;
  }

  .service-icon-box {
    width: 45px;
    height: 45px;
  }

  .service-content-box {
    gap: 8px;
  }

  .service-item-title {
    font-size: var(--type-xs);
  }

  .service-item-text {
    font-size: var(--type-xs);
  }

  /* Project cards */
  .project-item {
    min-height: 200px;
  }

  .project-img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .project-title {
    font-size: var(--type-xs);
  }

  .project-category {
    font-size: var(--type-xs);
  }

  /* Modal adjustments */

  /* Year accordion */
  .year-header {
    padding: 12px 15px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .year-title {
    font-size: var(--type-base);
    line-height: var(--lh-tight);
  }

  .award-count {
    font-size: var(--type-xs);
    padding: 3px 8px;
  }

  .toggle-icon {
    font-size: var(--type-xs);
  }

  .year-content {
    padding: 12px;
  }

  .achievements-list {
    gap: 12px;
  }
}

/* Responsive Styles for Service and Skills Section */
@media (min-width: 580px) {
  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .project-list {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .year-header {
    padding: 18px 25px;
  }
}

@media (min-width: 768px) {
  .service-item {
    flex-direction: row;
  }

  .service-icon-box {
    width: 70px;
    height: 70px;
  }

  .service-icon {
    font-size: 3rem;
  }

  /* Keep avatar on top for desktop view */
  .sidebar-info {
    flex-direction: column;
  }

  .avatar-box {
    width: 120px;
    height: 120px;
  }
}

@media (min-width: 1024px) {
  .service-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* Responsive styles for year accordion */
@media (max-width: 580px) {
  .year-header {
    padding: 15px 20px;
  }

  .year-title {
    font-size: var(--fs-2);
  }

  .award-count {
    font-size: var(--fs-8);
    padding: 4px 10px;
  }

  .year-content.active {
    padding: 20px;
  }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 767px) {

  /* Larger touch targets */
  button,
  a,
  .navbar-link,
  .info_more-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Better spacing for touch */
  .navbar-list {
    gap: 4px;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }

  main {
    overflow-x: hidden;
  }

  /* Adjust container widths */
  .sidebar,
  article {
    max-width: 100%;
    width: 100%;
  }

  /* Better text wrapping */
  .name,
  .title,
  .h2,
  .h3,
  .h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Improve readability */
  p,
  .timeline-text,
  .service-item-text {
    line-height: var(--lh-relaxed);
  }

  /* Stack elements vertically */

  /* Full width buttons */
}

/* Performance improvements */
.avatar-box,
.project-img {
  contain: layout style paint;
}

/* Preload critical images */
/* removed invalid rule */

/* Responsive image containers */
.responsive-img-container {
  position: relative;
  overflow: hidden;
}

.responsive-img-container::before {
  content: '';
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
}

.responsive-img-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Progressive image enhancement */
.progressive-img {
  filter: blur(0px);
  transition: filter 0.3s ease;
}

.progressive-img.loading {
  filter: blur(2px);
}

/* ===== ADDITIONAL MOBILE RESPONSIVE IMPROVEMENTS ===== */

/* Timeline mobile improvements */
@media (max-width: 767px) {
  .timeline-list {
    margin-left: 20px;
  }

  .timeline-item::after {
    left: -26px;
  }

  .timeline-item:not(:last-child)::before {
    left: -20px;
  }

  .timeline-text {
    font-size: var(--type-xs);
    line-height: var(--lh-relaxed);
  }

  .timeline-list span {
    font-size: var(--type-xs);
  }
}

@media (max-width: 479px) {
  .timeline-list {
    margin-left: 15px;
  }

  .timeline-item::after {
    left: -21px;
    width: 8px;
    height: 8px;
  }

  .timeline-item:not(:last-child)::before {
    left: -17px;
    width: 1px;
  }

  .timeline-text {
    font-size: var(--type-xs);
  }
}

/* Skills section mobile improvements */
@media (max-width: 767px) {

  .skill-progress-fill {
    height: 6px;
  }
}

/* Testimonials mobile improvements */

/* Certifications mobile improvements */

/* Chatbot mobile improvements */
@media (max-width: 767px) {
  .chatbox {
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    max-height: 70vh;
    bottom: 80px;
    right: 10px;
  }

  .chatbox-header {
    padding: 12px 15px;
  }

  .chatbox-header h3 {
    font-size: var(--type-sm);
  }

  .chatbox-messages {
    padding: 12px;
    max-height: calc(70vh - 140px);
  }

  .message {
    padding: 10px 12px;
    font-size: var(--type-xs);
    max-width: 85%;
  }

  .chatbox-input {
    padding: 10px 12px;
    font-size: var(--type-xs);
  }
}

@media (max-width: 479px) {
  .chatbox {
    width: calc(100% - 16px);
    max-width: calc(100vw - 16px);
    max-height: 65vh;
    bottom: 75px;
    right: 8px;
  }

  .chatbox-header {
    padding: 10px 12px;
  }

  .chatbox-header h3 {
    font-size: var(--type-xs);
  }

  .message {
    padding: 8px 10px;
    font-size: var(--type-xs);
    max-width: 90%;
  }

  .chatbox-input {
    padding: 8px 10px;
    font-size: var(--type-xs);
  }
}

/* Map and contact form mobile improvements */

/* Particle background mobile optimization */
@media (max-width: 767px) {
  #particle-background {
    opacity: 0.5;
  }
}

@media (max-width: 479px) {
  #particle-background {
    opacity: 0.3;
  }
}

/* Better spacing for mobile landscape */
@media (max-width: 767px) and (orientation: landscape) {
  .sidebar {
    max-height: none;
  }

  .sidebar.active {
    max-height: none;
  }

  main {
    margin: 8px 10px;
  }

  .navbar {
    padding: 0 10px;
  }

  .navbar-list {
    padding: 0 5px;
    gap: 5px;
  }

  .navbar-link {
    padding: 10px 8px;
  }
}

/* Improve touch target sizes for accessibility */
@media (max-width: 767px) {

  a,
  button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .icon-box {
    min-width: 44px;
    min-height: 44px;
  }

  .navbar-link {
    padding: 14px 12px;
  }
}

/* Prevent zoom on input focus for iOS */
@media (max-width: 767px) {

  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px !important;
  }
}

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .navbar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  main {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Optimize animations for mobile performance */
@media (max-width: 767px) {

  .sidebar,
  article,
  .achievement-card,
  .project-item {
    will-change: auto;
  }
}

/* Respect reduced motion: disable/slow animations when requested */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Slow down shimmer effects on very small screens */
@media (max-width: 479px) {

  .shimmer,
  .shimmer-overlay {
    animation-duration: 2.5s !important;
  }
}

/* Print styles for mobile */
@media print {

  .navbar,
  .chatbox,
  .info_more-btn,
  #particle-background {
    display: none !important;
  }

  main {
    margin: 0;
  }

  .sidebar {
    max-height: none !important;
  }

  article {
    page-break-inside: avoid;
  }
}

/* Tech Stack (Interactive) */
.tech-stack-section {
  margin: 30px 0 10px;
}

.tech-stack-title {
  margin-bottom: 16px;
}

.stack-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  overflow: visible;
  /* ensure child glows can extend beyond */
}

.filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  /* allow glow to extend vertically */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  /* Firefox */
  padding-block: 6px;
  /* avoid vertical clipping at edges */
  padding-inline: 12px;
  /* give horizontal room so glow isn't clipped by scrollport */
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  color: var(--white-2);
  font-size: var(--type-xs);
  transition: background var(--duration-2) var(--ease-standard), transform var(--duration-2) var(--ease-standard), box-shadow var(--duration-2) var(--ease-standard);
  box-shadow: var(--elevation-1);
  scroll-snap-align: start;
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.chip.active {
  background: var(--bg-gradient-jet);
  border-color: rgba(255, 219, 112, 0.4);
  color: var(--orange-yellow-crayola);
  box-shadow: none;
  filter: none;
  z-index: 2;
  /* sit above neighbors while active */
}

.chip {
  position: relative;
  z-index: 1;
}

.chip:focus-visible {
  outline: 2px solid #ffdb70;
  outline-offset: 2px;
}

.filter-chips::-webkit-scrollbar {
  height: 6px;
}

.filter-chips::-webkit-scrollbar-thumb {
  background: var(--jet);
  border-radius: 6px;
}

.stack-search-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.stack-search {
  width: min(240px, 100%);
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  color: var(--white-2);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* Reserve space before TechStack JS renders items to avoid layout shifts. */
.stack-grid:not(.is-ready) {
  min-height: 320px;
}

.stack-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: var(--elevation-1);
  /* allow hover glow and focus ring to extend beyond bounds */
  overflow: visible;
  transition: transform var(--duration-2) var(--ease-standard), box-shadow var(--duration-2) var(--ease-standard);
}

.stack-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.stack-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), hsla(45, 100%, 72%, 0.08), transparent 50%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity var(--duration-3) var(--ease-standard);
}

.stack-item:hover,
.stack-item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35),
    0 8px 24px rgba(255, 215, 0, 0.18),
    0 0 16px rgba(255, 215, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.4);
}

.stack-item:hover::after {
  opacity: 1;
}

.stack-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--border-gradient-onyx);
  font-size: 1.3rem;
  color: var(--white-2);
  transition: color 0.25s ease, transform 0.25s ease;
}

.stack-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.stack-icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.stack-icon ion-icon {
  font-size: 1.3rem;
  color: currentColor;
}

.stack-item:hover .stack-icon,
.stack-item:focus-within .stack-icon {
  color: var(--orange-yellow-crayola);
  transform: scale(1.08);
}

.stack-name {
  font-size: var(--type-sm);
  color: var(--white-2);
  font-weight: var(--fw-500);
}

.stack-category {
  font-size: var(--type-xs);
  color: var(--text-muted);
}

@media (min-width: 540px) {
  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stack-grid:not(.is-ready) {
    min-height: 240px;
  }
}

@media (max-width: 767px) {
  /* Hide extra chips, keep only "All" and search on row */
  .filter-chips .chip:not([data-chip="all"]) {
    display: none;
  }

  .stack-controls {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .filter-chips {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow: visible;
    justify-content: flex-start;
    padding-inline: 0;
  }

  .stack-search-wrapper {
    flex: 1;
    justify-content: flex-end;
  }

  .stack-search {
    width: 100%;
  }

  .chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Gold glow hover for Projects (match timeline-content aesthetic) */
article.projects ul.project-list li.project-item:hover,
article.projects ul.project-list li.project-item:focus-within {
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35),
    0 8px 24px rgba(255, 215, 0, 0.18),
    0 0 16px rgba(255, 215, 0, 0.35);
  border-color: rgba(255, 215, 0, 0.4);
}

.filter-chips {
  -ms-overflow-style: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

/* See All toggle (visible on all viewports) */
.stack-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 24px;
  align-self: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--border-gradient-onyx);
  border: 1px solid var(--color-border);
  color: var(--white-2);
  box-shadow: var(--elevation-1);
}

.stack-toggle[aria-expanded="true"] {
  color: var(--orange-yellow-crayola);
  border-color: rgba(255, 219, 112, 0.4);
}

@media (max-width: 767px) {
  .stack-toggle {
    align-self: center;
  }
}

/* =========================================
   WOW FACTOR & OPTIMIZATION ADDITIONS
   ========================================= */

/* --- Custom Cursor --- */
@media (pointer: fine) {
  body {
    cursor: none;
  }

  a,
  button,
  input,
  textarea,
  .clickable {
    cursor: none;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--orange-yellow-crayola);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
  mix-blend-mode: difference;
  will-change: transform;
}

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--orange-yellow-crayola);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.custom-cursor.hovered {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 219, 112, 0.1);
  border-color: transparent;
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
}

.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* --- Responsive Layout Adjustments --- */
@media (min-width: 1250px) {

  /* Desktop Layout: Sidebar + Main Content Side-by-Side */
  main {
    max-width: 95%;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
  }

  .sidebar {
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 120px);
    height: 100%;
    margin-bottom: 0;
    padding-top: 60px;
    z-index: 1;
    width: 300px;
    min-width: 300px;
    flex-shrink: 0;
  }

  .main-content {
    flex-grow: 1;
    width: auto;
    min-width: 0;
    margin: 0;
  }
}

@media (min-width: 1024px) and (max-width: 1249px) {
  main {
    max-width: 95%;
    margin-inline: auto;
    display: flex;
    gap: 25px;
  }

  .sidebar {
    position: sticky;
    top: 60px;
    width: 250px;
    min-width: 250px;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .main-content {
    flex: 1;
    min-width: 0;
    width: auto;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  article {
    width: auto;
    max-width: 100%;
    min-width: 0;
    padding-top: 74px;
  }

  .navbar {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    bottom: auto;
    width: max-content;
    margin: 0;
  }

  .contacts-list {
    justify-items: stretch;
  }

  .contact-item {
    justify-content: flex-start;
  }

  .contact-info {
    width: auto;
    max-width: 100%;
    min-width: 0;
  }

  .contact-info .contact-link:not(.resume) {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: clamp(12px, 1.1vw, var(--fs-7));
    line-height: 1.2;
  }

  .contacts-list>.contact-item:first-child {
    justify-content: center;
  }

  .contacts-list .resume {
    display: block;
    width: 100%;
    text-align: center;
  }

  .social-list {
    justify-content: center;
    gap: 10px;
    padding-inline: 0;
  }

  .social-item .social-link {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
}

@media (max-width: 1023px) {

  /* Tablet/Mobile Stacked Layout */
  main {
    display: block;
    margin-inline: 16px;
  }

  .sidebar {
    margin-bottom: 30px;
    position: static;
  }
}

/* Optimize animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .custom-cursor,
  .custom-cursor-dot {
    display: none;
  }

  body {
    cursor: auto;
  }
}

/* Modal Grid Layouts */
.feature-grid,
.tech-design-grid,
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.feature-column,
.tech-column {
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 12px;
  padding: 20px;
  height: 100%;
}

.feature-column h5,
.tech-column h4 {
  color: var(--orange-yellow-crayola);
  margin-bottom: 15px;
  font-size: var(--fs-5);
}

.usage-card {
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.usage-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
  border-color: var(--orange-yellow-crayola);
}

.usage-card h5 {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-5);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--jet);
  padding-bottom: 8px;
}

.usage-card p em {
  color: var(--light-gray);
  font-style: normal;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

/* Ensure lists inside cards are compact */
.feature-column ul,
.tech-column ul,
.usage-card ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.usage-card ul li {
  margin-bottom: 5px;
  font-size: var(--fs-6);
}
