/* =============================================================
   angel.kiwi — minimalist brutalism, matcha palette
   ============================================================= */

:root {
  --bg: #e8e3cf;
  --fg: #1d2114;
  --muted: #6c6e58;
  --line: rgba(29, 33, 20, 0.18);
  --line-soft: rgba(29, 33, 20, 0.10);
  --accent: #a44326;
  --accent-2: #5a7a3a;
  --bar-bg: #1d2114;
  --bar-fg: #e8e3cf;
  --panel-bg: #ddd7bf;

  --serif: "Shippori Mincho", "Times New Roman", serif;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Hack", ui-monospace, monospace;

  --gutter: 80px;
  --max-w: 1280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}
html { min-height: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body > main { flex: 1 0 auto; }
body > .footer { flex-shrink: 0; }

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.5px;
}

button { font: inherit; }

img { max-width: 100%; height: auto; }

/* =============================================================
   Top bar
   ============================================================= */
.topbar {
  height: 64px;
  background: var(--bar-bg);
  color: var(--bar-fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: relative;
  z-index: 10;
}
.topbar a { color: var(--bar-fg); }
.topbar a:hover { color: var(--bar-fg); opacity: 0.85; }

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
}
.topbar-brand-name {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.3px;
}
.topbar-brand-kana {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 4px;
  opacity: 0.65;
}

.topbar-nav {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}
.topbar-nav li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}
.topbar-nav li.is-active {
  border-bottom-color: var(--accent);
}
.topbar-nav .nav-num {
  opacity: 0.45;
  font-size: 10px;
}
.topbar-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.topbar-lang { opacity: 0.85; }
.topbar-lang a { padding: 0 4px; }
.topbar-lang .is-current { color: var(--accent); }

.theme-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.theme-button .theme-icon { width: 14px; height: 14px; }
.theme-button .theme-icon-bg { stroke: currentColor; fill: none; }
.theme-button .theme-icon-fg { fill: currentColor; }

.menu-button {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  cursor: pointer;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  align-items: center;
  gap: 8px;
}
.menu-button .bars {
  width: 16px;
  height: 12px;
  position: relative;
  display: inline-block;
}
.menu-button .bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}
.menu-button .bars span:nth-child(1) { top: 1px; }
.menu-button .bars span:nth-child(2) { top: 5.5px; }
.menu-button .bars span:nth-child(3) { top: 10px; }
.menu-button[aria-expanded="true"] .bars span:nth-child(1) { top: 5.5px; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] .bars span:nth-child(3) { top: 5.5px; transform: rotate(-45deg); }

.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--bar-bg);
  color: var(--bar-fg);
  z-index: 100;
  padding: 80px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2,.7,.2,1);
}
.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-drawer .drawer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-drawer .drawer-nav li {
  border-bottom: 1px dashed rgba(232, 227, 207, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.mobile-drawer.is-open .drawer-nav li {
  opacity: 1;
  transform: translateY(0);
}
.mobile-drawer.is-open .drawer-nav li:nth-child(1) { transition-delay: 0.05s; }
.mobile-drawer.is-open .drawer-nav li:nth-child(2) { transition-delay: 0.10s; }
.mobile-drawer.is-open .drawer-nav li:nth-child(3) { transition-delay: 0.15s; }
.mobile-drawer.is-open .drawer-nav li:nth-child(4) { transition-delay: 0.20s; }
.mobile-drawer.is-open .drawer-nav li:nth-child(5) { transition-delay: 0.25s; }
.mobile-drawer .drawer-nav a {
  color: var(--bar-fg);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 32px;
  padding: 18px 4px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  letter-spacing: -0.5px;
}
.mobile-drawer .drawer-nav .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.5;
}
.mobile-drawer .drawer-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.65;
}
.mobile-drawer .drawer-foot a { color: var(--bar-fg); }
body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  .topbar { padding: 0 18px; height: 56px; }
  .topbar-nav { display: none; }
  .topbar-brand-kana { display: none; }
  .topbar-right .topbar-lang { display: none; }
  .menu-button { display: inline-flex; }
}
@media (min-width: 901px) {
  .mobile-drawer { display: none !important; }
}

