:root {
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-heading-wide: 'Archivo Black', Impact, sans-serif;
  --font-heading-ext: 'Unbounded', 'Archivo Black', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Quarter Accent Colors */
  --tl-color: #CBC300;
  --tl-rgb: 203, 195, 0;
  --tl-text: #F6F3C6;

  --tr-color: #9E7DFF;
  --tr-rgb: 158, 125, 255;
  --tr-text: #EAE3FF;

  --bl-color: #225A1B;
  --bl-rgb: 34, 90, 27;
  --bl-text: #C5EDC0;

  --br-color: #9B0913;
  --br-rgb: 155, 9, 19;
  --br-text: #FFCACD;
}

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

html,
body {
  width: 100%;
  height: 100%;
  background-color: #070709;
  font-family: var(--font-sans);
  color: #f0f0f5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Full-bleed background divided into 4 quarters matching the image's crease lines */
.portfolio-grid {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 53.5% 46.5%;
  overflow: hidden;
  background-color: #070709;
}

/* Animation 3: Breathing Portrait Zoom + Subtle 3D Tilt (Pinned at Crease Center) */
.bg-artwork {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform-origin: 50% 53.5%;
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  will-change: transform;
}

.bg-artwork-inner {
  width: 100%;
  height: 100%;
  background-image: url('assets/bg.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform-origin: 50% 53.5%;
  animation: bgBreathe 9s ease-in-out infinite;
  will-change: transform;
}

@keyframes bgBreathe {
  0%, 100% {
    transform: scale(1.045);
  }
  50% {
    transform: scale(1.057);
  }
}

/* Animation 4: Iridescent Shimmer / Color-Shift on the Hood's Fabric */
.bg-fabric-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  opacity: 0.34;
  background: linear-gradient(
    125deg,
    transparent 15%,
    rgba(255, 224, 90, 0.32) 28%,
    rgba(168, 130, 255, 0.36) 42%,
    rgba(90, 240, 220, 0.28) 54%,
    rgba(255, 95, 130, 0.30) 68%,
    transparent 82%
  );
  background-size: 240% 240%;
  -webkit-mask-image: radial-gradient(ellipse 42% 86% at 50% 54%, #000 32%, transparent 76%);
  mask-image: radial-gradient(ellipse 42% 86% at 50% 54%, #000 32%, transparent 76%);
  animation: fabricShimmerSweep 11s ease-in-out infinite;
  will-change: background-position, opacity;
}

@keyframes fabricShimmerSweep {
  0%, 100% {
    background-position: 0% 25%;
    opacity: 0.22;
  }
  50% {
    background-position: 100% 75%;
    opacity: 0.42;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-artwork-inner,
  .bg-fabric-shimmer {
    animation: none;
  }
  .bg-artwork-inner {
    transform: scale(1);
  }
  .bg-fabric-shimmer {
    opacity: 0;
  }
}

/* Animation 1: Living Twinkling Starfield & Cosmic Dust */
.bg-starfield-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Animation 2: Cursor-Tracked Quadrant Spotlight / Color Aura */
.bg-cursor-aura {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.45s ease;
  background: radial-gradient(
    440px circle at var(--aura-x, 50%) var(--aura-y, 50%),
    rgba(var(--aura-rgb, 255, 255, 255), 0.24) 0%,
    rgba(var(--aura-rgb, 255, 255, 255), 0.08) 42%,
    transparent 74%
  );
}

.bg-cursor-aura.is-visible {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .bg-cursor-aura {
    display: none;
  }
}

/* Animation 5: Crease-Line Energy Pulse */
.bg-crease-pulse {
  --pulse-rgb: 255, 255, 255;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.crease-line {
  position: absolute;
  overflow: hidden;
}

.crease-line--h {
  left: 0;
  right: 0;
  top: 53.5%;
  height: 1.5px;
  transform: translateY(-50%);
}

.crease-line--v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
}

/* Travelling light packets gliding occasionally along the crease lines */
.crease-line--h::after {
  content: '';
  position: absolute;
  top: 0;
  left: -22%;
  width: 22%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--pulse-rgb), 0.72) 50%,
    transparent 100%
  );
  filter: drop-shadow(0 0 6px rgba(var(--pulse-rgb), 0.8));
  animation: creaseSweepH 7.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.crease-line--v::after {
  content: '';
  position: absolute;
  left: 0;
  top: -22%;
  width: 100%;
  height: 22%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(var(--pulse-rgb), 0.72) 50%,
    transparent 100%
  );
  filter: drop-shadow(0 0 6px rgba(var(--pulse-rgb), 0.8));
  animation: creaseSweepV 9.2s cubic-bezier(0.4, 0, 0.2, 1) 2.4s infinite;
}

/* Subtle crosshair spark at the exact intersection (50%, 53.5%) */
.crease-core {
  position: absolute;
  left: 50%;
  top: 53.5%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(var(--pulse-rgb), 0.55) 45%,
    transparent 75%
  );
  opacity: 0.35;
  transition: background 0.35s ease;
  animation: creaseCoreIdle 4.5s ease-in-out infinite;
}

