@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Spectral:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {
  --bg: #0c1321;
  --text: #e8e4de;
  --text-muted: #6b7080;
  --accent: #c2a24d;
  --accent-hover: #d4b65e;
  --display: 'DM Serif Display', Georgia, serif;
  --body: 'Spectral', Georgia, serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  animation: fadeIn 0.9s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* Homepage layout */
.home-above {
  max-width: 780px;
  margin: 0 auto;
  padding: 120px 40px 0;
}

/* Painting */
.painting {
  margin-bottom: 56px;
  line-height: 0;
}

.painting img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  border-radius: 2px;
  mask-image: linear-gradient(to bottom,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
}

/* Headings — Cormorant Garamond display serif */
h1 {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
  color: rgba(232, 228, 222, 0.85);
}

h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: rgba(232, 228, 222, 0.85);
}

h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  margin-top: 36px;
  margin-bottom: 12px;
}

/* Body text */
p {
  margin-bottom: 16px;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* Bio */
.bio {
  line-height: 1.8;
}

.bio p {
  margin-bottom: 16px;
}

/* Writings section */
.writings {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.writings-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 32px;
}

.writings-header h2 {
  margin: 0;
}

.writings-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin-left: 20px;
}

.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 24px;
}

.post-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
}

.post-list .post-title {
  font-family: var(--body);
  font-size: 18px;
  color: var(--text);
  transition: color 0.2s;
}

.post-list a:hover .post-title {
  color: var(--accent);
}

.post-list .post-date {
  font-family: var(--body);
  font-size: 15px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-list .post-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.08);
  min-width: 20px;
  position: relative;
  top: -4px;
}

/* Top navigation (post page) */
nav.top-nav {
  font-family: var(--body);
  font-size: 15px;
  margin-bottom: 48px;
}

nav.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

nav.top-nav a:hover {
  color: var(--accent);
}

nav .sep {
  color: var(--text-muted);
  margin: 0 8px;
  opacity: 0.3;
}

/* Article (rendered markdown) */
.article-header {
  margin-bottom: 40px;
}

.article-header h1 {
  margin-bottom: 10px;
}

.article-date {
  font-family: var(--body);
  font-size: 15px;
  color: var(--text-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-body {
  line-height: 1.15;
}

.article-body p {
  margin-bottom: 24px;
}

.article-body h2 {
  font-size: 24px;
  margin-top: 44px;
  margin-bottom: 16px;
}

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 28px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-body code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 3px;
}

.article-body pre {
  background: rgba(255, 255, 255, 0.04);
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 28px 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: 15px;
  line-height: 1.6;
}

.article-body ul,
.article-body ol {
  margin: 20px 0;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 28px 0;
}

.article-body hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 40px 0;
}

/* Empty state */
.empty {
  color: var(--text-muted);
  font-size: 16px;
}

/* Responsive — tablet */
@media (max-width: 768px) {
  .home-above {
    max-width: 100%;
    padding: 80px 28px 0;
  }

  .writings {
    max-width: 100%;
    padding: 0 28px 60px;
  }

  .container {
    max-width: 100%;
    padding: 48px 28px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }
}

/* Responsive — mobile */
@media (max-width: 480px) {
  body {
    font-size: 17px;
  }

  .home-above {
    padding: 60px 20px 0;
  }

  .writings {
    padding: 0 20px 48px;
  }

  .container {
    padding: 40px 20px;
  }

  h1 {
    font-size: 26px;
    margin-bottom: 18px;
  }

  h2 {
    font-size: 22px;
  }

  .bio {
    line-height: 1.7;
  }

  .writings-header {
    margin-bottom: 24px;
  }

  .post-list .post-dots {
    display: none;
  }

  .post-list a {
    flex-direction: column;
    gap: 2px;
  }

  .post-list li {
    margin-bottom: 20px;
  }

  .article-body {
    line-height: 1.15;
  }

  .article-body pre {
    padding: 14px;
    font-size: 14px;
  }
}