/* =============================================================
   Page shell + grid rules
   ============================================================= */
.page {
  position: relative;
  padding: 60px var(--gutter) 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.page--article {
  padding: 72px 120px 56px;
}

.grid-rules {
  position: absolute;
  inset: 0 var(--gutter);
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-left: 1px solid var(--line-soft);
  z-index: 0;
}
.page--article .grid-rules { inset: 0 120px; }
.grid-rules > div { border-right: 1px solid var(--line-soft); height: 100%; }

.page > * { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .page, .page--article { padding: 36px 22px 56px; }
  .grid-rules { display: none; }
}

/* =============================================================
   Hero (homepage)
   ============================================================= */
.hero {
  position: relative;
  margin-top: 24px;
  margin-bottom: 42px;
  padding-bottom: 32px;
  overflow: hidden;
}
.hero-top {
  position: relative;
  overflow: hidden;
  padding: 64px 0 44px;
}
.hero-illustration {
  position: absolute;
  right: 24px;
  bottom: -32px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px);
  animation: hero-rise .9s cubic-bezier(.2,.7,.2,1) 0.45s forwards;
}
.hero-illustration svg {
  display: block;
  width: 100%;
  height: auto;
}
.hero-illustration svg path { stroke: var(--fg); }
.hero-illustration svg path[fill="#fff"] { fill: var(--bg); }
.hero-illustration svg path[fill="none"] { fill: none; }

.hero-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.94;
  letter-spacing: -3px;
  margin: 0;
  padding-right: 220px;
}
.hero-title .wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: hero-wave 2.4s ease-in-out 1.4s 2;
}
.hero-title .accent {
  color: var(--accent);
  font-style: italic;
}

.hero-divider {
  height: 1px;
  background: var(--fg);
  opacity: 0.55;
  margin: 0 0 26px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: hero-line 0.9s cubic-bezier(.55,.05,.2,1) 0.65s forwards;
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 48px;
}
.hero-kicker {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 6px;
  color: var(--muted);
  margin: 0;
}
.hero-blurb {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.55;
  margin: 0;
  text-align: right;
  text-wrap: pretty;
}
.hero-blurb b { color: var(--accent); font-weight: 700; }

.hero-line {
  --d: 0s;
  opacity: 0;
  transform: translateY(18px);
  clip-path: inset(0 100% 0 0);
  animation:
    hero-rise .9s cubic-bezier(.2,.7,.2,1) var(--d) forwards,
    hero-wipe 1.05s cubic-bezier(.55,.05,.2,1) var(--d) forwards;
}
.hero-1 { --d: 0.10s; }
.hero-3 {
  --d: 0.95s;
  clip-path: none;
  animation: hero-rise .9s cubic-bezier(.2,.7,.2,1) var(--d) forwards;
}

@keyframes hero-rise { to { opacity: 1; transform: translateY(0); } }
@keyframes hero-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes hero-line {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}
@keyframes hero-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

@media (max-width: 900px) {
  .hero-title { padding-right: 0; }
  .hero-illustration {
    position: static;
    width: 160px;
    margin: 24px auto 0;
    display: block;
  }
  .hero-foot { grid-template-columns: 1fr; gap: 18px; }
  .hero-blurb { text-align: left; }
  .hero-kicker { font-size: 28px; letter-spacing: 4px; }
}

/* =============================================================
   Section labels + section titles
   ============================================================= */
.section-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 22px;
  letter-spacing: -0.5px;
}
.section-title .accent { color: var(--accent); font-style: italic; }

/* =============================================================
   Sections row (Articulos / Proyectos / Perfiles)
   ============================================================= */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding-top: 88px;
  padding-bottom: 32px;
  gap: 0;
}
.row .col-articles { grid-column: 1 / span 5; padding-right: 28px; }
.row .col-projects { grid-column: 6 / span 4; padding-right: 28px; }
.row .col-profiles { grid-column: 10 / span 3; }

.articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.articles-list .item-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1.5px;
}
.articles-list .item-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  margin: 4px 0 0;
  display: block;
}
.articles-list a.item-title { color: var(--fg); }
.articles-list a.item-title:hover { color: var(--accent); }

.projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.projects-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: baseline;
}
.projects-list .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  width: 22px;
}
.projects-list .name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
}
.projects-list .desc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profiles-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.profiles-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}
.profiles-list .label {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
}
.profiles-list .handle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.more-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-top: 12px;
}
.more-link:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 900px) {
  .row { display: flex; flex-direction: column; gap: 48px; padding-top: 48px; }
  .row > div { padding-right: 0 !important; }
}

/* =============================================================
   Talks section
   ============================================================= */
.talks {
  padding-top: 56px;
  margin-top: 32px;
}
.talks-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
  gap: 24px;
  flex-wrap: wrap;
}
.talks-head .title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 56px);
  margin: 0;
  line-height: 0.95;
  letter-spacing: -1px;
}
.talks-head .title .accent { color: var(--accent); font-style: italic; }
.talks-head .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: right;
}
.talks-head .meta .dot { color: var(--accent-2); }

.talks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.talk-card {
  background: var(--panel-bg);
  border: 2px solid var(--fg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  min-height: 240px;
  color: var(--fg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.talk-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--fg);
  color: var(--fg);
}
.talk-card .num {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 72px;
  line-height: 0.85;
  letter-spacing: -3px;
  color: var(--accent);
}
.talk-card .venue {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.talk-card .title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.3px;
  flex: 1;
}
.talk-card .co {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.talk-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.talk-card .foot .min { color: var(--muted); }
.talk-card .foot .play { color: var(--accent); }

@media (max-width: 900px) {
  .talks-grid { grid-template-columns: 1fr; }
}

/* =============================================================
   Dark footer
   ============================================================= */
.footer {
  background: var(--bar-bg);
  color: var(--bar-fg);
  margin-top: 80px;
}
.footer a { color: var(--bar-fg); }
.footer-rule { height: 4px; background: var(--accent); }
.footer-row {
  padding: 32px 32px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.footer-mark {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(36px, 7vw, 56px);
  line-height: 0.92;
  letter-spacing: -2px;
}
.footer-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(232, 227, 207, 0.7);
}
.footer-meta a { color: inherit; }
.footer-meta .accent { color: var(--accent); }
.footer-meta .dot { color: var(--accent-2); }

.footer-fine {
  border-top: 1px solid rgba(232, 227, 207, 0.13);
  padding: 10px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(232, 227, 207, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.footer-fine .ichigo { color: rgba(232, 227, 207, 0.7); }

@media (max-width: 700px) {
  .footer-row {
    grid-template-columns: 1fr;
    padding: 24px 20px 16px;
  }
  .footer-fine { padding: 10px 20px; }
}

/* =============================================================
   Article (post) view
   ============================================================= */
.article-hero {
  position: relative;
  margin-bottom: 56px;
  max-width: 1100px;
}
.article-hero h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 116px);
  line-height: 0.95;
  letter-spacing: -3px;
  margin: 0;
  text-wrap: balance;
}
.article-hero .accent { color: var(--accent); font-style: italic; }

.article-meta {
  margin-top: 28px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.article-meta .sep { opacity: 0.4; }
.article-meta .lang { color: var(--fg); }
.article-meta .lang a { color: var(--fg); }
.article-meta .lang a:hover { color: var(--accent); }
.article-meta .spacer { flex: 1; }

.toc-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fg);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.toc-toggle .count { color: var(--muted); }
.toc-toggle .plus {
  display: inline-block;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  width: 14px;
  transition: transform .3s cubic-bezier(.4,.1,.3,1);
}
.toc-toggle[aria-expanded="true"] .plus { transform: rotate(45deg); }

.toc-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s cubic-bezier(.6,.05,.3,1);
}
.toc-collapse.open { grid-template-rows: 1fr; }
.toc-collapse > .toc-inner { overflow: hidden; }
.toc-list {
  margin: 18px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 48px;
  list-style: none;
}
.toc-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.toc-list .toc-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1.5px;
}
.toc-list .toc-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--fg);
}

