/* ===================================================
   Portfolio – Design System
   Colors: #f9f0e7, #dae3ff, #1335a8, #010101
   =================================================== */

/* ----- 1. Custom Properties ----- */
:root {
  --bg-cream: #f9f0e7;
  --bg-blue: #dae3ff;
  --color-title: #1335a8;
  --color-text: #010101;
  --color-white: #ffffff;
  --color-title-rgb: 19, 53, 168;

  /* Premium Apple-style Glassmorphism (Frosted, Specular highlights, Soft shadows) */
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.18) 100%);
  --glass-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.25) 100%);
  --glass-border: rgba(255, 255, 255, 0.48);
  --glass-shadow: 0 8px 32px rgba(var(--color-title-rgb), 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.75), inset 0 -1px 2px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 50px;

  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-offset: 9.0rem;
  --color-border: rgba(var(--color-title-rgb), 0.08);
}

/* ----- 2. Reset & Base ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--bg-cream); /* Solid base color */
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Section backgrounds & boundaries --- */
.hero-section,
.techstack-section,
.recent-projects,
.projects-header-section,
.projects-list-section,
.project-header-section,
.project-content-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--color-border); /* Crisp separation lines */
  position: relative;
}

.projects-header-section,
.project-header-section {
  padding: 3rem 0 2rem 0;
  position: relative;
  z-index: 10;
}

.projects-list-section,
.project-content-section {
  position: relative;
  z-index: 1;
}

.hero-section {
  padding-top: 0;
}

.projects-list-section {
  padding: 2.5rem 0 5rem 0;
}

.bg-cream {
  background-color: var(--bg-cream) !important;
}

.bg-blue {
  background-color: var(--bg-blue) !important;
}

img {
  max-width: 100%;
  display: block;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

hr.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--color-title-rgb), 0.15), transparent);
  margin: 2rem 0;
}

/* ----- 3. Typography ----- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-title);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  max-width: 70ch;
  margin-bottom: 1rem;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

/* ----- 4. Layout ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-wrapper {
  padding-top: 5rem;
  min-height: 100vh;
}

section {
  padding: 4rem 0;
}

/* ----- 5. Navbar – Liquid Glass ----- */
.navbar {
  position: fixed;
  top: 1.25rem;
  right: 2rem;
  z-index: 1000;
  transition: var(--transition);
}

.nav-glass {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.nav-glass:hover {
  background: var(--glass-bg-hover);
  box-shadow: 0 12px 40px rgba(var(--color-title-rgb), 0.1), 
              inset 0 1px 1px rgba(255, 255, 255, 0.9), 
              inset 0 -1px 2px rgba(0, 0, 0, 0.03);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-xl);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color var(--transition);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0);
  border: 1px solid transparent;
  box-shadow: none;
  transition: all var(--transition);
  z-index: -1;
}

.nav-link:hover::before {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.nav-link.active::before {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 10px rgba(var(--color-title-rgb), 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-title);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  fill: currentColor;
}

.nav-text {
  display: inline;
}

/* ----- 6. Hero / About Me ----- */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 4rem;
  padding: 0 0 2rem;
}

.hero-image {
  flex-shrink: 0;
}

.hero-content {
  flex: 1;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--color-text);
  line-height: 1.8;
  text-align: justify;
  opacity: 0.95;
}

/* ----- 7. Profile Blob ----- */
.profile-blob-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  cursor: pointer;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  transition: border-radius 1.2s ease-in-out; /* Smooth transition back when mouse leaves */
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(var(--color-title-rgb), 0.15);
  background: transparent; /* Changed to transparent to prevent visible edge borders */
}

/* Triggered dynamically by JavaScript to allow smooth transition out */
.profile-blob-wrapper.animating {
  animation: blob-morph 6s ease-in-out infinite;
  transition: none; /* Disable transitions while animating to prevent conflicts */
}

.profile-blob {
  width: 108% !important;
  height: 108% !important;
  max-width: none !important;
  margin-top: -4%;
  margin-left: -4%;
  object-fit: cover;
}

