/* felixurbat.de — Minimal Personal Homepage */

:root {
  --bg: #fafaf8;
  --bg-alt: #f0efe8;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --accent: #8b4513;
  --accent-hover: #a0522d;
  --border: #e0ddd4;
  --max-width: 720px;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --bg-alt: #242420;
    --text: #e0ddd4;
    --text-muted: #999;
    --accent: #c9956b;
    --accent-hover: #daa87c;
    --border: #3a3a36;
  }
}

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

html {
  font-size: 18px;
  line-height: 1.7;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header & Navigation */
header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

nav {
  margin-top: 0.75rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* Main Content */
main {
  min-height: 60vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

main > h1:first-child,
main > h2:first-child {
  margin-top: 0;
}

h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

p {
  margin-bottom: 1rem;
}

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

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

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

/* Book Card */
.book-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.book-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.book-meta {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.book-meta span {
  display: inline-block;
  margin-right: 1rem;
}

.book-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  text-decoration: none;
  color: var(--accent);
}

.book-link:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Project Card (reuses book-card style) */
.project-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.project-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

/* Book Accordion */
.book-accordion {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 1rem 0;
  overflow: hidden;
}

.book-accordion summary {
  cursor: pointer;
  padding: 1rem 1.5rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.book-accordion summary::-webkit-details-marker {
  display: none;
}

.book-accordion summary::before {
  content: '▸';
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.book-accordion[open] summary::before {
  transform: rotate(90deg);
}

.book-accordion summary h3 {
  margin: 0;
  font-size: 1.1rem;
  display: inline;
}

.book-meta-inline {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.book-accordion summary:hover {
  background: var(--border);
}

.book-accordion-body {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* Post List */
.post-list {
  list-style: none;
}

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

.post-list li:last-child {
  border-bottom: none;
}

.post-list .date {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.post-list a {
  font-size: 1.05rem;
  text-decoration: none;
  font-weight: 500;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Utility */
.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Reader Comments (collapsible) */
.reader-comment {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 1rem 0;
  overflow: hidden;
}

.reader-comment summary {
  cursor: pointer;
  padding: 1rem 1.5rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.reader-comment summary::-webkit-details-marker {
  display: none;
}

.reader-comment summary::before {
  content: '▸';
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.reader-comment[open] summary::before {
  transform: rotate(90deg);
}

.reader-comment summary:hover {
  background: var(--border);
}

.reader-comment > :not(summary) {
  padding: 0 1.5rem;
}

.reader-comment > :last-child {
  padding-bottom: 1.5rem;
}

.reader-comment[open] > :nth-child(2) {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.comment-date {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
}
