:root {
  --p: from hsl(var(--primary)) l c h;
  --pc: from hsl(var(--primary-foreground)) l c h;
  --s: from hsl(var(--secondary)) l c h;
  --sc: from hsl(var(--secondary-foreground)) l c h;
  --b2: from hsl(var(--card-background)) l c h;
  --b1: from hsl(var(--background)) l c h;
  --bc: from hsl(var(--foreground)) l c h;
  --b3: from hsl(var(--ring)) l c h;
  --er: from hsl(var(--destructive)) l c h;
  --erc: from hsl(var(--destructive-foreground)) l c h;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-color: #0f172a;
  color: #f8fafc;
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 100% 24px, 24px 100%;
  padding-top: 64px;
  margin: 0;
}

#main-content {
  background: transparent !important;
  color: inherit;
}

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

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

.animate-on-scroll {
  opacity: 0;
  visibility: hidden;
}

.animate__animated {
  opacity: 1;
  visibility: visible;
}

.splash-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.splash-logo {
  width: 180px;
  height: auto;
  margin-bottom: 2rem;
  animation: pulse 2s infinite;
}

.splash-greeting {
  font-size: 2rem;
  font-weight: 700;
  height: 3rem;
  text-align: center;
}

.splash-loading {
  margin-top: 2rem;
  width: 120px;
  height: 4px;
  background-color: rgba(59, 130, 246, 0.2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.loading-progress {
  position: absolute;
  inset: 0;
  width: 0;
  background-color: #3b82f6;
  transition: width 1.5s ease-in-out;
}

.fixed-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
  padding: 0 1.5rem;
}

.fixed-navbar a:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease-in-out;
}

.nav-scrolled {
  background-color: rgba(15, 23, 42, 0.95) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-logo {
  height: 40px;
  width: auto;
}

.hamburger-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 5px;
  border-radius: 5px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.3s;
}

.hamburger-button:hover,
.hamburger-button:focus-visible {
  background-color: rgba(59, 130, 246, 0.2);
  outline: none;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: white;
  margin: 3px 0;
  transition: all 0.3s ease;
}

@media (max-width: 767px) {
  .hamburger-button {
    display: flex;
  }
}

.hero-bg {
  position: relative;
  min-height: 100vh;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 0;
  padding-top: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: image-set(
    url('/image/background.webp') type('image/webp'),
    url('/image/background.png') type('image/png')
  );
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  z-index: 0;
  filter: saturate(0.8) brightness(0.9);
  background-color: rgba(15, 23, 42, 0.7);
  background-blend-mode: overlay;
}

@media (max-width: 768px) {
  .hero-bg::before {
    background-position: top center;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

.hero-bg .vertical-logo {
  position: absolute;
  top: 1rem;
  left: 0.5rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  z-index: 10;
  font-size: clamp(1.2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title {
  position: relative;
  text-align: right;
  z-index: 10;
  margin-right: clamp(1rem, 3vw, 2rem);
}

.contact-button,
.whatsapp-button {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-button {
  bottom: 2rem;
  animation: float 3s ease-in-out infinite, blink 3s infinite;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #0f172a;
}

.contact-button:hover {
  background: linear-gradient(135deg, #fde047, #fb923c);
}

.whatsapp-button {
  bottom: 6rem;
  animation: float 3s ease-in-out infinite;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
}

.whatsapp-button:hover {
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
}

.services-section {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  z-index: 10;
  background-color: rgba(30, 41, 59, 0.95);
  padding: 1rem;
  border-radius: 0.75rem;
}

@media (max-width: 767px) {
  .hero-title {
    text-align: left;
  }
  .contact-button {
    bottom: 1rem;
  }
  .whatsapp-button {
    bottom: 5rem;
  }
  .services-section {
    bottom: 1rem;
    left: 1rem;
    padding: 0.75rem;
  }
}

.full-bleed-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
}

.footer-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.footer-marquee-container {
  width: 100%;
  overflow: hidden;
  text-align: center;
  display: flex;
  justify-content: center;
}

.footer-marquee-wrapper {
  display: inline-flex;
  position: relative;
  white-space: nowrap;
}

.animate-marquee {
  display: inline-block;
  animation: marquee 10s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.footer-marquee-text {
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
  font-size: clamp(3rem, 12vw, 9rem);
}

.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.project-card img {
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.03);
}

.project-tech-badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  margin: 0 0.5rem 0.5rem 0;
}

.certifications-grid {
  display: none;
}

@media (min-width: 768px) {
  .certifications-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.certifications-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 0;
  width: 100%;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-height: 200px;
}

.certifications-carousel::-webkit-scrollbar {
  display: none;
}

.certifications-carousel .project-card {
  flex: 0 0 80%;
  max-width: 320px;
  min-width: 260px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .certifications-carousel {
    display: none;
  }
}

.cert-image {
  border-radius: 0.75rem;
}

.contact-section {
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background-image: image-set(
    url('/image/logo.webp') type('image/webp'),
    url('/image/logo.png') type('image/png')
  );
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
  z-index: 0;
}

.contact-content {
  position: relative;
  z-index: 1;
}

.skills img {
  position: relative;
  transition: transform 0.3s ease;
}

.skills img:hover {
  transform: scale(1.08);
}

.skills img:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  z-index: 10;
}

.language-selector {
  padding: 0.5rem;
  background-color: rgba(59, 130, 246, 0.2);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  width: auto;
  min-width: 140px;
}

.language-selector:hover,
.language-selector:focus-visible {
  background-color: rgba(59, 130, 246, 0.35);
  outline: none;
}

@media (max-width: 767px) {
  .language-selector {
    margin: 0.5rem 1rem;
  }
}

.contact-button i,
.whatsapp-button i {
  margin-right: 0.3rem;
}

.page-certifications .certifications-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .page-certifications .certifications-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.page-certifications .project-card {
  padding: 1rem;
}

.page-certifications .certifications-carousel {
  display: none;
}

[data-theme='light'] body {
  background-color: #f8fafc;
  color: #0f172a;
}

.prefers-reduced-motion * {
  animation: none !important;
  transition: none !important;
}
