/*
* Template Name: SnapFolio
* Template URL: https://bootstrapmade.com/snapfolio-bootstrap-portfolio-template/
* Updated: Jul 21 2025 with Bootstrap v5.3.7
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*=============================================
=            CSS VARIABLES & ROOT            =
=============================================*/

/* Font Variables */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --heading-font: "Ubuntu", sans-serif;
  --nav-font: "Nunito", sans-serif;
}

/* Global Color Variables */
:root { 
  --background-color: #1f1f1f;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #ececec;
  --surface-color: #232323;
  --contrast-color: #310606;
}



/* Patch Notes Label Colors */
:root {
  --patch-mix-ratio: 30%; /* Adjust this value to change all patch note color mixing */
  
  /* Patch label colors */
  --label-release:     color-mix(in srgb, #0969da, var(--heading-color) var(--patch-mix-ratio)); /* updates: blue */
  --label-hidden:      color-mix(in srgb, #28a745, var(--heading-color) var(--patch-mix-ratio)); /* features: green */
  --label-bug:         color-mix(in srgb, #cf222e, var(--heading-color) var(--patch-mix-ratio)); /* bugs: red */
  --label-performance: color-mix(in srgb, #f66a0a, var(--heading-color) var(--patch-mix-ratio)); /* orange */
  --label-optimize:    color-mix(in srgb, #8250df, var(--heading-color) var(--patch-mix-ratio)); /* purple */
}



/* Navigation Color Variables */
:root {
  --nav-color: rgba(236, 236, 236, 0.59);
  --nav-hover-color: #ffffff;
  --nav-mobile-background-color: #393939;
  --nav-dropdown-background-color: #393939;
  --nav-dropdown-color: #ffffff;
  --nav-dropdown-hover-color: #ececec;
}

/* Color Preset Classes */
.light-background {
  --background-color: #2c2c2c;
  --surface-color: #323232;
}

.dark-background {
  --background-color: #040b14;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #151f2b;
  --contrast-color: #ffffff;
}

/* Global Settings */
:root {
  scroll-behavior: smooth;
}

/*=============================================
=            DYNAMIC NAVBAR ANIMATIONS        =
=============================================*/

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutSlide {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

#patch-notes-nav-item {
  transition: all 0.3s ease;
}

#patch-notes-nav-item.fade-out {
  animation: fadeOutSlide 0.3s ease-out forwards;
}

/* Smooth transition for other navbar items when patch notes item appears/disappears */
#navmenu li {
  transition: transform 0.3s ease-out;
}

/* When patch notes item is visible, shift other items slightly */
#navmenu.patch-notes-visible li:not(#patch-notes-nav-item) {
  transform: translateX(0);
}

/* #patch-notes-nav-item a {
  color: var(--contrast-color) !important;
  font-weight: 600;
  transition: color 0.3s ease;
}

#patch-notes-nav-item a:hover {
  color: color-mix(in srgb, var(--contrast-color), var(--accent-color) 40%) !important;
} */

/* When user is on other sections, revert to normal nav styling */
/* #patch-notes-nav-item.nav-away a {
  color: var(--nav-color) !important;
  font-weight: normal;
}

#patch-notes-nav-item.nav-away a:hover {
  color: var(--nav-hover-color) !important;
} */

/*=============================================
=            BASE STYLES                     =
=============================================*/

/* Typography */
html, body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
  overflow-x: hidden; /* Prevent horizontal scroll from 100vw elements */
  max-width: 100%;
}

/* Global overflow prevention (desktop + mobile) */
*, *::before, *::after {
  box-sizing: border-box;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

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

body {
  overflow-x: hidden;
  position: relative;
  /* Ensure smooth scrolling works on mobile */
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 576px) {
  .container, .container-fluid, section, main {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  
  /* Add padding to containers but NOT hero */
  .container:not(.hero .container),
  .container-fluid:not(.hero .container-fluid) {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Hero should have no padding constraints */
  .hero,
  .hero .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: visible !important; /* Changed from hidden to allow scrolling */
  }
  
  /* But keep background elements contained */
  .hero .background-elements {
    overflow: hidden !important;
  }
  
  .container.aos-init {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  /* Fix skills section overflow */
  .skills-two-panel {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .skills-panel,
  .skills-panel--left,
  .skills-panel--right {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .expertise-compact {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .skills .expertise-row {
    margin-left: 0;
    margin-right: 0;
    padding-left: 8px;
    padding-right: 8px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .skills .expertise-row-tags {
    max-width: 100% !important;
    overflow: hidden !important;
    flex-wrap: wrap;
    width: 100% !important;
  }
  
  /* Fix portfolio cards overflow */
  .portfolio-card,
  .portfolio-card-thumb,
  .portfolio-card-content,
  .portfolio-card-link-row {
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Hide icon watermarks on mobile - they cause overflow */
  .portfolio-card-icon-watermark {
    display: none !important;
  }
  
  /* Hide portfolio tags on mobile - hover effect not useful on touch */
  .portfolio-card-tags {
    display: none !important;
  }
  
  /* Ensure Bootstrap rows don't overflow */
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .row > * {
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-width: 100% !important;
  }
  
  /* Force clip any absolute positioned children that overflow */
  .expertise-row-tags {
    clip-path: inset(0) !important;
  }
  
  /* Disable skill tag expansion on mobile - causes overflow */
  .skills .expertise-row-tags .skill-tag .skill-expand {
    display: none !important;
  }
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 25%);
  text-decoration: none;
}

/* PHP Email Form Messages */
.php-email-form .error-message {
  display: none;
  background: #df1529;
  color: #ffffff;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.php-email-form .sent-message {
  display: none;
  color: #ffffff;
  background: #059652;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.php-email-form .loading {
  display: none;
  background: var(--surface-color);
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
}

.php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid var(--accent-color);
  border-top-color: var(--surface-color);
  animation: php-email-form-loading 1s linear infinite;
}

@keyframes php-email-form-loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom cartoon face loading animation */
@keyframes cartoon-spin {
  0% { 
    transform: rotate(0deg) scale(1); 
  }
  25% { 
    transform: rotate(90deg) scale(1.1); 
  }
  50% { 
    transform: rotate(180deg) scale(1); 
  }
  75% { 
    transform: rotate(270deg) scale(1.1); 
  }
  100% { 
    transform: rotate(360deg) scale(1); 
  }
}

.cartoon-loading {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  animation: cartoon-spin 2s ease-in-out infinite;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cartoon-loading img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/*=============================================
=            LAYOUT COMPONENTS               =
=============================================*/

/* Global Header */
.header {
  --background-color: #1b1b1b;
  --contrast-color: #444444;
  color: var(--default-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  padding: 0 15px;
  width: 300px;
  transition: all ease-in-out 0.3s;
  overflow-y: auto;
  z-index: 997;
}

.header .header-container {
  border-radius: 20px;
  padding: 15px;
  background-color: var(--background-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 80%);
}

.header .social-links {
  margin: 0 0 10px 0;
}

.header .social-links a {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--default-color), transparent 90%);
  color: var(--default-color);
  margin: 0 2px;
  border-radius: 50%;
  text-align: center;
  width: 40px;
  height: 40px;
  transition: 0.3s;
}

.header .social-links a:hover {
  color: var(--contrast-color);
  background: var(--accent-color);
}

.header .header-toggle {
  color: var(--contrast-color);
  background-color: var(--accent-color);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  transition: background-color 0.3s;
  box-sizing: border-box;
}

/* Mobile fix: Move menu toggle to bottom-left for thumb reach */
@media (max-width: 576px) {
  .header .header-toggle {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: auto;
    width: 44px;
    height: 44px;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
}

.header .header-toggle:hover {
  color: var(--contrast-color);
  background-color: color-mix(in srgb, var(--accent-color) 90%, white 15%);
}

/* Navigation Menu */
.mobile-nav-toggle {
  display: none;
}

.navmenu {
  padding: 0;
  z-index: 9997;
  width: 100%;
}

.navmenu ul {
  list-style: none;
  padding: 0 0 20px 0;
  margin: 0;
}

.navmenu a,
.navmenu a:focus {
  color: var(--nav-color);
  padding: 15px 10px;
  font-family: var(--nav-font);
  font-size: 16px;
  font-weight: 400;
  display: flex;
  align-items: center;
  white-space: nowrap;
  transition: 0.3s;
  width: 100%;
}

.navmenu a .navicon,
.navmenu a:focus .navicon {
  font-size: 20px;
  margin-right: 10px;
}

.navmenu a .toggle-dropdown,
.navmenu a:focus .toggle-dropdown {
  font-size: 12px;
  line-height: 0;
  margin-left: auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: 0.3s;
  flex-shrink: 0;
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
}

.navmenu a .toggle-dropdown:hover,
.navmenu a:focus .toggle-dropdown:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

.navmenu a:hover,
.navmenu .active,
.navmenu .active:focus {
  color: var(--nav-hover-color);
}

.navmenu a:hover .navicon,
.navmenu .active .navicon,
.navmenu .active:focus .navicon {
  color: var(--accent-color);
}

.navmenu .active .toggle-dropdown,
.navmenu .active:focus .toggle-dropdown {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  transform: rotate(180deg);
}

.navmenu .dropdown {
  display: block;
}

.navmenu .dropdown a,
.navmenu .dropdown a:focus {
  color: --nav-dropdown-color;
}

.navmenu .dropdown a:hover,
.navmenu .dropdown .active,
.navmenu .dropdown .active:focus {
  color: var(--nav-dropdown-hover-color);
}

.navmenu .dropdown ul {
  position: static;
  display: none;
  z-index: 99;
  padding: 5px 10px;
  margin: 5px 10px;
  background-color: var(--nav-dropdown-background-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  box-shadow: none;
  transition: all 0.5s ease-in-out;
}

.navmenu .dropdown ul ul {
  background-color: rgba(33, 37, 41, 0.1);
}

.navmenu .dropdown>.dropdown-active {
  display: block;
  background-color: rgba(33, 37, 41, 0.03);
}

/* Global Footer */
.footer {
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  padding: 0 0 40px 0;
  position: relative;
}

.footer .copyright {
  padding-top: 40px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.footer .copyright p {
  margin-bottom: 0;
}

.footer .credits {
  margin-top: 4px;
  font-size: 13px;
  text-align: center;
}

/*=============================================
=            UTILITY COMPONENTS              =
=============================================*/

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  overflow: hidden;
  background: var(--background-color);
  transition: all 0.6s ease-out;
  opacity: 1;
  visibility: visible;
}

/* Disable scrolling when preloader is active */
body.preloader-active {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/*=============================================
=            PATCH NOTES HEADER              =
============================================*/

/* Remove em dashes and style "Andrew Edition" for the Patch Notes header */
.section-title .patch-notes-title:before,
.section-title .patch-notes-title:after {
  display: none !important;
}

.section-title .patch-notes-title {
  font-weight: 400 !important;
  font-size: 32px !important;
}

.section-title .patch-notes-title .bold-part {
  font-weight: 700 !important;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 60px);
  left: calc(50% - 60px);
  width: 120px;
  height: 120px;
  background-image: url('../img/cartoonloader.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  animation: cartoon-preloader 2s linear infinite;
}

/* Preloader GIF removed - file no longer exists */

@keyframes cartoon-preloader {
  0% { 
    transform: rotate(0deg); 
  }
  100% { 
    transform: rotate(360deg); 
  }
}

/* Scroll Top Button */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  color: var(--contrast-color);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  bottom: 15px;
}

/* Global Sections */
section,
.section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  overflow: clip;
}

/* About section contains nested sub-sections (stats, skills)
   Remove its own padding and allow overflow for full-width children */
#about.section {
  padding: 0;
  overflow: visible;
}

/* The actual about content (first container) needs its own padding */
#about > .container:first-child {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Nested section-like divs inside About (stats, skills) 
   Stay contained within normal container */
#about > div.stats.section,
#about > div.skills.section {
  width: auto;
  position: static;
  margin-left: 0;
  margin-right: 0;
}

/* Global Section Titles */
.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  position: relative;
}

.section-title h2:before,
.section-title h2:after {
  content: "";
  width: 50px;
  height: 2px;
  background: var(--accent-color);
  display: inline-block;
}

.section-title h2:before {
  margin: 0 15px 10px 0;
}

.section-title h2:after {
  margin: 0 0 10px 15px;
}

.section-title p {
  margin-bottom: 0;
  opacity: 0.8;
}

/* Global Page Titles & Breadcrumbs */
.page-title {
  color: var(--default-color);
  padding: 25px 0 0 0;
  position: relative;
}

.page-title .container {
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  padding-bottom: 25px;
}

.page-title h1 {
  font-size: 24px;
  font-weight: 700;
}

.page-title .breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
}

.page-title .breadcrumbs ol li+li {
  padding-left: 10px;
}

.page-title .breadcrumbs ol li+li::before {
  content: "/";
  display: inline-block;
  padding-right: 10px;
  color: color-mix(in srgb, var(--default-color), transparent 70%);
}

/*=============================================
=            RESPONSIVE UTILITIES            =
=============================================*/

/* Disable aos animation delay on mobile devices */
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
  
  /* Ensure AOS doesn't interfere with mobile scrolling on hero */
  .hero [data-aos] {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Header responsive behavior */
@media (min-width: 1200px) {
  .header~main,
  .header~#footer {
    margin-left: 330px;
  }
}

@media (max-width: 1199px) {
  .header {
    left: -100%;
  }
}

.header.header-show {
  left: 0;
}

/*=============================================
=            HERO SECTION                    =
=============================================*/

.hero {
  min-height: 100vh;
  min-height: 100dvh; /* Use dynamic viewport height for mobile */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  touch-action: pan-y; /* Allow vertical scrolling on mobile */
}

.hero .background-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero .background-elements .bg-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, color-mix(in srgb, var(--accent-color), transparent 90%), color-mix(in srgb, var(--accent-color), transparent 95%));
  animation: float 6s ease-in-out infinite;
}

.hero .background-elements .bg-circle.circle-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.hero .background-elements .bg-circle.circle-2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: 5%;
  animation-delay: 2s;
}

.hero .hero-content {
  position: relative;
  width: 100%;
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
}

.hero .hero-text h1 {
  font-size: 72px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 15px;
  color: var(--heading-color);
}

.hero .hero-text h1 .accent-text {
  color: var(--accent-color);
  position: relative;
}

.hero .hero-text h1 .accent-text::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), color-mix(in srgb, var(--accent-color), transparent 50%));
}

.hero .hero-text h2 {
  font-size: 32px;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 10px;
}

.hero .hero-text .lead {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--default-color);
}

.hero .hero-text .lead span {
  color: var(--accent-color);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 2px;
}

.hero .hero-text .description {
  font-size: 18px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero .hero-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero .hero-actions .btn {
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid;
}

.hero .hero-actions .btn.btn-primary {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border-color: var(--accent-color);
}

.hero .hero-actions .btn.btn-primary:hover {
  background-color: color-mix(in srgb, var(--accent-color), black 10%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--accent-color), transparent 70%);
}

.hero .hero-actions .btn.btn-outline {
  background-color: transparent;
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.hero .hero-actions .btn.btn-outline:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  transform: translateY(-2px);
}

.hero .social-links {
  display: flex;
  gap: 20px;
}

.hero .social-links a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-color);
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  border-radius: 50%;
  font-size: 20px;
  transition: all 0.3s ease;
}

.hero .social-links a:hover {
  color: var(--contrast-color);
  background-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--accent-color), transparent 70%);
}

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

.hero .hero-visual .profile-container {
  position: relative;
  width: 400px;
  height: 400px;
}

.hero .hero-visual .profile-container .profile-background {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-radius: 30px;
  z-index: 1;
}

.hero .hero-visual .profile-container .profile-image {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  z-index: 2;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

/* Hero Responsive */
@media (max-width: 992px) {
  .hero .hero-text {
    text-align: center;
    margin-bottom: 50px;
  }
  .hero .hero-text h1 { font-size: 56px; }
  .hero .hero-text h2 { font-size: 28px; }
  .hero .hero-text .lead { font-size: 20px; }
  .hero .hero-visual .profile-container {
    width: 350px;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    padding-top: 60px; /* Add padding to prevent content cutoff */
    padding-bottom: 60px;
    align-items: flex-start; /* Align to top on mobile */
  }
  
  .hero .hero-content {
    padding-top: 20px; /* Additional spacing from top */
  }
  
  .hero .hero-text h1 { font-size: 42px; }
  .hero .hero-text h2 { font-size: 24px; }
  .hero .hero-text .lead { font-size: 18px; }
  .hero .hero-text .description { font-size: 16px; }
  .hero .hero-actions { justify-content: center; }
  .hero .hero-actions .btn {
    padding: 12px 25px;
    font-size: 14px;
  }
  .hero .hero-visual .profile-container {
    width: 300px;
    height: 300px;
  }
  .hero .background-elements .bg-circle.circle-1 {
    width: 200px;
    height: 200px;
  }
  .hero .background-elements .bg-circle.circle-2 {
    width: 150px;
    height: 150px;
  }
}

/*=============================================
=            ABOUT SECTION                   =
=============================================*/

.about .profile-card {
  background: linear-gradient(135deg, var(--surface-color) 0%, color-mix(in srgb, var(--surface-color), var(--accent-color) 5%) 100%);
  border-radius: 2rem;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 90%);
  position: relative;
  overflow: hidden;
}

.about .profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), color-mix(in srgb, var(--accent-color), var(--heading-color) 30%));
}

.about .profile-header {
  position: relative;
  margin-bottom: 2rem;
}

.about .profile-header .profile-image {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about .profile-header .profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about .profile-header .profile-badge {
  position: absolute;
  bottom: 20px;
  right: calc(50% - 65px);
  width: 32px;
  height: 32px;
  background-color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--surface-color);
}

.about .profile-header .profile-badge i {
  color: var(--contrast-color);
  font-size: 14px;
}

.about .profile-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}

.about .profile-content .profession {
  color: var(--accent-color);
  font-weight: 500;
  margin-bottom: 2rem;
}

.about .contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about .contact-links .contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: color-mix(in srgb, var(--surface-color), var(--background-color) 50%);
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--default-color);
  transition: all 0.3s;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.about .contact-links .contact-item:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px color-mix(in srgb, var(--accent-color), transparent 70%);
}

.about .contact-links .contact-item i {
  font-size: 1rem;
  width: 18px;
}

.about .about-content {
  padding-left: 3rem;
}

.about .about-content .section-header {
  margin-bottom: 2rem;
}

.about .about-content .section-header .badge-text {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color), var(--heading-color) 20%));
  color: var(--contrast-color);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.0rem;
}

.about .about-content .section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.about .about-content .description {
  margin-bottom: 2.5rem;
}

.about .about-content .description p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  margin-bottom: 1.5rem;
}

.about .about-content .description p b {
  color: var(--heading-color);
}

.about .about-content .description p:last-child {
  margin-bottom: 0;
}

.about .details-grid {
  margin-bottom: 2.5rem;
}

/* Two-column layout: details left (40%), stats right (60%) */
.about .about-info-row {
  display: grid;
  grid-template-columns: 1fr; /* stack as separate rows */
  gap: 1.25rem;
  align-items: start;
}

/* Stack detail items vertically in this layout */
/* .about .about-info-row .details-grid .detail-row {
  grid-template-columns: 1fr;
} */

.about .details-grid .detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1rem; /* equal spacing between rows */
}

.about .details-grid .detail-row:last-child {
  margin-bottom: 0;
}

.about .details-grid .detail-item .detail-label {
  display: block;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  margin-bottom: 0rem;
  font-weight: 500;
}

.about .details-grid .detail-item .detail-value {
  display: block;
  font-weight: 600;
  color: var(--heading-color);
  font-size: 1rem;
}

.about .cta-section {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.about .cta-section .btn {
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid transparent;
}

/* .about .cta-section .btn.btn-primary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid var(--accent-color);
  font-weight: 600;
  justify-content: flex-start;
} */

.about .new_footer {
  margin-top: 2rem;
  margin-bottom: 0rem;
  text-align: center;
}

.about .cta-section .btn.btn-primary {
  background-color: var(--accent-color);
  color: var(--background-color);
  border-color: color-mix(in srgb, #f2c14b, transparent 100%);
  border-width: 3px;
}

.about .cta-section .btn.btn-primary:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, #f2c14b, transparent 20%);
  border-width: 3px;
}


.about .cta-section .btn.btn-outline {
  background-color: transparent;
  color: var(--default-color);
  border-color: color-mix(in srgb, var(--default-color), transparent 70%);
}

.about .cta-section .btn.btn-outline:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

/* .about .cta-section .btn.btn-outline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: color-mix(in srgb, var(--surface-color), var(--background-color) 50%);
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--default-color);
  transition: all 0.3s;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  font-weight: 400 !important;
  flex: 1;
  justify-content: flex-start;
}

.about .cta-section .btn.btn-outline:hover {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px color-mix(in srgb, var(--accent-color), transparent 70%);
} */

.description p {
  margin: 0 0 12px 0 !important;
}

.about .profession-sub {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--default-color), transparent 60%);
  font-style: italic;

}
.about .profession .profession-sub {
  /* line-height: 0.5; */
  display: block;
  margin-top: -0.15rem;
}

/* About Responsive */
@media (max-width: 991px) {
  .about .profile-card { margin-bottom: 3rem; }
  .about .about-content { padding-left: 0; }
}

@media (max-width: 768px) {
  .about .about-content .section-header h2 { font-size: 1.875rem; }
  .about .details-grid .detail-row { grid-template-columns: 1fr; gap: 1rem; }
  .about .container { padding-left: 12px; padding-right: 12px; }
}

/* Mobile: Hide secondary content for cleaner experience */
@media (max-width: 576px) {
  .hero {
    /* Ensure proper height and scrolling on small mobile devices */
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 80px; /* More padding on small screens */
    padding-bottom: 80px;
    align-items: flex-start;
  }
  
  .hero .hero-content {
    padding-top: 0; /* Reset additional padding */
    min-height: auto;
  }
  
  .hero .hero-text {
    padding-top: 20px;
  }
  
  .hero .hero-text .description {
    display: none;
  }
  
  .about .profile-card {
    display: none;
  }
  
  .about .details-grid {
    display: none;
  }
  
  .resume .resume-side,
  .resume .education-sidebar-row .resume-side {
    display: none;
  }
}
.about .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.25rem;
  /* padding: 1.25rem; */
  /* padding-top: 2rem;  */
  background-color: var(--surface-color);
  border-radius: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
  position: relative;
}

