:root {
  color-scheme: light;
  --paper: #f0ece0;
  --paper-deep: #c8bfaa;
  --paper-light: #faf7ef;
  --ink: #0d0b09;
  --muted: #5a5248;
  --rule: rgba(13, 11, 9, 0.28);
  --accent: #c8100e;
  --accent-soft: rgba(200, 16, 14, 0.1);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Special Elite", "Courier Prime", "Courier New", Courier, ui-monospace, monospace;
  line-height: 1.65;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(13, 11, 9, 0.13) 1px, transparent 1px);
  background-size: 7px 7px;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

.page {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px 0;
  background: rgba(245, 240, 230, 0.92);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px);
}

.signature {
  font-size: clamp(2rem, 4vw, 3.9rem);
  font-weight: 700;
  line-height: 0.9;
  text-decoration: none;
  color: var(--ink);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo {
  height: clamp(44px, 6vw, 68px);
  width: auto;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
  font-size: 0.82rem;
  text-transform: uppercase;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-color: currentColor;
}

.nav a:hover {
  border-color: currentColor;
}

.dad-toggle {
  flex: 0 0 auto;
  padding: 8px 10px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.58);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.dad-toggle[aria-pressed="true"] {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}


.section {
  padding: clamp(46px, 6vw, 86px) 0;
}

.ruled {
  border-top: 2px solid var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(270px, 370px);
  grid-template-areas:
    "copy copy"
    "note portrait";
  align-items: end;
  gap: clamp(24px, 4vw, 52px) clamp(34px, 6vw, 82px);
  min-height: auto;
  padding: clamp(24px, 4vw, 46px) 0 clamp(50px, 6vw, 86px);
  position: relative;
}

.hero::after {
  content: "FILED BY D.M.";
  position: absolute;
  right: clamp(8px, 2vw, 22px);
  top: clamp(110px, 13vw, 168px);
  padding: 8px 12px 6px;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  transform: rotate(5deg);
}

.hero-copy {
  grid-area: copy;
  max-width: none;
  position: relative;
  z-index: 2;
}

.kicker,
.section-label,
.project-year,
time,
.small-print,
figcaption,
.case-meta,
.site-footer {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 820px;
  margin-top: 20px;
  font-size: clamp(3.35rem, 11vw, 8.4rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

.masthead {
  display: grid;
  gap: 16px;
  max-width: none;
  margin-top: clamp(18px, 3vw, 30px);
  padding: clamp(18px, 2.6vw, 30px) 0 clamp(16px, 2.3vw, 26px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: clamp(0.95rem, 1.5vw, 1.28rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.masthead span {
  color: var(--accent);
  font-size: clamp(0.9rem, 1.4vw, 1.16rem);
  letter-spacing: 0.08em;
  max-width: max-content;
}

.masthead strong {
  max-width: 980px;
  color: var(--ink);
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.86;
  font-weight: 400;
}

h2 {
  font-size: clamp(1.28rem, 2.5vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.hero-note {
  grid-area: note;
  align-self: stretch;
  display: grid;
  align-content: center;
  max-width: 720px;
  padding: clamp(24px, 4vw, 42px);
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper-light);
  box-shadow: 7px 7px 0 var(--ink);
}

.note-mark {
  width: max-content;
  max-width: 100%;
  margin-bottom: 22px;
  padding: 5px 9px 3px;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  transform: rotate(-1.4deg);
  font-size: 0.72rem;
  transition: opacity 300ms ease;
  text-transform: uppercase;
}

.aside-joke {
  max-width: 640px;
  margin-top: 24px;
  padding-left: 18px;
  color: var(--muted);
  border-left: 1px solid var(--accent);
}

.dad-extra {
  display: none;
  max-width: 680px;
  margin-top: 16px;
  color: var(--accent);
}

body.dad-mode .dad-extra {
  display: block;
}

.portrait {
  grid-area: portrait;
  position: relative;
  margin: 0;
  justify-self: end;
  padding: 12px 12px 42px;
  background:
    repeating-linear-gradient(45deg, rgba(13,11,9,0.04) 0, rgba(13,11,9,0.04) 1px, transparent 0, transparent 50%),
    repeating-linear-gradient(-45deg, rgba(13,11,9,0.04) 0, rgba(13,11,9,0.04) 1px, transparent 0, transparent 50%),
    var(--paper-light);
  background-size: 8px 8px, 8px 8px, auto;
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1.2deg);
}

.portrait::before {
  content: "SERENITY / STARTUP WORLD / NOTES";
  position: absolute;
  top: 18px;
  left: -18px;
  z-index: 2;
  max-width: 180px;
  padding: 8px 10px 6px;
  color: var(--paper);
  background: var(--accent);
  border-radius: 999px;
  font-size: 0.66rem;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-4deg);
}

.portrait img {
  width: min(100%, 345px);
  aspect-ratio: 0.82;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(100%) contrast(1.45) brightness(0.88);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

figcaption {
  margin-top: 14px;
  text-align: center;
}

.section-label {
  margin-bottom: 28px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 84px);
}

.copy-stack {
  display: grid;
  gap: 22px;
  max-width: 720px;
}

.subpage .page-title {
  padding-top: clamp(36px, 6vw, 76px);
  padding-bottom: clamp(38px, 5vw, 68px);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.toc-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.toc-link {
  display: grid;
  grid-template-columns: 70px minmax(160px, 0.44fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 34px);
  align-items: baseline;
  padding: 22px 0 20px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.toc-link:hover {
  color: var(--ink);
}

.toc-link:hover strong {
  color: var(--accent);
}

.toc-link span,
.toc-link em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  text-transform: uppercase;
}

.toc-link strong {
  font-size: clamp(1.4rem, 3vw, 2.45rem);
  line-height: 1;
  transition: color 160ms ease;
}

/* ── Shelf (knjige & filmovi) ─────────────────── */

.shelf-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.shelf-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 8px;
  margin: 0 -8px;
  border-bottom: 1px dashed var(--rule);
  border-radius: 4px;
  transition: background 200ms;
}

.shelf-item:hover {
  background: var(--accent-soft);
}

.shelf-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.shelf-meta time {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shelf-type-tag {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}

.shelf-type-tag--book {
  background: rgba(141, 29, 29, 0.12);
  color: var(--accent);
}

.shelf-type-tag--film {
  background: rgba(28, 26, 23, 0.09);
  color: var(--muted);
}

.shelf-type-tag--series {
  background: rgba(80, 60, 20, 0.1);
  color: #7a5c1e;
}

.shelf-rating {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 2px;
}

.shelf-reading-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 3px 10px 3px 8px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  width: fit-content;
}

.shelf-reading-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.shelf-body {
  min-width: 0;
}

.shelf-body h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
  line-height: 1.2;
  margin: 0;
}

.shelf-author {
  margin-top: 4px !important;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shelf-review {
  margin-top: 14px !important;
  max-width: 720px;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .shelf-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .shelf-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
}

/* ── Interactive timeline ─────────────────────── */

.timeline-item {
  cursor: pointer;
  user-select: none;
}

.timeline-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.timeline-header h2 {
  flex: 1;
  min-width: 0;
}

.timeline-icon {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  transition: transform 360ms ease;
  margin-top: 6px;
}

.timeline-item--open .timeline-icon {
  transform: rotate(180deg);
}

.timeline-expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 380ms ease;
}

.timeline-item--open .timeline-expand {
  grid-template-rows: 1fr;
}

.timeline-expand-inner {
  overflow: hidden;
}

.timeline-expand-inner p {
  padding-top: 14px;
  padding-bottom: 4px;
  color: var(--muted);
  border-left: 2px solid var(--accent-soft);
  padding-left: 14px;
  margin-left: 2px;
}

.timeline-item--open {
  background: var(--accent-soft);
  border-radius: 4px;
  padding-left: 8px;
  padding-right: 8px;
  margin-left: -8px;
  margin-right: -8px;
}

/* ── Status grid ──────────────────────────────── */

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.status-grid article {
  min-height: 230px;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper-light);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.status-grid article:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.status-grid h2 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 150ms ease;
}

.status-grid h2 a:hover {
  color: var(--accent);
}

.status-grid span,
.timeline span,
.issue-list span {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.status-grid h2 {
  margin-top: 22px;
  font-size: clamp(1.28rem, 2.5vw, 2rem);
}

.status-grid p {
  margin-top: 14px;
}

.page-link {
  display: grid;
  align-content: start;
  min-height: 220px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.7), rgba(245, 240, 230, 0.38));
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.page-link:hover {
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 8px 8px 0 var(--accent-soft);
}

.page-link span,
.page-link em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  text-transform: uppercase;
}

.page-link strong {
  margin: 28px 0 14px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.project-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.timeline,
.issue-list,
.article-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.timeline article,
.issue-list article,
.article-list article {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px dashed var(--rule);
}

.timeline h2,
.issue-list h2,
.article-list h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2.2vw, 1.9rem);
}

.timeline p,
.issue-list p,
.article-list p {
  margin-top: 10px;
  max-width: 760px;
}

.article-list article {
  transition: background 200ms;
  border-radius: 4px;
  padding-left: 8px;
  padding-right: 8px;
  margin-left: -8px;
  margin-right: -8px;
}

.article-list article:hover {
  background: var(--accent-soft);
}

.article-list a {
  text-decoration: none;
}

.article-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Article content wrapper (right column: tags + title + excerpt) */
.article-content {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

/* Article tag list inside blog */
.article-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.article-tag-list span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

/* Blog filter buttons */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.filter-btn {
  background: none;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.project-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px dashed var(--rule);
}

.project-item:first-child {
  padding-top: 0;
}

.project-item p,
.notes p {
  margin-top: 10px;
  max-width: 760px;
}

.project-item .case-meta {
  margin-top: 14px;
  max-width: 680px;
  line-height: 1.55;
}

.project-item a {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.project-item h2 a {
  color: var(--ink);
  text-decoration: none;
  text-transform: none;
  font-size: inherit;
  display: inline;
  margin-top: 0;
  transition: color 150ms;
}

.project-item h2 a:hover {
  color: var(--accent);
}

.project-item {
  transition: background 200ms;
  border-radius: 4px;
  padding-left: 8px;
  padding-right: 8px;
  margin-left: -8px;
  margin-right: -8px;
}

.project-item:hover {
  background: var(--accent-soft);
}

/* Project page mockup */
.project-mockup {
  text-align: center;
}

.project-gallery {
  display: grid;
  gap: clamp(24px, 5vw, 48px);
}

.mockup-img {
  width: 100%;
  max-width: 860px;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(28, 26, 23, 0.18);
  display: block;
  margin: 0 auto;
}

.mockup-caption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Changelog styles */
.changelog-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.changelog-entry {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 8px;
  border-bottom: 1px dashed var(--rule);
  border-radius: 4px;
  margin: 0 -8px;
  transition: background 200ms;
}

.changelog-entry:hover {
  background: var(--accent-soft);
}

.changelog-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.changelog-meta time {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.changelog-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border-radius: 999px;
  width: fit-content;
}

.changelog-tag--new {
  background: rgba(141, 29, 29, 0.12);
  color: var(--accent);
}

.changelog-tag--improved {
  background: rgba(28, 26, 23, 0.08);
  color: var(--muted);
}

.changelog-body h2 {
  margin: 0 0 10px;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

/* Typing cursor */
.masthead-type::after {
  content: "▋";
  animation: blink 0.9s step-end infinite;
  opacity: 1;
  margin-left: 2px;
  font-size: 0.75em;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
  border-top: 1px solid var(--rule);
}

.notes article {
  padding-top: 22px;
  border-top: 0;
}

.notes h2 {
  margin-top: 12px;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
}

.contact h2 {
  max-width: 760px;
}

.contact-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 28px;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.small-print {
  margin-top: 42px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-list span {
  padding: 9px 12px 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(245, 240, 230, 0.48);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(36px, 7vw, 86px);
  align-items: start;
  position: relative;
}

.contact-layout::before {
  content: "LEAVE A NOTE";
  position: absolute;
  right: 0;
  top: -16px;
  padding: 8px 12px 6px;
  background: var(--paper);
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.72rem;
  transform: rotate(4deg);
  z-index: 1;
}

.contact-form {
  display: grid;
  gap: 20px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 0;
  border-color: var(--accent);
}

.contact-form button {
  justify-self: start;
  min-width: 120px;
  padding: 12px 18px 10px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
}

.contact-form button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.contact-details {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.site-footer {
  padding: 32px 0 42px;
  border-top: 1px solid var(--rule);
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ── Article pages ────────────────────────────── */

.article-page .page-title h1 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.05;
  text-transform: none;
}

.article-illustration {
  margin: 0 0 clamp(2rem, 4vw, 3.5rem);
}

.article-illustration img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.article-body {
  max-width: 720px;
}

.article-body h2 {
  margin-top: 52px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.article-body h3 {
  margin-top: 36px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.25;
}

.article-body p {
  margin-top: 18px;
}

.article-body ul,
.article-body ol {
  margin-top: 18px;
  padding-left: 22px;
}

.article-body li {
  margin-top: 8px;
  line-height: 1.6;
}

.article-body blockquote {
  margin: 32px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 1.05rem;
}

.article-body strong {
  color: var(--ink);
}

.article-body em {
  color: var(--muted);
}

.article-body hr {
  border: 0;
  border-top: 1px dashed var(--rule);
  margin: 42px 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.back-link {
  display: inline-block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Progress bar ─────────────────────────────── */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.12s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Hamburger button ─────────────────────────── */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  order: -1;
}

.burger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 220ms ease, opacity 220ms ease;
  transform-origin: center;
}

.burger--open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger--open span:nth-child(2) { opacity: 0; }
.burger--open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Article next / prev nav ──────────────────── */

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.article-nav-link {
  display: grid;
  gap: 6px;
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,250,240,0.6), rgba(245,240,230,0.3));
  transition: border-color 160ms ease, transform 160ms ease;
}

.article-nav-link:hover {
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.article-nav-link--right {
  text-align: right;
}

.article-nav-dir {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-nav-link strong {
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  line-height: 1.25;
}

.article-nav-link em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Scroll fade animations ───────────────────── */

.fade-ready {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Newsletter ───────────────────────────────── */

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.newsletter-form {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,250,240,0.6);
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 16px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  min-width: 0;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--muted);
}

.newsletter-form input[type="email"]:focus {
  outline: none;
}

.newsletter-form button {
  flex: 0 0 auto;
  padding: 12px 18px 10px;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 160ms ease;
}

.newsletter-form button:hover {
  background: var(--accent);
}

.newsletter-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Medium screens (tablets, smaller desktops) ── */

@media (max-width: 1024px) {
  .notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column {
    gap: clamp(20px, 4vw, 48px);
  }

  .toc-link {
    grid-template-columns: 70px minmax(0, 0.44fr) minmax(0, 1fr);
  }
}

/* ── Print styles ─────────────────────────────── */

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
    line-height: 1.7;
  }

  body::before,
  .progress-bar,
  .site-header,
  .back-link,
  .article-nav,
  .newsletter,
  .dad-toggle,
  .burger,
  .site-footer {
    display: none !important;
  }

  .page {
    width: 100%;
    max-width: 100%;
  }

  .section.page-title {
    padding-top: 0;
    border-bottom: 2pt solid #000;
    margin-bottom: 24pt;
  }

  h1 {
    font-size: 22pt;
    line-height: 1.15;
    text-transform: none;
    margin-bottom: 8pt;
  }

  .kicker,
  .article-meta {
    font-size: 9pt;
    color: #555;
  }

  .lead {
    font-size: 13pt;
    margin-bottom: 16pt;
    border-left: 3pt solid #8d1d1d;
    padding-left: 10pt;
  }

  .article-body h2 { font-size: 15pt; margin-top: 24pt; }
  .article-body h3 { font-size: 12pt; margin-top: 16pt; }

  .article-body blockquote {
    border-left: 3pt solid #8d1d1d;
    padding-left: 10pt;
    color: #444;
    font-style: italic;
    page-break-inside: avoid;
  }

  a { color: #000; text-decoration: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #666; }
  a[href^="#"]::after,
  a[href^="index"]::after,
  a[href^="blog"]::after { content: ""; }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, var(--max));
  }

  .site-header {
    position: sticky;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
  }

  .nav {
    justify-content: flex-start;
    margin-left: 0;
  }

  .hero,
  .two-column,
  .project-item,
  .notes,
  .link-grid,
  .contact-layout,
  .toc-link,
  .status-grid,
  .timeline article,
  .issue-list article,
  .article-list article,
  .changelog-entry {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "copy"
      "portrait"
      "note";
    min-height: auto;
    padding-top: 34px;
  }

  .masthead {
    gap: 12px;
  }

  .masthead strong {
    font-size: clamp(2.7rem, 15vw, 5.4rem);
    line-height: 0.9;
  }

  .portrait {
    justify-self: start;
    transform: rotate(0.8deg);
  }

  .portrait img {
    width: min(100%, 320px);
  }

  .portrait::before {
    left: 14px;
    top: 14px;
  }

  .hero-note {
    padding: 24px;
  }

  .hero::after,
  .contact-layout::before {
    display: none;
  }

  .toc-link {
    gap: 8px;
    padding: 18px 0;
  }

  /* On mobile the date stacks above article content */
  .timeline article > time,
  .article-list article > time {
    padding-bottom: 0;
  }

  .article-content {
    gap: 8px;
  }

  .project-item {
    gap: 8px;
  }

  .project-year {
    margin-bottom: 0;
  }

  .burger {
    display: flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    order: 10;
  }

  .nav--open {
    display: flex;
  }

  .nav a {
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
  }

  .dad-toggle {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 6px 8px 5px;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 5rem);
  }

  .lead {
    font-size: clamp(1rem, 4vw, 1.25rem);
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav-link--right {
    text-align: left;
  }

  .newsletter {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
    border-radius: 8px;
  }

  .newsletter-form button {
    border-left: 0;
    border-top: 1px solid var(--rule);
    border-radius: 0 0 8px 8px;
    text-align: center;
  }

  /* Stack two-column sections properly */
  .two-column > * {
    min-width: 0;
  }

  /* Changelog on mobile */
  .changelog-entry {
    gap: 12px;
  }

  .changelog-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
}

/* ── Speech bubble (kicker dad joke) ─────────── */

.speech-bubble {
  position: relative;
  display: inline-block;
  color: var(--ink) !important;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 8px 18px 6px;
  text-transform: none !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.02em !important;
  box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 32px;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 20px;
  border: 7px solid transparent;
  border-top: 7px solid var(--ink);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 21px;
  border: 6px solid transparent;
  border-top: 6px solid var(--paper-light);
  z-index: 1;
}

/* ── Alan Ford quote divider ──────────────────── */

.af-quote {
  padding: clamp(32px, 5vw, 64px) 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(13, 11, 9, 0.028) 4px,
    rgba(13, 11, 9, 0.028) 5px
  );
}

.af-quote blockquote {
  margin: 0 auto;
  max-width: 760px;
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.af-quote cite {
  display: block;
  margin-top: 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-style: normal;
}
