:root{
  --bg: #f5f2ea;
  --bg-card: #ffffff;
  --border-light: rgba(20,24,29,0.10);
  --text: #15191e;
  --text-dim: #666f7a;

  --panel-dark: #12181f;
  --panel-dark-alt: #1a222b;
  --border-dark: rgba(255,255,255,0.10);
  --text-on-dark: #f4f6f8;
  --text-on-dark-dim: #9aa7b4;

  --accent: #d4a13d;
  --accent-deep: #a8791f;
  --accent-2: #d4a13d;
  --accent-3: #d4a13d;
  --on-accent: #14181d;

  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --max: 1160px;
}

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

html{scroll-behavior:smooth;}

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1,h2,h3{font-family: var(--font-display); font-weight:700; letter-spacing:-0.03em;}

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

.eyebrow{
  text-transform:uppercase;
  letter-spacing:0.14em;
  font-size:0.75rem;
  color:var(--accent-deep);
  font-weight:700;
  margin-bottom:12px;
}
.panel-dark .eyebrow, .cta-panel .eyebrow{color:var(--accent);}

/* NAV */
.nav{
  position:fixed; top:18px; left:0; right:0; z-index:50;
  display:flex; justify-content:center;
}
.nav-inner{
  max-width:var(--max); width:calc(100% - 32px);
  margin:0 auto; padding:12px 20px;
  display:flex; align-items:center; justify-content:space-between;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border:1px solid var(--border-light);
  border-radius:999px;
  box-shadow:0 8px 30px -12px rgba(20,24,29,0.15);
  transition: padding .25s ease, box-shadow .25s ease;
}
.nav.scrolled .nav-inner{padding:9px 20px; box-shadow:0 10px 34px -10px rgba(20,24,29,0.22);}
.logo{font-family:var(--font-display); font-weight:700; font-size:1.2rem; color:var(--text);}
.logo span{ color:var(--accent-deep); }
.nav-links{display:flex; gap:28px;}
.nav-links a{font-size:0.86rem; font-weight:500; color:var(--text-dim); transition:color .2s;}
.nav-links a:hover{color:var(--text);}
.nav-toggle{display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer;}
.nav-toggle span{width:20px; height:2px; background:var(--text);}

.nav-right{display:flex; align-items:center; gap:14px;}
.lang-switch{display:flex; align-items:center; gap:2px; background:rgba(20,24,29,0.05); border:1px solid var(--border-light); border-radius:999px; padding:3px;}
.lang-switch a{font-size:0.72rem; font-weight:700; padding:5px 9px; border-radius:999px; color:var(--text-dim); transition: background .2s ease, color .2s ease;}
.lang-switch a:hover{color:var(--text);}
.lang-switch a.lang-active{background:var(--text); color:var(--bg);}

.page-top-spacer{height:96px;}

/* BUTTONS */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:12px 24px; border-radius:999px; font-weight:600; font-size:0.88rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  border:1px solid transparent;
}
.btn-primary{
  background: var(--accent);
  color:var(--on-accent);
}
.btn-primary:hover{
  transform:translateY(-2px);
  background: #e0ac48;
}
.btn-ghost{border-color:var(--border-light); color:var(--text); background:rgba(255,255,255,0.5);}
.btn-ghost:hover{border-color:var(--accent-deep); color:var(--accent-deep); transform:translateY(-2px);}
.panel-dark .btn-ghost, .cta-panel .btn-ghost{border-color:var(--border-dark); color:var(--text-on-dark); background:rgba(255,255,255,0.06);}
.panel-dark .btn-ghost:hover, .cta-panel .btn-ghost:hover{border-color:var(--accent); color:var(--accent);}
.btn-small{padding:9px 18px; font-size:0.82rem;}

/* PANEL DARK (hero / capabilities / cta wrapper) */
.panel-wrap{padding:0 16px;}
.panel-dark{
  position:relative;
  max-width:calc(var(--max) + 32px);
  margin:0 auto;
  background: var(--panel-dark);
  border-radius:36px;
  overflow:hidden;
  color:var(--text-on-dark);
}
.panel-glow{
  position:absolute; top:-180px; right:-160px;
  width:560px; height:560px; border-radius:50%;
  background: radial-gradient(circle, rgba(182,137,63,0.10), transparent 70%);
  pointer-events:none;
}

