/* =============================================================
   SCROLL BEHAVIOUR + SECTION OFFSET
   ============================================================= */

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 80px;
}

/* =============================================================
   FLOATING PILL NAV
   ============================================================= */

.nav-pill {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 52px;
  padding: 0 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  box-shadow: 0 1px 0 0 var(--color-border), 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
  max-width: calc(100vw - 32px);
}

.nav-pill.scrolled {
  box-shadow: 0 1px 0 0 var(--color-border), 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 20px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 0 auto;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.nav-talk {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.availability-dot {
  width: 8px;
  height: 8px;
  background: #1A7A3C;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger:focus span,
.hamburger:hover span {
  background: var(--color-text);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-pill {
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    padding: 0 20px;
    gap: 0;
    justify-content: space-between;
    overflow: visible;
  }

  .nav-logo img {
    height: 18px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 20px 20px;
    gap: 16px;
    margin: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-link {
    font-size: 16px;
  }

  .nav-right {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* =============================================================
   HERO SECTION
   ============================================================= */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
  overflow: hidden;
  background: var(--color-bg);
}

.hero-label {
  position: absolute;
  top: 140px;
  left: var(--space-8);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.hero-name h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(80px, 10vw, 140px);
  line-height: 0.92;
  color: var(--color-text);
  margin: 0;
}

.hero-line {
  display: block;
}

.hero-pills {
  position: absolute;
  bottom: 80px;
  right: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 4px 12px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.hero-pill--available {
  background: #F0FAF4;
  color: #1A7A3C;
  border-color: rgba(26, 122, 60, 0.25);
  gap: 7px;
}

.hero-scroll {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}

.hero-scroll span {
  writing-mode: vertical-rl;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
}

/* Hero mobile — nombre al fondo como en referente */
@media (max-width: 768px) {
  .hero {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    padding-top: 52px;
    padding-bottom: var(--space-6);
    height: 100svh;
    min-height: 100svh;
    align-items: flex-end;
    flex-direction: column;
    justify-content: flex-end;
  }

  .hero-label {
    left: var(--space-3);
    top: 80px;
    font-size: 10px;
  }

  .hero-name {
    width: 100%;
  }

  .hero-name h1 {
    font-size: clamp(52px, 13vw, 80px);
    line-height: 0.92;
  }

  .hero-pills {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    margin-top: var(--space-3);
    width: 100%;
  }

  .hero-scroll {
    display: none;
  }
}

/* =============================================================
   TICKER
   ============================================================= */

.ticker {
  width: 100%;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
  overflow: hidden;
  background: var(--color-bg);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  white-space: nowrap;
  text-transform: uppercase;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-33.333%);
  }
}

/* =============================================================
   WORK SECTION
   ============================================================= */

.work-section {
  padding: var(--space-12) 0 0;
}

.section-header {
  padding: 0 var(--space-8);
  margin-bottom: var(--space-6);
}

.section-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 80px);
  color: var(--color-text);
  line-height: 1;
  margin: 0 0 var(--space-3);
  text-align: left;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin-top: var(--space-3);
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s ease;
  cursor: default;
}

.project-card:hover {
  background: var(--color-surface);
}

.project-card:hover .card-arrow {
  transform: rotate(-45deg);
}

.card-left {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-number,
.card-company {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
}

.card-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 36px);
  color: var(--color-text);
  line-height: 1.1;
  max-width: 480px;
  margin: 0;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 4px 14px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.card-metrics {
  display: flex;
  gap: 40px;
  margin-top: auto;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--color-accent);
  line-height: 1;
}

.metric-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--color-text-muted);
  max-width: 120px;
  line-height: 1.4;
}

.card-arrow {
  position: absolute;
  bottom: var(--space-8);
  right: var(--space-8);
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: transform 0.25s ease, color 0.2s ease;
  display: inline-block;
}

.card-arrow:hover {
  color: var(--color-text);
}

.card-right {
  border-left: 1px solid var(--color-border);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: var(--color-surface);
}

/* Cards mobile — imagen arriba, contenido abajo */
@media (max-width: 768px) {
  .section-header {
    padding: 0 var(--space-3);
  }

  .project-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: auto;
  }

  .card-right {
    order: -1;
    border-left: none;
    border-bottom: 1px solid var(--color-border);
  }

  .card-image-placeholder {
    min-height: 220px;
    width: 100%;
  }

  .card-left {
    padding: var(--space-4) var(--space-3);
    gap: var(--space-2);
  }

  .card-arrow {
    position: static;
    align-self: flex-end;
  }

  .card-metrics {
    margin-top: var(--space-2);
  }
}

/* =============================================================
   ABOUT SECTION
   ============================================================= */

.about-section {
  padding: var(--space-12) 0;
}

.about-inner {
  padding: 0 var(--space-8);
}

.about-section .section-title {
  text-align: left;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-top: var(--space-6);
  align-items: start;
}

.about-bio {
  max-width: 520px;
}

.about-bio p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.cv-link {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  margin-top: var(--space-1);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.cv-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.experience-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  gap: 16px;
  flex-wrap: wrap;
}

.exp-company {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  display: block;
}

.exp-role {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

.exp-years {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .about-inner {
    padding: 0 var(--space-3);
  }

  .about-section .section-title {
    text-align: left;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .about-bio {
    max-width: 100%;
  }

  .about-bio p {
    font-size: 16px;
  }

  .experience-item {
    flex-direction: column;
    gap: 4px;
  }

  .exp-years {
    font-size: 12px;
  }
}

/* =============================================================
   CONTACT SECTION
   ============================================================= */

.contact-section {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--color-border);
}

.contact-inner {
  padding: 0 var(--space-8);
}

.contact-display {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-3);
}

.contact-line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 8vw, 120px);
  color: var(--color-text);
  line-height: 1;
  display: block;
}

.contact-line-link {
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.contact-line-link:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.contact-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
}

.contact-email {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-muted);
}

.contact-linkedin {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-linkedin:hover {
  color: var(--color-text);
}

@media (max-width: 768px) {
  .contact-inner {
    padding: 0 var(--space-3);
  }

  .contact-line {
    font-size: clamp(40px, 10vw, 64px);
    line-height: 1.05;
  }

  .contact-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: var(--space-4);
  }
}

/* =============================================================
   FOOTER
   ============================================================= */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-8);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer-copy,
.footer-role {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .site-footer {
    padding: var(--space-3);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
}

/* =============================================================
   SKILLS
   ============================================================= */

.skills-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
/* =============================================================
   TABLET BREAKPOINT (769px - 1024px)
   ============================================================= */

@media (min-width: 769px) and (max-width: 1024px) {

  .hero {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
    padding-bottom: 64px;
  }

  .hero-label {
    left: var(--space-6);
  }

  .hero-name h1 {
    font-size: clamp(64px, 8vw, 100px);
  }

  .hero-pills {
    bottom: 64px;
    right: var(--space-6);
  }

  .section-header {
    padding: 0 var(--space-6);
  }

  .card-left {
    padding: var(--space-6);
  }

  .about-inner {
    padding: 0 var(--space-6);
  }

  .contact-inner {
    padding: 0 var(--space-6);
  }

  .site-footer {
    padding: var(--space-3) var(--space-6);
  }
}
