/* alexuribarri.com — emanation of the One
   Elegant Neoplatonic light theme · system serifs only (Lighthouse-friendly) */

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:var(--font-body);
  font-size:var(--size-body);
  color:var(--text-primary);
  background:
    radial-gradient(ellipse 100% 70% at 50% -12%, rgba(201,168,79,0.11), transparent 52%),
    radial-gradient(ellipse 55% 40% at 0% 80%, rgba(247,242,232,0.9), transparent 50%),
    radial-gradient(ellipse 50% 35% at 100% 60%, rgba(226,196,109,0.06), transparent 48%),
    var(--bg-primary);
  line-height:1.72;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  -webkit-font-smoothing:antialiased;
}
::selection{
  background:rgba(201,168,79,0.28);
  color:var(--text-primary);
}

/* Accessibility */
.skip{
  position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;
}
.skip:focus{
  position:fixed;left:1rem;top:1rem;width:auto;height:auto;z-index:100;
  padding:0.65rem 1.1rem;background:var(--bg-surface);color:var(--text-primary);
  border:2px solid var(--focus-ring);border-radius:6px;outline:none;
  box-shadow:0 4px 20px rgba(18,17,26,0.12);
}
.wrap{max-width:42rem;margin:0 auto;padding:0 1.35rem;width:100%}
.wrap-wide{max-width:48rem;margin:0 auto;padding:0 1.35rem;width:100%}

/* ── Header: matter framing the light ──
   Soft under-glow + barely-visible curvature — a great star below the rim,
   never a literal sun disc. Pure CSS, no extra DOM. */