@keyframes blob-morph {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  20%  { border-radius: 40% 60% 50% 50% / 50% 50% 40% 60%; }
  40%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  60%  { border-radius: 50% 40% 60% 30% / 40% 50% 60% 50%; }
  80%  { border-radius: 70% 30% 50% 60% / 60% 40% 50% 30%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* ----- 8. Tech Stack Marquee ----- */
.techstack-section {
  padding: 3rem 0;
  overflow: hidden;
  cursor: pointer;
}


.marquee-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.marquee-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: marquee-scroll-left 35s linear infinite;
}

.marquee-row.reverse .marquee-track {
  animation: marquee-scroll-right 35s linear infinite;
}

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

/* ----- 9. Unified Tech Badges (Liquid Glass) ----- */
.tech-badge {
  display: inline-flex;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  color: var(--color-text);
  box-shadow: 0 2px 12px rgba(var(--color-title-rgb), 0.05);
}

.tech-badge i {
  color: var(--color-title);
  transition: transform var(--transition);
  display: flex;
  align-items: center;
}

.tech-badge svg.skill-icon-svg {
  transition: transform var(--transition);
  display: flex;
  align-items: center;
  stroke: var(--color-title);
}

.tech-badge:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(var(--color-title-rgb), 0.45);
  box-shadow: 0 4px 20px rgba(var(--color-title-rgb), 0.08);
}

.tech-badge:hover i,
.tech-badge:hover svg.skill-icon-svg {
  transform: scale(1.15);
}

/* Size: Large (tech-badge--lg) */
.tech-badge--lg {
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

.tech-badge--lg i {
  font-size: 1.35rem;
}

.tech-badge--lg svg.skill-icon-svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

/* Size: Medium (tech-badge--md) */
.tech-badge--md {
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

.tech-badge--md i {
  font-size: 1.05rem;
}

.tech-badge--md svg.skill-icon-svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.25;
}

/* Size: Small (tech-badge--sm) */
.tech-badge--sm {
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
}

.tech-badge--sm i {
  font-size: 0.9rem;
}

.tech-badge--sm svg.skill-icon-svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.25;
}

@keyframes marquee-scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ----- 10. Recent Projects (Home) ----- */
.recent-projects {
  padding: 3rem 0 4rem;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.recent-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(var(--color-title-rgb), 0.06);
  display: flex;
  flex-direction: column;
}

.recent-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(var(--color-title-rgb), 0.14);
}

.recent-card-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-blue), var(--bg-cream));
}

.recent-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recent-card-body h3 {
  margin-bottom: 0.5rem;
}

.recent-card-body p {
  font-size: 0.9rem;
  opacity: 0.8;
  flex: 1;
}

.recent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(var(--color-title-rgb), 0.06);
}

.recent-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ----- 11. Project Cards (Overview) ----- */
.projects-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-bar-row {
  display: flex;
  gap: 1rem;
  width: 100%;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--color-text);
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  border-color: rgba(var(--color-title-rgb), 0.3);
  box-shadow: 0 0 0 3px rgba(var(--color-title-rgb), 0.08);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.45;
  pointer-events: none;
}

/* Filter Dropdown */
.filter-dropdown {
  position: relative;
}

.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.85rem;
  height: 48px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
  color: var(--color-title);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-toggle:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
}

.filter-icon {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.filter-toggle .chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform var(--transition);
}

.filter-dropdown.open .filter-toggle .chevron {
  transform: rotate(180deg);
}

.filter-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  max-width: calc(100vw - 2rem);
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(var(--color-title-rgb), 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}

.filter-panel::-webkit-scrollbar {
  display: none;
}

.filter-dropdown.open .filter-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.25rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  font-size: 0.9rem;
}

.filter-option:hover {
  background: rgba(var(--color-title-rgb), 0.05);
}

.filter-option input[type="checkbox"] {
  accent-color: var(--color-title);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Project List */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  display: flex;
  align-items: stretch;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(var(--color-title-rgb), 0.06);
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(var(--color-title-rgb), 0.14);
}

.project-card-thumb-wrapper {
  position: relative;
  width: 180px;
  min-height: 160px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-blue), var(--bg-cream));
}

