@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lora:ital,wght@0,400;0,500;1,400;1,500&display=swap');

/* ─────────────────────────────────────────
   Tokens
───────────────────────────────────────── */
:root {
  --bg:          #f5ebe0;
  --bg-card:     #ede0d4;
  --bg-hover:    #e4d3c3;
  --text:        #3d2b1f;
  --text-muted:  #8b7355;
  --accent:      #b5451b;
  --accent-lite: #cc5a2e;
  --border:      #d4c4b0;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body:  'Lora', Georgia, serif;
}

/* ─────────────────────────────────────────
   Reset & base
───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.78;
  min-height: 100vh;
}

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─────────────────────────────────────────
   Navigation
───────────────────────────────────────── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

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

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.87rem;
  letter-spacing: 0.04em;
  font-style: italic;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* ─────────────────────────────────────────
   Main
───────────────────────────────────────── */
main { padding: 3.5rem 0 5rem; }

/* ─────────────────────────────────────────
   Typography
───────────────────────────────────────── */
h1 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}

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

ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.3rem; }

strong { font-weight: 500; }

.muted {
  color: var(--text-muted);
  font-style: italic;
}

/* ─────────────────────────────────────────
   Divider
───────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.75rem 0;
}

/* ─────────────────────────────────────────
   Section
───────────────────────────────────────── */
.section { margin-bottom: 2.5rem; }

/* ─────────────────────────────────────────
   Home — intro
───────────────────────────────────────── */
.intro { margin-bottom: 2.75rem; }

.intro h1 {
  font-style: normal;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.bio { font-size: 1.05rem; line-height: 1.82; }
.bio p { margin-bottom: 1.1rem; }

/* ─────────────────────────────────────────
   Home — "now" cards
───────────────────────────────────────── */
.now-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}

.now-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.95rem 1.15rem;
  transition: border-color 0.2s;
}

.now-card:hover { border-color: var(--accent); }

.now-label {
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-style: normal;
}

.now-value {
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.45;
}

/* ─────────────────────────────────────────
   Social links
───────────────────────────────────────── */
.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.87rem;
  font-style: italic;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─────────────────────────────────────────
   Interest list
───────────────────────────────────────── */
.interest-list {
  list-style: none;
  padding: 0;
}

.interest-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.interest-list li:first-child {
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────
   Blog listing
───────────────────────────────────────── */
.blog-intro {
  margin-bottom: 2.5rem;
}

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

.post-item {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

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

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

.post-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
  margin-bottom: 0.2rem;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.45rem;
}

.post-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.62;
}

/* ─────────────────────────────────────────
   Blog post page
───────────────────────────────────────── */
.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.87rem;
  color: var(--text-muted);
  text-decoration: none;
  font-style: italic;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

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

.post-header h1 { margin-bottom: 0.45rem; }

.post-date {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-style: italic;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.87;
}

.post-content p { margin-bottom: 1.5rem; }

.post-content h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.8rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
}

.post-content li { margin-bottom: 0.45rem; }

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.1rem 0 0.1rem 1.3rem;
  margin: 1.75rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-content blockquote p { margin-bottom: 0; }

/* ─────────────────────────────────────────
   Projects
───────────────────────────────────────── */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.1rem;
  transition: border-color 0.2s;
}

.project-card:hover { border-color: var(--accent); }

.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(181, 69, 27, 0.1);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.65rem;
  font-style: normal;
}

.project-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.67;
  margin-top: 0.45rem;
  margin-bottom: 0;
}

.project-links {
  margin-top: 0.9rem;
  display: flex;
  gap: 1.1rem;
}

.project-links a {
  font-size: 0.83rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  font-style: italic;
  transition: color 0.2s;
}

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

/* Clickable project card wrapper */
.project-card-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
}

.project-card-link h3,
.project-card-link p,
.project-card-link span {
  text-decoration: none !important;
}

.project-card-link:hover .project-card {
  border-color: var(--accent);
}

.project-card-link:hover h3 {
  color: var(--accent);
}

.project-card-link .project-links span {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-style: italic;
  transition: color 0.2s;
}

.project-card-link:hover .project-links span {
  color: var(--accent);
}

/* ─────────────────────────────────────────
   Publications
───────────────────────────────────────── */
.pub-entry {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-entry:first-of-type {
  border-top: 1px solid var(--border);
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.pub-title a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.pub-title a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pub-authors {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pub-links {
  display: flex;
  gap: 1rem;
  font-size: 0.83rem;
}

.pub-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-style: italic;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s;
}

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

/* ─────────────────────────────────────────
   Reading / bookshelf
───────────────────────────────────────── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 1.1rem 1.2rem;
  transition: border-color 0.2s;
}

.book-card:hover { border-color: var(--accent); }

.book-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.book-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.45rem;
}

.book-status {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-style: normal;
}

/* Clickable book card wrapper */
.book-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.book-card-link:hover .book-card,
.book-card-link:hover .currently-reading {
  border-color: var(--accent);
}

.book-card-link:hover .book-title {
  color: var(--accent);
}

.book-note {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.5;
}

.currently-reading {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}

footer p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }

  nav .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .nav-links { gap: 1.2rem; }

  .now-grid { grid-template-columns: 1fr; }

  .book-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .book-grid { grid-template-columns: 1fr; }
}
