/*
 * Design System — Japanese-inspired minimal aesthetic
 *
 * Font:     Inter (self-hosted) — clean, geometric sans-serif with
 *           precise letterforms. Loads weights 300, 400, 600.
 *
 * Palette:  Near-black text (#1a1a1a) on warm off-white (#fafaf9).
 *           Avoids pure black/white for a softer, more natural contrast.
 *           Buttons use Pico's default primary blue.
 *
 * Sizing:   Base font 15px with light weight (300) for body copy.
 *           Headings use weight 400-600; size provides hierarchy.
 *           Generous whitespace throughout.
 *
 * Layout:   Container max-width 720px. Responsive vertical padding
 *           (2rem mobile, 6rem desktop). Inline padding at all widths.
 */

:root {
  --pico-font-family: "Inter", "Avenir Next", Avenir, "Segoe UI", Roboto,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pico-font-size: 15px;
  --pico-font-weight: 300;
  --pico-line-height: 1.7;

  --pico-color: #1a1a1a;
  --pico-background-color: #fafaf9;
}

/* --- Layout --- */

main.container {
  max-width: 720px;
  padding: 2rem 1.25rem 4rem;
}

@media (min-width: 768px) {
  main.container {
    padding: 6rem 1.25rem;
  }
}

/* --- Typography --- */

h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.01em;
}

h1 {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-top: 4rem;
}

strong {
  font-weight: 600;
}

p + p {
  margin-top: 0;
}

/* --- Components --- */

.back {
  margin-bottom: 3rem;
}

.back a {
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  opacity: 0.5;
}

.back a:hover {
  opacity: 1;
}

.cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.services {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 0.25em;
}

.services dt,
.services dd {
  margin: 0;
  padding: 0.25em 0;
  border-bottom: 1px dotted color-mix(in srgb, currentColor 30%, transparent);
}

.services dt {
  font-weight: 400;
}

.services dd {
  text-align: right;
}

.posts {
  list-style: none;
  padding: 0;
}

.posts li {
  display: flex;
  align-items: center;
  gap: 1.5em;
  padding: 0.25em 0;
}

.posts time {
  font-variant-numeric: tabular-nums;
  opacity: 0.4;
  white-space: nowrap;
}

.post-thumb-link {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.post-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.notes-teaser li {
  align-items: flex-start;
}

.note-teaser-copy {
  min-width: 0;
}

.note-teaser-date {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  opacity: 0.5;
  margin-bottom: 0.15rem;
}

.note-teaser-link {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
  text-decoration: none;
}

.note-teaser-link:hover {
  text-decoration: underline;
}

.note-teaser-permalink {
  display: inline-block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  opacity: 0.5;
  text-decoration: none;
}

.note-teaser-permalink:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.hashtag-link {
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, currentColor 35%, transparent);
}

.hashtag-link:hover {
  text-decoration: none;
  border-bottom-color: color-mix(in srgb, currentColor 70%, transparent);
}

/* --- Blog --- */

article {
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  font-family: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino,
    "Book Antiqua", Georgia, "Times New Roman", Times, serif;
  font-weight: 300;
  font-size: 1.05rem;
  text-align: justify;
}

article h1, article h2, article h3,
article h4, article h5, article h6 {
  font-family: "Inter", "Avenir Next", Avenir, "Segoe UI", Roboto,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.post-date {
  opacity: 0.4;
  margin-top: -0.5rem;
  margin-bottom: 2.5rem;
}

/* --- Notes --- */

.notes-teaser-intro {
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.notes-page header {
  margin-bottom: 2rem;
}

.notes-intro {
  opacity: 0.7;
}

.notes-stream {
  list-style: none;
  padding: 0;
  margin: 0;
}

.note-row {
  padding: 1.25rem 0;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.note-row:first-child {
  border-top: none;
  padding-top: 0;
}

.note-row::after {
  content: "";
  display: block;
  clear: both;
}

.note-time-wrap {
  clear: both;
  margin: 0.4rem 0 0;
}

.note-time {
  font-variant-numeric: tabular-nums;
  opacity: 0.55;
  text-decoration: none;
  font-size: 0.95rem;
}

.note-anchor-link {
  text-decoration: none;
}

.note-anchor-link:hover .note-time {
  opacity: 0.85;
}

.note-permalink {
  margin-left: 0.45rem;
  font-size: 0.72rem;
  opacity: 0.45;
  text-decoration: none;
  text-transform: lowercase;
}

.note-permalink:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.note-content {
  max-width: 66ch;
}

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

.note-thumb-link {
  display: block;
  float: left;
  line-height: 0;
  width: 120px;
  margin: 0.1rem 1rem 0.2rem 0;
}

.note-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

@media (min-width: 860px) {
  .note-thumb-link { width: 120px; }
}

@media (max-width: 859px) {
  .note-thumb-link {
    float: none;
    width: 120px;
    margin: 0 0 0.35rem 0;
  }
}

.note-entry-page {
  font-family: "Inter", "Avenir Next", Avenir, "Segoe UI", Roboto,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  text-align: left;
}

.note-entry-page .note-time {
  font-size: 0.95rem;
}

.note-entry-page .note-time-wrap {
  margin: 0.2rem 0 0.9rem;
}

.note-entry-page .note-content {
  max-width: 68ch;
}

.note-figure {
  margin: 0 0 1.25rem;
}

.note-figure img {
  width: 100%;
  max-width: 680px;
  height: auto;
  border-radius: 0.35rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.photo-grid {
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
  margin-left: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.photo-grid li {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.photo-grid li::marker {
  content: "";
}

.photo-grid a {
  display: block;
  line-height: 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.photos-page.container {
  max-width: 1120px;
}

.photo-masonry {
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
  margin-left: 0;
  column-count: 2;
  column-gap: 0.7rem;
}

.photo-masonry-item {
  list-style: none;
  list-style-type: none;
  break-inside: avoid;
  margin-bottom: 0.7rem;
}

.photo-masonry-item::marker {
  content: "";
}

.photo-masonry-item a {
  display: block;
  line-height: 0;
}

.photo-masonry-item img {
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

@media (min-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .photo-grid-large {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .photo-masonry {
    column-count: 3;
  }
}

@media (min-width: 1080px) {
  .photo-masonry {
    column-count: 4;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