/* Vertically center the header cell content */
.about .stats-grid .header-item {
  grid-column: 1 / -1; /* span across both columns */
  display: flex;
  align-items: center;
  justify-content: center;
}

.about .stats-grid .header-item .stat-label {
  width: 100%;
  text-align: center;
}

@media (max-width: 992px) {
  .about .about-info-row {
    grid-template-columns: 1fr;
  }
  /* reset explicit column placement on small screens */
  .about .about-info-row .stats-grid,
  .about .about-info-row .details-grid {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .about .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: center;
  }
}

.about .stats-grid .header-item .stat-label {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--default-color);
}

/* Overlaid label in top-left of stats grid */
.about .stats-grid .stats-grid-label {
  position: absolute;
  top: 10px;
  left: 24px;
  font-size: 0.875rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--default-color), transparent 70%);
  pointer-events: none;
}

/* Circle backdrop behind icon+label for the two items (not the header) */
.about .stats-grid .stat-item {
  /* no decorative background behind content */
}

.about .stats-grid .stat-item {
  text-align: center;
}

.about .stats-grid .stat-item a.stat-item-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  width: 6rem;
  height: 6rem;
  border-radius: 15%;
  background-color: color-mix(in srgb, var(--surface-color), var(--background-color) 35%);
  /* border: 2px solid color-mix(in srgb, var(--default-color), transparent 85%); */
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  margin: 0 auto;
  /* padding: 0.5rem; */
}

.about .stats-grid .stat-item a.stat-item-link:hover {
  transform: translateY(-3px) scale(1.02);
  background-color: color-mix(in srgb, var(--surface-color), var(--accent-color) 8%);
  border-color: color-mix(in srgb, var(--accent-color), transparent 35%);
  box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

.about .stats-grid .stat-item a.stat-item-link:active {
  transform: translateY(-1px) scale(0.99);
}

.about .stats-grid .stat-item a.stat-item-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 60%);
  border-color: var(--accent-color);
}

/* Preserve icon and label layout within the clickable area */
.about .stats-grid .stat-item a.stat-item-link .stat-number {
  margin: 0 0 4px 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about .stats-grid .stat-item a.stat-item-link .stat-number::before {
  content: "";
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--default-color);
  z-index: 0;
}

.about .stats-grid .stat-item a.stat-item-link .stat-number i {
  position: relative;
  z-index: 1;
  color: var(--background-color);
  font-size: 1.25rem;
}

.about .stats-grid .stat-item a.stat-item-link .stat-number i {
  font-size: 32px;
}

.about .stats-grid .stat-item a.stat-item-link .stat-label {
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  /* padding: 0 6px; */
}

.about .stats-grid .stat-item a.stat-item-link:hover .stat-number {
  /* icon color change handled by container hover */
}

.about .stats-grid .stat-item .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
  /* margin-bottom: 0.5rem; */
}

.about .stats-grid .stat-item .stat-label {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  font-weight: 500;
}

/*=============================================
=            STATS SECTION                   =
=============================================*/

.stats .stats-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Stats Flip Card Container */
.stats .stats-item {
  perspective: 1000px;
  border-radius: 15px;
  position: relative;
  height: 280px; /* Fixed height for flip to work */
}

/* The inner container that flips */
.stats .stats-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Flip on hover */
.stats .stats-item:hover .stats-card-inner {
  transform: rotateY(180deg);
}

/* Front and Back faces */
.stats .stats-card-front,
.stats .stats-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 15px;
  padding: 10px 20px 15px; /* Reduced top padding, less bottom padding for button */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Front face styling */
.stats .stats-card-front {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-color), transparent 5%), var(--surface-color));
}

