* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f9f9f9;
  --text: #222;
  --header-bg: #1a1a1a;
  --header-text: #fff;
  --card: #fff;
  --accent: #0066ff;
  --accent-dark: #0055dd;
}

.dark {
  --bg: #0f0f0f;
  --text: #e0e0e0;
  --header-bg: #111;
  --header-text: #f0f0f0;
  --card: #1e1e1e;
  --accent: #4d94ff;
  --accent-dark: #3a7acc;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  height: 3.5rem;
}

.toggle-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: var(--accent-dark);
}

.lang-btn {
  padding: 0.4rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  justify-content: center;
}

.flag {
  width: 2rem;
  height: 1.5rem;
  object-fit: cover;
  border-radius: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 3rem; /* espacio amplio y elegante entre links */
}

.nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.25rem; /* tamaño principal de header, se ve importante */
  font-weight: 600;   /* peso fuerte pero no exagerado */
  letter-spacing: 0.05em; /* separación clara y moderna */
  padding: 0.6rem 0.4rem;
  position: relative;
  transition: color 0.25s ease;
}

.nav a:hover {
  color: #60a5fa; /* azul vivo y actual para hover */
}

/* Efecto underline elegante y animado */
.nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background: #60a5fa;
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

.hero {
  text-align: center;
  padding: 6rem 1.5rem 4rem;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 1.8rem;
  opacity: 0.9;
}

.social {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--accent-dark);
}

section {
  padding: 5rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  list-style: none;
}

.skills-grid li {
  background: var(--card);
  padding: 1.2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-weight: 500;
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--header-bg);
  color: var(--header-text);
  font-size: 0.9rem;
}