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

:root {
  --cream: #F6F2EC;
  --ink: #1C1A17;
  --ink-light: #6B6660;
  --ink-faint: #B0ADA8;
  --rule: #E0DBD4;
  --accent: #9B5E3E;
  --accent-light: #F2E9E4;
  --max: 700px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 242, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

nav ul {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  min-height: 52px;
}

nav ul li:first-child { margin-right: auto; }

nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-light);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.01em;
}

nav a:hover { color: var(--ink); background: var(--rule); }

nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

nav .contact-link {
  color: var(--accent);
  border: 1px solid rgba(155, 94, 62, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
}

nav .contact-link:hover { background: var(--accent-light); }

/* ── HERO ── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 1.5rem 64px;
  border-bottom: 1px solid var(--rule);
}

.hero-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-light);
  max-width: 600px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.hero-actions a {
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.hero-actions a:hover { text-decoration: underline; }

.hero-actions span {
  font-size: 14px;
  color: var(--ink-faint);
}

/* ── PAGE INTRO (projects landing) ── */
.page-intro {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.page-intro p {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.7;
}

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

.page-intro a:hover { text-decoration: underline; }

/* ── SECTIONS ── */
section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 1.5rem;
  border-bottom: 1px solid var(--rule);
}

section:last-of-type { border-bottom: none; }

.section-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.section-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

section h2 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
}

section > p {
  font-size: 15px;
  color: var(--ink-light);
  margin-bottom: 40px;
  max-width: 560px;
}

/* ── PROJECT CARDS ── */
.projects {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}

.project {
  background: var(--cream);
  padding: 22px 24px;
  cursor: default;
  transition: background 0.15s;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.project:hover { background: #F0EBE3; }

.project-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-top: 2px;
}

.project-body { flex: 1; min-width: 0; }

.project-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 4px;
}

.wip-chip {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(155, 94, 62, 0.35);
  background: var(--accent-light);
  line-height: 1.2;
}

.project h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}

.project .project-title-row h3 { margin-bottom: 0; }

.project p {
  font-size: 13.5px;
  color: var(--ink-light);
  line-height: 1.6;
}

.project p + p {
  margin-top: 0.75rem;
}

/* ── ABOUT ASIDE ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}

.about-item {
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: transparent;
  transition: background 0.15s;
}

.about-item:hover { background: #F0EBE3; }

.about-item h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.about-item p {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.55;
  margin: 0;
}

/* ── BLOG INDEX ── */
.blog-page-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 1.5rem 24px;
  border-bottom: 1px solid var(--rule);
}

.blog-page-head h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.blog-page-head p {
  font-size: 15px;
  color: var(--ink-light);
}

.post-list {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 64px;
  list-style: none;
}

.post-list li {
  border-bottom: 1px solid var(--rule);
}

.post-list a {
  display: block;
  padding: 22px 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 8px;
}

.post-list a:hover { background: rgba(224, 219, 212, 0.35); }

.post-list .post-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.post-list .post-meta {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ── BLOG POST ── */
article.post {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 1.5rem 72px;
}

article.post header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

article.post h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

article.post .byline {
  font-size: 14px;
  color: var(--ink-faint);
}

article.post .prose {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.75;
}

article.post .prose p { margin-bottom: 1.1em; }
article.post .prose p:last-child { margin-bottom: 0; }

article.post .prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.92em;
  background: rgba(224, 219, 212, 0.6);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

/* ── FOOTER ── */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 1.5rem 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer p {
  font-size: 13px;
  color: var(--ink-faint);
}

footer a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* ── READING LIST PAGE ── */
.page-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 1.5rem 48px;
  border-bottom: 1px solid var(--rule);
}

.page-head .label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.page-head h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--ink);
}

.page-head p {
  font-size: 16px;
  color: var(--ink-light);
  max-width: 560px;
  line-height: 1.75;
}

section.list-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 1.5rem;
  border-bottom: 1px solid var(--rule);
}

section.list-section:last-of-type { border-bottom: none; }

section.list-section .section-meta { margin-bottom: 24px; }

ul.books {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--rule);
}

li.book {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px;
  background: var(--cream);
  transition: background 0.15s;
}

li.book:hover { background: #F0EBE3; }

.book-spine {
  flex-shrink: 0;
  width: 6px;
  align-self: stretch;
  min-height: 48px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.55;
  margin-top: 2px;
}

li.book.recent .book-spine {
  background: var(--ink-faint);
  opacity: 0.45;
}

li.book.queue .book-spine {
  background: var(--accent);
  opacity: 0.35;
}

.book-body { flex: 1; min-width: 0; }

.book-body h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 2px;
}

.book-body .author {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.book-body .note {
  font-size: 13.5px;
  color: var(--ink-light);
  line-height: 1.55;
  margin: 0;
}

/* ── MOBILE ── */
@media (max-width: 560px) {
  .about-grid { grid-template-columns: 1fr; }
  nav ul { gap: 0; }
  nav a { padding: 6px 8px; }
  .hero { padding: 56px 1.25rem 48px; }
  section { padding: 48px 1.25rem; }
  .page-head { padding: 48px 1.25rem 40px; }
  section.list-section { padding: 40px 1.25rem; }
}