.site-header{
  color:var(--header-text);
  position:sticky;top:0;z-index:40;
  overflow:hidden;
  isolation:isolate;
  background:
    /* warm limb glow from far below */
    radial-gradient(ellipse 90% 120% at 50% 145%,
      rgba(255,253,246,0.10) 0%,
      rgba(226,196,109,0.11) 18%,
      rgba(201,168,79,0.07) 36%,
      transparent 62%),
    /* secondary soft wash */
    radial-gradient(ellipse 140% 70% at 50% 115%,
      rgba(201,168,79,0.06) 0%,
      transparent 55%),
    var(--header-bg);
}
/* Barely-visible curvature of a vast body under the bar */
.site-header::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-3.2rem;
  width:min(52rem,160vw);
  height:4.5rem;
  transform:translateX(-50%);
  border-radius:50%;
  pointer-events:none;
  z-index:0;
  /* thin gold limb + soft atmospheric haze above the arc */
  box-shadow:
    0 -1px 0 0 rgba(201,168,79,0.14),
    0 -8px 28px -4px rgba(226,196,109,0.12),
    0 -2px 12px -2px rgba(255,253,246,0.06);
  border-top:1px solid rgba(201,168,79,0.10);
  background:radial-gradient(ellipse 100% 80% at 50% 0%,
    rgba(201,168,79,0.05) 0%,
    transparent 70%);
}
.header-inner{
  position:relative;z-index:1;
  max-width:48rem;margin:0 auto;padding:0.9rem 1.35rem;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0.75rem 1.75rem;
}
.logo{
  font-family:var(--font-heading);
  font-weight:600;font-size:1.12rem;letter-spacing:0.06em;
  color:var(--one-light);text-decoration:none;
  display:inline-flex;align-items:center;
  border-bottom:1px solid transparent;
  min-height:44px;
}
.logo:hover,.logo:focus-visible{
  color:var(--cognition-amber);
  border-bottom-color:rgba(201,168,79,0.5);
  outline:none;
}
.nav ul{list-style:none;display:flex;flex-wrap:wrap;gap:0.1rem 0.2rem;margin:0;padding:0}
.nav a{
  color:var(--soul-ivory);text-decoration:none;font-size:var(--size-nav);
  padding:0.45rem 0.75rem;min-height:44px;display:inline-flex;align-items:center;
  border-radius:5px;letter-spacing:0.03em;opacity:0.9;
  transition:background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.nav a:hover{
  color:var(--one-light);background:rgba(201,168,79,0.12);opacity:1;
}
.nav a:focus-visible{
  color:var(--one-light);outline:none;
  box-shadow:0 0 0 2px var(--focus-ring);
  opacity:1;
}

/* ── Main ── */
main.wrap,main.wrap-wide{
  padding-top:2.5rem;padding-bottom:4.5rem;
  flex:1;min-height:50vh;
}

/* ── Hero (plain: 404 etc.) ── */
.hero-plain{
  text-align:center;
  padding:2.75rem 0.5rem 2.35rem;
  margin-bottom:1.5rem;
}
.hero-plain h1{
  margin:0 0 0.85rem;font-weight:600;letter-spacing:-0.02em;
  color:var(--heading);font-size:var(--size-h1);
}
.hero-plain .lede{
  margin:0 auto 1.25rem;max-width:26rem;
  color:var(--text-secondary);font-size:1.08rem;
  font-style:italic;line-height:1.65;
}

/* ── Home hero: boat + motto (front page only) ── */
.wrap-home{max-width:48rem}
.hero-home{
  margin:0 0 2.5rem;
  padding:0;
  border:0;
}
.hero-visual{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(201,168,79,0.22);
  box-shadow:
    0 1px 0 rgba(255,253,246,0.5) inset,
    0 12px 40px rgba(18,17,26,0.1);
  background:var(--matter-indigo);
  /* Reserve space — CLS-safe before image paints */
  aspect-ratio:16 / 9;
}
.hero-photo{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 45%;
  position:absolute;
  inset:0;
}
/* Soft parchment/gold reading band over the sea */
.hero-scrim{
  position:absolute;inset:0;
  pointer-events:none;
  background:
    linear-gradient(180deg,
      rgba(18,17,26,0.18) 0%,
      rgba(18,17,26,0.05) 35%,
      rgba(18,17,26,0.35) 62%,
      rgba(18,17,26,0.78) 100%),
    radial-gradient(ellipse 90% 55% at 50% 100%,
      rgba(201,168,79,0.18) 0%,
      transparent 55%);
}
.hero-copy{
  position:absolute;
  left:0;right:0;bottom:0;
  z-index:1;
  padding:clamp(1.25rem,4vw,2.25rem) clamp(1.1rem,3.5vw,2rem) clamp(1.35rem,3.5vw,1.85rem);
  text-align:left;
}
.hero-copy h1{
  margin:0 0 0.45rem;
  font-weight:600;
  letter-spacing:-0.02em;
  font-size:clamp(1.65rem,4.5vw,2.65rem);
  line-height:1.15;
  color:var(--one-light);
  text-shadow:0 1px 18px rgba(18,17,26,0.45);
}
.hero-copy .lede{
  margin:0;
  max-width:28rem;
  color:rgba(247,242,232,0.88);
  font-size:clamp(0.95rem,2.2vw,1.08rem);
  font-style:italic;
  line-height:1.55;
  font-weight:400;
  text-shadow:0 1px 10px rgba(18,17,26,0.4);
}
/* Thin gold accent under title on the water */
.hero-copy h1::after{
  content:"";
  display:block;
  width:2.75rem;
  height:2px;
  margin-top:0.75rem;
  background:linear-gradient(90deg,var(--nous-gold),transparent);
  border-radius:1px;
}

@media (max-width:600px){
  .hero-visual{
    aspect-ratio:4 / 3;
    border-radius:10px;
  }
  .hero-photo{object-position:center 40%}
  .hero-copy{text-align:left}
}
@media (min-width:900px){
  .hero-visual{aspect-ratio:2 / 1}
}
@media (prefers-reduced-motion:reduce){
  .hero-photo{/* no parallax/animation — static for a11y */}
}

/* Section titles */
.section-head{
  display:flex;align-items:center;gap:1rem;
  margin:0 0 1.35rem;
}
.section-head h2{
  margin:0;font-weight:600;
  letter-spacing:0.1em;text-transform:uppercase;
  color:var(--text-secondary);font-size:0.78rem;
}
.section-head::before,.section-head::after{
  content:"";flex:1;height:1px;
  background:linear-gradient(90deg,transparent,var(--border));
}
.section-head::after{background:linear-gradient(90deg,var(--border),transparent)}
.section-head::before{background:linear-gradient(90deg,transparent,var(--border))}

h1,h2,h3,h4{
  font-family:var(--font-heading);color:var(--heading);
  line-height:1.28;font-weight:600;letter-spacing:-0.015em;
}
h1{font-size:var(--size-h1);margin:0 0 0.85rem}
h2{font-size:var(--size-h2);margin:2rem 0 0.75rem}
h3{font-size:1.2rem;margin:1.5rem 0 0.5rem}

/* Links — AA body contrast (#6E5A2E ≈ 6.3:1 on parchment) */
a{color:var(--link);text-underline-offset:0.18em;text-decoration-thickness:1px}
a:hover{color:var(--accent-hover)}
a:focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:2px;border-radius:2px;
}

