:root {
  --bg: #16130f;
  --bg-alt: #1e1a15;
  --card: #241f19;
  --line: #3a3229;
  --text: #ece3d3;
  --muted: #b3a690;
  --amber: #ffb547;
  --amber-dim: #c98a2e;
  --mono: 'VT323', ui-monospace, monospace;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
}
a { color: var(--amber); }
a:hover { color: #ffd08a; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(22, 19, 15, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.wordmark { font-family: var(--mono); font-size: 32px; letter-spacing: 2px; color: var(--amber); text-decoration: none; text-shadow: 0 0 8px rgba(255, 181, 71, 0.35); }
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { font-family: var(--sans); font-size: 15px; color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--amber); }

.cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.prompt {
  font-family: var(--mono);
  font-size: 24px;
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 181, 71, 0.3);
  margin: 0 0 12px;
}

/* Hero */
.hero {
  padding: 110px 0 100px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 30% 20%, #2a2219 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.12;
  margin: 0 0 24px;
  max-width: 14ch;
}
.lede { font-size: 21px; color: var(--muted); max-width: 40em; margin: 0 0 36px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  padding: 13px 24px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--amber);
}
.btn-primary { background: var(--amber); color: #1a140c; }
.btn-primary:hover { background: #ffc66e; color: #1a140c; }
.btn-ghost { background: transparent; color: var(--amber); }
.btn-ghost:hover { background: rgba(255, 181, 71, 0.1); }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-family: var(--mono); font-weight: 400; font-size: 42px; color: var(--amber); margin: 0 0 12px; letter-spacing: 1px; }
h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 10px; }
.section-intro { font-size: 20px; color: var(--muted); font-style: italic; margin: 0 0 40px; max-width: 40em; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--amber-dim); padding: 28px; border-radius: 4px; }
.card p { margin: 0; color: var(--muted); font-size: 17px; }

.prompts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 32px; }
.prompts li { padding-left: 28px; position: relative; }
.prompts li::before { content: '>'; position: absolute; left: 0; font-family: var(--mono); font-size: 24px; color: var(--amber); line-height: 1.3; }

.empty-state { border: 1px dashed var(--line); border-radius: 4px; padding: 48px 32px; text-align: center; background: var(--card); }
.empty-state p { color: var(--muted); max-width: 32em; margin: 0 auto 24px; }
.empty-state .prompt { margin-bottom: 16px; }

/* Form */
.story-form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.story-form label { display: grid; gap: 6px; font-family: var(--sans); font-size: 15px; font-weight: 600; }
.hint { font-weight: 400; color: var(--muted); }
.story-form input[type=text], .story-form input[type=email], .story-form textarea {
  width: 100%;
  font: 400 17px/1.5 var(--serif);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 13px;
}
.story-form input:focus, .story-form textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.story-form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.story-form .check input { margin-top: 5px; accent-color: var(--amber); width: 18px; height: 18px; flex: none; }
.story-form button { justify-self: start; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; text-align: center; }
.site-footer .small { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: 0; }

/* Message page */
.message-page { min-height: 70vh; display: flex; align-items: center; }
.message-page h1 { font-family: var(--serif); font-size: clamp(32px, 5vw, 48px); margin: 0 0 16px; }
.message-page p { color: var(--muted); font-size: 20px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 70px 0 64px; }
  .section { padding: 64px 0; }
  nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* Images */
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-art { width: 100%; height: auto; max-width: 440px; justify-self: end; filter: drop-shadow(0 0 40px rgba(255, 181, 71, 0.12)); }
.card-icon { display: block; width: 56px; height: 56px; margin-bottom: 18px; }
.empty-art { width: 88px; height: 88px; margin-bottom: 18px; opacity: 0.9; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { justify-self: center; max-width: 340px; }
}

/* Stories */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.story-card { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--amber-dim); border-radius: 4px; padding: 26px 28px; display: flex; flex-direction: column; }
.story-card h3 { margin: 0 0 6px; }
.story-card h3 a { color: var(--text); text-decoration: none; }
.story-card h3 a:hover { color: var(--amber); }
.story-by { font-family: var(--mono); font-size: 20px; color: var(--amber); margin: 0 0 6px; }
.story-meta { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.story-excerpt { color: var(--muted); font-size: 17px; margin: 0 0 16px; flex: 1; }
.read-more { font-family: var(--sans); font-weight: 600; font-size: 15px; text-decoration: none; }
.more-stories { margin-top: 32px; text-align: center; }

.story-page { padding: 72px 0 88px; }
.story-page .prompt a { color: var(--amber); text-decoration: none; }
.story-page h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.15; margin: 8px 0 14px; }
.story-byline { font-family: var(--sans); font-size: 16px; color: var(--muted); margin: 0 0 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.story-byline strong { color: var(--amber); font-weight: 600; }
.story-body p { font-size: 20px; line-height: 1.8; margin: 0 0 1.3em; }
.story-end { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); }

/* Personal page */
.profile { padding: 96px 0 80px; border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 30% 20%, #2a2219 0%, var(--bg) 70%); }
.profile-grid { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; }
.avatar { width: 220px; height: 220px; filter: drop-shadow(0 0 30px rgba(255,181,71,0.15)); }
.profile h1 { font-family: var(--mono); font-weight: 400; font-size: clamp(48px, 7vw, 76px); color: var(--amber); line-height: 1; margin: 0 0 14px; text-shadow: 0 0 10px rgba(255,181,71,0.3); }
.status { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 15px; color: var(--muted); margin: 0 0 18px; }
.status::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #7fd16b; box-shadow: 0 0 8px #7fd16b; }
.now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.now-card { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 4px; padding: 24px 26px; }
.now-card .tag { font-family: var(--mono); font-size: 20px; color: var(--amber); margin: 0 0 4px; }
.now-card h3 { margin: 0 0 8px; }
.now-card p { margin: 0; color: var(--muted); font-size: 17px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 34px; }
.timeline li::before { content: ''; position: absolute; left: -36px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--amber); }
.timeline .era { font-family: var(--mono); font-size: 22px; color: var(--amber); margin: 0; }
.timeline h3 { margin: 2px 0 6px; }
.timeline p { margin: 0; color: var(--muted); }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.link-tile { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); text-decoration: none; color: var(--text); font-family: var(--sans); font-weight: 600; }
.link-tile img { width: 36px; height: 36px; }
.link-tile small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
a.link-tile:hover { border-color: var(--amber); }
.link-tile.soon { opacity: 0.55; }
@media (max-width: 700px) {
  .profile-grid { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .avatar { margin: 0 auto; width: 170px; height: 170px; }
  .status { justify-content: center; }
}
