/* ==========================================================================
   RESET & VARIABLES
   ========================================================================== */
:root {
  --bg-color: #111111; /* Softer dark for a more premium look */
  --text-primary: #ffffff;
  --text-secondary: #999999;
  --accent-red: #E54D2E;
  
  --font-heading: 'General Sans', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   NAVIGATION (PREMIUM)
   ========================================================================== */
.premium-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  margin-inline: auto;
  display: flex;
  justify-content: center;
  gap: 0;
  align-items: center;
  padding: 32px 5vw;
  z-index: 1000;
  color: #000;
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
  border-radius: 0px;
  transition:
    padding 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    margin 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    top 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    gap 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    color 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.premium-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(17, 17, 17, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: -2;
}

.premium-nav > * {
  pointer-events: auto;
}

.premium-nav .nav-left {
  flex-grow: 1;
  flex-basis: 0%;
  display: flex;
  justify-content: flex-start;
  white-space: nowrap;
  transition:
    flex-grow 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    flex-basis 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    font-size 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    letter-spacing 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.premium-nav .nav-right {
  flex-grow: 1;
  flex-basis: 0%;
  display: flex;
  justify-content: flex-end;
  white-space: nowrap;
  transition:
    flex-grow 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    flex-basis 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── GLASSMORPHISM FLOATING NAV STATE ── */
.premium-nav.nav-glass {
  top: 16px;
  max-width: 960px;
  padding: 14px 44px;
  justify-content: center;
  gap: 2rem;
  border-radius: 60px;
  pointer-events: auto;
  color: #fff;
}

.premium-nav.nav-glass::before {
  opacity: 1;
}





.premium-nav.nav-glass .nav-left {
  flex-grow: 0;
  flex-basis: 150px;
}

.premium-nav.nav-glass .nav-right {
  flex-grow: 0;
  flex-basis: 90px;
}

/* Subtle shimmer highlight on the glass bar */
.premium-nav.nav-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.03) 100%
  );
  pointer-events: none;
  z-index: -1;
}

/* Links breathe in glass mode */
.premium-nav.nav-glass .nav-center {
  gap: 1.8rem;
}