.bg-crease-pulse.is-rippling .crease-core {
  animation: creaseCoreRipple 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes creaseSweepH {
  0% {
    left: -22%;
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  38% {
    left: 100%;
    opacity: 0.9;
  }
  42%, 100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes creaseSweepV {
  0% {
    top: -22%;
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  38% {
    top: 100%;
    opacity: 0.9;
  }
  42%, 100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes creaseCoreIdle {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.65);
    opacity: 0.25;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.6;
  }
}

@keyframes creaseCoreRipple {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.95;
  }
  100% {
    transform: translate(-50%, -50%) scale(3.4);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .bg-crease-pulse {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crease-line--h::after,
  .crease-line--v::after,
  .crease-core {
    animation: none;
    opacity: 0;
  }
}

/* Individual Quarter */
.quarter {
  position: relative;
  z-index: 2;
  isolation: isolate;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  outline: none;
  cursor: default;
}

.quarter:hover,
.quarter:focus-visible,
.quarter.is-active {
  z-index: 10;
}

.quarter--tl {
  --q-color: var(--tl-color);
  --q-rgb: var(--tl-rgb);
  --q-text: var(--tl-text);
  cursor: url('assets/cursor-tl.png') 21 2, pointer;
}

.quarter--tr {
  --q-color: var(--tr-color);
  --q-rgb: var(--tr-rgb);
  --q-text: var(--tr-text);
  cursor: url('assets/cursor-tr.png') 21 2, pointer;
}

.quarter--bl {
  --q-color: var(--bl-color);
  --q-rgb: var(--bl-rgb);
  --q-text: var(--bl-text);
  cursor: url('assets/cursor-bl.png') 21 2, pointer;
}

.quarter--br {
  --q-color: var(--br-color);
  --q-rgb: var(--br-rgb);
  --q-text: var(--br-text);
  cursor: url('assets/cursor-br.png') 21 2, pointer;
}

/* Ensure child interactive elements inherit the quarter-colored pixel cursor */
.quarter--tl * {
  cursor: url('assets/cursor-tl.png') 21 2, pointer;
}

.quarter--tr * {
  cursor: url('assets/cursor-tr.png') 21 2, pointer;
}

.quarter--bl * {
  cursor: url('assets/cursor-bl.png') 21 2, pointer;
}

.quarter--br * {
  cursor: url('assets/cursor-br.png') 21 2, pointer;
}

/* Default State: Large Outline Typography (~80% quarter coverage) */
.outline-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  line-height: 0.88;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2.2px var(--q-color);
  user-select: none;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Per-word sizing so each word fills ~80% of its quarter cleanly */
.quarter--tl .outline-word,
.quarter--tr .outline-word {
  font-size: min(31cqw, 74cqh);
}

/* Top-Right: Bolder 3.2px #4810DE electric purple stroke for KU over bright nebula */
.quarter--tr .outline-word .ku-stroke {
  -webkit-text-stroke: 3.2px #4810DE;
  color: transparent;
}

.quarter--bl .outline-word {
  font-size: min(21cqw, 72cqh);
}

/* WARE in 2.4px #2EA521 emerald shade (balanced between #225A1B and #3CE028) */
.quarter--bl .outline-word .ware-bright {
  -webkit-text-stroke: 2.4px #2EA521;
  color: transparent;
}

.quarter--br .outline-word {
  font-size: min(19cqw, 72cqh);
}

/* Bottom-Right: DEVELOPER outline with brighter neon coral/pink stroke for ELO over red velvet */
.quarter--br .outline-word .elo-bright {
  -webkit-text-stroke: 2.8px #FF4E6E;
  color: transparent;
}

/* Hover State: Glassy Blurred Card */
.glass-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  /* Fits strictly inside box without vertical scroll */

  background: linear-gradient(135deg,
      rgba(var(--q-rgb), 0.14) 0%,
      rgba(10, 10, 14, 0.56) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(var(--q-rgb), 0.42);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 28px rgba(var(--q-rgb), 0.1);

  opacity: 0;
  transform: scale(0.965);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Relaxing Vibrating Physics Multi-String Canvas (bottom of card) */
.bottom-string-canvas {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 6px;
  width: calc(100% - 40px);
  height: 56px;
  pointer-events: none;
  z-index: 0;
}

/* IIT Patna Emblem Watermark - High brightness, high contrast, and vivid gold glow so it is visible on first look */
.iitp-watermark {
  position: absolute;
  right: 26px;
  top: clamp(80px, 24%, 125px);
  width: clamp(165px, 22cqw, 225px);
  height: clamp(165px, 22cqw, 225px);
  object-fit: contain;
  opacity: 0.88;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  filter:
    drop-shadow(0 0 14px rgba(255, 230, 60, 0.95)) drop-shadow(0 0 28px rgba(203, 195, 0, 0.8)) brightness(1.5) contrast(1.35);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Subtle custom scrollbar inside cards for smaller viewports */
.glass-card::-webkit-scrollbar {
  width: 5px;
}

.glass-card::-webkit-scrollbar-track {
  background: transparent;
}

.glass-card::-webkit-scrollbar-thumb {
  background: rgba(var(--q-rgb), 0.45);
  border-radius: 99px;
}

/* Hover / Focus / Touch Active Transitions */
.quarter:hover .outline-word,
.quarter:focus-visible .outline-word,
.quarter.is-active .outline-word {
  opacity: 0;
  transform: scale(1.04);
}

.quarter:hover .glass-card,
.quarter:focus-visible .glass-card,
.quarter.is-active .glass-card {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Card Typography & Full-Width Extended Headings */
.card-header {
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid rgba(var(--q-rgb), 0.38);
  padding-bottom: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
  width: 100%;
  overflow: hidden;
}

.card-heading {
  width: 100%;
  display: inline-block;
  white-space: nowrap;
  line-height: 0.95;
  letter-spacing: -0.015em;
  /* Natural tight kerning without artificial gaps */
  text-transform: uppercase;
  color: var(--q-color);
  /* Subtle crisp halo so darker exact hexes (#225A1B, #9B0913) pop over dark glass */
  text-shadow: 0 0 18px rgba(var(--q-rgb), 0.4);
  transform-origin: left center;
}

/* Individual extended Google Fonts tailored to character count */
.quarter--tl .card-heading {
  font-family: var(--font-heading-wide);
  /* Archivo Black (EDUCATION - 9 chars) */
  font-size: clamp(2.2rem, 10.8cqw, 4.3rem);
}

/* Top-Right Quarter Glass Card Tuning */
.quarter--tr .glass-card {
  padding: 18px 22px;
  gap: 8px;
}

/* Top-Right Quarter: Shift PROJECTS completely to the right side for pristine contrast over the dark starry background */
.card-header--tr {
  justify-content: flex-end;
  text-align: right;
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.quarter--tr .card-heading {
  font-family: var(--font-heading-wide);
  /* Archivo Black */
  font-size: clamp(1.95rem, 2.7vw, 2.65rem);
  text-align: right;
  width: auto;
  color: #CBB7FF;
  text-shadow: 0 0 20px rgba(158, 125, 255, 0.75), 0 2px 10px rgba(0, 0, 0, 0.95);
  transform-origin: right center;
}

.quarter--bl .card-heading {
  font-family: var(--font-heading-ext);
  /* Unbounded 900 (SKILLS - 6 chars, ultra-wide) */
  font-weight: 900;
  font-size: clamp(2.4rem, 15.5cqw, 5.6rem);
}

.quarter--br .card-heading {
  font-family: var(--font-heading-wide); /* Archivo Black (ACHIEVEMENTS - 12 chars) */
  font-size: clamp(1.85rem, 8.4cqw, 3.5rem);
  color: #D84252; /* More muted, elegant darker red/crimson */
  -webkit-text-stroke: 0;
  text-shadow: 0 0 10px rgba(180, 30, 45, 0.45), 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Slight light-ink stroke on SKILLS heading for effortless contrast */
.quarter--bl .card-heading {
  -webkit-text-stroke: 0.4px rgba(255, 255, 255, 0.38);
}

.card-body {
  color: var(--q-text);
  font-size: clamp(0.88rem, 1.05vw, 1.02rem);
  line-height: 1.55;
}

/* 1. Education */
.education-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  height: 100%;
  gap: 10px;
  padding: 4px 0 10px;
}

.edu-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edu-school {
  font-size: clamp(1.22rem, 1.58vw, 1.52rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.edu-degree-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.edu-degree {
  font-size: clamp(1.0rem, 1.2vw, 1.14rem);
  font-weight: 500;
  color: var(--q-text);
}

.grade-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #151400;
  background: var(--q-color);
  box-shadow: 0 0 14px rgba(var(--q-rgb), 0.55);
}

/* Timeline Buttons Row: Compact, Rounded Glass Capsule Buttons */
.timeline-buttons-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(var(--q-rgb), 0.55);
  background: rgba(var(--q-rgb), 0.12);
  color: var(--q-text);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  outline: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.timeline-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--q-rgb), 0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* Year 1 & 2: Vibrant, Noticeable Golden Fill */
.timeline-btn.is-completed {
  background: linear-gradient(135deg, rgba(203, 195, 0, 0.88) 0%, rgba(225, 216, 25, 0.96) 100%);
  color: #121100;
  font-weight: 800;
  border-color: #FAF257;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 14px rgba(var(--tl-rgb), 0.5);
}

/* Year 3: Dynamic Wavy Undulating Boundary at exactly 50% */
.timeline-btn.is-half {
  background: linear-gradient(90deg,
      rgba(203, 195, 0, 0.88) 0%,
      rgba(203, 195, 0, 0.88) 50%,
      rgba(203, 195, 0, 0.08) 50%,
      rgba(203, 195, 0, 0.08) 100%);
  border-color: #FAF257;
  color: #ffffff;
  font-weight: 800;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 12px rgba(var(--tl-rgb), 0.35);
}

.timeline-btn.is-half .btn-label {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.btn-wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* Year 4: Upcoming Capsule */
.timeline-btn.is-upcoming {
  background: rgba(203, 195, 0, 0.07);
  border: 1px dashed rgba(var(--q-rgb), 0.5);
  color: var(--q-text);
  opacity: 0.88;
}

/* Relevant Coursework Chips */
.coursework-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coursework-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--q-text);
  opacity: 0.88;
}

.coursework-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.coursework-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--q-text);
  background: rgba(var(--q-rgb), 0.16);
  border: 1px solid rgba(var(--q-rgb), 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.coursework-chip:hover {
  background: rgba(var(--q-rgb), 0.28);
  border-color: rgba(var(--q-rgb), 0.85);
  transform: translateY(-1px);
}

/* 2. Projects: Perfectly budgeted vertical height so all 3 projects fit with zero cutoff */
.projects-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  height: 100%;
  gap: 5px;
  padding: 0 0 2px;
}

.project-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(var(--tr-rgb), 0.2);
}

.project-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.project-title-row {
  display: flex;
  align-items: center;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  text-decoration: none;
  transition: all 0.2s ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.project-link:hover {
  color: #CBB7FF;
  transform: translateX(2px);
}

.ext-icon {
  width: 14px;
  height: 14px;
  color: var(--q-color);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.project-link:hover .ext-icon {
  transform: translate(2px, -2px);
}

/* Individual High-Contrast Tech Stack Chips */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 1px 0 2px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: #F4F0FF;
  background: rgba(18, 14, 30, 0.78);
  border: 1px solid rgba(158, 125, 255, 0.55);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.project-tag:hover {
  background: rgba(158, 125, 255, 0.28);
  border-color: #CBB7FF;
  color: #ffffff;
  transform: translateY(-1px);
}

.project-desc {
  font-size: clamp(0.76rem, 0.9vw, 0.84rem);
  line-height: 1.36;
  color: #EDE8FF;
  opacity: 0.94;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* 3. Skills */
.quarter--bl {
  padding: 20px 20px 20px 20px;
}

.quarter--bl .glass-card {
  padding: clamp(12px, 2.4cqh, 18px) clamp(18px, 2.2vw, 26px);
  gap: clamp(4px, 1.2cqh, 8px);
  display: flex;
  flex-direction: column;
}

.quarter--bl .card-header {
  padding-bottom: clamp(6px, 1.4cqh, 10px);
  margin-bottom: clamp(4px, 1.0cqh, 6px);
}

.skills-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr 1fr;
  row-gap: clamp(10px, 2.2cqh, 18px);
  column-gap: clamp(16px, 2.4vw, 30px);
  padding: 0 0 clamp(2px, 0.8cqh, 6px);
}

.skill-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(5px, 1.1cqh, 8px);
}

.skill-cat {
  font-size: clamp(0.82rem, 1.0vw, 0.92rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #D6FFD0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(5px, 1.0cqh, 7px);
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(3px, 0.7cqh, 6px) clamp(9px, 1.1vw, 13px);
  border-radius: 9px;
  font-size: clamp(0.78rem, 0.92vw, 0.88rem);
  font-weight: 400;
  color: #F2FFF0;
  background: rgba(22, 54, 18, 0.82);
  border: 1px solid rgba(78, 232, 61, 0.48);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.skill-chip:hover {
  transform: translateY(-2px);
  background: rgba(30, 75, 25, 0.92);
  border-color: rgba(78, 232, 61, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 10px rgba(78, 232, 61, 0.3);
}

.skill-chip i {
  font-size: clamp(0.92rem, 1.12vw, 1.08rem);
  color: #4EE83D;
}

/* 4. Achievements */
.quarter--br .glass-card {
  padding: clamp(14px, 2.6cqh, 20px) clamp(20px, 2.2vw, 28px);
  display: flex;
  flex-direction: column;
}

.quarter--br .card-header {
  border-bottom: 1.5px solid rgba(216, 66, 82, 0.28);
  padding-bottom: clamp(8px, 1.6cqh, 12px);
  margin-bottom: clamp(6px, 1.2cqh, 10px);
}

.achievements-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.achievements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.5cqh, 11px);
  margin: 0;
  padding: 0;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: clamp(10px, 1.2vw, 14px);
  padding: clamp(6px, 1.1cqh, 9px) clamp(10px, 1.1vw, 13px);
  border-radius: 11px;
  background: rgba(30, 8, 12, 0.38);
  border: 1px solid rgba(216, 66, 82, 0.16);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.achievement-item:hover {
  transform: translateX(4px);
  background: rgba(45, 12, 18, 0.55);
  border-color: rgba(216, 66, 82, 0.35);
}

.star-bullet {
  flex-shrink: 0;
  width: clamp(19px, 1.8cqw, 24px);
  height: clamp(19px, 1.8cqw, 24px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transform-origin: center center;
  animation: starPulse 2.4s ease-in-out infinite;
}

/* Stagger each star's twinkling rhythm */
.achievements-list li:nth-child(1) .star-bullet { animation-delay: 0s; }
.achievements-list li:nth-child(2) .star-bullet { animation-delay: 0.6s; }
.achievements-list li:nth-child(3) .star-bullet { animation-delay: 1.2s; }
.achievements-list li:nth-child(4) .star-bullet { animation-delay: 1.8s; }

.star-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.star-shape {
  fill: rgba(255, 75, 95, 0.42);
  stroke: #FF5A6C;
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.star-rays {
  fill: none;
  stroke: #FFA4B0;
  stroke-width: 2px;
  stroke-linecap: round;
  animation: starRaysTwinkle 2.4s ease-in-out infinite;
  transform-origin: 16px 16px;
}

.achievements-list li:nth-child(1) .star-rays { animation-delay: 0s; }
.achievements-list li:nth-child(2) .star-rays { animation-delay: 0.6s; }
.achievements-list li:nth-child(3) .star-rays { animation-delay: 1.2s; }
.achievements-list li:nth-child(4) .star-rays { animation-delay: 1.8s; }

@keyframes starPulse {
  0%, 100% {
    transform: scale(0.96);
    filter: drop-shadow(0 0 4px rgba(255, 90, 108, 0.85)) drop-shadow(0 0 10px rgba(255, 50, 70, 0.5));
  }
  50% {
    transform: scale(1.18) rotate(4deg);
    filter: drop-shadow(0 0 8px rgba(255, 130, 150, 1)) drop-shadow(0 0 18px rgba(255, 60, 85, 0.9));
  }
}

@keyframes starRaysTwinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.85);
    stroke: #FF5A6C;
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
    stroke: #FFF0F2;
  }
}

.achievement-content {
  flex: 1;
  font-size: clamp(0.85rem, 1.0vw, 0.95rem);
  line-height: 1.44;
  color: #FFE6E8;
}

.achievement-content strong {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Minimal Icon-Only Floating Footer */
.floating-footer {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.footer-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-icon-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-icon-link svg {
  width: 100%;
  height: 100%;
}

/* Responsive / Touch Devices */
@media (max-width: 900px) {

  html,
  body {
    overflow-y: auto;
    height: auto;
  }

  .portfolio-grid {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(320px, auto));
    padding-bottom: 68px;
    overflow: visible;
  }

  .bg-artwork {
    position: fixed;
    inset: 0;
  }

  .quarter {
    padding: 14px;
    min-height: 320px;
  }

  .glass-card {
    overflow-y: auto;
    /* Allow gentle scroll on short mobile screens */
  }

  .quarter--tl .outline-word,
  .quarter--tr .outline-word,
  .quarter--bl .outline-word,
  .quarter--br .outline-word {
    font-size: clamp(3.5rem, 18vw, 7rem);
  }

  .skills-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 16px;
  }

  .iitp-watermark {
    width: 130px;
    height: 130px;
    right: 18px;
    top: 75px;
    bottom: auto;
    opacity: 0.28;
  }
}

@media (max-width: 480px) {
  .quarter {
    padding: 10px;
    min-height: 340px;
  }

  .glass-card {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .timeline-buttons-row {
    gap: 8px;
  }

  .timeline-btn {
    padding: 6px 13px;
    font-size: 0.85rem;
  }
}