/* HERO */
.hero{ position:relative; padding:88px 64px 0; }
.hero-inner{position:relative; z-index:2;}
.hero-with-photo{display:grid; grid-template-columns:1.25fr 0.9fr; gap:64px; align-items:center;}

.hero-photo-wrap{position:relative; justify-self:center; display:flex; flex-direction:column; align-items:center; gap:18px;}
.hero-badge{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--border-dark); border-radius:999px;
  padding:8px 16px; font-size:0.72rem; font-weight:600; letter-spacing:0.02em;
  color:var(--text-on-dark-dim);
}
.hero-badge-dot{width:6px; height:6px; border-radius:50%; background:var(--accent);}

.hero-photo{
  position:relative;
  border-radius:50%;
  overflow:hidden;
  aspect-ratio:1/1;
  max-width:300px;
  border:1px solid var(--border-dark);
}
.hero-photo img{
  width:100%; height:100%; object-fit:cover; display:block;
  border-radius:50%;
}

.hero h1{
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight:800;
  line-height:1.12;
  margin-bottom:26px;
  color:var(--text-on-dark);
}
.gradient-text{ color:var(--accent); }
.hero-lead{
  max-width:540px;
  color:var(--text-on-dark-dim);
  font-size:1rem;
  margin-bottom:40px;
}
.hero-actions{display:flex; gap:14px; margin-bottom:8px; flex-wrap:wrap;}

/* HERO STAT ROW (icon based, bottom of panel) */
.hero-stat-row{
  position:relative; z-index:2;
  margin-top:72px;
  border-top:1px solid var(--border-dark);
  display:grid; grid-template-columns:repeat(3,1fr);
}
.hero-stat{
  display:flex; align-items:center; gap:16px;
  padding:32px 36px;
  border-right:1px solid var(--border-dark);
}
.hero-stat:last-child{border-right:none;}
.hero-stat-icon{
  width:38px; height:38px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--border-dark);
  color:var(--accent); font-size:1.1rem;
}
.hero-stat-num{
  font-family:var(--font-display); font-size:1.5rem; font-weight:700;
  color:var(--text-on-dark); display:block; line-height:1.1;
}
.hero-stat-label{font-size:0.76rem; color:var(--text-on-dark-dim);}

/* MARQUEE */
.marquee{
  position:relative; z-index:2;
  overflow:hidden;
  background:var(--panel-dark);
  padding:16px 56px 40px;
}
.marquee-inner{border-top:1px solid var(--border-dark); padding-top:16px; overflow:hidden;}
.marquee-track{
  display:flex; gap:14px; white-space:nowrap; width:max-content;
  animation: marqueeScroll 32s linear infinite;
  font-family:'Courier New', monospace;
  font-size:0.78rem;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:var(--text-on-dark-dim);
}
.marquee:hover .marquee-track{animation-play-state:paused;}
@keyframes marqueeScroll{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}

/* SECTIONS */
.section{padding:120px 0;}
.section-alt{background:var(--bg-card);}
.section h2{font-size:clamp(1.6rem,3.5vw,2.3rem); margin-bottom:20px; max-width:640px;}
.section-head{display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:56px; flex-wrap:wrap;}
.section-head h2{margin-bottom:0;}
.section-sub{color:var(--text-dim); max-width:440px; font-size:0.95rem;}

.grid{display:grid; gap:28px;}
.portfolio-grid{grid-template-columns:repeat(2,1fr);}

