:root {
  --text: #000000;
  --muted: #666666;
  --rule: #000000;
  --link: #000000;

  /* layout */
  --maxw: 880px;
  --page-bg: #0f1115; /* darker outside area */
  --paper-bg: #ffffff;
  --paper-radius: 14px;
  --paper-shadow: 0 12px 30px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255,255,255,0.04), rgba(255,255,255,0) 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(255,255,255,0.035), rgba(255,255,255,0) 55%),
    var(--page-bg);
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.5;
  min-height: 100svh;
  padding: 24px;
}

.paper {
  max-width: var(--maxw);
  margin: 16px auto;
  background: var(--paper-bg);
  border-radius: var(--paper-radius);
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.site-header {
  padding: 20px 24px 0;
  text-align: center;
  position: relative;
}

.container {
  padding: 20px 24px 0;
}

.name {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.1;
}

.updated {
  position: absolute;
  right: 16px;
  bottom: 6px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  white-space: nowrap;
}

.contact {
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: center;
  margin: 6px 0 0 0;
}

.contact-item {
  color: var(--link);
  text-decoration: none;
  white-space: nowrap;
  word-break: keep-all;
}

.contact-item:hover { text-decoration: underline; }

.contact .contact-item + .contact-item::before {
  content: "|";
  color: var(--text);
  margin-right: 12px;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 24px -20px 8px;
  padding: 0 20px 6px;
  border-bottom: 1px solid var(--rule);
}

p { margin: 0 0 8px 0; }

.dim { color: var(--muted); font-weight: 400; }

/* ===== FIXED ENTRY LAYOUT =====
   Grid with 2 columns for title/content vs date.
   display: contents lets children inside .entry-main participate in grid.
   Bullets span full width across both columns.
*/
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 6px 0;
}

.entry + .entry { margin-top: 4px; }

.entry-main {
  display: contents; /* expose children to grid */
}

.entry-title {
  grid-column: 1;
  font-weight: 500;
  margin-right: 4px;
}

.entry-meta {
  grid-column: 2;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
  align-self: start;
}

.entry-meta-github {
  grid-column: 2;
  white-space: nowrap;
  text-align: right;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
  align-self: start;
}

.entry .bullets {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-left: 18px;
}

.bullets li { margin: 0 0 4px 0; }

a.repo {
  margin-left: 10px;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}
a.repo:hover { text-decoration: underline; }

@media (max-width: 720px) {
  body { padding: 16px; }
  .paper { border-radius: 12px; }
  .site-header { padding: 20px 16px 16px; }
  .container { padding: 16px; }

  .contact {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
  }
  .contact .contact-item + .contact-item::before { content: none; }

  h2 {
    margin: 24px -16px 8px;
    padding: 0 16px 6px;
  }

  .entry {
    grid-template-columns: 1fr;
  }
  .entry-meta {
    grid-column: 1;
    text-align: left;
    margin-top: 2px;
  }

  .updated {
    position: static;
    transform: none;
    display: block;
    margin-top: 6px;
    text-align: center;
  }

  .contact-item, .entry-title, p, li {
    overflow-wrap: anywhere;
  }
}

@media print {
  body {
    background: #ffffff !important;
    padding: 0;
    font-size: 12pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .paper {
    margin: 0;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .site-header, .container {
    padding: 0;
  }
  .updated { position: static; right: auto; top: auto; font-size: 10pt; }
  a[href]::after { content: ""; }
}
