
/* ========================================
   1. VARIABLES
======================================== */

:root {
  --bg: #0b1220;
  --panel: #111c2f;
  --text: #edf3fb;
  --muted: #a7b5c9;
  --accent: #70e1c1;
  --blue: #86aaff;
  --line: rgba(190, 210, 235, 0.16);
  --max-width: 1080px;
}

/* ========================================
   2. RESET & GENERAL
======================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(
      ellipse at top right,
      rgba(73, 112, 190, 0.18),
      transparent 38%
    ),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

accent {
  color: var(--accent);
  text-decoration: none;
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

/* ========================================
   3. NAVIGATION
======================================== */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

nav {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo span,
h1 span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ========================================
   4. HERO
======================================== */

.hero {
  min-height: 600px;
  padding: 90px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -3px;
  margin: 22px 0;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ========================================
   5. BUTTONS
======================================== */

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-block;
  padding: 12px 19px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: 0.2s;
}

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

.button-primary {
  background: var(--accent);
  color: #07131b;
  border-color: var(--accent);
}

.brain-buttons {
  width: 100%;
  margin-top: 25px;
}

.brain-button {
  display: block;
  width: 100%;
  text-align: center;
}

/* ========================================
   6. PROFILE CARD
======================================== */

.profile-card {
  background:
    linear-gradient(
      145deg,
      rgba(112, 225, 193, 0.10),
      rgba(134, 170, 255, 0.08)
    ),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
}

.graphic{
  width:145px;
  height:145px;
  margin:0 auto 25px;
  position:relative;
  display:grid;
  place-items:center;
}

/* círculo exterior incompleto */

.graphic::after{
  content:"";
  position:absolute;
  inset:0;

  border-radius:50%;

  border:2px dashed transparent;
  border-top:2px solid var(--accent);
  border-right:2px solid var(--accent);
  border-bottom:2px solid var(--accent);
  border-left:2px solid var(--accent);
  opacity:.9;
}

/* círculo interior incompleto y punteado */

.graphic::before{
  content:"";
  position:absolute;
  inset:17px;

  border-radius:50%;

  border:2px dashed transparent;
  border-top-color:var(--blue);
  border-right-color:var(--blue);
  border-bottom-color:var(--blue);
  border-left-color:var(--blue);
  opacity:.8;
}

.chip-icon{
  width:62px;
  height:62px;

  display:grid;
  place-items:center;

  background:#17243a;
  border:2px solid var(--accent);
  border-radius:12px;

  color:var(--accent);
  font-size:1.5rem;
  font-weight:800;

  position:relative;
  z-index:2;

  transition:all .3s ease;
}

/* Hover */

.graphic:hover::after{
  animation:spinOuter 4s linear infinite;
}

.graphic:hover::before{
  animation:spinInner 2.5s linear infinite;
}

.graphic:hover .chip-icon{
  transform:scale(1.08);

  box-shadow:
    0 0 12px #70e1c1,
    0 0 25px rgba(112,225,193,.55),
    0 0 45px rgba(112,225,193,.25);
}

/* Animaciones */

@keyframes spinOuter{
  from{transform:rotate(0deg);}
  to{transform:rotate(360deg);}
}

@keyframes spinInner{
  from{transform:rotate(360deg);}
  to{transform:rotate(0deg);}
}

.profile-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.profile-card > p {
  color: var(--muted);
  font-size: 0.92rem;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 25px;
}

.fact {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.fact strong {
  display: block;
  font-size: 0.92rem;
}

.fact small {
  color: var(--muted);
}

/* ========================================
   7. GENERAL SECTIONS
======================================== */

section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 32px;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-top: 10px;
}

.section-description {
  color: var(--muted);
  text-align: justify;
  margin-top: 12px;
}

/* ========================================
   8. ABOUT & SKILLS
======================================== */

.about-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.about-text {
  flex: 1;
}

.image-container {
  flex-shrink: 0;
  margin-top: 100px;
}

.profile-image {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid rgba(112, 225, 193, 0.25);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease;
}

.profile-image:hover {
  transform: translateY(-3px);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 26px;
}

.panel p {
  color: var(--muted);
}

.panel p + p {
  margin-top: 15px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.skill {
  background: rgba(134, 170, 255, 0.08);
  border: 1px solid rgba(134, 170, 255, 0.2);
  border-radius: 20px;
  padding: 6px 11px;
  font-size: 0.82rem;
  color: #dbe7ff;
}

/* ========================================
   9. EXPERIENCE
======================================== */

.timeline {
  display: grid;
  gap: 16px;
}

.job {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 25px;
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(17, 28, 47, 0.75);
  border-radius: 15px;
}

.job-date {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.job h3 {
  font-size: 1.12rem;
}

.company {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 4px 0 14px;
}

.job ul {
  color: var(--muted);
  padding-left: 20px;
}

.job li + li {
  margin-top: 6px;
}

/* ========================================
   10. PROJECTS CAROUSEL
======================================== */

#projects .projects {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  align-items: center;

  /* Center first and last cards */
  padding: 45px calc((100% - 350px) / 2);

  cursor: grab;
  overscroll-behavior-x: contain;
}

#projects .projects:active {
  cursor: grabbing;
}

#projects .projects::-webkit-scrollbar {
  display: none;
}