.art-line {
  --d: 0s;
  opacity: 0;
  transform: translateY(14px);
  clip-path: inset(0 100% 0 0);
  animation:
    art-rise .9s cubic-bezier(.2,.7,.2,1) var(--d) forwards,
    art-wipe 1.05s cubic-bezier(.55,.05,.2,1) var(--d) forwards;
}
.art-1 { --d: 0.05s; }
.art-2 {
  --d: 0.55s;
  clip-path: none;
  animation: art-rise .8s cubic-bezier(.2,.7,.2,1) 0.55s forwards;
}
@keyframes art-rise { to { opacity: 1; transform: translateY(0); } }
@keyframes art-wipe { to { clip-path: inset(0 0 0 0); } }

/* Article body */
.post-wrap {
  position: relative;
  max-width: 1040px;
}
.post-content {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  color: var(--fg);
  max-width: 720px;
}

/* Sidenotes */
.sidenote-wrap { position: relative; }
.sidenote-wrap > .sidenote {
  position: absolute;
  top: 0;
  left: 760px;
  width: 240px;
  border-top: 1px solid var(--accent);
  padding-top: 8px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-style: normal;
}
.sidenote-wrap > .sidenote .sidenote-num {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.sidenote-anchor {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 1.5px;
  background-position: 0 100%;
  padding-bottom: 1px;
}
.sidenote-anchor sup {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  margin-left: 4px;
  letter-spacing: 0.5px;
}

@media (max-width: 1100px) {
  .sidenote-wrap > .sidenote {
    position: static;
    width: auto;
    max-width: 720px;
    margin: 12px 0 0;
  }
}
.post-content > p,
.post-content > ul,
.post-content > ol,
.post-content > pre,
.post-content > blockquote,
.post-content > figure { margin: 0 0 1.4em; max-width: 720px; }

.post-content > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 88px;
  line-height: 0.85;
  color: var(--accent);
  float: left;
  margin: 6px 14px 0 0;
}

.post-content h1,
.post-content h2 {
  position: relative;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 56px 0 18px;
  max-width: 720px;
}
.post-content h1:hover .anchor,
.post-content h1:focus-within .anchor,
.post-content h2:hover .anchor,
.post-content h2:focus-within .anchor { opacity: 1; }
.post-content h1 .anchor,
.post-content h2 .anchor {
  position: absolute;
  left: -32px;
  top: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .15s ease;
}
.post-content h1 .anchor:hover,
.post-content h2 .anchor:hover { text-decoration: underline; }

.post-content h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  margin: 40px 0 12px;
  max-width: 720px;
  border-left: 3px solid var(--accent-2);
  padding-left: 14px;
}

.post-content a {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  padding-bottom: 1px;
  transition: background-size 0.15s ease;
}
.post-content a:hover { background-size: 100% 2px; }

.post-content code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--line-soft);
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--accent);
}
.post-content pre {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  padding: 16px 18px;
  overflow-x: auto;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.post-content blockquote {
  border-left: 3px solid var(--accent-2);
  padding: 6px 18px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--fg);
}

.post-content ul, .post-content ol { padding-left: 22px; }
.post-content li { margin-bottom: 6px; }

.post-content hr {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 36px 0;
  max-width: 720px;
}

.post-content img,
.post-content figure { max-width: 100%; }

.post-content h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 56px 0 18px;
  max-width: 720px;
}

.article-end {
  margin: 56px 0 0;
  display: flex;
  justify-content: center;
}
.article-end .hanko {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 18px;
  transform: rotate(-6deg);
  box-shadow: 3px 3px 0 var(--fg);
}

