:root {
  --paper: #f7f5ef;
  --ink: #1e2821;
  --muted: #68716b;
  --line: #d8d8d0;
  --accent: #d65d37;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 16px;
  line-height: 1.75;
}

.site-header, main, footer { max-width: 1120px; margin: auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 32px;
  font-family: "DM Mono", monospace;
  font-size: .72rem;
  letter-spacing: .06em;
}
.brand { color: var(--ink); font-weight: 500; text-decoration: none; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 24px; }
nav a, footer a { color: var(--muted); text-decoration: none; }
nav a:hover, footer a:hover, .text-link:hover { color: var(--accent); }
.nav-button, .publish-button { background: transparent; border: 0; color: var(--muted); cursor: pointer; font: inherit; letter-spacing: inherit; padding: 0; }
.nav-button:hover, .publish-button:hover { color: var(--accent); }
.nav-publish { color: var(--accent); font-weight: 500; }

.hero { padding: 125px 32px 145px; max-width: 790px; }
.eyebrow, .post-meta {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: .7rem;
  letter-spacing: .1em;
}
.hero h1, h2, h3 { font-weight: 600; letter-spacing: -.04em; }
.hero h1 { font-size: clamp(3rem, 8vw, 6.2rem); line-height: 1.17; margin: 14px 0 28px; }
.intro { color: var(--muted); font-size: 1.12rem; max-width: 520px; }
.text-link { color: var(--ink); display: inline-block; font-family: "DM Mono", monospace; font-size: .78rem; letter-spacing: .04em; margin-top: 20px; text-decoration: none; }
.text-link span { color: var(--accent); font-size: 1.15rem; margin-left: 4px; }