.premium-nav.nav-glass .nav-center a,
.premium-nav.nav-glass .nav-right a,
.premium-nav.nav-glass .nav-left {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.nav-center {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-center a,
.nav-right a {
  position: relative;
  text-transform: capitalize;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition:
    font-size 12s cubic-bezier(0.16, 1, 0.3, 1),
    letter-spacing 12s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-center a::after,
.nav-right a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-center a:hover::after,
.nav-right a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-hamburger {
  display: none;
}

/* ==========================================================================
   HERO SECTION (WHITE BACKGROUND, TEXT INVERSION)
   ========================================================================== */
.hero-premium {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff; /* Pure white for perfect black text inversion */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Dot-field interactive background layer */
#dot-field-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
}

.hero-socials {
  position: absolute;
  left: 5vw;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
  color: #000;
}

.hero-socials a {
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.3s;
  color: #000 !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}
.hero-socials a:hover { opacity: 0.6 !important; }

.hero-socials a svg {
  stroke: currentColor !important;
  opacity: 1 !important;
}

.hero-roles {
  position: absolute;
  right: 5vw;
  bottom: 40px;
  text-align: right;
  z-index: 10;
  mix-blend-mode: difference;
  color: #fff;
  font-size: 1.5vw;
  line-height: 1.3;
}

.hero-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-pfp {
  position: absolute;
  height: 110vh; /* Enlarged image */
  max-width: 100%;
  object-fit: cover; /* Ensures it scales nicely */
  z-index: 1;
  filter: grayscale(100%) contrast(1.3) brightness(0.85); /* Deepened blacks for purer white text inversion */
  /* will-change moved to JS to prevent NO_LCP error */
}

.hero-title {
  position: absolute;
  z-index: 2;
  font-size: clamp(4rem, 12vw, 12rem); /* Fluid clamp */
  letter-spacing: -0.05em;
  white-space: nowrap; /* Keep on one line */
  text-align: center;
  line-height: 0.9;
  color: #ffffff;
  mix-blend-mode: difference;
  overflow: visible; /* Text bleeds safely */
  /* LCP: keep visible by default so Lighthouse can record it before JS runs */
  opacity: 1;
}

/* ==========================================================================
   GENERAL SECTIONS & DARK THEME
   ========================================================================== */
section {
  padding-block: 5rem;
  margin-top: 0;
  max-width: 1200px;
  margin-inline: auto;
}

#about {
  padding-bottom: 1.5rem;
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: 32px; /* Reduced gap */
  position: relative;
}

section h2, section h3 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 900px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.section-desc {
  font-size: 1.4rem;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.6;
}

.highlight-text {
  color: var(--accent-red);
}

/* ==========================================================================
   ABOUT TEXT — LETTER-BY-LETTER SCROLL FILL
   ========================================================================== */

/* Hide the paragraph's own colour; chars handle it */
.large-intro-text {
  color: transparent;
  opacity: 1 !important;  /* prevent GSAP reveal-block from hiding it */
  transform: none !important;
}

/* Every character is a span — dim by default */
.char {
  display: inline;
  color: rgba(255, 255, 255, 0.12);
  transition: color 0.18s ease;
  white-space: pre-wrap;
}

/* Regular text: light up to white */
.char.char--lit {
  color: #ffffff;
}

/* Keyword chars: light up to accent red */
.char.char--key {
  color: rgba(229, 77, 46, 0.18);
}
.char.char--key.char--lit {
  color: #E54D2E;
}

/* ==========================================================================
   PROJECTS / LISTS
   ========================================================================== */
.projects, .clubs-list, .events-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

/* GSAP Card Pile Container */
.card-pile-container {
  display: grid !important;
  align-items: start;
  max-width: 700px; /* Resize so enough space is there on left and right */
  margin: -40px auto 0 !important; /* Center the stack and pull it UP */
}
.card-pile-container > .card,
.card-pile-container > .split-card {
  grid-area: 1 / 1;
  width: 100%;
  transform-origin: center center;
  will-change: transform, opacity;
  margin: 0 !important; /* prevent flex gaps from applying */
}


/* Elevated card layouts with subtle borders */
.card, .club-item, .event-item, .timeline-item, .jtl-card {
  display: flex;
  flex-direction: column;
  padding: 40px;
  background-color: #1a1a1a;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s;
}

/* ── EXPERIENCE CARD: Horizontal layout (text left, image right) ── */
.exp-card-layout {
  flex-direction: row !important;
  align-items: center;
  gap: 28px;
  padding: 28px 32px !important;
}

.exp-card-text {
  flex: 1;
  min-width: 0;
}

.exp-card-image {
  flex: 0 0 200px;
  width: 200px;
}


.card:hover, .jtl-card:hover { background-color: #222222; }

.card-header h4, .jtl-title {
  font-size: 2rem;
  margin-bottom: 12px;
  font-family: var(--font-heading);
}

.card p, .jtl-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 800px;
  margin-bottom: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 6px 16px;
  border-radius: 40px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.card-link, .minimal-link {
  color: var(--accent-red);
  text-decoration: none;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}
.card-link:hover, .minimal-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.skill-category h4 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.skill-category p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.1rem;
}

/* ==========================================================================
   3D COVERFLOW CAROUSELS
   ========================================================================== */
.carousel-container {
  position: relative;
  width: 100%;
  margin: 20px 0; /* Reduced to remove blank spaces */
  overflow: hidden;
  padding: 20px 0;
}

.carousel-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Center the items using padding based on approx viewport width vs item width */
  padding: 0 calc(50vw - 160px); 
}
.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 40px;
  align-items: center;
  width: max-content;
  perspective: 1200px; /* 3D perspective applied on track */
}

/* Base Card Style for 3D Carousel */
.jtl-card {
  flex: 0 0 320px;
  height: 450px;
  scroll-snap-align: center;
  transform-style: preserve-3d;
  will-change: transform;
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  
  background-color: #1a1a1a;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  
  /* Reset transition for JS control */
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}

/* Hover effects for carousel cards */
.jtl-card:hover {
  box-shadow: 0 30px 60px rgba(229, 77, 46, 0.1);
  border-color: rgba(229, 77, 46, 0.3);
}

.jtl-card-inner {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.jtl-year {
  color: var(--accent-red);
  font-weight: bold;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.cert-card {
  position: relative;
  width: 260px;
  height: 380px;
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.cert-card:hover {
  transform: translateY(-10px);
}

.cert-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.cert-card:hover .cert-thumb {
  opacity: 1;
  transform: scale(1.03);
}

.cert-title-box {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  color: #fff;
  font-weight: 500;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}


/* ==========================================================================
   MAGNETIC RIPPLE BUTTONS
   ========================================================================== */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  overflow: hidden;
  transition: border-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.carousel-nav-btn.prev { left: 40px; }
.carousel-nav-btn.next { right: 40px; }
.carousel-nav-btn:hover { border-color: var(--accent-red); }

.carousel-nav-btn::before {
  content: '';
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 0;
  height: 0;
  background: var(--accent-red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.carousel-nav-btn:hover::before {
  width: 150px;
  height: 150px;
}

.carousel-nav-btn span {
  position: relative;
  z-index: 2;
  font-weight: 300;
}

/* ==========================================================================
   IMAGE 1 & 2: TYPOGRAPHY AND SPLIT LAYOUTS
   ========================================================================== */
.large-intro-text {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 500;
  max-width: 1000px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.split-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  padding: 0 !important;
  overflow: hidden;
}

.split-card-content {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
}

.split-card-image {
  flex: 1;
  background-color: #0d0d0d;
  border-left: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 20px 20px 0;
  transform: translateZ(0);
}

.project-number-fill {
  position: absolute;
  top: 30px;
  left: 30px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

.project-preview-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
  border-radius: inherit;
}

.split-card:hover .project-preview-img {
  opacity: 0.95;
  transform: scale(1.05);
}

/* ==========================================================================
   LISTS & ACCORDIONS (IMAGE 1 STYLE)
   ========================================================================== */
.event-dropdown, .club-dropdown {
  width: 100%;
  background-color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  text-align: left;
  margin-bottom: 0.5rem;
}
.event-dropdown:hover, .club-dropdown:hover {
  background-color: #222222;
  border-color: rgba(255, 255, 255, 0.2);
}
.dropdown-arrow {
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease;
}
.active > .dropdown-arrow {
  transform: rotate(180deg);
}

.event-content, .club-content {
  display: none;
  padding: 1rem 1.25rem;
}
.event-item.active .event-content, .club-item.active .club-content {
  display: block;
}

.stats-strip {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 24px;
}

/* TESTIMONIALS & QUOTES — CARD SWAP */
.testimonials-section {
  padding: 30px 0;
  overflow: visible;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.testimonials-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 340px;
  position: relative;
  overflow: visible;
  width: 100%;
}

.card-swap-container {
  position: relative;
  perspective: 1200px;
  overflow: visible;
}

.card-swap-container .card {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(22, 22, 28, 0.95), rgba(14, 14, 18, 0.98));
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
  cursor: default;
  transition: none !important;
}

.card-swap-container .card .quote-text {
  font-size: 1.2rem;
  line-height: 1.7;
  color: rgba(240, 240, 245, 0.92);
  font-family: 'Space Grotesk', sans-serif;
  font-style: italic;
  margin: 0 0 24px 0;
  letter-spacing: -0.01em;
}

.card-swap-container .card .quote-source {
  font-size: 0.85rem;
  color: #E8562A;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

@media (max-width: 768px) {
  .testimonials-wrapper {
    height: 300px;
  }
  .card-swap-container .card {
    padding: 24px 28px;
  }
  .card-swap-container .card .quote-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 16px;
  }
  .card-swap-container .card .quote-source {
    font-size: 0.8rem;
  }
  .card-swap-nav {
    padding-inline: 15px;
  }
  .card-swap-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .testimonials-section {
    padding: 24px 0 16px;
    overflow: hidden;
  }

  .testimonials-wrapper {
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    padding: 0;
  }

  .card-swap-container {
    width: calc(100vw - 40px);
    height: auto;
    perspective: none;
    overflow: hidden;
    border-radius: 16px;
  }

  .card-swap-container .card {
    position: relative;
    top: auto;
    left: auto;
    width: 100% !important;
    height: auto !important;
    padding: 28px 24px;
    border-radius: 16px;
    transform: none !important;
    opacity: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(145deg, rgba(22, 22, 28, 0.95), rgba(14, 14, 18, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    animation: none !important;
  }

  .card-swap-container .card.mobile-active {
    display: flex;
    animation: quoteSlideIn 0.45s cubic-bezier(0.23, 1, 0.32, 1) both;
  }

  .card-swap-container .card .quote-text {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 14px;
    color: rgba(240, 240, 245, 0.9);
  }

  .card-swap-container .card .quote-source {
    font-size: 0.72rem;
    letter-spacing: 1.2px;
  }

  /* Dot indicators */
  .card-swap-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
  }

  .card-swap-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .card-swap-dot.active {
    width: 20px;
    border-radius: 3px;
    background: #E8562A;
  }

  /* Nav buttons below card */
  .card-swap-nav {
    position: static;
    transform: none;
    max-width: none;
    width: auto;
    gap: 12px;
    justify-content: center;
    padding: 0;
  }

  .card-swap-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

@keyframes quoteSlideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card-swap-dots {
  display: none;
}

.card-swap-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 760px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
  box-sizing: border-box;
  padding-inline: 20px;
}

.card-swap-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 22, 28, 0.8);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  line-height: 1;
}

.card-swap-btn:hover {
  border-color: #E8562A;
  color: #E8562A;
  background: rgba(232, 86, 42, 0.15);
  box-shadow: 0 0 20px rgba(232, 86, 42, 0.25);
}

.card-swap-btn:active {
  transform: scale(0.92);
}

@media (max-width: 768px) {
  .card-swap-nav {
    max-width: 600px;
    padding-inline: 16px;
  }
  .card-swap-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .card-swap-nav {
    position: static;
    transform: none;
    max-width: none;
    padding-inline: 0;
  }
  .card-swap-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

.event-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.event-list-item:last-child {
  border-bottom: none;
}
.event-name {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin: 0;
}
.event-result {
  font-size: 0.8rem;
  color: #E8562A;
  letter-spacing: 0.03em;
  font-weight: 500;
}

.bg-light {
  background-color: transparent !important;
  color: inherit !important;
}

/* Certificates and Languages Grid Wrapper */
.certs-languages-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2rem 0;
  max-width: 700px;
}

.cert-list,
.language-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cert-list-heading,
.language-list-heading {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1rem;
}

.cert-list li,
.language-list li {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Reference Polish Styles */
.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.nav-center a:hover,
.nav-right a:hover {
  color: #E8562A;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.1);
  margin-left: 20px;
  padding-left: 40px;
  gap: 40px;
}
.timeline-item {
  position: relative;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -46px;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: var(--accent-red);
}
.timeline-item h4 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.timeline-item .meta {
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .split-card {
    flex-direction: column !important;
  }
  .split-card-image {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.05);
    min-height: 300px;
  }
  .large-intro-text {
    font-size: 2.5rem;
  }
}

/* Helper for GSAP */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
}

/* Typewriter blinking cursor — follows the active writing line */
.scramble-line1.typing-active::after,
.scramble-line2.typing-active::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  color: inherit;
  font-weight: 300;
  animation: cursor-blink 0.65s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 22vw; }
  .hero-roles { font-size: 4vw; }
  section h2, section h3 { font-size: 2.8rem; }
  .premium-nav { padding: 24px 5vw; }
  .hero-socials { display: none; }
  .card { padding: 32px 24px; }
}

/* ===== CERTIFICATE CAROUSEL SECTION ===== */
.cert-carousel-section {
  position: relative;
  padding-block: 6rem;
  background: transparent;
}

.cert-carousel-header {
  text-align: center;
  margin-bottom: 4rem;
  padding-inline: 2rem;
}

.fan-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E8562A;
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.fan-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  color: #fff;
  margin: 0 auto 1rem;
  max-width: 900px;
  line-height: 1.1;
}

