/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); */

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
  --glass-bg: rgba(247, 249, 251, 0.92);
  --glass-border: rgba(172, 186, 204, 0.35);
  --nav-bg: linear-gradient(180deg, rgba(245, 247, 250, 0.98), rgba(239, 243, 247, 0.98));
  --accent-color: #336699;
  --accent: linear-gradient(135deg, #336699 0%, #5B8DBF 100%);
  --accent-dark: #254D73;
  --accent-hover: #2B5C87;
  --accent-secondary: #5B8DBF;
  --highlight: #3E72A5;
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-tertiary: #475569;
  --bg-main: #E3E9F2;
  --bg-card: #E7EBF0;
  --bg-section: #F2F5F9;
  --border: #C5D0DC;
  --coming-bg-from: #F59E0B;
  --coming-bg-to: #D97706;
  --coming-text: #78350F;
  --private-bg-from: #5B7DE0;
  --private-bg-to: #3E64D1;
  --private-text: white;
  --shadow-color: rgba(51, 102, 153, 0.08);
  --nav-shadow: rgba(9, 30, 66, 0.06);
}

.dark {
  --glass-bg: rgba(30, 41, 59, 0.95);
  --glass-border: rgba(71, 85, 105, 0.4);
  --nav-bg: rgba(15, 23, 42, 0.98);
  --accent-color: #94A3B8;
  --accent: linear-gradient(135deg, #94A3B8 0%, #CBD5E1 100%);
  --accent-dark: #CBD5E1;
  --accent-hover: #E2E8F0;
  --accent-secondary: #64748B;
  --highlight: #FBBF24;
  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
  --bg-main: #0F172A;
  --bg-card: #1E293B;
  --bg-section: #334155;
  --border: #475569;
  --coming-bg-from: #FBBF24;
  --coming-bg-to: #F59E0B;
  --coming-text: #0F172A;
  --private-bg-from: #8B5CF6;
  --private-bg-to: #7C3AED;
  --private-text: white;
  --shadow-color: rgba(148, 163, 184, 0.15);
  --nav-shadow: rgba(0, 0, 0, 0.6);
}

body {
  background: var(--bg-main);
  transition: background-color 0.5s ease, color 0.5s ease;
  color: var(--text-primary);
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px var(--shadow-color);
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--delay, 0s);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.hero-section h1.fade-in-up {
  animation-delay: 0.2s;
}

.hero-section p.fade-in-up:nth-of-type(1) {
  animation-delay: 0.4s;
}

.hero-section div.fade-in-up {
  animation-delay: 0.6s;
}

.hero-section p.fade-in-up:nth-of-type(2) {
  animation-delay: 0.8s;
}

.hero-section div.flex.fade-in-up {
  animation-delay: 1s;
}

.skill-tag {
  transition: all 0.25s ease;
  background-color: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.skill-tag:hover {
  transform: translateY(-3px) scale(1.05) rotate(2deg);
  box-shadow: 0 8px 20px var(--shadow-color);
  border-color: var(--highlight);
  color: var(--highlight);
}

.project-card {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-left: 4px solid var(--accent-color);
  background-color: var(--bg-card);
}

.project-card:hover {
  transform: translateX(6px) scale(1.02);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08), 0 10px 10px rgba(0, 0, 0, 0.05);
  border-left-color: var(--highlight);
}

.nav-fixed {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px var(--nav-shadow);
  border-bottom: 1px solid rgba(124, 140, 160, 0.06);
  transform: translateY(-100%);
  animation: slideDown 0.6s ease-out forwards;
  animation-delay: 0.1s;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

.nav-fixed .text-primary-color {
  color: var(--text-primary);
}

.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px var(--nav-shadow);
  border-radius: 0 0 12px 12px;
  padding: 1rem;
  z-index: 40;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu.active {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--highlight);
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--coming-bg-from) 0%, var(--coming-bg-to) 100%);
  color: var(--coming-text);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.18);
}

.private-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--private-bg-from) 0%, var(--private-bg-to) 100%);
  color: var(--private-text);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 6px 18px var(--shadow-color);
}