.project-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-body {
  flex: 1;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.project-card-body h3 {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.project-card-body p {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  flex-shrink: 0;
}

.project-card-date {
  font-size: 0.85rem;
  opacity: 0.55;
  white-space: nowrap;
}

.project-card-arrow {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--color-title-rgb), 0.07);
  border-radius: 50%;
  color: var(--color-title);
  font-size: 1.3rem;
  transition: all var(--transition);
}

.project-card:hover .project-card-arrow,
.recent-card:hover .project-card-arrow {
  background: var(--color-title);
  color: var(--color-white);
  transform: translateX(3px);
}



/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--color-title-rgb), 0.15);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.pagination-dot.active {
  background: var(--color-title);
  transform: scale(1.25);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  opacity: 0.6;
  font-size: 1.05rem;
}

/* ----- 12. Project Detail Page ----- */
.project-detail {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.project-header .section-title {
  margin-bottom: 0;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(var(--color-title-rgb), 0.07);
  color: var(--color-title);
  transition: all var(--transition);
}

.github-link:hover {
  background: var(--color-title);
  color: var(--color-white);
  transform: scale(1.1);
}

.github-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.github-link.model-3d-link svg {
  fill: none;
}

.project-subtitle {
  font-size: 1.05rem;
  opacity: 0.75;
  margin-top: 0.5rem;
}

/* Carousel */
.carousel {
  position: relative;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(var(--color-title-rgb), 0.1);
}

.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--bg-blue), var(--bg-cream));
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--color-title);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 5;
}

.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--color-white);
  box-shadow: 0 4px 16px rgba(var(--color-title-rgb), 0.15);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.15));
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-dot.active {
  background: var(--color-white);
  transform: scale(1.3);
}

.project-content {
  padding: 2rem 0 4rem;
}

.project-content h2,
.project-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.project-content p {
  opacity: 0.85;
  max-width: none;
  margin-bottom: 0.8rem;
}

.project-content p a {
  color: #1a56db;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: color var(--transition);
}

.project-content p a:hover {
  color: #0b3fa9;
}

@media (min-width: 769px) {
  .project-content p {
    text-align: justify;
    text-justify: inter-word;
  }
}

/* Reset justified text inside custom cards, alerts, and other box components */
.tech-card p,
.prerequisites-box p,
.limitation-box p,
.info-box p,
.voxy-showcase-container p,
.comm-flow-container p,
.comm-card p,
.screenshot-box p,
.screenshot-placeholder p,
.screenshot-note p {
  text-align: left !important;
}

/* ----- 13. CV Page Split Layout ----- */
.home-page-wrapper,
.cv-page-wrapper,
.projects-page-wrapper,
.project-detail-page-wrapper {
  padding-top: 0 !important;
}

.home-page-wrapper .hero-section,
.projects-page-wrapper .projects-header-section,
.project-detail-page-wrapper .project-header-section {
  padding-top: var(--nav-offset);
}

.cv-split-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Sidebar Column (Blue) */
.cv-left-col {
  width: 35%;
  background-color: var(--bg-blue);
  padding: var(--nav-offset) 2.5rem 4rem;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.cv-profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.cv-name {
  color: var(--color-title);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.cv-sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cv-sidebar-title {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-title);
  border-bottom: 2px solid rgba(var(--color-title-rgb), 0.15);
  padding-bottom: 0.4rem;
  margin-bottom: 0.25rem;
}

.cv-expertise-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cv-expertise-group h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-title);
  opacity: 0.9;
  margin-bottom: 0.1rem;
}

.cv-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}



.cv-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.cv-contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cv-contact-address {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--color-text);
  opacity: 0.95;
}

.cv-contact-address svg {
  width: 18px;
  height: 18px;
  color: var(--color-title);
  flex-shrink: 0;
}

.cv-contact-socials {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.cv-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(var(--color-title-rgb), 0.1);
  color: var(--color-title);
  transition: all var(--transition);
  cursor: pointer;
}

.cv-social-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(var(--color-title-rgb), 0.3);
  color: var(--color-title);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--color-title-rgb), 0.08);
}

.cv-social-btn i {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
}

.cv-social-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
}

/* Right Main Column (Cream) */
.cv-right-col {
  width: 65%;
  background-color: var(--bg-cream);
  padding: var(--nav-offset) 4rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.cv-main-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cv-section-heading {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-title);
  margin-bottom: 0;
}