/* CAPABILITIES GRID (inside dark panel) */
.capabilities-panel{padding:88px 0 92px;}
.capabilities-head{padding:0 64px; margin-bottom:48px; position:relative; z-index:2;}
.capabilities-head h2{color:var(--text-on-dark); margin-bottom:8px;}
.capabilities-sub{color:var(--text-on-dark-dim); max-width:520px; font-size:0.92rem;}
.carousel-track{
  position:relative; z-index:2;
  display:grid; grid-template-columns:repeat(3,1fr); gap:24px;
  padding:0 64px;
}
.carousel-track .carousel-card:first-child{grid-column:span 2;}
.carousel-card{
  background: var(--bg-card);
  border:1px solid transparent;
  border-radius:16px;
  padding:30px 28px;
  box-shadow:0 12px 28px -12px rgba(0,0,0,0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.carousel-card:hover{
  transform: translateY(-4px);
  box-shadow:0 20px 40px -14px rgba(0,0,0,0.45);
}
.carousel-label{
  display:inline-block; font-size:0.68rem; font-weight:700; letter-spacing:0.06em; text-transform:uppercase;
  color:var(--accent-deep); border:1px solid var(--border-light);
  border-radius:999px; padding:4px 10px; margin-bottom:18px;
}
.carousel-card h3{font-size:1.05rem; margin-bottom:12px; color:var(--text);}
.carousel-card p{color:var(--text-dim); font-size:0.88rem; margin-bottom:18px;}

.tags{display:flex; flex-wrap:wrap; gap:8px; list-style:none;}
.tags li{
  font-size:0.72rem; padding:5px 10px; border-radius:999px;
  color:var(--text-dim);
  border:1px solid var(--border-light);
}
.cta-panel .tags li{color:var(--text-on-dark-dim); border-color:var(--border-dark);}

/* PORTFOLIO PROJECT CARDS (light) */
.project-card{
  background:var(--bg-card);
  border:1px solid var(--border-light);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 8px 20px -10px rgba(20,24,29,0.15);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.project-card:hover{
  border-color:rgba(150,112,47,0.35);
  transform:translateY(-4px);
  box-shadow:0 20px 40px -16px rgba(20,24,29,0.3);
}
.project-media{
  position:relative;
  height:210px;
  background: #eef0ee;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.project-media img{
  width:100%; max-height:100%;
  object-fit:contain;
  display:block;
  border-radius:4px;
  box-shadow:0 8px 24px rgba(20,24,29,0.14);
  transition: transform .4s ease;
}
.project-card:hover .project-media img{transform:scale(1.02);}
.project-body{padding:22px 24px 26px;}
.project-body h3{font-size:1.02rem; margin-bottom:8px;}
.project-body p{color:var(--text-dim); font-size:0.88rem; margin-bottom:14px;}

.portfolio-cta{
  margin-top:44px; padding-top:28px; border-top:1px solid var(--border-light);
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px;
}
.portfolio-cta p{color:var(--text-dim);}

/* EDUCATION & CERTIFICATIONS (light) */
.formacion-grid{display:grid; grid-template-columns:0.85fr 1.4fr; gap:56px; align-items:start;}
.formacion-grid.skills-columns{grid-template-columns:repeat(3,1fr);}
.formacion-grid h3{font-family:var(--font-body); font-weight:700; font-size:0.8rem; text-transform:uppercase; letter-spacing:0.06em; color:var(--accent-deep); margin-bottom:18px;}

.edu-list{display:flex; flex-direction:column;}
.edu-item{
  padding:15px 0; border-bottom:1px solid var(--border-light);
  display:flex; flex-direction:column; gap:4px;
}
.edu-item:first-of-type{padding-top:0;}
.edu-name{font-weight:600; font-size:0.9rem;}
.edu-org{font-size:0.79rem; color:var(--text-dim);}

.cert-chips{display:flex; flex-wrap:wrap; gap:10px;}
.chip{
  background:var(--bg-card);
  border:1px solid var(--border-light); border-radius:999px;
  padding:9px 16px; font-size:0.8rem; font-weight:600;
  display:inline-flex; align-items:baseline; gap:6px;
  box-shadow:0 4px 12px -6px rgba(20,24,29,0.12);
  transition: transform .2s ease, border-color .2s ease, box-shadow .3s ease;
}
.chip:hover{border-color:var(--accent-deep); transform:translateY(-2px); box-shadow:0 8px 18px -8px rgba(20,24,29,0.2);}
.chip-org{font-weight:400; font-size:0.76rem; color:var(--text-dim);}

/* ABOUT */
.about-grid{display:grid; grid-template-columns:1fr 1.2fr; gap:48px; align-items:start;}
.about-text p{color:var(--text-dim); margin-bottom:16px; max-width:560px;}
.langs{display:flex; gap:10px; margin-top:20px;}
.lang{
  font-size:0.78rem; padding:6px 14px; border-radius:999px;
  background:var(--bg-card); border:1px solid var(--border-light); color:var(--text-dim);
}

/* CONTACT (dark cta panel) */
.cta-panel{padding:76px 56px; text-align:center;}
.cta-panel .eyebrow{justify-content:center;}
.contact-inner h2{margin:0 auto 14px; max-width:none; color:var(--text-on-dark);}
.contact-lead{color:var(--text-on-dark-dim); max-width:460px; margin:0 auto 40px;}
.contact-links{
  display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:28px;
}
.contact-link{
  background:var(--panel-dark-alt);
  border:1px solid var(--border-dark); border-radius:14px;
  padding:18px; display:flex; flex-direction:column; gap:6px; text-align:left;
  box-shadow:0 10px 24px -12px rgba(0,0,0,0.5);
  transition: transform .2s ease, border-color .2s ease, box-shadow .3s ease;
}
.contact-link:hover{border-color:var(--accent); transform:translateY(-3px); box-shadow:0 16px 32px -14px rgba(0,0,0,0.6);}
.contact-label{font-size:0.7rem; text-transform:uppercase; letter-spacing:0.08em; color:var(--accent);}
.contact-value{font-size:0.86rem; color:var(--text-on-dark); word-break:break-word;}
.location{color:var(--text-on-dark-dim); font-size:0.88rem;}

/* FOOTER */
.footer{padding:32px 0; border-top:1px solid var(--border-light);}
.footer-inner{display:flex; gap:10px; color:var(--text-dim); font-size:0.82rem; justify-content:center;}
.footer-dot{opacity:0.5;}

/* REVEAL ANIMATION */
.reveal{opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:translateY(0);}

/* RESPONSIVE */
@media (max-width:900px){
  .portfolio-grid{grid-template-columns:1fr;}
  .about-grid{grid-template-columns:1fr;}
  .contact-links{grid-template-columns:repeat(2,1fr);}
  .hero{padding:64px 28px 0;}
  .hero-with-photo{grid-template-columns:1fr; text-align:center;}
  .hero-photo-wrap{order:-1; margin-bottom:24px;}
  .hero-photo{max-width:220px; margin:0 auto;}
  .hero-actions{justify-content:center;}
  .hero-stat-row{grid-template-columns:1fr; margin-top:32px;}
  .hero-stat{border-right:none; border-bottom:1px solid var(--border-dark); justify-content:center;}
  .hero-stat:last-child{border-bottom:none;}
  .marquee{padding:16px 28px 32px;}
  .capabilities-head{padding:0 28px;}
  .carousel-track{grid-template-columns:repeat(2,1fr); padding:0 28px;}
  .formacion-grid{grid-template-columns:1fr; gap:40px;}
  .formacion-grid.skills-columns{grid-template-columns:1fr; gap:40px;}
  .cta-panel{padding:64px 28px;}
}

@media (max-width:680px){
  .nav-links{
    position:absolute; top:calc(100% + 10px); left:0; right:0;
    background:var(--bg-card); flex-direction:column; padding:20px 24px; gap:18px;
    border:1px solid var(--border-light); border-radius:20px;
    box-shadow:0 14px 34px -12px rgba(20,24,29,0.2);
    display:none;
  }
  .nav-links.open{display:flex;}
  .nav-toggle{display:flex;}
  .btn-small{display:none;}
  .contact-links{grid-template-columns:1fr;}
  .panel-wrap{padding:0 10px;}
  .panel-dark{border-radius:26px;}
  .carousel-track{grid-template-columns:1fr;}
}