.meta{
  color:var(--text-muted);font-size:0.9rem;margin:0 0 1.5rem;
  letter-spacing:0.03em;
}
.meta a{
  color:var(--text-secondary);text-decoration:none;
  border-bottom:1px solid var(--border);
}
.meta a:hover{color:var(--accent);border-bottom-color:var(--accent)}

/* ── Prose ── */
.prose{font-size:1.08rem}
.prose > *:first-child{margin-top:0}
.prose p{margin:0 0 1.2rem}
.prose a{text-decoration:underline;text-decoration-color:rgba(110,90,46,0.35)}
.prose a:hover{text-decoration-color:var(--accent)}
.prose img,.post-image img{
  max-width:100%;height:auto;display:block;margin:1.6rem auto;
  border-radius:3px;
  box-shadow:0 6px 28px rgba(18,17,26,0.07);
  border:1px solid var(--border);
}
.post-image{margin:1.85rem 0;text-align:center}
.post-image figcaption{
  font-size:0.88rem;color:var(--text-muted);margin-top:0.55rem;font-style:italic;
}
.prose blockquote{
  margin:1.65rem 0;padding:0.35rem 0 0.35rem 1.25rem;
  border-left:2px solid var(--nous-gold);
  color:var(--text-secondary);font-style:italic;
  background:linear-gradient(90deg,var(--accent-subtle),transparent 70%);
  border-radius:0 4px 4px 0;
}
.prose ul,.prose ol{margin:0 0 1.2rem;padding-left:1.4rem}
.prose li{margin-bottom:0.4rem}
.prose li::marker{color:var(--nous-gold)}
.prose hr{
  border:0;height:1px;margin:2.75rem auto;max-width:10rem;
  background:linear-gradient(90deg,transparent,var(--border),var(--nous-gold),var(--border),transparent);
}
.prose pre,.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:0.9em;
}
.prose code{
  background:var(--accent-subtle);padding:0.12em 0.35em;border-radius:3px;
  color:var(--text-primary);
}
.prose pre{
  background:var(--matter-indigo);color:var(--one-light);
  padding:1rem 1.15rem;border-radius:8px;overflow:auto;
  border:1px solid rgba(201,168,79,0.2);
}
.prose pre code{background:transparent;padding:0;color:inherit}
.prose table{width:100%;border-collapse:collapse;margin:1.25rem 0;font-size:0.95rem}
.prose th,.prose td{border:1px solid var(--border);padding:0.5rem 0.65rem;text-align:left}
.prose th{background:var(--accent-subtle);font-weight:600}

/* Responsive media embeds (YouTube / Vimeo / TED / HTML5 video) */
.prose .embed-responsive{
  position:relative;
  width:100%;
  max-width:100%;
  margin:1.5rem 0;
  aspect-ratio:16 / 9;
  background:var(--matter-indigo);
  border-radius:8px;
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow:0 4px 24px rgba(18,17,26,0.06);
}
.prose .embed-responsive iframe{
  position:absolute;inset:0;
  width:100%;height:100%;
  border:0;
  display:block;
}
.prose .embed-video{
  margin:1.5rem 0;
  max-width:100%;
}
.prose .embed-video video{
  display:block;
  width:100%;
  height:auto;
  max-height:70vh;
  border-radius:8px;
  background:#000;
  border:1px solid var(--border);
}
.prose .embed-fallback{
  margin:1rem 0;
  padding:0.85rem 1rem;
  background:var(--accent-subtle);
  border-radius:8px;
  border:1px solid var(--border);
  word-break:break-word;
}
.prose .embed-missing{
  margin:1.5rem 0;
  padding:1rem 1.15rem;
  background:var(--bg-elevated);
  border:1px dashed var(--border);
  border-radius:8px;
  color:var(--text-secondary);
  font-size:0.98rem;
}
.prose figure.align-center{margin-left:auto;margin-right:auto}
.prose figure.align-left{float:left;margin:0.25rem 1.25rem 1rem 0;max-width:min(100%,20rem)}
.prose figure.align-right{float:right;margin:0.25rem 0 1rem 1.25rem;max-width:min(100%,20rem)}
.prose::after{content:"";display:table;clear:both}