.fan-title em {
  font-style: italic;
  color: #E8562A;
}

.fan-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.45);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Viewport & Track ---- */
.cert-carousel-stage {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Glow/fade effect at both ends of the carousel */
.cert-carousel-stage::before,
.cert-carousel-stage::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15vw;
  min-width: 150px;
  z-index: 10;
  pointer-events: none;
}

.cert-carousel-stage::before {
  left: 0;
  background: linear-gradient(to right, rgba(17, 17, 17, 1) 0%, rgba(17, 17, 17, 0) 100%);
}

.cert-carousel-stage::after {
  right: 0;
  background: linear-gradient(to left, rgba(17, 17, 17, 1) 0%, rgba(17, 17, 17, 0) 100%);
}

.cert-viewport {
  overflow-x: scroll;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Extra padding so rotated edge cards aren't clipped */
  padding-block: 80px;
  cursor: grab;
  user-select: none;
}

.cert-viewport:active { cursor: grabbing; }
.cert-viewport::-webkit-scrollbar { display: none; }

.cert-track {
  display: flex;
  gap: 28px;
  align-items: center;
  /* left/right padding = half viewport so first/last card centers */
  padding-inline: calc(50vw - 120px);
  width: max-content;
}

/* ---- Cards ---- */
.cert-card {
  flex-shrink: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  will-change: transform;
  cursor: pointer;
  transform-style: preserve-3d;
  /* smooth transition when NOT scrolling (keyboard nav etc.) */
  transition: transform 0.08s linear, filter 0.3s ease;
}

