
:root {
  --bg: #f4f3ef;
  --surface: #fff;
  --text: #171717;
  --muted: #75716a;
  --line: #dad7cf;
  --max: 1340px;
  --reading: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }

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

button { font: inherit; }

.site-header,
.site-footer,
main {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
}

.site-header nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--text);
}

.hero {
  padding: 92px 0 78px;
  max-width: 900px;
}

.kicker {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-size: clamp(54px, 9vw, 118px);
  line-height: .9;
  letter-spacing: -.065em;
}

.hero p,
.page-title p {
  margin: 28px 0 0;
  max-width: 690px;
  color: var(--muted);
  font-size: 18px;
}

.page-title {
  padding: 78px 0 50px;
}

.section-head {
  margin: 0 0 24px;
  padding: 0 0 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -.03em;
}

.section-head a {
  color: var(--muted);
  font-size: 14px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 86px;
}

.note-card {
  min-height: 245px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.32);
}

.note-card:hover {
  background: rgba(255,255,255,.72);
}

.note-date {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .05em;
}

.note-card h3 {
  margin: 20px 0 8px;
  font-size: 24px;
  line-height: 1.14;
  letter-spacing: -.035em;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.note-tags {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.visual-strip {
  display: grid;
  grid-template-columns: 1.35fr .9fr .9fr;
  grid-template-rows: 260px 210px;
  gap: 12px;
  margin-bottom: 88px;
}

.visual-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #dedbd3;
}

.visual-card:first-child {
  grid-row: 1 / span 2;
}

.visual-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.visual-card:hover img { transform: scale(1.015); }

.visual-card .label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(10,10,10,.72);
  color: white;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.filter {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter:hover,
.filter.active {
  border-color: var(--text);
  background: var(--text);
  color: white;
}

.gallery {
  column-count: 4;
  column-gap: 12px;
  padding-bottom: 70px;
}

.photo-card {
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: #dedbd3;
  break-inside: avoid;
  cursor: zoom-in;
}

.photo-card img {
  width: 100%;
  height: auto;
  transition: transform .25s ease, opacity .25s ease;
}

.photo-card:hover img {
  transform: scale(1.012);
  opacity: .96;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  background: rgba(10,10,10,.96);
  color: white;
}

.viewer[hidden] { display: none; }

.viewer-image {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 42px;
}

.viewer-image img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.viewer-meta {
  padding: 70px 28px 30px;
  border-left: 1px solid rgba(255,255,255,.15);
  overflow: auto;
}

.viewer-meta h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.viewer-meta p {
  color: rgba(255,255,255,.68);
  font-size: 14px;
}

.viewer-meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.viewer-close {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 1001;
  border: 0;
  background: transparent;
  color: white;
  font-size: 42px;
  cursor: pointer;
}

.notes-list {
  max-width: 920px;
  padding-bottom: 90px;
}

.notes-row {
  padding: 23px 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 26px;
  border-top: 1px solid var(--line);
}

.notes-row:last-child {
  border-bottom: 1px solid var(--line);
}

.notes-row time {
  color: var(--muted);
  font-size: 13px;
}

.notes-row h2 {
  margin: 0 0 7px;
  font-size: 23px;
  letter-spacing: -.03em;
}

.notes-row p {
  margin: 0;
  color: var(--muted);
}

.article {
  max-width: var(--reading);
  padding: 74px 0 110px;
}

.article-header {
  padding-bottom: 35px;
  border-bottom: 1px solid var(--line);
}

.article-header time {
  color: var(--muted);
  font-size: 13px;
}

.article-header h1 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: .98;
  letter-spacing: -.055em;
}

.article-header p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.prose {
  padding-top: 28px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.82;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.prose h2 { margin-top: 2.1em; }
.prose h3 { margin-top: 1.8em; }

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 1.6em 0;
  padding-left: 20px;
  border-left: 2px solid var(--text);
  color: var(--muted);
}

.prose pre {
  overflow: auto;
  padding: 18px;
  border-radius: 9px;
  background: #eae8e1;
  font-size: 14px;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.archive {
  max-width: 920px;
  padding-bottom: 90px;
}

.archive-group {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 25px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.archive-group h2 {
  margin: 0;
  font-size: 20px;
}

.archive-items {
  display: grid;
  gap: 13px;
}

.archive-item {
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.archive-item span:first-child {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.about {
  max-width: var(--reading);
  padding: 72px 0 110px;
}

.empty {
  padding: 55px 0 90px;
  color: var(--muted);
}

.site-footer {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .gallery { column-count: 3; }
  .visual-strip {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 300px 220px;
  }
  .visual-card:first-child { grid-column: 1 / span 2; grid-row: auto; }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  main {
    width: calc(100% - 28px);
  }

  .site-header {
    align-items: flex-start;
    padding: 23px 0;
    gap: 18px;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px 15px;
  }

  .hero,
  .page-title {
    padding: 58px 0 42px;
  }

  .notes-grid { grid-template-columns: 1fr; }
  .gallery { column-count: 2; }

  .visual-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 260px 180px;
  }

  .notes-row,
  .archive-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .viewer {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .viewer-image { padding: 34px 14px 10px; }

  .viewer-meta {
    max-height: 34vh;
    padding: 20px;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.15);
  }
}

@media (max-width: 470px) {
  .gallery { column-count: 1; }

  .visual-strip {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 230px);
  }

  .visual-card:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .visual-card:nth-child(n+4) { display: none; }
}
