/* 
 * ensha.com — Parker ink on Moleskine
 * Typography-first, minimal. No frameworks, no bloat.
 */

@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,500;1,7..72,400&family=IBM+Plex+Mono:ital,wght@0,400;0,500;1,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=Great+Vibes&family=Pinyon+Script&display=swap');

:root {
  --text: #213D8F;
  --text-muted: #6B7A99;
  --bg: #F7F0E3;
  --accent: #0E1F52;
  --border: #C5C8D4;
  --measure: 68ch;
  --body: 'Literata', Georgia, serif;
  --mono: 'IBM Plex Mono', 'Menlo', monospace;
  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
}

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--body);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: lowercase;
}

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

/* Typography */
h1 {
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 2.5rem 0 1rem;
}

h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 2rem 0 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}

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

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  color: var(--text-muted);
  font-style: italic;
}

ul, ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Portrait */
.portrait {
  float: right;
  width: 220px;
  margin: 0.25rem 0 1.25rem 2rem;
  border-radius: 4px;
  filter: grayscale(20%);
  shape-outside: margin-box;
}

/* Homepage intro */
.intro {
  font-size: 1rem;
  margin-bottom: 3rem;
  overflow: hidden; /* contain float */
}

.intro p:first-child {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}



/* Homepage tagline */
.homepage-tagline {
  font-family: var(--body);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Year headings on writings page */
.year-heading {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Writing items */
.writing-item {
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.writing-item a {
  text-decoration: none;
  display: block;
}

.writing-item a:hover .writing-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.writing-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.writing-title {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

.writing-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.writing-excerpt {
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.5;
}

/* Article lists (gists, fallback) */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  margin-bottom: 1.25rem;
}

.article-list a {
  text-decoration: none;
  display: block;
}

.article-list a:hover .article-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-title {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
}

.article-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.article-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Tags */
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  text-decoration: none;
  margin-left: 0.5rem;
}

.tag:hover {
  border-color: var(--text-muted);
}

/* Article page */
.article-page {
  margin-top: 0;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-header h1 {
  margin-bottom: 0.5rem;
}

.article-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-body {
  margin-top: 0;
}

/* Project cards */
.project-list {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.project {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.project:last-child {
  border-bottom: none;
}

.project h3 {
  margin-top: 0;
}

.project-status {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

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

footer a:hover {
  color: var(--text);
}

/* Readings page */
.readings-intro {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

.readings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.readings-nav a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

.readings-nav a::before {
  content: "→ ";
  color: var(--border);
}

.readings-nav a:hover {
  color: var(--text);
}

.readings-section {
  margin-bottom: 4rem;
}

.readings-section > h2 {
  margin-top: 0 !important;
  margin-bottom: 1.75rem !important;
  font-family: var(--sans) !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  text-transform: none !important;
  letter-spacing: -0.01em !important;
  padding-bottom: 0.6rem !important;
  border-bottom: 2px solid var(--accent) !important;
}

.reading-item {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.reading-item:last-child {
  border-bottom: none;
}

.reading-header {
  margin-bottom: 0.5rem;
}

.reading-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.3rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}

a.reading-title:hover {
  text-decoration-color: var(--text);
}

.reading-meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.reading-commentary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0;
  margin-top: 0;
}

/* Signature */
p.signature {
  font-family: 'Pinyon Script', cursive !important;
  font-size: 2rem;
  color: var(--text);
  text-align: right;
  margin-top: 2rem;
  margin-bottom: 0;
  letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 15px;
  }
  
  .nav {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  body {
    padding: 1.5rem 1rem;
  }

  .article-list a {
    flex-direction: column;
    gap: 0.25rem;
  }

  .portrait {
    float: none;
    display: block;
    width: 140px;
    margin: 0 auto 1.5rem;
  }
}
