:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #111111;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0d;
    --text: #f5f5f5;
    --muted: #9a9a9a;
    --border: #f5f5f5;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1.2em; }

.muted { color: var(--muted); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}

.brand {
  font-weight: 700;
}
.brand:hover { text-decoration: underline; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 0.92rem;
  padding: 0.2em 0.4em;
}
.nav-links a:hover { background: var(--text); color: var(--bg); }

/* Hero */
.hero { padding: 5rem 0 4rem; }

.prompt {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2em;
}
.prompt::before { content: "$ "; }

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  max-width: 22ch;
}

.lede {
  color: var(--muted);
  max-width: 56ch;
}

/* Sections */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section-num {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.4em;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
}

.col-img img {
  width: 120px;
  height: 116px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
  .col-img { order: -1; }
  .col-img img { width: 96px; height: 92px; }
}

/* Entry list (projects) */
.entry-list { margin-top: 1.5rem; }

.entry {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.entry:first-child { border-top: none; padding-top: 0; }

.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4em;
}

.entry-head h3 {
  margin: 0;
  font-size: 1.1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tag {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.entry p { color: var(--muted); margin-bottom: 0; transition: color 0.12s ease; }
.entry:hover p { color: var(--text); }

/* Poems */
.poem { padding: 2rem 0; border-top: 1px solid var(--border); }
.poem:first-child { border-top: none; padding-top: 0; }
.poem h3 { margin-bottom: 0.2em; }
.poem-date { font-size: 0.85rem; color: var(--muted); margin-bottom: 1em; }
.poem-text {
  font-family: var(--font-mono);
  white-space: pre-line;
  font-style: italic;
  line-height: 1.9;
  margin: 0;
}

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.photo-grid a { display: block; }
.photo-grid img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  transition: opacity 0.12s ease;
}
.photo-grid a:hover img { opacity: 0.75; }

.placeholder {
  color: var(--muted);
  font-style: italic;
  padding: 2rem 0;
  border: 1px dashed var(--border);
  text-align: center;
  margin-top: 1.5rem;
}

/* Contact */
.mail-link {
  font-weight: 700;
  display: inline-block;
  margin-top: 0.5em;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mail-link::before { content: "→ "; }
.mail-link:hover { background: var(--text); color: var(--bg); }

/* Footer */
.site-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