/* Back face styling */
.stats .stats-card-back {
  background: linear-gradient(135deg, var(--surface-color), color-mix(in srgb, var(--surface-color), #000 10%));
  transform: rotateY(180deg);
}

/* Front face icon wrapper */
.stats .stats-item .icon-wrapper {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px auto 15px; /* Adjust first value to move circle down */
  transition: transform 0.3s ease;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}

.stats .stats-item .icon-wrapper i {
  font-size: 36px;
}

/* Front face number wrapper */
.stats .stats-card-front .stats-number {
  display: block;
  text-align: center;
}

/* Front face number */
.stats .stats-card-front span {
  display: inline;
  font-size: 48px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0px;
  line-height: 1;
  font-family: var(--heading-font);
  vertical-align: baseline;
}

/* Front face label */
.stats .stats-card-front p {
  color: var(--default-color);
  font-size: 16px;
  margin: 8px 0 0 0;
  font-weight: 500;
  font-family: var(--heading-font);
  opacity: 0.8;
}

/* Back face cartoon wrapper */
.stats .stats-cartoon-wrapper {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 30px auto 0px; /* Match front icon position */
  border: 4px solid currentColor;
  flex-shrink: 0;
}

.stats .stats-cartoon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Back face evidence text */
.stats .stats-evidence {
  color: var(--default-color);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  padding: 0 0px;
  opacity: 0.85;
  text-align: center;
  font-family: var(--nav-font);
  flex: 1;
  display: flex;
  align-items: center;
  overflow-y: auto;
}

/* Stats Color Variations - Front Face */
.stats .stats-item:nth-child(1) .icon-wrapper {
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
}
.stats .stats-item:nth-child(1) .icon-wrapper i {
  color: color-mix(in srgb, var(--accent-color), transparent 10%);
}
.stats .stats-item:nth-child(2) .icon-wrapper {
  background-color: color-mix(in srgb, #ff7e00, transparent 85%);
}
.stats .stats-item:nth-child(2) .icon-wrapper i {
  color: color-mix(in srgb, #ff7e00, transparent 10%);
}
.stats .stats-item:nth-child(3) .icon-wrapper {
  background-color: color-mix(in srgb, #00c875, transparent 85%);
}
.stats .stats-item:nth-child(3) .icon-wrapper i {
  color: color-mix(in srgb, #00c875, transparent 10%);
}
.stats .stats-item:nth-child(4) .icon-wrapper {
  background-color: color-mix(in srgb, #e83e8c, transparent 85%);
}
.stats .stats-item:nth-child(4) .icon-wrapper i {
  color: color-mix(in srgb, #e83e8c, transparent 10%);
}

/* Stats Color Variations - Back Face (cartoon border colors) */
.stats .stats-item:nth-child(1) .stats-cartoon-wrapper {
  border-color: var(--accent-color);
}
.stats .stats-item:nth-child(2) .stats-cartoon-wrapper {
  border-color: #ff7e00;
}
.stats .stats-item:nth-child(3) .stats-cartoon-wrapper {
  border-color: #00c875;
}
.stats .stats-item:nth-child(4) .stats-cartoon-wrapper {
  border-color: #e83e8c;
}

/* Stats Learn More Button */
.stats .stats-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--nav-font);
  flex-shrink: 0;
}

.stats .stats-learn-more:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.stats .stats-learn-more i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.stats .stats-learn-more:hover i {
  transform: translateX(3px);
}

/* Learn More Button Color Variations (match front icon colors) */
.stats .stats-item:nth-child(1) .stats-learn-more {
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
  color: color-mix(in srgb, var(--accent-color), transparent 10%);
}
.stats .stats-item:nth-child(2) .stats-learn-more {
  background-color: color-mix(in srgb, #ff7e00, transparent 85%);
  color: color-mix(in srgb, #ff7e00, transparent 10%);
}
.stats .stats-item:nth-child(3) .stats-learn-more {
  background-color: color-mix(in srgb, #00c875, transparent 85%);
  color: color-mix(in srgb, #00c875, transparent 10%);
}
.stats .stats-item:nth-child(4) .stats-learn-more {
  background-color: color-mix(in srgb, #e83e8c, transparent 85%);
  color: color-mix(in srgb, #e83e8c, transparent 10%);
}

/* Library Modal */
.library-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.library-modal.active {
  opacity: 1;
  visibility: visible;
}

.library-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.library-modal-container {
  position: relative;
  background: var(--surface-color);
  border-radius: 20px;
  padding: 35px 30px 30px;
  max-width: 680px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.library-modal.active .library-modal-container {
  transform: scale(1) translateY(0);
}

.library-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: var(--default-color);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.library-modal-close:hover {
  opacity: 1;
}

.library-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 20px;
  font-family: var(--heading-font);
}

.library-modal-images {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.library-modal-images img {
  width: calc(50% - 7.5px);
  max-width: 240px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.library-modal-text {
  font-size: 0.95rem;
  color: var(--default-color);
  opacity: 0.85;
  line-height: 1.6;
  margin: 0;
  font-family: var(--nav-font);
}

.library-modal-content {
  text-align: left;
  width: 100%;
}

.library-modal-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 12px 0;
  font-family: var(--heading-font);
}

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

.library-modal-list li {
  display: grid;
  grid-template-columns: 20px 75px 1fr;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--default-color);
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 14px;
  font-family: var(--nav-font);
}

.library-modal-list li:last-child {
  margin-bottom: 0;
}

.library-modal-list li i {
  color: #e83e8c;
  font-size: 1rem;
  margin-top: 2px;
}

.library-modal-list li strong {
  color: var(--heading-color);
  white-space: nowrap;
}

.library-modal-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  text-align: center;
}

.library-modal-closing {
  font-size: 0.95rem;
  color: var(--default-color);
  line-height: 1.6;
  font-family: var(--nav-font);
  margin: 0 0 12px 0;
  opacity: 0.85;
}

.library-modal-footnote {
  font-size: 0.75rem;
  color: var(--default-color);
  opacity: 0.4;
  font-style: italic;
  font-family: var(--nav-font);
  margin: 0;
}

@media (max-width: 480px) {
  .library-modal-list li {
    grid-template-columns: 20px 70px 1fr;
    gap: 8px;
    font-size: 0.85rem;
  }
}

/* Library Confirmation Modal */
.library-confirm-container {
  max-width: 560px;
  text-align: center;
  border: 1px solid color-mix(in srgb, #e83e8c, transparent 80%);
  background: linear-gradient(
    135deg,
    var(--surface-color) 0%,
    color-mix(in srgb, #e83e8c, var(--surface-color) 95%) 100%
  );
}

/* Decorative accent line at top */
.library-confirm-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #e83e8c;
  border-radius: 0 0 3px 3px;
}

.library-confirm-text {
  font-size: 1rem;
  color: var(--default-color);
  opacity: 0.85;
  margin: 0 0 12px 0;
  font-family: var(--nav-font);
  letter-spacing: 0.01em;
  font-weight: 500;
}

.library-confirm-container .library-modal-title {
  font-size: 1.5rem;
  margin-bottom: 30px;
  font-style: italic;
  color: var(--heading-color);
  opacity: 0.65;
  line-height: 1.3;
}

.library-confirm-buttons {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
}

.library-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--nav-font);
  border: 2px solid transparent;
  flex: 1;
  line-height: 1.4;
}

.library-confirm-back {
  background: transparent;
  color: var(--default-color);
  border-color: color-mix(in srgb, var(--default-color), transparent 75%);
  opacity: 0.8;
}

.library-confirm-back:hover {
  background: color-mix(in srgb, var(--default-color), transparent 92%);
  border-color: color-mix(in srgb, var(--default-color), transparent 60%);
  opacity: 1;
}

.library-confirm-proceed {
  background: color-mix(in srgb, #e83e8c, transparent 85%);
  color: #e83e8c;
  text-align: left;
  border-color: color-mix(in srgb, #e83e8c, transparent 60%);
}

.library-confirm-proceed:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, #e83e8c, transparent 75%);
  border-color: color-mix(in srgb, #e83e8c, transparent 40%);
}

.library-confirm-proceed i {
  opacity: 0.7;
}

@media (max-width: 576px) {
  .library-confirm-buttons {
    flex-direction: column;
  }
  .library-confirm-btn {
    font-size: 0.85rem;
    padding: 12px 16px;
  }
  .library-confirm-container .library-modal-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .library-modal-images {
    flex-direction: column;
    align-items: center;
  }
  .library-modal-images img {
    width: 100%;
    max-width: 280px;
  }
  .library-modal-title {
    font-size: 1.2rem;
  }
}

/* Library Popup Sequence (Easter Egg) */
.library-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.library-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.library-popup {
  position: absolute;
  background: var(--surface-color);
  border-radius: 20px;
  padding: 40px 35px 35px;
  max-width: 520px;
  width: 90%;
  text-align: center;
  border: 1px solid color-mix(in srgb, #e83e8c, transparent 70%);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.library-popup.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
}

.library-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: #e83e8c;
  border-radius: 0 0 3px 3px;
}

.library-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--default-color);
  opacity: 0.5;
  cursor: pointer;
  font-size: 1.1rem;
  transition: opacity 0.2s ease;
}

.library-popup-close:hover {
  opacity: 1;
}

.library-popup-subtitle {
  font-size: 0.95rem;
  color: var(--default-color);
  opacity: 0.7;
  margin: 0 0 12px 0;
  font-family: var(--nav-font);
  font-weight: 500;
}

.library-popup-title {
  font-size: 1.4rem;
  color: var(--heading-color);
  margin: 0 0 30px 0;
  line-height: 1.4;
  font-style: italic;
  opacity: 0.85;
}

.library-popup-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.library-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  font-family: var(--nav-font);
}

.library-popup-back {
  background: transparent;
  color: var(--default-color);
  border-color: color-mix(in srgb, var(--default-color), transparent 75%);
  opacity: 0.7;
}

.library-popup-back:hover {
  background: color-mix(in srgb, var(--default-color), transparent 90%);
  border-color: color-mix(in srgb, var(--default-color), transparent 60%);
  opacity: 1;
}

.library-popup-next {
  background: color-mix(in srgb, #e83e8c, transparent 85%);
  color: #e83e8c;
  border-color: color-mix(in srgb, #e83e8c, transparent 60%);
}

.library-popup-next:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, #e83e8c, transparent 75%);
  border-color: color-mix(in srgb, #e83e8c, transparent 40%);
}

.library-popup-egg {
  font-size: 2.5rem;
  padding: 20px 50px;
  border-radius: 50px;
  background: color-mix(in srgb, #e83e8c, transparent 80%);
  border-color: color-mix(in srgb, #e83e8c, transparent 50%);
  transition: all 0.3s ease;
}

.library-popup-egg:hover {
  transform: scale(1.1);
  background: color-mix(in srgb, #e83e8c, transparent 70%);
}

@media (max-width: 480px) {
  .library-popup {
    padding: 30px 25px 25px;
  }
  .library-popup-title {
    font-size: 1.2rem;
  }
  .library-popup-buttons {
    flex-direction: column;
  }
  .library-popup-btn {
    font-size: 0.8rem;
    padding: 10px 16px;
  }
}

/* Stats Responsive */
@media (max-width: 992px) {
  .stats .stats-wrapper { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .stats .stats-wrapper { grid-template-columns: 1fr; }
  .stats .stats-item { height: 280px; }
  .stats .stats-card-front,
  .stats .stats-card-back {
    padding: 15px 20px 20px;
    justify-content: flex-start;
  }
  .stats .stats-item .icon-wrapper {
    margin: 10px auto 20px;
    width: 90px;
    height: 90px;
    min-width: 70px;
    min-height: 70px;
  }
  .stats .stats-item .icon-wrapper i {
    font-size: 30px;
  }
  .stats .stats-card-front span { font-size: 52px; }
  .stats .stats-card-front .stats-number { margin-top: 15px; }
  .stats .stats-card-front p { font-size: 14px; margin-top: 32px; }
  .stats .stats-cartoon-wrapper { 
    width: 70px; 
    height: 70px; 
    margin: 10px auto 10px;
  }
  .stats .stats-evidence { 
    font-size: 11px; 
    max-height: 100px; 
    margin: 8px 0;
  }
  .stats .stats-learn-more {
    margin-top: auto;
    padding: 8px 16px;
    font-size: 12px;
  }
}

/*=============================================
=            SKILLS SECTION                  =
=============================================*/

.skills .skills-category {
  background-color: var(--surface-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  height: 100%;
  transition: transform 0.3s;
}

.skills .skills-category:hover {
  transform: translateY(-5px);
}

/* Transparent wrapper variant (for expertise section) */
.skills .skills-category--no-bg {
  background-color: transparent;
  box-shadow: none;
  padding: 0;
}

.skills .skills-category--no-bg:hover {
  transform: none;
}

.skills .skills-category h3 {
  font-size: 24px;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.skills .skills-category h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--accent-color);
}

.skills .skill-item {
  margin-bottom: 10px;
}

.skills .skill-item:last-child {
  margin-bottom: 0;
}

.skills .skill-item h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.skills .skill-item .skill-percentage {
  font-size: 14px;
  color: color-mix(in srgb, var(--heading-color), transparent 30%);
}

.skills .skill-item .progress {
  height: 8px;
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.skills .skill-item .progress .progress-bar {
  background-color: var(--accent-color);
  transition: width 1.5s ease-in-out;
  width: 0;
  height: 100%;
  border-radius: 20px;
}

.skills .skill-item .skill-tooltip {
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin-top: 8px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s;
}

.skills .skill-item:hover .skill-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Skill badges under progress bars */
.skills .skill-item .skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.skills .skill-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #fff;
  transition: transform 0.2s ease;
}

.skills .skill-tag:hover {
  transform: translateY(-1px);
}

/* Skill tag color variations */
.skill-tag.tag-primary {
  background-color: color-mix(in srgb, var(--accent-color), transparent 50%);
}

.skill-tag.tag-secondary {
  background-color: color-mix(in srgb, #ff7e00, transparent 50%);
}

.skill-tag.tag-tertiary {
  background-color: color-mix(in srgb, #00c875, transparent 50%);
}

.skill-tag.tag-quaternary {
  background-color: color-mix(in srgb, #e83e8c, transparent 50%);
}

/* Horizontal Skills Layout - Side by Side */
.skills .skills-horizontal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skills .skill-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.skills .skill-row:last-child {
  border-bottom: none;
}

.skills .skill-left {
  flex: 0 0 200px;
  min-width: 200px;
}

.skills .skill-left h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.skills .skill-left .progress {
  height: 6px;
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
  border-radius: 20px;
  overflow: hidden;
}

.skills .skill-left .progress .progress-bar {
  background-color: var(--accent-color);
  transition: width 1.5s ease-in-out;
  width: 0;
  height: 100%;
  border-radius: 20px;
}

.skills .skill-right {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .skills .skill-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .skills .skill-left {
    flex: none;
    width: 100%;
    min-width: auto;
  }
  
  .skills .skill-right {
    width: 100%;
  }
}

/* Skills Section Title */
.skills .skills-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  display: inline-block;
}

/* Language Skills Section - Horizontal Icon Row */
/* Distinct Color Palette */
:root {
  /* Language colors - muted greys to avoid confusion with skill type colors */
  --lang-hover: rgba(255, 255, 255, 0.85);
  --lang-hover-border: rgba(255, 255, 255, 0.5);
  --lang-hover-bg: rgba(255, 255, 255, 0.08);
}

/* Horizontal Row Layout */
.language-icons-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 4rem;
  max-width: 100%;
}

.lang-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  max-width: 220px;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: default;
}

.lang-icon-item:hover {
  background: color-mix(in srgb, var(--surface-color), var(--default-color) 5%);
}

/* Icon Square */
.lang-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: var(--surface-color);
  border: 2px solid color-mix(in srgb, var(--default-color), transparent 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.lang-icon-circle i {
  font-size: 2.2rem;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.9);
}

/* Language icon colors on hover - muted grey/white */
.lang-icon-item:hover .lang-icon-circle i { 
  color: var(--lang-hover); 
}

/* Python - Primary Language (position relative for badge) */
.lang-icon-item[data-lang="python"] {
  position: relative;
}

/* Primary Badge - very subtle */
.lang-primary-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.35rem;
  background: transparent;
  color: var(--default-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 70%);
  border-radius: 3px;
  opacity: 0.4;
}

/* Hover effects on circles - unified grey/white */
.lang-icon-item:hover .lang-icon-circle {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--lang-hover-border);
  background: var(--lang-hover-bg);
}

/* Language Name */
.lang-icon-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.4rem 0;
}

/* Description */
.lang-icon-desc {
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin: 0;
  line-height: 1.4;
  min-height: 2.2rem;
}


/* Responsive */
@media (max-width: 992px) {
  .language-icons-row {
    gap: 1rem;
  }
  
  .lang-icon-circle {
    width: 70px;
    height: 70px;
  }
  
  .lang-icon-circle i {
    font-size: 1.9rem;
  }
  
  .lang-icon-name {
    font-size: 0.9rem;
  }
  
  .lang-icon-desc {
    font-size: 0.72rem;
  }
}

@media (max-width: 768px) {
  .language-icons-row {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  
  .lang-icon-item {
    flex: 0 0 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
  }
}

@media (max-width: 480px) {
  .lang-icon-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Two-Panel Skills Layout */
.skills-two-panel {
  display: flex;
  gap: 1.5rem;
}

.skills-panel {
  background-color: var(--surface-color);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.skills-panel--left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Align to top, not center */
  align-items: flex-start;
}

.skills-panel--right {
  flex: 1;
}

.skills-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
  letter-spacing: 0.01em;
  align-self: flex-start; /* Hug the top instead of centering */
}

.skills-panel-hint {
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  margin: 0 0 1.25rem 0;
  font-style: italic;
}

/* Hint type labels - colored by experience type */
.hint-type {
  font-style: normal;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  transition: filter 0.2s ease, opacity 0.2s ease;
  transition: all 0.2s ease;
}

.hint-project {
  color: #9f3d44;
  background: rgba(159, 61, 68, 0.15);
}
.hint-project.hint-active {
  background: #9f3d44;
  color: #fff;
  box-shadow: 0 0 10px rgba(159, 61, 68, 0.5);
}

.hint-job {
  color: #0e7490;
  background: rgba(14, 116, 144, 0.15);
}
.hint-job.hint-active {
  background: #0e7490;
  color: #fff;
  box-shadow: 0 0 10px rgba(14, 116, 144, 0.5);
}

.hint-education {
  color: #a8a8a8;
  background: rgb(168 168 168 / 15%);
}
.hint-education.hint-active {
  background: #a8a8a8;
  color: #fff;
  box-shadow: 0 0 10px rgba(168, 168, 168, 0.5);
}

/* Greyscale non-active hint types when one is active */
.skills-panel-hint:has(.hint-active) .hint-type:not(.hint-active) {
  filter: grayscale(100%);
  opacity: 0.4;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

/* Expertise Compact Layout */
.skills .expertise-compact {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skills .expertise-row {
  transition: all 0.3s ease;
  padding: 12px 16px;
  margin: 0 -16px 0 -16px;
  border-radius: 8px;
  background: transparent;
}

/* Hover effect: show background on hovered row */
.skills .expertise-row:hover {
  background: #0000000b;
  filter: none !important;
}

/* Dim sibling rows when one row is hovered */
.skills .expertise-compact:hover .expertise-row {
  opacity: 0.75;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, background 0.2s ease;
}

/* Keep hovered row fully visible */
.skills .expertise-compact:hover .expertise-row:hover {
  opacity: 1;
}

.skills .expertise-row:last-child {
  margin-bottom: 0;
}

/* Row Title - category headers */
.skills .expertise-row-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  margin: 0 0 0.6rem 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}


/* Row Tags */
.skills .expertise-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Dim siblings when any linked tag in the row is hovered */
.skills .expertise-row-tags:has(.skill-linked:hover) .skill-tag {
  opacity: 0.15;
  transition: opacity 0.2s ease;
}

/* Keep the hovered tag fully visible */
.skills .expertise-row-tags:has(.skill-linked:hover) .skill-tag.skill-linked:hover {
  opacity: 1;
  font-weight: 400;
}

.skills .expertise-row-tags .skill-tag {
  background: color-mix(in srgb, var(--default-color), transparent 88%);
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  font-size: 0.65rem;
  padding: 0.05rem 0.2rem;
  transition: all 0.2s ease;
  border-radius: 3px;
  font-weight: 300;
  box-sizing: border-box;
}


/* Linked skill tags - color coded by type */
.skills .expertise-row-tags .skill-tag.skill-linked {
  cursor: pointer;
  position: relative;
}

/* Linked skills - Default neutral state */
.skills .expertise-row-tags .skill-tag[data-project],
.skills .expertise-row-tags .skill-tag[data-job],
.skills .expertise-row-tags .skill-tag[data-education] {
  background: #2a2a2a;
  color: #888;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Project-linked skills - Rose/Red (shown on row hover) */
.skills .expertise-row:hover .skill-tag[data-project] {
  background: #3d2426;
  color: #c4686e;
}

.skills .expertise-row-tags .skill-tag[data-project]:hover {
  background: #8a3a40;
  color: #fff;
}

/* Job-linked skills - Teal (shown on row hover) */
.skills .expertise-row:hover .skill-tag[data-job] {
  background: #1a3a42;
  color: #4eb8d0;
}

.skills .expertise-row-tags .skill-tag[data-job]:hover {
  background: #0c6578;
  color: #fff;
}

/* Education-linked skills - Yellow (shown on row hover) */
.skills .expertise-row:hover .skill-tag[data-education] {
  background: #3a3a3a;
  color: #c8c8c8;
}

.skills .expertise-row-tags .skill-tag[data-education]:hover {
  background: #8a8a8a;
  color: #fff;
}

/* Unlinked skills - Muted (unchanged from base) */
.skills .expertise-row-tags .skill-tag:not(.skill-linked) {
  opacity: 0.5;
}

/* Skill tag inline expansion - uses absolute positioning to prevent reflow */
.skills .expertise-row-tags .skill-tag.skill-linked {
  position: relative;
  z-index: 1;
  border: 2px solid transparent;
}

.skills .expertise-row-tags .skill-tag.skill-linked:hover {
  z-index: 10;
}

.skills .expertise-row-tags .skill-tag .skill-name {
  display: inline-block;
  position: relative;
  z-index: 2;
}

.skills .expertise-row-tags .skill-tag .skill-expand {
  position: absolute;
  z-index: 1;
  left: calc(100% - 6px);
  top: -2px;
  bottom: -2px;
  display: flex;
  align-items: stretch;
  white-space: nowrap;
  pointer-events: none;
  border-radius: 0 3px 3px 0;
  box-sizing: border-box;
  overflow: hidden;
  /* Animation properties */
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transform: translateX(-10px);
  transition: clip-path 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon section - matches label hover background */
.skill-icon-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

/* Title section - lighter background */
.skill-title-section {
  display: flex;
  align-items: center;
  padding: 0 10px 0 8px;
  background: rgba(212, 212, 212, 0.85);
  font-weight: 600;
}

/* Type-specific styling for expand sections */
.skill-tag.skill-type-project .skill-expand {
  border: 3px solid #8a3a40;
}
.skill-tag.skill-type-project .skill-icon-section {
  background: #8a3a40;
}
.skill-tag.skill-type-project .skill-title-section {
  color: #4a1a1d;
}
.skill-tag.skill-type-project .skill-action-icon {
  color: #fff;
}

.skill-tag.skill-type-job .skill-expand {
  border: 3px solid #0c6578;
}
.skill-tag.skill-type-job .skill-icon-section {
  background: #0c6578;
}
.skill-tag.skill-type-job .skill-title-section {
  color: #083344;
}
.skill-tag.skill-type-job .skill-action-icon {
  color: #fff;
}

.skill-tag.skill-type-education .skill-expand {
  border: 3px solid #8a8a8a;
}
.skill-tag.skill-type-education .skill-icon-section {
  background: #8a8a8a;
}
.skill-tag.skill-type-education .skill-title-section {
  color: #6a6a6a;
}
.skill-tag.skill-type-education .skill-action-icon {
  color: #fff;
}

/* Main tag border on hover - top, bottom, left only (right transparent to keep dimensions) */
.skills .expertise-row-tags .skill-tag.skill-type-project:hover {
  border: 2px solid #8a3a40;
  border-right-color: transparent;
}
.skills .expertise-row-tags .skill-tag.skill-type-job:hover {
  border: 2px solid #0c6578;
  border-right-color: transparent;
}
.skills .expertise-row-tags .skill-tag.skill-type-education:hover {
  border: 2px solid #8a8a8a;
  border-right-color: transparent;
}

/* Left-expanding: swap border sides */
.skills .expertise-row-tags .skill-tag.skill-expand-left.skill-type-project:hover {
  border: 2px solid #8a3a40;
  border-left-color: transparent;
  border-right-color: #8a3a40;
}
.skills .expertise-row-tags .skill-tag.skill-expand-left.skill-type-job:hover {
  border: 2px solid #0c6578;
  border-left-color: transparent;
  border-right-color: #0c6578;
}
.skills .expertise-row-tags .skill-tag.skill-expand-left.skill-type-education:hover {
  border: 2px solid #8a8a8a;
  border-left-color: transparent;
  border-right-color: #8a8a8a;
}

.skills .expertise-row-tags .skill-tag:hover .skill-expand {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: translateX(0);
}

/* Left-expanding variant for tags near right edge */
.skills .expertise-row-tags .skill-tag.skill-expand-left .skill-expand {
  left: auto;
  right: calc(100% - 6px);
  top: -2px;
  bottom: -2px;
  border-radius: 3px 0 0 3px;
  clip-path: inset(0 0 0 100%);
  transform: translateX(10px);
  flex-direction: row-reverse; /* Reverse so icon stays next to label */
}

/* Adjust padding for left-expand sections */
.skill-tag.skill-expand-left .skill-title-section {
  padding: 0 8px 0 10px;
}
.skill-tag.skill-expand-left .skill-icon-section {
  padding: 0 8px;
}

.skills .expertise-row-tags .skill-tag.skill-expand-left:hover .skill-expand {
  clip-path: inset(0 0 0 0);
  transform: translateX(0);
}

/* Action icon in expand section */
.skill-action-icon {
  font-size: 0.6rem;
}


/* Job/Education highlight animation when scrolled to */
.resume-item.job-highlight {
  animation: jobHighlightPulse 2s ease-out;
}

@keyframes jobHighlightPulse {
  0% { background: color-mix(in srgb, var(--accent-color), transparent 70%); }
  100% { background: transparent; }
}

/* Yellow text highlight for specific coursework/text */
.text-highlight {
  background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
  color: #1a1a1a;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  animation: textHighlightPulse 2s ease-in-out;
  transition: background 0.5s ease, color 0.3s ease, padding 0.5s ease;
}

.text-highlight.fade-out {
  background: transparent;
  color: inherit;
  padding: 0;
}

@keyframes textHighlightPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(253, 224, 71, 0); }
  50% { box-shadow: 0 0 12px 4px rgba(253, 224, 71, 0.6); }
}

/* Language 2x2 Grid */
.language-grid {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 1rem;
  width: fit-content;
  margin: 0 auto;
}

.language-grid .lang-icon-item {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  background: color-mix(in srgb, var(--default-color), transparent 99%);
  justify-self: stretch !important;
  width: 100% !important;
}

.language-grid .lang-icon-item:hover {
  background: color-mix(in srgb, var(--default-color), transparent 88%);
}

.language-grid .lang-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: var(--surface-color);
  border: 2px solid color-mix(in srgb, var(--default-color), transparent 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.language-grid .lang-icon-circle i {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

/* Language hover colors - unified grey/white */
.language-grid .lang-icon-item:hover .lang-icon-circle {
  border-color: var(--lang-hover-border);
  background: var(--lang-hover-bg);
}
.language-grid .lang-icon-item:hover .lang-icon-circle i { 
  color: var(--lang-hover); 
}

/* Python - position relative for badge */
.language-grid .lang-icon-item[data-lang="python"] {
  position: relative;
}

/* Primary Badge */
.language-grid .lang-primary-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 0.45rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.3rem;
  background: transparent;
  color: var(--default-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 70%);
  border-radius: 3px;
  opacity: 0.4;
}

.language-grid .lang-icon-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 0.25rem 0;
}

.language-grid .lang-icon-desc {
  font-size: 0.7rem;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
  margin: 0;
  line-height: 1.3;
}

/* Button reset for language items */
button.lang-icon-item {
  border: none !important;
  cursor: pointer;
  font-family: inherit;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Skill highlight when language is hovered - simple glow effect only */
.skill-tag.lang-highlight {
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.4), 0 0 16px 4px rgba(255, 255, 255, 0.2);
  transition: box-shadow 0.2s ease, opacity 0.2s ease;
}

/* Dim non-highlighted skills when a language is hovered */
.expertise-compact.lang-hover-active .skill-tag:not(.lang-highlight) {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

/* Language Link Confirmation Modal */
.lang-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lang-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lang-modal {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.lang-modal-overlay.active .lang-modal {
  transform: scale(1) translateY(0);
}

.lang-modal-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--default-color), transparent 92%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-modal-icon i {
  font-size: 2rem;
  color: var(--default-color);
  transition: color 0.3s ease;
}

/* Language icon colors in modal - neutral */
.lang-modal-icon i { color: var(--default-color); }

.lang-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 0.5rem;
}

.lang-modal-title span {
  color: var(--accent-color);
}

.lang-modal-text {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.lang-modal-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.lang-modal-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.lang-modal-btn--cancel {
  background: color-mix(in srgb, var(--default-color), transparent 90%);
  color: var(--default-color);
}

.lang-modal-btn--cancel:hover {
  background: color-mix(in srgb, var(--default-color), transparent 85%);
}

.lang-modal-btn--confirm {
  background: var(--accent-color);
  color: #1a1a1a;
}

.lang-modal-btn--confirm:hover {
  background: color-mix(in srgb, var(--accent-color), #000 15%);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 992px) {
  .skills-two-panel {
    flex-direction: column;
  }
  
  .language-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 576px) {
  .skills-panel {
    padding: 1.25rem;
  }
  
  .language-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .skills .expertise-row-title {
    font-size: 0.8rem;
  }
  
  .skills .expertise-row-tags .skill-tag {
    font-size: 0.6rem;
  }
}

.skills .skill-box {
  background-color: var(--surface-color);
  padding: 25px 20px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.skills .skill-box:hover {
  transform: translateY(-5px);
}

.skills .skill-box:hover i {
  color: var(--accent-color);
  transform: scale(1.1);
}

.skills .skill-box:hover .skill-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.skills .skill-box i {
  font-size: 36px;
  color: color-mix(in srgb, var(--accent-color), transparent 20%);
  margin-bottom: 15px;
  display: inline-block;
  transition: all 0.3s;
}

.skills .skill-box h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

.skills .skill-box .skill-tooltip {
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s;
}

/* Skills Responsive */
@media (max-width: 991.98px) {
  .skills .skills-category {
    margin-bottom: 30px;
  }
  .skills .skills-category:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .skills .skill-box {
    margin-bottom: 20px;
  }
  .skills .skill-box:last-child {
    margin-bottom: 0;
  }
}

/*=============================================
=            RESUME SECTION                  =
=============================================*/

.notbold{
  font-weight:normal;
}​

.notbold2{
  font-weight:normal;
  font-size: 14px !important;
}​

/* Specific styling for the concentration line in resume */
.resume-item .concentration-line{
  font-size: 1.25rem !important; /* Same as h5 */
  color: color-mix(in srgb, var(--default-color), transparent 20%) !important; /* Same as h3 */
  font-weight: normal !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  margin-bottom: 0.5rem !important;
}

/* Remove bottom margin from h4 when followed by concentration line */
.resume-item h4:has(+ .concentration-line) {
  margin-bottom: 0.15rem !important;
}



.resume .resume-side {
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.resume .resume-side .profile-img {
  text-align: center;
}

.resume .resume-side .profile-img img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 5px solid color-mix(in srgb, var(--accent-color), transparent 85%);
  border-radius: 50%;
}

.resume .resume-side h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--heading-color);
  font-weight: 600;
}

.resume .resume-side .contact-info li {
  margin-bottom: 1rem;
  color: var(--default-color);
}

.resume .resume-side .contact-info li i {
  width: 25px;
  color: var(--accent-color);
  margin-right: 0.5rem;
}

.resume .resume-side .skill-item {
  margin-bottom: 1.5rem;
}

.resume .resume-side .skill-item span {
  font-size: 0.9rem;
  color: var(--default-color);
}

.resume .resume-side .skill-item .progress {
  height: 8px;
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-radius: 4px;
  margin-top: 0.5rem;
}

.resume .resume-side .skill-item .progress .progress-bar {
  background-color: var(--accent-color);
  width: 0;
  transition: width 1s ease;
}

.resume .resume-section {
  margin-bottom: 3rem;
}


.resume .resume-section h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: color-mix(in srgb, #a8a8a8, transparent 20%);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Icon circle - positioned to the right of heading text */
.resume .resume-section h3 i {
  width: 45px;
  height: 45px;
  background: var(--surface-color);
  border: 2px solid color-mix(in srgb, #a8a8a8, transparent 20%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-color);
  flex-shrink: 0;
  order: 2;
}

.resume .resume-section h3 i {
  color: color-mix(in srgb, #a8a8a8, transparent 20%);
}
.resume .resume-section .resume-item {
  padding-left: 1.5rem;
  border-left: 3px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  margin-bottom: 2.5rem;
  position: relative;
  transition: border-color 0.3s ease;
}

.resume .resume-section .resume-item:hover {
  border-left-color: var(--accent-color);
}

.resume .resume-section .resume-item:before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  left: -8.5px;
  top: 4px;
  background: var(--accent-color);
  box-shadow: 0 0 0 4px var(--background-color), 0 0 0 5px color-mix(in srgb, var(--accent-color), transparent 70%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resume .resume-section .resume-item:hover:before {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px var(--background-color), 0 0 0 6px var(--accent-color);
}

/* Job Title - Primary focus */
.resume .resume-section .resume-item h4 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  color: var(--heading-color);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, #a8a8a8, transparent 20%);
  text-decoration-thickness: 0.25rem;
  text-underline-offset: 0.15rem;
  text-decoration-skip-ink: none;
  line-height: 1.3;
}

/* Subtitle styling (the part after the dash) */
.resume .resume-section .resume-item h4 .notbold {
  font-weight: 400;
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  text-decoration: none;
}

/* Professional Experience section - Gold theme */
#resume-experience .resume-section h3 {
  color: color-mix(in srgb, #f2c14b, transparent 40%);
}

#resume-experience .resume-section h3 i {
  border-color: color-mix(in srgb, #f2c14b, transparent 40%);
  color: color-mix(in srgb, #f2c14b, transparent 40%);
}

#resume-experience .resume-section .resume-item h4 {
  text-decoration-color: color-mix(in srgb, #f2c14b, transparent 40%);
}

/* Meta row: Company (left) + Date (right) on same line */
.resume .resume-section .resume-item .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

/* Company name - Left side */
.resume .resume-section .resume-item .company {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.resume .resume-section .resume-item .company i {
  color: var(--accent-color);
  font-size: 0.95rem;
}

.resume .resume-section .resume-item .company .company-type {
  font-weight: 400;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--default-color), transparent 55%);
  margin-left: 0.5rem;
  font-style: italic;
}

/* Date - Right side with badge style */
.resume .resume-section .resume-item .date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
  border-radius: 20px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bullet list container */
.resume .resume-section .resume-item ul {
  padding-left: 0;
  list-style: none;
  margin-top: 0.75rem;
}

/* Individual bullet items */
.resume .resume-section .resume-item ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Custom bullet point */
.resume .resume-section .resume-item ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: bold;
  top: 1px;
}

/* Highlight numbers and percentages in bullets */
.resume .resume-section .resume-item ul li strong,
.resume .resume-section .resume-item ul li b {
  color: var(--heading-color);
  font-weight: 600;
}

/* Mobile: stack meta-row vertically */
@media (max-width: 576px) {
  .resume .resume-section .resume-item .meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .resume .resume-section .resume-item .date-badge {
    order: -1;
  }
}

.resume .resume-section .resume-item p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 0;
}

/* Education specific: details paragraph with card styling */
.resume .resume-section .resume-item p:last-of-type:not(.company) {
  font-size: 0.9rem;
  line-height: 1.5;
  font-style: italic;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

/* Resume Responsive */
@media (max-width: 991.98px) {
  .resume .resume-side {
    margin-bottom: 2rem;
  }
}

/* New layout: Education with sidebar, Experience full width */
.resume .education-sidebar-row {
  margin-bottom: 0rem;
}

/* Custom 72/25 split for education layout with 3% gap */
@media (min-width: 992px) {
  .resume .education-sidebar-row {
    column-gap: 3%;
    margin-left: 0; /* Remove negative margin from Bootstrap row */
    margin-right: 0;
  }
  
  .resume .education-sidebar-row .edu-col-main {
    flex: 0 0 72%;
    max-width: 72%;
    order: 2;
    padding-left: 0; /* Remove Bootstrap column padding */
    padding-right: 0;
  }
  
  .resume .education-sidebar-row .edu-col-side {
    flex: 0 0 25%;
    max-width: 25%;
    padding-right: 0;
    padding-left: 0;
    order: 1;
  }
}

.resume .education-sidebar-row .resume-side {
  height: auto; /* Override the 100% height for new layout */
  background-color: color-mix(in srgb, var(--surface-color), transparent 30%);
  padding: 1.5rem;
}

/* Muted Professional Summary styling */
.resume .education-sidebar-row .resume-side .profile-img img {
  width: 100%;
  height: auto;
  opacity: 0.7;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

.resume .education-sidebar-row .resume-side .profile-img img:hover {
  opacity: 0.9;
  filter: grayscale(0%);
}

.resume .education-sidebar-row .resume-side h3 {
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--heading-color), transparent 30%);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.resume .education-sidebar-row .resume-side .summary-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem 0;
}

.resume .education-sidebar-row .resume-side p {
  font-size: 0.9rem;
  font-weight: 300;
  color: color-mix(in srgb, var(--default-color), transparent 50%);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* Ensure experience section has proper spacing from the row above */
.resume #resume-experience {
  padding-top: 0;
}

/* Ensure education section items align with experience section */
.resume #resume-education {
  padding-left: 0;
  margin-left: 0;
}

/* Make sure the resume-section inside education has no extra offset */
.resume #resume-education .resume-section {
  padding-left: 12px;
  padding-right: 12px;
  margin-left: 0;
}

/* Responsive adjustments for new layout */
@media (max-width: 991.98px) {
  .resume .education-sidebar-row {
    flex-direction: column-reverse; /* Sidebar appears above education on mobile */
  }
  
  .resume .education-sidebar-row > div {
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .resume .education-sidebar-row .resume-side {
    margin-bottom: 2rem;
  }
}

/* Mobile: Ensure consistent padding for resume sections */
@media (max-width: 576px) {
  .resume .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .resume .education-sidebar-row,
  .resume .row {
    margin-left: 0;
    margin-right: 0;
  }
  
  .resume .education-sidebar-row .edu-col-main,
  .resume .education-sidebar-row .edu-col-side,
  .resume .row > .col-12 {
    padding-left: 0;
    padding-right: 0;
  }
  
  /* Ensure both sections have same left alignment */
  #resume-education,
  #resume-experience {
    padding-left: 0;
    padding-right: 0;
  }
  
  .resume .resume-section {
    padding-left: 0;
    padding-right: 0;
  }
  
  /* Prevent resume items from causing overflow */
  .resume .resume-section .resume-item {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  
  .resume .resume-section .resume-item ul {
    max-width: 100%;
  }
  
  .resume .resume-section .resume-item ul li {
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

/*=============================================
=            RESUME COMPONENTS               =
=============================================*/

.skill-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  margin: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Match Stats Section Colors */
.badge-accent {
  background-color: color-mix(in srgb, var(--accent-color), transparent 80%);
}
.badge-orange {
  background-color: color-mix(in srgb, #ff7e00, transparent 80%);
}
.badge-green {
  background-color: color-mix(in srgb, #00c875, transparent 80%);
}
.badge-pink {
  background-color: color-mix(in srgb, #e83e8c, transparent 80%);
}

/* Unified Skills Display with Legend */
.skills-unified h3 {
  margin-bottom: 0.5rem;
}

.skills-unified .skills-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
}

.skills-unified .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
}

.skills-unified .legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Legend dot colors match badge colors */
.skills-unified .legend-dot.badge-accent {
  background-color: color-mix(in srgb, var(--accent-color), transparent 40%);
}
.skills-unified .legend-dot.badge-orange {
  background-color: color-mix(in srgb, #ff7e00, transparent 40%);
}
.skills-unified .legend-dot.badge-green {
  background-color: color-mix(in srgb, #00c875, transparent 40%);
}
.skills-unified .legend-dot.badge-pink {
  background-color: color-mix(in srgb, #e83e8c, transparent 40%);
}

.skills-unified .skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.skill-badge-sm {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  transition: transform 0.2s ease;
}

.skill-badge-sm:hover {
  transform: translateY(-1px);
}

.resume-btn {
  padding: 0px 5px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid;
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border-color: var(--accent-color);
}

.resume-btn:hover {
  background-color: color-mix(in srgb, var(--accent-color), black 10%);
  transform: translateY(-2px);
  color: var(--contrast-color);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--accent-color), transparent 70%);
}

/*=============================================
=            PORTFOLIO SECTION               =
=============================================*/

/* Portfolio Horizontal Tabs */
.portfolio .portfolio-tabs-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.portfolio .portfolio-filters.portfolio-tabs {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  background-color: color-mix(in srgb, var(--surface-color), var(--default-color) 4%);
  padding: 8px;
  border-radius: 12px;
}

.portfolio .portfolio-filters.portfolio-tabs li {
  cursor: pointer;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--default-color);
  transition: all 0.3s ease-in-out;
  border-radius: 8px;
  background: transparent;
  position: relative;
  border: none;
  white-space: nowrap;
}

.portfolio .portfolio-filters.portfolio-tabs li:hover {
  color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
}

.portfolio .portfolio-filters.portfolio-tabs li.filter-active {
  color: var(--contrast-color);
  background-color: var(--accent-color);
  font-weight: 600;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-color), transparent 60%);
}

/* Legacy sidebar styles (kept for backwards compatibility) */
.portfolio .filters-wrapper {
  background-color: color-mix(in srgb, var(--surface-color), var(--default-color) 3%);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.portfolio .portfolio-filters:not(.portfolio-tabs) {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portfolio .portfolio-filters:not(.portfolio-tabs) li {
  cursor: pointer;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--default-color);
  transition: all 0.3s ease-in-out;
  border-radius: 6px;
  background: transparent;
  position: relative;
  border-left: 3px solid transparent;
}

.portfolio .portfolio-filters:not(.portfolio-tabs) li:hover {
  color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-left-color: color-mix(in srgb, var(--accent-color), transparent 50%);
}

.portfolio .portfolio-filters:not(.portfolio-tabs) li.filter-active {
  color: var(--accent-color);
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-left-color: var(--accent-color);
  font-weight: 600;
}

.filter-instructions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.filter-instructions i {
  font-size: 18px;
  color: var(--default-color);
  opacity: 0.4;
  flex-shrink: 0;
  margin-top: 2px;
}

.filter-instructions p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  opacity: 0.3;
}

/* Mobile responsive for horizontal tabs */
@media (max-width: 576px) {
  .portfolio .portfolio-filters.portfolio-tabs {
    gap: 8px;
    padding: 6px;
  }
  
  .portfolio .portfolio-filters.portfolio-tabs li {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* =======================================================
 * NEW TEXT-FORWARD PORTFOLIO CARDS
 * ======================================================= */
.portfolio .portfolio-card {
  position: relative;
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
}

/* Card hover - lift, shadow, subtle glow */
.portfolio .portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px color-mix(in srgb, var(--accent-color), transparent 80%);
  border-color: color-mix(in srgb, var(--accent-color), transparent 65%);
}

/* Focus-visible ring for keyboard accessibility */
.portfolio .portfolio-card:focus-within {
  outline: none;
}

/* Stretched link covers entire card */
.portfolio .portfolio-card .stretched-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

.portfolio .portfolio-card .stretched-link:focus {
  outline: none;
}

.portfolio .portfolio-card .stretched-link:focus-visible {
  outline: none;
}

/* Card focus state (keyboard navigation) */
.portfolio .portfolio-card:has(.stretched-link:focus-visible) {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
  transform: translateY(-4px);
  box-shadow: 
    0 10px 28px rgba(0, 0, 0, 0.1),
    0 0 0 4px color-mix(in srgb, var(--accent-color), transparent 85%);
}

/* Fallback for browsers without :has() support */
@supports not selector(:has(*)) {
  .portfolio .portfolio-card .stretched-link:focus-visible + * {
    outline: 2px solid var(--accent-color);
  }
}

/* Thumbnail Section */
.portfolio .portfolio-card-thumb {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}

.portfolio .portfolio-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.portfolio .portfolio-card:hover .portfolio-card-thumb img {
  transform: scale(1.05);
  filter: grayscale(100%) blur(3px);
}

/* Date Badge on Thumbnail - top-right, stays visible on hover (under gradient) */
.portfolio .portfolio-card-date {
  position: absolute;
  z-index: 4; /* Below gradient overlay (z-index 5) so it gets covered */
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b3a40;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

/* Project icon watermark row - emerges from behind title area on hover */
.portfolio .portfolio-card-icon-watermark {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85) translateY(25px);
  z-index: 6; /* Above gradient overlay */
  opacity: 0;
  pointer-events: none;
  /* Flex row for multiple icons - no wrap, let them overflow */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 36px;
  /* Exit transition - floats back down */
  transition: 
    opacity 0.2s ease-out,
    transform 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

.portfolio .portfolio-card-icon-watermark i {
  font-size: 52px;
  color: rgba(255, 255, 255, 0.18);
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.4));
}

/* Side icons at half opacity */
.portfolio .portfolio-card-icon-watermark i.icon-side {
  opacity: 0.25;
}

/* Center icon at full opacity with extra spacing */
.portfolio .portfolio-card-icon-watermark i.icon-center {
  opacity: 1;
  scale: 1.5;
  /* margin: 0 24px; Extra gap on both sides of center icon */
  /* color: rgba(20, 30, 50, 0.374) !important; */
}

/* Icon row floats up and stays visible on hover */
.portfolio .portfolio-card:hover .portfolio-card-icon-watermark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) translateY(0);
  /* Enter transition - floats up into view */
  transition: 
    opacity 0.4s ease-in 0.12s,
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

/* Inline Category Tag (Featured/Side) */
.portfolio .portfolio-card-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--accent-color);
  vertical-align: middle;
}

/* Card Content Section */
.portfolio .portfolio-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  /* Blue top border separating title from image area */
  border-top: 10px solid rgba(20, 30, 50, 1);
}

.portfolio .portfolio-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.portfolio .portfolio-card-title .star {
  color: #f59e0b;
  font-size: 14px;
  margin-left: 6px;
}

.portfolio .portfolio-card-meta {
  display: none;
}

.portfolio .portfolio-card-desc {
  /* Position covering full thumbnail area */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px 16px 0px 16px; /* Less bottom padding to sit closer to edge */
  box-sizing: border-box;
  
  /* Flexbox to align text at bottom */
  display: flex;
  align-items: flex-end;
  
  /* Styling */
  font-family: var(--nav-font);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  letter-spacing: 0.01em;
  
  /* Gradient fades upward from bottom - covers full height */
  background: linear-gradient(
    to top,
    rgba(20, 30, 50, 1) 0%,
    rgba(20, 30, 50, 0.92) 30%,
    rgba(20, 30, 50, 0.6) 50%,
    rgba(20, 30, 50, 0.35) 70%,
    rgba(20, 30, 50, 0.2) 85%,
    rgba(20, 30, 50, 0.15) 100%
  );
  
  /* Hidden by default - starts below container, clipped */
  opacity: 0;
  transform: translateY(100%);
  z-index: 5;
  pointer-events: none; /* Allow clicks to pass through to the link */
  
  /* Exit transition - drops back down out of view */
  transition: 
    opacity 0.2s ease-out,
    transform 0.4s cubic-bezier(0.4, 0, 0.8, 1);
}

.portfolio .portfolio-card:hover .portfolio-card-desc {
  opacity: 1;
  transform: translateY(0);
  
  /* Enter transition - pushes up from bottom smoothly */
  transition: 
    opacity 0.3s ease-out 0.05s,
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.02s;
}

/* Bottom link - secondary to title, de-emphasizes on hover */
.portfolio .portfolio-card-link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--default-color);
  opacity: 0.55;
  text-decoration: none;
  transition: opacity 0.25s ease;
  /* Clamp to 1 line with ellipsis */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 576px) {
  .portfolio .portfolio-card-link {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* On card hover: DECREASE opacity - title stays dominant, metadata draws attention */
.portfolio .portfolio-card:hover .portfolio-card-link {
  opacity: 0.45;
}

.portfolio .portfolio-card-link:hover {
  opacity: 0.6;
  color: #6b2a30; /* Darker maroon on direct hover */
}

/* Link row - contains link and inline glyph */
.portfolio .portfolio-card-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

/* Inline metadata tags - fade/slide in on hover */
.portfolio .portfolio-card-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  /* Hidden by default */
  opacity: 0;
  transform: translateX(-8px);
  transition: 
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Individual tag labels - subtle grey pills */
.portfolio .portfolio-card-tags .glyph-tag {
  display: inline-block;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--default-color), transparent 92%);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--default-color);
  opacity: 0.55;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* Show tags on card hover - fade + slide in */
.portfolio .portfolio-card:hover .portfolio-card-tags {
  opacity: 1;
  transform: translateX(0);
}

/* Hide tags for viewed cards */
.portfolio .portfolio-card.viewed .portfolio-card-tags {
  display: none;
}

/* Default state: show "View Project →" */
.portfolio .portfolio-card-link .link-text-default {
  display: inline;
}

.portfolio .portfolio-card-link .link-arrow-default {
  display: inline;
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

/* Arrow de-emphasizes with link on hover */
.portfolio .portfolio-card:hover .portfolio-card-link .link-arrow-default {
  opacity: 0.5;
}

/* Hover state text - hidden (not used) */
.portfolio .portfolio-card-link .link-text-hover {
  display: none;
}

/* Link text toggle for viewed state */
.portfolio .portfolio-card-link .link-text-viewed {
  display: none;
}

.portfolio .portfolio-card.viewed .portfolio-card-link .link-text-default,
.portfolio .portfolio-card.viewed .portfolio-card-link .link-arrow-default,
.portfolio .portfolio-card.viewed .portfolio-card-link .link-text-hover {
  display: none;
}

.portfolio .portfolio-card.viewed .portfolio-card-link .link-text-viewed {
  display: none; /* Hidden by default */
}

/* Show viewed link text only on hover */
.portfolio .portfolio-card.viewed:hover .portfolio-card-link .link-text-viewed {
  display: inline;
}

/* ===== VIEWED CARD STATE ===== */
/* Hide thumbnail area for viewed cards */
.portfolio .portfolio-card.viewed .portfolio-card-thumb {
  display: none;
}

/* Adjust content padding for viewed cards */
.portfolio .portfolio-card.viewed .portfolio-card-content {
  padding: 24px;
  /* Blue background matching the top border */
  /* background: rgba(20, 30, 50, 1); */
  /* background: rgba(34, 34, 34, 0.5); */
  /* background: color-mix(in srgb, #0a1225bb, transparent 60%); */
  background: rgba(20, 30, 50, 0.95);
  /* Remove the top border since the whole area is now blue */
  border-top: none;
}

/* Style the viewed card */
.portfolio .portfolio-card.viewed {
  background: rgba(20, 30, 50, 1); /* Match the blue border color */
  border-style: dashed;
  border-color: color-mix(in srgb, var(--default-color), transparent 85%);
}

.portfolio .portfolio-card.viewed:hover {
  border-color: color-mix(in srgb, var(--accent-color), transparent 60%);
  transform: translateY(-3px);
}

/* Light text for viewed cards on blue background */
.portfolio .portfolio-card.viewed .portfolio-card-title {
  color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}
/* Light text for viewed cards on blue background */
.portfolio .portfolio-card.viewed:hover .portfolio-card-title {
  color: var(--accent-color);
}

.portfolio .portfolio-card.viewed .portfolio-card-link {
  color: rgba(255, 255, 255, 0.7);
}

.portfolio .portfolio-card.viewed .portfolio-card-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Viewed badge is shown for viewed cards (already handled above) */

/* Viewed Badge for new cards - clickable button */
.portfolio .portfolio-card .viewed-badge {
  position: absolute;
  top: 50%; /* Vertically centered */
  right: 16px;
  transform: translateY(-50%); /* Center adjustment */
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15); /* Subtle light background on blue */
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8); /* Light icon on blue background */
  font-size: 14px;
  /* Button reset */
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  cursor: pointer;
  /* Must be above stretched-link (z-index: 10) to be clickable */
  z-index: 15;
  pointer-events: auto;
  /* Transitions */
  transition: 
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.portfolio .portfolio-card.viewed .viewed-badge {
  display: flex;
}

/* Hover effect for viewed badge */
.portfolio .portfolio-card.viewed .viewed-badge:hover {
  transform: translateY(-50%) scale(1.1); /* Keep vertical centering */
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.portfolio .portfolio-card.viewed .viewed-badge:active {
  transform: translateY(-50%) scale(0.95); /* Keep vertical centering */
}

/* Tooltip for viewed badge - positioned to the LEFT to avoid overflow clipping */
.portfolio .portfolio-card .viewed-badge .viewed-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%) translateX(4px);
  white-space: nowrap;
  
  /* Styling to match site */
  background: rgba(20, 30, 50, 0.95);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  
  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  
  /* Transitions */
  transition: 
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow - pointing RIGHT toward the checkmark */
.portfolio .portfolio-card .viewed-badge .viewed-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: rgba(20, 30, 50, 0.95);
}

/* Show tooltip on hover */
.portfolio .portfolio-card.viewed .viewed-badge:hover .viewed-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Election highlight */
.portfolio .portfolio-card.election-highlight {
  border-color: color-mix(in srgb, #f59e0b, transparent 60%);
}

.portfolio .portfolio-card.election-highlight:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 32px color-mix(in srgb, #f59e0b, transparent 85%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .portfolio .portfolio-card-thumb {
    height: 140px;
  }
  
  .portfolio .portfolio-card-content {
    padding: 16px;
  }
  
  .portfolio .portfolio-card-title {
    font-size: 16px;
  }
  
  .portfolio .portfolio-card-desc {
    -webkit-line-clamp: 2;
  }
}

/* =======================================================
 * LEGACY PORTFOLIO WRAP STYLES (kept for backwards compatibility)
 * ======================================================= */
.portfolio .portfolio-wrap {
  transition: 0.4s;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  height: 100%;
  background: color-mix(in srgb, var(--accent-color), transparent 30%);
  cursor: pointer;
  /* Prevent text selection to improve clickability */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Ensure pointer events work properly */
  pointer-events: auto;
}

.portfolio .portfolio-wrap img {
  transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
  width: 100%;
  height: 245px;
  object-fit: cover;
  opacity: 0.8;
}
/* Global Section Titles */
#projects .section-title {
  text-align: center;
  padding-bottom:40px;
  position: relative;
}
.portfolio .portfolio-wrap .portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 12px;
  padding-top: 40px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.6) 70%,
    rgba(0, 0, 0, 0.3) 85%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 3;
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  transform: translateY(20px);
  opacity: 0;
}

.portfolio .portfolio-wrap .portfolio-info .content {
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  transform: translateY(20px);
  /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Ensure pointer events don't interfere */
  pointer-events: none;
}

.portfolio .portfolio-wrap .portfolio-info .category {
  display: inline-block;
  color: var(--contrast-color);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
  /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Ensure pointer events don't interfere */
  pointer-events: none;
}

.portfolio .portfolio-wrap .portfolio-info h4 {
  font-size: 20px;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 15px;
  /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Ensure pointer events don't interfere */
  pointer-events: none;
}

.portfolio .portfolio-wrap .portfolio-info .portfolio-links {
  display: flex;
  gap: 12px;
}

.portfolio .portfolio-wrap .portfolio-info .portfolio-links a {
  color: var(--contrast-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: color-mix(in srgb, var(--accent-color), transparent 30%);
  border-radius: 50%;
  font-size: 18px;
  transition: 0.3s;
}

.portfolio .portfolio-wrap .portfolio-info .portfolio-links a:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

.portfolio .portfolio-wrap:hover,
.portfolio .portfolio-item:hover .portfolio-wrap {
  transform: translateY(-5px);
}

.portfolio .portfolio-wrap:hover img,
.portfolio .portfolio-item:hover .portfolio-wrap img {
  transform: scale(1.08);
}

.portfolio .portfolio-wrap:hover .portfolio-info,
.portfolio .portfolio-item:hover .portfolio-wrap .portfolio-info {
  transform: translateY(0);
  opacity: 1;
}

.portfolio .portfolio-wrap:hover .portfolio-info .content,
.portfolio .portfolio-item:hover .portfolio-wrap .portfolio-info .content {
  transform: translateY(0);
}

/* Portfolio Title Overlay */
.portfolio-wrap .portfolio-title {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 0;
  z-index: 30;
  pointer-events: none;
}

.portfolio-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* background: rgba(0, 0, 0, 0.5); */
  background: color-mix(in srgb, color-mix(in srgb, #172852, rgb(2, 10, 47) 40%), transparent 45%);
  backdrop-filter: blur(10px);
  border-radius: 8px 0 0 8px;
  padding: 6px 12px;
  padding-right: 24px;
  overflow: hidden;
}

/* Vertical accent bar for project state - new/unopened projects */
.portfolio-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #1e293b; /* Dark slate for visibility on light backgrounds */
  border-radius: 8px 0 0 8px;
  transition: width 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  opacity: 1;
}

/* Viewed projects - thinner, lighter accent bar */
.portfolio-wrap.viewed .portfolio-title::before {
  width: 0px;
  background: color-mix(in srgb, #1e293b, transparent 50%);
  opacity: 0.4;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .portfolio-title::before {
    transition: none;
  }
}

.portfolio-wrap .portfolio-title h4 {
  font-size: 20px;
  color: var(--heading-color);
  font-weight: 600;
  margin: 0;
  padding: 0;
  transition: color 0.3s ease;
  /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Ensure pointer events don't interfere */
  pointer-events: none;
}

/* Viewed projects - lighter title color */
.portfolio-wrap.viewed .portfolio-title h4 {
  color: color-mix(in srgb, var(--heading-color), transparent 40%);
}

/* Portfolio Buttons */
.portfolio .btn-outline-secondary {
  border-radius: 8px;
  font-weight: 500;
  background-color: var(--contrast-color); 
  color: #fff;
  opacity: 0.5;
  margin-bottom: 0px;
}

.portfolio .btn-outline-secondary:hover {
  background-color: var(--contrast-color); 
  color: #fff;
  font-weight: 800;
}

.portfolio .portfolio-wrap .portfolio-info .btn {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  padding-left: 5;
  padding-right: 5;
  padding-top: 2;
  padding-bottom: 2;
  color: var(--contrast-color);
  font-size: 12px;
  font-weight: 600;
  border-color: color-mix(in srgb, var(--background-color), transparent 40%);
  box-shadow: 0 0px 10px color-mix(in srgb, white, transparent 15%);
  margin-bottom: 6px;
}


/* Ensure all text elements in portfolio items don't interfere with clicks */
.portfolio .portfolio-wrap h4,
.portfolio .portfolio-wrap h6,
.portfolio .portfolio-wrap p,
.portfolio .portfolio-wrap span,
.portfolio .portfolio-wrap div:not(.portfolio-links) {
  /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Ensure pointer events don't interfere with the stretched link */
  pointer-events: none;
}

/* Allow portfolio links to still be clickable */
.portfolio .portfolio-wrap .portfolio-links,
.portfolio .portfolio-wrap .portfolio-links * {
  pointer-events: auto;
}

.portfolio-title .star {
  color: gold;
  margin-left: 6px;
  font-size: 1.1em;
  vertical-align: middle;
  opacity: 0.8;
}

/* Hide star when project is viewed */
.portfolio-wrap.viewed .portfolio-title .star {
  display: none;
}

/* Portfolio Responsive */
@media (max-width: 991px) {
  .portfolio .filter-sidebar {
    margin-bottom: 30px;
  }
  .portfolio .filters-wrapper {
    padding: 20px;
  }
  .portfolio .portfolio-filters {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .portfolio .portfolio-filters li {
    padding: 8px 16px;
    border: 1px solid color-mix(in srgb, var(--accent-color), transparent 80%);
    border-left-width: 3px;
  }
  .filter-instructions {
    margin-top: 16px;
    padding-top: 16px;
  }
}

/*=============================================
=            TESTIMONIALS SECTION            =
=============================================*/

.testimonials .testimonial-masonry {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 2rem;
  position: relative;
}

.testimonials .testimonial-masonry::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent-color), transparent 95%), transparent);
  opacity: 0.5;
  z-index: -1;
}

.testimonials .testimonial-item:nth-child(3n-1) {
  margin-top: 3rem;
}

.testimonials .testimonial-item:nth-child(3n) {
  margin-top: 1.5rem;
}

.testimonials .testimonial-item.highlight .testimonial-content {
  background-color: color-mix(in srgb, var(--accent-color), transparent 92%);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 70%);
}

.testimonials .testimonial-item.highlight .testimonial-content .quote-pattern {
  background-color: #3c3c3c;
  border: 1px solid #707070;
}

.testimonials .testimonial-item.highlight .testimonial-content .quote-pattern i {
  color: var(--accent-color);
}

.testimonials .testimonial-content {
  background-color: var(--surface-color);
  border-radius: 20px;
  padding: 1.8rem;
  padding-bottom: 1.2rem;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
}

.testimonials .testimonial-content:hover {
  transform: translateY(-5px);
}

.testimonials .testimonial-content p {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0.575rem 0 0.575rem 0;
  position: relative;
  font-family: var(--default-font);
  color: color-mix(in srgb, var(--default-color), transparent 10%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.testimonials .testimonial-content:hover p {
  opacity: 1;
}

.testimonials .testimonial-content p strong {
  transition: opacity 0.3s ease;
}

.testimonials code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.1rem 0.2rem;
  color: var(--default-color);
  /* font-style: italic; */
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8em;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.testimonials .testimonial-content h4 {
  margin-bottom: 0.75rem;
  font-family: var(--default-font);
}

.testimonials .quote-pattern {
  position: absolute;
  top: -1.95rem;
  left: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--surface-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
  font-size: 2rem;
  color: var(--accent-color);
}

.testimonials .client-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
}

.testimonials .client-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.testimonials .client-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Disabled old hover scaling - now handled by JavaScript .active class
.testimonials .client-image:hover {
  transform: scale(1.5);
}

.testimonials .client-image:hover img {
  transform: scale(1.2);
}
*/

.testimonials .client-details h3 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

/* .testimonials .client-details .position {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--heading-color), transparent 20%);
} */


/* Testimonials Responsive */
@media (max-width: 1199.98px) {
  .testimonials .testimonial-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .testimonials .testimonial-item:nth-child(3n-1),
  .testimonials .testimonial-item:nth-child(3n) {
    margin-top: 0;
  }
  .testimonials .testimonial-item:nth-child(even) {
    margin-top: 2rem;
  }
  
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 767.98px) {
  .testimonials .testimonial-masonry {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .testimonials .testimonial-item:nth-child(even) {
    margin-top: 0;
  }
  .testimonials .testimonial-content {
    padding: 1.5rem;
  }
  .testimonials .testimonial-content p {
    font-size: 0.9375rem;
    margin: 1.25rem 0;
  }
  .testimonials .quote-pattern {
    width: 2.25rem;
    height: 2.25rem;
    top: -1.125rem;
  }
  .testimonials .quote-pattern i {
    font-size: 1.125rem;
  }
  /* .testimonials .client-info {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  } */
  .testimonials .client-image {
    width: 45px;
    height: 45px;
  }
  .testimonials .client-details h3 {
    font-size: 1rem;
  }
  .testimonials .client-details .position {
    font-size: 0.8125rem;
  }
}



/* Footer card styling */
.testimonial-item.footer-card {
  grid-column: 1 / -1; /* Span full width across all columns */
  margin-top: 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.footer-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 12px;
}

.footer-title {
  margin: 0;
  font-family: var(--default-font);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  grid-column: 1 / -1; /* Span full width */
}

.footer-column {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.footer-emoji {
  position: absolute;
  left: 10%;
  top: 50%;
  transform: translateY(-50%) translateX(-50%);
  font-size: 1.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-item {
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--default-color);
}

.testimonials .testimonial-content .footer-content {
  padding: 1rem !important;
}


/* Footer card matches other cards but reads like an appendix */
.footer-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,255,255,0.0);
  border-radius: 18px;                 /* match your card radius */
  background: rgba(#1f1f1f,0.0);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
  padding: 20px 22px;
}

/* Grid layout */
.footer-content { display: grid; gap: 16px; }
.footer-header   { text-align: center; }

/* Title underline like your card dividers */
.footer-title {
  font-family: monospace;
  margin: 0 0 6px;
  position: relative;
}
.footer-title::after {
  content: "";
  display: block;
  height: 1px;
  width: 100%;
  margin: 10px auto 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
}

/* Tiny pill "3 open" */
.footer-badge {
  font-size: .75rem;
  padding: 2px 8px;
  margin-left: 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 500;
}

/* Three equal columns w/ subtle vertical separators */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  position: relative;
}


/* Emoji tokens to match circular photos */
.footer-emoji {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--default-color);
  border: 2px solid color-mix(in srgb, #1f1f1f, transparent 50%);
  margin: 0 auto 8px;
  font-size: 36px;
}

/* Code chips for the lines */
.footer-chip {
  font-family: monospace;
  text-align: left;
  padding: 8px 10px;
  padding-left: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #1f1f1f;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2) inset;
  width: 80%;
  margin: 0 auto;
  position: relative;
}

/* Responsive: stack columns on small screens */
@media (max-width: 640px) {
  .footer-columns { grid-template-columns: 1fr; }
  .footer-columns::before { display: none; }
}


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

.contact .info-box {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  padding: 3rem;
  border-radius: 1rem;
  height: 100%;
}

.contact .info-box h3 {
  color: var(--contrast-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact .info-box p {
  opacity: 0.8;
  margin-bottom: 2rem;
}

.contact .info-box a {
  color: var(--contrast-color);
}

.contact .info-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact .info-item:last-child {
  margin-bottom: 0;
}

.contact .info-item .icon-box {
  width: 3.5rem;
  height: 3.5rem;
  background-color: color-mix(in srgb, var(--contrast-color), transparent 85%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: 0.3s;
}

.contact .info-item .icon-box i {
  font-size: 1.5rem;
  color: var(--contrast-color);
}

.contact .info-item:hover .icon-box {
  background-color: color-mix(in srgb, var(--contrast-color), transparent 70%);
}

.contact .info-item .content h4 {
  color: var(--contrast-color);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.contact .info-item .content p {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.contact .info-item .content p:last-child {
  margin-bottom: 0;
}

.contact .contact-form {
  background-color: var(--surface-color);
  padding: 3rem;
  border-radius: 1rem;
  height: 100%;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);
}

.contact .contact-form h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact .contact-form p {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  margin-bottom: 2rem;
}

.contact .contact-form .form-control,
.contact .contact-form .form-select {
  padding: 0.875rem 1.25rem;
  border-color: color-mix(in srgb, var(--default-color), transparent 90%);
  border-radius: 0.5rem;
  background-color: color-mix(in srgb, var(--surface-color) 90%, white 5%);
  color: var(--default-color);
}

.contact .contact-form .form-control:focus,
.contact .contact-form .form-select:focus {
  box-shadow: none;
  border-color: var(--accent-color);
}

.contact .contact-form .form-control::placeholder,
.contact .contact-form .form-select::placeholder {
  color: color-mix(in srgb, var(--default-color), transparent 50%);
}

.contact .contact-form .btn {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  padding: 1rem 2rem;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
}

.contact .contact-form .btn i {
  font-size: 1.25rem;
}

.contact .contact-form .btn:hover {
  background-color: color-mix(in srgb, var(--accent-color), var(--contrast-color) 20%);
}

/* Contact Responsive */
@media (max-width: 992px) {
  .contact .info-box,
  .contact .contact-form {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .contact .info-box h3,
  .contact .contact-form h3 {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .contact .contact-form h3 {
    font-size: 1.75rem;
  }
}

/*=============================================
=            MODAL COMPONENTS                 =
=============================================*/

/*--------------------------------------------------------------
# Project Modal - Two Column Editorial Layout
--------------------------------------------------------------*/
#projectModal .modal-dialog {
  max-width: 1200px;
}

#projectModal .modal-content {
  background: var(--surface-color);
  color: var(--default-color);
  border-radius: 16px;
  border: none;
  position: relative;
  overflow: hidden;
}

/* Close button - absolutely positioned */
#projectModal .modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 100;
  background: color-mix(in srgb, var(--default-color), transparent 95%);
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.3s ease;
  border: none;
}

/* Ensure the X icon is visible */
#projectModal .modal-close-btn::before {
  content: "×";
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  color: var(--default-color);
}

#projectModal .modal-close-btn:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--default-color), transparent 88%);
  transform: rotate(90deg);
}

/* Modal Body - No padding, grid handles it */
#projectModal .modal-body {
  padding: 0;
}

/* Two Column Grid Layout */
.modal-two-col {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 0;
}

/*--------------------------------------------------------------
# Left Column - Title, Meta & Media (Fixed Height)
--------------------------------------------------------------*/
.modal-col-left {
  background: color-mix(in srgb, var(--default-color), transparent 98%);
  padding: 42px 40px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid color-mix(in srgb, var(--default-color), transparent 95%);
  overflow: hidden;
  max-height: 85vh;
}

/* Title section in left column - fixed */
.modal-col-left .modal-title-section {
  margin-bottom: 18px;
  flex-shrink: 0;
}

/* Meta section in left column - scrollable if needed */
.modal-col-left .modal-meta-actions {
  margin-bottom: 24px;
  flex-shrink: 0;
  max-height: 200px;
  overflow: visible; /* Allow hover effects to show */
  padding-right: 8px;
}

/* Custom scrollbar for meta section */
.modal-col-left .modal-meta-actions::-webkit-scrollbar {
  width: 4px;
}

.modal-col-left .modal-meta-actions::-webkit-scrollbar-track {
  background: transparent;
}

.modal-col-left .modal-meta-actions::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--default-color), transparent 85%);
  border-radius: 10px;
}

.modal-col-left .modal-meta-actions::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--default-color), transparent 70%);
}

