/* ============================================================
   CSS CUSTOM PROPERTIES
============================================================ */
:root {
  --bg:           #0d0d0f;
  --surface:      #141416;
  --amber:        #c9a84c;
  --amber-dim:    rgba(201, 168, 76, 0.45);
  --amber-faint:  rgba(201, 168, 76, 0.15);
  --amber-faint2: rgba(201, 168, 76, 0.12);
  --steel:        #4a7fa5;
  --text:         #e8e6e1;
  --muted:        #7a7875;
  --border:       1px solid rgba(201, 168, 76, 0.15);
  --font-heading: 'Cinzel', serif;
  --font-body:    'DM Mono', monospace;
  --max-w:        900px;
  --section-pad:  120px;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-group > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-group.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.00s; }
.reveal-group.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.10s; }
.reveal-group.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.20s; }
.reveal-group.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.30s; }
.reveal-group.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.40s; }
.reveal-group.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.50s; }

/* ============================================================
   NAVIGATION
============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-bottom 0.35s ease;
}
nav.scrolled {
  background: rgba(13, 13, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}
.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  user-select: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--amber); }

.lang-toggle {
  display: flex;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 2px;
  overflow: hidden;
}
.lang-toggle button {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-toggle button.active { background: var(--amber-faint); color: var(--amber); }
.lang-toggle button:hover:not(.active) { color: var(--text); }
.lang-sep { width: 1px; background: rgba(201,168,76,0.2); }

/* ============================================================
   HERO
============================================================ */
#hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?w=1920&q=80');
  background-size: cover;
  background-position: center top;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,13,15,0.55) 0%, rgba(13,13,15,0.85) 70%, #0d0d0f 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  min-height: 1.4em;
}
#typing-text { color: var(--amber); }
.cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: var(--amber);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.9s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.hero-tagline {
  font-size: clamp(0.84rem, 1.6vw, 0.98rem);
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.8;
  margin: 0 auto 2.8rem;
  max-width: 620px;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.22s ease;
  display: inline-block;
}
.btn-primary {
  border: 1px solid var(--amber);
  color: var(--bg);
  background: var(--amber);
}
.btn-primary:hover { background: #d4b567; border-color: #d4b567; }
.btn-outline {
  border: 1px solid rgba(201, 168, 76, 0.45);
  color: var(--amber);
  background: transparent;
}
.btn-outline:hover { border-color: var(--amber); background: var(--amber-faint); }
.btn-ghost { border: none; color: var(--muted); background: transparent; }
.btn-ghost:hover { color: var(--amber); }

.hero-chevron {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--amber-dim);
  font-size: 1.5rem;
  animation: bounce 2.2s ease-in-out infinite;
  transition: color 0.2s;
}
.hero-chevron:hover { color: var(--amber); }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}

/* ============================================================
   SHARED SECTION
============================================================ */
section {
  padding: var(--section-pad) clamp(1.25rem, 5vw, 2rem);
  position: relative;
  overflow: hidden;
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--amber);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 3rem;
}

/* ============================================================
   ABOUT
============================================================ */
#about { background: var(--bg); }
#about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/Imaginario_Colectivo.png') center/cover no-repeat;
  filter: invert(1) sepia(0.5) brightness(0.22);
  z-index: 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.about-portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--amber);
  box-shadow: 0 0 0 6px rgba(201,168,76,0.08), 0 0 32px rgba(201,168,76,0.18);
}
.about-text p {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}
.about-text p:last-child { margin-bottom: 0; }

/* ============================================================
   SERVICES
============================================================ */
#services { background: var(--surface); }
#services::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/Una_Playa_2000.png') center/cover no-repeat;
  filter: brightness(0.12) saturate(0.6);
  z-index: 0;
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.svc-card {
  background: var(--bg);
  border: var(--border);
  border-radius: 3px;
  padding: 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.svc-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.2); }
.svc-card:hover::after { opacity: 1; }
.svc-icon { margin-bottom: 1.1rem; }
.svc-icon svg { width: 32px; height: 32px; }
.svc-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.65rem;
}
.svc-body {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.1rem;
}
.svc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.svc-tag {
  font-size: 0.68rem;
  padding: 0.22rem 0.6rem;
  border-radius: 2px;
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   HOW I WORK
============================================================ */
#how { background: var(--bg); }
#how::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/Untitled_Artwork.png') center/cover no-repeat;
  filter: invert(1) sepia(0.3) brightness(0.18) hue-rotate(15deg);
  z-index: 0;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.how-step {
  position: relative;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(201,168,76,0.2);
}
.how-step-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--amber-faint);
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.how-step-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.55rem;
  letter-spacing: 0.04em;
}
.how-step-body {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.75;
}
.how-ai-note {
  background: var(--surface);
  border: var(--border);
  border-radius: 3px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}