/* Disable text selection inside carousel */

#projects .projects,
#projects .projects .project,
#projects .projects .project * {
  -webkit-user-select: none;
  user-select: none;
}

/* Equal card dimensions */

#projects .project {
  flex: 0 0 350px;
  width: 350px;
  height: 350px;
  min-width: 0;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  padding: 25px;

  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  scroll-snap-align: center;

  transform: scale(0.85);
  opacity: 0.5;

  transition:
    transform 0.35s ease,
    opacity 0.35s ease,
    border-color 0.35s ease;
}

#projects .project.active {
  transform: scale(1.08);
  opacity: 1;
  border-color: var(--accent);
  z-index: 2;
}

.project-number {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.project h3 {
  margin: 18px 0 10px;
}

.project p {
  color: var(--muted);
  font-size: 0.92rem;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.project small {
  margin-top: auto;
  padding-top: 20px;
  color: var(--blue);
}

/* ========================================
   10.1 GENERAL SCROLLER
======================================== */

.scroller {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  padding-bottom: 10px;
}

/* ========================================
   11. CONTACT
======================================== */

.contact-box {
  padding: 35px;
  border: 1px solid rgba(112, 225, 193, 0.3);
  border-radius: 18px;
  background: linear-gradient(
    120deg,
    rgba(112, 225, 193, 0.08),
    rgba(134, 170, 255, 0.06)
  );
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.contact-box p {
  color: var(--muted);
  margin-top: 10px;
}

/* ========================================
   12. FOOTER
======================================== */

footer {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ========================================
   13. TABLET & MOBILE
======================================== */

@media (max-width: 760px) {
  .hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 65px 0;
    gap: 35px;
  }

  .about-header {
    flex-direction: column;
  }

  .image-container {
    width: 100%;
    margin: 20px 0 0;
    display: flex;
    justify-content: center;
    align-self: stretch;
  }

  .profile-image {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    object-fit: cover;
  }
}
  .job {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 12px;
    font-size: 0.75rem;
  }

  #projects .projects {
    padding: 35px 10%;
    scroll-padding-inline: 10%;
  }

  #projects .project {
    flex-basis: 80%;
    width: 80%;
    height: 370px;
    padding: 21px;
  }

  h1 {
    letter-spacing: -2px;
  }

  section {
    padding: 58px 0;
  }

  .container {
    width: calc(100% - 28px);
  }

  .profile-card,
  .panel,
  .job,
  .contact-box {
    padding: 21px;
  }

  footer {
    flex-direction: column;
  }
}