.cert-card-inner {
  width: 100%;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
}

.cert-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cert-card-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-card-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: #E8562A;
  letter-spacing: 0.05em;
}

.cert-card-name {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Navigation dots */
.fan-dots {
  display: flex;
  gap: 8px;
  margin-top: 2rem;
  justify-content: center;
}

.fan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

.fan-dot.is-active {
  background: #E8562A;
  transform: scale(1.4);
}

/* Drag hint */
.fan-drag-hint {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  margin-top: 1rem;
  text-transform: uppercase;
  animation: hintPulse 3s ease infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* FEATURE 3 — MAGNETIC BUTTON EFFECT */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

/* FEATURE 4 — 3D CARD TILT ON HOVER */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
  will-change: transform;
}

.tilt-card:hover {
  transition: transform 0s, box-shadow 0.3s ease;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Shine layer inside card */
.tilt-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255,255,255,0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.tilt-card:hover .tilt-shine {
  opacity: 1;
}

/* FEATURE 5 — SMOOTH CUSTOM CURSOR */
.cursor-dot {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  mix-blend-mode: difference;
  width: 16px;
  height: 16px;
  background: #ffffff;
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}

/* Expand dot on hoverable elements */
body.cursor-hover .cursor-dot {
  width: 40px;
  height: 40px;
  background: rgba(232, 86, 42, 0.9);
}

/* ==========================================================================
   JOURNEY TIMELINE NEW DESIGN
   ========================================================================== */
.journey-timeline-container {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    margin-top: 40px;
}

.journey-timeline-viewport {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0 calc(5vw);
}
.journey-timeline-viewport::-webkit-scrollbar {
    display: none;
}

.journey-timeline-track {
    display: flex;
    width: max-content;
    min-width: 100%;
}

.journey-column {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.journey-year-container {
    padding: 0 30px 20px 30px;
}

.journey-year {
    font-size: 2.8rem;
    font-weight: 300;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.journey-content {
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
    padding: 40px 30px;
    flex-grow: 1;
    min-height: 300px;
}

.journey-content.bg-alt {
    background-color: rgba(255, 255, 255, 0.02);
}

.journey-dot {
    position: absolute;
    top: -6px;
    left: 30px;
    width: 10px;
    height: 10px;
    background-color: var(--accent-red);
    border-radius: 50%;
}

.journey-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.journey-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.journey-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 1px;
    background-color: var(--text-secondary);
}

.journey-list li strong {
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.journey-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

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

.jtl-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.jtl-nav-btn:hover {
    border-color: var(--accent-red);
    background: rgba(229, 77, 46, 0.1);
}

@media (max-width: 768px) {
    .journey-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .journey-column {
        flex: 0 0 280px;
    }
}

/* ==========================================================================
   CTA / CONTACT SECTION
   ========================================================================== */
.cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 5vw;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.02));
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-content {
    max-width: 800px;
    margin-bottom: 60px;
}

.cta-heading {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.cta-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
    margin-inline: auto;
}

.cta-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 16px 32px;
    border-radius: 40px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.cta-btn:hover {
    border-color: var(--accent-red);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.1);
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    background: var(--accent-red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.cta-btn:hover::before {
    width: 320px;
    height: 320px;
}

.cta-btn span {
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* General premium buttons (magnetic + ripple) */
.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 40px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.05);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.btn:hover {
    border-color: var(--accent-red);
    box-shadow: 0 12px 25px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    background: var(--accent-red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.btn:hover::before {
    width: 320px;
    height: 320px;
}

.btn span {
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.cta-social-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 900px;
}

.social-pill {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.3s, background-color 0.3s, transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.social-pill:hover {
    border-color: var(--accent-red);
}

.social-pill::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    background: var(--accent-red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.social-pill:hover::before {
    width: 320px;
    height: 320px;
}

.social-pill svg {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.social-pill:hover svg {
    color: var(--text-primary);
}

.social-pill > * {
    position: relative;
    z-index: 2;
}

.profile-pill {
    background: #ffffff;
    color: #000000;
    padding: 6px 20px 6px 6px;
    border: none;
    transition: color 0.3s ease;
}

.profile-pill:hover {
    color: #ffffff;
}

.profile-pill img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #000;
}

/* ==========================================================================
   SCROLL CIRCLE
   ========================================================================== */
.scroll-circle-wrapper {
    position: absolute;
    bottom: 110px;
    right: 5vw;
    z-index: 10;
    color: #000000;
}

.scroll-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
}

.scroll-circle-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    pointer-events: none;
}

.scroll-circle-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    cursor: pointer;
}

.scroll-circle-asterisk {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.scroll-circle-asterisk:hover {
    transform: scale(1.35) rotate(45deg);
}

@media (max-width: 768px) {
    .scroll-circle-wrapper {
        bottom: 20px;
        right: 20px;
        transform: scale(0.7);
        transform-origin: bottom right;
    }
}

/* ==========================================================================
   SECTION BACKGROUND SCROLL CIRCLE
   ========================================================================== */
.section-bg-scroll-circle {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%) scale(3.5);
    z-index: 0;
    opacity: 0.05;
    color: var(--text-primary);
    pointer-events: none;
}

@media (max-width: 768px) {
    .section-bg-scroll-circle {
        display: none;
    }
}

.cert-scroll-circle {
    top: 30%;
    right: 5%;
    transform: translateY(-50%) scale(2);
    opacity: 0.15;
    z-index: 0;
}

/* ==========================================================================
   SCROLL-STACK SPACER SYSTEM
   ========================================================================== */

/* Wrapper that provides scroll "time" for each card */
.card-stack-spacer {
  position: relative;
}

/* Reset margins on stacked cards — spacing comes from spacer height */
.card-stack-spacer > .card,
.card-stack-spacer > .split-card,
.card-stack-spacer > .club-item,
.card-stack-spacer > .event-item {
  margin: 0 !important;
}

/* Stack card counter badge */
.stack-card-counter {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.72rem;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  z-index: 10;
  user-select: none;
}

/* Progress pip row shown at bottom of each stuck card */
.stack-pips {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
  pointer-events: none;
}

.stack-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.3s ease, transform 0.3s ease;
}

.stack-pip.active {
  background: #E8562A;
  transform: scale(1.5);
}

/* Smooth transition on the card's transform (separate from GSAP scrub) */
.card-stack-spacer > * {
  transition: box-shadow 0.4s ease;
}

/* .skill-category has no card background by default — give it one when stacked */
.card-stack-spacer > .skill-category {
  display:          flex;
  flex-direction:   column;
  padding:          40px;
  background-color: #1a1a1a;
  border-radius:    12px;
  border:           1px solid rgba(255, 255, 255, 0.05);
  transform-origin: center top;
  will-change:      transform, opacity, filter;
}

/* Skills grid switches to block (column) when JS applies stack layout */
#skills .skills-grid.stack-active {
  display: block;
}

/* ==========================================================================
   CARD PILE BUILD-UP
   ========================================================================== */

/* The cards container pulls into the heading area (JS sets negative marginTop).
   Overflow visible so the absolute-positioned pile shows beyond container bounds. */
.projects, .clubs-list, .events-list, .skills-grid {
  overflow: visible !important;
}

/* All pile cards are absolute — give them a visible drop-shadow when landing */
.projects > .card,
.clubs-list > .club-item,
.events-list > .event-item,
.skills-grid > .skill-category {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
}

/* Skill categories styled as cards when they're in the pile */
.skills-grid > .skill-category {
  padding:          40px;
  background-color: #1a1a1a;
  border-radius:    12px;
  border:           1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   FOOTER (STYLING RESET & MATCHING THEME)
   ========================================================================== */
.site-footer {
  width: 100%;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding: 50px 10%;
  background-color: #111111; /* Matches main theme background */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #f0f0f0;
}

.footer-inner a:hover {
  text-decoration: underline !important;
}

.footer-col-left {
  flex: 2;
  min-width: 280px;
}

.footer-col {
  flex: 1;
  min-width: 150px;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  background-color: #0a0a0a; /* Dark background, matching dark theme (no navy) */
  color: rgba(240, 240, 240, 0.5);
  font-size: 12px;
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #E8562A;
  border-color: #E8562A;
}

#back-to-top svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

#back-to-top:hover svg {
  transform: translateY(-2px);
}

/* ==========================================================================
   MOBILE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 768px) {
  /* 1 — CURSOR: COMPLETE REMOVAL ON MOBILE */
  #cursorDot { display: none !important; }
  * { cursor: auto !important; }
  a, button, [role="button"] { cursor: pointer !important; }

  /* 4 — 3D card tilt / shine (exclude pile cards so GSAP card-pile can animate them) */
  .tilt-shine { display: none !important; }
  .card:not(.card-pile-container > .card),
  .split-card:not(.card-pile-container > .split-card),
  .event-list-item {
    transform: none !important;
    perspective: none !important;
  }

  /* 2 — NAVIGATION: ENABLE MOBILE MENU */
  #mobile-nav-menu { display: flex !important; }
  .premium-nav .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  #mobile-nav-menu {
    position: fixed;
    inset: 0;
    background: #111111;
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 80px 20px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  #mobile-nav-menu.open {
    transform: translateX(0);
  }
  #mobile-nav-menu a {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
  }
  #mobile-nav-menu a.resume-link { color: #E8562A; }

  .nav-hamburger {
    position: fixed;
    top: 12px;
    right: 5vw;
    z-index: 1001;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    mix-blend-mode: difference;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px;
  }
  .nav-hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: #ffffff;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-hamburger.active span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-hamburger.active span:nth-child(2) { opacity: 0; }
  .nav-hamburger.active span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  /* 3 — HERO SECTION: MOBILE LAYOUT */
  .hero-premium {
    height: 100svh;
    overflow: hidden;
  }
  .hero-pfp {
    height: 110svh !important; /* Reduced to zoom out slightly on mobile */
    width: 99vw !important; /* Prevent Chrome from excluding it as a 100vwx110vh background */
    top: -5svh !important;
    left: 0 !important;
    right: 0 !important;
    object-position: top center;
    /* will-change moved to JS */
  }
  .hero-title {
    font-size: clamp(2.5rem, 17.5vw, 4.5rem);
    letter-spacing: -0.04em;
    text-align: center;
    width: 100vw;
    top: auto !important;
    bottom: 160px !important;
    z-index: 30 !important;
  }
  .hero-roles {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    text-align: center;
    font-size: clamp(0.75rem, 3.5vw, 1rem);
    white-space: nowrap;
  }
  .hero-socials {
    display: flex !important;
    flex-direction: row;
    gap: 20px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 52px;
    top: auto;
    z-index: 20 !important;
    mix-blend-mode: normal !important;
  }
  .hero-socials a { opacity: 1 !important; color: #ffffff !important; }
  .hero-socials a svg { width: 18px; height: 18px; }
  .scroll-circle-wrapper {
    transform-origin: bottom right;
    transform: scale(0.65);
    bottom: 80px;
    right: 4vw;
  }

  /* 4 — ABOUT SECTION: TYPOGRAPHY */
  .large-intro-text {
    font-size: clamp(1.6rem, 5.5vw, 2.2rem);
    line-height: 1.45;
    padding-inline: 0;
    margin-bottom: 0 !important;
  }

  /* 5 — CERTIFICATE CAROUSEL: MOBILE UX */
  .cert-viewport {
    padding-block: 40px;
    padding-inline: 0 !important;
  }
  .cert-track {
    padding-inline: calc(50vw - 70px) !important;
    gap: 16px !important;
  }
  .cert-card {
    width: 140px;
    height: auto !important;
    flex: 0 0 140px;
  }
  .cert-card-inner {
    height: 190px !important;
    border-radius: 12px;
  }
  .cert-card-name {
    font-size: 0.75rem !important;
    max-width: 130px !important;
  }
  .cert-card-num {
    font-size: 0.7rem !important;
  }

  /* 6 — JOURNEY TIMELINE: MOBILE TOUCH */
  .journey-header { gap: 16px; }
  .journey-col { flex: 0 0 280px; scroll-snap-align: start; }
  .journey-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  .journey-year { font-size: 2rem; }

  /* 7 — CARD PILE: GSAP PINNED DROP ANIMATION ON MOBILE */
  /* The screen pins and cards drop onto each other one-by-one, synced to scroll.
     JS (Feature 10) handles the pin + drop animation; CSS just needs to support the grid overlap. */

  /* Card-pile container: tighter sizing for mobile */
  .card-pile-container {
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* Cards inside the pile need full width and proper stacking */
  .card-pile-container > .card,
  .card-pile-container > .split-card {
    width: 100% !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  }

  /* Give skill-category cards the same card look as other stacked sections on mobile */
  .skills-grid .skill-category {
    background-color: #1a1a1a;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 28px 24px;
    margin-bottom: 16px;
  }
  /* Align card links to the left in Achievements, Projects, and Experience on mobile */
  .projects .card .minimal-link,
  .projects .card .card-link,
  .projects .split-card .card-link,
  .projects .split-card .minimal-link,
  .clubs-list .club-item a,
  .events-list .event-item a {
    justify-content: flex-start !important;
    min-width: auto !important;
    text-align: left !important;
  }

  /* Experience card: stack vertically on mobile */
  .exp-card-layout {
    flex-direction: column !important;
    padding: 24px 20px !important;
  }
  .exp-card-image {
    flex: unset;
    width: 100%;
  }

  /* 8 — SPLIT CARDS & PROJECTS: MOBILE LAYOUT */
  .split-card {
    border-radius: 12px;
    margin-block: 8px;
  }
  .split-card-content {
    padding: 20px 16px;
    gap: 12px;
  }
  .split-card-image {
    min-height: 100px;
    padding: 16px;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
    transform: translateZ(0);
  }
  .split-card-image .card-year-large {
    font-size: 6rem;
  }
  .tags { flex-wrap: wrap; gap: 6px; }
  .tag { font-size: 0.75rem; padding: 4px 10px; }
  .split-card-content .btn-row {
    flex-direction: column;
    gap: 10px;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 14px;
    min-height: 44px;
  }

  /* 9 — SECTION TYPOGRAPHY & SPACING: MOBILE SCALE */
  section {
    padding-block: 20px !important;
    padding-inline: 6vw !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #about {
    padding-bottom: 0 !important;
    margin-bottom: -60px !important;
  }
  #about .section-inner {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  #stats-strip {
    padding-top: 0 !important;
    margin-top: -180px !important; /* Absolute max pull up */
  }
  .hero-premium,
  .cert-carousel-section,
  .testimonials-section {
    padding-inline: 0 !important;
  }
  .premium-nav {
    padding: 12px 5vw !important;
    font-size: 13px !important;
    justify-content: space-between !important;
  }
  .premium-nav .nav-left {
    flex-grow: 0 !important;
    flex-basis: auto !important;
  }
  .premium-nav.nav-glass {
    padding: 10px 20px !important;
    max-width: 92vw !important;
    width: auto !important;
    top: 10px !important;
  }
  .nav-center,
  .nav-right {
    display: none !important;
  }
  .certs-languages-wrapper {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 1rem 0 !important;
  }
  .section-inner { gap: 16px; }
  .section-h3, h3, section h2, section h3 { font-size: clamp(2rem, 8vw, 2.5rem) !important; }
  .section-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }
  .cta-section { padding: 60px 5vw; }
  .cta-heading { font-size: clamp(2rem, 8vw, 3rem); }
  .cta-socials { gap: 10px; }
  .social-pill {
    font-size: 0.8rem;
    padding: 10px 16px;
    min-height: 44px;
  }
  .stats-strip {
    flex-direction: column;
    align-items: center;
    gap: 24px; /* Reduced gap between stats items */
    padding-top: 0px;
    padding-bottom: 40px;
  }
  .stat-number { font-size: 3rem; }
  .skills-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
  }
  .marquee-track { animation-duration: 35s; }

  /* 10 — FOOTER: MOBILE STACKED LAYOUT */
  .site-footer {
    padding: 0;
  }
  .footer-inner {
    padding: 60px 6vw 40px 6vw;
    flex-direction: column;
    gap: 48px;
    text-align: center;
  }
  .footer-col { 
    width: 100%; 
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-col p {
    margin-inline: auto;
  }
  .footer-col-left > div > div {
    justify-content: center !important;
  }
  .footer-col a {
    display: inline-block;
    padding: 8px 0;
    min-height: 44px; /* Better touch target */
  }

  /* 12 — FAN CAROUSEL: TOUCH/SWIPE */
  .fan-carousel-wrapper { padding-inline: 0; }
  .fan-card {
    width: min(280px, 80vw);
    --fan-z: 40px;
  }
  .fan-dot { width: 10px; height: 10px; margin: 0 6px; }
  .fan-prev, .fan-next {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  /* 13 — BACK TO TOP BUTTON: MOBILE POSITIONING */
  #back-to-top {
    bottom: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  /* 14 — PERFORMANCE: REDUCE GPU LAYER HINTS ON MOBILE */
  .hero-pfp,
  .hero-name,
  .hero-title {
    will-change: auto;
  }
  .cert-card { will-change: transform; }

  /* 15 — GLOBAL TOUCH-TARGET RULE */
  a, button, [role="button"], .cert-card, .fan-card,
  .accordion-toggle, .dropdown-arrow, .journey-nav-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 11 — SCROLL REVEAL: REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   PRINT STYLES (For "Print Portfolio")
   ========================================================================== */
@media print {
  /* 1. Force light mode and un-hide text */
  body, main, section, .hero-premium {
    background: #ffffff !important;
    color: #000000 !important;
  }
  * {
    color: #000000 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: none !important;
    animation: none !important;
  }

  /* 2. Undo GSAP hides & transforms */
  .fade-in-up, .reveal-text, .reveal-block, .fly-left, .fly-right {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* 3. About Section text reveal reset */
  .large-intro-text, .char {
    color: #000000 !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .highlight-text, .char--key {
    color: #000000 !important;
    font-weight: bold !important;
  }

  /* 4. Kill GSAP Pin Spacers (Prevents Blank Pages) */
  .pin-spacer {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
  }

  /* 5. Un-pile Cards */
  .card-pile-container {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .card, .split-card {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    margin-bottom: 20px !important;
  }
  .split-card-media {
    display: none !important; /* Hide heavy images on print */
  }

  /* 6. Un-wrap Certificates Carousel */
  .cert-track {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    transform: none !important;
  }
  .cert-card {
    page-break-inside: avoid;
  }

  /* 7. Hide non-printable UI elements */
  nav, .mobile-nav-toggle, #mobile-nav-menu, 
  .scroll-circle-wrapper, .hero-pfp, 
  .testimonials-section, /* Hide marquee which breaks on print */
  a[title="Print Portfolio"] {
    display: none !important;
  }

  /* 8. General formatting */
  section {
    padding: 20px 0 !important;
    page-break-inside: auto;
  }
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    margin-top: 20px !important;
  }
  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }
}

/* SEO Hidden Elements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ─────────────────────────────────────────────────────────
   STAGGERED MENU STYLES
   ───────────────────────────────────────────────────────── */
.staggered-menu-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none;
}

.staggered-menu-wrapper.fixed-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 998;
  overflow: hidden;
}