/* Media section - always visible, sized to content */
.modal-col-left .project-media {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-col-left .project-thumbnails {
  flex-shrink: 0;
  margin-top: 24px;
  margin-bottom: auto;
}

/*--------------------------------------------------------------
# Right Column - Content with Hierarchy
--------------------------------------------------------------*/
.modal-col-right {
  padding: 42px 50px 60px 40px;
  overflow-y: auto;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Custom scrollbar */
.modal-col-right::-webkit-scrollbar {
  width: 6px;
}

.modal-col-right::-webkit-scrollbar-track {
  background: transparent;
}

.modal-col-right::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--default-color), transparent 85%);
  border-radius: 10px;
}

.modal-col-right::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--default-color), transparent 70%);
}

/*--------------------------------------------------------------
# Title Section - Dominant Visual Element
--------------------------------------------------------------*/
.modal-title-section {
  margin-bottom: 20px;
}

.modal-title-section .modal-title {
  color: var(--heading-color);
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.modal-title-section .project-course {
  color: var(--accent-color);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/*--------------------------------------------------------------
# Meta & Actions Section
--------------------------------------------------------------*/
.modal-meta-actions {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 93%);
}

/* Links Section Label - inline with buttons */
.project-actions .links-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--default-color);
  opacity: 0.55;
  margin-right: 6px;
  align-self: center;
  white-space: nowrap;
}

