/* ========== Variables ========== */
:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --bg: #f5f7fa;
  --bg-alt: #fff;
  --text: #333;
  --text-light: #64748b;
  --accent: #ff6363;
  --radius: 1rem;
  --shadow-sm: 0 2px 6px rgba(0,0,0,.06);
  --shadow-md: 0 6px 18px rgba(0,0,0,.08);
  --font-sans: "Inter", system-ui, sans-serif;
  --trs: .35s cubic-bezier(.25,.8,.25,1);
}

[data-theme=dark] {
  --bg: #111827;
  --bg-alt: #1f2937;
  --text: #e2e8f0;
  --text-light: #9ca3af;
  --primary: #90cdf4;
  --primary-light: #b2f5ea;
  --primary-dark: #2b6cb0;
  --accent: #f6ad55;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.35);
  --shadow-md: 0 6px 22px rgba(0,0,0,.45)
}

/* ========== Reset ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: var(--trs);
}

html, body {
  min-height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  font-family: var(--font-sans);
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

[data-theme=dark] body {
  background: #111827;
  color: #e2e8f0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== Utilities ========== */
.section {
  padding: 2.5rem 0 2.5rem 0;
  margin-bottom: 0;
}

@media (min-width: 1024px) {
  .section {
    padding: 2.2rem 0;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 0.7rem;
  }
  .section {
    padding: 1.5rem 0 1.5rem 0;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 0.2rem;
  }
  .section {
    padding: 1rem 0 1rem 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1.1rem;
  letter-spacing: 0.01em;
}
h2 {
  font-size: 2.3rem;
  text-align: center;
  margin-bottom: 1.7rem;
}
h2::after {
  content: '';
  width: 64px;
  height: 3px;
  margin: .6rem auto 0;
  background: var(--accent);
  display: block;
  border-radius: 2px;
}

#about-title {
  margin-top: 4rem;
}

/* ================================= HERO ================================= */
header {
  position: relative;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    linear-gradient(45deg, 
      rgba(37,99,235,0.2) 0%,
      rgba(59,130,246,0.2) 25%,
      rgba(37,99,235,0.2) 50%,
      rgba(59,130,246,0.2) 75%,
      rgba(37,99,235,0.2) 100%
    );
  animation: gradientShift 15s ease infinite;
  background-size: 200% 200%;
}

header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.1;
  animation: patternMove 20s linear infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 2rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.profile-pic {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.8);
  object-fit: cover;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin: 0;
  background: linear-gradient(45deg, #fff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 3s ease-in-out infinite;
}

.typewriter {
  overflow: hidden;
  border-right: .15em solid #fff;
  white-space: nowrap;
  width: 0;
  animation: typing 3s steps(32,end) .3s forwards,
             blink-caret .8s step-end infinite .3s;
  font-size: 1.15rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: rgba(255,255,255,0.9);
  color: var(--primary-dark);
  border-radius: var(--radius);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-cta:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

[data-theme=dark] .btn-cta {
  background: #1e293b;
  color: #fff;
  border: 2px solid #90cdf4;
}
[data-theme=dark] .btn-cta:hover {
  background: var(--accent);
  color: #1e293b;
  border-color: var(--accent);
}

.access-panel {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.85);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(30,41,59,0.18);
  padding: 0.5rem 1rem;
  align-items: center;
  transition: background 0.2s;
}
.access-panel button,
.access-panel select {
  background: transparent;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  font-size: 1.15rem;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  outline: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.access-panel button:hover,
.access-panel select:hover {
  background: rgba(37,99,235,0.18);
  color: var(--accent);
}
.access-panel select {
  padding-right: 1.5rem;
}
.access-panel button:active {
  background: var(--accent);
  color: #fff;
}
@media (max-width: 600px) {
  .access-panel {
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.7rem;
    gap: 0.3rem;
  }
  .access-panel button, .access-panel select {
    font-size: 1rem;
    padding: 0.35rem 0.5rem;
  }
}

/* Nuevas animaciones para el header */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes patternMove {
  0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
  100% { background-position: 40px 40px, 40px 50px, 50px 30px, 30px 40px; }
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(255,255,255,0.5); }
  50% { text-shadow: 0 0 30px rgba(255,255,255,0.8); }
}