.article-foot {
  border-top: 2px solid var(--fg);
  padding-top: 22px;
  margin-top: 64px;
  margin-bottom: 56px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: start;
  max-width: 980px;
}
.article-foot .label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}
.article-foot .tags {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1.5px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.article-foot .tags a { color: var(--accent); }

.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.share-btn {
  border: 2px solid var(--fg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--mono);
  text-decoration: none;
}
.share-btn:hover { background: var(--fg); color: var(--bg); }
.share-btn:hover .glyph { background: var(--bg); color: var(--fg); }
.share-btn .glyph {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.share-btn .name {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

@media (max-width: 700px) {
  .article-foot { grid-template-columns: 1fr; gap: 24px; }
  .share-grid { grid-template-columns: 1fr 1fr; }
}

.author-strip {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.author-strip .avatar {
  width: 56px;
  height: 56px;
  border: 2px solid var(--fg);
  object-fit: cover;
  background: var(--panel-bg);
  flex-shrink: 0;
}
.author-strip .author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.author-strip .author-info .label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.author-strip .name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--fg);
  text-transform: none;
}
.author-strip .spacer { flex: 1; }
.author-strip .out { color: var(--accent); }

.continue {
  border-top: 2px solid var(--fg);
  padding-top: 28px;
}
.continue h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 28px;
  line-height: 0.95;
  letter-spacing: -1px;
}
.continue h2 .accent { color: var(--accent); font-style: italic; }
.continue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.continue-card {
  background: var(--panel-bg);
  border: 2px solid var(--fg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--fg);
  min-height: 200px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.continue-card:hover {
  color: var(--fg);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--fg);
}
.continue-card .head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.continue-card .title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  flex: 1;
}
.continue-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.continue-card .foot .tags { color: var(--muted); }
.continue-card .foot .min { color: var(--accent); }

@media (max-width: 700px) {
  .continue-grid { grid-template-columns: 1fr; }
}

/* =============================================================
   Listing pages (blog index, tags)
   ============================================================= */
.listing-hero {
  margin-bottom: 56px;
  max-width: 1100px;
}
.listing-hero .label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 14px;
}
.listing-hero h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 116px);
  line-height: 0.95;
  letter-spacing: -3px;
  margin: 0;
}
.listing-hero h1 .accent { color: var(--accent); font-style: italic; }
.listing-hero .lede {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 720px;
}

.listing {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.listing li {
  border-top: 1px dashed var(--line);
  padding: 26px 0;
}
.listing li:last-child { border-bottom: 1px dashed var(--line); }
.listing-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 32px;
  align-items: baseline;
}
.listing-row .date {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.listing-row .body { display: flex; flex-direction: column; gap: 8px; }
.listing-row .title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0;
}
.listing-row .title a { color: var(--fg); }
.listing-row .title a:hover { color: var(--accent); }
.listing-row .desc {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 680px;
}
.listing-row .tags {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.listing-row .tags a { color: var(--accent); }
.listing-row .read {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .listing-row { grid-template-columns: 1fr; gap: 8px; }
  .listing-row .read { display: none; }
}

/* Hire page */
.hire-section {
  border-top: 1px dashed var(--line);
  padding: 40px 0;
}
.hire-section h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 22px;
  line-height: 0.95;
}
.hire-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.hire-card {
  border: 2px solid var(--fg);
  background: var(--panel-bg);
  padding: 22px;
}
.hire-card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 22px;
}
.hire-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.hire-experience {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hire-experience li {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin-bottom: 18px;
}
.hire-experience h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 20px;
}
.hire-experience p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.hire-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hire-stack span {
  border: 1px solid var(--line);
  padding: 6px 10px;
}

.hire-cta {
  border: 2px solid var(--fg);
  padding: 40px 32px;
  text-align: center;
  background: var(--panel-bg);
}
.hire-cta h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.95;
}
.hire-cta p {
  margin: 0 auto 20px;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.hire-cta a {
  display: inline-block;
  padding: 14px 22px;
  border: 2px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.hire-cta a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 700px) {
  .hire-grid { grid-template-columns: 1fr; }
}

/* Card / social page */
.card-page {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: start;
}
.card-page .ava {
  width: 220px;
  height: 220px;
  border: 2px solid var(--fg);
  object-fit: cover;
  background: var(--panel-bg);
}
.card-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.card-cols h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 22px;
}
.card-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-cols a {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

@media (max-width: 700px) {
  .card-page { grid-template-columns: 1fr; gap: 24px; }
  .card-page .ava { width: 140px; height: 140px; }
  .card-cols { grid-template-columns: 1fr; gap: 18px; }
}

/* =============================================================
   Misc utilities
   ============================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
