/* lights left on — house styles.
   Deliberately boring: no framework, no build step, no webfonts, no images.
   In twenty years this file should still open and the house should still stand. */

:root {
  --bg: #0c0e13;
  --bg-raise: #11141d;
  --ink: #e7e2d4;
  --ink-dim: #a89f8a;
  --amber: #e8b04b;
  --amber-bright: #f6c76a;
  --hairline: rgba(232, 176, 75, 0.22);
  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.75;
}

/* a few faint decorative stars in the night above the house */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(231, 226, 212, 0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 8%, rgba(231, 226, 212, 0.4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 26%, rgba(232, 176, 75, 0.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 6%, rgba(231, 226, 212, 0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 15%, rgba(231, 226, 212, 0.3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 5% 55%, rgba(231, 226, 212, 0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 96% 64%, rgba(231, 226, 212, 0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 82%, rgba(232, 176, 75, 0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 91%, rgba(231, 226, 212, 0.3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 96%, rgba(231, 226, 212, 0.25) 50%, transparent 51%);
  animation: twinkle 11s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

header.site,
main,
footer.site {
  max-width: 40rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 2.25rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.lamp {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow:
    0 0 6px 1px rgba(232, 176, 75, 0.8),
    0 0 18px 5px rgba(232, 176, 75, 0.3);
  animation: breathe 4.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

header.site nav a {
  color: var(--ink-dim);
  text-decoration: none;
}

header.site nav a:hover {
  color: var(--amber-bright);
}

header.site nav a[aria-current="page"] {
  color: var(--amber);
}

main {
  padding-top: 3.25rem;
  padding-bottom: 2rem;
}

h1 {
  font-size: 1.9rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 0 0 1.5rem;
}

.open {
  font-size: 1.4rem;
  line-height: 1.55;
  margin-top: 0;
}

p {
  margin: 0 0 1.25rem;
}

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

a:hover {
  color: var(--amber-bright);
}

.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: normal;
  letter-spacing: 0.18em;
  color: var(--amber);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.45rem;
  margin: 3rem 0 1.5rem;
}

.rooms {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rooms li {
  margin: 0 0 1rem;
}

.rooms a {
  color: var(--ink);
  text-decoration: none;
}

.rooms a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rooms .room {
  font-family: var(--mono);
  font-size: 0.95em;
  color: var(--amber);
}

.thing {
  border-top: 1px solid var(--hairline);
  padding-top: 1.4rem;
  margin: 1.8rem 0 0;
}

.thing h2 {
  font-size: 1.25rem;
  font-weight: normal;
  margin: 0 0 0.6rem;
}

.thing p {
  margin: 0;
}

.essays-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.essays-list li {
  margin: 0 0 1.75rem;
}

.essays-list a {
  font-size: 1.3rem;
}

.essays-list p {
  margin: 0.3rem 0 0;
  color: var(--ink-dim);
  font-size: 1rem;
}

.constellation {
  margin: 0;
}

.constellation canvas {
  display: block;
  width: 100%;
  height: 230px;
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}

.constellation figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-top: 0.7rem;
}

.essay .back {
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 2rem;
}

.essay .back a {
  color: var(--ink-dim);
  text-decoration: none;
}

.essay .back a:hover {
  color: var(--amber);
}

.end {
  text-align: center;
  color: var(--amber);
  letter-spacing: 0.1em;
  margin: 3.5rem 0 1rem;
}

footer.site {
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--ink-dim);
}

footer.site p {
  margin: 0;
}

::selection {
  background: rgba(232, 176, 75, 0.3);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 480px) {
  body { font-size: 1.05rem; }
  .open { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .lamp {
    animation: none;
  }
}
