:root {
  /* Color palette */
  --color-bg: white;
  --color-bg-secondary: #fefef5;
  --color-header: #ffc917;
  --color-selection: #ffc917;
  --color-text: #2d3b2d;
  --color-text-secondary: #5a6b5a;
  --color-muted: #7a8b7a;
  --color-accent: #f00000;
  --color-accent-hover: #8c0000;
  --color-border: #d4cfc4;
  --color-code-bg: #1e2d24;

  /* Typography */
  --font-display: "Fruktur", Georgia, serif;
  --font-heading: "Red Hat Display", -apple-system, BlinkMacSystemFont,
    sans-serif;
  --font-body: "Literata", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --font-handwritten: "Playwrite DE Grund", "Cabin", -apple-system,
    BlinkMacSystemFont, sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.375rem;
  --text-5xl: 3rem;
  --text-display: 4rem;

  @media screen and (width <= 600px) {
    --text-display: 3rem;
  }

  /* Spacing & layout */
  --max-width: 640px;
  --oversize: 720px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 2px 2px 5px rgba(45, 59, 45, 0.08);
  --shadow-md: 0 4px 12px rgba(45, 59, 45, 0.1);
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--color-selection);
  color: var(--color-text);
}

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

a:hover {
  color: var(--color-accent);
  text-decoration: underline solid var(--color-selection);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

h1 a {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 900;
  line-height: 1.2;
  color: black;
}

h1 a:hover {
  text-decoration: none;
  color: black;
}

h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 900;
}

h2 {
  font-size: var(--text-3xl);
  font-style: normal;
  margin-bottom: 0.5rem;
}

h2 a:hover {
  text-decoration-style: underline;
  color: var(--color-accent);
}

code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  font-weight: 600;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
}

header {
  position: static;
  padding-top: calc(env(safe-area-inset-top) + 1rem);
  padding-left: 1rem;
  padding-right: 1rem;
  background: var(--color-header);
  display: flex;
  justify-content: center;
}

nav {
  max-width: var(--max-width);
  margin: 0.5rem 1rem 0 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-links {
  gap: 1rem;
  display: flex;
  z-index: 1;
}

.nav-links a {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.wobbly-divider {
  width: 100%;
}

.wobbly-divider svg {
  width: 100%;
  height: 20px;
}

.wobbly-divider-line {
  stroke: var(--color-text);
}

.wobbly-divider-fill {
  fill: var(--color-header);
}

.timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Notes */
.timeline-item.note {
  /* background: var(--color-bg-secondary); */
  /* box-shadow: var(--shadow-sm); */
  width: min(var(--max-width), 90vw);
  padding: 1rem;
}

.note-content {
  line-height: 1.7;
}

.note-content p {
  margin-bottom: 1rem;
}

.note-content p:last-child {
  margin-bottom: 0;
}

.note-content pre {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow-x: scroll;
}

.note-content img,
picture {
  width: calc(100% + 2.5rem);
  height: auto;
  transform: translateX(-1.25rem);
  object-fit: contain;
}

/* Review */

.review-main {
  width: min(var(--oversize), 95vw);
  gap: 1rem;
}

.review-main img {
  float: inline-start;
  margin: 0 1rem 0 0;
}

.review-link {
  margin-top: 1rem;
}

/* Photo */

.timeline-item.photo {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  width: min(var(--max-width), 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-main img {
  width: 100%;
  height: auto;
}

.photo-caption p {
  font-family: var(--font-body);
}

/* Meta */
.item-meta {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: var(--text-sm);
  color: var(--color-muted);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;

  .tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .item-meta a {
    color: var(--color-muted);
  }

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

  .tag {
    background: rgb(from var(--color-selection) r g b / 0.4);
    color: var(--color-accent);
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 500;
  }

  .tag:hover {
    background: rgb(from var(--color-selection) r g b / 0.9);
  }

  .tag a:hover {
    text-decoration: none;
  }
}
