:root {
  --bg-dark: #030712;
  --card-bg: #111827;
  --border-color: #1f2937;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --font-code: "Fira Code", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  color: #f3f4f6;
  font-family: "Inter", system-ui, sans-serif;
}

section {
  scroll-margin-top: 100px;
}

.navbar {
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color) !important;
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent {
  color: #38bdf8;
}
.muted {
  color: #9ca3af;
}
.section {
  padding: 6rem 0;
}

.hero-title {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.typing-effect {
  font-family: var(--font-code);
  font-size: clamp(0.75rem, 2.8vw, 1rem);
  color: #38bdf8;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid #38bdf8;
  max-width: 0;
  animation:
    typing 3s steps(45, end) forwards,
    blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    max-width: 0;
  }
  to {
    max-width: 100%;
  }
}
@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #38bdf8;
  }
}

.profile {
  width: clamp(200px, 50vw, 260px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 40px var(--accent-glow);
}

.project-card,
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card {
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: #38bdf8;
  box-shadow: 0 20px 40px -10px var(--accent-glow);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  color: #030712;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  width: 110px;
  height: 110px;
}

.tech-card span {
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.tech-card:hover {
  transform: translateY(-5px);
  border-color: #38bdf8;
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.3);
}

.tech-icon img,
.tech-icon i {
  width: 50px;
  height: 50px;
  object-fit: contain;
  font-size: 50px;
  line-height: 50px;
  color: #334155;
}

.stack-favorito-box {
  background: linear-gradient(
    135deg,
    rgba(17, 24, 39, 1) 0%,
    rgba(31, 41, 55, 1) 100%
  );
  border: 1px solid #38bdf8;
  border-radius: 1.25rem;
  box-shadow: 0 0 30px var(--accent-glow);
}

.terminal-window {
  background: #0f172a;
  border-radius: 0.75rem;
  border: 1px solid #334155;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}
.terminal-header {
  background: #1e293b;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #334155;
}
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red {
  background: #ff5f56;
}
.dot-yellow {
  background: #ffbd2e;
}
.dot-green {
  background: #27c93f;
}
.terminal-title {
  color: #94a3b8;
  font-family: var(--font-code);
  font-size: 0.85rem;
  margin-left: auto;
  margin-right: auto;
}
.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-code);
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.6;
}
.terminal-prompt {
  color: #22c55e;
  margin-right: 0.5rem;
}
.terminal-command {
  color: #38bdf8;
}

.terminal-output {
  color: #94a3b8;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.terminal-body > * {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease;
}

.terminal-body.animate > *:nth-child(1) { max-height: 50px; opacity: 1; transition-delay: 0.2s; }
.terminal-body.animate > *:nth-child(2) { max-height: 500px; opacity: 1; transition-delay: 0.7s; }
.terminal-body.animate > *:nth-child(3) { max-height: 50px; opacity: 1; transition-delay: 2.2s; }
.terminal-body.animate > *:nth-child(4) { max-height: 500px; opacity: 1; transition-delay: 2.7s; }
.terminal-body.animate > *:nth-child(5) { max-height: 50px; opacity: 1; transition-delay: 3.8s; }

.blink-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

.badge-tech {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-family: var(--font-code);
}

a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #818cf8;
}

.btn-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
  color: white;
  border: none;
  font-weight: 600;
}
.btn-gradient:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #60a5fa 100%);
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}