/* Ajustes para modo oscuro */
[data-theme=dark] header {
  background: linear-gradient(135deg, #1a365d, #2c5282);
}

[data-theme=dark] header::before {
  background: 
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%),
    linear-gradient(45deg, 
      rgba(26,54,93,0.3) 0%,
      rgba(44,82,130,0.3) 25%,
      rgba(26,54,93,0.3) 50%,
      rgba(44,82,130,0.3) 75%,
      rgba(26,54,93,0.3) 100%
    );
}

[data-theme=dark] .hero-content {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.1);
}

[data-theme=dark] .hero-content h1 {
  background: linear-gradient(45deg, #fff, #90cdf4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================================= ABOUT ================================= */
#about {
  background: #f0f4f9;
  padding: 2.5rem 0 2.2rem 0;
  margin-bottom: 0.5rem;
  border-radius: 1.2rem;
}
#about .about-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 2;
}
#about .about-image-wrapper {
  flex-shrink: 0;
}
#about .about-image-wrapper img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 10px 40px rgba(37,99,235,0.15);
  transition: all 0.3s ease;
}
#about .about-image-wrapper img:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 50px rgba(37,99,235,0.25);
}
#about .about-content-wrapper {
  flex-grow: 1;
}
#about .about-typewriter {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #334155;
  margin-bottom: 2rem;
  min-height: 150px; /* Evita saltos de layout */
  text-align: justify;
}
#about .about-stack {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
#about .stack-item {
  background: #e0e8f9;
  color: #375bb1;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 5px rgba(37,99,235,0.08);
}
#about .stack-item:hover {
  transform: translateY(-3px);
  background: #d1ddf7;
  box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}
#about .stack-item:active {
  transform: translateY(0px) scale(0.98);
  background: #c1cff3;
  box-shadow: 0 2px 5px rgba(37,99,235,0.1);
}
[data-theme=dark] #about {
  background: #0f172a;
}
[data-theme=dark] #about .about-image-wrapper img {
  border-color: #1e293b;
  box-shadow: 0 10px 40px rgba(144, 205, 244, 0.1);
}
[data-theme=dark] #about .about-image-wrapper img:hover {
  box-shadow: 0 15px 50px rgba(144, 205, 244, 0.2);
}
[data-theme=dark] #about .about-typewriter {
  color: #cbd5e1;
}
[data-theme=dark] #about .stack-item {
  background: #1e293b;
  color: #90cdf4;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
[data-theme=dark] #about .stack-item:hover {
  background: #2a3a55;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme=dark] #about .stack-item:active {
  transform: scale(.95);
  box-shadow: none;
}
@media (max-width: 768px) {
  #about .about-container {
    flex-direction: column;
    text-align: center;
  }
  #about .about-stack {
    justify-content: center;
  }
}

/* ================================= SKILLS ================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.skill {
  background: var(--bg-alt);
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 1.2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlideUp 0.5s ease-out forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.skills-grid .skill:nth-child(1) { animation-delay: 0.1s; }
.skills-grid .skill:nth-child(2) { animation-delay: 0.15s; }
.skills-grid .skill:nth-child(3) { animation-delay: 0.2s; }
.skills-grid .skill:nth-child(4) { animation-delay: 0.25s; }
.skills-grid .skill:nth-child(5) { animation-delay: 0.3s; }
.skills-grid .skill:nth-child(6) { animation-delay: 0.35s; }
.skills-grid .skill:nth-child(7) { animation-delay: 0.4s; }
.skills-grid .skill:nth-child(8) { animation-delay: 0.45s; }
.skills-grid .skill:nth-child(9) { animation-delay: 0.5s; }
.skills-grid .skill:nth-child(10) { animation-delay: 0.55s; }
.skills-grid .skill:nth-child(11) { animation-delay: 0.6s; }
.skills-grid .skill:nth-child(12) { animation-delay: 0.65s; }
.skills-grid .skill:nth-child(13) { animation-delay: 0.7s; }
.skills-grid .skill:nth-child(14) { animation-delay: 0.75s; }
.skills-grid .skill:nth-child(15) { animation-delay: 0.8s; }
.skills-grid .skill:nth-child(16) { animation-delay: 0.85s; }
.skills-grid .skill:nth-child(17) { animation-delay: 0.9s; }
.skills-grid .skill:nth-child(18) { animation-delay: 0.95s; }
.skills-grid .skill:nth-child(19) { animation-delay: 1s; }
.skills-grid .skill:nth-child(20) { animation-delay: 1.05s; }
.skills-grid .skill:nth-child(21) { animation-delay: 1.1s; }

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skill:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.skill:hover .skill-icon img {
  transform: scale(1.1) rotate(5deg);
}

.skill-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(37,99,235,.12), rgba(37,99,235,.05));
}

.skill-icon img {
  transition: transform 0.3s ease;
}

.skill p {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-light);
}

/* ======================== CERTIFICATIONS ======================== */
#certifications {
  padding: 2.2rem 0 2.2rem 0;
  margin-bottom: 0.5rem;
}

