/* General Styles */
/* Typography System - Major Third Scale (1.25) */
:root {
  --base-size: 16px;
  --scale: 1.25;
}

* {
  font-family: 'Satoshi', sans-serif;
}

body {
  font-family: 'Satoshi', sans-serif;
  font-size: 1rem; /* 16px */
  line-height: 150%;
  letter-spacing: 0;
}

p {
  font-size: 1rem; /* 16px */
  line-height: 150%;
  letter-spacing: 0;
}

h6 {
  font-size: 1.25rem; /* 20px */
  line-height: 130%;
  letter-spacing: -0.5%;
}

h5 {
  font-size: 1.563rem; /* 25px = 20 * 1.25 */
  line-height: 130%;
  letter-spacing: -0.5%;
}

h4 {
  font-size: 1.953rem; /* 31.25px = 25 * 1.25 */
  line-height: 130%;
  letter-spacing: -1%;
}

h3 {
  font-size: 2.441rem; /* 39px = 31.25 * 1.25 */
  line-height: 120%;
  letter-spacing: -1.5%;
}

h2 {
  font-size: 3.052rem; /* 48.8px = 39 * 1.25 */
  line-height: 110%;
  letter-spacing: -1.5%;
}

h1 {
  font-size: 3.815rem; /* 61px = 48.8 * 1.25 */
  line-height: 100%;
  letter-spacing: -2%;
  font-weight: 900;
}

/* Section titles */
.display-3 {
  font-size: 3.052rem; /* equivalente a h2 */
  line-height: 110%;
  letter-spacing: -1.5%;
}

/* Navbar Styles */
.navbar {
  background-color: #141e28;
  position: fixed;
  top: 0;
  width: 100%; 
  z-index: 1000;
  height: 80px;
}

.nav-link {
  color: #ffffff !important;
}

.navbar-brand {
  position: relative;
  left: 15px;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler {
  margin-left: auto;
}

/* Hero styles */
.hero-section {
  background-color: #141e28;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://nachorob.github.io/portfolio/assets/img/bg-hero.png');
  background-size: cover; 
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.05;
  z-index: 0;
}

.hero-title {
  font-size: 12.5rem; /* 200px */
  line-height: 100%;
  color: #ffffff;
  text-align: center;
  letter-spacing: -2%;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  color: #ffffff;
  text-align: center;
}

/* Educación Section */
.education-card {
  border: 2px solid #141e28;
  padding: 30px;
  background-color: white;
  margin: 0;
  text-align: left;
  min-height: 445px;
  position: relative;
}

.card-content {
  border-left: 1px solid #bbb;
  padding-left: 15px;
  margin-left: 5px;
}

.education-card i {
  color: #141e28;
}

.highlight-pink {
  border-bottom: 8px solid #ff006e;
}

.highlight-blue {
  border-bottom: 8px solid #00d9ff;
}

.highlight-orange {
  border-bottom: 8px solid #ff6b00;
}

.highlight-pink,
.highlight-blue,
.highlight-orange {
  display: inline-block;
  line-height: 0.5;
  padding-bottom: 0;
}

.title-with-icon {
  display: flex;
  align-items: start;
  gap: 15px;
}

.code-tag {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #666;
}

/* Portfolio Styles */
.portfolio-section {
  background-color: #141e28;
  position: relative;
  overflow: hidden;
}

.portfolio-section::before {
  content: 'const developer = { \A  name: "Nacho", \A  skills: ["JS", "Python"], \A  passion: "code" \A}; \A\Afunction build() { \A  return dreams; \A}';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: rgba(105, 218, 235, 0.2);
  white-space: pre;
  padding: 20px;
  z-index: 0;
}

.portfolio-section .container {
  position: relative;
  z-index: 1;
}

.portfolio-section h2 {
  color: white !important;
}

#portfolio .col-12.col-md-6.col-lg-4 {
  display: flex;
}