/* Timeline */
.cv-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 24px;
}

.cv-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(var(--color-title-rgb), 0.15);
}

.cv-timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.cv-timeline-item:last-child {
  padding-bottom: 0;
}

.cv-timeline-dot {
  position: absolute;
  left: -17px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-title);
  box-shadow: 0 0 0 4px rgba(var(--color-title-rgb), 0.15);
}

.cv-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cv-timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-title);
}

.cv-timeline-date {
  letter-spacing: 0.05em;
}

.cv-timeline-institution {
  font-style: italic;
  opacity: 0.85;
}

.cv-timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

.cv-timeline-desc {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 0;
}

/* Bullet list inside Timeline */
.cv-bullet-list {
  list-style-type: disc;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.cv-bullet-list li {
  line-height: 1.6;
}

/* Honors & Awards */
.cv-honors {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-honor {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(var(--color-title-rgb), 0.06);
}

.cv-honor:last-child {
  border-bottom: none;
}

.cv-honor::before {
  content: '';
  width: 3px;
  flex-shrink: 0;
  border-radius: 3px;
  margin: 0.45rem 0;
  background: var(--color-title);
}

.cv-honor-body {
  flex: 1;
  padding: 0.5rem 0 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cv-honor-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cv-honor-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-title);
  text-decoration: none;
  transition: opacity var(--transition);
}

.cv-honor-name:hover {
  opacity: 0.7;
}

.cv-honor-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  background: rgba(var(--color-title-rgb), 0.08);
  color: var(--color-title);
  border: 1px solid rgba(var(--color-title-rgb), 0.1);
}

.cv-honor-cat {
  font-size: 0.78rem;
  color: var(--color-text);
  opacity: 0.6;
}


/* Publications */
.cv-publications {
  font-size: 0.95rem;
  line-height: 1.6;
}

.cv-publications a {
  color: var(--color-title);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.cv-publications a:hover {
  border-color: var(--color-title);
}

/* Footer override for CV page */
.cv-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
}

/* ----- 14. Scroll Reveal Animation ----- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- 15. Active Filter Tags ----- */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--glass-shadow);
  color: var(--color-title);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.active-filter-tag:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
}

.active-filter-tag .remove {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.7;
}

/* ----- 16. Responsive ----- */
@media (max-width: 1024px) {
  /* Hero centering and stacked layout for non-desktop */
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 0 1.5rem 0 1.5rem; /* Reset top padding to 0, delegate to section */
  }

  .hero-image {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .profile-blob-wrapper {
    margin: 0 auto;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  /* CV Responsive – Stacks earlier at 1024px to prevent sidebar tech badge overflow */
  .cv-split-layout {
    flex-direction: column;
  }

  .cv-left-col {
    width: 100%;
    padding: var(--nav-offset) 1.5rem 2.5rem;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    gap: 2rem;
  }

  .cv-right-col {
    width: 100%;
    padding: 2.5rem 1.5rem 4rem;
    gap: 2rem;
  }

  .cv-timeline-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-offset: 6.8rem;
  }

  .page-wrapper {
    padding-top: 5rem;
  }

  .projects-header-section,
  .project-header-section {
    padding-top: 2.5rem;
  }

  /* Navbar: centered, icons only */
  .navbar {
    top: 0.75rem;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-text {
    display: none;
  }

  .nav-icon {
    display: block;
  }

  .nav-link {
    padding: 0.8rem 1.35rem;
  }

  .nav-icon {
    display: block;
    width: 26px;
    height: 26px;
  }

  .nav-glass {
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }

  /* Hero size adjustments for mobile */
  .profile-blob-wrapper {
    width: 200px;
    height: 200px;
  }

  /* Projects */
  .search-filter-bar {
    flex-direction: column;
  }

  .project-card {
    flex-direction: column;
  }

  .project-card-thumb-wrapper {
    width: 100%;
    min-height: 140px;
    height: 180px;
  }
  .project-card-thumb {
    width: 100%;
    height: 100%;
  }
  .filter-panel {
    right: 0;
    left: auto;
    width: auto;
    min-width: 220px;
    max-width: calc(100vw - 2rem);
  }

  .project-card-meta {
    flex-direction: row;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(var(--color-title-rgb), 0.06);
  }

  .recent-grid {
    grid-template-columns: 1fr;
  }

  /* Carousel */
  .carousel-slide img {
    height: 250px;
  }

  .carousel-prev,
  .carousel-next {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  section {
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-offset: 6.2rem;
  }

  .profile-blob-wrapper {
    width: 160px;
    height: 160px;
  }

  .page-wrapper {
    padding-top: 4.5rem;
  }

  .carousel-slide img {
    height: 200px;
  }

  .project-card-thumb-wrapper {
    height: 140px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

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

/* ----- 17. Utility & Misc ----- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Placeholder for missing images */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-blue), var(--bg-cream));
  color: var(--color-title);
  font-weight: 600;
  font-size: 1.5rem;
  opacity: 0.5;
}

/* Selection styling */
::selection {
  background: rgba(var(--color-title-rgb), 0.2);
  color: var(--color-title);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--color-title-rgb), 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--color-title-rgb), 0.25);
}

