/* Theme Variables */
:root {
  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: rgba(255, 255, 255, 0.7);
  --bg-tertiary: rgba(255, 255, 255, 0.8);
  --text-primary: rgba(0, 0, 0, 0.8);
  --text-secondary: #555;
  --text-accent: #3355bb;
  --border-color: rgba(255, 255, 255, 0.3);
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --button-gradient: linear-gradient(135deg, #4a6cf7, #3355bb);
  --button-gradient-hover: linear-gradient(135deg, #5577dd, #4466cc);
  --overlay-bg: rgba(0, 0, 0, 0.4);
  --accent-gradient: linear-gradient(90deg, #3355bb, #5577dd);
  --nav-bg: rgba(255, 255, 255, 0.7);
  --glass-card-bg: rgba(255, 255, 255, 0.7);
  --glass-card-hover-bg: rgba(255, 255, 255, 0.8);
  --glass-stats-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
  --input-bg: rgba(255, 255, 255, 0.7);
}

/* Dark theme */
[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: rgba(30, 30, 30, 0.7);
  --bg-tertiary: rgba(40, 40, 40, 0.8);
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-accent: #81a1ff;
  --border-color: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  --button-gradient: linear-gradient(135deg, #3a5ce7, #2345ab);
  --button-gradient-hover: linear-gradient(135deg, #4767e8, #3356bc);
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --accent-gradient: linear-gradient(90deg, #5577ff, #81a1ff);
  --nav-bg: rgba(30, 30, 30, 0.8);
  --glass-card-bg: rgba(40, 40, 40, 0.7);
  --glass-card-hover-bg: rgba(50, 50, 50, 0.8);
  --glass-stats-bg: linear-gradient(135deg, rgba(50, 50, 50, 0.5), rgba(40, 40, 40, 0.3));
  --input-bg: rgba(50, 50, 50, 0.7);
}

/* red-hat-display-regular - latin */
@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/red-hat-display-v4-latin-regular.eot"); /* IE9 Compat Modes */
  src: local(""),
    url("../fonts/red-hat-display-v4-latin-regular.eot?#iefix")
      format("embedded-opentype"),
    /* IE6-IE8 */ url("../fonts/red-hat-display-v4-latin-regular.woff2")
      format("woff2"),
    /* Super Modern Browsers */
      url("../fonts/red-hat-display-v4-latin-regular.woff") format("woff"),
    /* Modern Browsers */ url("../fonts/red-hat-display-v4-latin-regular.ttf")
      format("truetype"),
    /* Safari, Android, iOS */
      url("../fonts/red-hat-display-v4-latin-regular.svg#RedHatDisplay")
      format("svg"); /* Legacy iOS */
}
/* red-hat-display-700 - latin */
@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/red-hat-display-v4-latin-700.eot"); /* IE9 Compat Modes */
  src: local(""),
    url("../fonts/red-hat-display-v4-latin-700.eot?#iefix")
      format("embedded-opentype"),
    /* IE6-IE8 */ url("../fonts/red-hat-display-v4-latin-700.woff2")
      format("woff2"),
    /* Super Modern Browsers */
      url("../fonts/red-hat-display-v4-latin-700.woff") format("woff"),
    /* Modern Browsers */ url("../fonts/red-hat-display-v4-latin-700.ttf")
      format("truetype"),
    /* Safari, Android, iOS */
      url("../fonts/red-hat-display-v4-latin-700.svg#RedHatDisplay")
      format("svg"); /* Legacy iOS */
}

body {
  font-family: "Red Hat Display", sans-serif;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading state */
body.loading {
  opacity: 0;
}

body {
  opacity: 1;
  transition: opacity 0.5s ease-in-out, background-color 0.3s ease, color 0.3s ease;
}

/* Glass navbar styling */
.navbar {
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--card-shadow);
  border-bottom: 1px solid var(--border-color);
}

.navbar button {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

/* Theme toggle button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-right: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
  color: var(--text-accent);
}

.theme-toggle .sun {
  opacity: 1;
  position: absolute;
}

.theme-toggle .moon {
  opacity: 0;
  position: absolute;
}

[data-theme="dark"] .theme-toggle .sun {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .moon {
  opacity: 1;
}

.slide-1 {
  background: var(--bg-primary);
  background-image: radial-gradient(circle at 30% 30%, rgba(63, 94, 251, 0.05) 0%, rgba(252, 70, 107, 0.05) 100%);
}

/* Three.js background container */
#three-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.slide-2 {
  background: linear-gradient(to bottom, #f77f9c 0%, #fe938b 100%);
}

.slide-3 {
  background: linear-gradient(to bottom, #562b38 0%, #2d252c 100%);
}

.slide-4 {
  background: url("../assets/img/dawn_shape.png");
  background-size: cover;
  background-color: #231337;
}

.slide-5 {
  background: linear-gradient(170deg, #6c4adc, #9956e2);
}

.main-wrapper {
  background: url("../assets/img/about.png");
  background-size: cover;
}

.icon-wrapper {
  background: linear-gradient(0deg, #3d5afe 0, #7085fe 100%);
}

.card-wrapper {
  display: grid;
  grid-template-rows: 3rem auto;
}

.cardTitle-wrapper {
  display: grid;
  grid-template-columns: 3rem auto;
}

/**************************\
  Basic Modal Styles
\**************************/

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  transition: all 0.3s ease-out;
}

.modal__container {
  background-color: var(--bg-secondary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 30px;
  max-width: 500px;
  max-height: 100vh;
  border-radius: 16px;
  overflow-y: auto;
  box-sizing: border-box;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 15px;
  margin-bottom: 10px;
}

.modal__title {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--text-accent);
  box-sizing: border-box;
  position: relative;
}

.modal__title:after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 3px;
}

.modal__close {
  background: transparent;
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

.modal__close:before {
  content: "\2715";
  position: relative;
  z-index: 2;
}

.modal__close:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal__close:hover:after {
  opacity: 1;
}

.modal__content {
  margin-top: 2rem;
  margin-bottom: 2rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.modal__btn {
  font-size: 0.875rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 50px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  -webkit-appearance: button;
  text-transform: none;
  overflow: hidden;
  line-height: 1.15;
  margin: 0;
  will-change: transform;
  -moz-osx-font-smoothing: grayscale;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  transition: all 0.3s ease;
  position: relative;
  font-weight: 600;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.7), rgba(255,255,255,0) 70%);
  opacity: 0.5;
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.modal__btn:hover:before {
  transform: translateX(100%);
}

.modal__btn:focus,
.modal__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.8);
}

.modal__btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal__btn-primary {
  background: var(--button-gradient);
  color: #fff;
  border: none;
}

.modal__btn-primary:hover {
  background: var(--button-gradient-hover);
}

/**************************\
  Demo Animation Style
\**************************/
@keyframes mmfadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes mmfadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes mmslideIn {
  from {
    transform: translateY(15%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes mmslideOut {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10%);
  }
}

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}

@media (min-width: 768px) {
  .expand-wrapper {
    grid-template-columns: auto 8rem;
  }
}

/* Glass card components for project pages */
.glass-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e5e5;
}

.glass-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.glass-card h3 {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1.25rem;
}

.glass-card h4 {
  color: #666666;
  font-weight: 600;
}

.glass-card p {
  color: #1a1a1a;
}

.glass-card ul {
  color: #1a1a1a;
}

.glass-card span {
  background-color: #f0f0f0;
  color: #1a1a1a;
}

.glass-card-title {
  position: relative;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
  padding-bottom: 0.5rem;
}

.glass-card-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #C45C26, #E07B3D);
  border-radius: 3px;
}

.glass-card-stats {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.glass-card-stats-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #C45C26;
  margin-bottom: 0.25rem;
}

.glass-card-stats-label {
  font-size: 0.875rem;
  color: #666666;
  font-weight: 500;
}

/* Enhanced transitions */
.swiper-slide {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.swiper-slide-active {
  opacity: 1;
  transform: scale(1);
}

.swiper-slide-prev, .swiper-slide-next {
  opacity: 0;
}

/* Slide content animations */
.hero h1, .hero p, .hero a {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: 0s;
}

.swiper-slide-active .hero h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.swiper-slide-active .hero p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.swiper-slide-active .hero a {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

/* Enhanced button and link interactions */
a[href], button {
  position: relative;
  overflow: hidden;
}

/* Button hover effects */
.bg-blue-600, .bg-white {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.bg-blue-600 {
  background: var(--button-gradient);
}

.bg-white {
  background-color: #ffffff !important;
}

.bg-blue-600:hover, .bg-white:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ripple effect for buttons */
a[href]:after, button:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

a[href]:focus:not(:active):after, button:focus:not(:active):after {
  animation: ripple 0.8s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

/* Enhanced pagination styling */
.swiper-pagination {
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: white;
  height: 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Lazy loading styles */
.lazy-image {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  will-change: opacity;
  background-color: rgba(0, 0, 0, 0.1);
  position: relative;
}

.lazy-image:before {
  content: '';
  display: block;
  height: 100%;
  width: 100%;
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

img:not(.lazy-image) {
  opacity: 1;
}
