/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* VARIABLES */
:root {
  --bg: #020617;
  --card: #0f172a;
  --accent: #38bdf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

/* BASE */
body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* NAV */
nav {
  position: fixed;
  width: 100%;
  top: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: 0.3s;
}

nav.scrolled {
  background: rgba(2, 6, 23, 0.95);
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.nav-inner {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
}

.menu a:hover {
  color: white;
}

/* HERO */
.hero {
  padding: 180px 0 140px;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.2;
}

.hero span {
  color: var(--accent);
}

.highlight {
  color: var(--accent);
  margin: 10px 0;
}

.description {
  color: var(--muted);
  max-width: 500px;
}

/* BUTTONS */
.buttons {
  margin-top: 25px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;

  background: var(--accent);
  color: black;

  transition: 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56,189,248,0.3);
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn.secondary:hover {
  background: rgba(56,189,248,0.1);
}

/* ICON */
.icon {
  width: 18px;
  height: 18px;
  display: block;
  transform: translateY(1px);
}

/* SECTIONS */
section {
  padding: 100px 0;
}

h2 {
  margin-bottom: 30px;
}

/* SKILLS */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  background: rgba(56,189,248,0.1);
  border: 1px solid var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--accent);
}

/* GRID */
.grid {
  display: grid;
  gap: 25px;
}

/* CARDS */
.card {
  background: linear-gradient(145deg, #0f172a, #020617);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #1e293b;
  transition: 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.card p {
  color: var(--muted);
  margin: 10px 0;
}

/* CONTACT */
#contact a {
  color: var(--accent);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

/* BANDERA */
.flag-inline {
  width: 18px;
  vertical-align: middle;
  margin-left: 5px;
}

/* ANIMACIONES */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.fade-delay-1 { animation-delay: 0.2s; }
.fade-delay-2 { animation-delay: 0.4s; }
.fade-delay-3 { animation-delay: 0.6s; }

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

/* RESPONSIVE */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 3.5rem;
  }
}

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