/* ===== Cristal ===== */
.glass {
  position: relative; isolation: isolate;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow); border-radius: var(--r-md);
}
.glass::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--shine); opacity: .55; pointer-events: none; }
.lift { transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--blue); }
:root[data-theme='dark'] .lift:hover { border-color: rgba(0, 255, 178, .45); }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 22px;
  border-radius: var(--r-pill); border: 1px solid transparent; font-weight: 600; font-size: .95rem; line-height: 1;
  text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s, background-color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 10px 26px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 14px 32px -10px var(--accent); }
.btn-glass { background: var(--glass); color: var(--text); border-color: var(--glass-edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.btn-wa { background: #128C4A; color: #fff; }
:root[data-theme='dark'] .btn-wa { background: rgba(37, 211, 102, .16); color: #7CF0AE; border-color: rgba(37, 211, 102, .4); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text); transition: background-color .25s, transform .3s var(--ease); }
.icon-btn:hover { background: var(--line); }
.icon-btn:active { transform: scale(.92); }
.theme-toggle .i-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded='true'] .i-close { display: block; }
.menu-toggle[aria-expanded='true'] .i-open { display: none; }

/* ===== Etiquetas / chips ===== */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill); font-family: var(--font-code); font-size: .76rem; color: var(--text); background: var(--line); border: 1px solid transparent; }
.tag--learning { background: transparent; border: 1px dashed var(--text-2); color: var(--text-2); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--glass-edge); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--text-2); font-size: .88rem; font-weight: 500; transition: all .3s var(--ease); }
.chip:hover { color: var(--text); transform: translateY(-1px); }
.chip[aria-pressed='true'] { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); }
.status--publicado::before { background: #10B981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .2); }
.status--prototipo::before { background: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .2); }
.status--desarrollo::before { background: var(--blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, .2); }
.status--concepto::before { background: var(--violet); box-shadow: 0 0 0 4px rgba(167, 139, 250, .25); }
.status--pendiente::before { background: transparent; border: 2px dashed var(--text-2); }