/* Categories (Tags) - hidden, kept for backwards compatibility */
.project-categories {
  display: none;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.project-categories .badge {
  background: color-mix(in srgb, var(--accent-color), transparent 85%);
  color: var(--heading-color);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.8;
}

/* Action Buttons */
.project-actions {
  display: flex;
  flex-wrap: wrap;
  /* padding: 4px; Room for hover effects
  margin: -4px; Compensate for padding */
  gap: 10px;
}

.project-actions .btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 300;
  transition: all 0.25s ease;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  background: rgba(56, 5, 9, 0.549);
  color: color-mix(in srgb, var(--default-color), transparent 60%);
}

.project-actions .btn:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  border-color: var(--accent-color);
  color: var(--heading-color);
  transform: translateY(-1px);
  font-weight: 500;
}

.project-actions .btn i {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Compact mode when meta section is scrollable */
@container (max-height: 200px) {
  .project-actions {
    gap: 6px;
  }
  
  .project-actions .btn {
    font-size: 0.8125rem;
    padding: 6px 12px;
    border-radius: 6px;
  }
  
  .project-categories .badge {
    font-size: 0.625rem;
    padding: 4px 10px;
  }
}

/* Fallback compact mode using media queries */
.modal-col-left .modal-meta-actions[data-compact] .project-actions {
  gap: 6px;
}

.modal-col-left .modal-meta-actions[data-compact] .project-actions .btn {
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: 6px;
}

.modal-col-left .modal-meta-actions[data-compact] .project-categories .badge {
  font-size: 0.625rem;
  padding: 4px 10px;
}

/* Project Disclaimer - small muted text for sensitive projects */
.project-disclaimer {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--default-color);
  opacity: 0.55;
  line-height: 1.5;
  padding: 12px 14px;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--default-color), transparent 96%);
  border-left: 3px solid color-mix(in srgb, var(--default-color), transparent 80%);
  border-radius: 0 6px 6px 0;
}

/*--------------------------------------------------------------
# Content Sections - Clear Hierarchy
--------------------------------------------------------------*/
.modal-content-section {
  margin-bottom: 36px;
}

.modal-content-section:last-child {
  margin-bottom: 0;
}

/* Section Labels */
.section-label {
  color: color-mix(in srgb, var(--heading-color), transparent 30%);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/*--------------------------------------------------------------
# Overview Section - Summary Paragraph
--------------------------------------------------------------*/
.overview-intro {
  color: var(--default-color);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  margin: 0;
}

/*--------------------------------------------------------------
# Details Section - Bullet List
--------------------------------------------------------------*/
.details-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.details-list li {
  color: color-mix(in srgb, var(--default-color), transparent 10%);
  font-size: 0.9375rem;
  line-height: 1.65;
  padding-left: 24px;
  margin-bottom: 14px;
  position: relative;
}

.details-list li:last-child {
  margin-bottom: 0;
}

.details-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
}

/*--------------------------------------------------------------
# Features Section - Technical Highlights
--------------------------------------------------------------*/
.modal-features-section {
  /* background: color-mix(in srgb, var(--default-color), transparent 97%); */
  background: color-mix(in srgb, #172852, transparent 80%);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 94%);
}

.modal-features-section .section-label {
  margin-bottom: 14px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.features-grid .feature-item {
  display: grid !important;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0;
  column-gap: 14px;
  align-items: center;
}

.features-grid .feature-item > i {
  color: var(--accent-color);
  font-size: 1.5rem;
  flex-shrink: 0;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.features-grid .feature-item > div {
  grid-column: 2;
  grid-row: 1;
  display: contents;
}

.features-grid .feature-item h6 {
  color: var(--heading-color);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  grid-column: 2;
  grid-row: 1;
}

.features-grid .feature-item p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
  grid-column: 1 / -1;
  grid-row: 2;
}

/*--------------------------------------------------------------
# Media Styling in Left Column
--------------------------------------------------------------*/
#projectModal .project-media {
  width: 100%;
  max-width: 100%;
}

/*--------------------------------------------------------------
# Thumbnail Gallery
--------------------------------------------------------------*/
.project-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.project-thumbnail {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  background: var(--surface-color);
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumbnail:hover {
  border-color: color-mix(in srgb, var(--accent-color), transparent 50%);
  transform: translateY(-2px);
}

.project-thumbnail.active {
  border-color: color-mix(in srgb, #f2c14b, transparent 20%);
  border-width: 3px;
  box-shadow: 0 0px 2px rgba(255, 255, 255, 0.45);
}

.project-thumbnail.video-thumb {
  position: relative;
}

.project-thumbnail.video-thumb::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Video placeholder thumbnail (no preview image) */
.project-thumbnail .video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-color) 0%, color-mix(in srgb, var(--surface-color), black 20%) 100%);
  color: var(--accent-color);
}

.project-thumbnail .video-placeholder i {
  font-size: 28px;
  transition: transform 0.2s ease;
}

.project-thumbnail:hover .video-placeholder i {
  transform: scale(1.15);
}

/* Video in project carousel */
.project-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-color);
}

/* Ensure video matches image positioning in Bootstrap ratio container */
#projectModal .project-media .ratio video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-color);
  pointer-events: auto !important;
}

.project-thumbnail.video-thumb::after {
  color: white;
  font-size: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Media blocks */
#projectModal .project-media .media-single,
#projectModal .project-media .project-media-carousel {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#projectModal .project-media .media-single,
#projectModal .project-media .ratio,
#projectModal .project-media .project-media-carousel,
#projectModal .project-media .carousel-item {
  background: var(--surface-color);
}

#projectModal .project-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--surface-color);
}

/* Bootstrap carousel controls */
#projectModal .project-media .carousel-control-prev,
#projectModal .project-media .carousel-control-next {
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  backdrop-filter: blur(4px);
  opacity: 0.8;
  transition: all 0.3s ease;
}

#projectModal .project-media .carousel-control-prev:hover,
#projectModal .project-media .carousel-control-next:hover {
  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
}

#projectModal .project-media .carousel-control-prev {
  left: 12px;
}

#projectModal .project-media .carousel-control-next {
  right: 12px;
}

/* Carousel indicators */
#projectModal .project-media .carousel-indicators {
  bottom: 12px;
  margin: 0;
}

#projectModal .project-media .carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 4px;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  transition: all 0.3s ease;
}

#projectModal .project-media .carousel-indicators button.active {
  background-color: var(--accent-color);
  width: 24px;
  border-radius: 4px;
}

/* Carousel counter */
#projectModal .project-media .carousel-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(8px);
}

#projectModal .project-media .carousel-counter .current-slide {
  color: var(--accent-color);
  font-weight: 600;
}

#projectModal .project-media .carousel-counter .total-slides {
  opacity: 0.8;
}

/*--------------------------------------------------------------
# Responsive Layout - Mobile & Tablet
--------------------------------------------------------------*/

/* Tablet: Stack columns, reduce padding */
@media (max-width: 991px) {
  .modal-two-col {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .modal-col-left {
    border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 95%);
    padding: 40px 30px;
    position: relative;
    max-height: none;
    height: auto;
    overflow-y: visible;
  }

  .modal-col-left .modal-meta-actions {
    max-height: none;
    overflow-y: visible;
  }

  .modal-col-left .project-media {
    flex: 0 0 auto;
  }

  .modal-col-right {
    padding: 40px 30px;
    max-height: none;
    overflow-y: visible;
  }

  #projectModal .modal-close-btn {
    top: 16px;
    right: 16px;
  }

  .modal-title-section .modal-title {
    font-size: 1.65rem;
  }

  .project-thumbnails {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-features-section {
    padding: 22px;
  }
}

/* Mobile: Further reduce spacing */
@media (max-width: 576px) {
  .modal-col-left {
    padding: 30px 20px;
    height: auto;
    max-height: none;
  }

  .modal-col-left .modal-meta-actions {
    max-height: none;
    overflow-y: visible;
  }

  .modal-col-left .project-media {
    flex: 0 0 auto;
  }

  .modal-col-right {
    padding: 30px 20px;
  }

  #projectModal .modal-close-btn {
    width: 36px;
    height: 36px;
    top: 12px;
    right: 12px;
  }

  .modal-title-section {
    margin-bottom: 18px;
  }

  .modal-title-section .modal-title {
    font-size: 1.5rem;
  }

  .modal-title-section .project-course {
    font-size: 0.8125rem;
  }

  .modal-meta-actions {
    padding-bottom: 20px;
    margin-bottom: 24px;
  }

  .modal-content-section {
    margin-bottom: 30px;
  }

  .overview-intro {
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  .details-list li {
    font-size: 0.875rem;
    padding-left: 20px;
    margin-bottom: 8px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .features-grid .feature-item h6 {
    font-size: 0.875rem;
  }

  .features-grid .feature-item p {
    font-size: 0.8125rem;
  }

  .modal-features-section {
    padding: 20px;
  }

  .project-actions .btn {
    font-size: 0.8125rem;
    padding: 7px 14px;
  }

  .project-thumbnails {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 6px;
    margin-top: 12px;
  }

  .project-thumbnail {
    border-radius: 6px;
  }
}

/* Modal backdrop polish */
.modal-backdrop.show {
  opacity: 0.65;
  backdrop-filter: blur(6px) saturate(1.1);
}

/* Ensure proper focus management for project modal */
#projectModal:not([inert]) {
  /* Remove any aria-hidden when modal is active */
  aria-hidden: unset !important;
}

#projectModal[inert] {
  /* Properly hide when inert */
  pointer-events: none;
}

/* Modal animations */
.modal {
  --modal-speed: 0.45s;
}

/* Bounce pop animation */
body .modal.modal-bounce.fade .modal-dialog {
  transform: scale(0.6) translateY(20px);
  filter: blur(4px);
  opacity: 0;
  transition: transform var(--modal-speed) cubic-bezier(0.34,1.56,0.64,1),
              filter calc(var(--modal-speed) - 0.1s) ease,
              opacity 0.25s ease;
}

body .modal.modal-bounce.show .modal-dialog {
  transform: scale(1) translateY(0);
  filter: blur(0);
  opacity: 1;
}

/* Elastic drop animation */
@keyframes modalDropIn {
  0%   { transform: translateY(-80px) scale(0.9); opacity: 0; }
  60%  { transform: translateY(10px)  scale(1.02); opacity: 1; }
  80%  { transform: translateY(-4px)  scale(0.995); }
  100% { transform: translateY(0)     scale(1); }
}

body .modal.modal-elastic.fade .modal-dialog {
  opacity: 0;
}

body .modal.modal-elastic.show .modal-dialog {
  animation: modalDropIn var(--modal-speed) cubic-bezier(0.22,1,0.36,1) both;
}

/* Flip 3D animation */
body .modal.modal-flip-3d.fade .modal-dialog {
  transform: perspective(900px) rotateX(-70deg) translateY(20px) scale(0.92);
  transform-origin: 50% 10%;
  opacity: 0;
  transition: transform var(--modal-speed) cubic-bezier(0.2,0.8,0.2,1), opacity 0.28s ease;
}

body .modal.modal-flip-3d.show .modal-dialog {
  transform: perspective(900px) rotateX(0) translateY(0) scale(1);
  opacity: 1;
}

/* Slide-up blur animation */
body .modal.modal-slide-blur.fade .modal-dialog {
  transform: translateY(60px);
  filter: blur(10px);
  opacity: 0;
  transition: transform var(--modal-speed) cubic-bezier(0.22,1,0.36,1),
              filter var(--modal-speed) ease,
              opacity 0.22s ease;
}

body .modal.modal-slide-blur.show .modal-dialog {
  transform: translateY(0);
  filter: blur(0);
  opacity: 1;
}

/* From corner animation */
body .modal.modal-corner.fade .modal-dialog {
  transform-origin: 90% 10%;
  transform: scale(0.6) rotate(5deg);
  opacity: 0;
  transition: transform var(--modal-speed) cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
}

body .modal.modal-corner.show .modal-dialog {
  transform: none;
  opacity: 1;
}

/* Stagger animations for modal parts */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.modal.show .modal-header {
  animation: fadeUp 0.22s ease both;
}

.modal.show .modal-body {
  animation: fadeUp 0.26s ease 0.04s both;
}

.modal.show .modal-footer {
  animation: fadeUp 0.30s ease 0.08s both;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop {
    backdrop-filter: none;
  }
  .modal .modal-dialog,
  .modal .modal-header,
  .modal .modal-body,
  .modal .modal-footer {
    transition: none !important;
    animation: none !important;
  }
}

/*--------------------------------------------------------------
# Modal Reveal Animations - Staggered Entry
--------------------------------------------------------------*/
:root {
  --stagger-step: 35ms;
}

/* Initial hidden state */
.modal-content-section {
  opacity: 0;
  transform: translateY(20px);
}

/* Left column children */
.modal-col-left .modal-title-section,
.modal-col-left .modal-meta-actions,
.modal-col-left .project-media,
.modal-col-left .project-thumbnails {
  opacity: 0;
  transform: translateY(15px);
}

/* Animation keyframes */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reveal animations with stagger - Left Column */
#projectModal.reveal .modal-col-left .modal-title-section {
  animation: fadeInUp 0.45s ease-out forwards;
  animation-delay: calc(0 * var(--stagger-step));
}

#projectModal.reveal .modal-col-left .modal-meta-actions {
  animation: fadeInUp 0.45s ease-out forwards;
  animation-delay: calc(1 * var(--stagger-step));
}