/* ── Post list cards ── */
.post-list{list-style:none;padding:0;margin:0}
.post-list li{
  padding:1.3rem 1.35rem 1.25rem;
  margin-bottom:0.75rem;
  background:var(--bg-surface);
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow:0 2px 16px rgba(18,17,26,0.035);
  transition:border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  position:relative;
}
.post-list li::before{
  content:"";position:absolute;left:0;top:1.1rem;bottom:1.1rem;width:2px;
  background:transparent;border-radius:1px;
  transition:background 0.18s ease;
}
.post-list li:hover{
  border-color:rgba(201,168,79,0.4);
  box-shadow:0 8px 32px rgba(18,17,26,0.07);
  transform:translateY(-1px);
}
.post-list li:hover::before{background:var(--nous-gold)}
.post-list a{
  font-weight:600;font-size:1.12rem;text-decoration:none;color:var(--text-primary);
  letter-spacing:-0.01em;line-height:1.35;
  display:inline;
}
.post-list a:hover{color:var(--accent-hover)}
.post-list a:focus-visible{outline-offset:3px}
.post-list .meta{margin:0.4rem 0 0.45rem}
.post-list .excerpt{
  margin:0.15rem 0 0;color:var(--text-secondary);font-size:0.97rem;line-height:1.55;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}

/* ── Buttons ── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:0.55rem 1.4rem;border:0;border-radius:7px;
  background:linear-gradient(145deg, var(--cognition-amber) 0%, var(--nous-gold) 45%, var(--accent-hover) 100%);
  color:var(--matter-indigo);font-weight:600;font-family:var(--font-body);
  cursor:pointer;text-decoration:none;letter-spacing:0.03em;
  box-shadow:0 2px 10px rgba(18,17,26,0.1), inset 0 1px 0 rgba(255,253,246,0.35);
  transition:filter 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover{
  filter:brightness(1.05);
  color:var(--matter-indigo);
  box-shadow:0 4px 16px rgba(18,17,26,0.12), inset 0 1px 0 rgba(255,253,246,0.4);
}
.btn:focus-visible{outline:2px solid var(--focus-ring);outline-offset:3px}
.btn.secondary{
  background:transparent;color:var(--text-primary);
  border:1px solid var(--border);box-shadow:none;
}
.btn.secondary:hover{
  border-color:var(--accent);background:var(--accent-subtle);filter:none;
}
.actions{margin-top:2rem;display:flex;flex-wrap:wrap;gap:0.75rem;align-items:center}

/* ── Comments (sibling of article, stays inside .wrap) ── */
.comments{
  margin:1.75rem 0 0;
  padding:1.75rem 1.5rem 1.85rem;
  max-width:100%;
  box-sizing:border-box;
  position:relative;
  background:var(--bg-surface);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:
    0 1px 0 rgba(255,253,246,0.8) inset,
    0 4px 28px rgba(18,17,26,0.045);
}
.comments::before{
  content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:3rem;height:2px;background:var(--nous-gold);border-radius:0 0 2px 2px;
}
.comments h2{margin-top:0;font-size:1.25rem}
#comments-list{max-width:100%}
.comment{
  margin:1rem 0;padding:1.15rem 1.25rem;
  background:var(--bg-elevated);
  border:1px solid var(--border);
  border-radius:9px;
  box-shadow:0 2px 12px rgba(18,17,26,0.03);
  max-width:100%;
  overflow-wrap:anywhere;
  word-wrap:break-word;
}
.comment .who{font-weight:600;font-size:0.92rem;color:var(--text-primary)}
.comment .when{color:var(--text-muted);font-size:0.8rem;margin-left:0.5rem}
.comment .body{margin-top:0.5rem;color:var(--text-secondary);line-height:1.6}
.comments .field,
.comments form{max-width:100%}
.comments .field input,
.comments .field textarea{
  max-width:100%;
  box-sizing:border-box;
}