.availability { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: var(--r-pill); font-size: .88rem; font-weight: 600; }
.availability .dot { width: 10px; height: 10px; border-radius: 50%; background: #10B981; position: relative; }
.availability .dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #10B981; animation: pulse 2.2s ease-out infinite; }

/* ===== Hero ===== */
.hero-brand { font-size: clamp(3rem, 9vw, 6.2rem); font-weight: 800; letter-spacing: -0.05em; line-height: .95; }
.hero-brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-kicker { font-weight: 600; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.hero-hello { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; }
.hero-lead { max-width: 52ch; color: var(--text-2); font-size: 1.1rem; }
.hero-roles { font-family: var(--font-code); font-size: clamp(.95rem, 2vw, 1.15rem); min-height: 1.7em; color: var(--text); }
.hero-roles::after { content: ''; display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -0.18em; background: var(--accent); animation: blink 1s steps(2) infinite; }
.stat { padding: 18px 20px; display: grid; gap: 2px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.stat span { color: var(--text-2); font-size: .88rem; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 440px; }
.orb { position: relative; width: min(380px, 78vw); aspect-ratio: 1; border-radius: 50%; }
.orb::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: conic-gradient(from 0deg, var(--blue), var(--cyan), var(--mint), var(--violet), var(--purple), var(--blue)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: spin 18s linear infinite; opacity: .85; }
.orb-glass { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .15) 38%, rgba(59, 130, 246, .12) 70%); border: 1px solid var(--glass-edge); box-shadow: 0 30px 70px -20px rgba(37, 99, 235, .45), inset 0 0 50px rgba(255, 255, 255, .5), inset 0 -20px 50px rgba(124, 58, 237, .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
:root[data-theme='dark'] .orb-glass { background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .22), rgba(10, 25, 47, .5) 45%, rgba(0, 255, 178, .08) 80%); box-shadow: 0 30px 80px -24px rgba(0, 255, 178, .35), inset 0 0 60px rgba(255, 255, 255, .06); }
.orb-glass::after { content: ''; position: absolute; top: 5%; left: 14%; width: 46%; height: 26%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, .8), transparent); filter: blur(4px); opacity: .7; pointer-events: none; }
.orb-glass img, .orb-glass svg { width: 100%; height: 100%; object-fit: cover; }
.fcard { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: var(--r-md); animation: float 7s ease-in-out infinite; max-width: 230px; }
.fcard .ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; flex: none; }
:root[data-theme='dark'] .fcard .ico { color: #04121f; }
.fcard b { display: block; font-size: .88rem; line-height: 1.2; }
.fcard small { display: block; color: var(--text-2); font-size: .76rem; line-height: 1.25; }
.fcard:nth-of-type(1) { top: 4%; left: -4%; animation-delay: 0s; }
.fcard:nth-of-type(2) { top: 20%; right: -6%; animation-delay: -2s; animation-duration: 8s; }
.fcard:nth-of-type(3) { bottom: 18%; left: -8%; animation-delay: -4s; animation-duration: 9s; }
.fcard:nth-of-type(4) { bottom: 2%; right: -2%; animation-delay: -1s; animation-duration: 7.5s; }

/* ===== Sobre mí ===== */
.profile-card { padding: 28px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.profile-card .avatar { width: 170px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 4px solid var(--glass-edge); box-shadow: 0 16px 40px -14px rgba(37, 99, 235, .4); }
.profile-card .avatar img, .profile-card .avatar svg { width: 100%; height: 100%; object-fit: cover; }
.meta-line { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .92rem; }
.about-body { display: grid; gap: 18px; }
.about-block { padding: 26px; display: grid; gap: 14px; }
.about-block h3 { display: flex; align-items: center; gap: 10px; }
.about-block h3 .icon { color: var(--accent); }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check-list { display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.check-list .icon { color: var(--accent); margin-top: 4px; width: 1em; height: 1em; }
.mini-entry { padding: 14px 16px; border-radius: var(--r-sm); border: 1px dashed var(--text-2); color: var(--text-2); font-size: .9rem; }
.mini-entry b { color: var(--text); display: block; }
.mini-entry.is-real { border-style: solid; border-color: var(--line); }

/* ===== Habilidades ===== */
.skill-card { padding: 26px; display: grid; gap: 14px; align-content: start; }
.card-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; color: #fff; background: var(--grad); box-shadow: 0 10px 24px -10px var(--blue); }
:root[data-theme='dark'] .card-ico { color: #04121f; }
.skill-card:hover .card-ico { animation: wiggle .7s var(--ease); }
.skill-card p, .service-card p, .resource-card p { color: var(--text-2); font-size: .94rem; }
.level { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--text-2); }
.level i { width: 18px; height: 6px; border-radius: 3px; background: var(--line); }
.level i.on { background: var(--accent); }
.legend { margin-top: 20px; color: var(--text-2); font-size: .86rem; }

/* ===== Proyectos ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 11px 16px; border-radius: var(--r-sm); border: 1px solid var(--glass-edge); background: var(--glass-strong); color: var(--text); transition: border-color .25s, box-shadow .25s; }
.search .input { padding-left: 42px; border-radius: var(--r-pill); }
.input::placeholder, .textarea::placeholder { color: var(--text-2); opacity: .8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59, 130, 246, .22); }
:root[data-theme='dark'] .input:focus, :root[data-theme='dark'] .select:focus, :root[data-theme='dark'] .textarea:focus { box-shadow: 0 0 0 4px rgba(0, 255, 178, .18); }
.sort { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .9rem; }
.sort .select { width: auto; min-height: 42px; border-radius: var(--r-pill); }
.result-count { color: var(--text-2); font-size: .88rem; margin-bottom: 16px; }

.project-card { overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(167, 139, 250, .22)); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project-card:hover .thumb img { transform: scale(1.05); }
.thumb-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--text-2); font-size: .82rem; background-image: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, .28), transparent 55%), radial-gradient(circle at 85% 80%, rgba(124, 58, 237, .26), transparent 55%); }
.thumb-ph .icon { width: 34px; height: 34px; color: var(--accent); }
.project-body { padding: 22px; display: grid; gap: 12px; flex: 1; align-content: start; }
.project-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-card p { color: var(--text-2); font-size: .94rem; }
.project-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.empty { padding: 40px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; color: var(--text-2); }
.empty .icon { width: 32px; height: 32px; color: var(--accent); }

/* Modal */
dialog.modal { width: min(760px, calc(100% - 28px)); max-height: calc(100svh - 40px); padding: 0; border: 1px solid var(--glass-edge); border-radius: var(--r-lg); background: var(--glass-strong); color: var(--text); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 40px 100px -20px rgba(10, 25, 47, .5); overflow: auto; }
dialog.modal[open] { animation: pop .45s var(--ease); }
dialog.modal::backdrop { background: rgba(5, 12, 24, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 2; background: var(--glass-strong); border: 1px solid var(--line); }
.detail { padding: 0 0 28px; }
.detail-body { padding: 24px 28px 0; display: grid; gap: 22px; }
.detail h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.detail h3 { font-size: .95rem; color: var(--text-2); margin-bottom: 8px; }
.detail .lead { color: var(--text-2); font-size: 1.05rem; }
.pending { color: var(--text-2); font-style: italic; font-size: .92rem; }

/* ===== Recursos y servicios ===== */
.resource-card, .service-card { padding: 24px; display: grid; gap: 12px; align-content: start; }
.resource-card .top { display: flex; justify-content: space-between; align-items: center; }
.cat-label { font-size: .78rem; color: var(--text-2); font-weight: 600; }
.resource-card .btn { margin-top: 6px; justify-self: start; }
.service-card h4 { font-size: .85rem; color: var(--text-2); margin-top: 4px; }
.service-card .check-list { gap: 5px; font-size: .92rem; }
.service-card .btn { margin-top: 6px; justify-self: start; }
.audience { font-size: .9rem; }
.price-note { font-size: .82rem; color: var(--text-2); font-family: var(--font-code); }

/* ===== Línea de tiempo ===== */
.timeline { position: relative; display: grid; gap: 26px; }
.timeline::before { content: ''; position: absolute; top: 8px; bottom: 8px; left: 215px; width: 2px; background: linear-gradient(var(--blue), var(--cyan), var(--violet)); border-radius: 2px; opacity: .5; }
.t-item { display: grid; grid-template-columns: 190px 50px 1fr; align-items: start; }
.t-date { text-align: right; padding-top: 22px; color: var(--text-2); font-family: var(--font-code); font-size: .8rem; line-height: 1.4; }
.t-mark { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; margin: 12px 0 0 6px; border-radius: 50%; background: var(--surface); color: var(--accent); border: 2px solid var(--blue); box-shadow: 0 0 0 6px rgba(59, 130, 246, .14); }
.t-card { padding: 24px; display: grid; gap: 12px; }
.t-card.is-placeholder { border-style: dashed; border-color: var(--text-2); }
.t-card h3 span { display: block; font-size: .92rem; font-weight: 500; color: var(--text-2); margin-top: 4px; }
.t-card ul.check-list { font-size: .92rem; }
.t-card h4 { font-size: .8rem; color: var(--text-2); }
.t-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.cta-band { margin-top: 36px; padding: 28px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }

/* ===== Contacto ===== */
.channels { display: grid; gap: 12px; }
.channel { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); }
.channel .card-ico { width: 44px; height: 44px; border-radius: 14px; }
.channel small { color: var(--text-2); display: block; line-height: 1.3; }
.channel b { overflow-wrap: anywhere; }
.form { padding: clamp(22px, 4vw, 34px); display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 600; }
.textarea { min-height: 140px; resize: vertical; }
.field-error { color: var(--err); font-size: .82rem; min-height: 1.1em; }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--err); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--text-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-size: inherit; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-status { padding: 14px 16px; border-radius: var(--r-sm); font-size: .92rem; border: 1px solid var(--line); background: var(--glass-strong); }
.form-status[hidden] { display: none; }
.form-status.ok { border-color: var(--ok); color: var(--ok); }
.form-status.err { border-color: var(--err); color: var(--err); }
.form-note { font-size: .82rem; color: var(--text-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.prose { padding: 4px 28px 28px; display: grid; gap: 12px; color: var(--text-2); }
.prose h2 { color: var(--text); margin-top: 22px; font-size: 1.5rem; }

/* Página interior */
.page-head { padding-top: 140px !important; padding-bottom: 20px !important; }
.back-link { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 22px; font-weight: 600; font-size: .92rem; }