.section-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bg-section);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.skill-section {
  background: linear-gradient(180deg, var(--bg-section) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.skill-section:hover {
  border-color: var(--highlight);
  box-shadow: 0 10px 28px var(--shadow-color);
  transform: translateY(-5px);
}

.icon-backend {
  color: #6366F1;
}

.dark .icon-backend {
  color: #22D3EE;
}

.icon-architecture {
  color: #8B5CF6;
}

.dark .icon-architecture {
  color: #A78BFA;
}

.icon-data {
  color: #10B981;
}

.dark .icon-data {
  color: #34D399;
}

.icon-devops {
  color: #3B82F6;
}

.dark .icon-devops {
  color: #60A5FA;
}

.icon-security {
  color: #F59E0B;
}

.dark .icon-security {
  color: #FBBF24;
}

.icon-frontend {
  color: #EC4899;
}

.dark .icon-frontend {
  color: #F472B6;
}

.icon-email {
  color: #EA4335;
}

.icon-linkedin {
  color: #0077B5;
}

.icon-github {
  color: #24292e;
}

.icon-github.disabled {
  pointer-events: none;
  opacity: 0.4;
  cursor: default;
}

.dark .icon-github {
  color: #F1F5F9;
}

.section-title {
  color: var(--text-primary);
  border-bottom: 4px solid rgba(29, 78, 216, 0.12);
}

.text-primary-color {
  color: var(--text-primary);
}

.text-secondary-color {
  color: var(--text-secondary);
}

.text-tertiary-color {
  color: var(--text-tertiary);
}

.btn-primary {
  background: var(--accent);
  color: white;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.08);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.15);
}

.btn-secondary {
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  background-color: transparent;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-2px) scale(1.05);
}

.btn-github {
  background: linear-gradient(135deg, #24292e 0%, #1a1e22 100%);
  color: white;
  transition: all 0.25s ease;
}

.btn-github:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(36, 41, 46, 0.28);
}

.btn-linkedin {
  background: linear-gradient(135deg, #0077B5 0%, #005885 100%);
  color: white;
  transition: all 0.25s ease;
}

.btn-linkedin:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 119, 181, 0.28);
}

.btn-email {
  background: linear-gradient(135deg, #EA4335 0%, #D33426 100%);
  color: white;
  transition: all 0.25s ease;
}

.btn-email:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(234, 67, 53, 0.18);
}

#nav-links a {
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease;
}

#nav-links a:hover {
  color: var(--highlight);
  transform: translateY(-2px);
}

#nav-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--highlight);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

#nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

@media (max-width: 768px) {
  .glass {
    padding: 1rem;
  }

  .nav-fixed .max-w-6xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-menu-button {
    display: block;
  }

  #nav-links {
    display: none;
  }

  .hero-section .text-5xl {
    font-size: 2.5rem;
  }

  .hero-section .text-2xl {
    font-size: 1.25rem;
  }

  .grid.md\:grid-cols-2,
  .grid.md\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .project-card {
    margin-bottom: 1.5rem;
  }

  .btn-email,
  .btn-secondary {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .flex.sm\:flex-row {
    flex-direction: column;
  }
}

/* Imgs performance */
.img-skeleton {
  background-color: var(--bg-section);
  animation: pulse 1.5s infinite ease-in-out;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  min-height: 200px;
}

@keyframes pulse {
  0% {
    background-color: rgba(200, 200, 200, 0.1);
  }

  50% {
    background-color: rgba(200, 200, 200, 0.3);
  }

  100% {
    background-color: rgba(200, 200, 200, 0.1);
  }
}

.lazy-img {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: block;
  width: 100%;
  height: auto;
}

.lazy-img.loaded {
  opacity: 1;
}

.img-skeleton.loaded {
  animation: none;
  background-color: transparent;
}

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

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-card);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Language Selector */
.language-selector {
  position: relative;
  margin-right: 0.5rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.lang-btn:hover {
  background: rgba(124, 140, 160, 0.1);
  border-color: var(--highlight);
  color: var(--highlight);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 40px var(--shadow-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  min-width: 140px;
}

.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  text-align: left;
  font-size: 0.875rem;
}

.lang-option:hover {
  background: rgba(124, 140, 160, 0.1);
  color: var(--text-primary);
}