#projectModal.reveal .modal-col-left .project-media {
  animation: fadeInUp 0.5s ease-out forwards;
  animation-delay: calc(2 * var(--stagger-step));
}

#projectModal.reveal .modal-col-left .project-thumbnails {
  animation: fadeInUp 0.45s ease-out forwards;
  animation-delay: calc(3 * var(--stagger-step));
}

/* Reveal animations with stagger - Right Column */
#projectModal.reveal .modal-content-section:nth-of-type(1) {
  animation: fadeInUp 0.45s ease-out forwards;
  animation-delay: calc(4 * var(--stagger-step));
}

#projectModal.reveal .modal-details-section {
  animation: fadeInUp 0.45s ease-out forwards;
  animation-delay: calc(5 * var(--stagger-step));
}

#projectModal.reveal .modal-features-section {
  animation: fadeInUp 0.45s ease-out forwards;
  animation-delay: calc(6 * var(--stagger-step));
}

/* Stagger bullet list items */
.details-list li {
  opacity: 0;
  transform: translateX(-10px);
}

#projectModal.reveal .details-list li {
  animation: fadeInUp 0.35s ease-out forwards;
}

#projectModal.reveal .details-list li:nth-child(1) { animation-delay: calc(6 * var(--stagger-step)); }
#projectModal.reveal .details-list li:nth-child(2) { animation-delay: calc(7 * var(--stagger-step)); }
#projectModal.reveal .details-list li:nth-child(3) { animation-delay: calc(8 * var(--stagger-step)); }
#projectModal.reveal .details-list li:nth-child(4) { animation-delay: calc(9 * var(--stagger-step)); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .modal-col-left .modal-title-section,
  .modal-col-left .modal-meta-actions,
  .modal-col-left .project-media,
  .modal-col-left .project-thumbnails,
  .modal-content-section,
  .details-list li {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Modal media sizing */
#projectModal .project-media .ratio {
  max-height: 60vh;
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
}

#projectModal .project-media .ratio img,
#projectModal .project-media .ratio iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/*=============================================
=            INTERACTIVE ELEMENTS            =
=============================================*/

/* Mouse-tracking eyes (hero) */
.hero .profile-container {
  position: relative;
}

.hero .profile-image {
  display: block;
}

.cartoon-eyes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

body.has-mouse .cartoon-eyes {
  opacity: 1;
}

/* Eye sizes and pupil travel */
:root {
  --eye-w: 14px;
  --eye-h: 14px;
  --pupil-scale: 0.62;
  --pupil-max: 2px;
}

.cartoon-eyes .eye {
  position: absolute;
  width: var(--eye-w);
  height: var(--eye-h);
  background: #fbefdf;
  border-radius: 50% / 60%;
  transform: translate(-50%, -50%);
}

.cartoon-eyes .pupil {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--eye-w) * var(--pupil-scale));
  height: calc(var(--eye-h) * var(--pupil-scale));
  background: #111;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Position the two eyes using percentages */
.cartoon-eyes .e-left {
  left: 42.88%;
  top: 29.77%;
}

.cartoon-eyes .e-right {
  left: 51.70%;
  top: 29.78%;
}

/* Contact avatar eyes */
#contact-avatar {
  position: relative;
  width: fit-content;
  margin-inline: auto;
}

#contact-avatar {
  --eye-w: 7px;
  --eye-h: 7px;
  --pupil-scale: 0.55;
  --pupil-max: 1.5px;
}

#contact-avatar .e-left {
  left: 47.7%;
  top: 31.2%;
}

#contact-avatar .e-right {
  left: 55.9%;
  top: 31.3%;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cartoon-eyes {
    transition: none;
  }
}

/* Hide cartoon eyes on touch devices */
@media (hover: none) {
  .cartoon-eyes {
    display: none !important;
  }
}

/*=============================================
=            PORTFOLIO INTERACTIONS           =
=============================================*/

/* Portfolio card interactions */
.portfolio-wrap {
  cursor: pointer;
  overflow: visible; /* Allow cut corner to show */
}

/* Ensure proper stacking order */
.portfolio-wrap img {
  position: relative;
  z-index: 1;
}

/* Cut corner overlay - solid triangle that blocks the corner to create "clipped" effect */
.portfolio-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-color: var(--background-color);
  /* Triangle that blocks the top-right corner (45-degree) */
  clip-path: polygon(
    calc(100% + 15px) 0,         /* top edge at cut start */
    100% 0,                      /* top-right corner */
    100% 55px,                   /* right edge to cut end */
    calc(100% - 55px) 0          /* back to start */
  );
  z-index: 40;
  
  /* Initial hidden state */
  opacity: 0;
  visibility: hidden;
  transform: scale(0);              /* Start scaled down to 0 */
  transform-origin: top right;      /* Scale from top-right corner for fold effect */
  
  /* Transition settings - adjust timing/easing here */
  /* Try: ease-out, ease-in-out, cubic-bezier(.68,-0.55,.27,1.55) for bounce */
  transition: transform 0.3s ease-out, opacity 0.1s ease-out, visibility 0.1s ease-out;
  
  pointer-events: none;
}

/* Corner arrow CTA button */
.portfolio-wrap .card-action {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 35px;
  height: 35px;
  /* top: 10px;
  right: 10px;
  width: 40px;
  height: 40px; */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-color);
  border-radius: 50%;
  
  /* Initial hidden state - matches corner fold effect */
  opacity: 0;
  visibility: hidden;
  transform: scale(0);                  /* Start scaled down to 0 */
  transform-origin: center;             /* Scale from center of button */
  
  /* Fast transition with NO delay - used when leaving hover (arrow disappears immediately) */
  transition: transform 0.18s ease-out, opacity 0.1s ease-out, visibility 0.1s ease-out;
  
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.portfolio-wrap .card-action i {
  font-size: 16px;
  color: var(--contrast-color);
  transition: transform 0.3s ease;
}

/* Arrow rotates when CTA circle is hovered */
.portfolio-wrap .card-action:hover i {
  transform: rotate(45deg) scale(1.1);
}

/* Viewed badge icon - positioned under the arrow */
.portfolio-wrap .viewed-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  z-index: 45;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.portfolio-wrap .viewed-badge i {
  font-size: 18px;
  color: color-mix(in srgb, var(--heading-color), transparent 40%);
  opacity: 0.4;
}

/* Show viewed badge only for viewed cards */
.portfolio-wrap.viewed .viewed-badge {
  opacity: 1;
  visibility: visible;
}

/* Hide viewed badge on hover so arrow can appear */
.portfolio-wrap.viewed:hover .viewed-badge,
.portfolio-wrap.viewed:focus-within .viewed-badge {
  opacity: 0;
  visibility: hidden;
}

/* Reveal cut corner and CTA on card hover/focus */
.portfolio-wrap:hover::before,
.portfolio-wrap:focus-within::before {
  opacity: 1;
  visibility: visible;
  transform: scale(1);  /* Scale to full size - change to scale(1.1) for overshoot effect */
}

.portfolio-wrap:hover .card-action,
.portfolio-wrap:focus-within .card-action {
  opacity: 1;
  visibility: visible;
  transform: scale(1);  /* Scale to full size - matches corner fold effect */
  
  /* Override transition with delay - waits for corner fold to complete (0.5s) before appearing */
  transition: transform 0.18s ease-out 0.3s, opacity 0.1s ease-out 0.3s, visibility 0.1s ease-out 0.3s;
}

/* Ensure portfolio info is above the cut corner overlay */
.portfolio-wrap .portfolio-info {
  position: relative;
  z-index: 3;
}

/* Focus state for keyboard navigation */
.portfolio-wrap .card-action:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

.portfolio-item {
  position: relative;
  padding-bottom: 10px;
}

/* Mobile responsiveness for corner CTA */
@media (max-width: 768px) {
  .portfolio-wrap .card-action {
    width: 30px;
    height: 30px;
    top: 10px;
    right: 10px;
  }
  
  .portfolio-wrap .card-action i {
    font-size: 12px;
  }
  
  /* Viewed badge mobile sizing */
  .portfolio-wrap .viewed-badge {
    width: 30px;
    height: 30px;
    top: -5px;
    right: -5px;
  }
  
  .portfolio-wrap .viewed-badge i {
    font-size: 14px;
  }
  
  /* Smaller corner cut on mobile */
  .portfolio-wrap::before {
    clip-path: polygon(
      calc(100% - 50px) 0,
      100% 0,
      100% 50px,
      calc(100% - 50px) 0
    );
  }
  
  /* Reduce right padding on project titles for mobile */
  .portfolio-title {
    padding-right: 12px;
  }
}


/* Viewed projects styling */
.portfolio-wrap.viewed {
  position: relative;
}

.portfolio-wrap.viewed img {
  filter: brightness(0.1) grayscale(100%);
  transition: filter 0.25s ease;
  background: black;
}

.portfolio-wrap.viewed .portfolio-title {
  background: transparent;
  backdrop-filter: none;
}

.portfolio-wrap.viewed .portfolio-info {
  background: transparent;
}

/* Corner overlay behaves the same for viewed cards - only shows on hover */
/* No override needed - uses default behavior */


/* Touch devices */
@media (hover: none) {
  .portfolio-item {
    padding-bottom: 4px;
  }
  
  /* Show hover state by default on mobile */
  .portfolio .portfolio-wrap {
    transform: translateY(-5px);
  }
  
  .portfolio .portfolio-wrap img {
    transform: scale(1.08);
  }
  
  .portfolio .portfolio-wrap .portfolio-info {
    transform: translateY(0);
    opacity: 1;
  }
  
  .portfolio .portfolio-wrap .portfolio-info .content {
    transform: translateY(0);
  }
  
  /* But hide hover state for viewed cards on mobile */
  .portfolio .portfolio-wrap.viewed {
    transform: none;
  }
  
  .portfolio .portfolio-wrap.viewed img {
    transform: none;
  }
  
  .portfolio .portfolio-wrap.viewed .portfolio-info {
    transform: translateY(20px);
    opacity: 0;
  }
  
  .portfolio .portfolio-wrap.viewed .portfolio-info .content {
    transform: translateY(20px);
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .portfolio-wrap::before,
  .portfolio-wrap .card-action,
  .portfolio-wrap .card-action i {
    animation: none;
    transition: opacity 0.15s linear, visibility 0.15s linear;
  }
  
  .portfolio-wrap:hover .card-action,
  .portfolio-wrap:focus-within .card-action {
    transform: none;
  }
  
  .portfolio-wrap .card-action:hover i {
    transform: none;
  }
}

/*=============================================
=            SPECIAL EFFECTS                 =
=============================================*/

/* Library hours bubble */
#library-hours {
  position: relative;
}

#library-hours .once-bubble {
  position: absolute;
  right: -55%;
  top: 0%;
  transform: translateY(-50%) translateX(100px) scale(0.98);
  width: 80%;
  opacity: 0;
  transition: all 0.8s ease-in-out;
  z-index: 3;
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
  line-height: 0;
}

#library-hours .once-bubble img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
}

/* Hover effect to show cartoon - slide in from right */
#library-hours:hover .once-bubble {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(0.98);
}

/* Mobile tweak */
@media (max-width: 576px) {
  #library-hours .once-bubble {
    right: -20px;
    width: 150px;
  }
}

/* Domains bridged bubble */
#domains-bridged {
  position: relative;
}

#domains-bridged .once-bubble {
  position: absolute;
  left: -50%;
  top: 20%;
  transform: translateY(-50%) translateX(-100px) scale(0.98);
  width: 80%;
  opacity: 0;
  transition: all 0.8s ease-in-out;
  z-index: 9999;
  background: transparent;
  padding: 0;
  border: 0;
  box-shadow: none;
  line-height: 0;
}

#domains-bridged .once-bubble img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
}

/* Hover effect to show cartoon - slide in from left */
#domains-bridged:hover .once-bubble {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(0.98);
}

/* Mobile tweak for domains-bridged */
@media (max-width: 576px) {
  #domains-bridged .once-bubble {
    left: -20px;
    width: 150px;
  }
}


/*=============================================
=            TESTIMONIALS INTERACTIONS       =
=============================================*/

/* Circular photo container interactions */
.testimonials .client-image.circular-photo-container {
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  border-radius: 0;
  overflow: visible;
  flex-shrink: 0;
  gap: 0;
  transform: none;
  position: relative;
}

.testimonials .client-image .circular-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  position: relative;
  z-index: 10;
  --slide-offset: 0px;
  transition: transform 0.6s ease, box-shadow 0.25s ease, opacity 0.4s ease, visibility 0.4s ease;
  transform: translate(calc(var(--tx, 0px) + var(--slide-offset, 0px)), var(--ty, 0px)) scale(1);
  filter: grayscale(1) brightness(0.7);
  pointer-events: auto;
  will-change: transform;
  cursor: pointer;
}

/* Eagles media container - contain images instead of crop */
.testimonials .eagles-media-container .circular-photo {
  object-fit: contain;
  background-color: #ffffff;
}

.testimonials .client-image .circular-photo:not(:first-child) {
  margin-left: -20px;
  opacity: 0;
  visibility: hidden;
}

/* Position each image behind the first one initially with staggered animation */
.testimonials .client-image .circular-photo:nth-child(2) {
  /* --slide-offset: -60px; */
  --slide-offset: 0px;
  transition-delay: 0.2s, 0s, 1.2s, 1.2s;
  z-index: 9;
}

.testimonials .client-image .circular-photo:nth-child(3) {
  /* --slide-offset: -120px; */
  --slide-offset: -60px;
  transition-delay: 0.4s, 0s, 1s, 1s;
  z-index: 8;
}

.testimonials .client-image .circular-photo:nth-child(4) {
  /* --slide-offset: -180px; */
  --slide-offset: -120px; 
  transition-delay: 0.6s, 0s, 0.8s, 0.8s;
  z-index: 7;
}

.testimonials .client-image .circular-photo:nth-child(5) {
  /* --slide-offset: -240px; */
  --slide-offset: -180px;
  transition-delay: 0.8s, 0s, 0.6s, 0.6s;
  z-index: 6;
}

.testimonials .client-image .circular-photo:nth-child(6) {
  /* --slide-offset: -300px; */
  --slide-offset: -240px;
  transition-delay: 1s, 0s, 0.4s, 0.4s;
  z-index: 5;
}

.testimonials .client-image .circular-photo:nth-child(7) {
  /* --slide-offset: -360px; */
  --slide-offset: -300px;
  transition-delay: 1.2s, 0s, 0.2s, 0.2s;
  z-index: 4;
}
.testimonials .client-image .circular-photo:nth-child(8) {
  /* --slide-offset: -360px; */
  --slide-offset: -360px;
  transition-delay: 1.4s, 0s, 0.0s, 0.0s;
  z-index: 3;
}


/* Hidden images inherit the slide offset from their nth-child rules */

/* Show all images on card hover - remove slide offset */
.testimonials .testimonial-content:hover .client-image .circular-photo:not(:first-child) {
  opacity: 1;
  visibility: visible;
  --slide-offset: 0px;
}

/* Badge showing count of additional images */
.circular-photo-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.3);
  /* border: 2px solid #fff; */
  border: 0px solid #ffffff00;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(255 255 255 / 50%);
  font-weight: 700;
  font-size: 1.3rem;
  position: absolute;
  left: 60px;
  top: 0;
  z-index: 9;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  filter: grayscale(0) brightness(1);
  pointer-events: none;
}

/* Hide badge on card hover */
.testimonials .testimonial-content:hover .circular-photo-badge {
  opacity: 0;
  visibility: hidden;
}

.testimonials .client-image .circular-photo.active {
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(3);
  border: 2px solid #fff;
  filter: grayscale(0) brightness(1);
  z-index: 100 !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease !important;
}

.testimonials .testimonial-content:hover .client-image .circular-photo {
  filter: grayscale(0) brightness(1);
  transition: transform 0.6s ease, filter 0.25s ease, box-shadow 0.25s ease, opacity 0.4s ease, visibility 0.4s ease;
}

/* Remove CSS hover state to prevent conflicts with JavaScript */
.testimonials .client-image .circular-photo:hover {
  /* Let JavaScript handle all hover states */
  
}

/* Ensure proper z-index reset when not active */
.testimonials .client-image .circular-photo:not(.active) {
  z-index: 10;
}

.testimonials .client-image .circular-photo:nth-child(2):not(.active) {
  z-index: 9;
}

.testimonials .client-image .circular-photo:nth-child(3):not(.active) {
  z-index: 8;
}

.testimonials .client-image .circular-photo:nth-child(4):not(.active) {
  z-index: 7;
}

.testimonials .client-image .circular-photo:nth-child(5):not(.active) {
  z-index: 6;
}

.testimonials .client-image .circular-photo:nth-child(6):not(.active) {
  z-index: 5;
}

.testimonials .client-image .circular-photo:nth-child(7):not(.active) {
  z-index: 4;
}
.testimonials .client-image .circular-photo:nth-child(8):not(.active) {
  z-index: 3;
}

.testimonials .client-image .circular-photo.zooming {
  z-index: 2147483647;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.4s ease, visibility 0.4s ease !important;
}

/* Carousel Modal Styles */
.carousel-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.carousel-modal.show {
  opacity: 1;
  visibility: visible;
}

/* Carousel container animations */
.carousel-container {
  background-color: var(--surface-color);
  border-radius: 20px;
  /* padding: 2rem; */
  max-width: 60vh; 
  max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
  display: flex;
  flex-direction: column;
  transform: scale(0.7) translateY(30px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.carousel-modal.show .carousel-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Staggered animations for carousel elements */
.carousel-header,
.carousel-image-container,
.carousel-navigation,
.carousel-indicators {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.carousel-modal.show .carousel-header {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.carousel-modal.show .carousel-image-container {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.carousel-modal.show .carousel-navigation {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.carousel-modal.show .carousel-indicators {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.carousel-container {
  background-color: var(--surface-color);
  border-radius: 20px;
  /* padding: 2rem; */
  max-width: 60vh; 
  max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 92%);
  display: flex;
  flex-direction: column;
}

.carousel-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  z-index: 15;
}

.carousel-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  transform: scale(1.1);
}

.carousel-header {
  position: absolute;
  top: calc(100% - 5.5rem - 1.5rem);
  left: 0;
  right: 0;
  padding: 1.5rem 1.5rem 0 1.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: auto;
  z-index: 10;
}

.carousel-title {
  font-size: 0rem;
  color: white;
  text-align: center;
}

.carousel-image-container {
  flex: 1;
  min-height: 0;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  background-color: color-mix(in srgb, var(--default-color), transparent 95%);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}

/* Black background for eagles media carousel */
.eagles-carousel-modal .carousel-image-container {
  background-color: #000;
}

.carousel-image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  z-index: 5;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Eagles media carousel images - contain instead of crop */
.carousel-image.eagles-carousel-image {
  object-fit: contain;
  background-color: #ffffff;
}

.carousel-image:hover {
  transform: scale(1.05);
}

/* Disable zoom on eagles carousel images to preserve aspect ratio */
.carousel-image.eagles-carousel-image:hover {
  transform: scale(1);
}

.carousel-navigation {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  pointer-events: none;
}

.carousel-nav-btn {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}

.carousel-nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.carousel-nav-btn:disabled {
  background-color: rgba(0, 0, 0, 0.3);
  cursor: not-allowed;
  transform: none;
}

.carousel-indicators {
  position: absolute;
  bottom: 0rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: auto;
  z-index: 10;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.carousel-indicator.active {
  background-color: white;
  transform: scale(1.2);
  border-color: white;
}

/* Mobile size adjustments */
@media (max-width: 767.98px) {
  .testimonials .client-image .circular-photo {
    width: 45px;
    height: 45px;
  }
  .testimonials .client-image .circular-photo:not(:first-child) {
    margin-left: -10px;
  }
  
  /* Adjust slide distances for smaller mobile images */
  .testimonials .client-image .circular-photo:nth-child(2) {
    --slide-offset: -35px;
  }
  
  .testimonials .client-image .circular-photo:nth-child(3) {
    --slide-offset: -70px;
  }
  
  .testimonials .client-image .circular-photo:nth-child(4) {
    --slide-offset: -105px;
  }
  
  .testimonials .client-image .circular-photo:nth-child(5) {
    --slide-offset: -140px;
  }
  
  .testimonials .client-image .circular-photo:nth-child(6) {
    --slide-offset: -175px;
  }
  
  .testimonials .client-image .circular-photo:nth-child(7) {
    --slide-offset: -210px;
  }
  
  .circular-photo-badge {
    width: 45px;
    height: 45px;
    font-size: 0.8rem;
    left: 35px;
  }
  
  .carousel-container {
    padding: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
  }
  
  .carousel-image-container::after {
    height: 5rem;
  }
  
  .carousel-header {
    top: calc(100% - 5rem - 1rem);
    padding: 1rem 1rem 0 1rem;
  }
  
  /* .carousel-title {
    font-size: 0.9rem;
  } */
  
  .carousel-close {
    top: 0.75rem;
    left: 0.75rem;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
  
  .carousel-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-indicators {
    bottom: 0.75rem;
  }
  
  .carousel-indicator {
    width: 8px;
    height: 8px;
  }
}

/* Ensure ancestors don't clip */
.testimonials,
.testimonial-masonry,
.testimonial-item,
.testimonial-content,
.testimonials .client-image {
  overflow: visible;
}

/*=============================================
=            UTILITY COMPONENTS              =
=============================================*/

/* Profile picture styling */
.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid var(--nav-dropdown-background-color);
  display: block;
  margin-bottom: 1.5rem;
}

/* Info box button styling */
.info-box .btn-outline-secondary {
  border-radius: 8px;
  font-weight: 500;
}

.info-box .btn-outline-secondary:hover {
  background-color: var(--contrast-color);
  color: #fff;
}

/* Button hover effects */
.btn.btn-outline-light:hover {
  box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.2);
  border: 2px solid grey;
  transition: all 0.3s ease;
  font-weight: 800;
}

/* Fun Facts section padding control */
.ff-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: visible;
}

/* Testimonials section typography to match About Me */
.testimonials .container h2 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--heading-color);
}

.testimonials .container .lead {
  font-size: 1.3rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

/* Patch Notes subtitle styling to match lead paragraph color */
#funfacts-top {
  position: relative;
}

#funfacts-top p {
  color: var(--accent-color);
  margin-top: 0px;
}

/* Horizontal separator line for collapsible section */
#collapsable-aboutme {
  position: relative;
  padding-top: 40px;
  margin-top: 40px;
}