.certs-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.badge {
  background: var(--bg-alt);
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 1.2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
  color: var(--text);
}

.badge:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.badge img {
  width: 90px;
  height: 90px;
  margin-bottom: 0.7rem;
}

.cert-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.cert-info h3 {
  margin-bottom: 0.1rem;
  font-size: 1.05rem;
}
.cert-info p {
  margin-bottom: 0.1rem;
  font-size: 0.92rem;
  color: var(--text-light);
}
.cert-info .year {
  margin-top: 0.1rem;
  font-size: 0.95rem;
  color: var(--primary-dark);
  font-weight: 600;
}
[data-theme=dark] .cert-info .year {
  color: #90cdf4;
}

/* ================ EDUCATION & EXPERIENCE TIMELINE ================ */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 38px;
  height: 100%;
  width: 2.5px;
  background: var(--primary-light);
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  border-radius: 2px;
}

[data-theme=dark] .timeline::before {
    background: var(--primary-dark);
}

.entry-card {
  display: flex;
  align-items: flex-start;
  background: var(--bg-alt);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.2rem;
  padding: 1.2rem 1.5rem 1.2rem 80px;
  position: relative;
  min-height: 80px;
  color: var(--text);
}

.entry-card:hover {
  transform: translateX(7px) scale(1.015);
  box-shadow: 0 6px 18px rgba(37,99,235,0.10);
  border-left: 3px solid var(--accent);
}

.entry-card .logo-container {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(37,99,235,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-light);
  z-index: 2;
  background: #fff;
}

.entry-card .logo-container img {
  width: 38px !important;
  height: 38px !important;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  border: none;
}

.entry-card .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}

.entry-card .info h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.18rem;
  letter-spacing: 0.01em;
}

[data-theme=dark] .entry-card .info h3 {
    color: var(--primary-light);
}

.entry-card .info span {
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  display: block;
}

.entry-card .info p {
  font-size: 0.89rem;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0;
}

/* ================================= PROJECTS ================================= */
.projects-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.project-card {
  background: var(--bg-alt);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--trs);
  color: var(--text);
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.project-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.2rem 1rem 1.2rem 1rem;
}

.project-content h3 {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: .4rem;
}

.project-content p {
  font-size: .9rem;
  color: var(--text-light);
  margin-bottom: .8rem;
  flex: 0 0 auto;
}

.project-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.project-footer a {
  font-weight: 600;
  color: var(--primary-dark);
  background: #f7f9ff;
  border-radius: 999px;
  padding: 0.5em 1.2em;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
  transition: background 0.18s, color 0.18s;
  border: none;
}

.project-footer a:hover {
  background: var(--accent);
  color: #fff;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.7rem 0;
}

.tag {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary-light) 60%, var(--primary-dark) 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.22em 0.85em;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(37,99,235,0.08);
  transition: background 0.18s, box-shadow 0.18s;
  cursor: default;
  user-select: none;
}

.tag:hover {
  background: linear-gradient(90deg, var(--accent) 60%, var(--primary-dark) 100%);
  box-shadow: 0 2px 8px rgba(37,99,235,0.13);
}

/* ================================= CONTACT ================================= */
#contact {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: var(--primary-dark);
  color: #f3f6ff;
  text-align: center;
  padding: 2.5rem 1.5rem 3.5rem 1.5rem;
  transition: background var(--trs);
  padding-bottom: 2.2rem;
  border-radius: 1.2rem 1.2rem 0 0;
}

#contact p {
  max-width: 680px;
  margin: .8rem auto 2.2rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

#contact .btn-cta {
  background: #f7f9ff;
  color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  margin-top: 1.2rem;
  font-size: 1.08rem;
  padding: 0.85rem 2.1rem;
  border-radius: 1.5rem;
}

#contact .btn-cta:hover {
  transform: translateY(-3px);
}