.project-card {
  background-color: rgba(255, 255, 255, 0.1);
  height: 98%;
  display: flex;
  flex-direction: column;
  border: 1px solid #ffffff;
  border-radius: 30px;
  margin: 5px;
  padding: 20px;
  color: white;
  text-align: center;
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.project-card h4 {
  font-size: 1.953rem;
  line-height: 130%;
  letter-spacing: -1%;
  margin-bottom: 5px;
  transition: color 0.3s;
}

.project-card:hover h4 {
  color: #69daeb;
}

.project-card:hover p {
  color: #69daeb;
}

.project-category {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.tech-tags span {
  display: inline-block;
  background-color: #ff006e;
  padding: 5px 10px;
  margin-bottom: 5px;
  border-radius: 20px;
  font-size: 12px;
  margin-right: 5px;
  opacity: 75%;
}

.btn-github {
  display: inline-block;
  background-color: #916dd0;
  color: white;
  padding: 8px 20px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 15px;
  transition: background-color 0.3s;
}

.btn-github:hover {
  background-color: #795bae;
  color: white;
}

/* Experience Section */
.experience-section {
  background-color: #ffffff;
}

.accordion-item {
  background-color: #3d2d5a;
  border: none;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.accordion-button {
  background-color: #3d2d5a;
  color: white;
  font-weight: 600;
  border: none;
  padding: 20px 25px;
}

.accordion-button:not(.collapsed) {
  background-color: #916dd0;
  color: white;
}

.accordion-button:focus {
  box-shadow: none;
  border: none;
}

.accordion-button::after {
  filter: brightness(0) invert(1);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-right: 20px;
}

.job-title {
  font-size: 1.563rem;
  line-height: 130%;
  letter-spacing: -0.5%;
}

.job-years {
  font-size: 16px;
  opacity: 0.9;
}

.accordion-body {
  background-color: #3d2d5a;
  color: white;
  padding: 25px;
}

.job-link {
  margin-bottom: 15px;
}

.job-link a {
  color: #ffffff;
  text-decoration: none;
}

.job-link a:hover {
  color: #69daeb;
}

.job-link i {
  color: #cbb8eb;
  margin-right: 8px;
}

.job-link a i {
  color: #cbb8eb;
  margin-left: 35px;
}

.job-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.job-content p {
  flex: 1;
}

.job-content img {
  flex-shrink: 0;
}

/* Contact Section */
.contact-section {
  background-color: #141e28;
  color: white;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #916dd0;
  margin-bottom: 10px;
}

.contact-content h2 {
  font-size: 3rem;
  margin: 0;
}

.contact-intro {
  font-size: 1.125rem;
  line-height: 150%;
  color: rgba(255, 255, 255, 0.8);
}

.email-contact {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.email-contact::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #916dd0;
  transition: all 0.3s ease;
  z-index: -1;
}

.email-contact:hover::after {
  height: 100%;
}

.email-contact:hover {
  color: #ffffff;
}

.divider {
  width: 100px;
  height: 2px;
  background: linear-gradient(to right, #916dd0, #69daeb);
  margin: 20px 0;
}

.about-snippet {
  font-size: 1rem;
  line-height: 160%;
  color: rgba(255, 255, 255, 0.9);
  padding: 25px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border-left: 3px solid #916dd0;
  position: relative;
}

.code-bracket {
  color: #69daeb;
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin: 10px 0;
}

.social-contact {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.social-contact a {
  color: white;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.social-contact a:hover {
  color: #69daeb;
  transform: translateY(-5px);
}

/* Footer */
html, body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

.footer-custom {
  margin-top: auto;
  background-color: #141e28;
}

/* ========== MEDIA QUERIES ========== */

/* Móviles (hasta 768px) */
@media (max-width: 768px) {
  /* Hero */
  .hero-title {
    font-size: 3.75rem;
  }
  
  /* Expertise */
  .title-with-icon {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .title-with-icon h3 {
    font-size: 1.5rem;
  }
  
  .education-card {
    min-height: auto;
  }
  
  /* Portfolio */
  .project-card h4 {
    font-size: 1.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .project-card {
    padding: 15px;
  }
  
  .project-img {
    width: 100%;
    height: auto;
  }
}

/* Tablets (1006px - 1356px) - iPad */
@media screen and (min-width: 755px) and (max-width: 1373px) {
  /* Hero */
  .hero-title {
    font-size: 7.5rem;
  }
  
  /* Expertise */
  .title-with-icon {
    flex-direction: row;
    align-items: flex-start;
    gap: 4px !important;
  }
  
  .title-with-icon h3 {
    font-size: 1.15rem !important;
  }
  
  .title-with-icon i {
    font-size: 1.4rem !important;
  }

  .education-card {
    padding: 15px !important;
  }

  .card-content p {
    font-size: 0.82rem !important;
  }
}

/* Navbar collapse en móvil y tablet */
@media (max-width: 992px) {
  .navbar-collapse {
    background-color: #141e28;
    padding: 20px;
    margin-top: 10px;
    border-radius: 8px;
  }
  
  .nav-item {
    margin: 10px 0;
  }
}