/* =========================
   RESET & GLOBAL
========================= */
@import url('https://fonts.googleapis.com/css2?family=Atma:wght@300;400;500;600;700&family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Bebas+Neue&family=Concert+One&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Oswald:wght@200..700&family=PT+Sans+Narrow:wght@400;700&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Sour+Gummy:ital,wght@0,100..900;1,100..900&display=swap');
@import url('theme.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  transition: background 0.5s, color 0.5s;
  overflow-x: hidden;
}

/* Preloader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  backdrop-filter: blur(10px);
}

.preloader-content {
  text-align: center;
}

.preloader-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.preloader-dot {
  width: 12px;
  height: 12px;
  background: var(--text-color);
  border-radius: 50%;
  animation: bounce 0.5s ease-in-out infinite;
}

.preloader-dot:nth-child(2) {
  animation-delay: 0.1s;
}

.preloader-dot:nth-child(3) {
  animation-delay: 0.2s;
}

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

.preloader-content p {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-top: 1rem;
  font-weight: 500;
}

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

/* =========================
   GLOBAL STYLES
========================= */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* =========================
   NAVBAR & BRAND
========================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  backdrop-filter: blur(20px);
}
.brand {
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background: var(--brand-gradient);
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.5rem;
}

/* =========================
   NAV CENTER & RIGHT
========================= */
.nav-center {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-center li a {
  text-decoration: none;
  color: var(--nav-link-color);
  font-weight: bold;
  padding: 5px 0;
  position: relative;
  text-transform: uppercase;
  transition: color 0.3s ease, transform 0.3s ease;
}
.nav-center li a.active {
  border-bottom: var(--nav-link-active-border);
  color: var(--nav-link-active-color);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* =========================
   SIDENAV (Mobile)
========================= */
.sidenav-trigger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.sidenav-trigger:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .sidenav-trigger { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
  }
  
  .nav-center {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: var(--sidenav-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem;
    gap: 2rem;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
  }
  
  .nav-center.open { 
    left: 0; 
  }
  
  .nav-center li { 
    width: 100%; 
  }
  
  .nav-center li a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem !important;
    font-size: 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
  .nav-center li a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
  }
  
  .nav-center li a.active {
    background: var(--nav-link-active-color);
    color: white;
    border: none;
  }
}

/* =========================
   HERO SECTION
========================= */
.hero {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}
.hero-col {
  flex: 1 1 50%;
  max-height: calc(100vh - 72px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: fadeInRight 1s ease-out;
}
.hero-text-col {
  flex-direction: column;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  animation: fadeInLeft 1s ease-out;
}
.hero-text-col h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  text-wrap: nowrap;
}
.hero-text-col h5 {
  font-size: 1.9rem;
  height: 45px;
  color: var(--hero-subtitle-color);
  width: 100%;
  text-transform: uppercase;
  text-wrap: nowrap;
  z-index: 10;
}
.hero-text-col h5::after {
  content: '|';
  display: inline-block;
  margin-left: 5px;
  animation: blink 0.7s infinite;
  color: #212121;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-btns {
  display: flex;
  gap: 1rem;
}
.hero-photo-col {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  animation: fadeInRight 1s ease-out;
}

.photo-wrapper {
  width: 100%;
  height: 100%;
}
.photo-wrapper img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  object-position: top!important;
  opacity: 0.7;

  -webkit-mask-image: radial-gradient(
    ellipse closest-side at center,
    rgba(16,18,24,1) 20%,  
    rgba(16,18,24,0.5) 70%,  
    rgba(16,18,24,0)   90%  
  );

  animation: signalInterference 3s infinite;
}

/* =========================
   RESPONSIVE HERO (Mobile)
========================= */
@media (max-width: 768px) {
  .hero-container {
    position: relative;
    height: calc(100vh - 60px);
    display: block;
    padding: 0 !important;
  }
  .hero-photo-col {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    padding: 0 !important;
  }

  .hero-text-col h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-wrap: wrap;
  }

  .hero-text-col h5 {
    font-size: 1.4rem;
    text-wrap: wrap;
    height: 75px;
  }
  
  .hero-photo-col .photo-wrapper {
    width: 100%;
    height: 100%;
  }
  .hero-photo-col .photo-wrapper img {
    max-height: none;
    height: 100%;
 /* Larger elliptical gradient with multiple stops for a smoother transition */
 -webkit-mask-image: radial-gradient(
  ellipse closest-side at center,
  rgba(16,18,24,0.9) 40%,   /* mostly opaque in the middle */
  rgba(16,18,24,0.5) 70%,   /* transitions to half opacity */
  rgba(16,18,24,0)   100%   /* fades out completely at the edges */
);

/* Make sure the mask covers the entire element */
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-size: cover;
opacity: 0.5;
  }

  .hero-text-col {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    padding: 1rem;
    text-align: left;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    

  }
  .hero-col { display: block; }
  .hero-btns {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
  }
  .hero-btns button { width: 50%; }
}