/* Forms */
.field{margin-bottom:1.05rem}
.field label{display:block;font-weight:600;margin-bottom:0.35rem;font-size:0.93rem}
.field input,.field textarea,.field select{
  width:100%;padding:0.7rem 0.85rem;font:inherit;
  border:1px solid var(--border);border-radius:7px;
  background:var(--bg-surface);color:var(--text-primary);
  transition:border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,.field textarea:focus,.field select:focus{
  outline:none;border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(201,168,79,0.22);
}
.alert{padding:0.8rem 1.05rem;border-radius:7px;margin-bottom:1rem}
.alert.error{background:#F8E8E8;color:#6B2A2A;border:1px solid #E8C8C8}
.alert.ok{background:#EEF6EE;color:#1E4D2B;border:1px solid #C8E0C8}

/* Auth card */
.btn-block{width:100%}
.auth-switch{margin-top:1.25rem}
.actions-center{justify-content:center}
.auth-card{
  max-width:22rem;margin:1rem auto 0;
  background:var(--bg-surface);border:1px solid var(--border);
  border-radius:12px;padding:1.75rem 1.5rem 1.85rem;
  box-shadow:0 8px 32px rgba(18,17,26,0.06);
}
.auth-card h1{font-size:1.5rem;text-align:center;margin-bottom:1.25rem}
.auth-card .meta{text-align:center}

/* ── Article frame ── */
article{
  background:var(--bg-surface);
  border:1px solid var(--border);
  border-radius:12px;
  padding:2rem 1.75rem 2.25rem;
  box-shadow:
    0 1px 0 rgba(255,253,246,0.8) inset,
    0 4px 28px rgba(18,17,26,0.045);
}
article > h1{margin-top:0}
article.page{padding-bottom:2.75rem}

/* ── Footer ── */
.site-footer{
  background:var(--footer-bg);color:var(--footer-text);
  padding:2.25rem 0 2.5rem;margin-top:auto;
  border-top:1px solid rgba(201,168,79,0.18);
  position:relative;
}
.site-footer::before{
  content:"";position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,
    transparent,rgba(201,168,79,0.15),var(--nous-gold),rgba(201,168,79,0.15),transparent);
  opacity:0.7;
}
.site-footer .wrap,.site-footer .wrap-wide{max-width:48rem}
.footer-inner{text-align:center}
.footer-links{
  display:flex;flex-wrap:wrap;justify-content:center;gap:0.35rem 0.15rem;
  list-style:none;margin:0;padding:0;
}
.footer-links a{
  color:var(--cognition-amber);text-decoration:none;
  padding:0.4rem 0.75rem;min-height:44px;display:inline-flex;align-items:center;
  border-radius:4px;letter-spacing:0.02em;
}
.footer-links a:hover,.footer-links a:focus-visible{
  color:var(--one-light);background:rgba(201,168,79,0.1);outline:none;
}
.footer-links li:not(:last-child)::after{
  content:"·";color:rgba(247,242,232,0.35);margin-left:0.15rem;
  pointer-events:none;
}
.footer-links{gap:0}
.footer-links li{display:inline-flex;align-items:center}
.copy{
  opacity:0.72;font-size:0.86rem;margin-top:1rem;
  letter-spacing:0.04em;
}
.site-footer p{margin:0.35rem 0}

/* Page title (blog index etc.) */
.page-title{
  text-align:center;margin:0 0 2rem;padding-bottom:1.25rem;
  position:relative;
}
.page-title::after{
  content:"";display:block;width:2.5rem;height:2px;margin:1rem auto 0;
  background:linear-gradient(90deg,transparent,var(--nous-gold),transparent);
}

@media (max-width:600px){
  .header-inner{flex-direction:column;align-items:flex-start;padding:0.8rem 1.1rem}
  .site-header::after{width:min(40rem,180vw);bottom:-2.6rem;height:3.6rem}
  article,.comments{padding:1.35rem 1.1rem 1.85rem;border-radius:10px}
  .hero{padding:2rem 0 1.85rem}
  .post-list li{padding:1.15rem 1.05rem}
  main.wrap,main.wrap-wide{padding-top:1.85rem}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .post-list li,.nav a,.btn{transition:none}
  .post-list li:hover{transform:none}
}
@media print{
  .site-header,.site-footer,.skip,.comments,.btn{display:none!important}
  body{background:#fff;color:#000}
  article{box-shadow:none;border:none;padding:0}
  a{color:inherit;text-decoration:underline}
}
