/* Georgi · web pública (portfolio). Papel y tinta con acento lima, en tarjetas "bento".
   Sigue el tema claro u oscuro del sistema del visitante. Sin scripts ni servicios externos. */
:root {
  --paper: #f3f2ed; --card: #ffffff; --soft: #ebe9e2; --line: #e1dfd7; --ink: #111112; --muted: #6a696e;
  --brand: #7c4fd0; --brand-ink: #ffffff; --brand-soft: #b48cf0; --brand-text: #6a3fb3; --brand-grad: linear-gradient(160deg, #40216d 0%, #6a3fb3 50%, #a476e4 100%); --invert: #111112; --on-invert: #f6f5f0;
  --shadow: 0 1px 0 rgb(17 17 18 / .04), 0 18px 40px -22px rgb(17 17 18 / .3);
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); color-scheme: light; -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0d0d0e; --card: #17171a; --soft: #1f1f23; --line: #29292e; --ink: #f1f0ea; --muted: #9c9ba0; --brand-text: #c4a3ff; --invert: #f1f0ea; --on-invert: #111112;
    --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 20px 50px -24px rgb(0 0 0 / .9); color-scheme: dark; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .p-num, .p-monogram, .p-cover { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", sans-serif; letter-spacing: -.04em; overflow-wrap: anywhere; }
svg.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
::selection { background: #a476e4; color: #fff; }
.p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.p-skip { position: fixed; left: 16px; top: -80px; z-index: 99; padding: 12px 18px; border-radius: 999px; background: var(--invert); color: var(--on-invert); }
.p-skip:focus { top: 12px; }

/* Cabecera */
.p-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 18px 24px; background: color-mix(in srgb, var(--paper) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.p-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 780; letter-spacing: -.03em; min-width: 0; }
.p-mark { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-grad); color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -2px; padding: 0 2px 3px 0; flex: none; }
.p-mark::after { content: ""; position: absolute; right: 7px; bottom: 9px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.p-top nav { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 640; }
.p-top nav a { padding: 9px 14px; border-radius: 999px; color: var(--muted); transition: color .15s, background .15s; }
.p-top nav a:hover { color: var(--ink); background: var(--soft); }
.p-top nav a.p-cta { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; background: var(--invert); color: var(--on-invert); }
.p-top nav a.p-cta:hover { background: var(--brand-grad); color: #fff; }
.p-preview { padding: 10px; text-align: center; font-size: 14px; font-weight: 650; background: var(--brand-grad); color: #fff; }
main { max-width: 1180px; margin: 0 auto; padding: 8px 24px 40px; }

/* Bento de portada */
.p-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 16px; margin: 10px 0 80px; }
.p-tile { position: relative; padding: 28px; border-radius: 30px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; min-width: 0; animation: rise .55s var(--ease) both; }
.p-tile:nth-child(2) { animation-delay: .06s; } .p-tile:nth-child(3) { animation-delay: .12s; } .p-tile:nth-child(4) { animation-delay: .18s; }
.p-intro { grid-column: span 8; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 44px; background: var(--invert); color: var(--on-invert); border-color: var(--invert); min-height: 460px; }
.p-intro::before { content: ""; position: absolute; right: -120px; top: -140px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #a476e4, transparent 62%); opacity: .7; }
.p-intro::after { content: ""; position: absolute; left: 30%; top: -60px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, #6a3fb3, transparent 65%); opacity: .45; }
.p-intro > * { position: relative; z-index: 1; }
.p-eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.p-eyebrow i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-soft) 30%, transparent); }
.p-intro .p-eyebrow { color: color-mix(in srgb, var(--on-invert) 70%, transparent); }
.p-intro h1 { font-size: clamp(64px, 10vw, 132px); font-weight: 800; line-height: .92; letter-spacing: -.065em; padding-bottom: .06em; }
.p-intro h1 span { color: var(--brand-soft); }
.p-title span { color: var(--brand-text); }
.p-headline { margin-top: 14px; font-size: clamp(19px, 2.2vw, 25px); font-weight: 600; letter-spacing: -.02em; max-width: 620px; line-height: 1.35; }
.p-lead { margin-top: 12px; max-width: 560px; color: color-mix(in srgb, currentColor 65%, transparent); font-size: 16.5px; }
.p-intro .p-lead { color: color-mix(in srgb, var(--on-invert) 65%, transparent); }
.p-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.p-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; background: var(--invert); color: var(--on-invert); border: 1.5px solid transparent; transition: transform .2s var(--ease), background .15s, color .15s; overflow-wrap: anywhere; }
.p-btn:hover { transform: translateY(-2px); }
.p-intro .p-btn { background: var(--brand-grad); color: #fff; }
.p-btn-line { background: transparent !important; color: inherit !important; border-color: color-mix(in srgb, currentColor 30%, transparent); }
.p-btn-line:hover { border-color: currentColor; }
.p-btn-brand { background: var(--brand-grad) !important; color: #fff !important; }
.p-photo { grid-column: span 4; grid-row: span 2; padding: 0; background: var(--brand-grad); border-color: transparent; }
.p-photo img { display: block; width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.p-monogram { display: grid; place-items: center; width: 100%; height: 100%; min-height: 300px; font-size: clamp(140px, 18vw, 230px); font-weight: 850; color: #fff; letter-spacing: -.08em; }
.p-stat { grid-column: span 4; display: flex; flex-direction: column; justify-content: flex-end; }
.p-num { font-size: 72px; font-weight: 850; line-height: .9; }
.p-stat > span:last-child { margin-top: 8px; color: var(--muted); font-weight: 650; }
.p-topics { grid-column: span 8; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.p-label { display: block; font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.p-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p-chips span { padding: 9px 16px; border-radius: 999px; background: var(--soft); font-weight: 650; font-size: 15px; }
.p-chips span:nth-child(3n+1) { background: var(--brand-grad); color: #fff; }

/* Secciones */
.p-section { margin: 0 0 80px; scroll-margin-top: 100px; }
.p-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.p-section h2 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; line-height: 1; margin-top: 6px; }
.p-link { font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); }
.p-link:hover { border-color: var(--ink); }
.p-about { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; padding-top: 30px; border-top: 1.5px solid var(--ink); }
.p-empty { padding: 34px; border-radius: 24px; border: 2px dashed var(--line); color: var(--muted); text-align: center; grid-column: 1 / -1; }

/* Proyectos */
.p-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.p-project { position: relative; display: flex; flex-direction: column; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; transition: transform .3s var(--ease); }
.p-project:hover { transform: translateY(-4px) rotate(-.4deg); }
.p-project > img, .p-cover { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.p-cover { display: grid; place-items: center; font-size: 110px; font-weight: 850; letter-spacing: -.07em; background: var(--brand-grad); color: #fff; }
.p-project:nth-child(3n+2) .p-cover { background: linear-gradient(160deg, #2a1550, #40216d); color: #e9dcff; }
.p-project:nth-child(3n) .p-cover { background: linear-gradient(160deg, #a476e4, #d4bcff); color: #2a1550; }
.p-project-body { display: grid; gap: 6px; padding: 20px 22px 24px; }
.p-project-body small { justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.p-project-body strong { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-size: 23px; letter-spacing: -.03em; line-height: 1.15; }
.p-project-body > span { color: var(--muted); font-size: 15px; }
.p-arrow { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--card); color: var(--ink); font-weight: 800; transition: transform .25s var(--ease), background .2s; }
.p-project:hover .p-arrow { transform: rotate(45deg); background: var(--invert); color: var(--on-invert); }

/* Blog y contacto */
.p-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.p-posts { padding: 30px; }
.p-list { display: grid; }
.p-list > a { display: flex; align-items: baseline; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); transition: padding .2s var(--ease); }
.p-list > a:first-child { border-top: 0; }
.p-list > a:hover { padding-left: 8px; }
.p-list time { flex: none; min-width: 64px; font-size: 13px; font-weight: 750; color: var(--muted); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.p-list strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.p-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 14.5px; }
.p-list i { margin-left: auto; font-style: normal; color: var(--muted); }
.p-contact { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 34px; background: var(--invert); color: var(--on-invert); border-color: var(--invert); min-height: 320px; }
.p-contact .p-label { color: color-mix(in srgb, var(--on-invert) 60%, transparent); }
.p-contact h2 { font-size: clamp(40px, 5vw, 64px); }
.p-contact p { color: color-mix(in srgb, var(--on-invert) 65%, transparent); margin-bottom: 12px; }
.p-contact .p-btn { align-self: flex-start; max-width: 100%; }

/* Páginas de blog y artículo */
.p-page { padding: 40px 0 20px; min-height: 60vh; }
.p-title { font-size: clamp(46px, 8vw, 104px); font-weight: 820; line-height: .95; letter-spacing: -.06em; }
.p-search { display: flex; gap: 8px; max-width: 520px; margin: 30px 0 30px; padding: 6px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); }
.p-search:focus-within { border-color: var(--ink); }
.p-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 14px; font: inherit; color: var(--ink); }
.p-search button { border: 0; border-radius: 999px; padding: 11px 22px; background: var(--invert); color: var(--on-invert); font: inherit; font-weight: 700; cursor: pointer; }
.p-list-big > a { padding: 22px 0; }
.p-list-big strong { font-size: 24px; }
.p-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); }
.p-pager a { padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); font-weight: 650; }
.p-article { max-width: 780px; margin: 30px auto 60px; }
.p-back { display: inline-flex; margin-bottom: 30px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 650; color: var(--muted); }
.p-back:hover { color: var(--ink); border-color: var(--ink); }
.p-article h1 { font-size: clamp(38px, 6vw, 72px); font-weight: 820; line-height: 1; letter-spacing: -.055em; }
.p-article .p-lead { font-size: 21px; margin: 20px 0 0; color: var(--muted); }
.p-cover-img { display: block; width: 100%; max-height: 480px; object-fit: cover; border-radius: 28px; margin: 34px 0; }
.p-prose { font-size: 17.5px; line-height: 1.85; overflow-wrap: anywhere; margin-top: 30px; }
.p-about .p-prose { margin-top: 0; }
.p-prose p, .p-prose ul, .p-prose ol { margin: 0 0 22px; }
.p-prose h2 { font-size: 32px; margin: 44px 0 14px; }
.p-prose h3 { font-size: 24px; margin: 34px 0 12px; }
.p-prose a { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--brand-soft); text-underline-offset: 3px; font-weight: 650; }
.p-prose code { font-family: "Cascadia Code", ui-monospace, Consolas, monospace; background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.p-prose pre { background: #111112; color: #f1f0ea; padding: 22px; border-radius: 20px; overflow-x: auto; font-size: 14px; }
.p-prose pre code { background: none; padding: 0; color: inherit; }
.p-prose blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--brand-soft); color: var(--muted); }
.p-prose table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; }
.p-prose th, .p-prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.p-prose hr { border: 0; height: 1.5px; background: var(--line); margin: 40px 0; }
.p-details { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 40px; padding-top: 26px; border-top: 1.5px solid var(--line); }
.p-details p { width: 100%; color: var(--muted); }

/* Pie */
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; padding: 30px 24px 44px; border-top: 1.5px solid var(--line); color: var(--muted); font-size: 14px; }
.p-foot nav { display: flex; gap: 6px; flex-wrap: wrap; }
.p-foot nav a { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 650; color: var(--ink); }
.p-foot nav a:hover { border-color: var(--ink); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .p-intro { grid-column: span 12; min-height: 380px; padding: 32px; }
  .p-photo { grid-column: span 6; grid-row: span 1; }
  .p-stat { grid-column: span 6; }
  .p-topics { grid-column: span 12; }
  .p-about, .p-split { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 600px) {
  .p-top { padding: 12px 16px; }
  .p-top nav a:not(.p-cta) { padding: 8px 10px; font-size: 14px; }
  .p-top nav a:first-child { display: none; }
  .p-logo { font-size: 16px; }
  main { padding: 6px 14px 30px; }
  .p-bento { gap: 12px; margin-bottom: 56px; }
  .p-tile { border-radius: 24px; padding: 22px; }
  .p-intro { padding: 26px; min-height: 360px; }
  .p-intro h1 { font-size: 66px; }
  .p-photo, .p-stat { grid-column: span 6; }
  .p-photo img, .p-monogram { min-height: 170px; }
  .p-monogram { font-size: 110px; }
  .p-num { font-size: 52px; }
  .p-section { margin-bottom: 56px; }
  .p-posts, .p-contact { padding: 24px; }
  .p-list > a { flex-wrap: wrap; gap: 4px 14px; }
  .p-list time { flex-basis: 100%; }
  .p-list i { display: none; }
  .p-prose { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Tarjetas destacadas siempre oscuras (también en modo oscuro, algo más claras que el fondo). */
.p-intro, .p-contact { --night: #141416; --on-invert: #f4f3ee; background: var(--night); color: #f4f3ee; border-color: var(--night); }
@media (prefers-color-scheme: dark) { .p-intro, .p-contact { --night: #202024; } }
.p-split-solo { grid-template-columns: minmax(0, 1fr); }