/* =========================
   BUTTONS
========================= */
.btn-primary,
.btn-secondary {
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid transparent;
  text-transform: uppercase;
}
.btn-primary {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-color);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--btn-primary-hover-bg);
  border-color: var(--btn-primary-hover-border);
  color: var(--btn-primary-hover-color);
  font-weight: bold;
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border: 3px solid var(--btn-secondary-border) !important;
  background-color: transparent;
  color: var(--btn-secondary-color);
  overflow: hidden;
  transition: color 0.4s ease;
  cursor: pointer;
  z-index: 1;
}
.btn-secondary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--btn-secondary-border);
  z-index: -1;
  transition: left 0.4s ease;
}
.btn-secondary:hover::before, .btn-secondary:focus::before {
  left: 0;
}
.btn-secondary:hover, .btn-secondary:focus {
  color: var(--btn-secondary-hover-color);
}
.btn-secondary span,
.btn-secondary i {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

/* =========================
   THEME ICON & TOGGLE
========================= */
#theme-toggle {
  background-color: #ffbf07;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-icon {
  font-size: 1.2rem;
  color: var(--text-color);
  transition: color 0.3s ease;
}


/* Debug Toggle Button */
#debug-toggle {
  box-shadow: none;
  background-color: #ff6b6b;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

#debug-toggle i {
  font-size: 1.3rem;
}

#debug-toggle:hover {
  transform: rotate(180deg);
  background-color: #ff4757;
}

/* =========================
   CUSTOM LANGUAGE SELECTOR
========================= */
.custom-language-selector {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.custom-language-selector .selected-option {
  display: flex;
  align-items: center;
}
.custom-language-selector .selected-option img {
  width: 29px;
  height: 29px;
  border-radius: 100%;
}
.custom-language-selector .options {
  position: absolute;
  top: 110%;
  right: 5px;
  background: var(--sidenav-bg);
  border: 1px solid var(--text-color);
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: top right;
}
.custom-language-selector.open .options {
  display: block;
  animation: scaleIn 0.3s ease;
}
.custom-language-selector .options li {
  padding: 5px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.custom-language-selector .options li:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.custom-language-selector .options li img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 5px;
  object-fit: contain;
}

/* About & Contact Grid Layout */
.about-contact-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 0.5rem;
  max-width: 1030px;
  margin: auto;
  padding: 0rem;
  align-items: start;
}