/* ----- 18. Structured Footer ----- */
.footer {
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--color-border);
  background-color: var(--bg-cream);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-title);
  letter-spacing: -0.01em;
}

.footer-tagline {
  font-size: 0.95rem;
  color: var(--color-text);
  opacity: 0.65;
  margin-bottom: 0;
}

.footer-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-title);
}

.footer-contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-contact-icon {
  width: 16px;
  height: 16px;
  color: var(--color-title);
  flex-shrink: 0;
  stroke-width: 2.25;
}

.footer-contact-item a {
  color: var(--color-text);
  opacity: 0.85;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition);
}

.footer-contact-item a:hover {
  color: var(--color-title);
  opacity: 1;
  text-decoration: underline;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.footer-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(var(--color-title-rgb), 0.1);
  color: var(--color-title);
  transition: all var(--transition);
  cursor: pointer;
}

.footer-social-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(var(--color-title-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(var(--color-title-rgb), 0.06);
}

.footer-social-btn i {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--color-text);
  opacity: 0.55;
  margin-bottom: 0;
}

/* Mobile responsive footer */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .footer-brand,
  .footer-group,
  .footer-contact-details {
    align-items: center;
  }
  
  .footer-socials {
    justify-content: center;
  }
}

/* ----- 19. Breadcrumbs & Project Detail Tags ----- */
.breadcrumb-nav {
  margin-bottom: 1rem;
  display: block;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-title);
  opacity: 0.85;
  transition: all var(--transition);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(var(--color-title-rgb), 0.1);
  box-shadow: 0 2px 8px rgba(var(--color-title-rgb), 0.03);
}

.breadcrumb-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.75);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(var(--color-title-rgb), 0.06);
}

.breadcrumb-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
}

.project-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

/* ----- 16. Screenshot Card & Lightbox Popup ----- */
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}

.screenshot-box {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(var(--color-title-rgb, 15, 23, 42), 0.08);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-title);
  text-decoration: none;
}

.screenshot-box:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(var(--color-title-rgb, 15, 23, 42), 0.15);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.screenshot-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #1e1f22;
  border-bottom: 1px solid rgba(var(--color-title-rgb, 15, 23, 42), 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.screenshot-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s ease;
  display: block;
}

.screenshot-box:hover .screenshot-img {
  transform: scale(1.03);
}

.screenshot-info {
  padding: 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.screenshot-info strong {
  font-size: 1.1rem;
  color: var(--color-title);
}

.screenshot-info p {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.5;
}


.screenshot-img-wrapper::after {
  content: '🔍';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.2rem;
  height: 2.2rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.screenshot-img-wrapper:hover::after {
  opacity: 1;
  background: rgba(15, 23, 42, 0.85);
  transform: scale(1.05);
}

.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #f1f5f9;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
  user-select: none;
  z-index: 10000;
}

.lightbox-close:hover {
  color: #38bdf8;
  transform: scale(1.1);
}

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #cbd5e1;
  font-size: 1rem;
  text-align: center;
  max-width: 80%;
  background: rgba(30, 41, 59, 0.5);
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
}
