:root {
  --bg: #0A0A0B;
  --surface: #141416;
  --surface-2: #1F1F23;
  --border: #26262A;
  --border-strong: #3F3F46;
  --text: #F4F4F5;
  --text-2: #D4D4D8;
  --muted: #A1A1AA;
  --dim: #71717A;
  --accent: #A78BFA;
  --accent-hover: #C4B5FD;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Space Grotesk", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); }
a:hover { color: #FFFFFF; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; }
h1 { font-size: clamp(40px, 6.2vw, 64px); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; font-weight: 700; }
h2.big { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.03em; }
h3 { font-size: 22px; font-weight: 600; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 40px; }
.label { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.muted { color: var(--muted); font-size: 15px; line-height: 1.6; }
.muted-strong { color: var(--dim); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--surface-2); position: sticky; top: 0; background: rgba(10, 10, 11, 0.85); backdrop-filter: blur(10px); z-index: 10; }
.header-inner { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 500; font-size: 16px; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 0; transition: background 0.15s, border-color 0.15s; }
.btn-sm { min-height: 44px; padding: 0 18px; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }
.btn-outline { border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--text); }
.btn-light { background: var(--text); color: var(--bg); min-height: 48px; padding: 0 22px; }
.btn-light:hover { background: #FFFFFF; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding-top: 88px; padding-bottom: 80px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.status { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.status .dot { width: 8px; height: 8px; }
.lead { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 560px; }

.terminal { flex: 1 1 340px; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.terminal-bar { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.terminal pre { margin: 0; padding: 22px 22px 26px; font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; }
.terminal .p { color: var(--accent); }
.cursor { display: inline-block; width: 9px; height: 17px; background: var(--accent); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } html { scroll-behavior: auto; } }

/* Servicios */
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.section-head > p:last-child:not(.label) { font-size: 17px; line-height: 1.6; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 16px; min-height: 280px; transition: border-color 0.15s; }
.card:hover { border-color: var(--border-strong); }
.card h3 { font-size: 24px; }
.card p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.card .price { margin-top: auto; font-family: var(--mono); font-size: 14px; color: var(--text); }
.icon, .icon-sm, .media-icon svg { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 32px; height: 32px; }
.icon-sm { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; }

.steps { list-style: none; margin: 0; padding: 32px 0 0; border-top: 1px solid var(--surface-2); display: flex; flex-wrap: wrap; gap: 16px; }
.steps li { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.steps span { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.steps p { font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* Proyectos */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.project { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.project-body { padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.project-body > p:not(.chips) { font-size: 15px; line-height: 1.6; color: var(--muted); }
.media { aspect-ratio: 16 / 9; border-radius: 12px; background: var(--bg); overflow: hidden; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.media img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform 0.3s; }
.media-shot:hover img { transform: scale(1.02); }
.media-fallback { font-family: var(--mono); font-size: 14px; color: var(--dim); }
.media-icon svg { width: 88px; height: 88px; stroke-width: 1.1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.more { align-self: flex-start; margin-top: 4px; font-family: var(--mono); font-size: 14px; color: var(--accent); text-decoration: none; }
.more:hover { color: var(--accent-hover); }

/* Sobre mí */
.about { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 48px; }
.about-main { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.about h2 { font-size: clamp(30px, 4vw, 40px); }
.body { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.facts { flex: 1 1 280px; margin: 0; display: flex; flex-direction: column; gap: 20px; font-size: 15px; }
.facts div { display: flex; flex-direction: column; gap: 4px; }
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.facts dd { margin: 0; }

/* Contacto */
.contact { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 48px; padding-bottom: 96px; }
.contact-main { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.form { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.form label { font-size: 14px; font-weight: 500; color: var(--text-2); margin-top: 8px; }
.form label:first-child { margin-top: 0; }
.form input, .form textarea { font: inherit; color: var(--text); background: var(--bg); padding: 10px 14px; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form .btn { align-self: flex-start; margin-top: 12px; }
.hint { font-size: 13px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--surface-2); }
.footer-inner { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 560px) {
  .site-header { position: static; }
  .nav { gap: 18px; }
  .hero { padding-top: 56px; }
  .card { min-height: 0; }
}
