:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --ink: #19231f;
  --body: #4f5c55;
  --muted: #69736d;
  --line: #d8dcd4;
  --green: #386b50;
  --green-dark: #244a36;
  --soft: #e8ece5;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171b18;
  --ink: #edf0eb;
  --body: #c3cbc4;
  --muted: #98a29a;
  --line: #343b35;
  --green: #90c7a2;
  --green-dark: #b0d9bc;
  --soft: #252d27;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
nav { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.nav-content { width: min(1100px, calc(100% - 64px)); min-height: 68px; margin: auto; display: flex; align-items: center; gap: 24px; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid var(--ink); border-radius: 50%; color: var(--ink); font-size: .78rem; font-weight: 700; letter-spacing: -.08em; }
nav ul { display: flex; gap: clamp(18px,3vw,38px); list-style: none; margin: 0 0 0 auto; padding: 0; }
nav a { color: var(--muted); font-size: .8rem; text-decoration: none; transition: color .2s; }
nav a:hover { color: var(--green); }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: background .2s,border-color .2s; }
.theme-toggle:hover { background: var(--soft); border-color: var(--muted); }
.theme-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }
header { min-height: 0; padding: clamp(82px,10vw,132px) 32px 76px; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-content { width: min(1100px,100%); margin: auto; text-align: left; }
.header-badge { display: inline-flex; align-items: center; gap: 11px; margin: 0 0 23px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--green); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.header-badge::before { content: ""; width: 24px; height: 1px; background: currentColor; }
h1 { max-width: 940px; margin: 0 0 25px; font-size: clamp(3.5rem,8vw,7rem); font-weight: 600; line-height: 1.03; letter-spacing: -.075em; }
h1 span { color: var(--green); }
.header-subtitle { max-width: 720px; margin: 0 0 30px; color: var(--body); font-size: clamp(1rem,1.45vw,1.16rem); line-height: 1.8; }
.skills { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 7px; max-width: 850px; margin: 0 0 29px; }
.skill { padding: 4px 9px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--body); font-size: .7rem; transition: border-color .2s,color .2s; }
.skill:hover { border-color: var(--green); color: var(--green); }
.header-links { display: flex; justify-content: flex-start; gap: 9px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; min-height: 41px; padding: 0 16px; border: 1px solid var(--line); border-radius: 3px; font-size: .8rem; font-weight: 600; text-decoration: none; transition: background .2s,color .2s,border-color .2s; }
.btn-outline { color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn-primary { border-color: var(--green); background: var(--green); color: var(--paper); }
.btn-primary:hover { border-color: var(--green-dark); background: var(--green-dark); }
main { width: min(1100px,calc(100% - 64px)); margin: auto; padding: 0; }
section { padding: 58px 0 64px; border-bottom: 1px solid var(--line); }
section h2 { margin: 0; text-align: left; font-size: clamp(2rem,3.8vw,2.8rem); font-weight: 650; line-height: 1.15; letter-spacing: -.055em; }
.section-subtitle { margin: 7px 0 29px; color: var(--muted); text-align: left; font-size: .9rem; }
.experience-card { margin: 0; padding: 22px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.exp-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 12px; }
.exp-header h3,.project-header h3 { margin: 0; color: var(--ink); font-size: 1.06rem; font-weight: 650; line-height: 1.45; letter-spacing: -.02em; }
.exp-company { display: block; margin-top: 4px; color: var(--green); font-size: .84rem; font-weight: 600; }
.exp-date { padding-top: 3px; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.exp-roles { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
.exp-roles li { color: var(--muted); font-size: .72rem; }
.exp-roles li:first-child { color: var(--green); }
.exp-roles li:not(:last-child)::after { content: "←"; padding-left: 10px; color: var(--line); }
.exp-roles strong { font-weight: 600; }
.exp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 18px 0 0; padding: 0; list-style: none; }
.exp-list li { position: relative; margin: 0; padding: 10px 0 10px 16px; border-top: 1px solid var(--line); color: var(--body); font-size: .83rem; line-height: 1.65; }
.exp-list li::before { content: ""; position: absolute; top: 18px; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.projects-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 38px; }
.project-card { display: flex; flex-direction: column; min-height: 275px; padding: 22px 0 20px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; transition: border-color .2s; }
.project-card:hover { border-color: var(--green); transform: none; box-shadow: none; }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 9px; }
.project-header h3 { font-size: 1rem; }
.project-badge { flex: 0 0 auto; padding: 2px 7px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--green); font-size: .63rem; font-weight: 500; white-space: normal; text-align: right; }
.project-desc { margin: 0 0 17px; color: var(--body); font-size: .85rem; line-height: 1.72; }
.project-stack { display: flex; flex-wrap: wrap; gap: 5px 13px; margin: auto 0 15px; }
.project-stack span { padding: 0; background: transparent; color: var(--muted); font-size: .66rem; }
.project-stack span:not(:last-child)::after { content: "/"; padding-left: 13px; color: var(--line); }
.project-links { gap: 18px; padding-top: 11px; border-top: 1px solid var(--line); }
.project-links a { color: var(--green); font-size: .78rem; font-weight: 600; text-decoration: none; }
.project-links a:hover { color: var(--green-dark); }
.no-link { color: var(--muted); font-size: .7rem; }
#contacto { text-align: left; border-bottom: 0; }
.contact-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 0 24px; margin-top: 27px; }
.contact-card { display: grid; grid-template-columns: 38px 1fr; align-items: center; min-width: 0; padding: 16px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-decoration: none; transition: border-color .2s; }
.contact-card:hover { border-color: var(--green); transform: none; }
.contact-icon { grid-row: span 2; display: grid; place-items: center; width: 29px; height: 29px; margin: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--green); font-size: .67rem; font-weight: 600; }
.contact-label { margin: 0; color: var(--muted); font-size: .67rem; }
.contact-card span:last-child { color: var(--ink); font-size: .8rem; overflow-wrap: anywhere; }
footer { padding: 19px 32px; border-top: 1px solid var(--line); color: var(--muted); text-align: left; font-size: .7rem; }
footer p { width: min(1100px,100%); margin: auto; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
@media (max-width:720px) {
  .nav-content,main { width: calc(100% - 40px); }
  .nav-content { min-height: 62px; gap: 12px; }
  nav ul { gap: 13px; }
  nav a { font-size: .7rem; }
  header { padding: 66px 20px 52px; }
  h1 { font-size: clamp(3.2rem,13vw,5.3rem); }
  .header-subtitle { font-size: 1rem; }
  section { padding: 46px 0 50px; }
  .exp-list { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 0; }
  .contact-links { grid-template-columns: 1fr; }
}
@media (max-width:430px) {
  .nav-content,main { width: calc(100% - 32px); }
  .nav-content { gap: 8px; }
  .logo { width: 31px; height: 31px; }
  nav ul { gap: 9px; }
  nav a { font-size: .64rem; }
  .theme-toggle { width: 32px; height: 32px; }
  header { padding-right: 16px; padding-left: 16px; }
  .exp-header { flex-direction: column; gap: 5px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; } }