@media (min-width: 769px) {
  .staggered-menu-wrapper {
    display: none !important;
  }
}

.sm-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #000000; /* Black by default in hero section */
  font-weight: 500;
  line-height: 1;
  overflow: visible;
  padding: 0;
  transition: color 0.3s ease;
}

.premium-nav.nav-glass .sm-toggle {
  color: #ffffff; /* White in dark background sections */
}

.sm-toggle.active {
  color: #000000 !important; /* Black when mobile menu is open (white background) */
}

.sm-toggle:focus-visible {
  outline: 2px solid #ffffffaa;
  outline-offset: 4px;
  border-radius: 4px;
}

.sm-toggle-textWrap {
  position: relative;
  display: inline-block;
  height: 1em;
  overflow: hidden;
  white-space: nowrap;
  width: auto;
  min-width: auto;
}

.sm-toggle-textInner {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.sm-toggle-line {
  display: block;
  height: 1em;
  line-height: 1;
}

.sm-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.sm-panel-itemWrap {
  position: relative;
  overflow: hidden;
  line-height: 1;
}

.sm-icon-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.staggered-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(260px, 38vw, 420px);
  height: 100%;
  background: white;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  padding: 6em 2em 2em 2em;
  overflow-y: auto;
  z-index: 10;
  pointer-events: auto;
  opacity: 0;
}

