/* ===========================
   warm terminal — hand-written css
   =========================== */

/* -- color system: dusk (default) -- */
:root {
  --bg: #1c1917;
  --bg-subtle: #292524;
  --bg-hover: #33302c;
  --text: #e7e0d5;
  --text-muted: #9a9590;
  --text-dim: #6b6560;
  --accent: #d4a54a;
  --accent-dim: #a07830;
  --link: #c9b87a;
  --link-hover: #e0d4a8;
  --divider: #3d3530;
  --selection-bg: #4a3a20;
  --selection-text: #e7e0d5;
  --aside-bg: #252220;
  --font-body: Georgia, "Times New Roman", serif;
  --font-heading: system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Fira Code", "JetBrains Mono", monospace;
}

/* -- color system: dawn (light) -- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f0e8;
    --bg-subtle: #ebe5da;
    --bg-hover: #e0d9cc;
    --text: #2c2420;
    --text-muted: #7a7068;
    --text-dim: #a09890;
    --accent: #9a6e2e;
    --accent-dim: #7a5520;
    --link: #6b5a30;
    --link-hover: #4a3d1e;
    --divider: #d0c8b8;
    --selection-bg: #d4c4a0;
    --selection-text: #2c2420;
    --aside-bg: #ebe5da;
  }
}

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

body {
  margin: 0;
}

/* -- base -- */
body {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  padding: 2rem;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

/* ===========================
   sidebar layout
   =========================== */

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
  min-height: calc(100vh - 10rem);
}

.sidebar {
  position: sticky;
  top: 2rem;
  align-self: start;
  padding: 2rem 2.5rem 2rem 0;
  border-right: 1px solid var(--divider);
}

.content {
  padding: 2rem 0 2rem 3rem;
}

@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--divider);
    padding: 1rem 0 2rem;
  }

  .content {
    padding: 2rem 0 0;
  }
}

/* -- ornamental dividers -- */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  font-size: 0.65rem;
  color: var(--text-dim);
  line-height: 1;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
}

.divider::before {
  background: linear-gradient(to right, transparent, var(--divider));
  margin-right: 1rem;
}

.divider::after {
  background: linear-gradient(to left, transparent, var(--divider));
  margin-left: 1rem;
}

/* ===========================
   masthead (in sidebar)
   =========================== */

.masthead {
  text-align: left;
}

.name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}

.broadcast {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin: 0.75rem 0 0;
}

.status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin: 0.25rem 0 0;
}

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

/* ===========================
   section headings
   =========================== */

h2 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

/* ===========================
   links (in sidebar)
   =========================== */

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

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

.links li {
  margin: 0.3rem 0;
}

.links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding-bottom: 1px;
}

.links a::before {
  content: "\2192\00a0";
  color: var(--text-dim);
  transition: color 0.15s ease;
}

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

/* ===========================
   thought (sidebar fortune)
   =========================== */

.thought {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent-dim);
  min-height: 1.5em;
}

/* ===========================
   bio (sidebar)
   =========================== */

.bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  line-height: 1.5;
}

/* ===========================
   content sections (now + smallweb)
   =========================== */

.content > section + section {
  margin-top: 2rem;
}

/* ===========================
   now section
   =========================== */

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

.now li {
  margin: 0.4rem 0;
  padding-left: 1.4rem;
  position: relative;
  font-size: 1rem;
}

.now li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  color: var(--accent-dim);
  font-size: 0.75rem;
  top: 0.35rem;
}

.now-updated {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

/* ===========================
   small web
   =========================== */

.smallweb p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

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

.smallweb li {
  margin: 0.35rem 0;
  font-size: 0.95rem;
}

.smallweb a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ===========================
   footer
   =========================== */

footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--divider);
}

.colophon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

.colophon a {
  color: var(--text-dim);
  border-bottom-color: transparent;
}

.colophon a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===========================
   easter egg
   =========================== */

.easter-egg-active {
  animation: whimsy 0.5s ease-in-out;
}

@keyframes whimsy {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-1deg); }
  75% { transform: rotate(1deg); }
}

.easter-egg-message {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--aside-bg);
  border-left: 2px solid var(--accent);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
  animation: fade-in 0.6s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   404
   =========================== */

.four-oh-four {
  text-align: center;
  padding: 4rem 0;
  max-width: 960px;
  margin: 0 auto;
}

.four-oh-four h1 {
  font-size: 4rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.four-oh-four p {
  color: var(--text-muted);
}
