/* Diego Acevedo — personal site
   Palette: paper, deep-ocean ink, sun accent. Change the variables to retheme. */
:root {
  --paper: #f6f1e7;
  --paper-2: #efe8da;
  --ink: #12232c;
  --ink-soft: #4a5a62;
  --ocean: #0d3b4f;
  --sea: #1f6f78;
  --sun: #d4682a;
  --line: #ddd3c1;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1a20; --paper-2: #16252d; --ink: #ece6da; --ink-soft: #a6b3b8;
    --ocean: #8fc6cf; --sea: #6fb3bb; --sun: #f08a4b; --line: #26363e;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--sun); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.4rem; }
main.wrap { padding-top: 2.5rem; padding-bottom: 4rem; min-height: 70vh; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4.2rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.mark { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .5rem;
  background: var(--ocean); color: var(--paper); font: 600 .95rem var(--serif); }
.brand-name { font: 600 1.1rem var(--serif); }
.nav { display: flex; gap: 1.4rem; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a.active { color: var(--ink); box-shadow: inset 0 -2px var(--sun); }
@media (max-width: 520px) { .brand-name { display: none; } .nav { gap: 1.1rem; } }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: .2em 0 .4em; }
h2 { font-size: 1.6rem; margin: 2.2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .35em; }
.eyebrow { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sun); font-weight: 600; margin: 0; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: var(--measure); }

/* Buttons */
.btn { display: inline-block; background: var(--ocean); color: var(--paper); padding: .7rem 1.2rem;
  border-radius: .45rem; text-decoration: none; font-weight: 600; font-size: .95rem; }
.btn:hover { background: var(--sun); color: #fff; }
.btn-ghost { background: transparent; color: var(--ocean); border: 1.5px solid var(--ocean); }
.btn-ghost:hover { border-color: var(--sun); }
.link { font-weight: 600; text-decoration: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: center; padding: 1.5rem 0 2rem; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); }
.hero-links { display: flex; gap: 1.4rem; align-items: center; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-figure img { border-radius: 1rem; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.horizon { position: relative; aspect-ratio: 4/5; border-radius: 1rem; overflow: hidden;
  background: linear-gradient(180deg, #f3d9b8 0%, #f0b98a 52%, var(--ocean) 52%, #082a39 100%); }
.horizon .sun { position: absolute; left: 50%; top: 52%; width: 44%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--sun); clip-path: inset(0 0 50% 0); }
.horizon .sea { position: absolute; inset: 52% 0 0; background:
  repeating-linear-gradient(180deg, transparent 0 14px, rgba(255,255,255,.08) 14px 16px); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; gap: 1.5rem; } .hero-figure { order: -1; max-width: 16rem; }
  .horizon, .hero-figure img { aspect-ratio: 3/2; } }

/* Sections */
.section { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: .5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head h2 { margin-bottom: .4em; }

/* Post list */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-item a { display: grid; gap: .2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.post-item a:hover .post-title { color: var(--sea); }
.post-meta { display: flex; gap: .6rem; align-items: center; font-size: .82rem; color: var(--ink-soft); flex-wrap: wrap; }
.post-title { font: 600 1.3rem/1.25 var(--serif); }
.post-summary { color: var(--ink-soft); max-width: var(--measure); }
.tag { font-size: .72rem; padding: .1rem .5rem; border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line); }
.tag-archive { background: transparent; color: var(--sun); border-color: var(--sun); }

/* Themes */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.theme { display: block; padding: 1.3rem; border: 1px solid var(--line); border-radius: .8rem;
  background: var(--paper-2); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s; }
.theme:hover { transform: translateY(-2px); border-color: var(--sea); color: var(--ink); }
.theme p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.archive-teaser { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.archive-teaser p { max-width: var(--measure); color: var(--ink-soft); }

/* Article */
.post-header { max-width: 46rem; margin-bottom: 2rem; }
.prose { max-width: var(--measure); font-size: 1.08rem; }
.prose h2 { font-size: 1.45rem; }
.prose blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--sun);
  font: italic 1.2rem/1.5 var(--serif); color: var(--ink-soft); }
.prose img { border-radius: .6rem; margin: 1em 0; }
.prose code { background: var(--paper-2); padding: .1em .35em; border-radius: .25rem; font-size: .9em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .5rem; text-align: left; }
.notice { max-width: var(--measure); background: var(--paper-2); border-left: 3px solid var(--sun);
  padding: .9rem 1.1rem; border-radius: .3rem; font-size: .95rem; margin: 0 0 2rem; }
.post-footer { max-width: var(--measure); display: flex; justify-content: space-between; margin-top: 3rem;
  padding-top: 1.2rem; border-top: 1px solid var(--line); font-weight: 600; }
.post-footer a { text-decoration: none; }
.portrait { float: right; width: 13rem; margin: 0 0 1rem 1.5rem; border-radius: .8rem; }
@media (max-width: 600px) { .portrait { float: none; width: 100%; margin: 0 0 1rem; } }

/* Archive pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; max-width: 52rem; }
.pillar { padding: 1.1rem 1.2rem; border-top: 3px solid var(--sea); background: var(--paper-2); border-radius: .3rem; }
.pillar p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Writing filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.chip { font: 500 .85rem var(--sans); padding: .35rem .85rem; border-radius: 99px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-soft); cursor: pointer; }
.chip.is-on, .chip:hover { background: var(--ocean); color: var(--paper); border-color: var(--ocean); }
.year { font-size: 1rem; letter-spacing: .1em; color: var(--ink-soft); margin: 2rem 0 0; font-family: var(--sans); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.2rem 0 1rem; background: var(--paper-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-name { font: 600 1.1rem var(--serif); margin: 0 0 .3rem; }
.footer-inner .muted { max-width: 28rem; font-size: .9rem; margin: 0; }
.footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { text-decoration: none; font-weight: 500; font-size: .95rem; }