.how-ai-icon { flex-shrink: 0; margin-top: 2px; }
.how-ai-icon svg { width: 28px; height: 28px; }
.how-ai-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--amber);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}
.how-ai-text p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.75;
}
.how-ai-text a {
  color: rgba(201,168,76,0.65);
  transition: color 0.2s;
}
.how-ai-text a:hover { color: var(--amber); }

/* ============================================================
   SKILLS
============================================================ */
#skills { background: var(--surface); }
#skills::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/Untitled_Artwork.png') center/cover no-repeat;
  filter: invert(1) sepia(0.3) brightness(0.22) hue-rotate(15deg);
  z-index: 0;
}
.skills-groups { display: flex; flex-direction: column; gap: 2.2rem; }
.skill-group-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--amber);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
  background: var(--bg);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  cursor: default;
}
.pill:hover { border-color: var(--amber); color: var(--amber); transform: scale(1.04); }
.pill-ai { border-color: rgba(201,168,76,0.55); color: rgba(201,168,76,0.75); }
.pill-ai:hover { border-color: var(--amber); color: var(--amber); }

/* ============================================================
   EXPERIENCE
============================================================ */
#experience { background: var(--bg); }
#experience::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/Vinculos.png') center/cover no-repeat;
  filter: brightness(0.18) saturate(1.6);
  z-index: 0;
}
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--amber) 0%, rgba(201,168,76,0.15) 100%);
}
.timeline-entry {
  position: relative;
  margin-bottom: 3.5rem;
}
.timeline-entry:last-child { margin-bottom: 0; }
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -2.2rem; top: 6px;
  width: 10px; height: 10px;
  background: var(--amber);
  transform: translateX(-4px) rotate(45deg);
}
.entry-role {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.entry-company {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--amber);
  margin-bottom: 0.4rem;
}
.entry-meta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.entry-body {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

/* Case study accordion */
.case-studies { display: flex; flex-direction: column; gap: 1rem; }
.case-study {
  border: var(--border);
  border-radius: 3px;
  overflow: hidden;
  background: rgba(20, 20, 22, 0.65);
  backdrop-filter: blur(4px);
}
.case-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s;
}
.case-header:hover { background: rgba(201,168,76,0.06); }
.case-header-left { display: flex; flex-direction: column; gap: 0.25rem; }
.case-client {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.case-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.case-chevron {
  color: var(--amber);
  font-size: 0.9rem;
  transition: transform 0.28s ease;
  flex-shrink: 0;
}
.case-study.open .case-chevron { transform: rotate(180deg); }
.case-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.case-body-inner {
  padding: 0 1.2rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.2rem;
}
.case-col-label {
  font-family: var(--font-body);
  font-size: 0.66rem;
  color: var(--amber);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.case-col-label::before {
  content: '';
  display: inline-block;
  width: 14px; height: 1px;
  background: var(--amber);
}
.case-col-text {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ============================================================
   EDUCATION
============================================================ */
#education { background: var(--surface); }
#education::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/Una_Playa_2000.png') center/cover no-repeat;
  filter: brightness(0.15) saturate(0.85);
  z-index: 0;
}
.edu-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.edu-card {
  position: relative;
  background: var(--bg);
  border: var(--border);
  border-radius: 3px;
  padding: 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.edu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(201,168,76,0.2);
}
.edu-icon { margin-bottom: 1.1rem; }
.edu-icon svg { width: 32px; height: 32px; }
.edu-institution {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.edu-location {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.edu-credential {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.edu-badge {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.1em;
}
.edu-verify {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: rgba(201,168,76,0.55);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.edu-verify:hover { color: var(--amber); }
.edu-issued {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.cert-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.cert-pill {
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  background: var(--bg);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   CONTACT
============================================================ */
#contact { background: var(--bg); }
#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('img/Untitled_Artwork.png') center/cover no-repeat;
  filter: invert(1) sepia(0.4) brightness(0.18);
  z-index: 0;
}
.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact-copy {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2.4rem;
  align-items: center;
}
.contact-info span {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.btn-filled {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9rem 2.6rem;
  border-radius: 2px;
  background: var(--amber);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-block;
}
.btn-filled:hover { background: #d4b567; }

/* ============================================================
   FOOTER
============================================================ */
footer {
  background: var(--surface);
  border-top: 1px solid rgba(201,168,76,0.12);
  padding: 1.6rem clamp(1.25rem, 5vw, 2rem);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-inner span {
  font-family: var(--font-body);
  font-size: 0.73rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.footer-easter {
  cursor: help;
  position: relative;
}
.footer-easter::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 140%;
  right: 0;
  white-space: nowrap;
  background: var(--surface);
  border: var(--border);
  border-radius: 2px;
  padding: 0.35rem 0.7rem;
  font-size: 0.68rem;
  color: var(--amber);
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.footer-easter:hover::after { opacity: 1; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  :root { --section-pad: 72px; }
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 2rem; }
  .edu-cards { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .case-body-inner { grid-template-columns: 1fr; gap: 1rem; }
  .footer-inner { flex-direction: column; gap: 0.4rem; text-align: center; }
}
