* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar Fija */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
}

.navbar .container {
  display: flex;
  justify-content: flex-end;
}

.navbar .nav-content {
  width: 100%;
  max-width: 600px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  justify-content: flex-end;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #f97316;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f97316;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Full Screen Sections */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  width: 100%;
}

.full-screen {
  min-height: 100vh;
}

/* Hero Section */
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title span:first-child {
  opacity: 0.8;
}

.nombre-highlight {
  background: linear-gradient(135deg, #f97316, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1;
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 12px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #0f0f23;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.6);
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(249, 115, 22, 0.5);
}

.btn-secondary:hover {
  background: rgba(249, 115, 22, 0.1);
  border-color: #f97316;
}

.image-placeholder {
  width: 350px;
  height: 350px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(251, 146, 60, 0.1));
  border: 1px solid rgba(249, 115, 22, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #f97316, #fb923c);
}

/* ABOUT */
.about-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}

.about-photo {
  display: flex;
  justify-content: center;
}

.about-photo-frame {
  width: 320px;
  height: 380px;
  border-radius: 24px;
  overflow: hidden;
  background: #111;
  border: 2px solid rgba(255, 255, 255, 0.06);
}

.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-panel {
  background: rgba(15, 15, 35, 0.95);
  border-radius: 24px;
  padding: 2.5rem 3rem;
  border: 1px solid rgba(249, 115, 22, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.about-label {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f97316;
  margin-bottom: 0.75rem;
}

.about-title {
  font-size: 2.3rem;
  margin-bottom: 1.5rem;
}

.about-description {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.about-list {
  list-style: none;
  margin-top: 1rem;
}

.about-list li {
  margin-bottom: 0.6rem;
  opacity: 0.9;
}

.about-skills-mini {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

/* IKASKETAK - 2 COLUMNAS PERFECTAS */
.services-section {
  padding: 120px 0 80px;
}

.services-title {
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.services-subtitle {
  font-size: 1.15rem;
  opacity: 0.8;
  color: rgba(255, 255, 255, 0.7);
  text-align: gaitasunak;
  margin: 0 auto 4rem;
  max-width: 600px;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;  /* DOS COLUMNAS IGUALES */
  gap: 4rem;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

/* Skills izquierda */
.skills-column {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 500;
}

.skill-header span:first-child {
  color: #ffffff;
}

.skill-header span:last-child {
  color: #f97316;
}

.skill-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #fb923c);
  border-radius: 4px;
  transition: width 2s ease-in-out;
}

/* Estudios derecha */
.studies-column {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.study-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  transition: all 0.3s ease;
  height: 140px;  /* Altura fija para alinear */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.study-card:hover {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.05);
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.15);
}

.study-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.3;
}

.study-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: auto;
  line-height: 1.4;
}

.study-dates {
  font-size: 0.9rem;
  color: #f97316;
  font-weight: 600;
  align-self: flex-end;
}

/* Contact Section */
.contact-text {
  text-align: center;
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-info-grid {
  display: flex;
  justify-content: space-around;
  max-width: 900px;
  margin: 0 auto;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex: 1;
  min-width: 220px;
}

.icon {
  width: 48px;
  height: 48px;
  color: #f97316;
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.contact-value {
  font-weight: 600;
  font-size: 1.1rem;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
    justify-content: center;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-panel {
    padding: 2rem 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .study-card {
    height: auto;
  }

  .services-title {
    font-size: 2.2rem;
  }

  .contact-info-grid {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .contact-item {
    justify-content: center;
    text-align: center;
  }
}

.hero-title span:nth-child(3) {
  opacity: 0.8;
  font-size: 0.85em;
  margin-top: -0.2rem;
}


/* NUEVOS ESTILOS PARA EL LAYOUT INVERTIDO */
.languages-skills-column {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.languages-section,
.skills-section {
  flex: 1;
}

.languages-title {
  font-size: 1.3rem;
  color: #f97316;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: left;
}

/* Estudios adaptativos */
.study-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  /* QUITA height fijo - ahora es adaptativo */
}

.study-card:hover {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.2);
}

.study-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  color: #ffffff;
  font-weight: 600;
}

.study-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.study-dates {
  font-size: 0.9rem;
  color: #f97316;
  font-weight: 600;
  display: block;
  margin-top: 0.5rem;
}

/* ESTUDIOS ADAPTATIVOS PERFECTOS */
.study-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 20px;
  padding: 2rem 2rem 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  /* TOTALMENTE ADAPTATIVO */
  min-height: 140px;
}

.study-content {
  flex: 1;
}

.study-card:hover {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.2);
}

.study-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.3;
}

.study-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.study-dates {
  font-size: 0.9rem;
  color: #f97316;
  font-weight: 600;
  align-self: flex-end;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* BOTON DOWNLOAD CV */
.btn-download-cv {
  display: inline-block;
  margin-top: 2rem;
  padding: 14px 32px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #0f0f23;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.4);
  text-align: center;
}

.btn-download-cv:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.6);
  color: #0f0f23 !important;
}

/* TITULOS HIZKUNTZAK Y HABILIDADES */
.languages-title,
.skills-title {
  font-size: 1.3rem;
  color: #f97316;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: left;
}

.skills-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ESTUDIOS - CUADROS 100% ADAPTATIVOS PERFECTIONADOS */
.studies-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.study-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 20px;
  padding: 2.2rem;
  transition: all 0.3s ease;
  /* TOTALMENTE FLUIDO - sin altura fija */
  display: block;  /* CAMBIO CLAVE */
  position: relative;
  overflow: hidden;
  min-height: 120px;  /* MINIMO para evitar colapso */
}

.study-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.study-card:hover {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  box-shadow: 0 25px 50px rgba(249, 115, 22, 0.2);
  transform: translateY(-5px);
}

.study-card h3 {
  font-size: 1.15rem;
  margin: 0 0 0.8rem 0;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.3;
  word-break: keep-all;
}

.study-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin: 0 0 1.2rem 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;  /* MAX 3 lineas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.study-dates {
  font-size: 0.92rem;
  color: #f97316;
  font-weight: 600;
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  background: rgba(15, 15, 35, 0.9);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.3);
  backdrop-filter: blur(10px);
}

/* Responsive para estudios */
@media (max-width: 768px) {
  .study-card {
    padding: 1.8rem;
    min-height: 110px;
  }
  
  .study-dates {
    position: static;
    margin-top: 0.8rem;
    text-align: right;
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
  }
}