#contact h2 {
  color: #fff;
}

/* ================================= FOOTER ================================= */
footer {
  background: linear-gradient(90deg, #1e293b 60%, #2563eb 100%);
  color: #fff;
  padding: 2.5rem 1rem 1.2rem 1rem;
  text-align: center;
  margin-top: 0;
  width: 100vw;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin-bottom: 1.2rem;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  transition: background 0.18s, transform 0.18s;
  font-size: 1.7rem;
}

.socials a:hover {
  background: var(--accent);
  transform: scale(1.12) translateY(-2px);
}

.socials svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.credits {
  font-size: 1rem;
  color: #e2e8f0;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}

@media (max-width: 600px) {
  footer {
    padding: 2rem 0.5rem 0.7rem 0.5rem;
    font-size: 0.98rem;
  }
  .socials {
    gap: 1.2rem;
  }
  .socials a {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
  .socials svg {
    width: 22px;
    height: 22px;
  }
}

#edu-content .logo-container {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(37,99,235,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--primary-light);
  z-index: 2;
  background: #fff;
}
#edu-content .logo-container img {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  border: none;
}
@media (max-width: 600px) {
  #edu-content .logo-container {
    width: 40px;
    height: 40px;
    border-width: 2px;
  }
  #edu-content .logo-container img {
    width: 18px !important;
    height: 18px !important;
  }
}

/* ========== Keyframes ========== */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #fff }
}

@media (max-width: 900px) {
  .entry-card .logo-container {
    left: -50px;
    width: 54px;
    height: 54px;
  }
  #education .logo-container, #edu-content .logo-container {
    left: -40px;
    width: 60px;
    height: 60px;
    padding: 6px;
  }
  .entry-card {
    margin-left: 24px;
    padding-left: 2.2rem;
  }
}

@media (max-width: 600px) {
  .timeline {
    position: relative;
    padding: 2rem 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Línea vertical central */
  .timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
    opacity: 0.3;
    transform: translateX(-50%);
    z-index: 1;
  }

  .entry-card {
    position: relative;
    width: 85%;
    margin: 3rem auto;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
  }

  /* Punto de conexión superior */
  .entry-card::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -1.5rem;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-alt);
    box-shadow: 0 0 0 2px var(--primary-light);
    z-index: 3;
  }

  /* Línea conectora entre cards */
  .entry-card::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -3rem;
    width: 2px;
    height: 1.5rem;
    background: var(--primary-light);
    opacity: 0.3;
    transform: translateX(-50%);
    z-index: 1;
  }

  /* Eliminar la línea conectora del primer card */
  .entry-card:first-child::after {
    display: none;
  }

  .entry-card .logo-container {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0.5rem auto 1rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .entry-card .logo-container img {
    width: 80%;
    height: 80%;
    object-fit: contain;
  }

  .entry-card .info {
    width: 100%;
    text-align: center;
    padding: 0;
  }

  .entry-card .info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-weight: 600;
  }

  .entry-card .info span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
  }

  .entry-card .info p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    text-align: left;
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
  }

  /* Skills Grid */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0.5rem;
  }

  .skill {
    padding: 1rem;
  }

  .skill-icon {
    width: 40px;
    height: 40px;
  }

  .skill p {
    font-size: 0.9rem;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0.5rem;
  }

  .project-card {
    margin: 0;
  }

  .project-content {
    padding: 1rem;
  }

  .project-content h3 {
    font-size: 1.2rem;
  }

  .project-content p {
    font-size: 0.95rem;
  }

  .project-tags {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }

  /* Certifications */
  .certs-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0.5rem;
  }

  .badge {
    padding: 1rem;
  }

  .badge img {
    width: 60px;
    height: 60px;
  }

  .cert-info h3 {
    font-size: 1.1rem;
  }

  .cert-info p {
    font-size: 0.9rem;
  }

  /* Contact Section */
  #contact {
    padding: 3rem 1rem;
  }

  #contact p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  /* Footer */
  footer {
    padding: 2rem 1rem;
  }

  .socials {
    gap: 1rem;
  }

  .socials a {
    width: 40px;
    height: 40px;
  }

  .socials svg {
    width: 20px;
    height: 20px;
  }

  /* Access Panel */
  .access-panel {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .access-panel button,
  .access-panel select {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 360px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .entry-card {
    margin-left: 0.5rem;
  }
} 