/* When screen width is 900px or less, switch to single-column */
@media (max-width: 900px) {
  .about-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   ABOUT SECTION
========================= */
.about {
  padding:1rem;
  text-align: justify;
  background: transparent;
  color: inherit;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 30px!important;
}
.about-container {
  max-width: 1000px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  font-size: 2.8rem;
  text-align: left;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  background: linear-gradient(45deg, var(--text-color), #007bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 2s ease-in-out infinite;
}

.section-title::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  bottom: -10px;
  left: 0;
  background: linear-gradient(90deg, #007bff, transparent);
  border-radius: 4px;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  left: -20px;
  top: -20px;
  background: radial-gradient(circle, rgba(0,123,255,0.2) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.2;
  }
}

.about p {
  line-height: 1.2;
  white-space: pre-line;
  font-size: 1.3rem;
  text-align: left;
}

/* =========================
   PROJECTS SECTION – ADVANCED ANIMATIONS
========================= */
.projects {
  padding: 1rem;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
  padding-top: 100px!important;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%; /* Larger than 100% to accommodate scrolling */
  background-image: url('assets/projects-bg.jpg');
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0.5;
  transform: translateY(0);
}

/* ---------- Projects Section ---------- */
.projects {
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.projects-container {
  max-width: 1000px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.projects-grid {
  /* This container will hold the UL list */
}

/* The UL list that holds the project cards */
.projects-list {
  padding: 0;
  margin: 0 0 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns by default */
  gap: 10px;
  justify-items: center;
}

/* Tablet layout: 2 columns */
@media (max-width: 1024px) {
  .projects-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile layout: 1 column */
@media (max-width: 768px) {
  .projects-list {
    grid-template-columns: 1fr;
  }
}

/* Each LI acts as a project card */
.projects-list li {
  list-style: none;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* <-- CHANGED */
  perspective: 500px; /* Essential for 3D effect */
  
}
@keyframes cardPopIn {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Card Layers ---------- */
/* Both layers fill the card */
.projects-list li .normal,
.projects-list li .info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  backface-visibility: hidden;
}

/* Normal layer: visible by default */
.projects-list li .normal {
  background: #ECF0F1; /* Clouds */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.projects-list li .normal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info layer: hidden by default */
.projects-list li .info {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  transform: rotate3d(0, 0, 0, 90deg);
  opacity: 0;
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.projects-list li .info h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #fff;
  text-align: center;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

.projects-list li .info p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0 10px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.project-link i {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.project-link:hover i {
  transform: translateX(3px);
}

.project-link span {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .projects-list li .info {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
}

[data-theme="dark"] .project-link {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .project-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ---------- Directional Animations ---------- */
/* Keyframes for "in" animations */
@keyframes in-top {
  from { transform: rotate3d(-1,0,0,90deg); opacity: 0; }
  to   { transform: rotate3d(0,0,0,0deg); opacity: 1; }
}
@keyframes in-right {
  from { transform: rotate3d(0,-1,0,90deg); opacity: 0; }
  to   { transform: rotate3d(0,0,0,0deg); opacity: 1; }
}
@keyframes in-bottom {
  from { transform: rotate3d(1,0,0,90deg); opacity: 0; }
  to   { transform: rotate3d(0,0,0,0deg); opacity: 1; }
}
@keyframes in-left {
  from { transform: rotate3d(0,1,0,90deg); opacity: 0; }
  to   { transform: rotate3d(0,0,0,0deg); opacity: 1; }
}

/* Keyframes for "out" animations */
@keyframes out-top {
  from { transform: rotate3d(0,0,0,0deg); opacity: 1; }
  to   { transform: rotate3d(-1,0,0,90deg); opacity: 0; }
}
@keyframes out-right {
  from { transform: rotate3d(0,0,0,0deg); opacity: 1; }
  to   { transform: rotate3d(0,-1,0,90deg); opacity: 0; }
}
@keyframes out-bottom {
  from { transform: rotate3d(0,0,0,0deg); opacity: 1; }
  to   { transform: rotate3d(1,0,0,90deg); opacity: 0; }
}
@keyframes out-left {
  from { transform: rotate3d(0,0,0,0deg); opacity: 1; }
  to   { transform: rotate3d(0,1,0,90deg); opacity: 0; }
}

/* Classes added by JS on hover: */
.in-top .info {
  transform-origin: 50% 0%;
  animation: in-top 300ms ease forwards;
}
.in-right .info {
  transform-origin: 100% 50%;
  animation: in-right 300ms ease forwards;
}
.in-bottom .info {
  transform-origin: 50% 100%;
  animation: in-bottom 300ms ease forwards;
}
.in-left .info {
  transform-origin: 0% 50%;
  animation: in-left 300ms ease forwards;
}
.out-top .info {
  transform-origin: 50% 0%;
  animation: out-top 300ms ease forwards;
}
.out-right .info {
  transform-origin: 100% 50%;
  animation: out-right 300ms ease forwards;
}
.out-bottom .info {
  transform-origin: 50% 100%;
  animation: out-bottom 300ms ease forwards;
}
.out-left .info {
  transform-origin: 0% 50%;
  animation: out-left 300ms ease forwards;
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Apply animations to sections */
.hero-text-col {
  animation: fadeInLeft 1s ease-out;
}

.hero-photo-col {
  animation: fadeInRight 1s ease-out;
}

.section-title {
  animation: fadeInUp 0.8s ease-out;
}

.projects-subtitle {
  animation: fadeInUp 0.8s ease-out 0.2s;
  animation-fill-mode: both;
}

.tech-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-5px) scale(1.02);
}

.tech-card i {
  animation: float 3s ease-in-out infinite;
}

.contact-item {
  animation: scaleIn 0.5s ease-out;
  animation-fill-mode: both;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }
.contact-item:nth-child(5) { animation-delay: 0.5s; }
.contact-item:nth-child(6) { animation-delay: 0.6s; }

.nav-center li a {
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-center li a:hover {
  transform: translateY(-2px);
}

.btn-primary, .btn-secondary {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-primary:active, .btn-secondary:active {
  transform: translateY(1px);
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Animate the progress bar */
#progress-bar {
  transition: width 0.2s ease-out;
}

/* Enhanced hover effects for support buttons */
.support-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.support-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.support-button:active {
  transform: translateY(1px) scale(0.98);
}


/* Language selector animations */
.custom-language-selector .options {
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: top right;
}

.custom-language-selector.open .options {
  animation: scaleIn 0.3s ease;
}

/* Footer animation */
.footer p {
  animation: fadeInUp 0.8s ease-out;
}

/* Add reveal on scroll effect */
@media (prefers-reduced-motion: no-preference) {
  .about-container,
  .tech-container,
  .projects-container,
  .contact-container,
  .support-container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

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

/* =========================
   MODAL OVERLAY & CONTENT
========================= */
.project-modal {
  position: fixed;
  inset: 0; /* top:0, right:0, bottom:0, left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(2px); /* Blur the background */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 2000;
}

.project-modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* The main modal container */
.modal-content {
  position: relative;
  background-color: var(--bg-color);
  
  border-radius: 8px;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  overflow: hidden; /* So child elements can't overflow edges */
  
  /* Columns can scroll if needed. */
  max-height: 400px;
}

/* Close Button: pinned top-right */
.modal-close {
  position: absolute;
  top: 0px;
  right: 0px;
  font-size: 2rem;
  color: #fafafa;
  cursor: pointer;
  z-index: 10;
  padding: 0 10px!important;
  background-color: #007BFF;
  border-radius: 0px 8px;
  border: none;
}

/* =========================
   2-COLUMN LAYOUT (Desktop)
========================= */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 columns on bigger screens */
  height: 100%;
}

/* Left Column: image */
.modal-image-col {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.modal-image {
  width: 100%;
  height: 500px!important;
  object-fit: cover;
  object-position: top left;
}

/* Right Column: text + scroll if content is too long */
.modal-text-col {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  overflow-y: auto; /* only text column scrolls */
}

/* Title & Desc inside the text column */
.modal-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  
}
.modal-desc {
  font-size: 1rem;
  line-height: 1.5;
}

/* =========================
   MOBILE LAYOUT (Slide Up)
========================= */
@media (max-width: 767px) {

  .parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Larger than 100% to accommodate scrolling */
    background-image: url('assets/projects-bg.jpg');
    background-size: cover;
    background-repeat:repeat;
    background-position: left;
    z-index: -1;
    opacity: 0.5;
  }

  /* Single-column layout */
  .modal-grid {
    display: block; /* or flex with flex-direction: column */
    height: 100vh;  /* full viewport height on mobile */
  }

  .modal-content {
    width: 100%;
    max-width: none;   /* so it takes full width */
    max-height: none;  /* let it fill the screen */
    border-radius: 0;  /* remove rounding if you want full-screen effect */
    
    
    /* Slide up animation on small screens */
    animation: slideUp 0.4s ease forwards;
  }

  /* The close button is still pinned, so it's always visible */
  .modal-close {
    top: 10px;
    right: 10px;
    
    
    
    border-radius: 50%;
    padding: 1px 10px!important;
    }

  .modal-image-col {
    width: 100%;
    height: 50vh;  /* top half for image, tweak as you like */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .modal-image {
    width: 100%;
    min-height: 100%;
    height: 300px!important;
  }

  .modal-text-col {
    height: 50vh;      /* bottom half for text */
    overflow-y: auto;  /* scroll if text is long */
    padding: 1rem;
  }
}

/* Slide-up keyframes for small screens */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}


.circle-overlay {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1; /* Ensures the circle appears above all content */
  transform: scale(1);
  opacity: 1;
  transition: transform 0.6s ease-out, opacity 0.3s ease-out;
}

/* Progress Bar Container */
#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;  /* Adjust the height as desired */
  z-index: 1001; /* Ensure it sits above other elements */
}

/* Progress Bar */
#progress-bar {
  width: 0%;
  height: 100%;
  background: #007BFF; /* Use a color that fits your theme */
  transition: width 0.1s ease-out;
}


.text-blur {
  filter: blur(5px);
  transition: filter 0.3s ease;
}


/* =========================
   CONTACT SECTION
========================= */
.contact {
  padding: 4rem 1rem;
  background: transparent;
  color: inherit;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: transparent;
  padding: 0rem;
}

.contact-card {
  text-align: center;
}

.contact-info {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0rem;
  background: var(--card-bg);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  width: calc(50% - 0.75rem);
  min-width: 250px;
}

.contact-item a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.contact-item i {
  font-size: 1.8rem;
  padding: 0.8rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: var(--icon-bg);
  min-width: 3.4rem;
  text-align: center;
}

.contact-item span {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-color);
}

/* Estilos específicos para cada tipo de contacto */
.contact-item.user i {
  color: #007bff;
  background: rgba(0, 123, 255, 0.1);
}

.contact-item.email i {
  color: #ea4335;
  background: rgba(234, 67, 53, 0.1);
}

.contact-item.phone i {
  color: #4285f4;
  background: rgba(66, 133, 244, 0.1);
}

.contact-item.whatsapp i {
  color: #25D366;
  background: rgba(37, 211, 102, 0.1);
}

.contact-item.github i {
  color: #333;
  background: rgba(51, 51, 51, 0.1);
}

.contact-item.pastebin i {
  color: #02456c;
  background: rgba(2, 69, 108, 0.1);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
  .contact-info {
    gap: 1rem;
    padding: 0 1rem;
  }

  .contact-item {
    width: 100%;
    min-width: unset;
  }

  .contact-item i {
    font-size: 1.5rem;
    padding: 0.6rem;
    min-width: 2.7rem;
  }

  .contact-item span {
    font-size: 1rem;
  }
}

/* Variables CSS para temas */
[data-theme="light"] {
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --icon-bg: #f5f5f5;
}

[data-theme="dark"] {
  --card-bg: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.1);
  --icon-bg: rgba(255, 255, 255, 0.1);
}

/* Support Section */
.support-section {
  padding: 2rem 1rem;
  background: transparent;
  
}

.support-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0rem;
  text-align: center;
}

.support-container p {
  font-size: 1.2rem;
  margin: 1rem 0 2rem;
  color: var(--text-color);
}

.support-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.support-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-color);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.support-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.support-button i {
  font-size: 1.25rem;
}

.github-button {
  background: #24292e;
  color: white;
  border-color: #1b1f23;
}

.github-button:hover {
  background: #2f363d;
}

.coffee-button {
  background: #FFDD00;
  color: #000000;
  border-color: #e6c700;
}

.coffee-button:hover {
  background: #ffed4a;
}

.paypal-button {
  background: #003087;
  color: white;
  border-color: #001f5c;
}

.paypal-button:hover {
  background: #003da6;
}

@media (max-width: 768px) {
  .support-buttons {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }
  
  .support-button {
    justify-content: center;
  }
}

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

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, #007bff, #0056b3);
  border-radius: 2px;
}

/* =========================
   FOOTER
========================= */
.footer {
  background: transparent;
  padding: 1.5rem 0;
  text-align: center;
  position: relative;
  margin-top: 2rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, var(--bg-color) 70%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--text-color),
    transparent
  );
}

.footer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.footer p {
  color: var(--text-color);
  font-size: 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer p:hover {
  opacity: 1;
}

.footer i {
  font-size: 1.2rem;
  color: var(--text-color);
}

[data-theme="dark"] .footer::before {
  background: linear-gradient(to bottom, transparent, var(--bg-color) 70%);
}

/* =========================
   TECHNOLOGIES SECTION
========================= */
.technologies {
  padding: 4rem 1rem;
  background: transparent;
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}

.tech-card {
  position: relative;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
  cursor: pointer;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tech-card i {
  font-size: 4rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  color: inherit;
}

.tech-card span {
  font-size: 1.2rem;
  font-weight: 600;
  color: inherit;
}

.tech-details {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
  border-radius: 16px;
}

.tech-details p {
  color: white;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.tech-card:hover .tech-details {
  opacity: 1;
}

/* Technology-specific styles with official brand colors */
.tech-card.python {
  background: var(--python-bg);
  color: var(--python-text);
}

.tech-card.python i,
.tech-card.python span {
  color: var(--python-text);
}

.tech-card.javascript {
  background: var(--javascript-bg);
  color: var(--javascript-text);
}

.tech-card.javascript i,
.tech-card.javascript span {
  color: var(--javascript-text);
}

.tech-card.html {
  background: var(--html-bg);
  color: var(--html-text);
}

.tech-card.html i,
.tech-card.html span {
  color: var(--html-text);
}

.tech-card.css {
  background: var(--css-bg);
  color: var(--css-text);
}

.tech-card.css i,
.tech-card.css span {
  color: var(--css-text);
}

.tech-card.google {
  background: var(--google-bg);
  color: var(--google-text);
}

.tech-card.google i {
  background: conic-gradient(from -45deg, #4285f4 110deg, #34a853 90deg 200deg, #fbbc05 170deg 300deg, #ea4335 260deg);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-card.google span {
  background: linear-gradient(45deg, #4285f4, #34a853, #fbbc05, #ea4335);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

.tech-card.nodejs {
  background: var(--nodejs-bg);
  color: var(--nodejs-text);
}

.tech-card.nodejs i,
.tech-card.nodejs span {
  color: var(--nodejs-text);
}

.tech-card.bash {
  background: var(--bash-bg);
  color: var(--bash-text);
}

.tech-card.bash i,
.tech-card.bash span {
  color: var(--bash-text);
}

/* Dark mode adjustments */
[data-theme="dark"] .tech-card {
  box-shadow: var(--card-shadow);
}

[data-theme="dark"] .tech-card:hover {
  box-shadow: var(--card-hover-shadow);
}

[data-theme="dark"] .tech-details {
  background: var(--tech-details-bg);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .tech-card {
    height: 180px;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
    padding: 1rem;
  }
  
  .tech-card {
    height: 140px;
    padding: 1rem;
  }
  
  .tech-card i {
    font-size: 2.5rem;
  }
  
  .tech-card span {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Animation for tech cards */
@keyframes techCardEntrance {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tech-card {
  animation: techCardEntrance 0.6s ease forwards;
  opacity: 0;
}

.tech-card:nth-child(1) { animation-delay: 0.1s; }
.tech-card:nth-child(2) { animation-delay: 0.2s; }
.tech-card:nth-child(3) { animation-delay: 0.3s; }
.tech-card:nth-child(4) { animation-delay: 0.4s; }
.tech-card:nth-child(5) { animation-delay: 0.5s; }
.tech-card:nth-child(6) { animation-delay: 0.6s; }
.tech-card:nth-child(7) { animation-delay: 0.7s; }

/* Hover effect improvements */
.tech-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.3s ease;
  opacity: 0;
}

.tech-card:hover::after {
  opacity: 1;
  transform: rotate(45deg) translate(50%, 50%);
}

/* Touch device optimizations */
@media (hover: none) {
  .tech-card:hover {
    transform: none;
  }
  
  .tech-card::after {
    display: none;
  }
  
  .tech-card:active {
    transform: scale(0.98);
  }
}

.projects-subtitle {
  text-align: left;
  color: var(--text-color);
  font-size: 2rem;
  margin: -1rem 0 2rem;
  opacity: 0.8;
  
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .projects-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
    margin: -0.5rem 0 1.5rem;
  }
}

/* Repeating animations on scroll */
.about-container,
.tech-container,
.projects-container,
.contact-container,
.support-container {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  animation: revealSection 0.8s ease-out;
}

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

/* Adjust mobile layout for cards */
@media (max-width: 768px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .tech-card {
    height: 140px;
    padding: 1rem;
  }

  .tech-card i {
    font-size: 2.5rem;
  }

  .tech-card span {
    font-size: 0.9rem;
  }

  .projects-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

  .projects-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .tech-grid,
  .projects-list {
    grid-template-columns: 1fr;
  }
}

/* Enhanced Debug Console Styles */
#debug-console {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: min(700px, 90vw);
    max-height: 350px;
    background: var(--debug-bg, #1a1a1a);
    color: var(--debug-text, #fff);
    font-family: 'Consolas', monospace;
    font-size: 13px;
    z-index: 9999;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                filter 0.3s ease;
    overflow: hidden;
    filter: brightness(0);
}

#debug-console.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    filter: brightness(1);
    animation: tvOn 0.3s ease-out;
}

#debug-console.hiding {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    filter: brightness(0);
    animation: tvOff 0.3s ease-in;
}

.debug-header {
    padding: 8px 12px;
    background: var(--debug-header-bg, #2a2a2a);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--debug-border, #3a3a3a);
    height: 35px;
}

.debug-title {
    font-weight: bold;
    color: var(--text-color);
    font-size: 14px;
    margin-left: 70px;
}

.debug-count {
    color: var(--debug-count, #888);
    font-size: 12px;
}

.window-controls {
    position: absolute;
    left: 12px;
    top: 11px;
    display: flex;
    gap: 8px;
}

.window-button {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.window-button:hover {
    filter: brightness(0.8);
}

.window-close { background: #ff5f56; }
.window-minimize { background: #ffbd2e; }
.window-maximize { background: #27c93f; }

.debug-content {
    height: calc(100% - 35px);
    overflow-y: auto;
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
    background: var(--debug-content-bg, #1a1a1a);
}

.debug-entry {
    margin-bottom: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--debug-entry-bg, rgba(255, 255, 255, 0.05));
}

.debug-time {
    color: var(--debug-time, #888);
    margin-right: 8px;
    font-size: 0.9em;
}

.debug-entry.debug-error {
    color: #ff5f56;
    background: rgba(255, 95, 86, 0.1);
}

.debug-entry.debug-warn {
    color: #ffbd2e;
    background: rgba(255, 189, 46, 0.1);
}

.debug-entry.debug-success {
    color: #27c93f;
    background: rgba(39, 201, 63, 0.1);
}

.debug-entry.debug-info {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.1);
}

.debug-message {
    font-family: 'Consolas', monospace;
}

.debug-entry pre {
    margin: 8px 0;
    padding: 8px;
    background: var(--debug-pre-bg, rgba(0, 0, 0, 0.2));
    border-radius: 4px;
    overflow-x: auto;
}

/* Scrollbar styles */
.debug-content::-webkit-scrollbar {
    width: 8px;
}

.debug-content::-webkit-scrollbar-track {
    background: var(--debug-scrollbar-track, #1a1a1a);
}

.debug-content::-webkit-scrollbar-thumb {
    background: var(--debug-scrollbar-thumb, #3a3a3a);
    border-radius: 4px;
}

.debug-content::-webkit-scrollbar-thumb:hover {
    background: var(--debug-scrollbar-thumb-hover, #4a4a4a);
}

/* TV On/Off Animations */
@keyframes tvOn {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        filter: brightness(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.02);
        filter: brightness(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1);
    }
}

@keyframes tvOff {
    0% {
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.02);
        filter: brightness(0.5);
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        filter: brightness(0);
    }
}

/* Theme-specific styles */
[data-theme="light"] #debug-console {
    --debug-bg: #f0f2f5;
    --debug-text: #1a1a1a;
    --debug-header-bg: #e1e4e8;
    --debug-border: #cfd4da;
    --debug-content-bg: #ffffff;
    --debug-entry-bg: rgba(0, 0, 0, 0.08);
    --debug-pre-bg: rgba(0, 0, 0, 0.12);
    --debug-scrollbar-track: #e9ecef;
    --debug-scrollbar-thumb: #b0b8c1;
    --debug-scrollbar-thumb-hover: #8b95a1;
    --debug-time: #5a6572;
}

[data-theme="light"] .debug-entry.debug-error {
    color: #d73a49;
    background: rgba(215, 58, 73, 0.15);
}

[data-theme="light"] .debug-entry.debug-warn {
    color: #b08800;
    background: rgba(176, 136, 0, 0.15);
}

[data-theme="light"] .debug-entry.debug-success {
    color: #22863a;
    background: rgba(34, 134, 58, 0.15);
}

[data-theme="light"] .debug-entry.debug-info {
    color: #0366d6;
    background: rgba(3, 102, 214, 0.15);
}

/* Responsive adjustments */
@media (min-width: 1200px) {
    #debug-console {
        width: min(600px, 90vw);
        height: min(450px, 80vh);
    }
}

@media (max-width: 768px) {
    #debug-console {
        width: 95vw;
        height: 350px;
    }
    
    .debug-title {
        font-size: 12px;
        margin-left: 60px;
    }
    
    .window-controls {
        gap: 6px;
    }
    
    .window-button {
        width: 15px;
        height: 15px;
    }
}

/* Debug Console Overlay */
.debug-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.debug-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Update debug console z-index to be above overlay */
#debug-console {
    z-index: 9999;
}