#collapsable-aboutme::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 1px;
  background-color: color-mix(in srgb, var(--default-color), transparent 90%);
}

/* Help icon button in header */
.help-icon-btn {
  background: transparent;
  border: none;
  color: var(--accent-color);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 6px;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
  vertical-align: middle;
  line-height: 1;
}

.help-icon-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.help-icon-btn i {
  display: inline-block;
  line-height: 1;
}

/* Floating Instructions Notification */
.instructions-notification {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  margin-top: -50px;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
}

.instructions-notification.show {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.instructions-notification .instructions-bar {
  background-color: rgba(0, 0, 0, 0.85);
  padding: 12px 20px;
  padding-right: 30px;
  border-radius: 10px;
  text-align: center;
  width: fit-content;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

.instructions-notification .instructions-bar p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--default-font);
  white-space: nowrap;
  line-height: 1;
  padding-right: 10px;
}

.instructions-notification .instructions-bar i {
  opacity: 0.7;
  margin-right: 6px;
}

.instructions-close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructions-close:hover {
  color: rgba(255, 255, 255, 1);
}

/* Center with testimonials section on desktop (accounting for left nav) */
@media (min-width: 1200px) {
  .instructions-notification {
    left: 50%;
    transform: translateX(-50%) scale(0);
  }
  
  .instructions-notification.show {
    transform: translateX(-50%) scale(1);
  }
}

/* Conditional instructions for desktop vs mobile */
.instruction-desktop {
  display: block;
}

.instruction-mobile {
  display: none;
}

@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .instruction-desktop {
    display: none;
  }
  
  .instruction-mobile {
    display: block;
  }
  
  .instructions-notification .instructions-bar {
    padding: 10px 15px;
    padding-right: 40px;
  }
  
  .instructions-notification .instructions-bar p {
    font-size: 0.8rem;
    white-space: normal;
    max-width: 85vw;
  }
  
  .instructions-notification {
    bottom: 15px;
  }
}


/* Social Links Custom Tooltips */
.social-tooltip {
  position: fixed;
  transform: scale(0);
  background-color: rgba(0, 0, 0, 0.85);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  pointer-events: none;
  font-family: var(--default-font);
  
}

.social-tooltip.show {
  transform: scale(1);
  opacity: 1;
}

/* Upward-pointing caret */
.social-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 14px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(0, 0, 0, 0.85);
}

/* Testimonials button styling to match About Me */
.testimonials .container .btn {
  padding: 0.875rem 2rem;
  border-radius: 5.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 5px solid color-mix(in srgb, #f2c14b, transparent 100%);
}

.testimonials .container .btn:hover {
  border: 5px solid color-mix(in srgb, color-mix(in srgb, #f2c14b, var(--background-color) 20%), transparent 20%);
}

.testimonials .container .btn.btn-outline-light {
  background-color: transparent;
  color: var(--default-color);
  border-color: color-mix(in srgb, var(--default-color), transparent 70%);
}

.testimonials .container .btn.btn-outline-light:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  color: var(--default-color);
}

.ff-section.open {
  padding-bottom: 60px !important;
}

/* Mobile spacing for testimonials section */
@media (max-width: 768px) {
  .ff-section {
    padding-top: 1px !important;
  }
}

.aboutme-photo {

  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

/* Scroll margin for smooth scrolling */
#funfacts-top {
  scroll-margin-top: 80px;
}

/* Skills section scroll margin */
#skills {
  scroll-margin-top: 80px;
}

/* Testimonials section scroll margin */
#testimonials {
  scroll-margin-top: 80px;
}

/* Stats item positioning for bubble */
.stats-item {
  position: relative;
}

.stats-wrapper,
.stats-item {
  overflow: visible !important;
}

/*=============================================
=            RESPONSIVE OVERRIDES            =
=============================================*/

/* Ensure all sections have proper overflow handling */
section,
.section {
  overflow: visible;
}

/* Fun facts section specific */
.ff-section {
  overflow: visible;
}

/* Highlight background for bold text */
.highlight-text-primary {
  color: color-mix(in srgb, var(--default-color), transparent 0%);
  font-style: italic;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, #f2c14b, transparent 40%); 
  text-decoration-thickness: 0.25rem;
  text-underline-offset: 0.15rem;
  text-decoration-skip-ink: none;
} 

.highlight-text-secondary {
  color: color-mix(in srgb, var(--default-color), transparent 0%);
  font-style: italic;
  font-weight: 600;
} 

/* Debug button styling to match View My Work button */
.btn-debug {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border-color: var(--accent-color);
  transition: all 0.6s ease;
  padding-bottom: 0.5rem;
}

.btn-debug:hover {
  background-color: color-mix(in srgb, var(--accent-color), black 0%);
  color: var(--contrast-color);
  transform: translateY(-2px);
  box-shadow: 0 0px 35px color-mix(in srgb, #000000, transparent 0%);
}

/* Releases Button with Tag - standalone styles */
.releases-btn-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.releases-btn-with-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 50px;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.releases-btn-with-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-color: #f2c14b;
}

.releases-btn-with-tag:focus {
  outline: none;
}

.releases-btn-with-tag i {
  font-size: 14px;
  color: #1a1a1a;
}

.releases-btn-text {
  font-size: 15px;
  font-weight: 600;
}

.releases-btn-tag {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 70%);
  border-radius: 6px;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  transition: all 0.3s ease;
}

.releases-btn-wrapper:hover .releases-btn-tag {
  border-color: color-mix(in srgb, var(--default-color), transparent 50%);
  color: var(--default-color);
}

/* Stats Strip */
.releases-stats-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.releases-stats-strip.loaded {
  opacity: 1;
  transform: translateY(0);
}

.stat-item-strip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-item-strip i {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

.stat-separator {
  color: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .latest-release-preview {
    padding: 10px 14px;
  }
  
  .preview-title {
    font-size: 14px;
  }
  
  .releases-stats-strip {
    font-size: 12px;
    gap: 6px;
  }
}

/* Learn More label with clickable words */
.about .learn-more-section .learn-more-label {
  cursor: default;
  /* background-color: color-mix(in srgb, var(--contrast-color), transparent 80%); */
  background-color: color-mix(in srgb, var(--contrast-color), transparent 100%);;
  border: 2px solid color-mix(in srgb, var(--default-color), transparent 90%);
  color: color-mix(in srgb, var(--default-color), transparent 80%);
}
.about .learn-more-section .learn-more-label:hover {
  cursor: default;
  /* background-color: color-mix(in srgb, var(--contrast-color), transparent 80%); */
  background-color: color-mix(in srgb, var(--contrast-color), transparent 100%);;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 96%);
  
  color: color-mix(in srgb, var(--default-color), transparent 80%);
  transform: none;
  box-shadow: none;
}

/* Learn More section styling to match Let's Talk button */
.learn-more-section {
  margin-top: 2rem;
}

/* Center the learn-more-section on mobile devices */
@media (max-width: 768px) {
  .learn-more-section {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.learn-more-section .learn-more-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  background-color: transparent;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  border: 2px solid color-mix(in srgb, var(--default-color), transparent 98%);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: default;
  font-weight: 500;
}

.learn-more-section .learn-more-label:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  background-color: transparent;
  color: color-mix(in srgb, var(--default-color), transparent 80%);
  color: var(--default-color);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent-color), transparent 60%);
}

/* Hover effect for clickable words in learn-more-section */
.learn-more-section .clickable-word:hover {
  background-color: var(--contrast-color) !important;
  color: var(--contrast-color) !important;
  text-decoration: none;
  box-shadow: 0 0 15px 5px rgba(255,255,255,0.2);
  font-weight: 800;
}

/* .about .contact-links .learn-more-label:hover {
  background-color: color-mix(in srgb, var(--surface-color), var(--background-color) 50%);
  transform: none;
  box-shadow: none;
} */

.about .learn-more-section .clickable-word {
  color: color-mix(in srgb, var(--accent-color), transparent 60%);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  background-color: color-mix(in srgb, var(--contrast-color), var(--background-color) 80%);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 95%);
}

.about .learn-more-section .learn-more-label:hover .clickable-word {
  background-color: var(--contrast-color);
  color: var(--accent-color);
  transform: scale(1.1);
  font-weight: 500;
}

.about .learn-more-section .learn-more-label:hover .clickable-word:hover {
  background-color: var(--accent-color) !important;
  transform: scale(1.3) !important;
  color: var(--contrast-color);
  text-decoration: none;
  box-shadow: 0 0 15px 5px rgba(255,255,255,0.2);
  font-weight: 800;
}

/* JavaScript handles tooltips with colored text */

/* Custom footer styling */
.new_footer .profession-sub {
  font-size: 1rem !important;
}

/* Fun facts link styling */
.fun-facts-link {
  color: color-mix(in srgb, #4DA6FF, transparent 60%) !important;
  font-weight: 700 !important;


}

.fun-facts-link:hover {
  color: color-mix(in srgb, #4DA6FF, transparent 0%) !important;
  /* color: color-mix(in srgb, var(--default-color), transparent 0%) !important;
  text-decoration-color: color-mix(in srgb, #f2c14b, transparent 20%) !important;
  text-decoration-thickness: 0.3rem !important; */
  text-decoration: underline !important;
}

/* Fun facts link styling */
.link-resume-btn {
  color: color-mix(in srgb, #4DA6FF, transparent 10%) !important;
  font-weight: 700 !important;



}

.link-resume-btn:hover {
  color: color-mix(in srgb, #4DA6FF, transparent 0%) !important;
  /* color: color-mix(in srgb, var(--default-color), transparent 0%) !important;
  text-decoration-color: color-mix(in srgb, #f2c14b, transparent 20%) !important;
  text-decoration-thickness: 0.3rem !important; */
  text-decoration: underline !important;
}

.new-title-section {
  padding: 2.25rem;
}

/*=============================================
=            GITHUB RELEASES MODAL            =
=============================================*/

/* GitHub-inspired color variables */
:root {
  --gh-bg: #0d1117;
  --gh-surface: #161b22;
  --gh-surface-raised: #1c2128;
  --gh-border: #30363d;
  --gh-border-muted: #21262d;
  --gh-text: #e6edf3;
  --gh-text-muted: #8b949e;
  --gh-text-subtle: #6e7681;
  --gh-accent: #58a6ff;
  --gh-accent-emphasis: #1f6feb;
  --gh-green: #3fb950;
  --gh-green-muted: #238636;
  --gh-orange: #d29922;
  --gh-red: #f85149;
  --gh-purple: #a371f7;
  --gh-pink: #db61a2;
  --gh-timeline: #30363d;
}

/* Modal overlay */
.releases-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.releases-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Backdrop */
.releases-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 9, 0.85);
  backdrop-filter: blur(4px);
}

/* Main container */
.releases-container {
  position: relative;
  width: 95vw;
  max-width: 1400px;
  height: 90vh;
  max-height: 900px;
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 16px 70px rgba(0, 0, 0, 0.5);
}

.releases-modal.active .releases-container {
  transform: translateY(0) scale(1);
}

/* Header */
.releases-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--gh-surface);
  border-bottom: 1px solid var(--gh-border);
  flex-shrink: 0;
}

.releases-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gh-text);
}

.releases-header-left > i {
  color: var(--gh-text-muted);
  font-size: 16px;
}

.releases-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
}

.repo-owner {
  color: var(--gh-accent);
  font-weight: 600;
}

.breadcrumb-separator {
  color: var(--gh-text-muted);
}

.repo-name {
  color: var(--gh-accent);
  font-weight: 600;
}

.releases-tab-indicator {
  background: var(--gh-surface-raised);
  color: var(--gh-text);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
  border: 1px solid var(--gh-border);
}

.releases-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--gh-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.releases-close:hover {
  background: var(--gh-surface-raised);
  border-color: var(--gh-border);
  color: var(--gh-text);
}

/* Content area */
.releases-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.releases-sidebar {
  width: 280px;
  background: var(--gh-surface);
  border-right: 1px solid var(--gh-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.releases-repo-info {
  padding: 16px;
  border-bottom: 1px solid var(--gh-border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.releases-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--gh-border);
  flex-shrink: 0;
  object-fit: cover;
  background: var(--gh-surface-raised);
}

.releases-repo-meta h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-text);
  margin: 0 0 4px 0;
}

.releases-repo-meta p {
  font-size: 12px;
  color: var(--gh-text-muted);
  margin: 0;
  line-height: 1.4;
}

.releases-nav {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.releases-nav-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  margin-bottom: 4px;
}

.releases-nav-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--gh-text);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--gh-border-muted);
  margin-bottom: 4px;
  flex-shrink: 0;
}

.releases-nav-header i {
  font-size: 16px;
  color: var(--gh-accent);
}

.releases-nav-submenu {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gh-border) transparent;
}

.releases-nav-submenu::-webkit-scrollbar {
  width: 6px;
}

.releases-nav-submenu::-webkit-scrollbar-track {
  background: transparent;
}

.releases-nav-submenu::-webkit-scrollbar-thumb {
  background: var(--gh-border);
  border-radius: 3px;
}

.releases-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--gh-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.releases-nav-item:hover {
  background: var(--gh-surface-raised);
  color: var(--gh-text);
}

.releases-nav-item.active {
  background: rgba(56, 139, 253, 0.15);
  color: var(--gh-text);
}

.releases-nav-item.active i {
  color: var(--gh-accent);
}

.releases-nav-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.releases-nav-item i {
  font-size: 16px;
}

.releases-count {
  margin-left: auto;
  background: var(--gh-surface-raised);
  color: var(--gh-text-muted);
  padding: 0 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.releases-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gh-border);
}

.releases-license {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gh-text-muted);
}

/* Quick Navigation (Submenu Items) */
.quick-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 4px 2px 4px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
  position: relative;
  cursor: pointer;
  opacity: 0.5;
}

.quick-nav-item:hover {
  background: var(--gh-surface-raised);
  opacity: 0.8;
}

.quick-nav-item.active {
  background: rgba(56, 139, 253, 0.1);
  border-left-color: var(--gh-accent);
  opacity: 1;
}

.quick-nav-item.latest {
  opacity: 0.7;
}

.quick-nav-item.latest:hover {
  opacity: 0.9;
}

.quick-nav-item.latest.active {
  border-left-color: var(--gh-green);
  background: rgba(63, 185, 80, 0.1);
  opacity: 1;
}

.quick-nav-title-main {
  font-size: 13px;
  font-weight: 500;
  color: var(--gh-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.quick-nav-item:hover .quick-nav-title-main {
  color: var(--gh-text);
}

.quick-nav-item.active .quick-nav-title-main {
  font-weight: 600;
}

.quick-nav-item.latest .quick-nav-title-main {
  color: var(--gh-green);
}

.quick-nav-version {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 10px;
  color: var(--gh-text-subtle);
  flex-shrink: 0;
}

.quick-nav-item:hover .quick-nav-version {
  color: var(--gh-text-muted);
}

.quick-nav-item.active .quick-nav-version {
  color: var(--gh-text-muted);
}

.quick-nav-item.latest .quick-nav-version {
  color: var(--gh-green);
}

.quick-nav-badge {
  background: var(--gh-green);
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Highlight flash animation for scrolled-to release */
.release-item.highlight-flash .release-card {
  animation: highlightPulse 1.5s ease-out;
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.4);
    border-color: var(--gh-accent);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(88, 166, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(88, 166, 255, 0);
    border-color: var(--gh-border);
  }
}

/* Mobile Quick Navigation */
.releases-mobile-nav {
  display: none;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--gh-border);
  position: sticky;
  top: 0;
  background: var(--gh-bg);
  z-index: 10;
}

.releases-mobile-nav::-webkit-scrollbar {
  display: none;
}

.mobile-nav-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 14px;
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.mobile-nav-pill:hover {
  background: var(--gh-surface-raised);
  border-color: var(--gh-text-subtle);
}

.mobile-nav-pill.active {
  background: rgba(56, 139, 253, 0.15);
  border-color: var(--gh-accent);
}

.mobile-nav-pill.latest {
  border-color: var(--gh-green-muted);
}

.mobile-nav-pill.latest.active {
  border-color: var(--gh-green);
  background: rgba(63, 185, 80, 0.15);
}

.pill-version {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--gh-text);
}

.mobile-nav-pill.latest .pill-version {
  color: var(--gh-green);
}

.pill-title {
  font-size: 10px;
  color: var(--gh-text-muted);
}

/* Main content */
.releases-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--gh-border) transparent;
}

.releases-main::-webkit-scrollbar {
  width: 8px;
}

.releases-main::-webkit-scrollbar-track {
  background: transparent;
}

.releases-main::-webkit-scrollbar-thumb {
  background: var(--gh-border);
  border-radius: 4px;
}

.releases-list-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gh-border);
}

.releases-list-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--gh-text);
  margin: 0 0 8px 0;
}

.releases-description {
  font-size: 14px;
  color: var(--gh-text-muted);
  margin: 0;
}

/* Timeline */
.releases-timeline {
  position: relative;
}

/* Release item */
.release-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 32px;
}

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

.release-item:last-child .timeline-line {
  display: none;
}

/* Timeline markers */
.release-timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 24px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gh-surface);
  border: 2px solid var(--gh-border);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.timeline-dot.latest {
  background: var(--gh-green);
  border-color: var(--gh-green);
  box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.2);
}

.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--gh-border);
  margin-top: 8px;
}

/* Release card */
.release-card {
  flex: 1;
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.release-card:hover {
  border-color: var(--gh-border-muted);
}

.release-item.latest .release-card {
  border-color: var(--gh-green-muted);
}

.release-item.breaking .release-card {
  border-color: var(--gh-red);
}

/* Release header */
.release-header {
  padding: 16px 20px;
  background: var(--gh-surface-raised);
  border-bottom: 1px solid var(--gh-border);
}

.release-version-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.release-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gh-green-muted);
  color: var(--gh-text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

.release-tag i {
  font-size: 12px;
}

.release-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.release-badge.latest {
  background: var(--gh-green);
  color: white;
}

.release-badge.major {
  background: var(--gh-accent-emphasis);
  color: white;
}

.release-badge.feature {
  background: var(--gh-purple);
  color: white;
}

.release-badge.patch {
  background: var(--gh-text-subtle);
  color: white;
}

.release-badge.milestone {
  background: linear-gradient(135deg, #f1e05a, #d29922);
  color: #1c2128;
}

.release-badge.achievement {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1c2128;
}

.release-badge.prerelease {
  background: var(--gh-orange);
  color: white;
}

.release-badge.breaking {
  background: var(--gh-red);
  color: white;
}

.release-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gh-text);
  margin: 0;
}

/* Release meta */
.release-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gh-border);
  font-size: 13px;
  color: var(--gh-text-muted);
  flex-wrap: wrap;
}

.release-author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.release-author {
  color: var(--gh-text);
  font-weight: 500;
}

.release-commits {
  display: flex;
  align-items: center;
  gap: 4px;
}

.release-commits::before {
  content: '·';
  margin-right: 4px;
}

/* Release body */
.release-body {
  padding: 20px;
}

/* Change sections */
.release-changes {
  margin-bottom: 16px;
}

.release-change-section {
  margin-bottom: 20px;
}

.release-change-section:last-child {
  margin-bottom: 0;
}

.release-change-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-text);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gh-border-muted);
}

.release-change-section h4 i {
  font-size: 14px;
}

/* Change type colors */
.change-type-feature h4 i { color: var(--gh-green); }
.change-type-improvement h4 i { color: var(--gh-accent); }
.change-type-bugfix h4 i { color: var(--gh-purple); }
.change-type-known-issue h4 i { color: var(--gh-orange); }
.change-type-breaking h4 i { color: var(--gh-accent); }
.change-type-achievement h4 i { color: #f1e05a; }
.change-type-tradeoff h4 i { color: var(--gh-pink); }
.change-type-deprecated h4 i { color: var(--gh-text-subtle); }
.change-type-lightbulb h4 i { color: #f1e05a; }

.release-change-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.release-change-section li {
  position: relative;
  padding: 3px 0 3px 20px;
  font-size: 14px;
  color: var(--gh-text);
  line-height: 1.4;
}

.release-change-section li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gh-text-subtle);
}

.release-change-section li code {
  background: rgba(110, 118, 129, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--gh-text);
}

.release-change-section li strong {
  color: var(--gh-text);
  font-weight: 600;
}

/* Featured Video Hero Section */
.release-featured-video {
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--gh-surface-raised) 0%, var(--gh-bg) 100%);
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  overflow: hidden;
}

.featured-video-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gh-surface-raised);
  border-bottom: 1px solid var(--gh-border);
}

.featured-video-header > i {
  font-size: 24px;
  color: var(--gh-accent);
}

.featured-video-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.featured-video-title .featured-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gh-accent);
  font-weight: 600;
}

.featured-video-title .featured-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gh-text);
}

.featured-video-wrapper {
  position: relative;
  background: #000;
}

.featured-video-player {
  width: 100%;
  max-height: 400px;
  display: block;
  object-fit: contain;
  background: #000;
}

.featured-video-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--gh-text-muted);
  background: var(--gh-surface-raised);
  border-top: 1px solid var(--gh-border);
}

.featured-video-subtitle i {
  color: var(--gh-accent);
  font-size: 16px;
}

/* Responsive adjustments for featured video */
@media (max-width: 768px) {
  .featured-video-player {
    max-height: 250px;
  }
  
  .featured-video-header {
    padding: 10px 12px;
  }
  
  .featured-video-header > i {
    font-size: 20px;
  }
  
  .featured-video-title .featured-name {
    font-size: 14px;
  }
}

/* Assets section */
.release-assets {
  margin-top: 16px;
  border-top: 1px solid var(--gh-border);
  padding-top: 16px;
}

/* YouTube CTA - Styled as a GitHub-themed callout */
.releases-modal .release-body {
  position: relative;
}

.releases-modal .release-youtube-cta {
  position: absolute;
  top: 60px;
  right: 150px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-width: 220px;
  background: var(--gh-surface-raised);
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  overflow: hidden;
}

.releases-modal .youtube-watch-btn {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 14px !important;
  background: transparent !important;
  color: var(--gh-text) !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.15s ease;
  border: none;
}

.releases-modal .youtube-watch-btn:hover {
  background: var(--gh-bg) !important;
  color: var(--gh-text) !important;
  text-decoration: none !important;
}

.releases-modal .youtube-watch-btn i.bi-youtube {
  font-size: 20px;
  color: #ff0000;
}