.articles { border-top: 1px solid var(--line); padding: 72px 32px 110px; }
.section-heading { display: flex; align-items: baseline; gap: 22px; margin-bottom: 32px; }
h2 { font-size: 2rem; margin: 0; }
.post-list { border-top: 1px solid var(--line); }
.post { border-bottom: 1px solid var(--line); min-height: 164px; padding: 27px 65px 25px 0; position: relative; transition: padding-left .25s ease; }
.post > a { inset: 0; position: absolute; z-index: 1; }
.post:hover { padding-left: 12px; }
.post-meta { display: flex; gap: 14px; }
.post-meta span::before { content: "·"; margin-right: 14px; }
.post h3 { font-size: 1.45rem; margin: 5px 0 2px; }
.post p { color: var(--muted); margin: 0; }
.post-content { white-space: pre-wrap; }
.post-image { display: block; margin: 18px 0; max-height: 520px; max-width: 100%; object-fit: cover; }
.arrow { color: var(--accent); font-size: 1.8rem; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.publish-button { color: var(--ink); font-family: "DM Mono", monospace; font-size: .75rem; margin-left: auto; }
.hidden { display: none; }
.empty-state { color: var(--muted); font-size: .95rem; padding: 30px 0; }

.about { background: var(--ink); color: var(--paper); display: grid; gap: 28px; grid-template-columns: 1fr 2fr; margin-bottom: 0; padding: 76px 32px; }
.about .eyebrow { color: #aeb7ae; margin: 8px 0; }
.about h2 { font-size: 2.3rem; }
.about p:not(.eyebrow) { color: #d2d7d1; max-width: 520px; }
.about .text-link { color: var(--paper); }

footer { display: flex; justify-content: space-between; color: var(--muted); font-family: "DM Mono", monospace; font-size: .68rem; letter-spacing: .04em; padding: 29px 32px; }
footer p { margin: 0; }

dialog { background: transparent; border: 0; padding: 20px; width: min(100%, 560px); }
dialog::backdrop { background: rgba(20, 28, 23, .55); backdrop-filter: blur(3px); }
.dialog-card { background: var(--paper); box-shadow: 0 18px 60px rgba(0, 0, 0, .2); padding: 38px; position: relative; }
.dialog-card h2 { font-size: 1.9rem; margin: 5px 0 24px; }
.dialog-card label { display: block; font-size: .9rem; margin-top: 16px; }
.dialog-card input, .dialog-card textarea { background: #fffefa; border: 1px solid var(--line); color: var(--ink); display: block; font: inherit; margin-top: 5px; padding: 10px 12px; resize: vertical; width: 100%; }
.dialog-card input:focus, .dialog-card textarea:focus { border-color: var(--accent); outline: 1px solid var(--accent); }
.close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.8rem; line-height: 1; position: absolute; right: 16px; top: 13px; }
.submit-button { background: var(--ink); border: 0; color: var(--paper); cursor: pointer; font: .75rem "DM Mono", monospace; letter-spacing: .06em; margin-top: 18px; padding: 13px 20px; }
.submit-button:hover { background: var(--accent); }
.form-message { color: #a23a28; font-size: .85rem; margin: 10px 0 0; min-height: 1.5em; }

@media (max-width: 640px) {
  .site-header { padding: 22px 20px; }
  nav { gap: 14px; }
  .hero { padding: 82px 20px 100px; }
  .articles { padding: 52px 20px 75px; }
  .section-heading { display: block; }
  .section-heading h2 { margin-top: 5px; }
  .publish-button { margin-top: 18px; }
  .post { padding-right: 40px; }
  .post h3 { font-size: 1.25rem; }
  .about { display: block; padding: 56px 20px; }
  .about h2 { margin-top: 24px; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 25px 20px; }
  .dialog-card { padding: 30px 22px; }
}

/* Cyber terminal theme */
:root { --paper: #061017; --ink: #e8fffa; --muted: #91a9b0; --line: #1b4150; --accent: #35f2dc; --violet: #a778ff; }
body { background: radial-gradient(circle at 78% 12%, rgba(72, 30, 124, .24), transparent 30rem), radial-gradient(circle at 8% 70%, rgba(0, 167, 173, .13), transparent 32rem), var(--paper); color: var(--ink); font-family: "DM Mono", "Noto Serif SC", monospace; overflow-x: hidden; }
body::before { background-image: linear-gradient(rgba(53, 242, 220, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(53, 242, 220, .055) 1px, transparent 1px); background-size: 34px 34px; content: ""; inset: 0; mask-image: linear-gradient(to bottom, black, transparent 85%); pointer-events: none; position: fixed; z-index: -1; }
body::after { background: linear-gradient(90deg, transparent, rgba(53, 242, 220, .025), transparent); content: ""; height: 100%; left: -30%; pointer-events: none; position: fixed; top: 0; transform: skewX(-18deg); width: 24%; animation: sweep 9s linear infinite; z-index: -1; }
@keyframes sweep { to { left: 125%; } }
.site-header { border-bottom: 1px solid var(--line); max-width: none; padding-left: max(32px, calc((100vw - 1120px) / 2 + 32px)); padding-right: max(32px, calc((100vw - 1120px) / 2 + 32px)); }
.brand { color: var(--accent); letter-spacing: .12em; text-shadow: 0 0 14px rgba(53, 242, 220, .55); }
.brand span { color: var(--violet); }
nav a, footer a, .nav-button { color: #b7cbd0; }
nav a:hover, footer a:hover, .text-link:hover, .nav-button:hover { color: var(--accent); text-shadow: 0 0 10px rgba(53, 242, 220, .65); }
.nav-publish { border: 1px solid var(--accent); box-shadow: 0 0 13px rgba(53, 242, 220, .16), inset 0 0 11px rgba(53, 242, 220, .06); color: var(--accent); padding: 7px 10px; }
.hero { max-width: 900px; padding-bottom: 125px; position: relative; }
.hero::after { color: var(--accent); content: "SYSTEM ONLINE // 2026"; font-size: .62rem; letter-spacing: .13em; position: absolute; right: 40px; top: 150px; writing-mode: vertical-rl; }
.eyebrow, .post-meta { color: var(--accent); text-shadow: 0 0 8px rgba(53, 242, 220, .35); }
.hero h1, h2, h3 { font-family: "Noto Serif SC", serif; }
.hero h1 { color: #ecfffd; text-shadow: 3px 0 0 rgba(53, 242, 220, .2), -2px 0 0 rgba(167, 120, 255, .2); }
.intro { color: #b5ccd0; }
.text-link { border-bottom: 1px solid var(--accent); color: var(--accent); padding-bottom: 5px; }
.text-link span { color: var(--violet); }
.articles { border-top-color: var(--line); }
.section-heading { border-left: 3px solid var(--accent); padding-left: 16px; }
.post-list { border-top-color: var(--line); }
.post { background: rgba(7, 27, 35, .34); border-bottom-color: var(--line); padding-left: 22px; }
.post::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); content: ""; height: 7px; left: 0; position: absolute; top: 39px; width: 7px; }
.post:hover { background: rgba(19, 61, 71, .38); box-shadow: inset 2px 0 var(--violet); padding-left: 30px; }
.post h3 { color: #f0fffd; }
.post p { color: #a9bec2; }
.post-meta span::before { color: var(--violet); }
.arrow { color: var(--accent); text-shadow: 0 0 14px rgba(53, 242, 220, .6); }
.post-image { border: 1px solid #23616a; box-shadow: 8px 8px 0 rgba(53, 242, 220, .09); }
.delete-post { background: transparent; border: 1px solid #9c4861; color: #ff9ab1; cursor: pointer; font: .68rem "DM Mono", monospace; letter-spacing: .05em; margin-top: 16px; padding: 6px 8px; }
.delete-post:hover { background: #5b2638; }
.post-controls { display: flex; gap: 8px; margin-top: 16px; }
.edit-post { background: transparent; border: 1px solid #247a85; color: var(--accent); cursor: pointer; font: .68rem "DM Mono", monospace; letter-spacing: .05em; padding: 6px 8px; }
.edit-post:hover { background: #103e47; }
.about { background: linear-gradient(125deg, #0b2631, #100e2b); border: 1px solid #265b68; box-shadow: 0 0 40px rgba(53, 242, 220, .08); }
.about h2, .about .text-link { color: #eaffff; }
.about p:not(.eyebrow) { color: #b6cdd1; }
footer { border-top: 1px solid var(--line); max-width: none; padding-left: max(32px, calc((100vw - 1120px) / 2 + 32px)); padding-right: max(32px, calc((100vw - 1120px) / 2 + 32px)); }
.dialog-card { background: #081a22; border: 1px solid #2a7080; box-shadow: 0 0 0 1px rgba(53, 242, 220, .14), 0 20px 80px rgba(0, 0, 0, .65), inset 0 0 45px rgba(20, 103, 118, .13); }
.dialog-card h2 { color: #eaffff; }
.dialog-card label { color: #b8d2d5; }
.dialog-card input, .dialog-card textarea { background: #041016; border-color: #225362; color: #eaffff; }
.dialog-card input:focus, .dialog-card textarea:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(53, 242, 220, .25); }
.close { color: var(--accent); }
.submit-button { background: linear-gradient(90deg, #167d7a, #2458a3); box-shadow: 0 0 15px rgba(53, 242, 220, .2); color: #f4ffff; }
.submit-button:hover { background: linear-gradient(90deg, #18aaa0, #7e58ca); }
.empty-state { color: #a8c1c5; }
@media (max-width: 640px) { .hero::after { display: none; } .site-header, footer { padding-left: 20px; padding-right: 20px; } nav { align-items: center; flex-wrap: wrap; justify-content: flex-end; } }