[data-position='left'] .staggered-menu-panel {
  right: auto;
  left: 0;
}

.sm-prelayers {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(260px, 38vw, 420px);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}

[data-position='left'] .sm-prelayers {
  right: auto;
  left: 0;
}

.sm-prelayer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  transform: translateX(0);
  opacity: 0;
}

.sm-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sm-socials {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sm-socials-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--sm-accent, #ff0000);
}

.sm-socials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sm-socials-link {
  font-size: 1.2rem;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  position: relative;
  padding: 2px 0;
  display: inline-block;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.sm-socials-link:hover {
  color: var(--sm-accent, #ff0000);
}

.sm-panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sm-panel-item {
  position: relative;
  color: #000;
  font-weight: 600;
  font-size: 3.5rem;
  cursor: pointer;
  line-height: 1;
  letter-spacing: -2px;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
  display: inline-block;
  text-decoration: none;
  padding-right: 1.4em;
}

.sm-panel-itemLabel {
  display: inline-block;
  will-change: transform;
  transform-origin: 50% 100%;
}

.sm-panel-item:hover {
  color: var(--sm-accent, #5227ff);
}

.sm-panel-list[data-numbering] {
  counter-reset: smItem;
}

.sm-panel-list[data-numbering] .sm-panel-item::after {
  counter-increment: smItem;
  content: counter(smItem, decimal-leading-zero);
  position: absolute;
  top: 0.1em;
  right: 2.8em;
  font-size: 18px;
  font-weight: 400;
  color: var(--sm-accent, #5227ff);
  letter-spacing: 0;
  pointer-events: none;
  user-select: none;
  opacity: var(--sm-num-opacity, 0);
}

@media (max-width: 1024px) {
  .staggered-menu-panel, .sm-prelayers {
    width: 100%;
    left: 0;
    right: 0;
  }
}

/* ─────────────────────────────────────────────────────────
   STAGGERED MENU VISIBILITY (MOBILE ONLY)
   ───────────────────────────────────────────────────────── */
.sm-toggle {
  display: none !important;
}

@media (max-width: 768px) {
  .sm-toggle {
    display: inline-flex !important;
  }
}

/* ─────────────────────────────────────────────────────────
   3D MARQUEE SKILLS SECTION
   ───────────────────────────────────────────────────────── */
.marquee-3d-wrapper {
  margin: 60px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 650px;
  overflow: hidden;
  border-radius: 24px;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.marquee-3d-container {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  transform: rotateX(54deg) rotateY(0deg) rotateZ(35deg);
  transform-style: preserve-3d;
  perspective: 1200px;
}

@media (max-width: 768px) {
  .marquee-3d-wrapper {
    height: 400px;
    margin-top: 30px;
  }
  .marquee-3d-container {
    transform: translateX(-60px) rotateX(54deg) rotateY(0deg) rotateZ(35deg);
  }
}

@media (max-width: 480px) {
  .marquee-3d-wrapper {
    height: 350px;
  }
  .marquee-3d-container {
    transform: translateX(-120px) rotateX(54deg) rotateY(0deg) rotateZ(35deg);
  }
}

.marquee-3d-scale {
  width: 1200px;
  flex-shrink: 0;
  transform: scale(1);
  transform-origin: center;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

@media (max-width: 1200px) {
  .marquee-3d-scale {
    transform: scale(0.8);
  }
}
@media (max-width: 992px) {
  .marquee-3d-scale {
    transform: scale(0.65);
  }
}
@media (max-width: 768px) {
  .marquee-col:nth-child(3),
  .marquee-col:nth-child(4) {
    display: none !important;
  }
  .marquee-3d-scale {
    width: 600px;
    transform: scale(0.7);
  }
}
@media (max-width: 480px) {
  .marquee-3d-scale {
    transform: scale(0.55);
  }
}

.marquee-3d-grid {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, 1fr);
  --grid-gap: 2rem;
  gap: var(--grid-gap);
  transform-style: preserve-3d;
}

@media (max-width: 768px) {
  .marquee-3d-grid {
    grid-template-columns: repeat(2, 1fr);
    --grid-gap: 1.5rem;
  }
}

.marquee-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
  gap: var(--grid-gap);
  transform-style: preserve-3d;
}

.marquee-col:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  flex-shrink: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.marquee-col.col-even .marquee-track {
  animation: scroll-up 24s linear infinite;
}

.marquee-col.col-odd .marquee-track {
  animation: scroll-down 24s linear infinite;
}

@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(calc(-100% - var(--grid-gap)));
  }
}

@keyframes scroll-down {
  0% {
    transform: translateY(calc(-100% - var(--grid-gap)));
  }
  100% {
    transform: translateY(0);
  }
}

.marquee-line {
  position: absolute;
  left: calc(var(--grid-gap) / -2);
  top: -100%;
  height: 300%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent);
  pointer-events: none;
}

.skill-card-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  transform-style: preserve-3d;
}

.skill-card {
  width: 240px;
  height: 150px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(13, 13, 13, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-family: var(--font-heading);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  padding: 24px;
  transform-style: preserve-3d;
}

.skill-icon-container {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.skill-icon-container svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  transition: transform 0.3s ease;
}

.skill-name {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}


