/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #09090e;
  --surface:  #111118;
  --border:   #1e1e2a;
  --text:     #c4c4d0;
  --muted:    #5a5a70;
  --accent:   #c8a84b;
  --accent2:  #7eb8d4;
  --danger:   #c85050;

  --serif:    Georgia, 'Times New Roman', serif;
  --mono:     'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --max-w:    720px;
  --gap:      2rem;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== LAYOUT ===== */
header, main, footer {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1; padding-top: 3rem; padding-bottom: 4rem; }

/* ===== NAV ===== */
header { padding-top: 1.5rem; padding-bottom: 1.5rem; }

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

.home-link {
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.home-link:hover { opacity: 0.75; }
.home-link sup { font-size: 0.75em; }

.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ===== FOOTER ===== */
footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { line-height: 1.25; font-weight: normal; }

h1 { font-size: 2rem; color: #e0e0ec; margin-bottom: 1rem; }
h2 { font-size: 1.25rem; color: #ccc; margin-bottom: 0.5rem; }
h3 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

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

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

.mono {
  font-family: var(--mono);
  color: var(--accent2);
  font-size: 0.95em;
}
.mono sup { font-size: 0.75em; }

.accent { color: var(--accent); }

em { font-style: italic; color: #ddd; }

/* ===== HOMEPAGE ===== */
.hypothesis {
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.overline {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hypothesis h1 {
  font-size: 2.4rem;
  color: #ebebf5;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.subhypothesis {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.latest { }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.see-all {
  font-size: 0.85rem;
  color: var(--muted);
}
.see-all:hover { color: var(--accent); text-decoration: none; }

/* ===== ENTRIES ===== */
.entry-preview {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.entry-preview:last-child { border-bottom: none; }

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.entry-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.1em 0.5em;
  border-radius: 2px;
  opacity: 0.7;
}

.iteration {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.entry-preview h2 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.entry-preview h2 a { color: #d0d0e0; }
.entry-preview h2 a:hover { color: var(--accent); text-decoration: none; }

.entry-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

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

/* ===== ENTRY FULL ===== */
.entry-full { }

.entry-full h1 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  color: #e8e8f2;
}

.entry-body {
  margin-bottom: 2.5rem;
}

.entry-body h1,
.entry-body h2,
.entry-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.entry-body h2 { font-size: 1.15rem; color: #ccc; }
.entry-body h3 { font-size: 0.9rem; }

.entry-body p { margin-bottom: 1.1rem; }

.entry-body ul, .entry-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}
.entry-body li { margin-bottom: 0.3rem; }

.entry-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--accent2);
  background: var(--surface);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.entry-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.entry-body pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
}

.entry-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.1rem;
}

.entry-body strong { color: #ddd; font-weight: bold; }

.open-questions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}
.open-questions h4 {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.open-questions ul { padding-left: 1.25rem; }
.open-questions li { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.25rem; }

.entry-nav { margin-top: 2.5rem; }
.entry-nav a { font-size: 0.9rem; color: var(--muted); }
.entry-nav a:hover { color: var(--text); text-decoration: none; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ===== ABOUT ===== */
.about section {
  margin-bottom: 2.5rem;
}
.about h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.about p { font-size: 0.95rem; color: var(--text); }
.about .tag { margin-right: 0.4rem; }

/* ===== ENTRY LIST ===== */
.entry-list { }

/* ===== QUESTION FORM ===== */
.question-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 2.5rem;
}

.qform-body textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
}
.qform-body textarea::placeholder { color: var(--muted); }

.qform-photo-preview {
  margin-top: 0.75rem;
  position: relative;
  display: inline-block;
}
.qform-photo-preview img {
  max-height: 160px;
  max-width: 100%;
  border-radius: 4px;
  display: block;
}
.qform-photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.qform-contact {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.qform-contact input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.85rem;
  padding: 0.25rem 0;
}
.qform-contact input::placeholder { color: var(--muted); opacity: 0.6; }
.qform-contact input:focus { border-color: var(--accent); color: var(--text); }

.qform-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.qform-photo-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.qform-photo-btn:hover { color: var(--accent); }
.qform-photo-btn input { display: none; }

.qform-submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.5em 1.25em;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: var(--serif);
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.15s;
}
.qform-submit:hover { opacity: 0.85; }

/* ===== QUESTION CARDS ===== */
.questions-list { display: flex; flex-direction: column; gap: 1.5rem; }

.question-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.q-meta { margin-bottom: 0.5rem; }
.q-date { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

.q-nick {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-left: 0.75rem;
}

.q-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.q-photo { margin-bottom: 1rem; }
.q-photo img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 4px;
  display: block;
}

.q-response {
  background: var(--bg);
  border-left: 2px solid var(--accent);
  padding: 0.85rem 1rem;
  border-radius: 0 4px 4px 0;
  margin-top: 0.75rem;
}
.q-response-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.q-response-body { font-size: 0.95rem; line-height: 1.65; }
.q-response-body p { margin-bottom: 0.6rem; }
.q-response-body p:last-child { margin-bottom: 0; }

.q-pending {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hypothesis h1 { font-size: 1.8rem; }
  h1 { font-size: 1.6rem; }
}