.releases-modal .youtube-watch-btn .btn-text {
  color: var(--gh-text);
  flex: 1;
}

.releases-modal .youtube-watch-btn .btn-arrow {
  font-size: 12px;
  color: var(--gh-text-muted);
  transition: transform 0.15s ease;
}

.releases-modal .youtube-watch-btn:hover .btn-arrow {
  transform: translate(2px, -2px);
  color: var(--gh-accent);
}

.releases-modal .youtube-note {
  font-size: 11px;
  color: var(--gh-text-muted);
  padding: 8px 14px;
  background: var(--gh-bg);
  border-top: 1px solid var(--gh-border);
}

/* On smaller screens, stack the button below content */
@media (max-width: 600px) {
  .releases-modal .release-youtube-cta {
    position: static;
    max-width: 100%;
    margin-top: 16px;
  }
}

.youtube-note {
  font-size: 12px;
  color: var(--gh-text-muted);
  font-style: italic;
}

.release-assets-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: var(--gh-surface-raised);
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  color: var(--gh-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.release-assets-toggle:hover {
  background: var(--gh-bg);
  border-color: var(--gh-text-subtle);
}

.asset-count {
  background: var(--gh-surface);
  padding: 0 6px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--gh-text-muted);
}

.toggle-icon {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.release-assets.expanded .toggle-icon {
  transform: rotate(180deg);
}

.release-assets-content {
  margin-top: 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.release-assets.expanded .release-assets-content {
  max-height: 2000px;
  opacity: 1;
}

.release-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.release-asset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: var(--gh-surface-raised);
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.release-asset:hover {
  border-color: var(--gh-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.release-asset img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.asset-name {
  font-size: 10px;
  color: var(--gh-text-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Video asset thumbnail */
.release-asset.video-asset .video-thumb {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gh-surface) 0%, var(--gh-bg) 100%);
  border-radius: 4px;
  color: var(--gh-accent);
}

.release-asset.video-asset .video-thumb i {
  font-size: 32px;
}

.release-asset.video-asset .video-thumb span {
  font-size: 11px;
  font-weight: 500;
  color: var(--gh-text-muted);
}

.release-asset.video-asset:hover .video-thumb {
  color: var(--gh-text);
}

.release-asset.video-asset:hover .video-thumb i {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* Carousel video styling */
.carousel-video {
  max-height: 400px;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 6px;
  margin: 0 auto;
  background: #000;
}

/* Video thumbnail in carousel */
.carousel-thumb .thumb-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gh-surface) 0%, var(--gh-bg) 100%);
  border-radius: 6px;
  color: var(--gh-accent);
}

.carousel-thumb .thumb-video i {
  font-size: 20px;
}

.carousel-thumb.active .thumb-video {
  color: var(--gh-text);
}


/* Asset Carousel View with smooth transitions */
.release-assets-grid {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.release-assets.carousel-active .release-assets-grid {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  overflow: hidden;
}

.release-carousel-view {
  max-height: 0;
  opacity: 0;
  transform: translateY(10px);
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.release-assets.carousel-active .release-carousel-view {
  max-height: 800px;
  opacity: 1;
  transform: translateY(0);
}

.back-to-grid-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
  background: transparent;
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  color: var(--gh-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.back-to-grid-btn:hover {
  background: var(--gh-surface-raised);
  color: var(--gh-text);
  border-color: var(--gh-text-subtle);
}

.release-carousel-view .carousel {
  border-radius: 8px;
  overflow: hidden;
}

.release-carousel-view .carousel-inner {
  background: transparent;
}

.release-carousel-view .carousel-item {
  text-align: center;
  padding: 16px;
}

.release-carousel-view .carousel-item img {
  max-height: 350px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  margin: 0 auto;
}

.release-carousel-view .carousel-control-prev,
.release-carousel-view .carousel-control-next {
  width: 40px;
  opacity: 0.7;
}

.release-carousel-view .carousel-control-prev:hover,
.release-carousel-view .carousel-control-next:hover {
  opacity: 1;
}

.release-carousel-view .carousel-control-prev-icon,
.release-carousel-view .carousel-control-next-icon {
  width: 24px;
  height: 24px;
  background-color: var(--gh-surface-raised);
  border-radius: 50%;
  background-size: 50%;
}

/* Carousel thumbnail strip */
.carousel-thumbnails {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  overflow-x: auto;
  justify-content: center;
  flex-wrap: wrap;
}

.carousel-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid var(--gh-border);
  border-radius: 6px;
  background: var(--gh-surface-raised);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: all 0.15s ease;
}

.carousel-thumb:hover {
  opacity: 0.9;
  border-color: var(--gh-text-subtle);
}

.carousel-thumb.active {
  opacity: 1;
  border-color: var(--gh-accent);
  box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.3);
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contributors */
.release-contributors {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--gh-border);
  font-size: 12px;
  color: var(--gh-text-muted);
}

.contributor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gh-accent);
  margin-right: 8px;
}

/* Error state */
.releases-error {
  text-align: center;
  padding: 40px;
  color: var(--gh-text-muted);
}

/* Responsive */
@media (max-width: 992px) {
  .releases-container {
    width: 98vw;
    height: 95vh;
    max-height: none;
    border-radius: 8px;
  }
  
  .releases-sidebar {
    display: none;
  }
  
  .releases-mobile-nav {
    display: flex;
  }
  
  .releases-main {
    padding: 16px;
  }
  
  .release-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .release-commits::before {
    display: none;
  }
}

@media (max-width: 576px) {
  .releases-container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  
  .releases-header {
    padding: 8px 12px;
  }
  
  .releases-breadcrumb {
    display: none;
  }
  
  .releases-tab-indicator {
    margin-left: 0;
  }
  
  .release-card {
    border-radius: 6px;
  }
  
  .release-header {
    padding: 12px 16px;
  }
  
  .release-title {
    font-size: 16px;
  }
  
  .release-body {
    padding: 16px;
  }
  
  .release-assets-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}











/* ============ Ask Andrew Widget ============ */

#aa-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  padding: 16px;

  font-weight: 600;
  letter-spacing: 0.2px;
  font-size: 16px;
  white-space: nowrap;

  cursor: pointer;
  /* Premium soft shadow matching site cards */
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.25),
    0 2px 8px rgba(0,0,0,0.15);
  background: #111;
  color: #fff;
  
  display: inline-flex;
  align-items: center;
  gap: 12px;
  
  width: 80px;
  height: 80px;
  overflow: hidden;
  
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              padding 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hide FAB when panel is open with smooth fade and shrink */
#aa-fab.aa-hidden {
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
}

/* FAB reappear animation - only on interaction, not page load */
#aa-fab.aa-reappearing {
  animation: aa-fab-pop-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aa-fab-pop-in {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#aa-fab .aa-fab-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#aa-fab .aa-fab-text {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#aa-fab:hover {
  width: 200px;
  padding: 16px 20px;
  transform: translateY(-4px) scale(1.02);
  /* Lift effect matching site cards */
  box-shadow: 
    0 16px 48px rgba(0,0,0,0.32),
    0 4px 12px rgba(0,0,0,0.18);
}

#aa-fab:hover .aa-fab-text {
  opacity: 1;
  transform: translateX(0);
}

#aa-fab:hover .aa-fab-icon {
  transform: scale(1.05) rotate(-5deg);
}

#aa-fab:active {
  transform: translateY(-1px) scale(1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.20);
}

#aa-panel {
  position: fixed;
  right: 18px;
  bottom: 74px;
  z-index: 9999;

  width: min(380px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 120px));

  /* Clean solid background - matches site surface */
  background: #fff;
  /* Thin border stroke like site cards */
  border: 1px solid color-mix(in srgb, var(--default-color, #000), transparent 90%);
  /* Match site card radius (~12-16px range) */
  border-radius: 18px;

  /* Premium soft shadow matching site cards */
  box-shadow:
    0 12px 40px rgba(0,0,0,0.12),
    0 4px 16px rgba(0,0,0,0.08);

  /* Keep mounted for smooth open/close transitions (can't animate display). */
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Match site font */
  font-family: var(--default-font, "Roboto", system-ui, -apple-system, sans-serif);

  opacity: 0;
  transform-origin: bottom right;
  transform: translateY(10px) scale(0.3);
  visibility: hidden;
  pointer-events: none;
  will-change: opacity, transform;
  transition:
    opacity 350ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 350ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 350ms;
}

#aa-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 350ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 350ms cubic-bezier(0.16, 1, 0.3, 1),
    width 300ms cubic-bezier(0.16, 1, 0.3, 1),
    height 300ms cubic-bezier(0.16, 1, 0.3, 1),
    right 300ms cubic-bezier(0.16, 1, 0.3, 1),
    bottom 300ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s;
}

/* Expanded/maximized state */
#aa-panel.aa-expanded {
  right: 50% !important;
  bottom: 50% !important;
  transform: translate(50%, 50%) scale(1) !important;
  width: min(900px, calc(100vw - 40px)) !important;
  height: min(700px, calc(100vh - 40px)) !important;
  transform-origin: center center;
}

/* Morph animation when opening */
#aa-panel.is-opening {
  animation: aa-panel-morph-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Morph animation when closing */
#aa-panel.is-closing {
  animation: aa-panel-morph-out 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes aa-panel-morph-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.2);
    border-radius: 50px;
  }
  40% {
    opacity: 0.6;
  }
  70% {
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-radius: 18px;
  }
}

@keyframes aa-panel-morph-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-radius: 18px;
  }
  60% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translateY(20px) scale(0.2);
    border-radius: 50px;
  }
}

@keyframes aa-panel-bounce-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  60% {
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  #aa-panel {
    transition: none;
    transform: none;
  }
}

/* ===== FLATTENED HEADER - matches site card language ===== */
#aa-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  /* Solid subtle tint instead of gradient - more "product" than "widget" */
  background: #fafbfc;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.aa-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.aa-header-icon {
  /* Prominent icon size - showcases custom design */
  width: 62px;
  height: 62px;
  object-fit: contain;
  flex-shrink: 0;
}

.aa-header-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#aa-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
  line-height: 1.2;
}

/* AI pill badge */
.aa-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: color-mix(in srgb, #4a90d9, transparent 88%);
  border: 1px solid color-mix(in srgb, #4a90d9, transparent 75%);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #3d7ab8;
}

.aa-badge i {
  font-size: 8px;
}

/* Subtitle */
#aa-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #666;
  line-height: 1.3;
  margin-top: 3px;
}

/* Header action buttons - smaller, consistent with site style */
.aa-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

#aa-expand,
#aa-close {
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: #666;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

#aa-expand:hover,
#aa-close:hover {
  background: #f5f5f5;
  color: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.12);
}

#aa-expand:active,
#aa-close:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

#aa-close:hover {
  transform: translateY(-1px) rotate(90deg);
}

#aa-close:active {
  transform: scale(0.95) rotate(90deg);
}

/* ===== CHAT AREA - subtle background treatment ===== */
#aa-messages {
  flex: 1;
  min-height: 0;
  padding: 14px 14px 10px;
  overflow-y: auto;
  scroll-behavior: smooth;
  /* Subtle off-white with faint dot pattern effect */
  background: 
    radial-gradient(circle at 20px 20px, rgba(0,0,0,0.012) 1px, transparent 1px),
    linear-gradient(180deg, #f8f9fa 0%, #f5f6f7 100%);
  background-size: 16px 16px, 100% 100%;
}

#aa-thread {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ===== COMPACT CHIP SUGGESTIONS ===== */
#aa-suggestions {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 10px 12px;
  background: rgba(255,255,255,0.95);
  border-top: 1px solid rgba(0,0,0,0.06);
  border-radius: 0 0 16px 16px;
  backdrop-filter: blur(8px);
  max-height: 40%;
  overflow: auto;
}

.aa-has-suggestions #aa-messages {
  /* Make room so the overlay doesn't cover the last messages. */
  padding-bottom: 140px;
}

.aa-suggestions-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 8px;
}

.aa-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-start;
  align-items: stretch;
}

/* Compact chip styling */
.aa-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  white-space: normal;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
}

/* Question icon for suggestions */
.aa-suggestion::before {
  content: '?';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  background: color-mix(in srgb, #4a90d9, transparent 88%);
  color: #4a90d9;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
}

.aa-suggestion:hover {
  background: #f8f9fa;
  border-color: rgba(74, 144, 217, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.aa-suggestion:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.aa-suggestion:focus-visible {
  outline: 2px solid #4a90d9;
  outline-offset: 2px;
}

/* Hidden suggestions (collapsed state) */
.aa-suggestion.aa-hidden {
  display: none;
}

/* "More" link button */
.aa-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  background: none;
  border: none;
  color: #4a90d9;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.aa-more-link:hover {
  color: #3d7ab8;
}

.aa-more-link i {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.aa-more-link.aa-expanded i {
  transform: rotate(180deg);
}

/* ===== MESSAGE STYLING ===== */
.aa-msg {
  display: flex;
  margin: 8px 0;
  align-items: flex-end;
  gap: 8px;
}

.aa-msg:first-child {
  margin-top: 4px; /* Less top padding for first message */
}

.aa-msg.user { justify-content: flex-end; }
.aa-msg.bot { justify-content: flex-start; }

.aa-avatar {
  width: 36px;
  /* height: 36px; */
  flex-shrink: 0;
  object-fit: contain;
}

.aa-bubble {
  max-width: 85%;
  padding: 10px 13px;
  /* Match site card radius */
  border-radius: 14px;
  /* Crisp editorial typography */
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid rgba(0,0,0,0.06);
  /* Softer shadow */
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* User message bubble - desaturated blue */
.aa-msg.user .aa-bubble {
  background: #4a90d9;
  color: #fff;
  border-color: rgba(0,0,0,0.08);
}

/* Bot message bubble - card-like treatment with brand border */
.aa-msg.bot .aa-bubble {
  background: #fff;
  color: #1a1a1a;
  border: 1.5px solid #0b1a49;
}

/* First bot message (welcome) - special "card bubble" styling */
.aa-msg.bot:first-child .aa-bubble {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #0b1a49;
}

.aa-bubble a {
  color: #4a90d9;
  text-decoration: underline;
  text-decoration-color: rgba(74, 144, 217, 0.4);
  transition: all 0.2s ease;
}

.aa-bubble a:hover {
  color: #3d7ab8;
  text-decoration-color: rgba(74, 144, 217, 0.8);
}

.aa-msg.user .aa-bubble a {
  color: rgba(255,255,255,0.9);
}

.aa-msg.user .aa-bubble a:hover {
  color: #fff;
}

/* Loading animation styles */
.aa-loading-bubble {
  padding: 8px 16px !important;
  background: rgba(255,255,255,0.92) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px;
}

.aa-loading-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.aa-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4a90d9;
  animation: aa-dot-bounce 1.4s infinite ease-in-out both;
}

.aa-loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.aa-loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes aa-dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.aa-msg.aa-loading {
  opacity: 0.9;
}

/* Message animations */
.aa-msg {
  animation: aa-msg-slide-in 0.3s ease-out;
  transform-origin: bottom;
}

.aa-msg.user {
  animation: aa-msg-slide-in-right 0.3s ease-out;
}

.aa-msg.bot {
  animation: aa-msg-slide-in-left 0.3s ease-out;
}

.aa-msg.aa-loading {
  animation: aa-loading-fade-in 0.2s ease-out;
}

.aa-msg.aa-removing {
  animation: aa-msg-fade-out 0.15s ease-out forwards;
}

@keyframes aa-msg-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(20px) translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes aa-msg-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-20px) translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes aa-msg-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aa-loading-fade-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.98);
  }
  to {
    opacity: 0.9;
    transform: translateY(0) scale(1);
  }
}

@keyframes aa-msg-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Suggestions animations */
#aa-suggestions {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#aa-suggestions.aa-hiding {
  animation: aa-suggestions-slide-out 0.3s ease-out forwards;
}

#aa-suggestions:not([hidden]) {
  animation: aa-suggestions-slide-in 0.4s ease-out;
}

@keyframes aa-suggestions-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aa-suggestions-slide-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ===== INPUT ROW - matches site button styling ===== */
#aa-footer {
  padding: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

#aa-input {
  flex: 1;
  resize: none;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  outline: none;
  max-height: 120px;
  color: #1a1a1a;
  background: #f8f9fa;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#aa-input::placeholder {
  color: #999;
  font-size: 12px;
}

#aa-input:focus {
  border-color: #4a90d9;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.12);
}

/* Send button - matches site CTA buttons */
#aa-send {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  background: #1a1a1a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#aa-send i {
  font-size: 14px;
}

#aa-send:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #333;
  box-shadow: 0 6px 16px rgba(0,0,0,0.20);
}

#aa-send:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

#aa-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#aa-note {
  padding: 8px 12px;
  font-size: 11px;
  color: #666;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Mobile: keep it comfortable */
@media (max-width: 480px) {
  #aa-panel {
    right: 12px;
    bottom: 70px;
    width: calc(100vw - 24px);
    height: min(540px, calc(100vh - 110px));
  }
  #aa-fab { right: 12px; bottom: 12px; }
}

/* Mobile: Position chatbot next to menu button on small screens */
@media (max-width: 576px) {
  #aa-fab {
    /* Position next to menu button */
    left: 76px; /* Menu button is at left: 20px with 44px width + 12px gap */
    bottom: 20px;
    right: auto;
    
    /* Match menu button size */
    width: 44px;
    height: 44px;
    padding: 0;
    
    /* Match menu button colors */
    background-color: #303030;
    color: var(--contrast-color);
    
    /* Center the icon */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Premium soft shadow */
    box-shadow: 
      0 6px 20px rgba(0, 0, 0, 0.25),
      0 2px 6px rgba(0, 0, 0, 0.15);
  }
  
  /* Use same icon for mobile */
  #aa-fab .aa-fab-icon {
    /* content: url('../img/general/chatbot/grey_buttonchaticon.png'); */
    content: url('../img/general/chatbot/chatbot.png');
    width: 32px;
    height: 32px;
  }
  
  /* Adjust panel position for mobile - open from bottom left */
  #aa-panel {
    left: 12px;
    right: auto;
    bottom: 76px; /* Above the buttons */
    width: calc(100vw - 24px);
    height: min(540px, calc(100vh - 110px));
    transform-origin: bottom left; /* Open from bottom left instead */
  }
  
  /* Hide text on mobile */
  #aa-fab .aa-fab-text {
    display: none;
  }
  
  /* Disable hover expansion on mobile */
  #aa-fab:hover {
    width: 44px;
    padding: 0;
    /* background-color: color-mix(in srgb, var(--accent-color) 90%, white 15%); */
    background-color: color-mix(in srgb, var(--accent-color) 90%, white 15%);

    transform: translateY(-2px) scale(1.05);
  }
  
  #aa-fab:hover .aa-fab-text {
    display: none;
  }
  
  /* Keep icon animations subtle */
  #aa-fab:hover .aa-fab-icon {
    transform: scale(1.1);
  }
  
  /* Adjust active state */
  #aa-fab:active {
    transform: translateY(0) scale(1);
  }
}

/* Source buttons and info tooltip */
.aa-source-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  margin-bottom: 4px;
}

.aa-source-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(74, 144, 217, 0.08);
  border: 1px solid rgba(74, 144, 217, 0.15);
  border-radius: 6px;
  color: #3d7ab8 !important;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aa-source-button i {
  flex-shrink: 0;
  font-size: 14px;
}

.aa-source-button:hover {
  background: rgba(74, 144, 217, 0.14);
  border-color: rgba(74, 144, 217, 0.30);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(74, 144, 217, 0.12);
  color: #2d6aa8;
}

.aa-source-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(74, 144, 217, 0.10);
}

/* Simple tooltip for inline source buttons */
.aa-custom-tooltip {
  position: absolute;
  z-index: 10000;
  background: #1a1a1a;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  line-height: 1.4;
  white-space: nowrap;
}

.aa-custom-tooltip.aa-tooltip-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Collapsible sources section */
/* Simple collapsible sources section */
.aa-sources-wrapper {
  /* border-top: 1px solid rgba(0, 0, 0, 0.06); */
  line-height: .01;
}

.aa-sources-btn {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 4px;
  width: 100%;
  padding: 8px 0px;
  padding-right: 15px;
  margin: 0;
  background: none;
  width: 0%;
  border: none;
  color: #999;
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: .1;
  padding-right: 10px !important;
  min-height: 0;
}
.aa-sources-btn:hover {
  color: #666;
}

.aa-sources-btn i {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
  line-height: 1;
}

.aa-sources-wrapper.aa-open .aa-sources-btn i {
  transform: rotate(180deg);
}

.aa-sources-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #666;
  padding: 0;
  margin: 0;
  /* border-top: 0px solid rgba(0, 0, 0, 0.06); */

}

.aa-sources-wrapper.aa-open .aa-sources-content {
  max-height: 150px;
  opacity: 1;
  line-height: 1.5;
  /* padding: 4px 4px 0; */
  overflow-y: auto;
  /* border-top: 1px solid rgba(0, 0, 0, 0.06); */

}

.aa-sources-content a {
  color: #6666668f;
  text-decoration: none;
  transition: color 0.15s ease;
}

.aa-sources-content a:hover {
  color: #5a5a5ac7;
  text-decoration: underline;
}

/* Also apply brand colors to inline source buttons */
.aa-source-button .bi-github {
  color: #24292e;
}

.aa-source-button .bi-linkedin {
  color: #0077b5;
}

.aa-source-button .bi-lightbulb-fill {
  color: #ffc107;
}

/* Format bold text in citations */
.aa-bubble strong {
  font-weight: 700;
  color: #000;
}

/* Format italic text */
.aa-bubble em {
  font-style: italic;
  color: #222;
}

/* Format inline code */
.aa-bubble code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 5px;
  border-radius: 3px;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: #e83e8c;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Citation highlight animation for scrolled-to items */
.aa-citation-highlight {
  animation: highlightPulse 2s ease-out;
  position: relative;
}

@keyframes highlightPulse {
  0% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(255, 235, 59, 0);
  }
  10% {
    background-color: rgba(255, 235, 59, 0.6);
    box-shadow: 0 0 20px 5px rgba(255, 235, 59, 0.4);
  }
  50% {
    background-color: rgba(255, 235, 59, 0.4);
    box-shadow: 0 0 15px 3px rgba(255, 235, 59, 0.3);
  }
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(255, 235, 59, 0);
  }
}
